Implementation of a two-transport equation for the sprayFoam Min - - PowerPoint PPT Presentation

implementation of a two transport equation for the
SMART_READER_LITE
LIVE PREVIEW

Implementation of a two-transport equation for the sprayFoam Min - - PowerPoint PPT Presentation

Background and Motivation multistepSoot model Case tutorial Implementation of a two-transport equation for the sprayFoam Min Zhang Department of mechanical engineering, Technical University of Denmark, Copenhagen, Denmark 2019-11-27 Min


slide-1
SLIDE 1

Background and Motivation multistepSoot model Case tutorial

Implementation of a two-transport equation for the sprayFoam

Min Zhang

Department of mechanical engineering, Technical University of Denmark, Copenhagen, Denmark

2019-11-27

Min Zhang Implementation of a two-transport equation soot model for sparyFoam 2019-11-27 1 / 30

slide-2
SLIDE 2

Background and Motivation multistepSoot model Case tutorial

Table of Contents

1 Background and Motivation

Background Motivation

2 multistepSoot model

Theory Implementation

3 Case tutorial

Case modification Results

Min Zhang Implementation of a two-transport equation soot model for sparyFoam 2019-11-27 2 / 30

slide-3
SLIDE 3

Background and Motivation multistepSoot model Case tutorial Background

Background

spray combustion event is recognized as one of the most complex in-cylinder phenomena this event refers to fuel droplet atomisation, mixture preparation, ignition, combustion and soot production soot particle is an imoportant source of PM2.5, which causes severely healthy problem

Min Zhang Implementation of a two-transport equation soot model for sparyFoam 2019-11-27 3 / 30

slide-4
SLIDE 4

Background and Motivation multistepSoot model Case tutorial Motivation

Motivation

  • nly one soot model called mixtureFractionSoot has been

implemented in openFoam this soot model is a simple state model which can not predict soot accurately. soot production is a physical and chemical process which refers to soot inception, coagulation, surface growth, oxidation by OH and O2. implementing a multistep soot model and transport equations to OpenFOAM is necessary.

Min Zhang Implementation of a two-transport equation soot model for sparyFoam 2019-11-27 4 / 30

slide-5
SLIDE 5

Background and Motivation multistepSoot model Case tutorial Theory

Soot formation and oxidation

A successful modelling of soot requires accurate accounting for both formation and oxidation of soot. Basically, we can classify the soot model to the following 4 kinds, empirical model semi-empirical model detailed model phenomenological multistep soot model

Min Zhang Implementation of a two-transport equation soot model for sparyFoam 2019-11-27 5 / 30

slide-6
SLIDE 6

Background and Motivation multistepSoot model Case tutorial Theory

Multistep soot model

phenomenological multistep models process

Min Zhang Implementation of a two-transport equation soot model for sparyFoam 2019-11-27 6 / 30

slide-7
SLIDE 7

Background and Motivation multistepSoot model Case tutorial Theory

Reaction rate for submodels

i Description C b Ta n inc Inception 10000 21000 sg Surface growth (p/pref)1.4 12100 0.5 OH Oxidation due to OH 0.36 0.5 1 O2 Oxidation due to O2 10000 0.5 19778 1

Table: The multistep soot model constant values

ki = CiT b,i · exp −Ta,i T

  • (Ssoot)n,i

(1)

Min Zhang Implementation of a two-transport equation soot model for sparyFoam 2019-11-27 7 / 30

slide-8
SLIDE 8

Background and Motivation multistepSoot model Case tutorial Theory

Soot mass and density production rate

Net soot production rate: dMsoot dt = kinc[Xprec] + ksgs[C2H2] − kOH[OH] − kO2[O2] (2) Particle number density production rate: dNsoot dt = Nakinc − kcoag (3) Note that the coagulation rate is given as: kcog = kcog( 24RT ρsootNA )1/2(6Msoot ρsootπ )1/6(Nsoot)11/6 (4)

Min Zhang Implementation of a two-transport equation soot model for sparyFoam 2019-11-27 8 / 30

slide-9
SLIDE 9

Background and Motivation multistepSoot model Case tutorial Theory

Two-tansport equation

