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/)
-   -   interDyMFoam extrem small timestep deltaT (https://www.cfd-online.com/Forums/openfoam-solving/158771-interdymfoam-extrem-small-timestep-deltat.html)

masterd-@gmx.de September 3, 2015 06:05

interDyMFoam extrem small timestep deltaT
 
Hello everybody,

I'm running a parallel case with interDyMFoam and it ran very stable for more than 24h but suddenly the time step drecreased to e-17 (was usually around e-5 or e-6).

I really don't know how this could happen, hopefully somebody here can give me an advise.

Maybe I need to change some parameters in controlDict or fvsolution? I already changed the max Co from 0.5 to 1.5, but it seems that this wouldn't solve the problem...



Here is my controlDict, fvsolution, and the tail of the log file:


/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location system;
object fvSolution;
}


solvers
{
"alpha.oil.*"
{
nAlphaCorr 1;
nAlphaSubCycles 2;
cAlpha 1;
}

p_rgh
{
solver GAMG;
tolerance 1e-6;
relTol 0.02;
smoother GaussSeidel;
cacheAgglomeration true;
nCellsInCoarsestLevel 10;
agglomerator faceAreaPair;
nPreSweeps 0;
nPostSweeps 2;
mergeLevels 1;
}

"pcorr.*"
{
$p_rgh;
tolerance 0.1;
relTol 0;
}

p_rghFinal
{
$p_rgh;
relTol 0;
}

".*(rho|rhoFinal)"
{
solver diagonal;
}

//"(U|T|k|epsilon).*"
"(U).*"
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-6;
relTol 0;
nSweeps 1;
}
}

PIMPLE
{
momentumPredictor yes;
correctPhi yes;
transSonic no;
nOuterCorrectors 1;
nCorrectors 3;
nNonOrthogonalCorrectors 0;
nAlphaCorr 1;
nAlphaSubCycles 2;
cAlpha 1;
pRefCell 0;
pRefValue 0;
}

relaxationFactors
{
fields
{
}
equations
{
"U.*" 1;
// "k.*" 1;
// "epsilon.*" 1;
// "T.*" 1;
}
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}


application interDyMFoam;

startFrom latestTime;

startTime 0;

stopAt endTime;

endTime 10.00;

deltaT 1e-8;

writeControl adjustableRunTime;

writeInterval 1e-3;

purgeWrite 0;

writeFormat ascii;

writePrecision 10;

writeCompression uncompressed;

timeFormat general;

timePrecision 10;

runTimeModifiable yes;

adjustTimeStep yes; //yes

maxCo 1.5; //0.5;

maxAlphaCo 3; //1

maxDeltaT 1;

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


Interface Courant Number mean: 0.0162251295 max: 1.235127583
Courant Number mean: 0.03746275692 max: 1.505069362
deltaT = 8.986336254e-16
Time = 0.30976512373823939

solidBodyMotionFunctions::rotatingMotion::transfor mation(): Time = 0.3097651237 transformation: ((0 0 0) (-0.9609024559 (-0.2768871076 0 0)))
AMI: Creating addressing and weights between 7680 source faces and 7680 target faces
AMI: Patch source sum(weights) min/max/average = 0.995624894, 1, 0.9998651648
AMI: Patch target sum(weights) min/max/average = 0.9955752207, 1, 0.9998651459
Execution time for mesh.update() = 0.35 s
GAMG: Solving for pcorr, Initial residual = 1, Final residual = 0.02886373019, No Iterations 1
time step continuity errors : sum local = 3.961941627e-08, global = 3.84766528e-08, cumulative = 0.0005572157936
MULES: Solving for alpha.oil
Phase-1 volume fraction = 0.2333536308 Min(alpha1) = -2.091917846e-09 Max(alpha1) = 1.000000252
MULES: Solving for alpha.oil
Phase-1 volume fraction = 0.2333536528 Min(alpha1) = -7.967302514e-08 Max(alpha1) = 1.000000196
smoothSolver: Solving for Ux, Initial residual = 0.004147801321, Final residual = 8.406511155e-08, No Iterations 2
smoothSolver: Solving for Uy, Initial residual = 0.0008832974978, Final residual = 7.55290759e-09, No Iterations 2
smoothSolver: Solving for Uz, Initial residual = 0.001193220823, Final residual = 1.806352525e-08, No Iterations 2
GAMG: Solving for p_rgh, Initial residual = 0.02640067326, Final residual = 0.0002437922543, No Iterations 3
time step continuity errors : sum local = 3.265837615e-07, global = 3.870618914e-08, cumulative = 0.0005572544998
GAMG: Solving for p_rgh, Initial residual = 0.003073776897, Final residual = 4.815100202e-05, No Iterations 3
time step continuity errors : sum local = 9.428254958e-08, global = 3.701133263e-08, cumulative = 0.0005572915111
GAMG: Solving for p_rgh, Initial residual = 0.000667603213, Final residual = 9.064777523e-07, No Iterations 22
time step continuity errors : sum local = 3.817638855e-08, global = 3.70996933e-08, cumulative = 0.0005573286108
ExecutionTime = 222145.34 s ClockTime = 222239 s


