Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

Slip boundary conditions

More
4 years 6 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
4 years 6 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
4 years 6 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
4 years 6 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
4 years 6 months ago #1982 by christopher
What is your criteria for selecting fixed dofs in each time step?
More
4 years 6 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.176 seconds