vitst / dissolFoam

Solves for flow (Stokes) and transport (steady-state) and moves the mesh according to the reactant flux.
11 stars 2 forks source link

velocityDeltatLaplacianSolver's outer loop doesn't converge #6

Open kohoto opened 1 year ago

kohoto commented 1 year ago

Hi,

I sometimes have trouble with the convergence of the outer loop of velocityDeltatLaplacianSolver when I'm running dissolFoam with my own case, and I'd like to ask about the possible reasons.

Also, I got a question about the velocityDeltatLaplacianSolver when I'm investigating the reason for not being converged. I'm not sure what the outer loop of this code is trying to solve (I read the supplemental material from 2018 paper, but I'm still not sure why "the projection operator applied by the tangential slip boundary condition requires an outer-loop iteration of the motion solver"...). I understood that the inner loop is solving the Laplacian equation to relax the internal mesh points using the boundary points' velocity as boundary conditions. So I guess the boundary points' velocity is changing to converge this outer loop, but I'm not sure why we need to change the boundary points' velocity and where the outer boundary conditions are changed for each iteration. Could you elaborate on this?

Thanks!

tonyladd commented 1 year ago

The boundary condition requires the normal velocity to be strictly zero, which is a hard constraint. While constraints can be implemented with Lagrange Multipliers, this is not (as far as I know) available in OF. So what we do is an unconstrained solve (of Laplace eqn) followed by projection. Of course the sequential solution is not self consistent so we need to iterate to self consistency. And yes, this can take many iterations.

It might be possible to improve the convergence by introducing mesh quality factors, as in snappyHexMesh. The mesh may be good enough long before the Laplace equation is solved to the imposed tolerances. Sadly, loosening the tolerance does not always lead to a good mesh. I think because we are not really measuring the right thing. I notice that SHM has a similar iterative scheme, but with the mesh quality as the control, not the solution of the Laplace equation.

Best

Tony

On 3/14/23 17:36, tohoko.tj wrote:

[External Email]

Hi,

I sometimes have trouble with the convergence of the outer loop of |velocityDeltatLaplacianSolver| when I'm running dissolFoam with my own case, and I'd like to ask about the possible reasons.

Also, I got a question about the |velocityDeltatLaplacianSolver| when I'm investigating the reason for not being converged. I'm not sure what the outer loop of this code is trying to solve (I read the supplemental material from 2018 paper, but I'm still not sure why "the projection operator applied by the tangential slip boundary condition requires an outer-loop iteration of the motion solver"...). I understood that the inner loop is solving the Laplacian equation to relax the internal mesh points using the boundary points' velocity as boundary conditions. So I guess the boundary points' velocity is changing to converge this outer loop, but I'm not sure why we need to change the boundary points' velocity and where the outer boundary conditions are changed for each iteration. Could you elaborate on this?

Thanks!

— Reply to this email directly, view it on GitHub https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fvitst%2FdissolFoam%2Fissues%2F6&data=05%7C01%7Ctladd%40che.ufl.edu%7C0ee51edf694340fab03808db24d42fd9%7C0d4da0f84a314d76ace60a62331e1b84%7C0%7C0%7C638144266006500888%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=XrvPcLoPYFY%2FgVM72VWxDHQrsiDfFd5iU13GFInOPIA%3D&reserved=0, or unsubscribe https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FACNEWCYCN3NAD4IY6GISTFTW4DQGHANCNFSM6AAAAAAV27V2XY&data=05%7C01%7Ctladd%40che.ufl.edu%7C0ee51edf694340fab03808db24d42fd9%7C0d4da0f84a314d76ace60a62331e1b84%7C0%7C0%7C638144266006500888%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Bm4IzQh5zi0gDydpXtkFdLul29OqoYOFKwiuSAkA24U%3D&reserved=0. You are receiving this because you are subscribed to this thread.Message ID: @.***>

kohoto commented 1 year ago

Hi @tonyladd,

Thank you so much for the very detailed explanation. I wasn't sure why the residual calculation looks like that, but now I understood.

I think I'm just going to increase the tolerance since my case doesn't have a huge shape change, and I don't think it matters that much whether the mesh locations are optimized.

Thanks, Tohoko