mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Updated enthalpy equations for solvers with chemistry using updated
sensible enthalpy thermo packages - Enthalpy source term now retrieved from the chemistry model (scaled by kappa for the PaSR model)
This commit is contained in:
@ -6,7 +6,7 @@ autoPtr<psiChemistryModel> pChemistry
|
|||||||
);
|
);
|
||||||
psiChemistryModel& chemistry = pChemistry();
|
psiChemistryModel& chemistry = pChemistry();
|
||||||
|
|
||||||
hCombustionThermo& thermo = chemistry.thermo();
|
hsCombustionThermo& thermo = chemistry.thermo();
|
||||||
|
|
||||||
basicMultiComponentMixture& composition = thermo.composition();
|
basicMultiComponentMixture& composition = thermo.composition();
|
||||||
PtrList<volScalarField>& Y = composition.Y();
|
PtrList<volScalarField>& Y = composition.Y();
|
||||||
@ -50,7 +50,7 @@ volVectorField U
|
|||||||
volScalarField& p = thermo.p();
|
volScalarField& p = thermo.p();
|
||||||
const volScalarField& psi = thermo.psi();
|
const volScalarField& psi = thermo.psi();
|
||||||
const volScalarField& T = thermo.T();
|
const volScalarField& T = thermo.T();
|
||||||
volScalarField& h = thermo.h();
|
volScalarField& hs = thermo.hs();
|
||||||
|
|
||||||
|
|
||||||
#include "compressibleCreatePhi.H"
|
#include "compressibleCreatePhi.H"
|
||||||
@ -92,4 +92,18 @@ forAll(Y, i)
|
|||||||
{
|
{
|
||||||
fields.add(Y[i]);
|
fields.add(Y[i]);
|
||||||
}
|
}
|
||||||
fields.add(h);
|
fields.add(hs);
|
||||||
|
|
||||||
|
DimensionedField<scalar, volMesh> chemistrySh
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"chemistry::Sh",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
mesh,
|
||||||
|
dimensionedScalar("chemistrySh", dimEnergy/dimTime/dimVolume, 0.0)
|
||||||
|
);
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Application
|
Application
|
||||||
dieselFoam
|
dieselEngineFoam
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Solver for diesel engine spray and combustion.
|
Solver for diesel engine spray and combustion.
|
||||||
@ -103,13 +103,15 @@ int main(int argc, char *argv[])
|
|||||||
kappa = (runTime.deltaT() + tc)/(runTime.deltaT() + tc + tk);
|
kappa = (runTime.deltaT() + tc)/(runTime.deltaT() + tc + tk);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
chemistrySh = kappa*chemistry.Sh()();
|
||||||
|
|
||||||
#include "rhoEqn.H"
|
#include "rhoEqn.H"
|
||||||
#include "UEqn.H"
|
#include "UEqn.H"
|
||||||
|
|
||||||
for (label ocorr=1; ocorr <= nOuterCorr; ocorr++)
|
for (label ocorr=1; ocorr <= nOuterCorr; ocorr++)
|
||||||
{
|
{
|
||||||
#include "YEqn.H"
|
#include "YEqn.H"
|
||||||
#include "hEqn.H"
|
#include "hsEqn.H"
|
||||||
|
|
||||||
// --- PISO loop
|
// --- PISO loop
|
||||||
for (int corr=1; corr<=nCorr; corr++)
|
for (int corr=1; corr<=nCorr; corr++)
|
||||||
|
|||||||
@ -1,13 +0,0 @@
|
|||||||
{
|
|
||||||
solve
|
|
||||||
(
|
|
||||||
fvm::ddt(rho, h)
|
|
||||||
+ mvConvection->fvmDiv(phi, h)
|
|
||||||
- fvm::laplacian(turbulence->alphaEff(), h)
|
|
||||||
==
|
|
||||||
DpDt
|
|
||||||
+ dieselSpray.heatTransferSource()
|
|
||||||
);
|
|
||||||
|
|
||||||
thermo.correct();
|
|
||||||
}
|
|
||||||
14
applications/solvers/combustion/dieselEngineFoam/hsEqn.H
Normal file
14
applications/solvers/combustion/dieselEngineFoam/hsEqn.H
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
solve
|
||||||
|
(
|
||||||
|
fvm::ddt(rho, hs)
|
||||||
|
+ mvConvection->fvmDiv(phi, hs)
|
||||||
|
- fvm::laplacian(turbulence->alphaEff(), hs)
|
||||||
|
==
|
||||||
|
DpDt
|
||||||
|
+ dieselSpray.heatTransferSource()().dimensionedInternalField()
|
||||||
|
+ chemistrySh
|
||||||
|
);
|
||||||
|
|
||||||
|
thermo.correct();
|
||||||
|
}
|
||||||
@ -100,7 +100,7 @@ int main(int argc, char *argv[])
|
|||||||
for (label ocorr=1; ocorr <= nOuterCorr; ocorr++)
|
for (label ocorr=1; ocorr <= nOuterCorr; ocorr++)
|
||||||
{
|
{
|
||||||
#include "YEqn.H"
|
#include "YEqn.H"
|
||||||
#include "hEqn.H"
|
#include "hsEqn.H"
|
||||||
|
|
||||||
// --- PISO loop
|
// --- PISO loop
|
||||||
for (int corr=1; corr<=nCorr; corr++)
|
for (int corr=1; corr<=nCorr; corr++)
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I../XiFoam \
|
|
||||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||||
|
|||||||
15
applications/solvers/combustion/reactingFoam/UEqn.H
Normal file
15
applications/solvers/combustion/reactingFoam/UEqn.H
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
fvVectorMatrix UEqn
|
||||||
|
(
|
||||||
|
fvm::ddt(rho, U)
|
||||||
|
+ fvm::div(phi, U)
|
||||||
|
+ turbulence->divDevRhoReff(U)
|
||||||
|
==
|
||||||
|
rho*g
|
||||||
|
);
|
||||||
|
|
||||||
|
UEqn.relax();
|
||||||
|
|
||||||
|
if (momentumPredictor)
|
||||||
|
{
|
||||||
|
solve(UEqn == -fvc::grad(p));
|
||||||
|
}
|
||||||
@ -21,4 +21,6 @@
|
|||||||
{
|
{
|
||||||
kappa = 1.0;
|
kappa = 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
chemistrySh = kappa*chemistry.Sh()();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,7 +5,7 @@ autoPtr<psiChemistryModel> pChemistry
|
|||||||
);
|
);
|
||||||
psiChemistryModel& chemistry = pChemistry();
|
psiChemistryModel& chemistry = pChemistry();
|
||||||
|
|
||||||
hCombustionThermo& thermo = chemistry.thermo();
|
hsCombustionThermo& thermo = chemistry.thermo();
|
||||||
|
|
||||||
basicMultiComponentMixture& composition = thermo.composition();
|
basicMultiComponentMixture& composition = thermo.composition();
|
||||||
PtrList<volScalarField>& Y = composition.Y();
|
PtrList<volScalarField>& Y = composition.Y();
|
||||||
@ -40,8 +40,8 @@ volVectorField U
|
|||||||
|
|
||||||
volScalarField& p = thermo.p();
|
volScalarField& p = thermo.p();
|
||||||
const volScalarField& psi = thermo.psi();
|
const volScalarField& psi = thermo.psi();
|
||||||
volScalarField& h = thermo.h();
|
volScalarField& hs = thermo.hs();
|
||||||
|
const volScalarField& T = thermo.T();
|
||||||
|
|
||||||
#include "compressibleCreatePhi.H"
|
#include "compressibleCreatePhi.H"
|
||||||
|
|
||||||
@ -81,5 +81,18 @@ forAll(Y, i)
|
|||||||
{
|
{
|
||||||
fields.add(Y[i]);
|
fields.add(Y[i]);
|
||||||
}
|
}
|
||||||
fields.add(h);
|
fields.add(hs);
|
||||||
|
|
||||||
|
DimensionedField<scalar, volMesh> chemistrySh
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"chemistry::Sh",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
mesh,
|
||||||
|
dimensionedScalar("chemistrySh", dimEnergy/dimTime/dimVolume, 0.0)
|
||||||
|
);
|
||||||
|
|||||||
20
applications/solvers/combustion/reactingFoam/hsEqn.H
Normal file
20
applications/solvers/combustion/reactingFoam/hsEqn.H
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
fvScalarMatrix hsEqn
|
||||||
|
(
|
||||||
|
fvm::ddt(rho, hs)
|
||||||
|
+ mvConvection->fvmDiv(phi, hs)
|
||||||
|
// - fvm::laplacian(turbulence->alphaEff(), hs)
|
||||||
|
- fvm::laplacian(turbulence->muEff(), hs) // unit lewis no.
|
||||||
|
==
|
||||||
|
DpDt
|
||||||
|
+ chemistrySh
|
||||||
|
);
|
||||||
|
|
||||||
|
hsEqn.relax();
|
||||||
|
hsEqn.solve();
|
||||||
|
|
||||||
|
thermo.correct();
|
||||||
|
|
||||||
|
Info<< "T gas min/max = " << min(T).value() << ", "
|
||||||
|
<< max(T).value() << endl;
|
||||||
|
}
|
||||||
72
applications/solvers/combustion/reactingFoam/pEqn.H
Normal file
72
applications/solvers/combustion/reactingFoam/pEqn.H
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
rho = thermo.rho();
|
||||||
|
|
||||||
|
volScalarField rUA = 1.0/UEqn.A();
|
||||||
|
U = rUA*UEqn.H();
|
||||||
|
|
||||||
|
if (transonic)
|
||||||
|
{
|
||||||
|
surfaceScalarField phid
|
||||||
|
(
|
||||||
|
"phid",
|
||||||
|
fvc::interpolate(psi)
|
||||||
|
*(
|
||||||
|
(fvc::interpolate(U) & mesh.Sf())
|
||||||
|
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||||
|
{
|
||||||
|
fvScalarMatrix pEqn
|
||||||
|
(
|
||||||
|
fvm::ddt(psi, p)
|
||||||
|
+ fvm::div(phid, p)
|
||||||
|
- fvm::laplacian(rho*rUA, p)
|
||||||
|
// ==
|
||||||
|
// RRTot
|
||||||
|
);
|
||||||
|
|
||||||
|
pEqn.solve();
|
||||||
|
|
||||||
|
if (nonOrth == nNonOrthCorr)
|
||||||
|
{
|
||||||
|
phi == pEqn.flux();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
phi =
|
||||||
|
fvc::interpolate(rho)
|
||||||
|
*(
|
||||||
|
(fvc::interpolate(U) & mesh.Sf())
|
||||||
|
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
||||||
|
);
|
||||||
|
|
||||||
|
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||||
|
{
|
||||||
|
fvScalarMatrix pEqn
|
||||||
|
(
|
||||||
|
fvm::ddt(psi, p)
|
||||||
|
+ fvc::div(phi)
|
||||||
|
- fvm::laplacian(rho*rUA, p)
|
||||||
|
// ==
|
||||||
|
// RRTot
|
||||||
|
);
|
||||||
|
|
||||||
|
pEqn.solve();
|
||||||
|
|
||||||
|
if (nonOrth == nNonOrthCorr)
|
||||||
|
{
|
||||||
|
phi += pEqn.flux();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#include "rhoEqn.H"
|
||||||
|
#include "compressibleContinuityErrs.H"
|
||||||
|
|
||||||
|
U -= rUA*fvc::grad(p);
|
||||||
|
U.correctBoundaryConditions();
|
||||||
|
|
||||||
|
DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
|
||||||
@ -73,9 +73,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
#include "UEqn.H"
|
#include "UEqn.H"
|
||||||
#include "YEqn.H"
|
#include "YEqn.H"
|
||||||
|
#include "hsEqn.H"
|
||||||
#define Db turbulence->alphaEff()
|
|
||||||
#include "hEqn.H"
|
|
||||||
|
|
||||||
// --- PISO loop
|
// --- PISO loop
|
||||||
for (int corr=1; corr<=nCorr; corr++)
|
for (int corr=1; corr<=nCorr; corr++)
|
||||||
|
|||||||
42
applications/solvers/combustion/reactingFoam/rhoEqn.H
Normal file
42
applications/solvers/combustion/reactingFoam/rhoEqn.H
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by the
|
||||||
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
|
option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
Global
|
||||||
|
rhoEqn
|
||||||
|
|
||||||
|
Description
|
||||||
|
Solve the continuity for density.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
{
|
||||||
|
solve
|
||||||
|
(
|
||||||
|
fvm::ddt(rho) + fvc::div(phi)
|
||||||
|
// ==
|
||||||
|
// RRTot
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -1,5 +1,4 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I../XiFoam \
|
|
||||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||||
|
|||||||
15
applications/solvers/combustion/rhoReactingFoam/UEqn.H
Normal file
15
applications/solvers/combustion/rhoReactingFoam/UEqn.H
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
fvVectorMatrix UEqn
|
||||||
|
(
|
||||||
|
fvm::ddt(rho, U)
|
||||||
|
+ fvm::div(phi, U)
|
||||||
|
+ turbulence->divDevRhoReff(U)
|
||||||
|
==
|
||||||
|
rho*g
|
||||||
|
);
|
||||||
|
|
||||||
|
UEqn.relax();
|
||||||
|
|
||||||
|
if (momentumPredictor)
|
||||||
|
{
|
||||||
|
solve(UEqn == -fvc::grad(p));
|
||||||
|
}
|
||||||
@ -21,4 +21,6 @@
|
|||||||
{
|
{
|
||||||
kappa = 1.0;
|
kappa = 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
chemistrySh = kappa*chemistry.Sh()();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,7 +5,7 @@ autoPtr<rhoChemistryModel> pChemistry
|
|||||||
);
|
);
|
||||||
rhoChemistryModel& chemistry = pChemistry();
|
rhoChemistryModel& chemistry = pChemistry();
|
||||||
|
|
||||||
hReactionThermo& thermo = chemistry.thermo();
|
hsReactionThermo& thermo = chemistry.thermo();
|
||||||
|
|
||||||
basicMultiComponentMixture& composition = thermo.composition();
|
basicMultiComponentMixture& composition = thermo.composition();
|
||||||
PtrList<volScalarField>& Y = composition.Y();
|
PtrList<volScalarField>& Y = composition.Y();
|
||||||
@ -40,7 +40,8 @@ volVectorField U
|
|||||||
|
|
||||||
volScalarField& p = thermo.p();
|
volScalarField& p = thermo.p();
|
||||||
const volScalarField& psi = thermo.psi();
|
const volScalarField& psi = thermo.psi();
|
||||||
volScalarField& h = thermo.h();
|
volScalarField& hs = thermo.hs();
|
||||||
|
const volScalarField& T = thermo.T();
|
||||||
|
|
||||||
|
|
||||||
#include "compressibleCreatePhi.H"
|
#include "compressibleCreatePhi.H"
|
||||||
@ -81,5 +82,18 @@ forAll(Y, i)
|
|||||||
{
|
{
|
||||||
fields.add(Y[i]);
|
fields.add(Y[i]);
|
||||||
}
|
}
|
||||||
fields.add(h);
|
fields.add(hs);
|
||||||
|
|
||||||
|
DimensionedField<scalar, volMesh> chemistrySh
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"chemistry::Sh",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
mesh,
|
||||||
|
dimensionedScalar("chemistrySh", dimEnergy/dimTime/dimVolume, 0.0)
|
||||||
|
);
|
||||||
|
|||||||
19
applications/solvers/combustion/rhoReactingFoam/hsEqn.H
Normal file
19
applications/solvers/combustion/rhoReactingFoam/hsEqn.H
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
fvScalarMatrix hsEqn
|
||||||
|
(
|
||||||
|
fvm::ddt(rho, hs)
|
||||||
|
+ mvConvection->fvmDiv(phi, hs)
|
||||||
|
- fvm::laplacian(turbulence->alphaEff(), hs)
|
||||||
|
==
|
||||||
|
DpDt
|
||||||
|
+ chemistrySh
|
||||||
|
);
|
||||||
|
|
||||||
|
hsEqn.relax();
|
||||||
|
hsEqn.solve();
|
||||||
|
|
||||||
|
thermo.correct();
|
||||||
|
|
||||||
|
Info<< "T gas min/max = " << min(T).value() << ", "
|
||||||
|
<< max(T).value() << endl;
|
||||||
|
}
|
||||||
@ -74,7 +74,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
#include "UEqn.H"
|
#include "UEqn.H"
|
||||||
#include "YEqn.H"
|
#include "YEqn.H"
|
||||||
#include "hEqn.H"
|
#include "hsEqn.H"
|
||||||
|
|
||||||
// --- PISO loop
|
// --- PISO loop
|
||||||
for (int corr=1; corr<=nCorr; corr++)
|
for (int corr=1; corr<=nCorr; corr++)
|
||||||
|
|||||||
@ -22,4 +22,6 @@
|
|||||||
{
|
{
|
||||||
kappa = 1.0;
|
kappa = 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
chemistrySh = kappa*chemistry.Sh()();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -84,16 +84,8 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
coalParcels.evolve();
|
coalParcels.evolve();
|
||||||
|
|
||||||
coalParcels.info();
|
|
||||||
|
|
||||||
Info<< endl;
|
|
||||||
|
|
||||||
limestoneParcels.evolve();
|
limestoneParcels.evolve();
|
||||||
|
|
||||||
limestoneParcels.info();
|
|
||||||
|
|
||||||
Info<< endl;
|
|
||||||
|
|
||||||
#include "chemistry.H"
|
#include "chemistry.H"
|
||||||
#include "rhoEqn.H"
|
#include "rhoEqn.H"
|
||||||
|
|
||||||
@ -102,16 +94,13 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
#include "UEqn.H"
|
#include "UEqn.H"
|
||||||
#include "YEqn.H"
|
#include "YEqn.H"
|
||||||
#include "hEqn.H"
|
#include "hsEqn.H"
|
||||||
|
|
||||||
// --- PISO loop
|
// --- PISO loop
|
||||||
for (int corr=1; corr<=nCorr; corr++)
|
for (int corr=1; corr<=nCorr; corr++)
|
||||||
{
|
{
|
||||||
#include "pEqn.H"
|
#include "pEqn.H"
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "T gas min/max = " << min(T).value() << ", "
|
|
||||||
<< max(T).value() << endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
turbulence->correct();
|
turbulence->correct();
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
);
|
);
|
||||||
psiChemistryModel& chemistry = pChemistry();
|
psiChemistryModel& chemistry = pChemistry();
|
||||||
|
|
||||||
hCombustionThermo& thermo = chemistry.thermo();
|
hsCombustionThermo& thermo = chemistry.thermo();
|
||||||
|
|
||||||
basicMultiComponentMixture& composition = thermo.composition();
|
basicMultiComponentMixture& composition = thermo.composition();
|
||||||
PtrList<volScalarField>& Y = composition.Y();
|
PtrList<volScalarField>& Y = composition.Y();
|
||||||
@ -22,7 +22,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
volScalarField& p = thermo.p();
|
volScalarField& p = thermo.p();
|
||||||
volScalarField& h = thermo.h();
|
volScalarField& hs = thermo.hs();
|
||||||
const volScalarField& T = thermo.T();
|
const volScalarField& T = thermo.T();
|
||||||
const volScalarField& psi = thermo.psi();
|
const volScalarField& psi = thermo.psi();
|
||||||
|
|
||||||
@ -32,7 +32,7 @@
|
|||||||
{
|
{
|
||||||
fields.add(Y[i]);
|
fields.add(Y[i]);
|
||||||
}
|
}
|
||||||
fields.add(h);
|
fields.add(hs);
|
||||||
|
|
||||||
volScalarField rho
|
volScalarField rho
|
||||||
(
|
(
|
||||||
@ -133,5 +133,19 @@
|
|||||||
"energy",
|
"energy",
|
||||||
mesh,
|
mesh,
|
||||||
dimEnergy/dimTime/dimVolume,
|
dimEnergy/dimTime/dimVolume,
|
||||||
"h"
|
"hs"
|
||||||
|
);
|
||||||
|
|
||||||
|
DimensionedField<scalar, volMesh> chemistrySh
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"chemistry::Sh",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
mesh,
|
||||||
|
dimensionedScalar("chemistrySh", dimEnergy/dimTime/dimVolume, 0.0)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -1,22 +0,0 @@
|
|||||||
{
|
|
||||||
fvScalarMatrix hEqn
|
|
||||||
(
|
|
||||||
fvm::ddt(rho, h)
|
|
||||||
+ mvConvection->fvmDiv(phi, h)
|
|
||||||
- fvm::laplacian(turbulence->alphaEff(), h)
|
|
||||||
==
|
|
||||||
DpDt
|
|
||||||
+ coalParcels.Sh()
|
|
||||||
+ limestoneParcels.Sh()
|
|
||||||
+ enthalpySource.Su()
|
|
||||||
+ radiation->Sh(thermo)
|
|
||||||
);
|
|
||||||
|
|
||||||
hEqn.relax();
|
|
||||||
|
|
||||||
hEqn.solve();
|
|
||||||
|
|
||||||
thermo.correct();
|
|
||||||
|
|
||||||
radiation->correct();
|
|
||||||
}
|
|
||||||
26
applications/solvers/lagrangian/coalChemistryFoam/hsEqn.H
Normal file
26
applications/solvers/lagrangian/coalChemistryFoam/hsEqn.H
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
fvScalarMatrix hsEqn
|
||||||
|
(
|
||||||
|
fvm::ddt(rho, hs)
|
||||||
|
+ mvConvection->fvmDiv(phi, hs)
|
||||||
|
- fvm::laplacian(turbulence->alphaEff(), hs)
|
||||||
|
==
|
||||||
|
DpDt
|
||||||
|
+ coalParcels.Sh()
|
||||||
|
+ limestoneParcels.Sh()
|
||||||
|
+ enthalpySource.Su()
|
||||||
|
+ radiation->Shs(thermo)
|
||||||
|
+ chemistrySh
|
||||||
|
);
|
||||||
|
|
||||||
|
hsEqn.relax();
|
||||||
|
|
||||||
|
hsEqn.solve();
|
||||||
|
|
||||||
|
thermo.correct();
|
||||||
|
|
||||||
|
radiation->correct();
|
||||||
|
|
||||||
|
Info<< "T gas min/max = " << min(T).value() << ", "
|
||||||
|
<< max(T).value() << endl;
|
||||||
|
}
|
||||||
@ -22,4 +22,6 @@
|
|||||||
{
|
{
|
||||||
kappa = 1.0;
|
kappa = 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
chemistrySh = kappa*chemistry.Sh()();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
);
|
);
|
||||||
rhoChemistryModel& chemistry = pChemistry();
|
rhoChemistryModel& chemistry = pChemistry();
|
||||||
|
|
||||||
hReactionThermo& thermo = chemistry.thermo();
|
hsReactionThermo& thermo = chemistry.thermo();
|
||||||
|
|
||||||
basicMultiComponentMixture& composition = thermo.composition();
|
basicMultiComponentMixture& composition = thermo.composition();
|
||||||
PtrList<volScalarField>& Y = composition.Y();
|
PtrList<volScalarField>& Y = composition.Y();
|
||||||
@ -22,7 +22,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
volScalarField& p = thermo.p();
|
volScalarField& p = thermo.p();
|
||||||
volScalarField& h = thermo.h();
|
volScalarField& hs = thermo.hs();
|
||||||
const volScalarField& T = thermo.T();
|
const volScalarField& T = thermo.T();
|
||||||
const volScalarField& psi = thermo.psi();
|
const volScalarField& psi = thermo.psi();
|
||||||
|
|
||||||
@ -88,4 +88,18 @@
|
|||||||
{
|
{
|
||||||
fields.add(Y[i]);
|
fields.add(Y[i]);
|
||||||
}
|
}
|
||||||
fields.add(h);
|
fields.add(hs);
|
||||||
|
|
||||||
|
DimensionedField<scalar, volMesh> chemistrySh
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"chemistry::Sh",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
mesh,
|
||||||
|
dimensionedScalar("chemistrySh", dimEnergy/dimTime/dimVolume, 0.0)
|
||||||
|
);
|
||||||
|
|||||||
@ -32,14 +32,15 @@
|
|||||||
{
|
{
|
||||||
solve
|
solve
|
||||||
(
|
(
|
||||||
fvm::ddt(rho, h)
|
fvm::ddt(rho, hs)
|
||||||
+ mvConvection->fvmDiv(phi, h)
|
+ mvConvection->fvmDiv(phi, hs)
|
||||||
- fvm::laplacian(turbulence->alphaEff(), h)
|
- fvm::laplacian(turbulence->alphaEff(), hs)
|
||||||
==
|
==
|
||||||
pWork()
|
pWork()
|
||||||
+ parcels.Sh()
|
+ parcels.Sh()
|
||||||
+ radiation->Sh(thermo)
|
+ radiation->Shs(thermo)
|
||||||
+ energySource.Su()
|
+ energySource.Su()
|
||||||
|
+ chemistrySh
|
||||||
);
|
);
|
||||||
|
|
||||||
thermo.correct();
|
thermo.correct();
|
||||||
@ -33,7 +33,7 @@ Description
|
|||||||
The solver includes:
|
The solver includes:
|
||||||
- reacting multiphase parcel cloud
|
- reacting multiphase parcel cloud
|
||||||
- porous media
|
- porous media
|
||||||
- point mass sources
|
- mass, momentum and energy sources
|
||||||
- polynomial based, incompressible thermodynamics (f(T))
|
- polynomial based, incompressible thermodynamics (f(T))
|
||||||
|
|
||||||
Note: ddtPhiCorr not used here when porous zones are active
|
Note: ddtPhiCorr not used here when porous zones are active
|
||||||
@ -89,13 +89,11 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
parcels.evolve();
|
parcels.evolve();
|
||||||
|
|
||||||
parcels.info();
|
|
||||||
|
|
||||||
#include "chemistry.H"
|
#include "chemistry.H"
|
||||||
#include "rhoEqn.H"
|
#include "rhoEqn.H"
|
||||||
#include "UEqn.H"
|
#include "UEqn.H"
|
||||||
#include "YEqn.H"
|
#include "YEqn.H"
|
||||||
#include "hEqn.H"
|
#include "hsEqn.H"
|
||||||
|
|
||||||
// --- PISO loop
|
// --- PISO loop
|
||||||
for (int corr=0; corr<nCorr; corr++)
|
for (int corr=0; corr<nCorr; corr++)
|
||||||
|
|||||||
@ -22,4 +22,6 @@
|
|||||||
{
|
{
|
||||||
kappa = 1.0;
|
kappa = 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
chemistrySh = kappa*chemistry.Sh()();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
);
|
);
|
||||||
psiChemistryModel& chemistry = pChemistry();
|
psiChemistryModel& chemistry = pChemistry();
|
||||||
|
|
||||||
hCombustionThermo& thermo = chemistry.thermo();
|
hsCombustionThermo& thermo = chemistry.thermo();
|
||||||
|
|
||||||
basicMultiComponentMixture& composition = thermo.composition();
|
basicMultiComponentMixture& composition = thermo.composition();
|
||||||
PtrList<volScalarField>& Y = composition.Y();
|
PtrList<volScalarField>& Y = composition.Y();
|
||||||
@ -22,7 +22,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
volScalarField& p = thermo.p();
|
volScalarField& p = thermo.p();
|
||||||
volScalarField& h = thermo.h();
|
volScalarField& hs = thermo.hs();
|
||||||
const volScalarField& T = thermo.T();
|
const volScalarField& T = thermo.T();
|
||||||
const volScalarField& psi = thermo.psi();
|
const volScalarField& psi = thermo.psi();
|
||||||
|
|
||||||
@ -94,4 +94,18 @@
|
|||||||
{
|
{
|
||||||
fields.add(Y[i]);
|
fields.add(Y[i]);
|
||||||
}
|
}
|
||||||
fields.add(h);
|
fields.add(hs);
|
||||||
|
|
||||||
|
DimensionedField<scalar, volMesh> chemistrySh
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"chemistry::Sh",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
mesh,
|
||||||
|
dimensionedScalar("chemistry::Sh", dimEnergy/dimTime/dimVolume, 0.0)
|
||||||
|
);
|
||||||
|
|||||||
@ -1,20 +0,0 @@
|
|||||||
{
|
|
||||||
fvScalarMatrix hEqn
|
|
||||||
(
|
|
||||||
fvm::ddt(rho, h)
|
|
||||||
+ mvConvection->fvmDiv(phi, h)
|
|
||||||
- fvm::laplacian(turbulence->alphaEff(), h)
|
|
||||||
==
|
|
||||||
DpDt
|
|
||||||
+ parcels.Sh()
|
|
||||||
+ radiation->Sh(thermo)
|
|
||||||
);
|
|
||||||
|
|
||||||
hEqn.relax();
|
|
||||||
|
|
||||||
hEqn.solve();
|
|
||||||
|
|
||||||
thermo.correct();
|
|
||||||
|
|
||||||
radiation->correct();
|
|
||||||
}
|
|
||||||
24
applications/solvers/lagrangian/reactingParcelFoam/hsEqn.H
Normal file
24
applications/solvers/lagrangian/reactingParcelFoam/hsEqn.H
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
fvScalarMatrix hEqn
|
||||||
|
(
|
||||||
|
fvm::ddt(rho, hs)
|
||||||
|
+ mvConvection->fvmDiv(phi, hs)
|
||||||
|
- fvm::laplacian(turbulence->alphaEff(), hs)
|
||||||
|
==
|
||||||
|
DpDt
|
||||||
|
+ parcels.Sh()
|
||||||
|
+ radiation->Shs(thermo)
|
||||||
|
+ chemistrySh
|
||||||
|
);
|
||||||
|
|
||||||
|
hEqn.relax();
|
||||||
|
|
||||||
|
hEqn.solve();
|
||||||
|
|
||||||
|
thermo.correct();
|
||||||
|
|
||||||
|
radiation->correct();
|
||||||
|
|
||||||
|
Info<< "T gas min/max = " << min(T).value() << ", "
|
||||||
|
<< max(T).value() << endl;
|
||||||
|
}
|
||||||
@ -74,8 +74,6 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
parcels.evolve();
|
parcels.evolve();
|
||||||
|
|
||||||
parcels.info();
|
|
||||||
|
|
||||||
#include "chemistry.H"
|
#include "chemistry.H"
|
||||||
#include "rhoEqn.H"
|
#include "rhoEqn.H"
|
||||||
|
|
||||||
@ -88,12 +86,9 @@ int main(int argc, char *argv[])
|
|||||||
// --- PISO loop
|
// --- PISO loop
|
||||||
for (int corr=1; corr<=nCorr; corr++)
|
for (int corr=1; corr<=nCorr; corr++)
|
||||||
{
|
{
|
||||||
#include "hEqn.H"
|
#include "hsEqn.H"
|
||||||
#include "pEqn.H"
|
#include "pEqn.H"
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "T gas min/max = " << min(T).value() << ", "
|
|
||||||
<< max(T).value() << endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
turbulence->correct();
|
turbulence->correct();
|
||||||
|
|||||||
Reference in New Issue
Block a user