mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
sprayFoam and sprayEngineFoam: Updated thermodynamics to solve EEqn and support h and e
This commit is contained in:
@ -1,4 +1,5 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
|
-I../reactingParcelFoam \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I${LIB_SRC}/meshTools/lnInclude \
|
-I${LIB_SRC}/meshTools/lnInclude \
|
||||||
-I${LIB_SRC}/sampling/lnInclude \
|
-I${LIB_SRC}/sampling/lnInclude \
|
||||||
|
|||||||
@ -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);
|
|
||||||
}
|
|
||||||
@ -6,6 +6,7 @@
|
|||||||
);
|
);
|
||||||
|
|
||||||
psiReactionThermo& thermo = combustion->thermo();
|
psiReactionThermo& thermo = combustion->thermo();
|
||||||
|
thermo.validate(args.executable(), "h", "e");
|
||||||
|
|
||||||
SLGThermo slgThermo(mesh, thermo);
|
SLGThermo slgThermo(mesh, thermo);
|
||||||
|
|
||||||
@ -23,7 +24,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
volScalarField& p = thermo.p();
|
volScalarField& p = thermo.p();
|
||||||
volScalarField& hs = thermo.he();
|
|
||||||
const volScalarField& T = thermo.T();
|
const volScalarField& T = thermo.T();
|
||||||
const volScalarField& psi = thermo.psi();
|
const volScalarField& psi = thermo.psi();
|
||||||
|
|
||||||
@ -92,7 +92,7 @@
|
|||||||
{
|
{
|
||||||
fields.add(Y[i]);
|
fields.add(Y[i]);
|
||||||
}
|
}
|
||||||
fields.add(hs);
|
fields.add(thermo.he());
|
||||||
|
|
||||||
volScalarField dQ
|
volScalarField dQ
|
||||||
(
|
(
|
||||||
|
|||||||
@ -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;
|
|
||||||
}
|
|
||||||
@ -1,5 +1,6 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I.. \
|
-I.. \
|
||||||
|
-I../../reactingParcelFoam \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I${LIB_SRC}/meshTools/lnInclude \
|
-I${LIB_SRC}/meshTools/lnInclude \
|
||||||
-I${LIB_SRC}/sampling/lnInclude \
|
-I${LIB_SRC}/sampling/lnInclude \
|
||||||
|
|||||||
@ -1,9 +0,0 @@
|
|||||||
Info<< "\nConstructing reacting cloud" << endl;
|
|
||||||
basicSprayCloud parcels
|
|
||||||
(
|
|
||||||
"sprayCloud",
|
|
||||||
rho,
|
|
||||||
U,
|
|
||||||
g,
|
|
||||||
slgThermo
|
|
||||||
);
|
|
||||||
@ -60,6 +60,7 @@ int main(int argc, char *argv[])
|
|||||||
#include "startSummary.H"
|
#include "startSummary.H"
|
||||||
|
|
||||||
pimpleControl pimple(mesh);
|
pimpleControl pimple(mesh);
|
||||||
|
bool solveSpecies = true;
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -86,7 +87,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
#include "UEqn.H"
|
#include "UEqn.H"
|
||||||
#include "YEqn.H"
|
#include "YEqn.H"
|
||||||
#include "hsEqn.H"
|
#include "EEqn.H"
|
||||||
|
|
||||||
// --- Pressure corrector loop
|
// --- Pressure corrector loop
|
||||||
while (pimple.correct())
|
while (pimple.correct())
|
||||||
|
|||||||
@ -57,6 +57,7 @@ int main(int argc, char *argv[])
|
|||||||
#include "setInitialDeltaT.H"
|
#include "setInitialDeltaT.H"
|
||||||
|
|
||||||
pimpleControl pimple(mesh);
|
pimpleControl pimple(mesh);
|
||||||
|
bool solveSpecies = true;
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -81,7 +82,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
#include "UEqn.H"
|
#include "UEqn.H"
|
||||||
#include "YEqn.H"
|
#include "YEqn.H"
|
||||||
#include "hsEqn.H"
|
#include "EEqn.H"
|
||||||
|
|
||||||
// --- Pressure corrector loop
|
// --- Pressure corrector loop
|
||||||
while (pimple.correct())
|
while (pimple.correct())
|
||||||
|
|||||||
@ -36,7 +36,7 @@ divSchemes
|
|||||||
div(phi,epsilon) Gauss upwind;
|
div(phi,epsilon) Gauss upwind;
|
||||||
div(U) Gauss linear;
|
div(U) Gauss linear;
|
||||||
div((muEff*dev2(T(grad(U))))) Gauss linear;
|
div((muEff*dev2(T(grad(U))))) Gauss linear;
|
||||||
div(phi,Yi_hs) Gauss upwind;
|
div(phi,Yi_h) Gauss upwind;
|
||||||
}
|
}
|
||||||
|
|
||||||
laplacianSchemes
|
laplacianSchemes
|
||||||
|
|||||||
Reference in New Issue
Block a user