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/)
-   -   using reduced mechanisms in openFOAM (https://www.cfd-online.com/Forums/openfoam-solving/99882-using-reduced-mechanisms-openfoam.html)

Alish1984 April 14, 2012 10:47

using reduced mechanisms in openFOAM
 
Hi Foamers

we can import mechanism in chemkin format in openFOAM. chemkin format is somthing like this:
!<><><><><><><><><><><><><><><><><><><><><><><><>< ><><><><><><><><><><><><!
! Reduced version of GRI-MECH 1.2. 22 species ( + N2, AR); 104 reactions. !
! PennState, Dec, 1994. !
!<><><><><><><><><><><><><><><><><><><><><><><><>< ><><><><><><><><><><><><!
ELEMENTS
O H C N AR
END
SPECIES
H2 H O O2 OH H2O HO2 H2O2
CH2 CH2(S) CH3 CH4 CO CO2 HCO CH2O
CH3O C2H2 C2H3 C2H4 C2H5 C2H6
N2 AR
END
REACTIONS
O+H+M<=>OH+M 5.000E+17 -1.000 0.00
H2/2.00/ H2O/6.00/ CH4/2.00/ CO/1.50/ CO2/2.00/ C2H6/3.00/ AR/0.70/
O+H2<=>H+OH 5.000E+04 2.670 6290.00
O+HO2<=>OH+O2 2.000E+13 0.000 0.00
O+CH2<=>H+HCO 8.000E+13 0.000 0.00
O+CH2(S)<=>H+HCO 1.500E+13 0.000 0.00
O+CH3<=>H+CH2O 8.430E+13 0.000 0.00
O+CH4<=>OH+CH3 1.020E+09 1.500 8600.00
O+CO+M<=>CO2+M 6.020E+14 0.000 3000.00
H2/2.00/ O2/6.00/ H2O/6.00/ CH4/2.00/ CO/1.50/ CO2/3.50/ C2H6/3.00/ AR/0.50/

which includes rate constants for each elementary reaction.
but how can we use the reduced mechanisms which dont include these rate constants???
these mechanism instead have "SUBROUTINE CKWYP.f " to directly evaluate production rates of the reduced mechanism.
As Tianfeng Lu said:
"The reduced mechanisms involve quasi steady state (QSS) species that are not listed in the mechanism. The QSS species will not appear in transport equations due to their low concentrations but need to be solved algebraically. Therefore users need to invoke a mechanism-specific CKWYP subroutine to compute the species production rates for a reduced mechanism."
for example ARM1 12-Step Reduced Mechanism for Methane Oxidation :
http://www.princeton.edu/~cklaw/kinetics/12-step/

or SANDIA reduced mechanisms which have this format.

BUT HOW CAN WE USE THIS IN OPENFOAM???!!!

paladin July 24, 2012 08:38

Hi Ali !

Did you, by any chances, found a way to use the fortran subroutine?

I'v read a few papers about reduction mechanism and something still isn't clear for me :
Is the reduction made before the resolution? (reducing from the 325 steps GRI-mesh model to the 12steps, for instance) or is it made "on the fly" (at each time step of the simulation) ?

What i don't get is that the reduction mechanism eliminate the steady states equations, and to find which ones are, you have to use p and T, don't you ? So for each time step, you could be facing a whole different set of useful reactions...

My guess is that the CARM (Computer Assisted Reduction Mechanism) chooses the equations before the simulation, and the Arrhenius coefficient are computed for every cell on each timestep, and depend of p and T.
Am i correct?

Wich leave us with the same problem : how to use/convert this fortran subroutine?

If anyone has any idea, it would be great !

Gregory

vnm August 16, 2012 07:29

CKWYP.f need to be conveted into ckwyp.o using a fortran compiler.
ckwyp.o can be read by Fluent. See section 5.4.1 from the UDF manual of Fluent - http://hpce.iitm.ac.in/website/Manua.../udf/chp05.pdf

Alish1984 August 16, 2012 13:54

Hi Georgy

I think the reduced mech is defined prior to run and its not on the fly. the problem is that it dont have the rate coeffs and we cant compute production rates directly. it uses some information from skeletal mech and compute "omega" in each cell in each time step on the fly. this work is done in OF by function
"omega
(
const Reaction<ThermoType>& R,
const scalarField& c,
const scalar T,
const scalar p,
scalar& pf,
scalar& cf,
label& lRef,
scalar& pr,
scalar& cr,
label& rRef
)
"
this function is called by
"omega
(
const scalarField& c,
const scalar T,
const scalar p
)"

I think its possible to write some kind of multilanguage program by "Extern C " and use ckwyp.o instead of function omega in class chemistryModel to provide us with production rates.

I know it SUCKS but i think its the only way to use these kinds of reduced mechs !!!

Ali

vnm August 17, 2012 06:26

Augmented Reaction Mechanism in Fluent
 
I tried to incorporate Augmented Reaction Mechanism as per the procedure at http://www.swri.org/utsr/presentatio...wLamnourPR.pdf
also at http://www.swri.org/utsr/summaries/FellowLamnourSUM.pdf
but I am getting errors while writing UDF as per fig. 1.
Please help.


All times are GMT -4. The time now is 12:48.