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/)
-   -   My simulation stops before last time step (endTime) rhoCentralFoam (https://www.cfd-online.com/Forums/openfoam-solving/234069-my-simulation-stops-before-last-time-step-endtime-rhocentralfoam.html)

RafaelAMC February 22, 2021 09:49

My simulation stops before last time step (endTime) rhoCentralFoam
 
Hi foamers,

I'm using rhoCentralFoam as solver in order to carry out a simulation of a discharge of air (air flowing through a small space).

The simulation starts without problems but stops before the endTime.

I don't understand why, because it is a transient simulation and it should run the time that I set.

The only reason I can think is maybe occurs a complete discharge of air and the control volume does not have work fluid.

What can I do?

Thanks.

simrego February 23, 2021 07:15

Hi!


Include controlDict, log, error message, or something.
Based on this description noone can help you.

RafaelAMC February 23, 2021 10:55

1 Attachment(s)
Sure simrego...

Thanks for your reply.


Boundary conditions:

p
Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  v1912                                |
|  \\  /    A nd          | Website:  www.openfoam.com                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      volScalarField;
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [1 -1 -2 0 0 0 0];

internalField  uniform 1e5;

boundaryField
{
    INLET
    {
        type            uniformFixedValue;
                uniformValue table
                (
                        (0 3000000)
                        (9.26e-05 3000000)
                        (0.0001852 3000000)
                        (0.0002 3000000)
                );
        }
       
        OUTLET
    {
        type            fixedValue;
                value                        uniform 101325;
    }

    SYMMETRY
    {
        type            symmetry;
    }

        WALLS
    {
        type            zeroGradient;
    }

    frontAndBack
    {
        type            empty;
    }
}

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

T

Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  v1912                                |
|  \\  /    A nd          | Website:  www.openfoam.com                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      volScalarField;
    object      T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 1 0 0 0];

internalField  uniform 1;

boundaryField
{
    INLET
    {
        type            uniformFixedValue;
                uniformValue table
                (
                        (0 500)
                        (9.26e-05 600)
                        (0.0001852 550)
                        (0.0002 500)
                );
    }
       
        OUTLET
    {
        type            fixedValue;
                value                        uniform 300;
    }

    SYMMETRY
    {
        type            symmetry;
    }

        WALLS
    {
        type            zeroGradient;
    }

    frontAndBack
    {
        type            empty;
    }
}


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

U

Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  v1912                                |
|  \\  /    A nd          | Website:  www.openfoam.com                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      volVectorField;
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 1 -1 0 0 0 0];

internalField  uniform (0 0 0);

boundaryField
{
    INLET
 
        {
                type pressureInletOutletVelocity;
                value uniform (0 0 0);
        }
   
       
        OUTLET
    {
        type            inletOutlet;
                inletValue                uniform (0 0 0);
                value uniform        (0 0 0);
    }

    SYMMETRY
    {
        type            symmetry;
    }

        WALLS
    {
        type            slip;
    }

    frontAndBack
    {
        type            empty;
    }
}


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

controlDict

Code:

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

application    rhoCentralFoam;

startFrom      startTime;

startTime      0;

stopAt          endTime;

endTime        10000;

deltaT          9.25e-8;

writeControl    adjustable;

writeInterval  9.25e-8;

purgeWrite      0;

writeFormat    ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision  6;

runTimeModifiable true;

adjustTimeStep  yes;

maxCo          1;

maxDeltaT      1;


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

The simulation stops without mistakes:

diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
diagonal: Solving for rhoUx, Initial residual = 0, Final residual = 0, No Iterations 0
diagonal: Solving for rhoUy, Initial residual = 0, Final residual = 0, No Iterations 0
diagonal: Solving for rhoE, Initial residual = 0, Final residual = 0, No Iterations 0
ExecutionTime = 19.7 s ClockTime = 34 s

Mean and max Courant Numbers = 0.149261 0.407854
deltaT = 9.25e-08
Time = 0.00020091

diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
diagonal: Solving for rhoUx, Initial residual = 0, Final residual = 0, No Iterations 0
diagonal: Solving for rhoUy, Initial residual = 0, Final residual = 0, No Iterations 0
diagonal: Solving for rhoE, Initial residual = 0, Final residual = 0, No Iterations 0
ExecutionTime = 19.72 s ClockTime = 34 s

:~/OpenFOAM/OpenFOAM-v1912/proyectos/crevice/crevicesNeue$

Finally, the computational domain (top: inlet; bottom: outlet; and some walls with one side of symmetry)

mAlletto February 23, 2021 13:03

Hello did you notice that the number of iterations are zero. This happens normally if the initial condition of a fluid at rest is consistent with the applied boundary conditions.
Best

Michael

clapointe February 23, 2021 15:56

I'm not immediately sure why the simulation might stop (is there an error printed at all?), but zero iterations is not uncommon for a rhoCentralFoam case (when diagonal solvers are used -- you can check this by running e.g. the shockTube tutorial. There are some threads on this, e.g. https://www.cfd-online.com/Forums/op...cfoam-5-x.html) and is not necessarily a cause for alarm.

Caelan

Jay22kar April 29, 2021 07:12

Hello,

I am facing the same issue although I noticed that the solution runs if you reduce the Courant number.

In your controlDict, reduce the maxCo to 0.5 or 0.25 & then try.

shock77 April 30, 2021 05:36

Interestingly I see no real error message. But your boundary conditions are weird.


1. Why do you set your temperature to 1K? Solving the energy equation that way is very troublesome.

2. Dont use fixedValue for p at the inlet and outlet, its very unstable. Use rather totalPressure at the inlet and fixedPressure at the outlet.


3. The stability limit of rhoCentralFoam is Co = 0.5. You should rather use Co = 0.3 or 0.4 with low order schemes or 0.1 and 0.2 for high order schemes.


All times are GMT -4. The time now is 15:03.