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

Foam::error::PrintStack error while running rhoPorousSimpleFoam in OF 2.4.0

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree3Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 23, 2018, 08:41
Default Foam::error::PrintStack error while running rhoPorousSimpleFoam in OF 2.4.0
  #1
Senior Member
 
Deep
Join Date: Oct 2017
Posts: 180
Rep Power: 8
deepbandivadekar is on a distinguished road
Hello,

I'm running a case based on the angledDuctImplicit tutorial. But I'm getting following error even before the iterations start.

Code:
#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::heRhoThermo<Foam::rhoThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleEnthalpy> > > >::calculate() at ??:?
#4  Foam::rhoThermo::addfvMeshConstructorToTable<Foam::heRhoThermo<Foam::rhoThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleEnthalpy> > > > >::New(Foam::fvMesh const&, Foam::word const&) at ??:?
#5  Foam::autoPtr<Foam::rhoThermo> Foam::basicThermo::New<Foam::rhoThermo>(Foam::fvMesh const&, Foam::word const&) at ??:?
#6  Foam::rhoThermo::New(Foam::fvMesh const&, Foam::word const&) at ??:?
#7  ? at ??:?
#8  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#9  ? at ??:?
Floating point exception (core dumped)
Now, it is obvious that it is something to do with the thermoPhysicalProperties. But I can't figure it out. Almost all threads here related to such errors have at least a couple of iterations running, and gives some clues as to where the error originates; that's not the case for my problem.

The thrmoPhysicalProperties disctionary looks as below:
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      thermophysicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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


mixture
{
    specie
    {
        nMoles      1;
        molWeight   28.9;
    }
    thermodynamics
    {
        Cp          1005;
        Hf          0;//2.544e+06;//0;
    }
    transport
    {
        //mu              1.8e-05;
        //Pr              0.7;
    As          1.4792e-06;
        Ts          116;
    }
}
Can anyone give me any directions? Do you need any particular information about the case?
deepbandivadekar is offline   Reply With Quote

Old   January 24, 2018, 09:02
Default
  #2
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi, a floating point exception in that particular case is given by division with zero. Can you please give more information such as the log file (before the error occur) in order to identify the problem?
By the way, why you stick to an very old version of FOAM? 2.4. is almost outdated and you would have much better features in the latest version.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   January 24, 2018, 12:02
Default
  #3
Senior Member
 
Deep
Join Date: Oct 2017
Posts: 180
Rep Power: 8
deepbandivadekar is on a distinguished road
Quote:
Originally Posted by Tobi View Post
Hi, a floating point exception in that particular case is given by division with zero. Can you please give more information such as the log file (before the error occur) in order to identify the problem?
By the way, why you stick to an very old version of FOAM? 2.4. is almost outdated and you would have much better features in the latest version.
Thank you for your response.
Unfortunately I made some changes since I started this thread, so I can't give you the part of the log before the error. However, I did try to run the case in latest version of OF as well and I get different errors. I am using 2.4.0-MNF version because I want to use one of the solvers which has not been integrated in the updated form yet into the regular release. But this is at a later stage. For rhoPorousSimpleFoam I definitely can use 5.0 and I did.

Now, the errors am now getting are different and not much help from related existing threads. I get different errors for 5.0 (after making relevant additions/changes according to structural changes in files or syntaxes) and 2.4.0. I'll include both here:

OF2.4.0
Error:
Code:
Create time

Create mesh for time = 0


SIMPLE: convergence criteria
    field p     tolerance 0.001
    field U     tolerance 0.0001
    field e     tolerance 0.001
    field "(k|epsilon|omega)"     tolerance 0.001

Reading thermophysical properties

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

Reading field U

Reading/calculating face flux field phi

Creating turbulence model

Selecting RAS turbulence model kEpsilon
kEpsilonCoeffs
{
    Cmu             0.09;
    C1              1.44;
    C2              1.92;
    C3              -0.33;
    sigmak          1;
    sigmaEps        1.3;
    Prt             1;
}

Creating finite volume options from "system/fvOptions"

Selecting finite volume options model type fixedTemperatureConstraint
    Source: source1
    - applying source for all time
    - selecting cells using cellZone porouszone
    - selected 8000 cell(s) with volume 0.0001

Creating porosity model list from porosityProperties

Porosity region porosity1:
    selecting model: DarcyForchheimer
    creating porous zone: porouszone
Using pressure implicit porosity

Starting time loop

Time = 1



--> FOAM FATAL ERROR: 

    gradientInternalCoeffs cannot be called for a calculatedFvPatchField
    on patch outletExt of field e in file "/home/ywb17176/OpenFOAM/zProjects/x1/0/e"
    You are probably trying to solve for a field with a default boundary condition.

    From function calculatedFvPatchField<Type>::gradientInternalCoeffs() const
    in file fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C at line 199.

FOAM exiting
This is making no sense to me, as there's no 'e' dictionary present in 0 at all.