Thank you for all replies!

doubledang July 31, 2016 15:22

Quote:

Originally Posted by masterd-@gmx.de (Post 562287)
Hello everybody,

I'm running a parallel case with interDyMFoam and it ran very stable for more than 24h but suddenly the time step drecreased to e-17 (was usually around e-5 or e-6).

I really don't know how this could happen, hopefully somebody here can give me an advise.

Maybe I need to change some parameters in controlDict or fvsolution? I already changed the max Co from 0.5 to 1.5, but it seems that this wouldn't solve the problem...



Here is my controlDict, fvsolution, and the tail of the log file:


/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location system;
object fvSolution;
}


solvers
{
"alpha.oil.*"
{
nAlphaCorr 1;
nAlphaSubCycles 2;
cAlpha 1;
}

p_rgh
{
solver GAMG;
tolerance 1e-6;
relTol 0.02;
smoother GaussSeidel;
cacheAgglomeration true;
nCellsInCoarsestLevel 10;
agglomerator faceAreaPair;
nPreSweeps 0;
nPostSweeps 2;
mergeLevels 1;
}

"pcorr.*"
{
$p_rgh;
tolerance 0.1;
relTol 0;
}

p_rghFinal
{
$p_rgh;
relTol 0;
}

".*(rho|rhoFinal)"
{
solver diagonal;
}

//"(U|T|k|epsilon).*"
"(U).*"
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-6;
relTol 0;
nSweeps 1;
}
}

PIMPLE
{
momentumPredictor yes;
correctPhi yes;
transSonic no;
nOuterCorrectors 1;
nCorrectors 3;
nNonOrthogonalCorrectors 0;
nAlphaCorr 1;
nAlphaSubCycles 2;
cAlpha 1;
pRefCell 0;
pRefValue 0;
}

relaxationFactors
{
fields
{
}
equations
{
"U.*" 1;
// "k.*" 1;
// "epsilon.*" 1;
// "T.*" 1;
}
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}


application interDyMFoam;

startFrom latestTime;

startTime 0;

stopAt endTime;

endTime 10.00;

deltaT 1e-8;

writeControl adjustableRunTime;

writeInterval 1e-3;

purgeWrite 0;

writeFormat ascii;

writePrecision 10;

writeCompression uncompressed;

timeFormat general;

timePrecision 10;

runTimeModifiable yes;

adjustTimeStep yes; //yes

maxCo 1.5; //0.5;

maxAlphaCo 3; //1

maxDeltaT 1;

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


Interface Courant Number mean: 0.0162251295 max: 1.235127583
Courant Number mean: 0.03746275692 max: 1.505069362
deltaT = 8.986336254e-16
Time = 0.30976512373823939

