how do you have multiple boundaries with different conditions.

i am trying to apply different boundary conditions to different boundaries, but the first stops working when i add the second, as thought its getting overwritten.

[code]# parabolic inflow
uin1 = CoefficientFunction((-1.54(0-y)(.41-y)/(.41.41),0))
gfu.components[0].Set(uin1, definedon=mesh.Boundaries(“inlet1”))

uin2 = CoefficientFunction((-1.54(1-y)(1.41-y)/(.41.41),0))
gfu.components[0].Set(uin2, definedon=mesh.Boundaries(“inlet2”))

This behaviour is explained here in the documentation:
1.5 Spaces and forms on subdomains — NGS-Py 6.2.2302 documentation!

In short, you have to set them in one .Set call by using a domain (boundary-) wise coefficientfunction:

gfu.components[0].Set(mesh.BoundaryCF({ "inlet1" : uin1, "inlet2" : uin2}), definedon=mesh.Boundaries("inlet1|inlet2"))


cut/paste straight in and working.

guessed it was something like that, but didn’t find it, i’ll check that doc.

is there a resource for other boundary NS conditions?

  • fixed pressure boundary.
  • no perpendicular flow. (symmetry)
  • infinite (no returning information cf perfectly matching)

all the examples i see are for velocity, i made a guess as to how to do some of these, but no good.

can you help again?

FYI: i want to add a boundary with the pressure from another boundary, somewhere else, in the same model. to approximate a small ‘bleed’ pipe without the massive simulation cost.

i guess it could (best) be done by just joining the remote geometries, but then i can only really guess how to do that, or even how that’s referred to, so i could search for information.