Boundary Constraints in Tutorial not being enforced?

Hey,

I am currently working through the tutorial pages and have a problem understanding the boundary conditions. I am currently stuck at the tutorial dealing with the Navier-Stokes equations for Cylinder Flow (https://fenicsproject.org/pub/tutorial/html/._ftut1009.html). Why is it that the inflow nodes defined by

inflow = ‘near(x[0], 0)’

with the inflow profile

inflow_profile = (‘4.01.5x[1]*(0.41 - x[1]) / pow(0.41, 2)’, ‘0’)

at first do not have the values of the inflow profile? What I noticed is that it that the inflow-node values start at 0 (of course, this is the default initialization value) and then quickly converge to the inflow-profile after a few time steps. Why does the employed DirichletBoundary conditions not hard-set these values such that they are enforced within the first time step?

Please note that Dolfin is deprecated, and that you should consider moving to dolfinx.

For DOLFINx Ive made a similar tutorial.
https://jsdokken.com/dolfinx-tutorial/chapter2/ns_code2.html

There is very little value in setting these, as all those dofs at the boundary are strongly enforced in the first tentative solve. You would only get a slight difference in the region between the boundary and the first element inside the boundary…

1 Like

Thank you for the quick response! To check my understanding: The boundary condition is only enforced in the intermediate solution but not at the final solution? Therefore, it is not a bug but rather a consequence of the technique that was employed?

Yes, that is correct. For more details on splitting schemes, I recommend Splitting schemes — Oasisx which explains consequences of the schemes

Awesome, thank you so much that really helped!