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/)
-   -   rhoSimpleFoam error (https://www.cfd-online.com/Forums/openfoam-solving/190830-rhosimplefoam-error.html)

az1362f July 23, 2017 23:58

rhoSimpleFoam error
 
Hello Dear users;

I am starting a compressible flow through a nozzle with the rhoSimpleFoam solver but I face an error like this:

--> FOAM FATAL ERROR:
Maximum number of iterations exceeded

From function Foam::scalar Foam::species::thermo<Thermo, Type>::T(Foam::scal
ar, Foam::scalar, Foam::scalar, Foam::scalar (Foam::species::thermo<Thermo, Type
>::*)(Foam::scalar, Foam::scalar)const, Foam::scalar (Foam::species::thermo<Ther
mo, Type>::*)(Foam::scalar, Foam::scalar)const, Foam::scalar (Foam::species::the
rmo<Thermo, Type>::*)(Foam::scalar)const) const [with Thermo = Foam::hConstTherm
o<Foam::perfectGas<Foam::specie> >; Type = Foam::sensibleInternalEnergy; Foam::s
calar = double; Foam::species::thermo<Thermo, Type> = Foam::species::thermo<Foam
::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy>]
in file /home/buzz2/pawan/OpenFOAM/OpenFOAM-v1612+/src/thermophysicalModels/
specie/lnInclude/thermoI.H at line 66.

FOAM aborting

#0 Foam::error::printStack(Foam::Ostream&) in "/opt/OpenFOAM/OpenFOAM-v1612+/pl
atforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so"
#1 Foam::error::abort() in "/opt/OpenFOAM/OpenFOAM-v1612+/platforms/linux64GccD
PInt32Opt/lib/libOpenFOAM.so"
#2 Foam::species::thermo<Foam::hConstThermo<Foam::per fectGas<Foam::specie> >, F
oam::sensibleInternalEnergy>::TEs(double, double, double) const in "/opt/OpenFOA
M/OpenFOAM-v1612+/platforms/linux64GccDPInt32Opt/lib/libfluidThermophysicalModel
s.so"
#3 Foam::heRhoThermo<Foam::rhoThermo, Foam::pureMixture<Foam::constTransport<Fo
am::species::thermo<Foam::hConstThermo<Foam::perfe ctGas<Foam::specie> >, Foam::s
ensibleInternalEnergy> > > >::calculate() in "/opt/OpenFOAM/OpenFOAM-v1612+/plat
forms/linux64GccDPInt32Opt/lib/libfluidThermophysicalModels.so"
#4 Foam::heRhoThermo<Foam::rhoThermo, Foam::pureMixture<Foam::constTransport<Fo
am::species::thermo<Foam::hConstThermo<Foam::perfe ctGas<Foam::specie> >, Foam::s
ensibleInternalEnergy> > > >::correct() in "/opt/OpenFOAM/OpenFOAM-v1612+/platfo
rms/linux64GccDPInt32Opt/lib/libfluidThermophysicalModels.so"
#5 ? in "/opt/OpenFOAM/OpenFOAM-v1612+/platforms/linux64GccDPInt32Opt/bin/rhoSi
mpleFoam"
#6 __libc_start_main in "/lib64/libc.so.6"
#7 ? in "/opt/OpenFOAM/OpenFOAM-v1612+/platforms/linux64GccDPInt32Opt/bin/rhoSi
mpleFoam"
Aborted


I have tried many boundary condition but still I face this error.

my inlet condition:
pressure: 40 bar
velocity:34.7 m/s in x direction.

outlet:
pressure: 100 kpa

pressure boundary condition:

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

internalField uniform 100000;

boundaryField
{

nozzle
{
type zeroGradient;
}
outlet
{
type fixedValue;
value 100000;


}
inlet
{
type totalPressure;
rho rho;
psi thermo:psi;
gamma 1.4;
p0 uniform 4e+06;
value uniform 4e+06;

}
frontAndBackPlanes
{

type empty;

}


velocity boundary:
dimensions [0 1 -1 0 0 0 0];

internalField uniform (0 0 0);

boundaryField
{

nozzle
{

type slip;
value (0 0 0 );


}
outlet
{
type pressureInletOutletVelocity;
inletValue uniform (0 0 0);
value uniform (0 0 0);


}
inlet
{
type pressureInletVelocity;//fixedValue;
value uniform (34.7 0 0);


}
frontAndBackPlanes
{

type empty;

}


}


thermophysical properties:

thermoType
{
type heRhoThermo;
mixture pureMixture;
transport const;
thermo hConst;
equationOfState perfectGas;
specie specie;
energy sensibleInternalEnergy;
}

mixture
{
specie
{
nMoles 1;
molWeight 28.9;
}
thermodynamics
{
Cp 1007;
Hf 0;
}
transport
{
mu 1.8e-05;
Pr 0.7;
}
}


fvschemes:

ddtSchemes
{
default steadyState;
}

gradSchemes
{
default Gauss linear;
}

divSchemes
{
default none;

div(phi,U) bounded Gauss upwind;
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
div(phi,e) bounded Gauss upwind;
div(phi,epsilon) bounded Gauss upwind;
div(phi,k) bounded Gauss upwind;

div(phid,p) Gauss upwind;
div(phi,Ekp) bounded Gauss upwind;
div((phi|interpolate(rho)),p) Gauss upwind;
}

laplacianSchemes
{
default Gauss linear corrected;
}

interpolationSchemes
{
default linear;
}

snGradSchemes
{
default corrected;
}


fvsolution file:

solvers
{
p
{
solver GAMG;
tolerance 1e-08;
relTol 0.1;
smoother GaussSeidel;
nCellsInCoarsestLevel 20;
}

"(U|e|k|epsilon)"
{
solver GAMG;
tolerance 1e-08;
relTol 0.1;
smoother GaussSeidel;
nCellsInCoarsestLevel 20;
}
}

SIMPLE
{
nNonOrthogonalCorrectors 0;
rhoMin 0.1;
rhoMax 1.0;
transonic yes;
consistent yes;

residualControl
{
p 1e-3;
U 1e-4;
e 1e-3;

// possibly check turbulence fields
"(k|epsilon|omega)" 1e-3;
}
}

relaxationFactors
{
fields
{
p 0.1;
rho 0.1;
}
equations
{
p 0.5;
U 0.5;
e 0.5;
k 0.5;
epsilon 0.5;
}
}


I hope someone help me to solve it.

arvindpj July 24, 2017 09:35

I have come across this too. What type of case it this?

Cheers,
Jay

az1362f July 24, 2017 23:35

nozzle geometry
 
Hi Dear Jay;

It is a simple nozzle geometry with an inlet and outlet. do you know what is the problem?

az1362f July 28, 2017 10:06

anybody can solve this problem?
Is it a bug in rhoSimpleFoam solver or there is a mistake in my setting?
I use a windows version of 1612.

arvindpj July 28, 2017 11:26

Quote:

Originally Posted by az1362f (Post 658744)
anybody can solve this problem?
Is it a bug in rhoSimpleFoam solver or there is a mistake in my setting?
I use a windows version of 1612.


Hi,

Could you attached your case in a zip file?
Let me try it out.

Cheers :-)
Jay

jcoelho5 February 3, 2022 05:03

always bugging
 
Dear users,

I have a problem with a simulation using rhoSimpleFoam. I tried many different ways, most of them were suggestions from this forum.

Basically, I have an internal flow in two manifolds with some tubes between them.

I already tried running with rhoPimpleFoam and it runs with no particular problem. However, it would take way more time to reach a steady-state.
Nevertheless, when using the intermediate result from rhoPimpleFoam, the same problem continues. I would think that since the flow is more "physical" it would have a positive influence when trying to solve with rhoSimpleFoam.

I am using OpenFOAM 9.

This is an intermediate simulation since I would continue the simulation using tabulated thermophysical properties. (Thus the constant rho in the current simulation).

The error varies between
  • reaching Negative initial temperature
  • Code:

    Foam::sigFpe::sigHandler(int) at ??:?
    [0] #2  ? in "/lib/x86_64-linux-gnu/libc.so.6"
    [0] #3  Foam::GAMGSolver::scale(Foam::Field<double>&, Foam::Field<double>&, Foam::lduMatrix const&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, Foam::Field<double> const&, unsigned char) const at ??:?
    [0] #4  Foam::GAMGSolver::Vcycle(Foam::PtrList<Foam::lduMatrix::smoother> const&, Foam::Field<double>&, Foam::Field<double> const&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::PtrList<Foam::Field<double> >&, Foam::PtrList<Foam::Field<double> >&, unsigned char) const at ??:?
    [0] #5  Foam::GAMGSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:?
    [0] #6  Foam::fvMatrix<double>::solveSegregated(Foam::dictionary const&) at ??:?
    [0] #7  Foam::fvMatrix<double>::solve(Foam::dictionary const&) in "/opt/openfoam9/platforms/linux64GccDPInt32Opt/bin/rhoSimpleFoam"
    [0] #8  Foam::fvMatrix<double>::solve() in "/opt/openfoam9/platforms/linux64GccDPInt32Opt/bin/rhoSimpleFoam"
    [0] #9  ? in "/opt/openfoam9/platforms/linux64GccDPInt32Opt/bin/rhoSimpleFoam"
    [0] #10  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
    [0] #11  ? in "/opt/openfoam9/platforms/linux64GccDPInt32Opt/bin/rhoSimpleFoam"
    [omnidea-System-Product-Name:190418] *** Process received signal ***
    [omnidea-System-Product-Name:190418] Signal: Floating point exception (8)
    [omnidea-System-Product-Name:190418] Signal code:  (-6)
    [omnidea-System-Product-Name:190418] Failing at address: 0x3e80002e7d2
    [omnidea-System-Product-Name:190418] [ 0] /lib/x86_64-linux-gnu/libc.so.6(+0x46210)[0x7f19da6c8210]
    [omnidea-System-Product-Name:190418] [ 1] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcb)[0x7f19da6c818b]
    [omnidea-System-Product-Name:190418] [ 2] /lib/x86_64-linux-gnu/libc.so.6(+0x46210)[0x7f19da6c8210]
    [omnidea-System-Product-Name:190418] [ 3] /opt/openfoam9/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so(_ZNK4Foam10GAMGSolver5scaleERNS_5FieldIdEES3_RKNS_9lduMatrixERKNS_10FieldFieldIS1_dEERKNS_8UPtrListIKNS_17lduInterfaceFieldEEERKS2_h+0xc7)[0x7f19db0fb1f7]
    [omnidea-System-Product-Name:190418] [ 4] /opt/openfoam9/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so(_ZNK4Foam10GAMGSolver6VcycleERKNS_7PtrListINS_9lduMatrix8smootherEEERNS_5FieldIdEERKS8_S9_S9_S9_S9_S9_RNS1_IS8_EESD_h+0x85d)[0x7f19db0ff25d]
    [omnidea-System-Product-Name:190418] [ 5] /opt/openfoam9/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so(_ZNK4Foam10GAMGSolver5solveERNS_5FieldIdEERKS2_h+0x4bc)[0x7f19db10156c]
    [omnidea-System-Product-Name:190418] [ 6] /opt/openfoam9/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so(_ZN4Foam8fvMatrixIdE15solveSegregatedERKNS_10dictionaryE+0x18b)[0x7f19dcb723cb]
    [omnidea-System-Product-Name:190418] [ 7] rhoSimpleFoam(_ZN4Foam8fvMatrixIdE5solveERKNS_10dictionaryE+0x1e8)[0x560f15e13238]
    [omnidea-System-Product-Name:190418] [ 8] rhoSimpleFoam(_ZN4Foam8fvMatrixIdE5solveEv+0x119)[0x560f15e134d9]
    [omnidea-System-Product-Name:190418] [ 9] rhoSimpleFoam(+0x2f3ac)[0x560f15db13ac]
    [omnidea-System-Product-Name:190418] [10] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x7f19da6a90b3]
    [omnidea-System-Product-Name:190418] [11] rhoSimpleFoam(+0x30b6e)[0x560f15db2b6e]
    [omnidea-System-Product-Name:190418] *** End of error message ***



