1
laminarSMOKE: A computational framework for the modeling of laminar flows with detailed kinetic mechanisms A. Cuoci, A. Frassoldati, T. Faravelli, E. Ranzi [email protected] Department of Chemistry, Materials and Chemical Engineering, Politecnico di Milano Piazza Leonardo da Vinci 32, 20133, Milano, Italy Motivation The detailed numerical simulation of multidimensional laminar flames flows with realistic chemical mechanisms is a challenging problem and places severe demands on computational resources. When detailed kinetic mechanisms are used, special attention has to be paid to the numerical algorithms, which must be accurate and efficient. The computational effort in terms of CPU time and memory requirements is considerable and in many cases prohibitive. In this work we developed a numerical solver for OpenFOAM®, called laminarSMOKE, based on the operator-splitting technique, to simulate laminar flames in complex geometries with detailed kinetic schemes. Detailed kinetic schemes Complex CFD simulations millions of computational cells Complex 2D/3D geometries unstructured meshes complex boundary conditions state of the art schemes for discretization Complex Gas-Phase Chemistry homogeneous reactions detailed transport properties CHEMKIN compatible ~100 species, ~1000 reactions Sensitivity Analysis, ROPA, etc. OpenFOAM® Framework OpenSMOKE Framework laminarSMOKE CFD code for laminar reacting flows with detailed kinetic mechanisms completely open-source easily extensible (object oriented design) efficiency and robustness Intel MKL linear solvers efficient mathematical operations Stiff ODE solvers Numerical Libraries Lifted flame Flame details Fuel: CH 4 /N 2 (51.5%, 48.5% mass) Air: O 2 /N 2 (23.2%, 76.8% mass) Temperature: 298 K Pressure: 1 atm V fuel : 35 cm/s V air : 35 cm/s Geometry Fuel nozzle diameter: 4 mm Coflow diameter: 5 mm Computational details Domain: 2D axisymmetric (55 x 200 mm) Computational grid: ~25,000 cells Discretization: second order centered Kinetic schemes GRI30: 53 species, 325 reactions PolimiC1C16HTNOX: 168 species, 5,400 reactions OH CH 2 O C 2 H 2 C 6 H 6 PolimiC1C16HT kinetic scheme 168 species 5,400 reactions Freely available in CHEMKIN format at: http://creckmodeling.chem.polimi.it/ Acknowledgements Financial support for this activity was provided by the MIUR (Ministero dell’Università e della Ricerca), under the PRIN 2008 framework: “Cinetica dettagliata di formazione di idrocarburi poliaromatici e nanoparticelle da processi di combustione”. R. H. Mohammed, M. A. Tanoff, M. D. Smooke, A. M. Shaffer, Proceedings of the Combustion Institute, 27 (1998) 693-702. M.D. Smooke, A. Ern, M.A. Tanoff, R.H. Mohammed, D.F. Marran, B. Long Proceedings of the Combustion Institute, 26 (1996) 2161-2170. NOx predictions The maximum temperature along the center- line is 1930 K at 3.55 cm, in good agreement with computations performed by Mohammed et al. The peak temperature of 1950 K does not occur at the center line, but in the “wings” at a radius of 3.75 mm. Numerical simulations predict a flame lift-off of 2.6 mm, which agrees with the experimental data of Mohammed et al., who measure a flame lift-off of 2.2 mm. 1950 300 T [K] 0.16 0 CO 2 0.042 0 CO 0.003 0 OH 0.008 0 C 2 H 2 0.001 0 C 6 H 6 121 0 10 0 75 0 NO NO 2 N 2 O The flame-lift off was obtained by looking at the HO 2 mass fraction maps, reported above. In order to correctly capture the lift-off of the flame several local refinement of the mesh were performed. Unsteady simulations temperature At t=0 the initial composition is pure air at ambient temperature. A spark, located close to the fuel nozzle was applied in order to ignite the fuel mixture which is fed through the fuel nozzle. The duration of the spark is 0.20 s. Ethylene/Methane flames J.F. Roesler, M. Martinot, C.S. McEnally, L.D. Pfefferle, J.L. Delfau, C. Vovelle, Combustion and Flame, 134 (2003) 249-260. Roesler et al. experimentally studied a series of coflow flames, fed with a mixture of C 2 H 4 , CH 4 , and N 2 in different amounts. The relative concentrations of C 2 H 4 and CH 4 are identified by the mixture parameter β: 1950 300 0.053 0 0.025 0 0.027 0 T [K] CO OH C 2 H 2 0.032 0 β=0 100% C 2 H 4 β=0.5 33% C 2 H 4 66% CH 4 β=1 100% CH 4 4 4 2 4 2 CH CH CH X X X Numerical predictions (Ethylene flame, β=0) C 6 H 6 Numerical predictions Flame details Fuel: CH 4 /C 2 H 4 Air: O 2 /N 2 (23.2%, 76.8% mass) Temperature: 298 K Pressure: 1 atm V fuel : 12.52 cm/s V air : 10.50 cm/s Geometry Fuel nozzle diameter: 11.1 mm Chamber diameter: 110 mm Computational details Domain: 2D axisymmetric (55 x 200 mm) Computational grid: ~25,000 cells Discretization: second order centered C 4 H 2 C 4 H 4 C 3 H 4 x50 C 2 H 2 C 10 H 8 C 12 H 8 The maximum temperature and concentrations of species along the center-line were experimentally measured as a function of β. The plots reported below show the comparison between numerical values (lines) and experimental data (points) for several species. Hydrogen flames V. V. Toro, A. V. Mokhov, H. B. Levinsky, M. D. Smooke, Proceedings of the Combustion Institute, 30 (2005), 485-492 T [K] O2 H2O mesh air air fuel Flame F3 Flame F2 The coflow flames experimentally studied by Toro et al., were chosen as a first validation case. The fuel stream (50% H 2 and 50% N 2 by volume) is injected at ambient temperature through a circular nozzle (i.d. 9 mm), surrounded by an air-coflow annulus (i.d. 95 mm). Two different average fuel exit velocities are considered: 27 cm/s (Flame F2) and 50 cm/s (Flame F3). A 2D rectangular domain, initially meshed with a structured grid, was considered. The fuel velocity profile was always assumed parabolic, while a flat velocity profile was imposed for the coflow stream. Comparison between predictions and measurements along the center- line in terms of temperature. The agreement is quite satisfactory, especially for Flame F3. ~ 100 species ~ 1000 reactions laminarSMOKE Framework Name Language Linear system solution Code available Web address BzzMath6 C++ Direct No http://homes.chem.polimi.it/gbuzzi/index.htm DVODE FORTRAN Direct Yes https://computation.llnl.gov/casc/odepack/odepack_home.html CVODE C Direct/Iterative Yes https://computation.llnl.gov/casc/sundials/main.html DLSODE FORTRAN Direct Yes https://computation.llnl.gov/casc/odepack/odepack_home.html DLSODA FORTRAN Direct Yes https://computation.llnl.gov/casc/odepack/odepack_home.html RADAU5 FORTRAN Direct Yes http://www.unige.ch/~hairer/software.html LIMEX4 FORTRAN Direct Yes http://www.zib.de/en/numerik/software/codelib MEBDF FORTRAN Direct Yes http://www2.imperial.ac.uk/~jcash/IVP_software Navier-Stokes Eqs. (PISO predictor) Reactor network (Strang predictor) Properties evaluation Transport Eqs. (Strang corrector) Pressure Eqn. Velocity correction (PISO corrector) + = + ∆ Uncoupled, stiff ODE systems Operator splitting-algorithm The numerical procedure is based on the Strang splitting algorithm (G. Strang, SIAM Journal of Numerical Analysis 5 (1968) 506-517). The mass fraction and enthalpy equations are integrated in two sub-steps. The first step involves only the reaction term, which is local and which is integrated using a stiff ODE solver. Convection and diffusion (second sub-step) are integrated using the implicit Euler method in the context of a fully segregated approach. The core of the laminarSMOKE framework is the efficient solution of the large number of stiff ODE systems in the chemical step. Several stiff ODE solvers available on the web were tested and compared in terms of performances. Most of them showed a satisfactory robustness, also for large kinetic schemes. The best performances were obtained by the BzzMath, CVODE and DVODE solvers. For each solver a C++ wrapper was created in order to have a object oriented style code ode.SetMaximumNumberOfSteps(100000); ode.SetInitialValues(t0,Y0); ode.Solve(tf); ode.Solution(yF); ODESystem_DVODE *odeSystemObject; odeSystemObject = ODESystem_DVODE::GetInstance(); OpenSMOKE::OpenSMOKE_DVODE<ODESystem__DVODE> ode(odeSystemObject); The reactive, laminar flows under investigation in the present work are mathematically described by the conservation equations for continuous, multicomponent, compressible, thermally-perfect mixtures of gases. The conservation equations of total mass, mixture momentum, individual species mass fractions and mixture energy are solved for a Newtonian fluid in laminar conditions. The density of the mixture is calculated using the equation of state of ideal gases. Both Fickian and thermal diffusion (Soret effect) are taken into account for evaluating the diffusion velocities. CRECK modeling research group – Chemical Reaction Engineering and Chemical Kinetics Politecnico di Milano http://creckmodeling.chem.polimi.it mass fractions of NOx (ppm) The mesh was refined several times, from ~2,000 to 30,000 cells PolimiC1C3HT (78 species, 1325 reactions) HCN The code is specifically conceived for managing complex kinetic mechanisms and detailed transport properties in CHEMKIN format.

