Closed ruf10 closed 1 year ago
This question is better suited for the discourse forum at https://fenicsproject.discourse.group/ , as from the code it is not immediately clear that this an actual bug in the dolfinx codebase. We can still reopen in future if, from the discussion there, this will turn out to actually be a bug.
@ruf10 I would suggest you debug your BC by using something along the lines of:
bcu = [bcu_inner, bcu_outer]
wh = fem.Function(W)
[fem.petsc.set_bc(wh.vector, bc) for bc in bcu]
with dolfinx.io.VTXWriter(msh.comm, "u.bp", [wh.sub(0).collapse()]) as vtx:
vtx.write(0.0)
and visualize u
in Paraview, to see if it sets the bcs as you would expect
How to reproduce the bug
Hi guys,
I have been working on the no slip boundary condition using dolfinx for a long time. I don't think the no slip boundary condition is successfully applied.
Here is the setting I have: I am running a concentric 3D cylinders, inner cylinder with radius r and outer cylinder with radius R. I am trying to spin the inner cylinder with angular velocity 4 but gradually turning it on, and the outer cylinder is stay still. Also when I creating the mesh I use periodic boundary condition in Z direction/ the height in gmsh by the translation matrix.
I followed https://jsdokken.com/dolfinx-tutorial/chapter2/ns_code2.html#boundary-conditions carefully but when I see the velocity, it looks like near the outer cylinder the speed is faster. What I would like to see is inner is spinning and so the near inner boundary layer will be exactly the speed of my cylinder and outer near outer cylinder is 0.
I tried so many ways to apply the no slip boundary condition with different tutorials provided by dolfinx/ fenicsx, non of them return me the plausible result.
Could anyone take a look at it sooner?
Thanks!
Minimal Example (Python)
Output (Python)
No response
Version
main branch
DOLFINx git commit
No response
Installation
No response
Additional information
No response