CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Force discontinuity with correctPhi in restart (https://www.cfd-online.com/Forums/openfoam-solving/250469-force-discontinuity-correctphi-restart.html)

daveatstyacht June 16, 2023 04:54

Force discontinuity with correctPhi in restart
 
Hi All,
I am testing a modified version of pimpleFoam in which I impose the deformation of one of the boundary walls. The case is essentially the cavity tutorial case but with the left wall deforming in a proscribed manner from another code.


The solver works fine if I run without stopping the computation. However if I decide to stop and restart the computation I have a discontinuity in the fluid forces (about 2-3%). I observed that the residuals of the mesh deformation, pcorr and the momentum Ux and Uy are perfectly matching at the first non-linear iteration of the restarted case compared to the non-restarted case. The first difference that appears is the initial pressure residual. The deformation applied to the wall is identical for both the non-restarted case and restarted case, so I can eliminate issues from the other code as the source of the problem.



After numerous test, I have observed that if I deactivate correctPhi, then there is a perfect match between the forces of the restarted case and the case run without stopping. As I understand, if I leave correctPhi deactivated, I will be violating continuity and it will be worse if I increase the deformations. Clearly the problem comes from the restart of correctPhi and phi. I have not found a PIMPLE keyword that manages to compensate and adding inner loop iterations doesn't really help either. I already have 20 outer loop iterations. I am using Euler for the temporal scheme.



Is there something that should be saved that I am unaware of (for instance dPhi/dt)? Any ideas of how to address this are welcome.


Best regards,
Dave

daveatstyacht June 16, 2023 08:17

Influence of time scheme
 
Hi All,
As I mentioned in my prior post, I was using Euler for the temporal scheme in OpenFOAM. On a hunch I decided to test with Backward and my error almost entirely disappeared (0.0013% vs 2-3%). I am quite surprised that Euler would lead to a discontinuity and backward did not as if Euler was missing something during the save (cellDisplacement, p; phi, meshPhi, U, and Uf are all present).


I should add that the coupled code is advancing with second order (Newmark scheme). Is it possible that the mismatch in temporal scheme order is sufficient to cause a discontinuity even though the fluid solver received the same positions in both a restart or case without restart?


Best regards,
Dave


All times are GMT -4. The time now is 09:11.