Any suggestions for what could be the problem?

Thanks in advance.


------------------


T:
Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      volScalarField;
    object      T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 1 0 0 0];

internalField  uniform 270;

boundaryField
{
    Symmetry
    {
            type                symmetry;
    }
    Wall
    {
        type            zeroGradient;
    }
   
    Inlet
    {
        type            fixedValue;
        value          uniform 270;
    }

    Outlet
    {
        // type            zeroGradient;
        type            inletOutlet;
        value          uniform 270;
        inletValue      uniform 270;
    }
}

p:
Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      volScalarField;
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField  uniform 70e5;

boundaryField
{
    Symmetry
    {
            type                symmetry;
    }
    Wall
    {
        type            zeroGradient;
    }
    Inlet
    {
        type            zeroGradient;
    }
    Outlet
    {
        type            fixedValue;
        value          uniform 70e5;
    }
}

U:
Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      volVectorField;
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField  uniform (0 0 0);

boundaryField
{
    Symmetry
    {
            type                symmetry;
    }
    Wall
    {
        type            noSlip;
    }
    Outlet
    {
        type            inletOutlet;
        value          uniform (0 0 0);
        inletValue      uniform (0 0 0);
    }
    Inlet
        {
                type                  flowRateInletVelocity;
                //massFlowRate                constant 2.1564;
                volumetricFlowRate        constant 0.0133;
                value                  uniform (0 0 0);
        }

}

