Apply BC only on part of a sideset (spatial activation/deactivation) #32345
-
Check these boxes if you have followed the posting rules.
QuestionHi, I’m working on an environmental problem where a boundary condition is defined on a sideset, but it should only act on certain spatial portions of that boundary. The active region can change in space and time and is not known a priori. When the BC is not acting, it should be fully turned off (not just set to zero). Splitting the boundary into many small predefined sidesets is not practical in this case. What is the recommended way in MOOSE to activate/deactivate a BC only on part of a sideset based on spatial coordinates (and possibly time)? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
|
Hello is this an integratedBC (creating an integral contribution) or a dirichlet BC? |
Beta Was this translation helpful? Give feedback.
right so it derives from PorousFlowSink which is an IntegratedBC not a dirichletBC.
So if is trying to enfore a dirichlet condition it is either doing it weakly or using a penalty method (which is weakly in a way).
But that is good news.
To not enforce an integratedBC, all you need to do is to have it contribute 0 to the integral of the BC.
So in the compteQpIntegral, have the desired logic for "should-contribute-or-not" and then return 0 if it should not be active