solidBodyMotionFunctions::rotatingMotion::transfor mation(): Time = 0.3097651237 transformation: ((0 0 0) (-0.9609024559 (-0.2768871076 0 0)))
AMI: Creating addressing and weights between 7680 source faces and 7680 target faces
AMI: Patch source sum(weights) min/max/average = 0.995624894, 1, 0.9998651648
AMI: Patch target sum(weights) min/max/average = 0.9955752207, 1, 0.9998651459
Execution time for mesh.update() = 0.35 s
GAMG: Solving for pcorr, Initial residual = 1, Final residual = 0.02886373019, No Iterations 1
time step continuity errors : sum local = 3.961941627e-08, global = 3.84766528e-08, cumulative = 0.0005572157936
MULES: Solving for alpha.oil
Phase-1 volume fraction = 0.2333536308 Min(alpha1) = -2.091917846e-09 Max(alpha1) = 1.000000252
MULES: Solving for alpha.oil
Phase-1 volume fraction = 0.2333536528 Min(alpha1) = -7.967302514e-08 Max(alpha1) = 1.000000196
smoothSolver: Solving for Ux, Initial residual = 0.004147801321, Final residual = 8.406511155e-08, No Iterations 2
smoothSolver: Solving for Uy, Initial residual = 0.0008832974978, Final residual = 7.55290759e-09, No Iterations 2
smoothSolver: Solving for Uz, Initial residual = 0.001193220823, Final residual = 1.806352525e-08, No Iterations 2
GAMG: Solving for p_rgh, Initial residual = 0.02640067326, Final residual = 0.0002437922543, No Iterations 3
time step continuity errors : sum local = 3.265837615e-07, global = 3.870618914e-08, cumulative = 0.0005572544998
GAMG: Solving for p_rgh, Initial residual = 0.003073776897, Final residual = 4.815100202e-05, No Iterations 3
time step continuity errors : sum local = 9.428254958e-08, global = 3.701133263e-08, cumulative = 0.0005572915111
GAMG: Solving for p_rgh, Initial residual = 0.000667603213, Final residual = 9.064777523e-07, No Iterations 22
time step continuity errors : sum local = 3.817638855e-08, global = 3.70996933e-08, cumulative = 0.0005573286108
ExecutionTime = 222145.34 s ClockTime = 222239 s


Thank you for all replies!

Hello masterd-@gmx.de

Did you manage to solve your problem?
I am faced with exactly the same problem,could you please give some help?
Many thanks!

Best regards,

vikramaditya91 July 31, 2016 17:50

Could be the solution already diverged
 
Hey guys, I am not sure but it seems the solution has already diverged. I am not familiar with multi-phase systems in OpenFOAM but it could be possible that there is a massive pressure/velocity gradient (which happens when a case diverges). And the probability that a solution diverges is much higher in case of multiphase flow as you might already know.

Not very sure how you can stop it from diverging though. To check if it really has diverged, I suggest you save the time step just after the time step has gone so low. Nevertheless your Courant numbers are very high. Bring it down to under 0.1 and then see what happens.

toodles August 1, 2016 04:18

In my experience with interDyMFoam, extremely small time steps are usually a result of cells in your mesh collapsing in on themselves. This depends on your mesh motion solver; particularly when using a mesh morphing technique rather than a topology change. You are almost guaranteed to run into this problem if you are using a mesh morphing technique and your moving object has a range of motion that is relatively large compared to your domain. It requires a bit of tweaking. What motion solver are you using?

doubledang August 1, 2016 17:23

Quote:

Originally Posted by toodles (Post 612220)
In my experience with interDyMFoam, extremely small time steps are usually a result of cells in your mesh collapsing in on themselves. This depends on your mesh motion solver; particularly when using a mesh morphing technique rather than a topology change. You are almost guaranteed to run into this problem if you are using a mesh morphing technique and your moving object has a range of motion that is relatively large compared to your domain. It requires a bit of tweaking. What motion solver are you using?

Hi toodles

Thanks for your reply.
I use “DynamicFvMesh solidBodyMotionFvMesh“ for rotating impeller.
It might be mainly caused by mesh quality, but how can I determine what kind of mesh quality is okay for InterDyMFoam?
I am still struggling with it....

Best regards,

toodles August 2, 2016 07:09

At the point in time where your timestep begins to shrink, examine the mesh for places where the cell has gotten extremely small. Correspondingly, you should notice that your alpha value has gotten unrealistically high. If this is happening, then you know that it is an issue with your mesh structure and dynamic mesh settings that will need to be tweaked; however, I am unfamiliar with the mesh motion solver you are using, so I can't offer any help there. Also, what is your Co number at these time steps?


All times are GMT -4. The time now is 19:44.