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

rhoPimpleFoam Error: cannot be called for a calculatedFvPatchField on patch

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   November 23, 2023, 17:04
Default rhoPimpleFoam Error: cannot be called for a calculatedFvPatchField on patch
  #1
Member
 
Mohd Shaeq
Join Date: Aug 2023
Location: Leinfelden-Echterdingen
Posts: 30
Rep Power: 2
MohdShaeq is on a distinguished road
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
MohdShaeq is offline   Reply With Quote

 


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
Problem with cyclic boundaries in Openfoam 1.5 fs82 OpenFOAM 36 January 7, 2015 00:31
[GAMBIT] periodic faces not matching Aadhavan ANSYS Meshing & Geometry 6 August 31, 2013 11:25
Cyclic Boundary Condition Luiz Eduardo Bittencourt Sampaio (Sampaio) OpenFOAM Running, Solving & CFD 36 July 2, 2012 12:23
[mesh manipulation] Using createPatch in place of couplePatches sripplinger OpenFOAM Meshing & Mesh Conversion 8 November 13, 2009 07:14
reconstructParMesh not working with an axisymetric case francesco OpenFOAM Bugs 4 May 8, 2009 05:49


All times are GMT -4. The time now is 00:54.