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/)
-   -   trying why my runs diverge - simple case I built (https://www.cfd-online.com/Forums/openfoam-solving/252618-trying-why-my-runs-diverge-simple-case-i-built.html)

chemotkbilo October 28, 2023 14:55

trying why my runs diverge - simple case I built
 
1 Attachment(s)
So I have the following case that I built, the mesh lis ok (used checkMesh), and developed the the required constants. However, when I run simpleFoam or foamRun, it starts to solve up to certain point and then it starts to produce nan.
For example, see below

HTML Code:

[CODE]SmoothSolver:  Solving for Ux, Initial residual = 0.91362581, Final residual = 9.1691167e-06, No Iterations 36
smoothSolver:  Solving for Uy, Initial residual = 0.97344182, Final residual = 7.8785232e-06, No Iterations 34
smoothSolver:  Solving for Uz, Initial residual = 0.99999992, Final residual = 8.4295095e-06, No Iterations 37
GAMG:  Solving for p, Initial residual = 1, Final residual = nan, No Iterations 1000
time step continuity errors : sum local = nan, global = nan
GAMG:  Solving for p, Initial residual = nan, Final residual = nan, No Iterations 1000
time step continuity errors : sum local = nan, global = nan, cumulative = nan
smoothSolver:  Solving for epsilon, Initial residual = nan, Final residual = nan, No Iterations 1000
smoothSolver:  Solving for k, Initial residual = nan, Final residual = nan, No Iterations 1000
ExecutionTime = 15.673765 s  ClockTime = 15 s

Courant Number mean: nan max: nan
Time = 0.0469628s

smoothSolver:  Solving for Ux, Initial residual = nan, Final residual = nan, No Iterations 1000
smoothSolver:  Solving for Uy, Initial residual = nan, Final residual = nan, No Iterations 1000
smoothSolver:  Solving for Uz, Initial residual = nan, Final residual = nan, No Iterations 1000
[/CODE]

My files are provided below - any help would be appreciated.

Tobermory October 29, 2023 13:08

Looks like you are trying to run as a transient simulation. Try changing over to steady state:

- in fvSchemes, change ddtSchemes default from Euler to steadyState
- in fvSolution, comment out the PIMPLE section and add the following:
Code:

SIMPLE
{
    nNonOrthogonalCorrectors 0;
    consistent      yes;

    residualControl
    {
        p              1e-2;
        U              1e-3;
        "(k|epsilon)" 1e-3;
    }
}

relaxationFactors
{
    fields
    {
        p              0.3;
    }
    equations
    {
        U              0.7;
        k              0.7;
        epsilon        0.7;
    }
}

- in controlDict, change deltaT to 1

Now run with simpleFoam, and this should converge/behave nicely. Good luck!


All times are GMT -4. The time now is 00:20.