Fluent 6.0 Staff Training Graham Goldin October 25 2001.

30
Fluent 6.0 Staff Training Graham Goldin October 25 2001

Transcript of Fluent 6.0 Staff Training Graham Goldin October 25 2001.

Fluent 6.0 Staff Training

Graham Goldin

October 25 2001

Company Confidential Copyright 2001 Fluent Inc. All rights reserved. 2

Summary Laminar flames

General finite rate chemistry Premixed laminar flames (flame sheet model) Non-premixed laminar flames (equilibrium f model)

Turbulent flames Enhancement of v5 models Partially premixed model EDC model

Discrete Phase Model Enhancement of v5 models Spray models Multiple surface reactions

Company Confidential Copyright 2001 Fluent Inc. All rights reserved. 3

Laminar Flames

Chemistry invariably stiff Reaction time/length scales << flow time/length scales Special numerical methods required (stiff solvers)

Non-premixed (diffusion flames) Fuel and oxidizer diffuse into the reaction zone, then burn

Premixed Fuel and oxidizer mixed molecularly, then burn Moving reaction front – usually thin and difficult to model Deflagrations

Subsonic: very difficult to model since the flame speed depends on the chemistry as well as the molecular diffusion parameters, and the flame zone must be resolved.

Detonations Supersonic: ignition due to heat release behind shock. Simpler

to model than deflagrations since the shock is not resolved, and detailed molecular transport is not essential.

Company Confidential Copyright 2001 Fluent Inc. All rights reserved. 4

General Finite-Rate Chemistry Fluent v6 can import a CHEMKIN II

detailed chemical mechanism file File -> Import -> Chemkin…

Reactions v5: Arrhenius with reversible reactions and third body efficiencies v6: Pressure dependent reactions (Lindemann, Troe and SRI)

Low pressure and high pressure rates, with blending functions

Molecular transport Critical in subsonic laminar flames since it determines mixing and

flame speeds Recommend using kinetic theory

Can get the Leonard-Jones parameters from the CHEMKIN transport database (TRAN.DB)

Laminar flames

Company Confidential Copyright 2001 Fluent Inc. All rights reserved. 5

Numerical methods Need special numerics since stiff reaction mechanism

Coupled solver Advance species and temperature simultaneously over time step

v6: stiff solver option Use Implicit for subsonic flames Use Explicit for supersonic flames (detonations=explosions)

Segregated solver Default steady, segregated algorithm will diverge Can use unsteady, segregated algorithm, but time step must be

near chemistry time-scale (typical 10-9s): not practical! v6: has a fractional step scheme (hidden from the user)

Laminar flames: General Finite-Rate Chemistry

Company Confidential Copyright 2001 Fluent Inc. All rights reserved. 6

Stiff solver Coupled solver

Preconditioned NS: = preconditioning matrix Q = [, ui, T, Yi]

F = inviscid and viscous fluxes S = source terms

Implicit spatial discretization: J = Jacobian of S = S/Q A = Jacobian of F = F/Q Rn = Residual at previous time step = [F/xi – S]n

Laminar flames: General Finite-Rate Chemistry

Sx

F

t

Q

i

Γ

n

i

tRQx

t

A

Company Confidential Copyright 2001 Fluent Inc. All rights reserved. 7

Implicit stiff coupled solver Default time step (stiff solver inactive)

where max is the maximum eigenvalue of the matrix –1A stiff solver active

where max is the maximum eigenvalue of the matrix –1J,

and 1 is a the max time-step parameter (default = 0.9)

In addition, steady Implicit/Explicit stiff coupled solver Limit updates when solution changing quickly

Qn+1 = Qn + Q

where 3 = positivity rate (default = 0.2)

2 = temp. redux (default = 0.25)

Laminar flames: General Finite-Rate Chemistry

maxxCFL

t

max

1

t

otherwise

TT

132

Stiff solver

Company Confidential Copyright 2001 Fluent Inc. All rights reserved. 8

Example: Mitchell flame Subsonic, methane-air, diffusion flame

Smooke mechanism 16 reactive species, 46 reaction steps

Molecular transport with kinetic theory

Axi-symmetric

Coupled, implicit solver

Thanks to Amish Thaker

Laminar flames: General Finite-Rate Chemistry

Company Confidential Copyright 2001 Fluent Inc. All rights reserved. 9

Example: Mitchell flameLaminar flames: General Finite-Rate Chemistry

Company Confidential Copyright 2001 Fluent Inc. All rights reserved. 10

Example: Mitchell flameLaminar flames: General Finite-Rate Chemistry

Company Confidential Copyright 2001 Fluent Inc. All rights reserved. 11

Convergence tricks Stiff chemistry simulations are very difficult to converge Start with a very coarse grid (~1000 cells)

Multiple adaptions after convergence to add resolution I use region adaption to minimize cell volume changes

Start with a small CFL (~0.01) and ramp up (~100) For premixed and partially premixed flames:

Patch unburnt ahead of stabilizer, burnt behind, or Set premixed inlets to equilibrium (burnt) species and temperature

Disable reactions and solve for mixing. Enable reactions – flame should propagate back to flame stabilizer.

