|
[Sponsors] |
January 11, 2020, 13:40 |
reactingFoam crashes with no iterations
|
#1 |
New Member
Gazi Yavuz
Join Date: Apr 2018
Posts: 17
Rep Power: 8 |
Dear Foamers,
I have been using OpenFOAM for about 2 years (I have OF version 7 installed in Ubuntu 16.). I normally use classical N-S compressible / incompressible solvers. However, it is first time for me to utilize reactingFoam to simulate multi-species transport with no reactions / combustions. My real case have 3 pipes. One pipe has mass flux of 2 kg/s of species (CH4, O2, N2). Other two pipes have totalPressure inlet of 1.2 bar of species (CH4, O2, N2). My methodology is that: - Set up a small cell size case to check compatibility of boundary conditions for U, T and p first in rhoPimpleFoam since reactingFoam uses PIMPLE algorithm. (Therefore i used blockMesh and sHM to create a small pipe mesh with surroundings and simulate it with those conditons.) - Implement those correct (which i guess) boundary conditions into reactingFoam tutorial "membrane" - Set the mass fractions for species in species field files for reactingFoam - Turn off reactions and combustion in constant/* - Start simulation. And if the set up is correct, implement all into my real case (which is classifed so i am not allowed to share it). BUT. I failed because reactingFoam crashes before running the iterations. I have checked the membrane tutorial case to comprehend at which step it crashes and found out that it is just before the step; "Reading fields U" So i predict that I make a mistake about boundary conditions for velocity. Please HELP!! Here my set up in 0/ folder: p Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 7 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -2 0 0 0 0]; internalField uniform 1e5; boundaryField { pipe_in { type zeroGradient; } pipe_out { type zeroGradient; } pipe_ss { type totalPressure; p0 uniform 1.2e5; } pipe_walls { type zeroGradient; } downStream { type totalPressure; p0 $internalField; } upStream { type totalPressure; p0 $internalField; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 7 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object T; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 1 0 0 0]; internalField uniform 293; boundaryField { pipe_in { type fixedValue; value $internalField; } pipe_out { type fixedValue; value $internalField; } pipe_ss { type inletOutlet; inletValue $internalField; } pipe_walls { type zeroGradient; } downStream { type inletOutlet; value $internalField; inletValue $internalField; } upStream { type inletOutlet; value $internalField; inletValue $internalField; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 7 \\/ 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 { pipe_in { type flowRateInletVelocity; massFlowRate 2; rhoInlet 1.0; } pipe_out { type flowRateInletVelocity; massFlowRate 2; rhoInlet 1.0; } pipe_ss { type fluxCorrectedVelocity; phi phi; rho rho; value uniform (0 0 0); } pipe_walls { type noSlip; } downStream { type pressureInletOutletVelocity; value $internalField; } upStream { type pressureInletOutletVelocity; value $internalField; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 7 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object CH4; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 0 0 0 0]; internalField uniform 0.0; boundaryField { pipe_in { type fixedValue; value uniform 0.0; } pipe_out { type fixedValue; value uniform 0.0; } pipe_ss { type fixedValue; value uniform 1.0; } pipe_walls { type zeroGradient; } downStream { type inletOutlet; inletValue $internalField; value $internalField; } upStream { type inletOutlet; inletValue $internalField; value $internalField; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 7 \\/ 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.0; boundaryField { pipe_in { type fixedValue; value uniform 0.79; } pipe_out { type fixedValue; value uniform 0.79; } pipe_ss { type fixedValue; value uniform 0.0; } pipe_walls { type zeroGradient; } downStream { type inletOutlet; inletValue $internalField; value $internalField; } upStream { type inletOutlet; inletValue $internalField; value $internalField; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 7 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object O2; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 0 0 0 0]; internalField uniform 0; boundaryField { pipe_in { type fixedValue; value uniform 0.21; } pipe_out { type fixedValue; value uniform 0.21; } pipe_ss { type fixedValue; value uniform 0.0; } pipe_walls { type zeroGradient; } downStream { type inletOutlet; inletValue $internalField; value $internalField; } upStream { type inletOutlet; inletValue $internalField; value $internalField; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 7 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "0"; object include; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // pipe_in { CH4 0.0; O2 0.21; N2 0.79; } pipe_out { CH4 0.0; O2 0.21; N2 0.79; } pipe_ss { CH4 1.0; O2 0.0; N2 0.0; } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 7 \\/ 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 { pipe_in { type fixedValue; value $internalField; } pipe_out { type fixedValue; value $internalField; } pipe_ss { type fixedValue; value $internalField; } pipe_walls { type zeroGradient; } downStream { type inletOutlet; inletValue $internalField; value $internalField; } upStream { type inletOutlet; inletValue $internalField; value $internalField; } } // ************************************************************************* // thermophysicalProperties Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 7 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "constant"; object thermophysicalProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // thermoType { type hePsiThermo; mixture multiComponentMixture; transport sutherland; thermo janaf; energy sensibleEnthalpy; equationOfState perfectGas; specie specie; } species ( O2 CH4 N2 ); inertSpecie N2; O2 { specie { molWeight 31.9988; } thermodynamics { Tlow 200; Thigh 5000; Tcommon 1000; highCpCoeffs ( 3.69758 0.00061352 -1.25884e-07 1.77528e-11 -1.13644e-15 -1233.93 3.18917 ); lowCpCoeffs ( 3.21294 0.00112749 -5.75615e-07 1.31388e-09 -8.76855e-13 -1005.25 6.03474 ); } transport { As 1.67212e-06; Ts 170.672; } } CH4 { specie { molWeight 16.0428; } thermodynamics { Tlow 200; Thigh 6000; Tcommon 1000; highCpCoeffs ( 1.63543 0.0100844 -3.36924e-06 5.34973e-10 -3.15528e-14 -10005.6 9.9937 ); lowCpCoeffs ( 5.14988 -0.013671 4.91801e-05 -4.84744e-08 1.66694e-11 -10246.6 -4.64132 ); } transport { As 1.67212e-06; Ts 170.672; } } 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; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 7 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "constant"; object turbulenceProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // simulationType laminar; // ************************************************************************* // fvSchemes Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 7 \\/ M anipulation | \*---------------------------------------------------------------------------*/ 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(phi,Yi_h) Gauss upwind; div(phi,K) Gauss upwind; div(phid,p) Gauss upwind; div(phi,epsilon) Gauss upwind; div(phi,k) Gauss upwind; div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes { default Gauss linear orthogonal; } interpolationSchemes { default linear; } snGradSchemes { default orthogonal; } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 7 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvSolution; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // solvers { "rho.*" { solver diagonal; } p { solver PCG; preconditioner DIC; tolerance 1e-6; relTol 0.1; } pFinal { $p; tolerance 1e-6; relTol 0.0; } "(U|h|k|epsilon)" { solver PBiCGStab; preconditioner DILU; tolerance 1e-6; relTol 0.1; } "(U|h|k|epsilon)Final" { $U; relTol 0; } "Yi.*" { $hFinal; } } PIMPLE { momentumPredictor yes; nOuterCorrectors 1; nCorrectors 2; nNonOrthogonalCorrectors 0; } // ************************************************************************* // |
|
January 12, 2020, 04:30 |
|
#2 |
New Member
Gazi Yavuz
Join Date: Apr 2018
Posts: 17
Rep Power: 8 |
This is the error i get;
Code:
#0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::sigFpe::sigHandler(int) at ??:? #2 ? in "/lib/x86_64-linux-gnu/libc.so.6" #3 Foam::DimensionedField<double, Foam::volMesh>::operator/=(Foam::DimensionedField<double, Foam::volMesh> const&) at ??:? #4 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::operator/=(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:? #5 Foam::multiComponentMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::janafThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleEnthalpy> > >::correctMassFractions() at ??:? #6 Foam::multiComponentMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::janafThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleEnthalpy> > >::multiComponentMixture(Foam::dictionary const&, Foam::fvMesh const&, Foam::word const&) at ??:? #7 Foam::heThermo<Foam::psiReactionThermo, Foam::SpecieMixture<Foam::multiComponentMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::janafThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleEnthalpy> > > > >::heThermo(Foam::fvMesh const&, Foam::word const&) at ??:? #8 Foam::psiReactionThermo::addfvMeshConstructorToTable<Foam::hePsiThermo<Foam::psiReactionThermo, Foam::SpecieMixture<Foam::multiComponentMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::janafThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleEnthalpy> > > > > >::New(Foam::fvMesh const&, Foam::word const&) at ??:? #9 Foam::autoPtr<Foam::psiReactionThermo> Foam::basicThermo::New<Foam::psiReactionThermo>(Foam::fvMesh const&, Foam::word const&) at ??:? #10 Foam::psiReactionThermo::New(Foam::fvMesh const&, Foam::word const&) at ??:? #11 ? at ??:? #12 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #13 ? at ??:? Floating point exception (core dumped) |
|
January 12, 2020, 04:44 |
|
#3 |
New Member
Gazi Yavuz
Join Date: Apr 2018
Posts: 17
Rep Power: 8 |
Yes. I have found what the problem is. The trick is to give some specie into internal field. Otherwise, OF would think (which i guess) the domain as an empty space where continuum physics is not valid.
|
|
July 17, 2022, 19:41 |
|
#4 | |
New Member
Join Date: Dec 2020
Posts: 4
Rep Power: 6 |
Quote:
To set the option "internalField" from "0" to a certain value unlike 0? |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
laplacianFoam with source term | Herwig | OpenFOAM Running, Solving & CFD | 17 | November 19, 2019 14:47 |
chtMultiRegionSimpleFoam turbulent case | Aditya Patil | OpenFOAM Running, Solving & CFD | 6 | April 24, 2017 23:13 |
simpleFoam error - "Floating point exception" | mbcx4jc2 | OpenFOAM Running, Solving & CFD | 12 | August 4, 2015 03:20 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |
calculation stops after few time steps | sivakumar | OpenFOAM Running, Solving & CFD | 7 | March 17, 2013 07:37 |