gdmcbain / fenics-tuto-in-skfem

reproducing the examples from the FEniCS tutorial in scikit-fem
14 stars 1 forks source link

08_navier_stokes_cylinder #5

Closed gdmcbain closed 4 years ago

gdmcbain commented 5 years ago

Next after 07_navier_stokes_channel #4 is ft08_navier_stokes_cylinder.

gdmcbain commented 5 years ago

There's an issue about this over at https://github.com/hplgit/fenics-tutorial/issues/51.

gdmcbain commented 5 years ago

That was about the line

https://github.com/hplgit/fenics-tutorial/blob/bf8120cb448f244df18871ee305f4b9c463896cf/pub/python/vol1/ft08_navier_stokes_cylinder.py#L115

Myself, I first tried replacing PROGRESS with its value

set_log_level(16)

but that didn't work either so I just commented it out and did without logging.

gdmcbain commented 4 years ago

I had successfully modified this to run in the Docker image but now with FEniCS installed locally on Ubuntu 19.10 with

conda create -n FEniCS -c conda-forge fenics

it failed with

ModuleNotFoundError: No module named 'mshr'
gdmcbain commented 4 years ago

Installing mshr #11:

conda install -c conda-forge mshr
gdmcbain commented 4 years ago

So how does 08 differ from 07 Navier–Stokes channel #4?

gdmcbain commented 4 years ago

But the pressure-correction algorithm is the same.

gdmcbain commented 4 years ago

I presume that iterative solvers aren't really required for the problem as meshed—it's only 4585 triangles—but are rather given as a suggestion for larger more realistic problems.

gdmcbain commented 4 years ago

Isn't the pressure-correction step symmetric? Why is the unsymmetric Bi-CGStab scheme adopted?

gdmcbain commented 4 years ago

The velocity isn't written as a vector to the XDMF time series nschloe/meshio#522.

gdmcbain commented 4 years ago

The original FEniCS tutorial uses HYPRE AMG accelerated by BiCG-Stab for the tentative velocity

https://github.com/hplgit/fenics-tutorial/blob/bf8120cb448f244df18871ee305f4b9c463896cf/pub/python/vol1/ft08_navier_stokes_cylinder.py#L127

and pressure correction

https://github.com/hplgit/fenics-tutorial/blob/bf8120cb448f244df18871ee305f4b9c463896cf/pub/python/vol1/ft08_navier_stokes_cylinder.py#L132

steps.

I assume these are via PETSc. We could make use of petsc4py here (see kinnala/scikit-fem#236) but excellent results are also obtained much more simply with pyamgcl.

final

Figure:— Plot of the velocity (coloured by pressure) for the cylinder test problem at final time

gdmcbain commented 4 years ago

08_navier_stokes_cylinder