For non-premixed flames: For low temperature inlets and walls, an ignition source is required

Patch high temperature zone in mixing layer. Or, temporarily set an inlet temperature above the ignition temperature

Laminar flames: General Finite-Rate Chemistry

Company Confidential Copyright 2001 Fluent Inc. All rights reserved. 12

Detonation Physics

Premixed fuel and oxidizer Ignition (spark) Slow (subsonic) deflagration transitions to detonation (supersonic) Mixture ignited by heat increase behind shock Front moves at Rankine-Hugoniot speed

Numerics Spark details difficult to capture (small time/length scales) Deflagration to detonation difficult to capture Solution: Skip these and start simulation at detonation

Patch a high pressure in spark zone to initiate shock Acceptable since spark kernel usually small, and simulation not

sensitive to initial conditions Explicit solver for shock capturing: not robust for stiff chemisty Solution: 1 step chemistry with ‘tuned’ kinetics

Acceptable since detonation speed determined only by heat release.

Laminar flames: General Finite-Rate Chemistry

Company Confidential Copyright 2001 Fluent Inc. All rights reserved. 13

Example: Detonation Stochiometric methane-air in an open pipe CH4 + 2O2 -> CO2 + 2H2O

R=Ae-E/RT [CH4][O2]2 A = 1013, E = 1.25*108

Laminar flames: General Finite-Rate Chemistry

Company Confidential Copyright 2001 Fluent Inc. All rights reserved. 14

Numerical methods Segregated solver

Fractional time stepping: over a time step t Advance solution with no chemical source terms

(only convection and diffusion) for t

Then, advance chemistry in each cell for t as a

constant pressure reactor

where the chemical source term S = wk Wk / wk is the reaction rate, Wk is the molecular weight, and is the density

Laminar flames: General Finite-Rate Chemistry

Sdt

dQ

ix

F

t

Q

Company Confidential Copyright 2001 Fluent Inc. All rights reserved. 15

Numerical methods Chemistry integrated with stiff ODE solver CVODE

Requires unsteady solution, even for steady state!

Final solution depends on time step!

Hence, only use for unsteady reacting flows Fractional step scheme is first order accurate in time