The well-know transport equations are Moss-Brookes (MB) two transport equations which are able to account for the individual processes and turbulence effect. ∂ ∂t(ρYsoot) + ∇ · (ρUYsoot) = ∇ · [ µt Prsoot ∇Ysoot] + dMsoot dt (5) ∂ ∂t(ρb∗

nuc) + ∇ · (ρUb∗ nuc) = ∇ · [

µt Prnuc ∇b∗

nuc] +

1 Nnormal dNsoot dt (6)

Min Zhang Implementation of a two-transport equation soot model for sparyFoam 2019-11-27 9 / 30

slide-10
SLIDE 10

Background and Motivation multistepSoot model Case tutorial Implementation

The structure of sprayFoam

The momentum, energy and mass equation are solved by including the codes:

#include "UEqn".C #include "YEqn".C #include "EEqn".C

The spray is solved by including the codes calling the function:

#include "basicSprayCloud.H" parcels.evolve

Min Zhang Implementation of a two-transport equation soot model for sparyFoam 2019-11-27 10 / 30

slide-11
SLIDE 11

Background and Motivation multistepSoot model Case tutorial Implementation

The creation of myRadiation library

copy the radiation library into the user project folder $WM_PROJECT_USER_DIR without any changes

foam cp -r --parents src/thermophysicalModels/radiation $WM_PROJECT_USER_DIR cd $WM_PROJECT_USER_DIR/src/thermophysicalModels/

Rename the library

mv radition myRadiation

Min Zhang Implementation of a two-transport equation soot model for sparyFoam 2019-11-27 11 / 30

slide-12
SLIDE 12

Background and Motivation multistepSoot model Case tutorial Implementation

The creation of myRadiation library

Modify the excutable name to libmyradiationModels.so

cd myRadiation sed -i s/libradiationModels/libmyradiationModels/g Make/files

make the excutable file ”libmyradiationModels.so” locate at the $FOAM_USER_LIBBIN instead of $FOAM_LIBBIN

sed -i s/FOAM_LIBBIN/FOAM_USER_LIBBIN/g Make/files

Compile it after changing,

wmake

Min Zhang Implementation of a two-transport equation soot model for sparyFoam 2019-11-27 12 / 30

slide-13
SLIDE 13

Background and Motivation multistepSoot model Case tutorial Implementation

The understanding of mixtureFractionSoot model

Let’s go into mixtureFractionSoot model

cd submodels/sootModel/mixtureFractionSoot

The mixtureFractionSoot consists of three files: mixtureFractionSoots.C: making a new type for mixtureFractionSoot mixtureFractionSoot.H: declaring the member data and fuctions mixtureFractionSoot.C: initializing the data member and define the member function

Min Zhang Implementation of a two-transport equation soot model for sparyFoam 2019-11-27 13 / 30

slide-14
SLIDE 14

Background and Motivation multistepSoot model Case tutorial Implementation

The understanding of mixtureFractionSoot model

The soot mass fraction is calculated by the member function correct(),

const volScalarField& mapField = mesh_.lookupObject<volScalarField>(mappingFieldName_); soot_ = sootMax_*(mapField/mapFieldMax_);

Hence, the modified calculation process should be added into this member function.

Min Zhang Implementation of a two-transport equation soot model for sparyFoam 2019-11-27 14 / 30

slide-15
SLIDE 15

Background and Motivation multistepSoot model Case tutorial Implementation

The creation of multistep soot model

Based on mixtureFractionSoot model existed in OpenFOAM, copy the folder and rename it,

cd .. cp -r mixtureFractionSoot multistepSoot

Meanwhile, rename the files name inside the folder,

mv mixtureFractionSoot.C multistepSoot.C mv mixtureFractionSoot.H multistepSoot.H mv mixtureFractionSoots.C multistepSoots.C

Min Zhang Implementation of a two-transport equation soot model for sparyFoam 2019-11-27 15 / 30

slide-16
SLIDE 16

Background and Motivation multistepSoot model Case tutorial Implementation

The creation of multistep soot model

Change the soot type from mixtureFractionSoot to multistepSoot in the multistepSoots.C,

sed -i s/mixtureFractionSoot/multistepSoot/g multistepSoots.C

For the multistepSoot.H, we also need to change the mixtureFractionSoot to multistepSoot,

sed -i s/mixtureFractionSoot/multistepSoot/g multistepSoot.H

In order to solve a couple of chemistry reactions, we have to change the singleStepReactingMixture.H to reactingMixture.H,

sed -i s/singleStepReactingMixture/reactingMixture.H/g multistepSoot.H