thermophysicalProperties
Code:

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

thermoType
{
    type            heRhoThermo;
    mixture        pureMixture;
   
    transport      const;
    thermo          hConst;
    equationOfState rhoConst;
   
    specie          specie;
    //energy          sensibleInternalEnergy;
    energy          sensibleEnthalpy;
}

dpdt off;

mixture
{
    specie
    {
        molWeight      17.44568;
    }
   
    transport
    {
        mu          1.27e-05;
        Pr          1.4954515;
    }
   
    thermodynamics
    {
            Cp                5694;
            Hf                0;
    }
   
    equationOfState
    {
            rho                60.0;
    }
   
}


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

fvSolution
Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    location    "system";
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
    p
    {
        solver          PCG;
        preconditioner  DIC;
        //solver          GAMG;
        tolerance      1e-06;
        relTol          0.01;/*
        smoother        GaussSeidel;
        nPreSweeps      0;
        nPostSweeps    2;
        nFinestSweeps  2;
        cacheAgglomeration true;
        nCellsInCoarsestLevel 1000;
        agglomerator    faceAreaPair;
        mergeLevels    1;*/
        maxIter        100;
    }
       
        h
    {
        solver          PBiCGStab; // PBiCGStab;
        preconditioner  DILU;
        tolerance      1e-6;
        relTol          0.01;
    }

    "(U|e|h|k|epsilon)"
    {
        //solver          GAMG;
        solver          PBiCG;
        preconditioner  DILU;
        tolerance      2e-06;
        relTol          0.1;
        smoother        GaussSeidel;
        nPreSweeps      0;
        nPostSweeps    2;
        nFinestSweeps  2;
        cacheAgglomeration true;
        nCellsInCoarsestLevel 1000;
        agglomerator    faceAreaPair;
        mergeLevels    1;
        maxIter        100;
    }
}

