YEEqn.H
Go to the documentation of this file.
1tmp<fv::convectionScheme<scalar>> mvConvection
2(
3 fv::convectionScheme<scalar>::New
4 (
5 mesh,
6 fields,
7 phi,
8 mesh.divScheme("div(phi,Yi_h)")
9 )
10);
11{
12 combustion->correct();
13 Qdot = combustion->Qdot();
14 volScalarField Yt(0.0*Y[0]);
15
17 {
18 if (i != inertIndex && composition.active(i))
19 {
20 volScalarField& Yi = Y[i];
21
22 fvScalarMatrix YiEqn
23 (
24 fvm::ddt(rho, Yi)
25 + mvConvection->fvmDiv(phi, Yi)
26 - fvm::laplacian(turbulence->alphaEff(), Yi)
27 ==
28 parcels.SYi(i, Yi)
29 + surfaceFilm.Srho(i)
30 + combustion->R(Yi)
31 + fvOptions(rho, Yi)
32 );
33
34 YiEqn.relax();
35
36 fvOptions.constrain(YiEqn);
37
38 YiEqn.solve(mesh.solver("Yi"));
39
40 fvOptions.correct(Yi);
41
42 Yi.max(0.0);
43 Yt += Yi;
44 }
45 }
46
47 Y[inertIndex] = scalar(1) - Yt;
48 Y[inertIndex].max(0.0);
49
50 radiation->correct();
51
52 volScalarField& he = thermo.he();
53
54 fvScalarMatrix EEqn
55 (
56 fvm::ddt(rho, he) + mvConvection->fvmDiv(phi, he)
57 + fvc::ddt(rho, K) + fvc::div(phi, K)
58 + (
59 he.name() == "e"
60 ? fvc::div
61 (
62 fvc::absolute(phi/fvc::interpolate(rho), U),
63 p,
64 "div(phiv,p)"
65 )
66 : -dpdt
67 )
68 - fvm::laplacian(turbulence->alphaEff(), he)
69 ==
70 Qdot
71 + radiation->Sh(thermo, he)
72 + parcels.Sh(he)
73 + surfaceFilm.Sh()
74 + fvOptions(rho, he)
75 );
76
77 EEqn.relax();
78
79 fvOptions.constrain(EEqn);
80
81 EEqn.solve();
82
83 fvOptions.correct(he);
84
85 thermo.correct();
86
87 Info<< "min/max(T) = "
88 << min(T).value() << ", " << max(T).value() << endl;
89}
CGAL::Exact_predicates_exact_constructions_kernel K
Qdot
Definition: YEEqn.H:13
volScalarField Yt(0.0 *Y[0])
Y[inertIndex] max(0.0)
volScalarField & he
Definition: YEEqn.H:52
tmp< fv::convectionScheme< scalar > > mvConvection(fv::convectionScheme< scalar >::New(mesh, fields, phi, mesh.divScheme("div(phi,Yi_h)")))
Y[inertIndex]
Definition: YEEqn.H:47
fvScalarMatrix EEqn(fvm::ddt(rho, he)+mvConvection->fvmDiv(phi, he)+fvc::ddt(rho, K)+fvc::div(phi, K)+(he.name()=="e" ? fvc::div(fvc::absolute(phi/fvc::interpolate(rho), U), p, "div(phiv,p)") :-dpdt) - fvm::laplacian(turbulence->alphaEff(), he)==Qdot+radiation->Sh(thermo, he)+parcels.Sh(he)+surfaceFilm.Sh()+fvOptions(rho, he))
fv::options & fvOptions
surfaceScalarField & phi
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
U
Definition: pEqn.H:72
basicSpecieMixture & composition
volScalarField & p
const volScalarField & T
regionModels::surfaceFilmModel & surfaceFilm
dynamicFvMesh & mesh
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
volScalarField & dpdt
label inertIndex
compressible::turbulenceModel & turbulence
Info<< "Creating combustion model\n"<< endl;autoPtr< CombustionModel< psiReactionThermo > > combustion(CombustionModel< psiReactionThermo >::New(thermo, turbulence()))
multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
Definition: createFields.H:97
#define forAll(list, i)
Loop across all elements in list.
Definition: stdFoam.H:333