Hidden from gui/tui: activate with scheme commands…(rpsetvar ‘stiff-chem-seg? #t)

(models-changed)

Laminar flames: General Finite-Rate Chemistry

Company Confidential Copyright 2001 Fluent Inc. All rights reserved. 16

Example: Rapid Compression Machine

Single, driven piston compresses hydrogen-oxygen-argon mixture which ignites due to heat of compression

Experiments by Lee, D., and Hochgreb, S., “Rapid Compression Machines: Heat Transfer and Suppression of Corner Vortex”, Combustion and Flame 114:531-545, 1998

H2/O2/Ar 8 reacting species, 19 step mechanism

Moving mesh, segregated solver, fractional step stiff chemistry solver

Thanks to Dan Lee

Laminar flames: General Finite-Rate Chemistry

Company Confidential Copyright 2001 Fluent Inc. All rights reserved. 17

Example: Rapid Compression Machine

Validation: comparison of adiabatic, constant volume ignition delay (solid line) vs results from stand alone CHEMKIN code Senkin (square symbols)

Laminar flames: General Finite-Rate Chemistry

0.01

0.1

1

10

100

1000

850 900 950 1000 1050 1100 1150 1200

Temperature (K)

Ign

itio

n D

elay

(m

s)

0.10

1.00

10.00

0.01 0.10 1.00 10.00

Pressure (MPa)

Ign

itio

n D

ela

y (

ms

)

Company Confidential Copyright 2001 Fluent Inc. All rights reserved. 18

Example: Rapid Compression Machine

Mesh

Laminar flames: General Finite-Rate Chemistry

Temperature

Company Confidential Copyright 2001 Fluent Inc. All rights reserved. 19

Example: Rapid Compression Machine

Peak pressures

Laminar flames: General Finite-Rate Chemistry

0

1

2

3

4

5

6

0 1 2 3 4 5 6

Experiment (MPa)

Flu

ent

(MP

a)

950

1000

1050

1100

950 1000 1050 1100

Experiment (K)F

luen

t (K

)

Peak temperatures

0

10

20

30

40

50

60

0 10 20 30 40 50 60

Experiment (ms)

Flu

ent

(ms)

Ignition delay

Company Confidential Copyright 2001 Fluent Inc. All rights reserved. 20

Non-premixed flames Under the assumptions of

chemical equilibrium constant diffusivities for all species and enthalpy (Le=1) constant pressure single, distinct fuel and oxidizer streams (diffusion flame)

the chemistry can be reduced to a single, conserved scalar, the mixture fraction, denoted f

In Fluent, the non-premixed model is only available for turbulent flows, so we have to trick the solver

Rapid solution Minutes, compared to days for the finite rate solver

Laminar flames

Company Confidential Copyright 2001 Fluent Inc. All rights reserved. 21

Strategy Activate k- model, but disable their solution

Initialize k to 10-10 and to 10+10

Turbulent diffusivity ~ 0

Activate Non-premixed model Read in PDF file

Force variance to zero by zeroing production and dissipation constants via scheme…

(rpsetvar ‘cdvar 0)

(rpsetvar ‘cgvar 0)

Set appropriate (or tuned) molecular diffusivity

Laminar flames: Non-premixed flames

Company Confidential Copyright 2001 Fluent Inc. All rights reserved. 22

Example : Mitchell flameLaminar flames: Non-premixed flames

Company Confidential Copyright 2001 Fluent Inc. All rights reserved. 23

Premixed flames Fuel and oxidizer mixed together at molecular level

prior to burning (reactants) Radicals and heat diffuse from burnt products into

unburnt reactants and ignite

Flame moves as a front with laminar flame speed

Laminar flames

Flame thickness = lF

sl

Intermediate specie

Temperature

preheat zone oxidation zoneinner layer

Laminar flame speed = sl

Company Confidential Copyright 2001 Fluent Inc. All rights reserved. 24

Theory

Laminar flame speed, sl, determined by internal flame structure

balance between heat /radical production in inner layer and conduction/diffusion to preheat zone

Requires complex chemistry and transport properties not feasible to resolve in industrial 3D simulations

Laminar flame thickness, lF ~ D / sl, ~ O(0.1mm) D is the thermal diffusivity = cp

Laminar flame speed is a function of reactant temperature, pressure and species composition

measured or computed from 1D complex chemistry simulations determine flammability limits: typically between =0.5 and =1.5,

where is the equivalence ratio = (XF/XO) / (XF/XO)sto

Laminar flames: Premixed flames

Company Confidential Copyright 2001 Fluent Inc. All rights reserved. 25

Strategy Not feasible to resolve the small reaction zone,

as well as the detailed chemistry and molecular

transport properties

Model flame as a sheet propagating with a specified velocity, with heat release at the front

Use the VOF model, with UDFs for propagating speed and heat release

Thanks Boris Makarov and Andrey Troshko

Laminar flames: Premixed flames

Company Confidential Copyright 2001 Fluent Inc. All rights reserved. 26

Flame sheet UDF (1)Laminar flames: Premixed flames

#include "udf.h"

#include "sg.h"

#include "sg_mphase.h"

#include "flow.h"

#include "mem.h"

#define flame_speed 2.;

DEFINE_ADJUST(area_density, domain)

{

Thread *t;

Thread **pt;

cell_t c;

Domain *pDomain = DOMAIN_SUB_DOMAIN(domain,P_PHASE);

real voidx, voidy, voidz=0;

Alloc_Storage_Vars(pDomain,SV_VOF_RG,SV_VOF_G,SV_NULL);

Scalar_Reconstruction(pDomain, SV_VOF,-1,SV_VOF_RG,NULL);

Scalar_Derivatives(pDomain,SV_VOF,-1,SV_VOF_G,SV_VOF_RG,Vof_Deriv_Accumulate);

mp_thread_loop_c (t,domain,pt)

if (FLUID_THREAD_P(t))

{

Company Confidential Copyright 2001 Fluent Inc. All rights reserved. 27

Flame sheet UDF (2)Laminar flames: Premixed flames

Thread *tp = pt[P_PHASE];

begin_c_loop (c,t)

{

voidx = C_VOF_G(c,tp)[0];

voidy = C_VOF_G(c,tp)[1];

#if RP_3D

voidz = C_VOF_G(c,tp)[2];

#endif

/* calculation of the interfacial area density */

C_UDMI(c,t,0)= sqrt( SQR(voidx) + SQR(voidy) + SQR(voidz) );

}

end_c_loop (c,t)

}

Free_Storage_Vars(pDomain,SV_VOF_RG,SV_VOF_G,SV_NULL);

}

Company Confidential Copyright 2001 Fluent Inc. All rights reserved. 28

Flame sheet UDF (3)Laminar flames: Premixed flames

DEFINE_SOURCE(reactants, cell, thread, dS, eqn)

{

real source;

Thread *tm = THREAD_SUPER_THREAD(thread);

Thread **pt = THREAD_SUB_THREADS(tm);

source = - C_UDMI(cell, tm, 0)*C_R(cell,pt[0]);

source *= flame_speed;

dS[eqn] = 0;

return source;

}

DEFINE_SOURCE(product, cell, thread, dS, eqn)

{

real source;

Thread *tm = THREAD_SUPER_THREAD(thread);

Thread **pt = THREAD_SUB_THREADS(tm);

source = C_UDMI(cell, tm, 0)*C_R(cell,pt[0]);

source *= flame_speed;

dS[eqn] = 0;

return source;

}

Company Confidential Copyright 2001 Fluent Inc. All rights reserved. 29

Example: Deflagration Stochiometric methane-air in an open pipe VOF model with UDF

Laminar flames: Premixed

Company Confidential Copyright 2001 Fluent Inc. All rights reserved. 30

Competitors capabilities CFX

Fractional step scheme (pressure based solver)

STAR Offer a link to CHEMKIN Fractional step scheme

GASP/FASTRAN Equivalent coupled, density based solver

Laminar flames