Slip boundary conditions

More
5 years 10 months ago #1978 by hvwahl
Hi everyone,

is there "automatic" way to enable free-slip boundary conditions on one boundary and Dirichlet on another using the VectorH1 space?

Alternatives would of course to be a separate H1 space for each component each with different Dirichlet flags like here , using Nitsche to enforce the Dirichlet on only one component or to manually set the freedofs array like here .

Best wishes,
Henry
More
5 years 10 months ago #1979 by Guosheng Fu
There is a "manual" way, which is pretty good.
See the post

ngsolve.org/forum/ngspy-forum/846-bounda...-vector-valued-funcs
More
5 years 10 months ago #1980 by Guosheng Fu
Here is a snipplet that works for me:
Code:
V = VectorH1(mesh, order = 3) Q = H1(mesh,order=2) X = FESpace([V,Q]) freedofs = X.FreeDofs() fesx,fesy = V.components for el in fesx.Elements(BND): if (el.mat=="dir"): for dof in el.dofs: freedofs.Clear(dof) freedofs.Clear(fesx.ndof+dof) # y-component if (el.mat=="neu"): for dof in el.dofs: freedofs.Clear(dof) if (el.mat == "wall" or el.mat =="inlet" or el.mat =="outlet"): for dof in el.dofs: freedofs.Clear(fesx.ndof+dof) # y-component
More
5 years 10 months ago #1981 by hvwahl
Replied by hvwahl on topic Slip boundary conditions
Hi Guosheng,

thank for your help! I was was hoping to avoid a loop over the elements, as I have to update the freedofs array in every time-step, but your way is probably still the best.

Best wishes, Henry
More
5 years 10 months ago #1982 by christopher
What is your criteria for selecting fixed dofs in each time step?
More
5 years 10 months ago #1987 by hvwahl
Replied by hvwahl on topic Slip boundary conditions
Hi Christopher,

within the bulk, the dofs are selected with element markers obtained via a level-set function (which changes in each time-step). The mesh boundary dofs will stay the same in each time-step.

Best wishes, Henry
Time to create page: 0.117 seconds