sprayFoam and sprayEngineFoam: Updated thermodynamics to solve EEqn and support h and e

This commit is contained in:
Henry 2012-09-22 22:43:42 +01:00
parent 2997fc7ddb
commit 661c26288d
9 changed files with 9 additions and 95 deletions

View File

@ -1,4 +1,5 @@
EXE_INC = \
-I../reactingParcelFoam \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I${LIB_SRC}/meshTools/lnInclude \
-I${LIB_SRC}/sampling/lnInclude \

View File

@ -1,53 +0,0 @@
tmp<fv::convectionScheme<scalar> > mvConvection
(
fv::convectionScheme<scalar>::New
(
mesh,
fields,
phi,
mesh.divScheme("div(phi,Yi_hs)")
)
);
{
combustion->correct();
dQ = combustion->dQ();
label inertIndex = -1;
volScalarField Yt(0.0*Y[0]);
forAll(Y, i)
{
if (Y[i].name() != inertSpecie)
{
volScalarField& Yi = Y[i];
fvScalarMatrix YiEqn
(
fvm::ddt(rho, Yi)
+ mvConvection->fvmDiv(phi, Yi)
- fvm::laplacian(turbulence->muEff(), Yi)
==
parcels.SYi(i, Yi)
+ combustion->R(Yi)
+ sources(rho, Yi)
);
YiEqn.relax();
sources.constrain(YiEqn);
YiEqn.solve(mesh.solver("Yi"));
Yi.max(0.0);
Yt += Yi;
}
else
{
inertIndex = i;
}
}
Y[inertIndex] = scalar(1) - Yt;
Y[inertIndex].max(0.0);
}

View File

@ -6,6 +6,7 @@
);
psiReactionThermo& thermo = combustion->thermo();
thermo.validate(args.executable(), "h", "e");
SLGThermo slgThermo(mesh, thermo);
@ -23,7 +24,6 @@
}
volScalarField& p = thermo.p();
volScalarField& hs = thermo.he();
const volScalarField& T = thermo.T();
const volScalarField& psi = thermo.psi();
@ -92,7 +92,7 @@
{
fields.add(Y[i]);
}
fields.add(hs);
fields.add(thermo.he());
volScalarField dQ
(

View File

@ -1,28 +0,0 @@
{
fvScalarMatrix hsEqn
(
fvm::ddt(rho, hs)
+ mvConvection->fvmDiv(phi, hs)
- fvm::laplacian(turbulence->alphaEff(), hs)
==
dpdt
- (fvc::ddt(rho, K) + fvc::div(phi, K))
+ parcels.Sh(hs)
+ radiation->Sh(thermo)
+ combustion->Sh()
+ sources(rho, hs)
);
hsEqn.relax();
sources.constrain(hsEqn);
hsEqn.solve();
thermo.correct();
radiation->correct();
Info<< "T gas min/max = " << min(T).value() << ", "
<< max(T).value() << endl;
}

View File

@ -1,5 +1,6 @@
EXE_INC = \
-I.. \
-I../../reactingParcelFoam \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I${LIB_SRC}/meshTools/lnInclude \
-I${LIB_SRC}/sampling/lnInclude \

View File

@ -1,9 +0,0 @@
Info<< "\nConstructing reacting cloud" << endl;
basicSprayCloud parcels
(
"sprayCloud",
rho,
U,
g,
slgThermo
);

View File

@ -60,6 +60,7 @@ int main(int argc, char *argv[])
#include "startSummary.H"
pimpleControl pimple(mesh);
bool solveSpecies = true;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -86,7 +87,7 @@ int main(int argc, char *argv[])
{
#include "UEqn.H"
#include "YEqn.H"
#include "hsEqn.H"
#include "EEqn.H"
// --- Pressure corrector loop
while (pimple.correct())

View File

@ -57,6 +57,7 @@ int main(int argc, char *argv[])
#include "setInitialDeltaT.H"
pimpleControl pimple(mesh);
bool solveSpecies = true;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -81,7 +82,7 @@ int main(int argc, char *argv[])
{
#include "UEqn.H"
#include "YEqn.H"
#include "hsEqn.H"
#include "EEqn.H"
// --- Pressure corrector loop
while (pimple.correct())

View File

@ -36,7 +36,7 @@ divSchemes
div(phi,epsilon) Gauss upwind;
div(U) Gauss linear;
div((muEff*dev2(T(grad(U))))) Gauss linear;
div(phi,Yi_hs) Gauss upwind;
div(phi,Yi_h) Gauss upwind;
}
laplacianSchemes