SIMPLE
{
    nNonOrthogonalCorrectors 2;

    transonic      no;
    consistent      yes;

    residualControl
    {
        p              1e-3;
        U              1e-4;
        h              1e-3;
        e              1e-3;

        // possibly check turbulence fields
        "(k|epsilon|omega)" 1e-3;
    }
}

relaxationFactors
{
    fields
    {
        p              0.1;
        rho              0.05;
    }
    equations
    {
        //p              0.5;
        U              0.2;
        e              0.2;
        h              0.1;
        k              0.2;
        epsilon        0.2;
    }
}

potentialFlow
{
    nNonOrthogonalCorrectors  3;
}

fvSchemes
Code:

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

ddtSchemes
{
    default            steadyState;
}

gradSchemes
{
    //default            Gauss linear;
    default        faceMDLimited Gauss linear 0.5;
}

divSchemes
{
    default            none;

    div(phi,U)          bounded Gauss upwind;
    div(((rho*nuEff)*dev2(T(grad(U)))))      Gauss linear;
    div(phi,e)          bounded Gauss upwind;
    div(phi,h)          bounded Gauss upwind;
    div(phi,epsilon)    bounded Gauss upwind;
    div(phi,k)          bounded Gauss upwind;
    div(phi,K)          bounded Gauss upwind;

    div(phid,p)        Gauss upwind;
    div(phi,Ekp)        bounded Gauss upwind;
    div((phi|interpolate(rho)),p)  Gauss upwind;
}

