Closed TheCrowned closed 3 years ago
I'm not able to reproduce this using my personal setup, which is FEniCS 2019.2.0.dev0, installed on Ubuntu, through the package manager. The residuals from the first four steps are identical, but then it continues to converge for another step, meets the convergence criterion, and prints out the error. It's likely not an issue with changes to the FEniCS software itself, since I would have originally written this with an older version (also installed on Ubuntu). The only thing I can think of is some difference in the versions of third-party libraries.
One potential issue I can think of is that the problem is technically ill-posed, because there is no mechanism to pin down the hydrostatic mode in the pressure. You might try something like
# Pin pressure at one node to remove hydrostatic mode:
bc = DirichletBC(V.sub(1),Constant(0),"x[0]<DOLFIN_EPS && x[1]<DOLFIN_EPS",
"pointwise")
# Solve for velocity and pressure:
solve(F==0,up,bcs=[bc,])
This produces an essentially-identical velocity solution for me (and remains consistent with the arbitrarily-selected pressure p_exact
).
Thanks, that tweak made it work! I am running fenics 2019.1.0 on Ubuntu.
Invoked with python demos/regularizedLDC.py --viz --Re 100 --Nel 100
, is this the velocity plot I am supposed to get?
is this the velocity plot I am supposed to get?
This looks qualitatively correct. You can get a quantitative convergence check from the error measures printed at the end of the script. Note that this differs from the classic lid-driven cavity problem, in that it is "regularized" to have a known smooth exact solution (thus enabling the quantitative convergence check).
I went ahead and pushed the changes to the repository, so hopefully nobody will run into this issue in the future.
Hello! This looks like a very interesting project. I am also working on the Navier-Stokes equations with FEniCS :)
I cloned the repo and tried to run the lid driven cavity demo as it is, but it does not seem to converge. Am I doing something wrong?