|
[Sponsors] |
"Temperature out of range" Problem with reactingFoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 30, 2020, 18:17 |
"Temperature out of range" Problem with reactingFoam
|
#1 |
New Member
Berk
Join Date: Jul 2018
Location: Germany
Posts: 8
Rep Power: 8 |
Dear Foamers,
I'm trying to simulate three-component gas mixture (single phase, no reaction, no combustion) through a very simple 90-degree bended pipe (one inlet, one outlet, and wall_shroud & wall_hub as walls; see the attached screenshot) with reactingFoam. My gases are H2, N2 and H2O. The boundary conditions are given in the ANSYS CFX like this: • Total Pressure @inlet as 250000 Pa and Mass flow rate @outlet as 0.025 kg/s • Mass fraction of H2 is given as 0.0886 • Mass fraction of H2O is given as 0.1726 • Mass fraction of N2 is given as 0.7388 • Inlet Temperature: 353.15 K When I try to run my case with reactingFoam, it crashes after some iterations with the error "temperature out of range" (with maxCo 30 adjustment): > FOAM Warning : From function Foam::scalar Foam::janafThermo<EquationOfState>::limit(Foam::sc alar) const [with EquationOfState = Foam:erfectGas<Foam::specie>; Foam::scalar = double] in file /home/altinel/OpenFOAM/OpenFOAM-8/src/thermophysicalModels/specie/lnInclude/janafThermoI.H at line 117 attempt to use janafThermo<EquationOfState> out of temperature range 200 -> 3500; T = -538.69056 --> FOAM Warning : From function Foam::scalar Foam::janafThermo<EquationOfState>::limit(Foam::sc alar) const [with EquationOfState = Foam:erfectGas<Foam::specie>; Foam::scalar = double] in file /home/altinel/OpenFOAM/OpenFOAM-8/src/thermophysicalModels/specie/lnInclude/janafThermoI.H at line 117 attempt to use janafThermo<EquationOfState> out of temperature range 200 -> 3500; T = 194.86902 --> FOAM Warning : From function Foam::scalar Foam::janafThermo<EquationOfState>::limit(Foam::sc alar) const [with EquationOfState = Foam:erfectGas<Foam::specie>; Foam::scalar = double] in file /home/altinel/OpenFOAM/OpenFOAM-8/src/thermophysicalModels/specie/lnInclude/janafThermoI.H at line 117 attempt to use janafThermo<EquationOfState> out of temperature range 200 -> 3500; T = 192.82848 --> FOAM Warning : From function Foam::scalar Foam::janafThermo<EquationOfState>::limit(Foam::sc alar) const [with EquationOfState = Foam:erfectGas<Foam::specie>; Foam::scalar = double] in file /home/altinel/OpenFOAM/OpenFOAM-8/src/thermophysicalModels/specie/lnInclude/janafThermoI.H at line 117 Here is my setup in 0/ folder --> p: Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 8 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -2 0 0 0 0]; internalField uniform 2.5e5; boundaryField { inlet { type fixedValue; value uniform 250000; } outlet { type zeroGradient; } wall_hub { type zeroGradient; } wall_shroud { type zeroGradient; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 8 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volVectorField; location "0"; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { inlet { type zeroGradient; } outlet { type flowRateOutletVelocity; massFlowRate constant 0.025; // kg/s rhoOutlet 0.52; } wall_hub { type fixedValue; value uniform (0 0 0); } wall_shroud { type fixedValue; value uniform (0 0 0); } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 8 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object T; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 1 0 0 0]; internalField uniform 353.15; boundaryField { inlet { type fixedValue; value uniform 353.15; } outlet { //type zeroGradient; type inletOutlet; inletValue uniform 353.15; value uniform 353.15; //value $internalField; //inletValue $internalField; } wall_hub { type zeroGradient; } wall_shroud { type zeroGradient; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 8 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object H2; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 0 0 0 0]; internalField uniform 0.0886; boundaryField { inlet { type fixedValue; value uniform 0.0886; } outlet { type inletOutlet; inletValue uniform 0.0886; value uniform 0.0886; } wall_hub { type zeroGradient; } wall_shroud { type zeroGradient; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 8 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object H2O; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 0 0 0 0]; internalField uniform 0.1726; boundaryField { inlet { type fixedValue; value uniform 0.1726; } outlet { type inletOutlet; inletValue uniform 0.1726; value uniform 0.1726; } wall_hub { type zeroGradient; } wall_shroud { type zeroGradient; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 8 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object N2; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 0 0 0 0]; internalField uniform 0.7388; boundaryField { inlet { type fixedValue; value uniform 0.7388; } outlet { type inletOutlet; inletValue uniform 0.7388; value uniform 0.7388; } wall_hub { type zeroGradient; } wall_shroud { type zeroGradient; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 8 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object Ydefault; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 0 0 0 0]; internalField uniform 0; boundaryField { inlet { type fixedValue; value $internalField; } outlet { type inletOutlet; inletValue $internalField; value $internalField; } wall_hub { type zeroGradient; } wall_shroud { type zeroGradient; } } // ************************************************************************* // My constant/ folder --> thermophysicalProperties: Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 8 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "constant"; object thermophysicalProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // thermoType { type hePsiThermo; //type heRhoThermo; mixture multiComponentMixture; //transport const; transport sutherland; //thermo hConst; thermo janaf; //energy sensibleEnthalpy; energy sensibleInternalEnergy; equationOfState perfectGas; specie specie; } inertSpecie H2; inertSpecie N2; inertSpecie H2O; #include "thermo.compressibleGas" // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 8 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "constant"; object thermo.compressibleGas; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // species ( N2 H2 H2O ); N2 { specie { molWeight 28.0134; } thermodynamics { Tlow 200; Thigh 5000; Tcommon 1000; highCpCoeffs ( 2.92664 0.00148798 -5.68476e-07 1.0097e-10 -6.75335e-15 -922.798 5.98053 ); lowCpCoeffs ( 3.29868 0.00140824 -3.96322e-06 5.64152e-09 -2.44486e-12 -1020.9 3.95037 ); } transport { As 1.67212e-06; Ts 170.672; } } H2 { specie { molWeight 2.01594; } thermodynamics { Tlow 200; Thigh 3500; Tcommon 1000; highCpCoeffs ( 3.3372792 -4.94024731e-05 4.99456778e-07 -1.79566394e-10 2.00255376e-14 -950.158922 -3.20502331); lowCpCoeffs ( 2.34433112 0.00798052075 -1.9478151e-05 2.01572094e-08 -7.37611761e-12 -917.935173 0.683010238); } transport { As 6.362e-07; Ts 72; } } H2O { specie { molWeight 18.01534; } thermodynamics { Tlow 200; Thigh 3500; Tcommon 1000; highCpCoeffs ( 3.03399249 0.00217691804 -1.64072518e-07 -9.7041987e-11 1.68200992e-14 -30004.2971 4.9667701 ); lowCpCoeffs ( 4.19864056 -0.0020364341 6.52040211e-06 -5.48797062e-09 1.77197817e-12 -30293.7267 -0.849032208 ); } transport { As 1.512e-06; Ts 120; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 8 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "constant"; object combustionProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // combustionModel none; // ************************************************************************* // my system/ folder --> fvSchemes: Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 8 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object fvSchemes; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // //gasmixture ddtSchemes { default Euler; } gradSchemes { default cellLimited Gauss linear 1; grad(U) cellLimited Gauss linear 1; } divSchemes { default none; div(phi,U) Gauss linearUpwind default; div(phi,Yi_h) Gauss limitedLinear 1; div(phid,p) Gauss limitedLinear 1; div(phiv,p) Gauss limitedLinear 1; div(phi,K) Gauss linear; div(phi,e) Gauss linear; div(phi,k) bounded Gauss upwind default; div(phi,epsilon) bounded Gauss upwind default; div(phi,omega) bounded Gauss upwind default; div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear 1; } laplacianSchemes { default Gauss linear limited 1; } interpolationSchemes { default linear; } snGradSchemes { default limited 1; } fluxRequired { default no; p ; } wallDist { method Poisson; } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 8 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object fvSolution; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // solvers { p { solver PCG; preconditioner DIC; tolerance 1e-06; relTol 0; } pFinal { solver PCG; preconditioner DIC; tolerance 1e-06; relTol 0; minIter 3; } "U.*" { solver PBiCGStab; preconditioner DILU; tolerance 1e-06; relTol 0; minIter 3; } "e.*" { solver PBiCGStab; preconditioner DILU; tolerance 1e-6; relTol 0.01; minIter 3; } "rho.*" { solver diagonal; } "omega.*" { solver PBiCGStab; preconditioner DILU; tolerance 1e-06; relTol 0.01; minIter 3; } "k.*" { solver PBiCGStab; preconditioner DILU; tolerance 1e-06; relTol 0.01; minIter 3; } //For Poisson wallDist method yPsi { solver PCG; preconditioner DIC; tolerance 1e-06; relTol 0; minIter 2; } "Yi.*" { $eFinal } } PIMPLE { momentumPredictor yes; //yes(D) consistent yes; nOuterCorrectors 2; nCorrectors 3; nNonOrthogonalCorrectors 1; pRefCell 0; pRefValue 0; residualControl { p 1e-6; U 1e-6; "(k|omega)" 1e-6; } } relaxationFactors { fields { ".*" 0.9; // ensure diagonal equality p 1; } equations { ".*" 0.9; // ensure diagonal equality p 1; //T 0.7; } } // ************************************************************************* // I've already checked my mesh and it seems to be okay. I've also refined my mesh and tried again, but it still crashes. Then I've downgraded my case as laminar flow and unfortunately i do get the same error with the temperature out of range… Optionally, I can add fvOptions to fix my temperature range but then I get very unrealistic results… My case can be downloaded from here:*https://drive.google.com/file/d/1zS6...ew?usp=sharing Any help is appreciated! Thank you very much and best regards altinel |
|
December 1, 2020, 06:13 |
|
#3 |
New Member
Berk
Join Date: Jul 2018
Location: Germany
Posts: 8
Rep Power: 8 |
Hello Domenico,
Thank you very much for your quick reply! Now, I've changed the settings of the shared file. You should have an access now. best regards altinel |
|
December 1, 2020, 06:22 |
|
#4 |
Senior Member
|
Suggest to insert limitU and limitT (as suggested by others in this forum earlier).
* limit temperature (https://www.openfoam.com/documentati...mperature.html), (especially this on) and velocity (https://www.openfoam.com/documentati...-velocity.html) using settings in fvOptions dictionary; |
|
December 2, 2020, 09:52 |
|
#5 |
New Member
Berk
Join Date: Jul 2018
Location: Germany
Posts: 8
Rep Power: 8 |
Hello Domenico,
Thank you for the suggestion... I've already checked the former threads regarding the temperature problem with reactingFoam like here: having trouble using reactingFoam with reactions turned off , Bug in energy equation of reactingFoam (openfoam 6) Now, I've inserted limitT and limitU in the fvOptions as shown below: Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 8 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object fvOptions; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // limitTemperature { type limitTemperature; active true; limitTemperatureCoeffs { selectionMode all; min 350; max 355; //phase gas; // optional } } limitU { type limitVelocity; active yes; selectionMode all; max 200; } // ************************************************************************* // But with this fvOptions-settings I'm getting very unrealistic results... I've attached the calculated velocity profile (laminar flow) with reactingFoam using LTS (after 300 Iterations). What I also don't understand is… why is the temperature going crazy without any reactions/combustion… best regards altinel |
|
April 23, 2023, 06:55 |
|
#6 |
New Member
xinyu
Join Date: Apr 2022
Posts: 24
Rep Power: 4 |
hello,altinel
Have you solved your problem? I encountered the same problem (FOAM Warning), and I checked my mesh and boundary conditions, and they are fine. I tried to modify fvsolution and used limitTemperature, but unfortunately it didn't work. Do you have any ideas? |
|
December 28, 2023, 13:53 |
|
#7 |
New Member
He Shang
Join Date: Nov 2023
Posts: 6
Rep Power: 3 |
I also encounter the same problem with rhoPimpleFoam ... help~
|
|
Tags |
reactingfoam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Is COMSOL Multi Physics is suitable to solve complex flow problem? | steve lee | COMSOL | 8 | January 5, 2023 03:31 |
Mesh& steptime independant: conduction-convection problem | Fati1 | Main CFD Forum | 1 | October 28, 2018 14:52 |
Gambit - meshing over airfoil wrapping (?) problem | JFDC | FLUENT | 1 | July 11, 2011 06:59 |
natural convection problem for a CHT problem | Se-Hee | CFX | 2 | June 10, 2007 07:29 |
Adiabatic and Rotating wall (Convection problem) | ParodDav | CFX | 5 | April 29, 2007 20:13 |