mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
sprayFoam: Updated following changes to reactingParcelFoam
This commit is contained in:
40
applications/solvers/lagrangian/sprayFoam/EEqn.H
Normal file
40
applications/solvers/lagrangian/sprayFoam/EEqn.H
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
volScalarField& he = thermo.he();
|
||||||
|
|
||||||
|
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)
|
||||||
|
==
|
||||||
|
rho*(U&g)
|
||||||
|
+ parcels.Sh(he)
|
||||||
|
+ radiation->Sh(thermo, he)
|
||||||
|
+ Qdot
|
||||||
|
+ fvOptions(rho, he)
|
||||||
|
);
|
||||||
|
|
||||||
|
EEqn.relax();
|
||||||
|
|
||||||
|
fvOptions.constrain(EEqn);
|
||||||
|
|
||||||
|
EEqn.solve();
|
||||||
|
|
||||||
|
fvOptions.correct(he);
|
||||||
|
|
||||||
|
thermo.correct();
|
||||||
|
radiation->correct();
|
||||||
|
|
||||||
|
Info<< "T gas min/max " << min(T).value() << ", "
|
||||||
|
<< max(T).value() << endl;
|
||||||
|
}
|
||||||
49
applications/solvers/lagrangian/sprayFoam/YEqn.H
Normal file
49
applications/solvers/lagrangian/sprayFoam/YEqn.H
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
tmp<fv::convectionScheme<scalar>> mvConvection
|
||||||
|
(
|
||||||
|
fv::convectionScheme<scalar>::New
|
||||||
|
(
|
||||||
|
mesh,
|
||||||
|
fields,
|
||||||
|
phi,
|
||||||
|
mesh.divScheme("div(phi,Yi_h)")
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
{
|
||||||
|
combustion->correct();
|
||||||
|
Qdot = combustion->Qdot();
|
||||||
|
volScalarField Yt(0.0*Y[0]);
|
||||||
|
|
||||||
|
forAll(Y, i)
|
||||||
|
{
|
||||||
|
if (i != inertIndex && composition.active(i))
|
||||||
|
{
|
||||||
|
volScalarField& Yi = Y[i];
|
||||||
|
|
||||||
|
fvScalarMatrix YEqn
|
||||||
|
(
|
||||||
|
fvm::ddt(rho, Yi)
|
||||||
|
+ mvConvection->fvmDiv(phi, Yi)
|
||||||
|
- fvm::laplacian(turbulence->muEff(), Yi)
|
||||||
|
==
|
||||||
|
parcels.SYi(i, Yi)
|
||||||
|
+ combustion->R(Yi)
|
||||||
|
+ fvOptions(rho, Yi)
|
||||||
|
);
|
||||||
|
|
||||||
|
YEqn.relax();
|
||||||
|
|
||||||
|
fvOptions.constrain(YEqn);
|
||||||
|
|
||||||
|
YEqn.solve(mesh.solver("Yi"));
|
||||||
|
|
||||||
|
fvOptions.correct(Yi);
|
||||||
|
|
||||||
|
Yi.max(0.0);
|
||||||
|
Yt += Yi;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Y[inertIndex] = scalar(1) - Yt;
|
||||||
|
Y[inertIndex].max(0.0);
|
||||||
|
}
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
const volScalarField& T = thermo.T();
|
||||||
|
const volScalarField& psi = thermo.psi();
|
||||||
|
const label inertIndex(composition.species()[inertSpecie]);
|
||||||
Reference in New Issue
Block a user