OF5.0
Error:
Code:
Create time

Create mesh for time = 0


SIMPLE: convergence criteria
    field p     tolerance 0.001
    field U     tolerance 0.0001
    field e     tolerance 0.001
    field "(k|epsilon|omega)"     tolerance 0.001

Reading thermophysical properties

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

Reading field U

Reading/calculating face flux field phi

--> FOAM Warning : 
    From function Foam::pressureControl::pressureControl(const volScalarField&, const volScalarField&, const Foam::dictionary&, bool)
    in file cfdTools/general/pressureControl/pressureControl.C at line 125
    Reading "/home/ywb17176/OpenFOAM/zProjects/x/system/fvSolution.SIMPLE" from line 52 to line 64
    'rhoMax' specified rather than 'pMax' or 'pMaxFactor'
    This is supported for backward-compatibility but 'pMax' or 'pMaxFactor' are more reliable.
--> FOAM Warning : 
    From function Foam::pressureControl::pressureControl(const volScalarField&, const volScalarField&, const Foam::dictionary&, bool)
    in file cfdTools/general/pressureControl/pressureControl.C at line 182
    Reading "/home/ywb17176/OpenFOAM/zProjects/x/system/fvSolution.SIMPLE" from line 52 to line 64
    'rhoMin' specified rather than 'pMin' or 'pMinFactor'
    This is supported for backward-compatibility but'pMin' or 'pMinFactor' are more reliable.
pressureControl
    pMax 2e+06
    pMin 28050.5

Creating turbulence model

Selecting turbulence model type RAS
Selecting RAS turbulence model kEpsilon
RAS
{
    RASModel        kEpsilon;
    turbulence      on;
    printCoeffs     on;
    Cmu             0.09;
    C1              1.44;
    C2              1.92;
    C3              0;
    sigmak          1;
    sigmaEps        1.3;
}

No MRF models present

Creating finite volume options from "system/fvOptions"

Selecting finite volume options model type fixedTemperatureConstraint
    Source: source1


--> FOAM FATAL IO ERROR: 
keyword selectionMode is undefined in dictionary "/home/ywb17176/OpenFOAM/zProjects/x/system/fvOptions.source1.fixedTemperatureConstraintCoeffs"

file: /home/ywb17176/OpenFOAM/zProjects/x/system/fvOptions.source1.fixedTemperatureConstraintCoeffs from line 27 to line 28.

    From function const Foam::entry& Foam::dictionary::lookupEntry(const Foam::word&, bool, bool) const
    in file db/dictionary/dictionary.C at line 566.

