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/)
-   -   Dynamic mesh simulation (pimpleDyMFoam) problem (https://www.cfd-online.com/Forums/openfoam-solving/115171-dynamic-mesh-simulation-pimpledymfoam-problem.html)

sidlof March 25, 2013 11:30

Dynamic mesh simulation (pimpleDyMFoam) problem
 
1 Attachment(s)
Dear Foamers,

I have a problem running a dynamic mesh simulation, which worked fine in OF 1.7, under OF 2.1. I am using pimpleDyMFoam and the velocityLaplacian solver for the incompressible low Mach-number flow in a channel with moving boundaries. The flow is driven by constant pressure difference between inlet and outlet, so I use a combination of totalPressure (300Pa) / fixedValue (0 Pa) BCs for pressure and pressureInletOutlet / inletOutlet for velocity at inlet/outlet.

Everything worked fine both in serial and parallel under OF1.7, but when I tried to transfer the simulation to OF2.1, I got a very mysterious error. Between versions 1.7 and 2.1 I had to modify a line in vfSchemes from

Code:

div((nuEff*dev(grad(U).T()))) Gauss linear; // OF1.7
to

Code:

div((nuEff*dev(T(grad(U))))) Gauss linear; // OF2.1,
,

otherwise everything was kept the same. I should also note that the 2.1 OF version is installed on a different machine (SGI Altix UV 100 with SGI MPT library, but I reckon this should not make difference).

Symptoms:
  • Simulation starts fine and computes what it should. However, after certain time the DILUPBiCG solver for the Uz starts to diverge and the simulation crashes. This did not happen in OF 1.7!
  • The time when the crash occurs DEPENDS on the number of processors I am running on (e.g. 0.0011 for 4 processors, 0.006 on 16 processors)
  • The same simulation with static mesh (pimpleFoam solver) works fine both in 1.7 and 2.1

I have already tried quite a couple of things:
  • Tightening/loosening tolerances for the Ufinal solver in fvSolution
  • Switching from PBiCG to GAMG for U/Ufinal
  • Setting maxCo to 0.5
  • Checking the mesh with checkMesh in all steps up to the crash
  • Playing around with the relaxation parameters
  • Trying different decomposition methods (scotch, simple)
Nothing helps, only in some cases the disaster is slightly delayed. I suspect there is some numeric instability hidden in my settings, but do not see where.. I would by mostly grateful for any hints. The important files are attached for completeness.

Thanks!
Petr

Akshay April 2, 2013 09:37

Hi petr!

Use GAMG for p and pFinal (which I believe you are using) and also switch to smoothsolver for the other variables viz. U, UFinal and turb variables.
Let relTol be set to 0 for the final variables.
Let me know what happens!
Cheers!

Akshay

renyun0511 April 4, 2013 00:23

Hi Akshay,

I'm studying the unsteady simulation of pump by transienSimpleDyMFoam, and I'm confused by some professional terms about relTol, tolerance, maxCo,maxDeltaT, deltaT, can you give me some details about them, please? Thank you very much!


Best Regards,

Yun Ren

Lieven April 4, 2013 02:35

Hi Yun Ren,


tolerance: the absolute residual when solving a matrix system (e.g. Ux), iterating stops after the tolerance has been reached: residual < tolerance
relTol: relative tolerance with respect to the initial residual. iterating will stop when residual < (initial residual)*relTol
maxCo: the maximal Courant number in the domain, (see http://en.wikipedia.org/wiki/Courant...Lewy_condition for the definition). Or the maximum Courant number you want to have in your domain if the time step changes dynamically.
maxDeltaT: It the time step changes dynamically based on the Courant number, this is the maximal time step you allow
deltaT: simply the actual time step size.

Just as a note regarding tolerance and relTol: both can be set at the same time i.e. iterating will stop after the least stringent criterion is reached.

Cheers,

L

sidlof April 11, 2013 10:52

Hi Ashkay,

thank you for your hint! The code DOES work with smoothsolver for U/Ufinal, as you suggested, even under OF2.1.0.

By the way, meanwhile I managed to compile OF1.7.0 on the machine. The simulation with the original settings (PBiCG for U) runs ok under the old OF version. So it is now confirmed that the problem is OF-version-dependent, not machine-dependent.

To summarize: I now know two ways how to circumvent the problem (running the old OF version, or switching to smoothsolver for U/Ufinal), but I do not still understand why the original settings cause a crash under OF 2.1..

Petr

renyun0511 April 11, 2013 22:10

Thank you very much for the information, Lieven.
Quote:

Originally Posted by Lieven (Post 418237)
Hi Yun Ren,

tolerance: the absolute residual when solving a matrix system (e.g. Ux), iterating stops after the tolerance has been reached: residual < tolerance
relTol: relative tolerance with respect to the initial residual. iterating will stop when residual < (initial residual)*relTol
maxCo: the maximal Courant number in the domain, (see http://en.wikipedia.org/wiki/Courant...Lewy_condition for the definition). Or the maximum Courant number you want to have in your domain if the time step changes dynamically.
maxDeltaT: It the time step changes dynamically based on the Courant number, this is the maximal time step you allow
deltaT: simply the actual time step size.

Just as a note regarding tolerance and relTol: both can be set at the same time i.e. iterating will stop after the least stringent criterion is reached.

Cheers,

L


Akshay April 12, 2013 11:24

Hey Petr
Ye it is a little weird. I've been looking into it for a while now. Hope someone else can throw some light on this issue.


All times are GMT -4. The time now is 10:49.