Min Zhang Implementation of a two-transport equation soot model for sparyFoam 2019-11-27 16 / 30

slide-17
SLIDE 17

Background and Motivation multistepSoot model Case tutorial Implementation

The declaration of member in .H header file

considering to add the multistep soot model and two transport equations into the multistepSoot model, the following declarations should be added under the //Private data,

volScalarField PDSoot_; volScalarField dNSootdt_; volScalarField SootVF_; volScalarField SSoot_; volScalarField dMSootdt_; volScalarField r1_; volScalarField r2_; volScalarField r3_; volScalarField r4_; volScalarField r5_; volScalarField MSoot_; volScalarField NSoot_; scalar Sct_; scalar MWc_; scalar wPrec_; scalar rhoS_; scalar Ca_; scalar Ta_; scalar Cb_; scalar Cg_; scalar Tg_; scalar m_; scalar q_; scalar Cw1_; scalar CollEff_; scalar Cw2_; scalar Tw2_; scalar NA_;

Min Zhang Implementation of a two-transport equation soot model for sparyFoam 2019-11-27 17 / 30

slide-18
SLIDE 18

Background and Motivation multistepSoot model Case tutorial Implementation

Including the relevant header files for multistep model in .C source file

The final file we need to modify is multistepSoot.C. Firstly, change the mixtureFractionSoot to the multistepSoot,

sed -i s/mixtureFractionSoot/multistepSoot/g multistepSoot.C

Change the singleStepReactingMixture.H to reactingMixture.H,

sed -i s/singleStepReactingMixture/reactingMixture/g multistepSoot.C

We need to add two transport equations to this model, following header file should be included,

#include "fvmDdt.H" #include "fvmDiv.H" #include "fvcDiv.H" #include "fvmLaplacian.H"

Min Zhang Implementation of a two-transport equation soot model for sparyFoam 2019-11-27 18 / 30

slide-19
SLIDE 19

Background and Motivation multistepSoot model Case tutorial Implementation

The definition of data member in .C source file

Delete the codes after the coeffsDict_(dict...), and before the thermo_(mesh...),. Meanwhile, we add the follow codes between these two line codes to to initialize the data member,

Sct_(readScalar(coeffsDict_.lookup("Sct"))), MWc_(readScalar(coeffsDict_.lookup("MWc"))), wPrec_(readScalar(coeffsDict_.lookup("wPrec"))), rhoS_(readScalar(coeffsDict_.lookup("rhoS"))), ... ... ... Cw1_(readScalar(coeffsDict_.lookup("Cw1"))), CollEff_(readScalar(coeffsDict_.lookup("CollEff"))), Cw2_(readScalar(coeffsDict_.lookup("Cw2"))), Tw2_(readScalar(coeffsDict_.lookup("Tw2"))), NA_(readScalar(coeffsDict_.lookup("NA"))),

Min Zhang Implementation of a two-transport equation soot model for sparyFoam 2019-11-27 19 / 30

slide-20
SLIDE 20

Background and Motivation multistepSoot model Case tutorial Implementation

Creating the fields for multistep soot model in .C source file

To create the the relevant fields for multistep soot model,we need the following codes,

PDSoot_ ( IOobject ( "PDSoot", mesh_.time().timeName(), mesh_, IOobject::MUST_READ, IOobject::AUTO_WRITE ), mesh_ ), ... ...

Min Zhang Implementation of a two-transport equation soot model for sparyFoam 2019-11-27 20 / 30

slide-21
SLIDE 21

Background and Motivation multistepSoot model Case tutorial Implementation

Calculating the submodel rate in .C source file

The way to look up object such as density, temperature and species.

const volScalarField& rho_(mesh_.lookupObject<volScalarField>("rho")); const volScalarField& T = thermo_.T(); const volScalarField& Y_C2H2 = mesh_.lookupObject<volScalarField>("C2H2");

The code for calculating the submodel rate

r1_[celli] = Ca_*(Y_C2H2[celli]*rho_[celli]/wPrec_)*exp(-Ta_/Ti); ...

The way to look up the turbulence model,

const compressible::turbulenceModel& turbModel = rho_.db().lookupObject<compressible::turbulenceModel> ( turbulenceModel::propertiesName );

Min Zhang Implementation of a two-transport equation soot model for sparyFoam 2019-11-27 21 / 30

