Hello,
I’m currently using dolfinx to perform topological optimizations for fluid flows. I use a classical approach with Darcy’s penality in the equation of momentum. In order to move on to 3D cases requiring many cells, I encounter difficulties. Indeed, in order to perform optimizations, I need a stationary and robust solver that runs as fast as possible. So far, I’ve explored two different solvers (I use Taylor Hood element in both case).
The first is a NonLinearSolver solving the equation:
F_PV_ustdy = rho_ * inner(v - v_prev1, w_v) / dt *dx
+ rho_*(inner(grad(v) * v_prev1, w_v) + inner(grad(v_prev1) * v, w_v) - inner(grad(v_prev1) * v_prev1, w_v))*dx +
div(v)*w_p*dx + inner(grad(w_v), T)*dx + inner(k(alpha) * v, w_v)*dx
avec I_ = as_tensor(np.eye(3)); T = -p*I_ + (mu_+ mu_T)*(grad(v) + grad(v).T);
at each time step using a NewtonLS with LU and MUMPS. However, as soon as the mesh exceeds about 40x40x40, the calculation time becomes very very long, even on many processor cores. (Maybe because I’m using a conda environment?). But in a future goal to increase the number of reynolds, the mesh will require even more meshes and many time steps. I also tried to use a gmres but I never got past iteration 1.
So I’m interested in a split approach to solving Navier Stokes, as shown in the tutorial “Test problem 2: Flow past a cylinder (DFG 2D-3 benchmark)”. The solver is very fast, even for much larger meshes.
However, I did spot some differences when comparing with the 1st solver. For example, on a flow around a plate with a 45° skid angle (vortex generator) at Re = 500, the first solver rapidly converges to a stationary state with two vortices. Whereas the split solver gives an unsteady solution (residue loses 2 orders of magnitude then oscillates). Also for Re < 300, both solvers converge into a steady state.The two simulations are identical except for the solver and the time step dt, as the split solver must respect CFL <1.
So, I don’t understand this difference and I’m a bit confused as to which solver to use, because the first one allows me to obtain a stationary state but is too slow, whereas the second one produces the opposite effect. I’d like an outside opinion! If you want me to provide some code or picture, tell me !
Thanks a lot!