FOAM exiting
fvOptions dictionary:
Code:
source1
{
    type            fixedTemperatureConstraint;
    active          true;
    selectionMode   cellZone;
    cellZone        porouszone;

    fixedTemperatureConstraintCoeffs
    {
        mode            uniform;
        temperature     350;
    }
}
I have no idea why this source is used (this case is adapted from angledImplictDuct tutorial in rhoPorousSimpleFoam but at the moment I'm more concerned about running the case successfully.
fvOptions does seem to have the selectionMode defined. So I've no clue.
deepbandivadekar is offline   Reply With Quote

Old   January 24, 2018, 15:20
Default
  #4
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi,
for 5.x the error message tells you what is missing:
Code:
keyword selectionMode is undefined in dictionary "/home/ywb17176/OpenFOAM/zProjects/x/system/fvOptions.source1.fixedTemperatureConstraintCoeffs"
Thus you miss the selectionMode inside the subdict fixedTemperatureConstraintCoeffs. Therefore, you should have it like that
Code:
source1
{
    type            fixedTemperatureConstraint;
    active          true;


    fixedTemperatureConstraintCoeffs
    {
        mode            uniform;
        temperature     350;
        selectionMode   cellZone;
        cellZone        porouszone;
    }
}
The best way is to check the header file of the class. There you will get the correct answer.
deepbandivadekar likes this.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   January 25, 2018, 08:52
Default
  #5
Senior Member
 
Deep
Join Date: Oct 2017
Posts: 180
Rep Power: 8
deepbandivadekar is on a distinguished road
Quote:
Originally Posted by Tobi View Post
Hi,
for 5.x the error message tells you what is missing:
Code:
keyword selectionMode is undefined in dictionary "/home/ywb17176/OpenFOAM/zProjects/x/system/fvOptions.source1.fixedTemperatureConstraintCoeffs"
Thus you miss the selectionMode inside the subdict fixedTemperatureConstraintCoeffs. Therefore, you should have it like that
Code:
source1
{
    type            fixedTemperatureConstraint;
    active          true;


    fixedTemperatureConstraintCoeffs
    {
        mode            uniform;
        temperature     350;
        selectionMode   cellZone;
        cellZone        porouszone;
    }
}
The best way is to check the header file of the class. There you will get the correct answer.

This seems to have worked. But now this is what I get for OF 5.x:

Code:
Create time

Create mesh for time = 0


SIMPLE: convergence criteria
    field p     tolerance 0.001
    field U     tolerance 0.0001
    field e     tolerance 0.001
    field "(k|epsilon|omega)"     tolerance 0.001

Reading thermophysical properties

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

Reading field U

Reading/calculating face flux field phi

--> FOAM Warning : 
    From function Foam::pressureControl::pressureControl(const volScalarField&, const volScalarField&, const Foam::dictionary&, bool)
    in file cfdTools/general/pressureControl/pressureControl.C at line 125
    Reading "/home/ywb17176/OpenFOAM/zProjects/x/system/fvSolution.SIMPLE" from line 52 to line 64
    'rhoMax' specified rather than 'pMax' or 'pMaxFactor'
    This is supported for backward-compatibility but 'pMax' or 'pMaxFactor' are more reliable.
--> FOAM Warning : 
    From function Foam::pressureControl::pressureControl(const volScalarField&, const volScalarField&, const Foam::dictionary&, bool)
    in file cfdTools/general/pressureControl/pressureControl.C at line 182
    Reading "/home/ywb17176/OpenFOAM/zProjects/x/system/fvSolution.SIMPLE" from line 52 to line 64
    'rhoMin' specified rather than 'pMin' or 'pMinFactor'
    This is supported for backward-compatibility but'pMin' or 'pMinFactor' are more reliable.
pressureControl
    pMax 2e+06
    pMin 28050.5

Creating turbulence model

Selecting turbulence model type RAS
Selecting RAS turbulence model kEpsilon
RAS
{
    RASModel        kEpsilon;
    turbulence      on;
    printCoeffs     on;
    Cmu             0.09;
    C1              1.44;
    C2              1.92;
    C3              0;
    sigmak          1;
    sigmaEps        1.3;
}

No MRF models present

Creating finite volume options from "system/fvOptions"

Selecting finite volume options model type fixedTemperatureConstraint
    Source: source1
    - selecting cells using cellZone porouszone
    - selected 8000 cell(s) with volume 0.0001
Creating porosity model list from porosityProperties

Porosity region porosity1:
    selecting model: DarcyForchheimer
    creating porous zone: porouszone
Using pressure implicit porosity

Starting time loop

Time = 1



--> FOAM FATAL IO ERROR: 
keyword div(((rho*nuEff)*dev2(T(grad(U))))) is undefined in dictionary "/home/ywb17176/OpenFOAM/zProjects/x/system/fvSchemes.divSchemes"

file: /home/ywb17176/OpenFOAM/zProjects/x/system/fvSchemes.divSchemes from line 30 to line 36.

    From function const Foam::entry& Foam::dictionary::lookupEntry(const Foam::word&, bool, bool) const
    in file db/dictionary/dictionary.C at line 566.

FOAM exiting
Code:
divSchemes
{
    div(phi,U)      bounded Gauss upwind;
//    div((muEff*dev2(T(grad(U))))) Gauss linear;
    div((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(phi,Ekp)    bounded Gauss upwind;
}
I do have the keyword defined in fvScemes. This webpage from the user guide: https://cfd.direct/openfoam/user-guide/fvschemes/ does indicate that it's the correct keyword. So why the error ?

Also what about those warnings ?
deepbandivadekar is offline   Reply With Quote

Old   January 25, 2018, 09:03
Default
  #6
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Again, the solver tells you what is missing:
Code:
div(((rho*nuEff)*dev2(T(grad(U)))))
but you have
Code:
div((nuEff*dev2(T(grad(U)))))
So you statement is not really correct:
Quote:
I do have the keyword defined in fvScemes
Actually, you don't. The user-guide is wrong in this particular case. I will make the report.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   January 25, 2018, 10:05
Default
  #7
Senior Member
 
Deep
Join Date: Oct 2017
Posts: 180
Rep Power: 8
deepbandivadekar is on a distinguished road
Quote:
Originally Posted by Tobi View Post
Again, the solver tells you what is missing:
Code:
div(((rho*nuEff)*dev2(T(grad(U)))))
but you have
Code:
div((nuEff*dev2(T(grad(U)))))
So you statement is not really correct:
Actually, you don't. The user-guide is wrong in this particular case. I will make the report.
Ah yes, I posted that and realised right after. I changed it, and now am back to printStack error


Code:
Create time

Create mesh for time = 0


SIMPLE: convergence criteria
    field p     tolerance 0.001
    field U     tolerance 0.0001
    field e     tolerance 0.001
    field "(k|epsilon|omega)"     tolerance 0.001

Reading thermophysical properties

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

Reading field U

Reading/calculating face flux field phi

--> FOAM Warning : 
    From function Foam::pressureControl::pressureControl(const volScalarField&, const volScalarField&, const Foam::dictionary&, bool)
    in file cfdTools/general/pressureControl/pressureControl.C at line 125
    Reading "/home/ywb17176/OpenFOAM/zProjects/x/system/fvSolution.SIMPLE" from line 52 to line 64
    'rhoMax' specified rather than 'pMax' or 'pMaxFactor'
    This is supported for backward-compatibility but 'pMax' or 'pMaxFactor' are more reliable.
--> FOAM Warning : 
    From function Foam::pressureControl::pressureControl(const volScalarField&, const volScalarField&, const Foam::dictionary&, bool)
    in file cfdTools/general/pressureControl/pressureControl.C at line 182
    Reading "/home/ywb17176/OpenFOAM/zProjects/x/system/fvSolution.SIMPLE" from line 52 to line 64
    'rhoMin' specified rather than 'pMin' or 'pMinFactor'
    This is supported for backward-compatibility but'pMin' or 'pMinFactor' are more reliable.
pressureControl
    pMax 2e+06
    pMin 28050.5

Creating turbulence model

Selecting turbulence model type RAS
Selecting RAS turbulence model kEpsilon
RAS
{
    RASModel        kEpsilon;
    turbulence      on;
    printCoeffs     on;
    Cmu             0.09;
    C1              1.44;
    C2              1.92;
    C3              0;
    sigmak          1;
    sigmaEps        1.3;
}

No MRF models present

Creating finite volume options from "system/fvOptions"

Selecting finite volume options model type fixedTemperatureConstraint
    Source: source1
    - selecting cells using cellZone porouszone
    - selected 8000 cell(s) with volume 0.0001
Creating porosity model list from porosityProperties

Porosity region porosity1:
    selecting model: DarcyForchheimer
    creating porous zone: porouszone
Using pressure implicit porosity

Starting time loop

Time = 1



--> FOAM FATAL ERROR: 
cannot be called for a calculatedFvPatchField
    on patch outletExt of field e in file "/home/ywb17176/OpenFOAM/zProjects/x/0/e"
    You are probably trying to solve for a field with a default boundary condition.

    From function Foam::tmp<Foam::Field<Type> > Foam::calculatedFvPatchField<Type>::gradientInternalCoeffs() const [with Type = double]
    in file fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C at line 187.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::error::abort() at ??:?
#2  Foam::calculatedFvPatchField<double>::gradientInternalCoeffs() const at ??:?
#3  Foam::fv::gaussLaplacianScheme<double, Foam::SymmTensor<double> >::fvmLaplacianUncorrected(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:?
#4  Foam::fv::gaussLaplacianScheme<double, double>::fvmLaplacian(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:?
#5  Foam::fv::laplacianScheme<double, double>::fvmLaplacian(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:?
#6  Foam::tmp<Foam::fvMatrix<double> > Foam::fvm::laplacian<double, double>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::word const&) at ??:?
#7  Foam::tmp<Foam::fvMatrix<double> > Foam::fvm::laplacian<double, double>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:?
#8  ? at ??:?
#9  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#10  ? at ??:?
Aborted (core dumped)
Why is it talking about 'e' ? And this is 5.x version. This is similar to 2.4.0 error I reported earlier (Foam::error::PrintStack error while running rhoPorousSimpleFoam in OF 2.4.0)
deepbandivadekar is offline   Reply With Quote

Old   January 25, 2018, 10:12
Default
  #8
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Because you solve your energy equation based on the sensible internal energy e
Therefore, I guess you have some mistakes in the temperature file. Please show your T file.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   January 25, 2018, 10:15
Default
  #9
Senior Member
 
Deep
Join Date: Oct 2017
Posts: 180
Rep Power: 8
deepbandivadekar is on a distinguished road
Quote:
Originally Posted by Tobi View Post
Because you solve your energy equation based on the sensible internal energy e
Therefore, I guess you have some mistakes in the temperature file. Please show your T file.
Here you go.

Code:
dimensions      [0 0 0 1 0 0 0];

internalField   uniform 195; //This includes the porous region as well, any solution? 

boundaryField
{

//    front
//    {
//        type            zeroGradient;
//    }
//    back
//    {
//        type            zeroGradient;
//    }
//    walls
//    {
//        type            zeroGradient;
//    }
//    porosityWall
//    {
//        type            zeroGradient;
//    }

    inletExt
    {
        type            fixedValue;
        value           $internalField;
    }

    inletPorous
    {
        type            fixedValue;
        value           uniform 300;
    }

    outletExt
    {
        type            calculated;//inletOutlet;
        value           $internalField;
        //inletValue      $internalField;
    }

    outletPorous
    {
        type            calculated;//inletOutlet;
        value           $internalField;
        //inletValue      $internalField;
    }
}
Commented BCs were just experiments..
deepbandivadekar is offline   Reply With Quote

Old   January 25, 2018, 10:19
Default
  #10
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
And here is your problem. You cannot set T to calculated. That does not make sense. If you are sitting on a patch face, just ask yourself, which other values would you use to calculate T
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   January 25, 2018, 10:36
Default
  #11
Senior Member
 
Deep
Join Date: Oct 2017
Posts: 180
Rep Power: 8
deepbandivadekar is on a distinguished road
Quote:
Originally Posted by Tobi View Post
And here is your problem. You cannot set T to calculated. That does not make sense. If you are sitting on a patch face, just ask yourself, which other values would you use to calculate T
I want to get to the bottom of this. I want to see exactly how "calculated" BC created a floating point error. I want to learn how to choose appropriate BCs rather than just going ahead with the ones from related tutorial cases.

I had tried inletOutlet earlier. It doesn't get me anywhere, as you can see in error below:
So I really want to understand how to decide which is the right BC be it T, U or p or else..

Code:
Create time

Create mesh for time = 0


SIMPLE: convergence criteria
    field p     tolerance 0.001
    field U     tolerance 0.0001
    field e     tolerance 0.001
    field "(k|epsilon|omega)"     tolerance 0.001

Reading thermophysical properties

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

Reading field U

Reading/calculating face flux field phi

--> FOAM Warning : 
    From function Foam::pressureControl::pressureControl(const volScalarField&, const volScalarField&, const Foam::dictionary&, bool)
    in file cfdTools/general/pressureControl/pressureControl.C at line 125
    Reading "/home/ywb17176/OpenFOAM/zProjects/x/system/fvSolution.SIMPLE" from line 52 to line 64
    'rhoMax' specified rather than 'pMax' or 'pMaxFactor'
    This is supported for backward-compatibility but 'pMax' or 'pMaxFactor' are more reliable.
--> FOAM Warning : 
    From function Foam::pressureControl::pressureControl(const volScalarField&, const volScalarField&, const Foam::dictionary&, bool)
    in file cfdTools/general/pressureControl/pressureControl.C at line 182
    Reading "/home/ywb17176/OpenFOAM/zProjects/x/system/fvSolution.SIMPLE" from line 52 to line 64
    'rhoMin' specified rather than 'pMin' or 'pMinFactor'
    This is supported for backward-compatibility but'pMin' or 'pMinFactor' are more reliable.
pressureControl
    pMax 2e+06
    pMin 28050.5

Creating turbulence model

Selecting turbulence model type RAS
Selecting RAS turbulence model kEpsilon
RAS
{
    RASModel        kEpsilon;
    turbulence      on;
    printCoeffs     on;
    Cmu             0.09;
    C1              1.44;
    C2              1.92;
    C3              0;
    sigmak          1;
    sigmaEps        1.3;
}

No MRF models present

Creating finite volume options from "system/fvOptions"

Selecting finite volume options model type fixedTemperatureConstraint
    Source: source1
    - selecting cells using cellZone porouszone
    - selected 8000 cell(s) with volume 0.0001
Creating porosity model list from porosityProperties

Porosity region porosity1:
    selecting model: DarcyForchheimer
    creating porous zone: porouszone
Using pressure implicit porosity

Starting time loop

Time = 1

smoothSolver:  Solving for e, Initial residual = 0.999866, Final residual = 6.804e-05, No Iterations 1


--> FOAM FATAL ERROR: 

    request for volScalarField psi from objectRegistry region0 failed
    available objects of type volScalarField are

15
(
thermo:mu
thermo:psi
nut
pPrevIter
rho
k
rhoPrevIter
alphat
p
T
e
thermo:rho
div(phiHbyA)
epsilon
thermo:alpha
)


    From function const Type& Foam::objectRegistry::lookupObject(const Foam::word&) const [with Type = Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>]
    in file /home/ubuntu/OpenFOAM/OpenFOAM-5.x/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 193.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::error::abort() at ??:?
#2  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const& Foam::objectRegistry::lookupObject<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >(Foam::word const&) const at ??:?
#3  Foam::totalPressureFvPatchScalarField::updateCoeffs(Foam::Field<double> const&, Foam::Field<Foam::Vector<double> > const&) at ??:?
#4  Foam::fvMatrix<double>::fvMatrix(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::dimensionSet const&) at ??:?
#5  Foam::tmp<Foam::fvMatrix<double> > Foam::fv::optionList::operator()<double>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::word const&) at ??:?
#6  ? at ??:?
#7  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#8  ? at ??:?
Aborted (core dumped)
deepbandivadekar is offline   Reply With Quote

Old   January 25, 2018, 10:46
Default
  #12
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
A calculated BC is used if you are calculating a field based on others; such as the p one out of p_rgh. It is calculated based on the p_rgh; thus you can use calculated:

Code:
p = p_rgh + rho*gh;
If you solve an equation for the quantity, then you cannot use calculated. Similar quantities that uses calculated are nut (based on e.g. field k and epsilon...). If you want to understand why you get the error here (it is not a floating one), then analyze the source code of the boundary condition.

And now you are mixing different topics. If you solve for e the psi field has to be there and as it seems, it is not in your register. I don't know what you are solving. If I ran a rhoPimpleFoam with the thermodynamic you set-up, I have no problems.
Kummi and deepbandivadekar like this.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   January 25, 2018, 10:52
Default
  #13
Senior Member
 
Deep
Join Date: Oct 2017
Posts: 180
Rep Power: 8
deepbandivadekar is on a distinguished road
Code:
#3  Foam::totalPressureFvPatchScalarField::updateCoeffs(Foam::Field<double> const&, Foam::Field<Foam::Vector<double> > const&) at ??:?
So I thought probably, the totalPressure BC I chose in the p file has a hand in this? And it seems it did. Here's my changed p file

Code:
    inletExt
    {
        type            zeroGradient;//totalPressure;//zeroGradient;
    //p0        100.0e5;
    }

    inletPorous
    {
        type            zeroGradient;//totalPressure; 
    //psi        psi;
    //gamma        1.4;
    //p0        uniform 20.0e5;
    //value        uniform    20.0e5;
    }

    outletExt
    {
        type            fixedValue;
        value           $internalField;
    }

    outletPorous
    {
        type            fixedValue;
        value           $internalField;
    }
}
I was using totalPressure because I'll have information in total pressure rather than static pressure around my porous object.
The problem I am working on involves flow through and over porous material.
I have purely supersonic flow around the porous material and likely subsonic flow through the porous region and I want to know temperature profiles everywhere possible.

So changing the totalPressure back to zeroGradient worked. But ended up in this new printStack error after 2 iterations

Code:
Creating porosity model list from porosityProperties

Porosity region porosity1:
    selecting model: DarcyForchheimer
    creating porous zone: porouszone
Using pressure implicit porosity

Starting time loop

Time = 1

smoothSolver:  Solving for e, Initial residual = 0.999873, Final residual = 6.80405e-05, No Iterations 1
GAMG:  Solving for p, Initial residual = 1, Final residual = 0.0439418, No Iterations 5
time step continuity errors : sum local = 4984.39, global = 1469.04, cumulative = 1469.04
pressureControl: p max 252769
smoothSolver:  Solving for epsilon, Initial residual = 1, Final residual = 0.08023, No Iterations 12
smoothSolver:  Solving for k, Initial residual = 1, Final residual = 0.0956772, No Iterations 12
ExecutionTime = 0.26 s  ClockTime = 0 s

Time = 2

smoothSolver:  Solving for e, Initial residual = 0.843334, Final residual = 2.92319e-05, No Iterations 1
GAMG:  Solving for p, Initial residual = 0.963382, Final residual = 0.0357441, No Iterations 7
time step continuity errors : sum local = 5466.63, global = -1295.78, cumulative = 173.256
pressureControl: p max 2.46131e+13
pressureControl: p min -2.08565e+10
smoothSolver:  Solving for epsilon, Initial residual = 1, Final residual = 6.65594e-05, No Iterations 2
smoothSolver:  Solving for k, Initial residual = 0.89082, Final residual = 0.038888, No Iterations 2
ExecutionTime = 0.37 s  ClockTime = 0 s

Time = 3

smoothSolver:  Solving for e, Initial residual = 0.618771, Final residual = 0.040711, No Iterations 2
#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::heRhoThermo<Foam::rhoThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::calculate() at ??:?
#4  Foam::heRhoThermo<Foam::rhoThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::correct() at ??:?
#5  ? at ??:?
#6  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#7  ? at ??:?
Floating point exception (core dumped)
deepbandivadekar is offline   Reply With Quote

Old   January 25, 2018, 11:02
Default
  #14
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
You know that the totalPressure just reduces the pressure (which is given p0) at the face according to the velocity (1/2 rho U^2). Using it should be coupled with the appropriate U boundaries.
I use totalPressure if I have a pressure based flow. But the appropriate U BC have to be set. Otherwise you will get an infinite acceleration.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   January 25, 2018, 11:32
Default
  #15
Senior Member
 
Deep
Join Date: Oct 2017
Posts: 180
Rep Power: 8
deepbandivadekar is on a distinguished road
Quote:
Originally Posted by Tobi View Post
You know that the totalPressure just reduces the pressure (which is given p0) at the face according to the velocity (1/2 rho U^2). Using it should be coupled with the appropriate U boundaries.
I use totalPressure if I have a pressure based flow. But the appropriate U BC have to be set. Otherwise you will get an infinite acceleration.
Thank you so much Tobias for sticking with me through this.

This is the combination I used now:

p
Code:
    inletExt
    {
        type            totalPressure;//zeroGradient;
    p0        uniform 100.0e5;
    }

    inletPorous
    {
        type            totalPressure;//zeroGradient; 
//    psi        psi;
//    gamma        1.4;
    p0        uniform 20.0e5;
//    value        uniform    20.0e5;
    }

    outletExt
    {
        type            fixedValue;
        value           $internalField;
    }

    outletPorous
    {
        type            fixedValue;
        value           $internalField;
    }
}
and U
Code:
    inletExt
    {
        type            pressureInletOutletVelocity;//fixedValue;//flowRateInletVelocity;
        //massFlowRate    constant 0.1;
        //value           uniform (0 0 -7000);//(0 0 0);
        value        uniform (0 0 0);
    }
    inletPorous
    {
        type            pressureInletOutletVelocity;//fluxCorrectedVelocity;//flowRateInletVelocity;
    value        uniform (0 0 0);
    //phi        phi;
    //rho        rho;
        //massFlowRate    constant 0.1;
        //value           uniform (0 0 0);
    }
    outletExt
    {
        type            inletOutlet;
        value           uniform (0 0 0);
        inletValue      uniform (0 0 0);
    }
    outletPorous
    {
        type            inletOutlet;
        value           uniform (0 0 0);
        inletValue      uniform (0 0 0);
    }
This is giving me the same error as above. This combination seems to work for the damBreak case (https://cfd.direct/openfoam/user-guide/boundaries/)
deepbandivadekar is offline   Reply With Quote

Old   January 25, 2018, 11:59
Default
  #16
Senior Member
 
Deep
Join Date: Oct 2017
Posts: 180
Rep Power: 8
deepbandivadekar is on a distinguished road
I guess it now has become same as this particular thread here:
Foam::error::PrintStack

Somewhere the BCs are still wrong. I keep going back to those warnings: rho min and rho max.
deepbandivadekar is offline   Reply With Quote

Old   January 25, 2018, 12:12
Default
  #17
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi,

So based in your Output you have a big mass conservation problem. However, it can be related to a lot of things such as mesh, numerical setup. You are using steady state so you should underrelax. Furthermore, your warnings are related to the old limiting. Limited p instead. It is more conservative. It is hard to give you suggestions with the lack of information you give us. A case is always the best. A draft of the problem etc...
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   January 29, 2018, 05:31
Default
  #18
Senior Member
 
Deep
Join Date: Oct 2017
Posts: 180
Rep Power: 8
deepbandivadekar is on a distinguished road
Quote:
Originally Posted by Tobi View Post
Hi,

So based in your Output you have a big mass conservation problem. However, it can be related to a lot of things such as mesh, numerical setup. You are using steady state so you should underrelax. Furthermore, your warnings are related to the old limiting. Limited p instead. It is more conservative. It is hard to give you suggestions with the lack of information you give us. A case is always the best. A draft of the problem etc...
Umm, alright. Here's the case I am working with.

Mesh is simple enough: two blocks and no walls involved. Two inlets, one from the top (external compressible flow) and the other from bottom (through porous block).
Attached Files
File Type: gz x_CFDO.tar.gz (3.9 KB, 1 views)
deepbandivadekar is offline   Reply With Quote

Old   January 31, 2018, 13:59
Default Update
  #19
Senior Member
 
Deep
Join Date: Oct 2017
Posts: 180
Rep Power: 8
deepbandivadekar is on a distinguished road
Hi Tobi,

I've attached the latest case here for 5.x. This case will run just fine but the initial conditions I've put in here are not the ones I'm interested in. Specifically I want to simulate this case for much higher pressures (of the order of 25-30 bar). When I change the inlets and internalField to such high values, it gives me the same floating point error with print stack.

If at all there's something that makes pressure or density zero, i should have happened with lower pressure as well. How is this case pressure dependent ? Any clues ?

Error log with higher pressures
Code:
Create time

Create mesh for time = 0


SIMPLE: convergence criteria
    field p     tolerance 0.001
    field U     tolerance 0.0001
    field e     tolerance 0.001
    field "(k|epsilon|omega)"     tolerance 0.001

Reading thermophysical properties

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

Reading field U

Reading/calculating face flux field phi

--> FOAM Warning : 
    From function Foam::pressureControl::pressureControl(const volScalarField&, const volScalarField&, const Foam::dictionary&, bool)
    in file cfdTools/general/pressureControl/pressureControl.C at line 125
    Reading "/home/ywb17176/OpenFOAM/zProjects/x/system/fvSolution.SIMPLE" from line 52 to line 64
    'rhoMax' specified rather than 'pMax' or 'pMaxFactor'
    This is supported for backward-compatibility but 'pMax' or 'pMaxFactor' are more reliable.
--> FOAM Warning : 
    From function Foam::pressureControl::pressureControl(const volScalarField&, const volScalarField&, const Foam::dictionary&, bool)
    in file cfdTools/general/pressureControl/pressureControl.C at line 182
    Reading "/home/ywb17176/OpenFOAM/zProjects/x/system/fvSolution.SIMPLE" from line 52 to line 64
    'rhoMin' specified rather than 'pMin' or 'pMinFactor'
    This is supported for backward-compatibility but'pMin' or 'pMinFactor' are more reliable.
pressureControl
    pMax 2.65e+06
    pMin 143849

Creating turbulence model

Selecting turbulence model type RAS
Selecting RAS turbulence model kEpsilon
RAS
{
    RASModel        kEpsilon;
    turbulence      on;
    printCoeffs     on;
    Cmu             0.09;
    C1              1.44;
    C2              1.92;
    C3              0;
    sigmak          1;
    sigmaEps        1.3;
}

No MRF models present

Creating finite volume options from "system/fvOptions"

Selecting finite volume options model type fixedTemperatureConstraint
    Source: source1
    - selecting cells using cellZone porouszone
    - selected 125000 cell(s) with volume 0.0001
Creating porosity model list from porosityProperties

Porosity region porosity1:
    selecting model: DarcyForchheimer
    creating porous zone: porouszone
Using pressure implicit porosity

Starting time loop

Time = 1

smoothSolver:  Solving for e, Initial residual = 7.55303e-05, Final residual = 2.59832e-09, No Iterations 1
GAMG:  Solving for p, Initial residual = 1, Final residual = 0.0246482, No Iterations 5
time step continuity errors : sum local = 1494.35, global = -444.3, cumulative = -444.3
pressureControl: p max 3.60081e+06
smoothSolver:  Solving for epsilon, Initial residual = 1, Final residual = 0.0969739, No Iterations 20
smoothSolver:  Solving for k, Initial residual = 1, Final residual = 0.0935749, No Iterations 20
ExecutionTime = 4.45 s  ClockTime = 5 s

Time = 2

smoothSolver:  Solving for e, Initial residual = 8.75312e-05, Final residual = 4.64666e-06, No Iterations 1
GAMG:  Solving for p, Initial residual = 0.991606, Final residual = 0.0242761, No Iterations 5
time step continuity errors : sum local = 5527.22, global = 1823.98, cumulative = 1379.68
pressureControl: p max 2.69438e+06
pressureControl: p min -1.34867e+06
smoothSolver:  Solving for epsilon, Initial residual = 0.993871, Final residual = 0.0742512, No Iterations 2
smoothSolver:  Solving for k, Initial residual = 0.0490147, Final residual = 0.00449648, No Iterations 4
ExecutionTime = 7.01 s  ClockTime = 7 s

Time = 3

smoothSolver:  Solving for e, Initial residual = 0.00294211, Final residual = 0.0002079, No Iterations 1
GAMG:  Solving for p, Initial residual = 0.662128, Final residual = 0.0289645, No Iterations 5
time step continuity errors : sum local = 3844.73, global = -1055.99, cumulative = 323.685
pressureControl: p max 3.87254e+06
pressureControl: p min -1.33612e+06
smoothSolver:  Solving for epsilon, Initial residual = 0.746239, Final residual = 0.0591527, No Iterations 12
smoothSolver:  Solving for k, Initial residual = 0.536278, Final residual = 0.0467291, No Iterations 12
ExecutionTime = 9.75 s  ClockTime = 10 s

Time = 4

smoothSolver:  Solving for e, Initial residual = 0.00403889, Final residual = 0.00026221, No Iterations 2
GAMG:  Solving for p, Initial residual = 0.791904, Final residual = 0.0314796, No Iterations 6
time step continuity errors : sum local = 2510.16, global = 430.837, cumulative = 754.522
pressureControl: p max 1.76649e+07
pressureControl: p min -5.41441e+06
smoothSolver:  Solving for epsilon, Initial residual = 0.265591, Final residual = 0.0232256, No Iterations 10
smoothSolver:  Solving for k, Initial residual = 0.227245, Final residual = 0.0182015, No Iterations 10
ExecutionTime = 12.51 s  ClockTime = 13 s

Time = 5

smoothSolver:  Solving for e, Initial residual = 0.00757164, Final residual = 0.000557392, No Iterations 2
#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::heRhoThermo<Foam::rhoThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::calculate() at ??:?
#4  Foam::heRhoThermo<Foam::rhoThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::correct() at ??:?
#5  ? at ??:?
#6  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#7  ? at ??:?
Floating point exception (core dumped)
Thanks
Attached Files
File Type: gz xcase_CFDO.tar.gz (3.9 KB, 3 views)

Last edited by deepbandivadekar; January 31, 2018 at 14:01. Reason: Added error log
deepbandivadekar is offline   Reply With Quote

Old   February 2, 2018, 07:59
Default
  #20
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Can you give us some description / draft about what your case should demonstrate? I am a bit doubtful about the physics behind. No wall, nothing?
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Reply

Tags
printstack, rhoporoussimplefoam, thermophysicalproperties

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
ANSYS Licensing Problem, Processes Running but Showing as Not Running penguinman ANSYS 3 September 27, 2016 13:30
Something weird encountered when running OpenFOAM in parallel on multiple nodes xpqiu OpenFOAM Running, Solving & CFD 2 May 2, 2013 04:59
Statically Compiling OpenFOAM Issues herzfeldd OpenFOAM Installation 21 January 6, 2009 09:38
Kubuntu uses dash breaks All scripts in tutorials platopus OpenFOAM Bugs 8 April 15, 2008 07:52


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