chaos-polymtl / lethe

Repository for the open-source lethe CFD/DEM/CFD-DEM project
https://chaos-polymtl.github.io/lethe/index.html
GNU Lesser General Public License v2.1
267 stars 59 forks source link

Fix viscosity initial conditions for matrix-free #1109

Closed lpsaavedra closed 3 months ago

lpsaavedra commented 3 months ago

Description of the problem

After the changes in #1102 where the architecture of the Newton solver was changed to be able to reuse the preconditioner, the initial conditions related to viscosity were not working as expected in the matrix-free application when using multigrid preconditioners.

Description of the solution

Now the kinematic viscosity of all the operators of the different multigrid levels is set to the temporary viscosity when needed to ensure the correct preconditioning.

How Has This Been Tested?

The flow around a sphere benchmark, which uses the viscosity ramp as initial condition, obtains now the expected results.