CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Modeling Turbulent Reactive Flow (https://www.cfd-online.com/Forums/openfoam/65217-modeling-turbulent-reactive-flow.html)

sanjibdsharma June 9, 2009 04:08

Modeling Turbulent Reactive Flow
 
Hi I am trying to model a multi-species, turbulent reactive flow. From the examples, I understand I need to create a chemkin type format for the reacting species and a thermophysical data file. However, are there any models similar to the Eddy-break-up model in OpenFoam ? If so, where do I find it and how do I change the mixing parameters for this model ?

Thanks in advance.

Sanjib

villet June 13, 2009 08:04

Hello Sanjib,

search the forum with keyword "reactingFoam" which is a general reacting flow solver in OpenFOAM. You can find a tutorial case here:

http://openfoamwiki.net/index.php/Tu..._firstTutorial

The mixing parameter "Cmix" can be found in "constant/chemistryProperties" dictionary. As you mentioned, the chemical properties are read in ChemKin format.

The chemisty is solved in a separate library and called in "reactingFoam" solver, so the solver code is quite compact. You can find the source code file for turbulence-chemistry interaction "chemistry.H" in "reactingFoam" solver directory. You can find similarities with the Chalmers PaSR model to other eddy-break up models.

Hope this helps,
Ville

Edison_Ge June 19, 2009 00:01

hi, I'm working on the similar area. Are there more advanced combustion method like flamelet or even PDF in OpenFOAM?
Thanks a lot!

villet June 22, 2009 17:02

Quote:

Originally Posted by Edison_Ge (Post 219799)
hi, I'm working on the similar area. Are there more advanced combustion method like flamelet or even PDF in OpenFOAM?

I haven't seen transported PDF model in OpenFOAM. Someone else can correct me if I'm wrong.

Are you interested in non-premixed or premixed flamelet models? Hannes Kroger at University of Rostock has worked on premixed combustion. He has a SVN repository for all of his stuff (search the forum "hannes repository).

Hannes' work has helped me on my ever-lasting project which is more about non-premixed combustion and deals with flamelet/progress-variable model.

About the more sophisticated models in OpenFOAM, you should check this thread:

http://www.cfd-online.com/Forums/ope...ion-model.html

Hope this helped,
Ville

Edison_Ge June 24, 2009 00:35

thanks ville!

I found hannes repository and his work is very helpful to my research.

I'm working on non-premixed combustion with PDF transport model. My supervisor and me are working on a new mixing model and considering implement it in openFOAM. But the previous problem is that no much OPENFOAM usage in my school, university of Queesland, AU.

If that's possible I'd like to know more of your work with OpenFOAM. My email is yipeng.ge@uqconnect.edu.au

Cheers

Burn June 24, 2009 03:46

premixed combustion
 
Hi,

I am working in premixed flame modelling and I have searched for the repository of Hannes Kroger but without success.
Could someone explain what exactly to search for in order to find it or post a link to it?

Thanks

villet July 9, 2009 08:06

Quote:

Originally Posted by Burn (Post 220294)
Hi,

Could someone explain what exactly to search for in order to find it or post a link to it?

Thanks

Here's the link for the post:
http://www.cfd-online.com/Forums/ope...tml#post198279

Burn July 9, 2009 08:10

Thank you for the link

hamburgFoam December 6, 2009 09:49

Hello Vill, hello Sanjib, hello everyone

I am trying to impliment a turbulent reacting flow. my idea was to use the reactingFoam solver.

My case:
i have zylinder with a fuel (CH4) inlet, an air inlet and a coflow inlet. at the other of the zylinder is an outlet.

first of all i impliment a simpleFoam case just with velocity field (without the reaction). that works fine. so, now i am trying to add the reaction.

i was trying to run the reactingFoam tutorial (http://openfoamwiki.net/index.php/Tu..._firstTutorial). i updated the path of the "chem.inp" and "therm.dat" files as describe and run the case. after the there was a error message.

"keyword psiChemistryModel is undefined in dictionary"

so, i added the keyword as in the dieselFoam tutorial.

"psiChemistryModel ODEChemistryModel<gasThermoPhysics>;"

another error message came up.

Reading chemistry properties


Reading g

Reading thermophysicalProperties
Selecting psiChemistryModel ODEChemistryModel<gasThermoPhysics>
Selecting thermodynamics package hPsiMixtureThermo<reactingMixture<gasThermoPhysics >>
Selecting chemistryReader chemkinReader
#0 Foam::error::printStack(Foam::Ostream&) in "/home/openfoam/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/home/openfoam/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 Uninterpreted:
#3 Foam::DimensionedField<double, Foam::volMesh>::operator/=(Foam::DimensionedField<double, Foam::volMesh> const&) in "/home/openfoam/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libreactionThermophysicalModels.so"
#4 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>:
perator/=(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/home/openfoam/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libreactionThermophysicalModels.so"
#5 Foam::multiComponentMixture<Foam::sutherlandTransp ort<Foam::specieThermo<Foam::janafThermo<Foam::per fectGas> > > >::correctMassFractions() in "/home/openfoam/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libreactionThermophysicalModels.so"
#6 Foam::multiComponentMixture<Foam::sutherlandTransp ort<Foam::specieThermo<Foam::janafThermo<Foam::per fectGas> > > >::multiComponentMixture(Foam::dictionary const&, Foam::List<Foam::word> const&, Foam::HashPtrTable<Foam::sutherlandTransport<Foam: :specieThermo<Foam::janafThermo<Foam::perfectGas> > >, Foam::word, Foam::string::hash> const&, Foam::fvMesh const&) in "/home/openfoam/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libreactionThermophysicalModels.so"
#7 Foam::reactingMixture<Foam::sutherlandTransport<Fo am::specieThermo<Foam::janafThermo<Foam::perfectGa s> > > >::reactingMixture(Foam::dictionary const&, Foam::fvMesh const&) in "/home/openfoam/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libreactionThermophysicalModels.so"
#8 Foam::hPsiMixtureThermo<Foam::reactingMixture<Foam ::sutherlandTransport<Foam::specieThermo<Foam::jan afThermo<Foam::perfectGas> > > > >::hPsiMixtureThermo(Foam::fvMesh const&) in "/home/openfoam/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libreactionThermophysicalModels.so"
#9 Foam::hCombustionThermo::addfvMeshConstructorToTab le<Foam::hPsiMixtureThermo<Foam::reactingMixture<F oam::sutherlandTransport<Foam::specieThermo<Foam:: janafThermo<Foam::perfectGas> > > > > >::New(Foam::fvMesh const&) in "/home/openfoam/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libreactionThermophysicalModels.so"
#10 Foam::hCombustionThermo::NewType(Foam::fvMesh const&, Foam::word const&) in "/home/openfoam/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libreactionThermophysicalModels.so"
#11 Foam:siChemistryModel:siChemistryModel(Foam::fvMes h const&, Foam::word const&) in "/home/openfoam/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libchemistryModel.so"
#12 Foam::ODEChemistryModel<Foam:siChemistryModel, Foam::sutherlandTransport<Foam::specieThermo<Foam: :janafThermo<Foam:erfectGas> > > >::ODEChemistryModel(Foam::fvMesh const&, Foam::word const&, Foam::word const&) in "/home/openfoam/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libchemistryModel.so"
#13 Foam:siChemistryModel::addfvMeshConstructorToTable <Foam::ODEChemistryModel<Foam:siChemistryModel, Foam::sutherlandTransport<Foam::specieThermo<Foam: :janafThermo<Foam:
erfectGas> > > > >::New(Foam::fvMesh const&, Foam::word const&, Foam::word const&) in "/home/openfoam/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libchemistryModel.so"
#14 Foam:siChemistryModel::New(Foam::fvMesh const&) in "/home/openfoam/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libchemistryModel.so"
#15 main in "/home/openfoam/OpenFOAM/OpenFOAM-1.6/applications/bin/linuxGccDPOpt/reactingFoam"
#16 __libc_start_main in "/lib/libc.so.6"
#17 _start at /usr/src/packages/BUILD/glibc-2.9/csu/../sysdeps/i386/elf/start.S:122
Gleitkomma-Ausnahme

so, i don't know what's mean. has anyone an helpfull advice for me how to fix my problem.

Thanks in advance.

regarts,

Ilja

dhuckaby December 7, 2009 08:53

IIja,

I was able to reproduce a similar error when I either set all the initial mass fractions to 0 or
all the mass fractions were set to 0 at any boundary.

Dave

hamburgFoam December 7, 2009 12:26

Hey Dave,

thank you for your advice. i played a bit with the mass fraction and set it like below.

BC T CH4 O2 N2
inlet one 293 0.5 0 0
inlet two 293 0.5 0 0
inlet three 293 0 0.2 0.8
Internal field 293 0 0.2 0.8

the mass fraction in the Ydefault-file are set to all to 0.

but i have still the same error! :(

the mass fraction is the fraction of one substance with there mass to the total mixture mass. where i have to set the total mixture mass of a species?


Regards, Ilja

dhuckaby December 7, 2009 15:58

IIja,

Could you post the text for the "thermophysicalProperties" and "chem.inp" for the case
described above ?

You could also try running with all the inlet mass fractions set to the the mass fractions of the initial condition.

Dave

hamburgFoam December 7, 2009 18:01

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format binary;
class dictionary;
location "constant";
object thermophysicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

thermoType hPsiMixtureThermo<reactingMixture<gasThermoPhysics >>;

CHEMKINFile "$FOAM_CASE/chemkin/chem.inp";

CHEMKINThermoFile "~OpenFOAM/thermoData/therm.dat";

inertSpecie N2;

liquidComponents ( CH4 );

liquidProperties
{
CH4 CH4 defaultCoeffs;
}


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

and the cham.inp file...

ELEMENTS
H O C N
END
SPECIE
CH4 O2 N2 CO2 H2O
END
REACTIONS
CH4 + 2O2 => CO2 + 2H2O 6.70091E+12 0.0 4.84149E+04! 1
FORD / CH4 0.2 /
FORD / O2 1.3 /
END

dhuckaby December 8, 2009 09:00

IIja,

I ran the tutorial case with the settings described in the previous posts I was only able to reproduce the error when the sum of the species mass fractions was equal to zero. The code ran OK when the mass fractions did not sum to unity.

I think the location in code where the error occurs is the divide in:
thermophysicalModels/reactionThermo/lnInclude/multiComponentMixture.C
void Foam::multiComponentMixture<ThermoType>::correctMa ssFractions()

Dave

hamburgFoam December 8, 2009 12:57

Hey Dave,

thank you for your help. your advice fixed THAT problem.

the problem was: the names of my species-files were ch4, o2 and n2 (instead of CH4, O2 and N2) and the mass fraction in the Ydefault file was set to zero. so FOAM couldn't read the files and set all mass fractions like in the Ydefault to zero.

i ran the case and another error came up...

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

Create mesh for time = 0

Reading chemistry properties


Reading g

Reading thermophysicalProperties
Selecting psiChemistryModel ODEChemistryModel<gasThermoPhysics>
Selecting thermodynamics package hPsiMixtureThermo<reactingMixture<gasThermoPhysics >>
Selecting chemistryReader chemkinReader
Selecting chemistrySolver ode
Selecting ODE solver SIBS
ODEChemistryModel: Number of species = 5 and reactions = 1
Reading field U

Reading/calculating face flux field phi

Creating turbulence model.

Selecting turbulence model type RASModel
Selecting RAS turbulence model kEpsilon


Different dimensions for =
dimensions : [1 -1 -1 0 0 0 0] = [0 2 -1 0 0 0 0]
#0 Foam::error::printStack(Foam::Ostream&) in "/home/openfoam/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::error::abort() in "/home/openfoam/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 Foam::dimensionSet::operator=(Foam::dimensionSet const&) const in "/home/openfoam/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libOpenFOAM.so"
#3 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::operator=(Foam::tmp<Foam::Geometri cField<double, Foam::fvPatchField, Foam::volMesh> > const&) in "/home/openfoam/OpenFOAM/OpenFOAM-1.6/applications/bin/linuxGccDPOpt/reactingFoam"
#4 Foam::compressible::RASModels::kEpsilon::kEpsilon( Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::basicThermo const&) in "/home/openfoam/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libcompressibleRASModels.so"
#5 Foam::compressible::RASModel::adddictionaryConstru ctorToTable<Foam::compressible::RASModels::kEpsilo n>::New(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::basicThermo const&) in "/home/openfoam/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libcompressibleRASModels.so"
#6 Foam::compressible::RASModel::New(Foam::GeometricF ield<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::basicThermo const&) in "/home/openfoam/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libcompressibleRASModels.so"
#7 Foam::compressible::turbulenceModel::addturbulence ModelConstructorToTable<Foam::compressible::RASMod el>::NewturbulenceModel(Foam::GeometricField<doubl e, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::basicThermo const&) in "/home/openfoam/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libcompressibleRASModels.so"
#8 Foam::compressible::turbulenceModel::New(Foam::Geo metricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::basicThermo const&) in "/home/openfoam/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libcompressibleTurbulenceModel.so"
#9 main in "/home/openfoam/OpenFOAM/OpenFOAM-1.6/applications/bin/linuxGccDPOpt/reactingFoam"
#10 __libc_start_main in "/lib/libc.so.6"
#11 _start at /usr/src/packages/BUILD/glibc-2.9/csu/../sysdeps/i386/elf/start.S:122


From function dimensionSet::operator=(const dimensionSet& ds) const
in file dimensionSet/dimensionSet.C at line 143.

FOAM aborting


Dave, do you have an idea what dimensions are meant?

hamburgFoam December 8, 2009 14:34

fixed it so far!
thx Dave

hamburgFoam December 15, 2009 11:47

Hello everyone,

i am modelling a reactingFoam case for a CH4-air combustion. i ran the case and it was fine. the problem is, that flame-temperatur was very much lower than expected.

my properties for the pre exponential factor A, temperature exponent b and the activation energy are as below:

ELEMENTS
H O C N
END
SPECIE
CH4 O2 N2 CO2 H2O
END
REACTIONS
CH4 + 2O2 => CO2 + 2H2O 6.70091E+12 0.0 4.84149E+04! 1
FORD / CH4 0.2 /
FORD / O2 1.3 /
END

do anyone has an idea what i could have done wrong and how to increase the flame-temperature?

regards,

Ilja

dhuckaby December 16, 2009 09:11

Ilja,

A number of things may effect the flame temperature (and shape):
- turbulence model
- ode solver and settings
- kinetic model
- mesh resolution

The following paper, among other topics, has comparisons between experimental data and OF flame simulations:
http://www.opensourcecfd.com/confere...haiderRehm.pdf

Dave

hamburgFoam December 17, 2009 10:01

Hey Dave,

thanks, you halped me again.

But I have problems to ignite my flame. I would like to simulate a flame with specific bc's so I can compare the flame with the measured one.

My temperature BC's are:

fuel inlet: 291 K
pilot: 1880 K
coflow: 294 K

in addition I chose for the internelField 293 K.

If I run the case with this settings the reaction couldn't start. I was thinking that the fuel-inlet-temperature was to low to ignite. the autoignition temperature of CH4 is 823 K. so, I raised the fuel-inlet-temperature to 900 K to proof, if it would ignite. it did. I ve got a flame temperature of 2500 K. I was expecting 2300 K with the fuel-inlet-temperature of 291 K.

is there another possibility for ignition? maybe to configurate a temperature profile at the fuel-inlet, that the flow would have a temperature of 900 K at the first iteration-steps and change after this to 291 K?

best regards,

Ilja

dhuckaby December 18, 2009 14:34

Ilja,

There is a "timeVaryingFixedValue" boundary condition which would allow you to decrease the inlet temperature over time. Did you try igniting by increase the pilot temperature ? There is also an ignition model on the wiki as well as one use in coalChemistryFoam (1.6.x). Also, "funkySetFields" would alllow you to build a numerical "spark" as an initial condition.

Dave


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