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/)
-   -   rhoPimpleFoam Error: cannot be called for a calculatedFvPatchField on patch (https://www.cfd-online.com/Forums/openfoam-solving/253097-rhopimplefoam-error-cannot-called-calculatedfvpatchfield-patch.html)

MohdShaeq November 23, 2023 17:04

rhoPimpleFoam Error: cannot be called for a calculatedFvPatchField on patch
 
Hello,

I am trying to simulate the flow of hydrogen in a combustion chamber, for which I intend to use the rhoPimpleFoam solver. I have carefully read the available documentation and looked at the boundary conditions of many RAS-cases for the solver. However, I encounter the following error, even though I have tried several combinations of boundary conditions and have also tweaked the thermophysical properties, unfortunately to no avail:-

Code:

--> FOAM FATAL ERROR:
cannot be called for a calculatedFvPatchField
    on patch InjektorFluidvolumen of field h in file "/home/MohdShaeq/Gemischbildungsstudie/0/h"
    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 188.

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, 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  ? 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 /lib64/libc.so.6
#10  ? at /home/abuild/rpmbuild/BUILD/glibc-2.31/csu/../sysdeps/x86_64/start.S:122
Aborted (core dumped)

The error message suggests that there is a problem in a file named h in the 0 folder, but there is no such file present.

The different files and the respective boundary conditions are as follows:-

Code:

FoamFile
{
    version    2.0;
    format      binary;
    class      volScalarField;
    location    "0";
    object      alphat;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField  uniform 1.27183787561e-05;// αt(Turbulente Leitfaehigkeit)= χ(Waermeleitfaehigkeit)/cp(Spezifische Waermekapazitaet bei konstantem Druck)

boundaryField
{
    Brennkammer
    {
        type            compressible::alphatWallFunction;
        value          $internalField;
    }

    Einlass_InjektorFluidvolumen
    {
        type            fixedValue;
        value          $internalField;
    }

    InjektorFluidvolumen
    {
        type            compressible::alphatWallFunction;
        Prt            0.85;
        value          $internalField;
    }

    Nadel
    {
        type            compressible::alphatWallFunction;
        Prt            0.85;
        value          $internalField;
    }
}

Code:

FoamFile
{
    version    2.0;
    format      binary;
    class      volScalarField;
    location    "0";
    object      epsilon;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 2 -3 0 0 0 0];

internalField  uniform 20;

boundaryField
{
    Brennkammer
    {
      type                epsilonWallFunction;
      value              $internalField;
    }

    Einlass_InjektorFluidvolumen
    {
      type                turbulentMixingLengthDissipationRateInlet;
      mixingLength        3.576446e-3;
      value              $internalField;
    }

    InjektorFluidvolumen
    {
      type                epsilonWallFunction;
      value              $internalField;
    }

    Nadel
    {
      type                epsilonWallFunction;
      value              $internalField;
    }
}

Code:

FoamFile
{
    version    2.0;
    format      binary;
    class      volScalarField;
    location    "0";
    object      k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField  uniform 30;

boundaryField
{
    Brennkammer
    {
      type            kqRWallFunction;
      value          $internalField;
    }

    Einlass_InjektorFluidvolumen
    {
      type            turbulentIntensityKineticEnergyInlet;
      intensity      0.0458;
      value          $internalField;
    }

    InjektorFluidvolumen
    {
      type            kqRWallFunction;
      value          $internalField;
    }

    Nadel
    {
      type            kqRWallFunction;
      value          $internalField;
    }
}

Code:

FoamFile
{
    version    2.0;
    format      binary;
    class      volScalarField;
    location    "0";
    object      nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField  uniform 0.023; //turbulente Wirbelviskositaet

boundaryField
{
    Brennkammer
    {
      type                nutkWallFunction;
      value                uniform 0;
    }

    Einlass_InjektorFluidvolumen
    {
        type                fixedValue;
        value              $internalField;
    }

    InjektorFluidvolumen
    {
      type                nutkWallFunction;
      value                uniform 0;
    }

    Nadel
    {
      type                nutkWallFunction;
      value                uniform 0;
    }
}

Code:

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

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

internalField      uniform 2e+06; //Einspritzdruck
patm                uniform 1.01325e+05; //Atmosphaerischer Druck bei Raumbedingungen

boundaryField
{
    Brennkammer
    {
        type            calculated;
        value          $patm;
    }

    Einlass_InjektorFluidvolumen
    {
        type            fixedValue;
        value          $internalField;
    }

    InjektorFluidvolumen
    {
        type            calculated;
        value          $patm;
    }

    Nadel
    {
        type            calculated;
        value          $patm;
    }
}

Code:

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

dimensions          [0 0 0 1 0 0 0];

internalField      uniform 309.15; //Einspritztemperatur des Kraftstoffes
Tatm                uniform 298.15; //Atmosphaerische Temperatur bei Raumbedingungen
Trand              uniform 353.15; //Temperatur der umgebenden Raender

boundaryField
{
    Brennkammer
    {
      type            fixedValue;
      value          $Trand;
    }

    Einlass_InjektorFluidvolumen
    {
      type            fixedValue;
      value          $internalField;
    }

    InjektorFluidvolumen
    {
      type            calculated;
      value          $internalField;
    }

    Nadel
    {
      type            calculated;
      value          $internalField;
    }
}

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
{
    Brennkammer
    {
        type            noSlip;
    }

    Einlass_InjektorFluidvolumen
    {
      type            pressureInletOutletVelocity;
      value          $internalField;
    }

    InjektorFluidvolumen
    {
      type            noSlip;
    }

    Nadel
    {
      type            noSlip;
    }
}

The thermophysical properties are:-
Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    location    "constant";
    object      thermophysicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

thermoType
{
    type            hePsiThermo;
    mixture        pureMixture;
    transport      sutherland;
    thermo          hConst;
    equationOfState perfectGas;
    specie          specie;
    energy          sensibleEnthalpy;
}

//stoichiometricAirFuelMassRatio stoichiometricAirFuelMassRatio [0 0 0 0 0 0 0] 34.074;

mixture
{
    specie
    {
        molWeight      16.0243; //H2
    }
    thermodynamics
    {

        Cp          14310; //Spezifische Waermekapazitaet bei konstantem Druck in J/g.K
        Hf          58.68; //Schmelzenthalpie in J/mol

      /*Tlow            298.15;
        Thigh          5000;
        Tcommon        1000;
        highCpCoeffs    ( 3.02082 0.00104314 -2.88613e-07 4.20369e-11 -2.37182e-15 -902.964 2.3064 );
        lowCpCoeffs    ( 2.99138 0.00343493 -8.43792e-06 9.57755e-09 -3.75097e-12 -987.16 1.95123 );*/
    }
    transport
    {
        As              1.67212e-06;
        Ts              170.672;
    }
}

/*CHEMKINFile        "<case>/chemkin/chem.inp";
CHEMKINThermoFile  "<case>/chemkin/therm.dat";
CHEMKINTransportFile "<case>/chemkin/transportProperties";*/

newFormat      yes;

//inertSpecie    N2;

/*liquids
{
    //H2;
}*/

//solids
//{}

The fvSchemes and fvSolution are:-
Code:

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

ddtSchemes
{
    default        Euler;
}

gradSchemes
{
    default        Gauss linear;
}

divSchemes
{
    default        none;
    div(phi,U)      Gauss upwind;
    div(phid,p)    Gauss upwind;
    div(phiv,p)    Gauss linear;
    div(phi,K)      Gauss linear;
    div(phi,e)      Gauss upwind;
    div(phi,k)      Gauss upwind;
    div(phi,epsilon) Gauss upwind;
    div(phi,R)      Gauss upwind;
    div(phi,omega)  Gauss upwind;
    div((rho*R))    Gauss linear;
    div(R)          Gauss linear;
    div(U)          Gauss linear;
    div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
    default        Gauss linear corrected;
}

interpolationSchemes
{
    default        linear;
}

snGradSchemes
{
    default        corrected;
}

Code:

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

solvers
{
    p
    {
        solver          PCG;
        preconditioner  DIC;
        tolerance      1e-07;
        relTol          0.01;
    }

    pFinal
    {
        $p;
        relTol          0;
    }

    "(rho|U|e|k|epsilon|omega)"
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance      1e-06;
        relTol          0.1;
    }

    "(rho|U|e|k|epsilon|omega)Final"
    {
        $U;
        relTol          0;
    }
}

PIMPLE
{
    momentumPredictor  yes;
    transonic          no;
    nOuterCorrectors    50;
    nCorrectors        1;
    nNonOrthogonalCorrectors 0;
    consistent          yes;
    SIMPLErho          yes;

    pMaxFactor          1.5;
    pMinFactor          0.9;

    residualControl
    {
        "(U|k|epsilon)"
        {
            relTol          0;
            tolerance      0.0001;
        }
    }

    turbOnFinalIterOnly no;
}

relaxationFactors
{
    fields
    {
        "p.*"          0.3;
        "rho.*"        0.7; //1
    }
    equations
    {
        "U.*"          0.7;
        "e.*"          0.7;
        "(k|epsilon|omega).*" 0.7;
    }
}

Could someone kindly guide me the steps I should take or point out the mistake(s) I have made? I would be highly obliged for the suggestions.

Kind regards,
Shaeq

Yann November 24, 2023 03:35

hello,

I don't know how your geometry is defined, but I think your problem is related to the "calculated" BC's you are using on pressure and temperature.

The calculated BC is only used on variables which are calculated from other variables (typically nut and alphat). On pressure and temperature you should use other boundary condition than calculated. Have a look at the rhoPimpleFoam tutorials to see how boundary conditions are defined for these variables.

Regards,
Yann

MohdShaeq November 24, 2023 11:37

Floating point exception error
 
2 Attachment(s)
Hello Yann,

Thank you for your kind suggestions. I have changed the boundary conditions in p and T from calculated to fixedValue. Although the solver now runs, it fails, however, after some iterations due to Floating point exception error and I am unable to diagnose where an invalid mathematical operation might have occurred. I have attached the snappyHexMeshDict and the error message file herewith.

For further suggestions I would be highly grateful to you.

Kind regards,
Shaeq

Yann November 24, 2023 11:44

Can you describe what is your simulation domain and what boundary conditions you are using?
What are you inlet and outlet patches?

The most important part is to pick a proper combination of boundary conditions on U and p. (typical setup: U fixedValue / p zeroGradient on inlet, U zeroGradient / p fixedValue on outlet).

More information: https://doc.cfd.direct/notes/cfd-gen...ary-conditions

Regards,
Yann

MohdShaeq November 24, 2023 12:55

Case setup
 
1 Attachment(s)
Firstly, I should translate the different different parts of my geometry into English, which is as follows:-
  1. Brennkammer- Combustion chamber
  2. Einlass_InjektorFluidvolumen- Inlet for the injector
  3. InjektorFluidvolumen- Injector
  4. Nadel- Injector needle

I intend to conduct my study in two parts. Firstly, I want to simulate the inflow of the fuel (hydrogen) in the combustion chamber with rhoPimpleFoam solver. This in turn I have divided into two parts, viz. without and with the chemical reactions. For the second part, I want to simulate the injection process using Lagrangian approach, whereby I will remove the injector and use sprayFoam solver for this.

Since I am only interested in the influx of fuel, I have not defined any outlet and I have turned off the chemistry properties for the first part of my simulations. The computational domain is the inner side of the injector and the combustion chamber. Morever, I have refined the region near the combustion chamber opening as the fuel flows in here.

I am attaching a cross-sectional view of the compuational domain herewith. The injection needle is in the middle surrounded by the injector at its lower part. The fuel enters the injector at the top, i.e. at its inlet. At the bottom is the combustion chamber. Moreover, the boundary conditions for p, U and T are as follows:-
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 2e+06; //Einspritzdruck
patm                uniform 1.01325e+05; //Atmosphaerischer Druck bei Raumbedingungen

boundaryField
{
    Brennkammer
    {
        type            fixedValue;
        value          $patm;
    }

    Einlass_InjektorFluidvolumen
    {
        type            fixedValue;
        value          $internalField;
    }

    InjektorFluidvolumen
    {
        type            fixedValue;
        value          $patm;
    }

    Nadel
    {
        type            fixedValue;
        value          $patm;
    }
}

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
{
    Brennkammer
    {
        type            noSlip;
    }

    Einlass_InjektorFluidvolumen
    {
      type            pressureInletOutletVelocity;
      value          $internalField;
    }

    InjektorFluidvolumen
    {
      type            noSlip;
    }

    Nadel
    {
      type            noSlip;
    }
}

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

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 309.15; //Einspritztemperatur des Kraftstoffes
Tatm                uniform 298.15; //Atmosphaerische Temperatur bei Raumbedingungen
Trand              uniform 353.15; //Temperatur der umgebenden Raender

boundaryField
{
    Brennkammer
    {
      type            fixedValue;
      value          $Trand;
    }

    Einlass_InjektorFluidvolumen
    {
      type            fixedValue;
      value          $internalField;
    }

    InjektorFluidvolumen
    {
      type            fixedValue;
      value          $Tatm;
    }

    Nadel
    {
      type            fixedValue;
      value          $Tatm;
    }
}

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

The rest of the files are as defined in the first post of this thread.

Kind regards,
Shaeq

Yann November 24, 2023 13:39

Thanks for the detailed explanation, it is easier to understand what you are doing now.

This is an unusual setup so I don't know if I can give you a proper setup but I think your issue is related to your boundary conditions.

Just to be sure I understood correctly: in your current setup you have a enclosed domain (so walls everywhere) except for the injector inlet, right?
What is driving the flow? From your setup I'm guessing pressure difference between inlet and internal pressure?

If I am right, then I would set zeroGradient on walls for pressure and leaves the rest as it is for pressure inlet and velocity setup. I would except this to create a flow until the pressure inside the domain reaches the inlet pressure. But again, I never had to deal with such case so I can't guarantee it will work.

Regards,
Yann

MohdShaeq November 24, 2023 20:45

Hi Yann,

Thanks again for your valuable suggestion. Yes, you have correctly understood my case setup. There is only inlet and no outlet as I only need to study the fuel injection characteristics and the fuel is driven by the injection pressure, which is considerably above the atmospheric pressure.

I have set the boundary conditions as per your suggestion, but the problem persists. However, when I change the thermophysical properties, whereby the option thermo is changed from hConst to janaf, the solver continues further. But it diverges heavily after some iterations and the temperature goes out of range of the Janaf tables. Another anomaly of note is that the epsilon values increase steadily, even reaching the order of 89.

Can you suggest me some further improvements? Shall I also send you my mesh files so that you may be able to replicate the case? I really need to get it right and if I am able to achieve a breakthrough, I am more than hopeful that the rest of the simulations would follow somewhat easily.

Best regards,
Shaeq

Yann November 25, 2023 11:42

Hello Shaeq,

Maybe you can try to use the fvOptions limitTemperature and/or limitVelocity. It can sometimes help to avoid a simulation blowing up at the beginning of the simulation. You should find examples in the tutorials.

Have you tried lowering your time step or using adjustable time step?

Another idea could be to ramp your inlet pressure to avoid starting with a huge pressure difference between your inlet and internal volume.

Regards,
Yann

MohdShaeq November 26, 2023 11:20

Hello Yann,

As per your suggestion, I have employed limitTemperature constraint in fvOptions and adjustableRunTime. I have not activated limitVelocity constraint because it is a pressure-driven flow and so I do not know the typical velocities associated with it. After undertaking these measures, the solver runs smoothly for more than an hour. It runs, however, only for the first time step and thereafter it fails with the following messages:-
Code:

[0] #0  Foam::error::printStack(Foam::Ostream&) at ??:?
[0] #1  Foam::sigFpe::sigHandler(int) at ??:?
[0] #2  ? in /lib64/libc.so.6
[0] #3  void Foam::fvc::surfaceIntegrate<double>(Foam::Field<double>&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&) at ??:?
[0] #4  Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::fvc::surfaceIntegrate<double>(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&) at ??:?
[0] #5  Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::fvc::div<double>(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&) at ??:?
[0] #6  Foam::fv::gaussLaplacianScheme<double, double>::fvmLaplacian(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:?
[0] #7  Foam::fv::laplacianScheme<double, double>::fvmLaplacian(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:?
[0] #8  ? at ??:?
[0] #9  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 ??:?
[0] #10  Foam::tmp<Foam::fvMatrix<double> > Foam::fvm::laplacian<double, double>(Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:?
[0] #11  Foam::RASModels::kEpsilon<Foam::EddyDiffusivity<Foam::ThermalDiffusivity<Foam::CompressibleTurbulenceModel<Foam::fluidThermo> > > >::correct() at ??:?
[0] #12  ? at ??:?
[0] #13  __libc_start_main in /lib64/libc.so.6
[0] #14  ? at ??:?
[iflw019:1205129:0:1205129] Caught signal 8 (Floating point exception: tkill(2) or tgkill(2))
==== backtrace (tid:1205129) ====
 0  /lib64/libucs.so.0(ucs_handle_error+0x2a4) [0x7fb59cbbd144]
 1  /lib64/libucs.so.0(+0x2231c) [0x7fb59cbbd31c]
 2  /lib64/libucs.so.0(+0x225ca) [0x7fb59cbbd5ca]
 3  /lib64/libc.so.6(gsignal+0x10f) [0x7fb5ade7738f]
 4  rhoPimpleFoam(_ZN4Foam3fvc16surfaceIntegrateIdEEvRNS_5FieldIT_EERKNS_14GeometricFieldIS3_NS_13fvsPatchFieldENS_11surfaceMeshEEE+0x2ba) [0x49453a]
 5  rhoPimpleFoam(_ZN4Foam3fvc16surfaceIntegrateIdEENS_3tmpINS_14GeometricFieldIT_NS_12fvPatchFieldENS_7volMeshEEEEERKNS3_IS4_NS_13fvsPatchFieldENS_11surfaceMeshEEE+0x1d0) [0x4947a0]
 6  rhoPimpleFoam(_ZN4Foam3fvc3divIdEENS_3tmpINS_14GeometricFieldIT_NS_12fvPatchFieldENS_7volMeshEEEEERKNS3_IS4_NS_13fvsPatchFieldENS_11surfaceMeshEEE+0xf0) [0x494980]
 7  /opt/OpenFOAM/OpenFOAM-v1912/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so(_ZN4Foam2fv20gaussLaplacianSchemeIddE12fvmLaplacianERKNS_14GeometricFieldIdNS_13fvsPatchFieldENS_11surfaceMeshEEERKNS3_IdNS_12fvPatchFieldENS_7volMeshEEE+0x271) [0x7fb5b4f8a851]
 8  /opt/OpenFOAM/OpenFOAM-v1912/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so(_ZN4Foam2fv15laplacianSchemeIddE12fvmLaplacianERKNS_14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEEES8_+0x53) [0x7fb5b4f9eed3]
 9  rhoPimpleFoam() [0x46be4c]
10  rhoPimpleFoam(_ZN4Foam3fvm9laplacianIddEENS_3tmpINS_8fvMatrixIT_EEEERKNS_14GeometricFieldIT0_NS_12fvPatchFieldENS_7volMeshEEERKNS7_IS4_S9_SA_EE+0x1c9) [0x46c299]
11  /opt/OpenFOAM/OpenFOAM-v1912/platforms/linux64GccDPInt32Opt/lib/libcompressibleTurbulenceModels.so(_ZN4Foam3fvm9laplacianIddEENS_3tmpINS_8fvMatrixIT_EEEERKNS2_INS_14GeometricFieldIT0_NS_12fvPatchFieldENS_7volMeshEEEEERKNS7_IS4_S9_SA_EE+0x35) [0x7fb5b1478505]
12  /opt/OpenFOAM/OpenFOAM-v1912/platforms/linux64GccDPInt32Opt/lib/libcompressibleTurbulenceModels.so(_ZN4Foam9RASModels8kEpsilonINS_15EddyDiffusivityINS_18ThermalDiffusivityINS_27CompressibleTurbulenceModelINS_11fluidThermoEEEEEEEE7correctEv+0x644) [0x7fb5b152afd4]
13  rhoPimpleFoam() [0x434aca]
14  /lib64/libc.so.6(__libc_start_main+0xf3) [0x7fb5ade634a3]
15  rhoPimpleFoam() [0x436f9e]
=================================
[iflw019:1205129] *** Process received signal ***
[iflw019:1205129] Signal: Floating point exception (8)
[iflw019:1205129] Signal code:  (-6)
[iflw019:1205129] Failing at address: 0x3e800126389
[iflw019:1205129] [ 0] /lib64/libpthread.so.0(+0x12b30)[0x7fb5ab42db30]
[iflw019:1205129] [ 1] /lib64/libc.so.6(gsignal+0x10f)[0x7fb5ade7738f]
[iflw019:1205129] [ 2] /lib64/libc.so.6(+0x37410)[0x7fb5ade77410]
[iflw019:1205129] [ 3] rhoPimpleFoam(_ZN4Foam3fvc16surfaceIntegrateIdEEvRNS_5FieldIT_EERKNS_14GeometricFieldIS3_NS_13fvsPatchFieldENS_11surfaceMeshEEE+0x2ba)[0x49453a]
[iflw019:1205129] [ 4] rhoPimpleFoam(_ZN4Foam3fvc16surfaceIntegrateIdEENS_3tmpINS_14GeometricFieldIT_NS_12fvPatchFieldENS_7volMeshEEEEERKNS3_IS4_NS_13fvsPatchFieldENS_11surfaceMeshEEE+0x1d0)[0x4947a0]
[iflw019:1205129] [ 5] rhoPimpleFoam(_ZN4Foam3fvc3divIdEENS_3tmpINS_14GeometricFieldIT_NS_12fvPatchFieldENS_7volMeshEEEEERKNS3_IS4_NS_13fvsPatchFieldENS_11surfaceMeshEEE+0xf0)[0x494980]
[iflw019:1205129] [ 6] /opt/OpenFOAM/OpenFOAM-v1912/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so(_ZN4Foam2fv20gaussLaplacianSchemeIddE12fvmLaplacianERKNS_14GeometricFieldIdNS_13fvsPatchFieldENS_11surfaceMeshEEERKNS3_IdNS_12fvPatchFieldENS_7volMeshEEE+0x271)[0x7fb5b4f8a851]
[iflw019:1205129] [ 7] /opt/OpenFOAM/OpenFOAM-v1912/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so(_ZN4Foam2fv15laplacianSchemeIddE12fvmLaplacianERKNS_14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEEES8_+0x53)[0x7fb5b4f9eed3]
[iflw019:1205129] [ 8] rhoPimpleFoam[0x46be4c]
[iflw019:1205129] [ 9] rhoPimpleFoam(_ZN4Foam3fvm9laplacianIddEENS_3tmpINS_8fvMatrixIT_EEEERKNS_14GeometricFieldIT0_NS_12fvPatchFieldENS_7volMeshEEERKNS7_IS4_S9_SA_EE+0x1c9)[0x46c299]
[iflw019:1205129] [10] /opt/OpenFOAM/OpenFOAM-v1912/platforms/linux64GccDPInt32Opt/lib/libcompressibleTurbulenceModels.so(_ZN4Foam3fvm9laplacianIddEENS_3tmpINS_8fvMatrixIT_EEEERKNS2_INS_14GeometricFieldIT0_NS_12fvPatchFieldENS_7volMeshEEEEERKNS7_IS4_S9_SA_EE+0x35)[0x7fb5b1478505]
[iflw019:1205129] [11] /opt/OpenFOAM/OpenFOAM-v1912/platforms/linux64GccDPInt32Opt/lib/libcompressibleTurbulenceModels.so(_ZN4Foam9RASModels8kEpsilonINS_15EddyDiffusivityINS_18ThermalDiffusivityINS_27CompressibleTurbulenceModelINS_11fluidThermoEEEEEEEE7correctEv+0x644)[0x7fb5b152afd4]
[iflw019:1205129] [12] rhoPimpleFoam[0x434aca]
[iflw019:1205129] [13] /lib64/libc.so.6(__libc_start_main+0xf3)[0x7fb5ade634a3]
[iflw019:1205129] [14] rhoPimpleFoam[0x436f9e]
[iflw019:1205129] *** End of error message ***
--------------------------------------------------------------------------
Primary job  terminated normally, but 1 process returned
a non-zero exit code. Per user-direction, the job has been aborted.
--------------------------------------------------------------------------
[6] #0  Foam::error::printStack(Foam::Ostream&) at ??:?
[6] #1  Foam::sigSegv::sigHandler(int) at ??:?
[6] #2  ? in /lib64/libc.so.6
[6] #3  ? in /lib64/libc.so.6
[7] #0  Foam::error::printStack(Foam::Ostream&) at ??:?
[7] #1  Foam::sigSegv::sigHandler(int) at ??:?
[7] #2  ? in /lib64/libc.so.6
[7] #3  ? in /lib64/libc.so.6
[8] #0  Foam::error::printStack(Foam::Ostream&) at ??:?
[8] #1  Foam::sigSegv::sigHandler(int) at ??:?
[8] #2  ? in /lib64/libc.so.6
[8] #3  ? in /lib64/libc.so.6
[9] #0  Foam::error::printStack(Foam::Ostream&) at ??:?
[9] #1  Foam::sigSegv::sigHandler(int) at ??:?
[9] #2  ? in /lib64/libc.so.6
[9] #3  ? in /lib64/libc.so.6
[1] #0  Foam::error::printStack(Foam::Ostream&) at ??:?
[1] #1  Foam::sigSegv::sigHandler(int) at ??:?
[1] #2  ? in /lib64/libc.so.6
[1] #3  ? in /lib64/libc.so.6
[2] #0  Foam::error::printStack(Foam::Ostream&) at ??:?
[2] #1  Foam::sigSegv::sigHandler(int) at ??:?
[2] #2  ? in /lib64/libc.so.6
[2] #3  ? in /lib64/libc.so.6
[3] #0  Foam::error::printStack(Foam::Ostream&) at ??:?
[3] #1  Foam::sigSegv::sigHandler(int) at ??:?
[3] #2  ? in /lib64/libc.so.6
[3] #3  ? in /lib64/libc.so.6
[4] #0  Foam::error::printStack(Foam::Ostream&) at ??:?
[4] #1  Foam::sigSegv::sigHandler(int) at ??:?
[4] #2  ? in /lib64/libc.so.6
[4] #3  ? in /lib64/libc.so.6
[5] #0  Foam::error::printStack(Foam::Ostream&) at ??:?
[5] #1  Foam::sigSegv::sigHandler(int) at ??:?
[5] #2  ? in /lib64/libc.so.6
[5] #3  ? in /lib64/libc.so.6
--------------------------------------------------------------------------
mpirun noticed that process rank 0 with PID 0 on node iflw019 exited on signal 8 (Floating point exception).

Another important thing to note is that the pressure control values remain stable during the run, however, the bounding epsilon and bounding k values again diverge heavily and reach values in the order of 10e+125 and 10e+78 respectively. I will now try the last of your suggestions and report the experience.

Kind regards,
Shaeq

MohdShaeq November 26, 2023 12:34

Hello Yann,

The solver behaves the same way as before, even after enabling linear ramp for the pressure. What shall I do next? Moreover, could you explain to me the significance of bounding epsilon and k values?

Kind regards,
Shaeq

Yann November 27, 2023 06:08

Hello Shaeq,

It is hard to get useful information from your crash message.
Are you monitoring the residuals? (if not, check the solverInfo function object)
Another useful thing is to monitor min/max values of velocity and/or pressure using the fieldMinMax function object. It can help to see when and where things are getting wrong.

The bounding message you get is related to the numerical schemes you are using on k and epsilon. The values you are reporting seems to indicate the simulation is diverging anyway.

It could be related to your fvSolution / fvSchemes setup, mesh, time step (what maxCo are you using?), or something else...

Regards,
Yann

tas38 November 28, 2023 09:46

I am not sure if you have done this already, but are there any errors thrown by
Code:

checkMesh
?

MohdShaeq March 30, 2024 10:37

Unable to realise injection in the combustion chamber
 
2 Attachment(s)
Hello Yann and Troy,

Thank you both for your valuable suggestions. Please excuse me for replying late as I had to change the geometry several times in order to remove the redundant parts and thus, to simplify the simulation, as advised by my supervisor.

I have successfully been able to run the rhoPimpleFoam solver on the geometry. The fuel (H2 gas) flows through the inlet into the thin region between the injector and the needle. However, the flow of fuel stops right at the entrance of the combustion chamber and therefore, no fuel injection in the combustion chamber takes place as can be seen in the link below:-

https://jumpshare.com/s/8TyzspWE4gfzufM2g2ir

The computational domain, as can be seen in the image attached herewith, is consistent and connected throughout, and consists of the region between the injector and the needle, and the combustion chamber. Thus, it contains no walls in between, which would have otherwise blocked the flow. I have also attached an image of a previously conducted simulation study which I have to reproduce in OpenFOAM.

I am unable to understand the cause of this problem and kindly request you to help me out. I would be glad to share the case files, if the need arises.

Kind regards,
Mohd Shaeq

MohdShaeq April 2, 2024 03:28

Can someone please provide me some suggestions on this issue?

Yann April 2, 2024 04:11

Hello Mohd Shaeq,

The link provided in your previous post does not seem to work properly so we cannot see the issue you are mentioning.

On your screenshot the mesh looks way too coarse, I don't know if it could be the cause of your problem.

Regards,
Yann

MohdShaeq April 2, 2024 04:54

Hello Yann,

The link is indeed broken. Please try the following one:-
https://gifyu.com/image/SVUTa

The mesh contains rough 3.9 Million cells and I had to zoom in on its pertinent parts in order to show them in detail. Maybe that is why it seems too coarse.

The checkMesh log file is as follows:-
Code:

/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  v1912                                |
|  \\  /    A nd          | Website:  www.openfoam.com                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
Build  : _f3950763fe-20191219 OPENFOAM=1912
Arch  : "LSB;label=32;scalar=64"
Exec  : checkMesh
Date  : Mar 13 2024
Time  : 17:48:41
Host  : iflw019
PID    : 636569
I/O    : uncollated
Case  : /home/dietmar/OpenFOAM/ShaeqMohd/Gemischbildungsstudie
nProcs : 1
trapFpe: Floating point exception trapping enabled (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

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

Create mesh for time = 0

Time = 0

Mesh stats
    points:          6505619
    faces:            13991168
    internal faces:  11675666
    cells:            3855010
    faces per cell:  6.65805
    boundary patches: 4
    point zones:      0
    face zones:      0
    cell zones:      0

Overall number of cells of each type:
    hexahedra:    2748098
    prisms:        45431
    wedges:        0
    pyramids:      0
    tet wedges:    986
    tetrahedra:    0
    polyhedra:    1060495
    Breakdown of polyhedra by number of faces:
        faces  number of cells
            4  3557
            5  6239
            6  388095
            7  1164
            8  700
            9  490964
          10  1
          11  339
          12  134944
          13  104
          14  133
          15  34047
          18  208

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
            Brennkammer  2055504  2260893  ok (non-closed singly connected)
                Einlass    11256    12072  ok (non-closed singly connected)
            Kanal_aussen    22014    24968  ok (non-closed singly connected)
            Kanal_innen  226728  247126  ok (non-closed singly connected)

Checking faceZone topology for multiply connected surfaces...
    No faceZones found.

Checking basic cellZone addressing...
    No cellZones found.

Checking geometry...
    Overall domain bounding box (-0.0430018 -0.0430018 -0.151102) (0.0430018 0.0430018 0.00700033)
    Mesh has 3 geometric (non-empty/wedge) directions (1 1 1)
    Mesh has 3 solution (non-empty) directions (1 1 1)
    Boundary openness (5.61547e-16 4.19202e-15 4.44711e-15) OK.
    Max cell openness = 3.95484e-16 OK.
    Max aspect ratio = 8.76044 OK.
    Minimum face area = 1.93833e-12. Maximum face area = 2.62082e-05.  Face area magnitudes OK.
    Min volume = 7.39408e-17. Max volume = 1.17969e-07.  Total volume = 0.000832902.  Cell volumes OK.
    Mesh non-orthogonality Max: 57.7185 average: 13.8537
    Non-orthogonality check OK.
    Face pyramids OK.
 ***Max skewness = 6.35198, 46 highly skew faces detected which may impair the quality of the results
  <<Writing 46 skew faces to set skewFaces
    Coupled point location match (average 0) OK.

Failed 1 mesh checks.

End

The snappyHexMeshDict file is as follows:-
Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  v2112                                |
|  \\  /    A nd          | Website:                                        |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    object      snappyHexMeshDict;
}

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

// Which of the steps to run
castellatedMesh true;
snap            true;
addLayers      false;


// Geometry. Definition of all surfaces. All surfaces are of class
// searchableSurface.
// Surfaces are used
// - to specify refinement for any mesh cell intersecting it
// - to specify refinement for any mesh cell inside/outside/near
// - to 'snap' the mesh boundary to the surface
geometry
{
    Geometrie
    {
        type triSurfaceMesh;
        file "Geometrie.stl";
        regions
        {
            Brennkammer    { name Brennkammer;}
            Einlass        { name Einlass;}
            Kanal_aussen  { name Kanal_aussen;}
            Kanal_innen    { name Kanal_innen;}
        }
    }

    Verfeinerungszylinder1
        {
                type      searchableCylinder;
                point1    (0 0 -0.03);
                point2    (0 0 0.07);
                radius    0.0025;
        }

        Verfeinerungszylinder2
        {
                type      searchableCylinder;
                point1    (0 0 0);
                point2    (0 0 -0.02);
                radius    0.043;
        }
};

// Settings for the castellatedMesh generation.
castellatedMeshControls                //sub-dictionary of controls for castellated mesh.
{
        // Refinement parameters
            // ~~~~~~~~~~~~~~~~~~~~~

            // If local number of cells is >= maxLocalCells on any processor
            // switches from from refinement followed by balancing
            // (current method) to (weighted) balancing before refinement.
        maxLocalCells 1000000;

        // Overall cell limit (approximately). Refinement will stop immediately
          // upon reaching this number so a refinement level might not complete.
            // Note that this is the number of cells before removing the part which
            // is not 'visible' from the keepPoint. The final number of cells might
            // actually be a lot less.
        maxGlobalCells 20000000;

        // The surface refinement loop might spend lots of iterations refining just a
            // few cells. This setting will cause refinement to stop if <= minimumRefine
            // are selected for refinement. Note: it will at least do one iteration
            // (unless the number of cells to refine is 0)
        minRefinementCells 10;

        // Allow a certain level of imbalance during refining
            // (since balancing is quite expensive)
            // Expressed as fraction of perfect balance (= overall number of cells /
            // nProcs). 0=balance always.
        maxLoadUnbalance 0.10;

        // Number of buffer layers between different levels.
          // 1 means normal 2:1 refinement restriction, larger means slower
          // refinement.
        nCellsBetweenLevels 1;

    // Explicit feature edge refinement
    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    // Specifies a level for any cell intersected by its edges.
    // This is a featureEdgeMesh, read from constant/triSurface for now.
    features
    (
        {
            file "Geometrie.eMesh";
            level 9;
        }
    );



    // Surface based refinement
    // ~~~~~~~~~~~~~~~~~~~~~~~~

    // Specifies two levels for every surface. The first is the minimum level,
    // every cell intersecting a surface gets refined up to the minimum level.
    // The second level is the maximum level. Cells that 'see' multiple
    // intersections where the intersections make an
    // angle > resolveFeatureAngle get refined up to the maximum level.

    refinementSurfaces
    {
                Geometrie
        {
            level (3 3); // Surface - wise min and max refinement level
            patchInfo
            {
                type wall;
                inGroups (GeometrieGroup);
            }

            regions
                    {
                Einlass        { level (8 8)/*(4 4)*/; patchInfo { type patch;} }
                Kanal_aussen        { level (5 5)/*(6 6)*/; patchInfo { type wall;} }
                Kanal_innen                { level (5 5)/*(6 6)*/; patchInfo { type wall;} }
                    }
                }
    }

    // Resolve sharp angles
        resolveFeatureAngle 30;

        // Region-wise refinement
            // ~~~~~~~~~~~~~~~~~~~~~~

            // Specifies refinement level for cells in relation to a surface. One of
            // three modes
            // - distance. 'levels' specifies per distance to the surface the
            //  wanted refinement level. The distances need to be specified in
            //  descending order.
            // - inside. 'levels' is only one entry and only the level is used. All
            //  cells inside the surface get refined up to the level. The surface
            //  needs to be closed for this to be possible.
            // - outside. Same but cells outside.

    refinementRegions
    {
        Verfeinerungszylinder1
                {
                        mode inside;
                        levels ((1E15 1));
                }

                Verfeinerungszylinder2
                {
                        mode distance;
                        levels ((0.02 3));
                }
    }

    // Mesh selection
    // ~~~~~~~~~~~~~~

    // After refinement patches get added for all refinementSurfaces and
    // all cells intersecting the surfaces get put into these patches. The
    // section reachable from the locationInMesh is kept.
    // NOTE: This point should never be on a face, always inside a cell, even
    // after refinement.
    // This is an outside point locationInMesh (-0.033 -0.033 0.0033);

    locationInMesh (0 0 -0.02);

    /*locationsInMesh
(
    (( 0 0 -0.02) Brennkammer)
    (( 0  0.00199  0.0068) Kanal_aussen)
);*/

    // Whether any faceZones (as specified in the refinementSurfaces)
    // are only on the boundary of corresponding cellZones or also allow
    // free-standing zone faces. Not used if there are no faceZones.
    allowFreeStandingZoneFaces true;
}



// Settings for the snapping.
 snapControls
 {
        nSmoothPatch 3;
        tolerance 2.0;
        nSolveIter 30;
        nRelaxIter 5;
        // Feature snapping
                nFeatureSnapIter 10;
                // - Detect ( geometric only ) features by sampling the surface
                // ( default = false ).
                implicitFeatureSnap false ;
                // - Use castellatedMeshControls :: features ( default = true )
                explicitFeatureSnap true ;
                // - Detect points on multiple surfaces ( only for explicitFeatureSnap )
                        multiRegionFeatureSnap true ;
 }

addLayersControls
{
    // Are the thickness parameters below relative to the undistorted
    // size of the refined cell outside layer (true) or absolute sizes (false).
    relativeSizes true;

    // Per final patch (so not geometry!) the layer information
    layers
    {
        Geometrie
        {
            nSurfaceLayers 3;
        }
    }

    // Expansion factor for layer mesh
    expansionRatio 1.0;

    // Wanted thickness of final added cell layer. If multiple layers
    // is the thickness of the layer furthest away from the wall.
    // Relative to undistorted size of cell outside layer.
    // See relativeSizes parameter.
    finalLayerThickness 0.3;

    // Minimum thickness of cell layer. If for any reason layer
    // cannot be above minThickness do not add layer.
    // Relative to undistorted size of cell outside layer.
    minThickness 0.1;

    // If points get not extruded do nGrow layers of connected faces that are
    // also not grown. This helps convergence of the layer addition process
    // close to features.
    // Note: changed(corrected) w.r.t 1.7.x! (didn't do anything in 1.7.x)
    nGrow 0;

    // Advanced settings

    // When not to extrude surface. 0 is flat surface, 90 is when two faces
    // are perpendicular
    featureAngle 60;

    // At non-patched sides allow mesh to slip if extrusion direction makes
    // angle larger than slipFeatureAngle.
    slipFeatureAngle 30;

    // Maximum number of snapping relaxation iterations. Should stop
    // before upon reaching a correct mesh.
    nRelaxIter 3;

    // Number of smoothing iterations of surface normals
    nSmoothSurfaceNormals 1;

    // Number of smoothing iterations of interior mesh movement direction
    nSmoothNormals 3;

    // Smooth layer thickness over surface patches
    nSmoothThickness 10;

    // Stop layer growth on highly warped cells
    maxFaceThicknessRatio 0.5;

    // Reduce layer growth where ratio thickness to medial
    // distance is large
    maxThicknessToMedialRatio 0.3;

    // Angle used to pick up medial axis points
    // Note: changed(corrected) w.r.t 1.7.x! 90 degrees corresponds to 130
    // in 1.7.x.
    minMedialAxisAngle 90;


    // Create buffer region for new layer terminations
    nBufferCellsNoExtrude 0;


    // Overall max number of layer addition iterations. The mesher will exit
    // if it reaches this number of iterations; possibly with an illegal
    // mesh.
    nLayerIter 50;
}

// Generic mesh quality settings. At any undoable phase these determine
// where to undo.

 meshQualityControls
{
    #include "meshQualityDict"


    // Advanced

    //- Number of error distribution iterations
    nSmoothScale 4;
    //- Amount to scale back displacement at error points
    errorReduction 0.75;

}

// Write flags
writeFlags
(
    scalarLevels
    layerSets
    layerFields    // write volScalarField for layer coverage
);


// Merge tolerance. Is fraction of overall bounding box of initial mesh.
// Note: the write tolerance needs to be higher than this.
mergeTolerance 1e-6;

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

Kind regards,
Mohd Shaeq

Yann April 2, 2024 05:16

Thanks for the link.
What behavior are you expecting?

Your animation plots the pressure, it looks OK to me (high pressure in the injector and pressure dropping in the chamber)

I would probably be more interesting to look at the velocity if you want to see if the fluid is flowing inside the chamber.

Yann

MohdShaeq April 3, 2024 10:32

1 Attachment(s)
Thank you very much for your kind suggestion, Yann. I had made a visualisation error as the velocity flow indeed can be clearly visualised in ParaView by modifying the colour properties, which I had not done earlier:-
https://gifyu.com/image/SVfQG

There remains, however, one problem: no flow of fuel (H2-Gas) is visible neither in the injector nor in the combustion chamber, as can be seen in the screenshot attached herewith. Can you please tell me why is this so?

Kind regards,
Mohd Shaeq

Yann April 3, 2024 11:13

You mentioned running rhoPimpleFoam, which does not support multi-species simulation, as far as I know.

You should probably use something like rhoReactingFoam for this. (you can use it without reactions if you are just interested in the species transport)

MohdShaeq April 3, 2024 15:52

Hi Yann,

Thank you for confirming what I already feared! I also came to the same conclusion that rhoPimpleFoam does not support multi-species simulation by monitoring the simulation run as there were no calculations for H2 to be seen. But it was too late when I observed it.

I have tried running rhoReactingFoam but I get the following error in the second timestep:-
Code:

/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  v1912                                |
|  \\  /    A nd          | Website:  www.openfoam.com                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
Build  : _f3950763fe-20191219 OPENFOAM=1912
Arch  : "LSB;label=32;scalar=64"
Exec  : rhoReactingFoam -parallel
Date  : Apr 03 2024
Time  : 20:19:57
Host  : iflw019
PID    : 1256061
I/O    : uncollated
Case  : /home/dietmar/OpenFOAM/ShaeqMohd/Einspritzungsstudie
nProcs : 10
Hosts  :
(
    (iflw019 10)
)
Pstream initialized with:
    floatTransfer      : 0
    nProcsSimpleSum    : 0
    commsType          : nonBlocking
    polling iterations : 0
trapFpe: Floating point exception trapping enabled (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

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

Create mesh for time = 0


PIMPLE: Operating solver in PISO mode

Reading thermophysical properties

Selecting thermodynamics package
{
    type            heRhoThermo;
    mixture        reactingMixture;
    transport      sutherland;
    thermo          janaf;
    energy          sensibleEnthalpy;
    equationOfState perfectGas;
    specie          specie;
}

Selecting chemistryReader foamChemistryReader
    elements not defined in "/home/dietmar/OpenFOAM/ShaeqMohd/Einspritzungsstudie/constant/reactions"
Reading field U

Reading/calculating face flux field phi

Creating turbulence model.

Selecting turbulence model type RAS
Selecting RAS turbulence model kEpsilon
bounding k, min: 0 max: 0.0458 average: 0
RAS
{
    RASModel        kEpsilon;
    turbulence      on;
    printCoeffs    on;
    Cmu            0.09;
    C1              1.44;
    C2              1.92;
    C3              0;
    sigmak          1;
    sigmaEps        1.3;
}

Creating reaction model

Selecting combustion model none
Creating field dpdt

Creating field kinetic energy K

No MRF models present

No finite volume options present
Courant Number mean: 0 max: 0

Starting time loop

particleDistribution distribtion1 output:
    Processing cloud : sprayCloud

Courant Number mean: 0 max: 0
Time = 1e-07

diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
PIMPLE: iteration 1
DILUPBiCGStab:  Solving for Ux, Initial residual = 1, Final residual = 4.51067e-07, No Iterations 1
DILUPBiCGStab:  Solving for Uy, Initial residual = 1, Final residual = 8.40638e-07, No Iterations 1
DILUPBiCGStab:  Solving for Uz, Initial residual = 1, Final residual = 5.05026e-07, No Iterations 1
DILUPBiCGStab:  Solving for O2, Initial residual = 0.993761, Final residual = 4.97118e-07, No Iterations 1
DILUPBiCGStab:  Solving for H2O, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCGStab:  Solving for H2, Initial residual = 1, Final residual = 5.00239e-07, No Iterations 1
DILUPBiCGStab:  Solving for h, Initial residual = 1, Final residual = 6.90761e-07, No Iterations 1
min/max(T) = 298.15, 298.15
DICPCG:  Solving for p, Initial residual = 1, Final residual = 0.0489353, No Iterations 2
DICPCG:  Solving for p, Initial residual = 2.56177e-06, Final residual = 3.54644e-07, No Iterations 1
DICPCG:  Solving for p, Initial residual = 6.2492e-07, Final residual = 6.2492e-07, No Iterations 0
DICPCG:  Solving for p, Initial residual = 6.2492e-07, Final residual = 6.2492e-07, No Iterations 0
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 1.22265e-06, global = 1.22265e-06, cumulative = 1.22265e-06
DICPCG:  Solving for p, Initial residual = 0.000112727, Final residual = 3.64528e-06, No Iterations 2
DICPCG:  Solving for p, Initial residual = 3.99077e-06, Final residual = 5.18753e-07, No Iterations 3
DICPCG:  Solving for p, Initial residual = 1.64579e-06, Final residual = 2.26159e-07, No Iterations 1
DICPCG:  Solving for p, Initial residual = 8.93327e-07, Final residual = 8.93327e-07, No Iterations 0
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 1.12406e-06, global = 8.22167e-07, cumulative = 2.04482e-06
DICPCG:  Solving for p, Initial residual = 1.72786e-05, Final residual = 1.05742e-06, No Iterations 2
DICPCG:  Solving for p, Initial residual = 1.72785e-06, Final residual = 4.21711e-07, No Iterations 1
DICPCG:  Solving for p, Initial residual = 8.6281e-07, Final residual = 8.6281e-07, No Iterations 0
DICPCG:  Solving for p, Initial residual = 8.6281e-07, Final residual = 8.6281e-07, No Iterations 0
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 5.90021e-07, global = 3.48742e-07, cumulative = 2.39356e-06
DILUPBiCGStab:  Solving for epsilon, Initial residual = 1, Final residual = 1.13899e-15, No Iterations 1
bounding epsilon, min: 2.475e-20 max: 220963 average: 29.3073
DILUPBiCGStab:  Solving for k, Initial residual = 0.999652, Final residual = 5.32066e-08, No Iterations 2
bounding k, min: 6.49311e-16 max: 112456 average: 182.231
ExecutionTime = 63.43 s  ClockTime = 127 s

Courant Number mean: 1.12333e-06 max: 10.9988
Time = 2e-07

diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
PIMPLE: iteration 1
DILUPBiCGStab:  Solving for Ux, Initial residual = 0.668659, Final residual = 1.25734e-07, No Iterations 301
DILUPBiCGStab:  Solving for Uy, Initial residual = 0.667132, Final residual = 9.51439e-07, No Iterations 275
DILUPBiCGStab:  Solving for Uz, Initial residual = 0.752059, Final residual = 7.60091e-07, No Iterations 76
DILUPBiCGStab:  Solving for O2, Initial residual = 0.680986, Final residual = 3.61411e-07, No Iterations 211
DILUPBiCGStab:  Solving for H2O, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCGStab:  Solving for H2, Initial residual = 0.680986, Final residual = 6.29148e-07, No Iterations 209
DILUPBiCGStab:  Solving for h, Initial residual = 0.953173, Final residual = 4.3573e-05, No Iterations 1000
min/max(T) = 200, 298.15
DICPCG:  Solving for p, Initial residual = 0.000414595, Final residual = 1.23485e-08, No Iterations 1
DICPCG:  Solving for p, Initial residual = 4.57646e-08, Final residual = 4.57646e-08, No Iterations 0
DICPCG:  Solving for p, Initial residual = 4.57646e-08, Final residual = 4.57646e-08, No Iterations 0
DICPCG:  Solving for p, Initial residual = 4.57646e-08, Final residual = 4.57646e-08, No Iterations 0
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 2.17263e-05, global = -2.07222e-05, cumulative = -1.83287e-05
DICPCG:  Solving for p, Initial residual = 0.00855203, Final residual = 4.26331e-08, No Iterations 1
DICPCG:  Solving for p, Initial residual = 3.18927e-09, Final residual = 3.18927e-09, No Iterations 0
DICPCG:  Solving for p, Initial residual = 3.18927e-09, Final residual = 3.18927e-09, No Iterations 0
DICPCG:  Solving for p, Initial residual = 3.18927e-09, Final residual = 3.18927e-09, No Iterations 0
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 0.000806723, global = -0.000806288, cumulative = -0.000824617
DICPCG:  Solving for p, Initial residual = 0.00317432, Final residual = 1.45401e-08, No Iterations 1
DICPCG:  Solving for p, Initial residual = 2.51358e-09, Final residual = 2.51358e-09, No Iterations 0
DICPCG:  Solving for p, Initial residual = 2.51358e-09, Final residual = 2.51358e-09, No Iterations 0
DICPCG:  Solving for p, Initial residual = 2.51358e-09, Final residual = 2.51358e-09, No Iterations 0
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 0.0657327, global = -0.0657292, cumulative = -0.0665538
[6] #0  [5] #0  Foam::error::printStack(Foam::Ostream&)Foam::error::printStack(Foam::Ostream&) at ??:?
[6] #1  Foam::sigFpe::sigHandler(int) at ??:?
[5] #1  Foam::sigFpe::sigHandler(int) at ??:?
[6] #2  ? at ??:?
[5] #2  ? in /lib64/libc.so.6
[6] #3  Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) at ??:?
[6] #4  in /lib64/libc.so.6
[5] #3  Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&)void Foam::divide<Foam::fvsPatchField, Foam::surfaceMesh>(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&) at ??:?
[5] #4  at ??:?
[6] #5  void Foam::divide<Foam::fvsPatchField, Foam::surfaceMesh>(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&) at ??:?
[5] #5  Foam::tmp<Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> > Foam::operator/<Foam::fvsPatchField, Foam::surfaceMesh>(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::tmp<Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> > const&) at ??:?
[6] #6  Foam::compressibleTurbulenceModel::phi() constFoam::tmp<Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> > Foam::operator/<Foam::fvsPatchField, Foam::surfaceMesh>(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::tmp<Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> > const&) at ??:?
[6] #7  Foam::RASModels::kEpsilon<Foam::EddyDiffusivity<Foam::ThermalDiffusivity<Foam::CompressibleTurbulenceModel<Foam::fluidThermo> > > >::correct() at ??:?
[5] #6  Foam::compressibleTurbulenceModel::phi() const at ??:?
[6] #8  at ??:?
[5] #7  Foam::RASModels::kEpsilon<Foam::EddyDiffusivity<Foam::ThermalDiffusivity<Foam::CompressibleTurbulenceModel<Foam::fluidThermo> > > >::correct() at ??:?
[5] #8  ?? at ??:?
[6] #9  __libc_start_main at ??:?
[5] #9  __libc_start_main in /lib64/libc.so.6
[5] #10  in /lib64/libc.so.6
[6] #10  ?? at ??:?
[iflw019:1256066:0:1256066] Caught signal 8 (Floating point exception: tkill(2) or tgkill(2))
==== backtrace (tid:1256066) ====
 0  /lib64/libucs.so.0(ucs_handle_error+0x2dc) [0x7f754bd84e4c]
 1  /lib64/libucs.so.0(+0x2c02c) [0x7f754bd8502c]
 2  /lib64/libucs.so.0(+0x2c2da) [0x7f754bd852da]
 3  /lib64/libc.so.6(gsignal+0x10f) [0x7f7568cebacf]
 4  /opt/OpenFOAM/OpenFOAM-v1912/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so(_ZN4Foam6divideERNS_5FieldIdEERKNS_5UListIdEES6_+0xbc) [0x7f756a36f2dc]
 5  rhoReactingFoam(_ZN4Foam6divideINS_13fvsPatchFieldENS_11surfaceMeshEEEvRNS_14GeometricFieldIdT_T0_EERKS6_S9_+0x3f) [0x45a13f]
 6  rhoReactingFoam(_ZN4FoamdvINS_13fvsPatchFieldENS_11surfaceMeshEEENS_3tmpINS_14GeometricFieldIdT_T0_EEEERKS7_RKS8_+0x1e4) [0x498274]
 7  /opt/OpenFOAM/OpenFOAM-v1912/platforms/linux64GccDPInt32Opt/lib/libcompressibleTurbulenceModels.so(_ZNK4Foam27compressibleTurbulenceModel3phiEv+0x2c5) [0x7f756ddc0a35]
 8  /opt/OpenFOAM/OpenFOAM-v1912/platforms/linux64GccDPInt32Opt/lib/libcompressibleTurbulenceModels.so(_ZN4Foam9RASModels8kEpsilonINS_15EddyDiffusivityINS_18ThermalDiffusivityINS_27CompressibleTurbulenceModelINS_11fluidThermoEEEEEEEE7correctEv+0x6f) [0x7f756dede9ff]
 9  rhoReactingFoam() [0x43759a]
10  /lib64/libc.so.6(__libc_start_main+0xe5) [0x7f7568cd7d85]
11  rhoReactingFoam() [0x439e4e]
=================================
[iflw019:1256066] *** Process received signal ***
[iflw019:1256066] Signal: Floating point exception (8)
[iflw019:1256066] Signal code:  (-6)
[iflw019:1256066] Failing at address: 0x3e800132a82
[iflw019:1256066] [ 0] /lib64/libc.so.6(+0x4eb50)[0x7f7568cebb50]
[iflw019:1256066] [ 1] /lib64/libc.so.6(gsignal+0x10f)[0x7f7568cebacf]
[iflw019:1256066] [ 2] /lib64/libc.so.6(+0x4eb50)[0x7f7568cebb50]
[iflw019:1256066] [ 3] /opt/OpenFOAM/OpenFOAM-v1912/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so(_ZN4Foam6divideERNS_5FieldIdEERKNS_5UListIdEES6_+0xbc)[0x7f756a36f2dc]
[iflw019:1256066] [ 4] rhoReactingFoam(_ZN4Foam6divideINS_13fvsPatchFieldENS_11surfaceMeshEEEvRNS_14GeometricFieldIdT_T0_EERKS6_S9_+0x3f)[0x45a13f]
[iflw019:1256066] [ 5] rhoReactingFoam(_ZN4FoamdvINS_13fvsPatchFieldENS_11surfaceMeshEEENS_3tmpINS_14GeometricFieldIdT_T0_EEEERKS7_RKS8_+0x1e4)[0x498274]
[iflw019:1256066] [ 6] /opt/OpenFOAM/OpenFOAM-v1912/platforms/linux64GccDPInt32Opt/lib/libcompressibleTurbulenceModels.so(_ZNK4Foam27compressibleTurbulenceModel3phiEv+0x2c5)[0x7f756ddc0a35]
[iflw019:1256066] [ 7] /opt/OpenFOAM/OpenFOAM-v1912/platforms/linux64GccDPInt32Opt/lib/libcompressibleTurbulenceModels.so(_ZN4Foam9RASModels8kEpsilonINS_15EddyDiffusivityINS_18ThermalDiffusivityINS_27CompressibleTurbulenceModelINS_11fluidThermoEEEEEEEE7correctEv+0x6f)[0x7f756dede9ff]
[iflw019:1256066] [ 8] rhoReactingFoam[0x43759a]
[iflw019:1256066] [ 9] /lib64/libc.so.6(__libc_start_main+0xe5)[0x7f7568cd7d85]
[iflw019:1256066] [10] rhoReactingFoam[0x439e4e]
[iflw019:1256066] *** End of error message ***
 at ??:?
[iflw019:1256067:0:1256067] Caught signal 8 (Floating point exception: tkill(2) or tgkill(2))
==== backtrace (tid:1256067) ====
 0  /lib64/libucs.so.0(ucs_handle_error+0x2dc) [0x7facdf583e4c]
 1  /lib64/libucs.so.0(+0x2c02c) [0x7facdf58402c]
 2  /lib64/libucs.so.0(+0x2c2da) [0x7facdf5842da]
 3  /lib64/libc.so.6(gsignal+0x10f) [0x7facfc654acf]
 4  /opt/OpenFOAM/OpenFOAM-v1912/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so(_ZN4Foam6divideERNS_5FieldIdEERKNS_5UListIdEES6_+0xbc) [0x7facfdcd82dc]
 5  rhoReactingFoam(_ZN4Foam6divideINS_13fvsPatchFieldENS_11surfaceMeshEEEvRNS_14GeometricFieldIdT_T0_EERKS6_S9_+0x3f) [0x45a13f]
 6  rhoReactingFoam(_ZN4FoamdvINS_13fvsPatchFieldENS_11surfaceMeshEEENS_3tmpINS_14GeometricFieldIdT_T0_EEEERKS7_RKS8_+0x1e4) [0x498274]
 7  /opt/OpenFOAM/OpenFOAM-v1912/platforms/linux64GccDPInt32Opt/lib/libcompressibleTurbulenceModels.so(_ZNK4Foam27compressibleTurbulenceModel3phiEv+0x2c5) [0x7fad01729a35]
 8  /opt/OpenFOAM/OpenFOAM-v1912/platforms/linux64GccDPInt32Opt/lib/libcompressibleTurbulenceModels.so(_ZN4Foam9RASModels8kEpsilonINS_15EddyDiffusivityINS_18ThermalDiffusivityINS_27CompressibleTurbulenceModelINS_11fluidThermoEEEEEEEE7correctEv+0x6f) [0x7fad018479ff]
 9  rhoReactingFoam() [0x43759a]
10  /lib64/libc.so.6(__libc_start_main+0xe5) [0x7facfc640d85]
11  rhoReactingFoam() [0x439e4e]
=================================
[iflw019:1256067] *** Process received signal ***
[iflw019:1256067] Signal: Floating point exception (8)
[iflw019:1256067] Signal code:  (-6)
[iflw019:1256067] Failing at address: 0x3e800132a83
[iflw019:1256067] [ 0] /lib64/libc.so.6(+0x4eb50)[0x7facfc654b50]
[iflw019:1256067] [ 1] /lib64/libc.so.6(gsignal+0x10f)[0x7facfc654acf]
[iflw019:1256067] [ 2] /lib64/libc.so.6(+0x4eb50)[0x7facfc654b50]
[iflw019:1256067] [ 3] /opt/OpenFOAM/OpenFOAM-v1912/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so(_ZN4Foam6divideERNS_5FieldIdEERKNS_5UListIdEES6_+0xbc)[0x7facfdcd82dc]
[iflw019:1256067] [ 4] rhoReactingFoam(_ZN4Foam6divideINS_13fvsPatchFieldENS_11surfaceMeshEEEvRNS_14GeometricFieldIdT_T0_EERKS6_S9_+0x3f)[0x45a13f]
[iflw019:1256067] [ 5] rhoReactingFoam(_ZN4FoamdvINS_13fvsPatchFieldENS_11surfaceMeshEEENS_3tmpINS_14GeometricFieldIdT_T0_EEEERKS7_RKS8_+0x1e4)[0x498274]
[iflw019:1256067] [ 6] /opt/OpenFOAM/OpenFOAM-v1912/platforms/linux64GccDPInt32Opt/lib/libcompressibleTurbulenceModels.so(_ZNK4Foam27compressibleTurbulenceModel3phiEv+0x2c5)[0x7fad01729a35]
[iflw019:1256067] [ 7] /opt/OpenFOAM/OpenFOAM-v1912/platforms/linux64GccDPInt32Opt/lib/libcompressibleTurbulenceModels.so(_ZN4Foam9RASModels8kEpsilonINS_15EddyDiffusivityINS_18ThermalDiffusivityINS_27CompressibleTurbulenceModelINS_11fluidThermoEEEEEEEE7correctEv+0x6f)[0x7fad018479ff]
[iflw019:1256067] [ 8] rhoReactingFoam[0x43759a]
[iflw019:1256067] [ 9] /lib64/libc.so.6(__libc_start_main+0xe5)[0x7facfc640d85]
[iflw019:1256067] [10] rhoReactingFoam[0x439e4e]
[iflw019:1256067] *** End of error message ***
--------------------------------------------------------------------------
Primary job  terminated normally, but 1 process returned
a non-zero exit code. Per user-direction, the job has been aborted.
--------------------------------------------------------------------------
--------------------------------------------------------------------------
mpirun noticed that process rank 6 with PID 0 on node iflw019 exited on signal 8 (Floating point exception).

The only thing I can understand from this error is that there is a computational error involved, but I think the boundary conditions are fine.

Moreover, as mentioned in post #5 of this thread, I will run another simulation, this time with liquid H2 using sprayFoam. In order to compare the two injection processes, I would like to compare the vapour penetration length in the first case (with gaseous H2) with the penetration length for the second case (with liquid H2).

With regard to this, which solver should I use? Is it possible to obtain vapour penetration length with sprayFoam just like liquid penetration length.

I really appreciate your willingness to help me and taking time out in doing so.

Kind regards,
Mohd Shaeq


All times are GMT -4. The time now is 07:13.