slide-22
SLIDE 22

Background and Motivation multistepSoot model Case tutorial Implementation

Solving the two transport equations in .C source file

tmp<fvScalarMatrix> PDSootEqn ( fvm::ddt(rho_, PDSoot_) +fvm::div(phi_, PDSoot_)

  • fvm::laplacian(turbModel.muEff()/Sct_, PDSoot_)

== dNSootdt_/(NA_*dimensionedScalar("unity",dimless/dimMoles,1.0)) ); solve(PDSootEqn); tmp<fvScalarMatrix> sootEqn ( fvm::ddt(rho_, soot_) +fvm::div(phi_,soot_)

  • fvm::laplacian(turbModel.muEff()/Sct_, soot_)

== dMSootdt_ ); solve(sootEqn);

Min Zhang Implementation of a two-transport equation soot model for sparyFoam 2019-11-27 22 / 30

slide-23
SLIDE 23

Background and Motivation multistepSoot model Case tutorial Case modification

Geometry of the case

Copy the aachenBomb case from the tutotrials to user directory and rename

run cp -r $FOAM_TUTORIALS/lagrangian/sprayFoam/aachenBomb . mv aachenBomb multistepSootBomb cd multistepSootBomb

Create a cubic domain and use the refined mesh

Min Zhang Implementation of a two-transport equation soot model for sparyFoam 2019-11-27 23 / 30

slide-24
SLIDE 24

Background and Motivation multistepSoot model Case tutorial Case modification

The example of data base in ECN

Search the relevant data from https://ecn.sandia.gov/ecn-data-search/,

Min Zhang Implementation of a two-transport equation soot model for sparyFoam 2019-11-27 24 / 30

slide-25
SLIDE 25

Background and Motivation multistepSoot model Case tutorial Case modification

Injection data

According to the parameters in ECN, we give a part of modified injectionModels.

injectionModels { model1 { massTotal 18e-06; ... //flowType flowRateAndDischarge; flowType pressureDrivenVelocity; Pinj 1557e+5;// innerDiameter 0; duration 0.0068; ... Cd constant 0.8; ... } }

Min Zhang Implementation of a two-transport equation soot model for sparyFoam 2019-11-27 25 / 30

slide-26
SLIDE 26

Background and Motivation multistepSoot model Case tutorial Case modification

Radiation properties

To evoke the soot model, the radiation model has to be switched on. The constants for multistepSoot model also need to be provided

radiation

  • n;

radiationModel P1; ... sootModel multistepSoot<gasHThermoPhysics>; multistepSootCoeffs { Sct 0.7; ... NA 6.02214e+26; }

Min Zhang Implementation of a two-transport equation soot model for sparyFoam 2019-11-27 26 / 30

slide-27
SLIDE 27

Background and Motivation multistepSoot model Case tutorial Case modification

Creating the input file, discrete scheme and iteration solver

Input file for G, soot and PDSoot

cp $FOAM_TUTORIALS/combustion/fireFoam/LES/smallPoolFire3D/0/G 0 cp 0/O2 0/soot cp 0/O2 0/PDSoot sed -i s/O2/soot/g 0/soot sed -i s/O2/PDSoot/g 0/PDSoot

The discrete scheme and iteration solver for soot and PDSoot are needed.

div(phi,soot) Gauss upwind; div(phi,PDSoot) Gauss upwind; "(soot|PDSoot)" { solver PBiCG; preconditioner DILU; tolerance 1e-6; relTol 0; }

Min Zhang Implementation of a two-transport equation soot model for sparyFoam 2019-11-27 27 / 30

slide-28
SLIDE 28

Background and Motivation multistepSoot model Case tutorial Results

temperature, C2H2, soot distribution at 1.4ms

Temperature C2H2 Soot

Min Zhang Implementation of a two-transport equation soot model for sparyFoam 2019-11-27 28 / 30

slide-29
SLIDE 29

Background and Motivation multistepSoot model Case tutorial Results

OH, O2 distribution at 1.4ms

OH O2

Min Zhang Implementation of a two-transport equation soot model for sparyFoam 2019-11-27 29 / 30

slide-30
SLIDE 30

Background and Motivation multistepSoot model Case tutorial Results

Thank you for your attention!

Min Zhang Implementation of a two-transport equation soot model for sparyFoam 2019-11-27 30 / 30