CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

rhoCentralFoam diverges

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 16, 2017, 03:07
Default rhoCentralFoam diverges
  #1
New Member
 
Join Date: May 2017
Location: Japan, Kitakyushu
Posts: 19
Rep Power: 8
Dorian1504 is on a distinguished road
Hello,

I'm currently trying to simulate an inviscid supersonic (Mach 3) flow around rocket (agard-B) with rhoCentralFoam however the solver crashes after few iterations.


Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Reading thermophysical properties

Selecting thermodynamics package 
{
    type            hePsiThermo;
    mixture         pureMixture;
    transport       const;
    thermo          hConst;
    equationOfState perfectGas;
    specie          specie;
    energy          sensibleInternalEnergy;
}

Reading field U

Creating turbulence model

Selecting turbulence model type laminar
fluxScheme: Kurganov

Starting time loop

Mean and max Courant Numbers = 0.00140598 0.446339
Time = 0.0001

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 rhoUz, Initial residual = 0, Final residual = 0, No Iterations 0
diagonal:  Solving for rhoE, Initial residual = 0, Final residual = 0, No Iterations 0
ExecutionTime = 32.94 s  ClockTime = 34 s

Mean and max Courant Numbers = 0.00140598 0.449586
Time = 0.0002

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 rhoUz, Initial residual = 0, Final residual = 0, No Iterations 0
diagonal:  Solving for rhoE, Initial residual = 0, Final residual = 0, No Iterations 0
ExecutionTime = 43.17 s  ClockTime = 44 s

Mean and max Courant Numbers = 0.00140598 0.452832
Time = 0.0003

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 rhoUz, Initial residual = 0, Final residual = 0, No Iterations 0
diagonal:  Solving for rhoE, Initial residual = 0, Final residual = 0, No Iterations 0
ExecutionTime = 53.8 s  ClockTime = 55 s

Mean and max Courant Numbers = 0.00140598 0.455672
Time = 0.0004

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 rhoUz, Initial residual = 0, Final residual = 0, No Iterations 0
diagonal:  Solving for rhoE, Initial residual = 0, Final residual = 0, No Iterations 0
ExecutionTime = 64.03 s  ClockTime = 65 s

Mean and max Courant Numbers = 0.00140598 0.457651
Time = 0.0005

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 rhoUz, Initial residual = 0, Final residual = 0, No Iterations 0
diagonal:  Solving for rhoE, Initial residual = 0, Final residual = 0, No Iterations 0
ExecutionTime = 74.42 s  ClockTime = 75 s

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2  ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3  Foam::sqrt(Foam::Field<double>&, Foam::UList<double> const&) at ??:?
#4  Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::sqrt<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&) at ??:?
#5  ? at ??:?
#6  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#7  ? at ??:?
Floating point exception (core dumped)
My files :

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

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

internalField   uniform (0 1041 0);

boundaryField
{
    box
    {
        type            slip;
    }

    inlet
    {
        type            supersonicFreestream;
        pInf            100000;
        TInf            300;
        UInf            (0 1041 0);
        gamma           1.4;
        value           uniform (0 1041 0);
    }

    outlet
    {
        type            inletOutlet;
        inletValue      uniform (0 1041 0);
        value           uniform (0 1041 0);
    }

    agardB
    {
        type            slip;
    }
}

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

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

internalField   uniform 100000;

boundaryField
{
    box
    {
        type            zeroGradient;
    }

    inlet
    {
        type            zeroGradient;
    }

    outlet
    {
        type            waveTransmissive;
        field           p;
        psi             thermo:psi;
        gamma           1.3;
        fieldInf        100000;
        lInf            1;
        value           uniform 100000;
    }

    agardB
    {
        type            zeroGradient;
    }
}

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

dimensions      [0 0 0 1 0 0 0];

internalField   uniform 300;

boundaryField
{
    inlet
    {
        type            inletOutlet;
        inletValue      uniform 300;
        value           uniform 300;
    }

    outlet
    {
        type            inletOutlet;
        inletValue      uniform 300;
        value           uniform 300;
    }

    box
    {
        type            zeroGradient;
    }

    agardB
    {
        type            zeroGradient;
    }
}

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

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

application     rhoCentralFoam;

startFrom       startTime;

startTime       0;

stopAt          endTime;

endTime         0.5;

deltaT          1e-4;

writeControl    runTime;

writeInterval   0.02;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

graphFormat     raw;

runTimeModifiable false;

adjustTimeStep  no;

maxCo           0.5;

maxDeltaT       2e-4


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

solvers
{
    "(rho|rhoU|rhoE)"
    {
        solver          diagonal;
    }

    U
    {
        solver          smoothSolver;
        smoother        GaussSeidel;
        nSweeps         2;
        tolerance       1e-09;
        relTol          0.01;
    }

    h
    {
        $U;
        tolerance       1e-10;
        relTol          0;
    }
}


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

fluxScheme      Kurganov;

ddtSchemes
{
    default         Euler;
}

gradSchemes
{
    default         Gauss linear;
}

divSchemes
{
    default         none;
    div(tauMC)      Gauss linear;
}

laplacianSchemes
{
    default         Gauss linear corrected;
}

interpolationSchemes
{
    default         linear;
    reconstruct(rho) vanLeer;
    reconstruct(U)  vanLeerV;
    reconstruct(T)  vanLeer;
}