Presentazione standard di PowerPointcreckmodeling.chem.polimi.it/images/site/... · The numerical procedure is based on the Strang splitting algorithm (G. Strang, SIAM Journal of

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Presentazione standard di PowerPointcreckmodeling.chem.polimi.it/images/site/... · The numerical procedure is based on the Strang splitting algorithm (G. Strang, SIAM Journal of

laminarSMOKE: A computational framework for the modeling of laminar flows with detailed kinetic mechanisms

A. Cuoci, A. Frassoldati, T. Faravelli, E. Ranzi [email protected]

Department of Chemistry, Materials and Chemical Engineering, Politecnico di Milano Piazza Leonardo da Vinci 32, 20133, Milano, Italy

Motivation The detailed numerical simulation of multidimensional laminar flames flows with realistic chemical

mechanisms is a challenging problem and places severe demands on computational resources. When detailed kinetic mechanisms are used, special attention has to be paid to the numerical algorithms, which must be accurate and efficient. The computational effort in terms of CPU time and memory

requirements is considerable and in many cases prohibitive.

In this work we developed a numerical solver for OpenFOAM®, called laminarSMOKE, based on the operator-splitting technique, to simulate laminar flames in complex geometries with detailed kinetic

schemes.

Detailed kinetic schemes Complex CFD simulations

millions of computational cells

Complex 2D/3D geometries • unstructured meshes

• complex boundary conditions • state of the art schemes for discretization

Complex Gas-Phase Chemistry • homogeneous reactions

• detailed transport properties • CHEMKIN compatible

• ~100 species, ~1000 reactions • Sensitivity Analysis, ROPA, etc.

OpenFOAM® Framework

OpenSMOKE Framework

laminarSMOKE

CFD code for laminar reacting flows with detailed kinetic mechanisms

• completely open-source • easily extensible (object oriented design)

• efficiency and robustness

Intel MKL • linear solvers

• efficient mathematical operations

Stiff ODE solvers

Numerical Libraries

Lifted flame

Flame details Fuel: CH4/N2 (51.5%, 48.5% mass)

Air: O2/N2 (23.2%, 76.8% mass) Temperature: 298 K

Pressure: 1 atm Vfuel: 35 cm/s Vair: 35 cm/s

Geometry

Fuel nozzle diameter: 4 mm Coflow diameter: 5 mm

Computational details

Domain: 2D axisymmetric (55 x 200 mm) Computational grid: ~25,000 cells

Discretization: second order centered

Kinetic schemes GRI30: 53 species, 325 reactions

PolimiC1C16HTNOX: 168 species, 5,400 reactions

OH CH2O C2H2 C6H6 PolimiC1C16HT kinetic scheme 168 species

5,400 reactions

Freely available in CHEMKIN format at:

http://creckmodeling.chem.polimi.it/

Acknowledgements Financial support for this activity was

provided by the MIUR (Ministero dell’Università e della Ricerca), under the PRIN 2008 framework: “Cinetica

dettagliata di formazione di idrocarburi poliaromatici e nanoparticelle da

processi di combustione”.

R. H. Mohammed, M. A. Tanoff, M. D. Smooke, A. M. Shaffer, Proceedings of the Combustion Institute, 27 (1998) 693-702.

M.D. Smooke, A. Ern, M.A. Tanoff, R.H. Mohammed, D.F. Marran, B. Long Proceedings of the Combustion Institute, 26 (1996) 2161-2170.

NOx predictions The maximum temperature along the center-line is 1930 K at 3.55 cm, in good agreement

with computations performed by Mohammed et al. The peak temperature of 1950 K does not occur at the center line, but in the “wings” at a

radius of 3.75 mm.

Numerical simulations predict a flame lift-off of 2.6 mm, which agrees with the experimental

data of Mohammed et al., who measure a flame lift-off of 2.2 mm.

1950 300

T [K]

0.16 0

CO2

0.042 0

CO

0.003 0

OH

0.008 0

C2H2

0.001 0

C6H6

121 0 10 0 75 0

NO NO2 N2O

The flame-lift off was obtained by looking at the HO2 mass fraction maps, reported above. In

order to correctly capture the lift-off of the flame several local refinement of the mesh

were performed.

Unsteady simulations

tem

pe

ratu

re

At t=0 the initial composition is pure air at ambient temperature. A spark, located

close to the fuel nozzle was applied in order to ignite the fuel mixture which is

fed through the fuel nozzle. The duration of the spark is 0.20 s.

Ethylene/Methane flames J.F. Roesler, M. Martinot, C.S. McEnally, L.D. Pfefferle, J.L. Delfau, C. Vovelle, Combustion and Flame, 134 (2003) 249-260.

Roesler et al. experimentally studied a series of coflow flames, fed with a

mixture of C2H4, CH4, and N2 in different amounts.

The relative concentrations of C2H4 and CH4 are identified by the mixture

parameter β:

1950 300 0.053 0 0.025 0 0.027 0

T [K] CO OH C2H2

0.032 0

β=0 100% C2H4

β=0.5 33% C2H4

66% CH4

β=1 100% CH4

4

4 2 42CH

CH C H

X

X X

Numerical predictions (Ethylene flame, β=0) C6H6 Numerical predictions

Flame details Fuel: CH4/C2H4

Air: O2/N2 (23.2%, 76.8% mass) Temperature: 298 K

Pressure: 1 atm Vfuel: 12.52 cm/s Vair: 10.50 cm/s

Geometry Fuel nozzle diameter: 11.1 mm

Chamber diameter: 110 mm

Computational details Domain: 2D axisymmetric (55 x 200 mm)

Computational grid: ~25,000 cells Discretization: second order centered

C4H2

C4H4

C3H4 x50

C2H2

C10H8

C12H8

The maximum temperature and concentrations of species along the

center-line were experimentally measured as a function of β. The plots reported below show the comparison between numerical values (lines) and experimental data (points) for several

species.

Hydrogen flames V. V. Toro, A. V. Mokhov, H. B. Levinsky, M. D. Smooke, Proceedings of the Combustion Institute, 30 (2005), 485-492

T [K] O2 H2O mesh

air air fuel

Flame F3

Flame F2

The coflow flames experimentally studied by Toro et al., were chosen as a first validation case. The fuel stream (50%

H2 and 50% N2 by volume) is injected at ambient temperature through a circular nozzle (i.d. 9 mm), surrounded by an air-coflow annulus (i.d. 95 mm).

Two different average fuel exit velocities are considered: 27

cm/s (Flame F2) and 50 cm/s (Flame F3).

A 2D rectangular domain, initially meshed with a structured grid, was considered. The fuel velocity profile was always

assumed parabolic, while a flat velocity profile was imposed for the coflow stream.

Comparison between predictions and measurements along the center-line in terms of temperature. The agreement is quite satisfactory,

especially for Flame F3.

~ 100 species ~ 1000 reactions

laminarSMOKE Framework

Name Language Linear system

solution

Code

available Web address

BzzMath6 C++ Direct No http://homes.chem.polimi.it/gbuzzi/index.htm

DVODE FORTRAN Direct Yes https://computation.llnl.gov/casc/odepack/odepack_home.html

CVODE C Direct/Iterative Yes https://computation.llnl.gov/casc/sundials/main.html

DLSODE FORTRAN Direct Yes https://computation.llnl.gov/casc/odepack/odepack_home.html

DLSODA FORTRAN Direct Yes https://computation.llnl.gov/casc/odepack/odepack_home.html

RADAU5 FORTRAN Direct Yes http://www.unige.ch/~hairer/software.html

LIMEX4 FORTRAN Direct Yes http://www.zib.de/en/numerik/software/codelib

MEBDF FORTRAN Direct Yes http://www2.imperial.ac.uk/~jcash/IVP_software

Navier-Stokes Eqs. (PISO predictor)

Reactor network (Strang predictor)

Properties evaluation

Transport Eqs. (Strang corrector)

Pressure Eqn. Velocity correction

(PISO corrector)

𝒕𝒊+𝟏 = 𝒕𝒊 + ∆𝒕

Uncoupled, stiff ODE systems

Operator splitting-algorithm

The numerical procedure is based on the Strang splitting algorithm (G. Strang, SIAM Journal of Numerical Analysis 5 (1968) 506-517). The mass fraction and enthalpy equations are

integrated in two sub-steps. The first step involves only the reaction term, which is local and which is integrated using a stiff ODE solver. Convection and diffusion (second sub-step) are

integrated using the implicit Euler method in the context of a fully segregated approach.

The core of the laminarSMOKE framework is the efficient solution of the large number of stiff ODE systems in the chemical step. Several stiff ODE solvers available on the web were tested and compared in terms of performances. Most of them showed a satisfactory robustness, also for large kinetic schemes.

The best performances were obtained by the BzzMath, CVODE and DVODE solvers.

For each solver a C++ wrapper was created in order to have a object oriented style code

ode.SetMaximumNumberOfSteps(100000);

ode.SetInitialValues(t0,Y0);

ode.Solve(tf);

ode.Solution(yF);

ODESystem_DVODE *odeSystemObject;

odeSystemObject = ODESystem_DVODE::GetInstance();

OpenSMOKE::OpenSMOKE_DVODE<ODESystem__DVODE>

ode(odeSystemObject);

The reactive, laminar flows under investigation in the present work are mathematically described by the

conservation equations for continuous, multicomponent, compressible, thermally-perfect mixtures of gases. The conservation equations of total mass, mixture momentum, individual species mass fractions and mixture energy are solved for a

Newtonian fluid in laminar conditions. The density of the mixture is calculated using the equation of state of ideal gases. Both Fickian and thermal diffusion (Soret effect) are taken into account for evaluating

the diffusion velocities.

CRECK modeling research group – Chemical Reaction Engineering and Chemical Kinetics Politecnico di Milano

http://creckmodeling.chem.polimi.it

mass fractions of NOx (ppm)

The mesh was refined several times, from ~2,000 to 30,000 cells

PolimiC1C3HT (78 species, 1325 reactions)

HCN

The code is specifically conceived for managing complex kinetic mechanisms and detailed transport properties in CHEMKIN format.