laplacianSchemes
{
    default        Gauss linear uncorrected;
    laplacian(1,p)    Gauss linear corrected;
}

interpolationSchemes
{
    default        linear;
}

snGradSchemes
{
    default        corrected;
}


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


checkMesh

Code:

/*---------------------------------------------------------------------------*\
  =========                |
  \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox
  \\    /  O peration    | Website:  https://openfoam.org
    \\  /    A nd          | Version:  9
    \\/    M anipulation  |
\*---------------------------------------------------------------------------*/
Build  : 9-89839ae3b8cd
Exec  : checkMesh
Date  : Feb 03 2022
Time  : 10:10:35
Host  : "omnidea-System-Product-Name"
PID    : 193336
I/O    : uncollated
Case  : /home/omnidea/OpenFOAM/omnidea-8/run/jc/DE1_v4/InjectionHead/FuelFlow/v1b
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
    points:          208228
    faces:            1991226
    internal faces:  1804742
    cells:            948992
    faces per cell:  4
    boundary patches: 4
    point zones:      0
    face zones:      0
    cell zones:      0

Overall number of cells of each type:
    hexahedra:    0
    prisms:        0
    wedges:        0
    pyramids:      0
    tet wedges:    0
    tetrahedra:    948992
    polyhedra:    0

Checking topology...
    Boundary definition OK.
    Cell to face addressing OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.
    Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces...
    Patch              Faces    Points  Surface topology                 
    Symmetry            6045    3283    ok (non-closed singly connected) 
    Outlet              4860    5670    ok (non-closed singly connected) 
    Inlet              106      68      ok (non-closed singly connected) 
    Wall                175473  89512    ok (non-closed singly connected) 

Checking geometry...
    Overall domain bounding box (-0.0595 -0.104629 -0.0974642) (-0.006 0.09747 1.67098e-16)
    Mesh has 3 geometric (non-empty/wedge) directions (1 1 1)
    Mesh has 3 solution (non-empty) directions (1 1 1)
    Boundary openness (-2.75188e-17 -1.65483e-17 4.47072e-16) OK.
    Max cell openness = 3.0469e-16 OK.
    Max aspect ratio = 6.06172 OK.
    Minimum face area = 1.8417e-08. Maximum face area = 9.5148e-06.  Face area magnitudes OK.
    Min volume = 1.18683e-12. Max volume = 7.96469e-09.  Total volume = 0.000439435.  Cell volumes OK.
    Mesh non-orthogonality Max: 59.3818 average: 16.575
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 0.970953 OK.
    Coupled point location match (average 0) OK.

Mesh OK.

End


Fouch February 3, 2022 13:40

Hi,

Adding limits for the temperature in fvOptions should solve the issue.
Please follow this link: https://www.openfoam.com/documentati...mperature.html

jcoelho5 February 4, 2022 12:12

Already tried that (and limitPressure). Even though it does not result in the same error, the flow becomes "unphysical" with adjacent cells varying between min and max temperature/pressure limit

Fouch February 4, 2022 12:31

Ok, you can try to deactivate consistent and remove potentialfoam.


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