snGradSchemes
{
    default         corrected;
}


// ************************************************************************* //
I tried running in subsonic with U=10 m/s and rhoCentralFoam didn't diverge.
I also tried to reduce the time step but it always diverges a the same time, near 0.0005s.
My courant number is ok.

I can't figure out why the simulation doesn't work. Do you have any idea ?

Thank you

Dorian
Dorian1504 is offline   Reply With Quote

Old   November 1, 2017, 03:42
Default 3D simulation on rhoCentralFoam
  #2
New Member
 
openfoam
Join Date: Dec 2014
Posts: 1
Rep Power: 0
lvha is on a distinguished road
I have the same problem when run 3d simulation on rhoCentralFoam.
lvha is offline   Reply With Quote

Old   November 1, 2017, 05:19
Default
  #3
Senior Member
 
matej forman
Join Date: Mar 2009
Location: Brno, Czech Republic
Posts: 182
Rep Power: 17
matejfor is on a distinguished road
Hi,
I'm not any compressible flow expert, but briefly looking at your log, the solver does not solve a single time for a single variable - there is nothing going on in your simulation.

My humble guess would be ill posed BCs.


Matej
matejfor is offline   Reply With Quote

Old   December 9, 2017, 20:39
Default
  #4
dli
New Member
 
dengli
Join Date: Mar 2015
Posts: 22
Rep Power: 11
dli is on a distinguished road
[QUOTE=Dorian1504;668031]Hello,

I'm currently trying to simulate an inviscid supersonic (Mach 3) flow around rocket (agard-B) with rhoCentralFoam however the solver crashes after few iterations.


Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Reading thermophysical properties

Selecting thermodynamics package 
{
    type            hePsiThermo;
    mixture         pureMixture;
    transport       const;
    thermo          hConst;
    equationOfState perfectGas;
    specie          specie;
    energy          sensibleInternalEnergy;
}

Reading field U

Creating turbulence model

Selecting turbulence model type laminar
fluxScheme: Kurganov

Starting time loop

Mean and max Courant Numbers = 0.00140598 0.446339
Time = 0.0001

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 rhoUz, Initial residual = 0, Final residual = 0, No Iterations 0
diagonal:  Solving for rhoE, Initial residual = 0, Final residual = 0, No Iterations 0
ExecutionTime = 32.94 s  ClockTime = 34 s

Mean and max Courant Numbers = 0.00140598 0.449586
Time = 0.0002

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 rhoUz, Initial residual = 0, Final residual = 0, No Iterations 0
diagonal:  Solving for rhoE, Initial residual = 0, Final residual = 0, No Iterations 0
ExecutionTime = 43.17 s  ClockTime = 44 s

Mean and max Courant Numbers = 0.00140598 0.452832
Time = 0.0003

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 rhoUz, Initial residual = 0, Final residual = 0, No Iterations 0
diagonal:  Solving for rhoE, Initial residual = 0, Final residual = 0, No Iterations 0
ExecutionTime = 53.8 s  ClockTime = 55 s

Mean and max Courant Numbers = 0.00140598 0.455672
Time = 0.0004

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 rhoUz, Initial residual = 0, Final residual = 0, No Iterations 0
diagonal:  Solving for rhoE, Initial residual = 0, Final residual = 0, No Iterations 0
ExecutionTime = 64.03 s  ClockTime = 65 s

Mean and max Courant Numbers = 0.00140598 0.457651
Time = 0.0005

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 rhoUz, Initial residual = 0, Final residual = 0, No Iterations 0
diagonal:  Solving for rhoE, Initial residual = 0, Final residual = 0, No Iterations 0
ExecutionTime = 74.42 s  ClockTime = 75 s

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2  ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3  Foam::sqrt(Foam::Field<double>&, Foam::UList<double> const&) at ??:?
#4  Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::sqrt<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&) at ??:?
#5  ? at ??:?
#6  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#7  ? at ??:?
Floating point exception (core dumped)
The line "#3 Foam::sqrt(Foam::Field<double>&, Foam::UList<double> const&) at ??:?" may be point of the problem, which means that a negative number in the sqrt() operation.
dli is offline   Reply With Quote

Old   December 10, 2017, 14:22
Default
  #5
Senior Member
 
Taher Chegini
Join Date: Nov 2014
Location: Houston, Texas
Posts: 125
Rep Power: 12
Taataa is on a distinguished road
for the inlet you should use outletInlet and for outlet, inletOutlet.

Also, in the solver I suggest to use relTol of 0 for U. diagonal solver is used for explicit systems, make sure that you're using it correctly.
Taataa is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to apply a turbulence model to the rhoCentralFoam solver? arussell92 OpenFOAM Pre-Processing 18 July 25, 2022 04:26
Modify rhoCentralFoam: other equations of state fivos OpenFOAM Programming & Development 5 July 29, 2020 13:17
rhocentralFoam Diverges!!? sasanghomi OpenFOAM Running, Solving & CFD 5 April 19, 2014 02:38
dynamic mesh refinement and rhoCentralFoam ChrisA OpenFOAM Running, Solving & CFD 1 March 21, 2013 08:00
rhoCentralFoam solver with Slip BCs fails in Parallel Only JLight OpenFOAM Running, Solving & CFD 2 October 11, 2012 21:08


All times are GMT -4. The time now is 04:56.