mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' into cvm
Conflicts: src/meshTools/searchableSurface/closedTriSurfaceMesh.C src/meshTools/searchableSurface/closedTriSurfaceMesh.H
This commit is contained in:
@ -16,6 +16,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/ODE/lnInclude \
|
||||
-I$(LIB_SRC)/engine/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/combustionModels/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lengine \
|
||||
@ -35,4 +36,5 @@ EXE_LIBS = \
|
||||
-llaminarFlameSpeedModels \
|
||||
-lchemistryModel \
|
||||
-lODE \
|
||||
-ldistributionModels
|
||||
-ldistributionModels \
|
||||
-lcombustionModels
|
||||
|
||||
@ -10,7 +10,8 @@ tmp<fv::convectionScheme<scalar> > mvConvection
|
||||
);
|
||||
|
||||
{
|
||||
|
||||
combustion->correct();
|
||||
dQ = combustion->dQ();
|
||||
label inertIndex = -1;
|
||||
volScalarField Yt(0.0*Y[0]);
|
||||
|
||||
@ -20,17 +21,19 @@ tmp<fv::convectionScheme<scalar> > mvConvection
|
||||
{
|
||||
volScalarField& Yi = Y[i];
|
||||
|
||||
solve
|
||||
fvScalarMatrix YiEqn
|
||||
(
|
||||
fvm::ddt(rho, Yi)
|
||||
+ mvConvection->fvmDiv(phi, Yi)
|
||||
- fvm::laplacian(turbulence->muEff(), Yi)
|
||||
==
|
||||
dieselSpray.evaporationSource(i)
|
||||
+ kappa*chemistry.RR(i),
|
||||
mesh.solver("Yi")
|
||||
+ combustion->R(Yi)
|
||||
);
|
||||
|
||||
YiEqn.relax();
|
||||
YiEqn.solve(mesh.solver("Yi"));
|
||||
|
||||
Yi.max(0.0);
|
||||
Yt += Yi;
|
||||
}
|
||||
|
||||
@ -1,10 +1,14 @@
|
||||
Info<< nl << "Reading thermophysicalProperties" << endl;
|
||||
Info<< "Creating combustion model\n" << endl;
|
||||
|
||||
autoPtr<psiChemistryModel> pChemistry
|
||||
autoPtr<combustionModels::psiChemistryCombustionModel> combustion
|
||||
(
|
||||
psiChemistryModel::New(mesh)
|
||||
combustionModels::psiChemistryCombustionModel::New
|
||||
(
|
||||
mesh
|
||||
)
|
||||
);
|
||||
psiChemistryModel& chemistry = pChemistry();
|
||||
|
||||
psiChemistryModel& chemistry = combustion->pChemistry();
|
||||
|
||||
hsCombustionThermo& thermo = chemistry.thermo();
|
||||
|
||||
@ -55,20 +59,6 @@ volScalarField& hs = thermo.hs();
|
||||
|
||||
#include "compressibleCreatePhi.H"
|
||||
|
||||
volScalarField kappa
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"kappa",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("zero", dimless, 0.0)
|
||||
);
|
||||
|
||||
Info << "Creating turbulence model.\n" << nl;
|
||||
autoPtr<compressible::turbulenceModel> turbulence
|
||||
(
|
||||
@ -81,6 +71,9 @@ autoPtr<compressible::turbulenceModel> turbulence
|
||||
)
|
||||
);
|
||||
|
||||
// Set the turbulence into the combustion model
|
||||
combustion->setTurbulence(turbulence());
|
||||
|
||||
Info<< "Creating field DpDt\n" << endl;
|
||||
volScalarField DpDt
|
||||
(
|
||||
@ -96,16 +89,16 @@ forAll(Y, i)
|
||||
}
|
||||
fields.add(hs);
|
||||
|
||||
DimensionedField<scalar, volMesh> chemistrySh
|
||||
volScalarField dQ
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"chemistry::Sh",
|
||||
"dQ",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("chemistrySh", dimEnergy/dimTime/dimVolume, 0.0)
|
||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
|
||||
);
|
||||
|
||||
@ -32,8 +32,8 @@ Description
|
||||
#include "fvCFD.H"
|
||||
#include "engineTime.H"
|
||||
#include "engineMesh.H"
|
||||
#include "hCombustionThermo.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "psiChemistryCombustionModel.H"
|
||||
#include "spray.H"
|
||||
#include "psiChemistryModel.H"
|
||||
#include "chemistrySolver.H"
|
||||
@ -54,7 +54,6 @@ int main(int argc, char *argv[])
|
||||
#include "createEngineMesh.H"
|
||||
#include "createFields.H"
|
||||
#include "readGravitationalAcceleration.H"
|
||||
#include "readCombustionProperties.H"
|
||||
#include "createSpray.H"
|
||||
#include "initContinuityErrs.H"
|
||||
#include "readEngineTimeControls.H"
|
||||
@ -82,29 +81,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
dieselSpray.evolve();
|
||||
|
||||
Info<< "Solving chemistry" << endl;
|
||||
|
||||
chemistry.solve
|
||||
(
|
||||
runTime.value() - runTime.deltaTValue(),
|
||||
runTime.deltaTValue()
|
||||
);
|
||||
|
||||
// turbulent time scale
|
||||
{
|
||||
volScalarField tk
|
||||
(
|
||||
Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon())
|
||||
);
|
||||
volScalarField tc(chemistry.tc());
|
||||
|
||||
// Chalmers PaSR model
|
||||
kappa = (runTime.deltaT() + tc)/(runTime.deltaT() + tc + tk);
|
||||
}
|
||||
|
||||
chemistrySh = kappa*chemistry.Sh()();
|
||||
|
||||
|
||||
#include "rhoEqn.H"
|
||||
|
||||
for (pimple.start(); pimple.loop(); pimple++)
|
||||
@ -130,10 +106,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
rho = thermo.rho();
|
||||
|
||||
if (runTime.write())
|
||||
{
|
||||
chemistry.dQ()().write();
|
||||
}
|
||||
runTime.write();
|
||||
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
|
||||
@ -1,14 +1,21 @@
|
||||
{
|
||||
solve
|
||||
fvScalarMatrix hsEqn
|
||||
(
|
||||
fvm::ddt(rho, hs)
|
||||
+ mvConvection->fvmDiv(phi, hs)
|
||||
- fvm::laplacian(turbulence->alphaEff(), hs)
|
||||
==
|
||||
DpDt
|
||||
+ dieselSpray.heatTransferSource()().dimensionedInternalField()
|
||||
+ chemistrySh
|
||||
DpDt
|
||||
+ combustion->Sh()
|
||||
+ dieselSpray.heatTransferSource()()
|
||||
|
||||
);
|
||||
|
||||
hsEqn.relax();
|
||||
hsEqn.solve();
|
||||
|
||||
thermo.correct();
|
||||
|
||||
Info<< "min/max(T) = "
|
||||
<< min(T).value() << ", " << max(T).value() << endl;
|
||||
}
|
||||
|
||||
@ -1,18 +0,0 @@
|
||||
Info<< "Reading combustion properties\n" << endl;
|
||||
|
||||
IOdictionary combustionProperties
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"combustionProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
||||
dimensionedScalar Cmix
|
||||
(
|
||||
combustionProperties.lookup("Cmix")
|
||||
);
|
||||
@ -14,7 +14,8 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \
|
||||
-I$(LIB_SRC)/../applications/solvers/reactionThermo/XiFoam \
|
||||
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
||||
-I$(LIB_SRC)/ODE/lnInclude
|
||||
-I$(LIB_SRC)/ODE/lnInclude \
|
||||
-I$(LIB_SRC)/combustionModels/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lcompressibleTurbulenceModel \
|
||||
@ -33,4 +34,5 @@ EXE_LIBS = \
|
||||
-lchemistryModel \
|
||||
-lODE \
|
||||
-ldistributionModels \
|
||||
-lfiniteVolume
|
||||
-lfiniteVolume \
|
||||
-lcombustionModels
|
||||
|
||||
@ -30,12 +30,11 @@ Description
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "hCombustionThermo.H"
|
||||
#include "psiChemistryCombustionModel.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "spray.H"
|
||||
#include "psiChemistryModel.H"
|
||||
#include "chemistrySolver.H"
|
||||
|
||||
#include "spray.H"
|
||||
#include "multivariateScheme.H"
|
||||
#include "IFstream.H"
|
||||
#include "OFstream.H"
|
||||
@ -52,7 +51,6 @@ int main(int argc, char *argv[])
|
||||
#include "createMesh.H"
|
||||
#include "createFields.H"
|
||||
#include "readGravitationalAcceleration.H"
|
||||
#include "readCombustionProperties.H"
|
||||
#include "createSpray.H"
|
||||
#include "initContinuityErrs.H"
|
||||
#include "readTimeControls.H"
|
||||
@ -79,26 +77,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
Info<< "Solving chemistry" << endl;
|
||||
|
||||
chemistry.solve
|
||||
(
|
||||
runTime.value() - runTime.deltaTValue(),
|
||||
runTime.deltaTValue()
|
||||
);
|
||||
|
||||
// turbulent time scale
|
||||
{
|
||||
volScalarField tk
|
||||
(
|
||||
Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon())
|
||||
);
|
||||
volScalarField tc(chemistry.tc());
|
||||
|
||||
// Chalmers PaSR model
|
||||
kappa = (runTime.deltaT() + tc)/(runTime.deltaT()+tc+tk);
|
||||
}
|
||||
|
||||
chemistrySh = kappa*chemistry.Sh()();
|
||||
|
||||
#include "rhoEqn.H"
|
||||
|
||||
// --- Pressure-velocity PIMPLE corrector loop
|
||||
@ -124,10 +102,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
rho = thermo.rho();
|
||||
|
||||
if (runTime.write())
|
||||
{
|
||||
chemistry.dQ()().write();
|
||||
}
|
||||
runTime.write();
|
||||
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
|
||||
@ -20,7 +20,6 @@ tmp<fv::convectionScheme<scalar> > mvConvection
|
||||
if (Y[i].name() != inertSpecie)
|
||||
{
|
||||
volScalarField& Yi = Y[i];
|
||||
fvScalarMatrix R(combustion->R(Yi));
|
||||
|
||||
fvScalarMatrix YiEqn
|
||||
(
|
||||
@ -30,7 +29,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection
|
||||
==
|
||||
parcels.SYi(i, Yi)
|
||||
+ surfaceFilm.Srho(i)
|
||||
+ R
|
||||
+ combustion->R(Yi)
|
||||
);
|
||||
|
||||
YiEqn.relax();
|
||||
@ -55,7 +54,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection
|
||||
- fvm::laplacian(turbulence->alphaEff(), hs)
|
||||
==
|
||||
DpDt
|
||||
+ dQ
|
||||
+ combustion->Sh()
|
||||
+ radiation->Shs(thermo)
|
||||
+ parcels.Sh(hs)
|
||||
+ surfaceFilm.Sh()
|
||||
@ -66,5 +65,6 @@ tmp<fv::convectionScheme<scalar> > mvConvection
|
||||
|
||||
thermo.correct();
|
||||
|
||||
Info<< "min/max(T) = " << min(T).value() << ", " << max(T).value() << endl;
|
||||
Info<< "min/max(T) = "
|
||||
<< min(T).value() << ", " << max(T).value() << endl;
|
||||
}
|
||||
|
||||
@ -1,10 +1,16 @@
|
||||
Info<< "Creating combustion model\n" << endl;
|
||||
|
||||
autoPtr<combustionModels::psiCombustionModel> combustion
|
||||
(
|
||||
combustionModels::psiCombustionModel::New
|
||||
(
|
||||
mesh
|
||||
)
|
||||
);
|
||||
|
||||
Info<< "Reading thermophysical properties\n" << endl;
|
||||
|
||||
autoPtr<hsCombustionThermo> pThermo
|
||||
(
|
||||
hsCombustionThermo::New(mesh)
|
||||
);
|
||||
hsCombustionThermo& thermo = pThermo();
|
||||
hsCombustionThermo& thermo = combustion->thermo();
|
||||
|
||||
SLGThermo slgThermo(mesh, thermo);
|
||||
|
||||
@ -60,30 +66,8 @@
|
||||
)
|
||||
);
|
||||
|
||||
IOdictionary combustionProperties
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"combustionProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
||||
Info<< "Creating combustion model\n" << endl;
|
||||
autoPtr<combustionModel> combustion
|
||||
(
|
||||
combustionModel::combustionModel::New
|
||||
(
|
||||
combustionProperties,
|
||||
thermo,
|
||||
turbulence(),
|
||||
phi,
|
||||
rho
|
||||
)
|
||||
);
|
||||
// Set the turbulence into the combustion model
|
||||
combustion->setTurbulence(turbulence());
|
||||
|
||||
volScalarField dQ
|
||||
(
|
||||
@ -96,7 +80,7 @@
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("dQ", dimMass/pow3(dimTime)/dimLength, 0.0)
|
||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
|
||||
);
|
||||
|
||||
Info<< "Creating field DpDt\n" << endl;
|
||||
|
||||
@ -38,9 +38,8 @@ Description
|
||||
#include "pyrolysisModel.H"
|
||||
#include "radiationModel.H"
|
||||
#include "SLGThermo.H"
|
||||
#include "hsCombustionThermo.H"
|
||||
#include "solidChemistryModel.H"
|
||||
#include "combustionModel.H"
|
||||
#include "psiCombustionModel.H"
|
||||
#include "pimpleControl.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -51,7 +50,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "readChemistryProperties.H"
|
||||
#include "readGravitationalAcceleration.H"
|
||||
#include "createFields.H"
|
||||
#include "createClouds.H"
|
||||
|
||||
@ -1,23 +0,0 @@
|
||||
Info<< "Reading chemistry properties\n" << endl;
|
||||
|
||||
IOdictionary chemistryProperties
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"chemistryProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
)
|
||||
);
|
||||
|
||||
Switch turbulentReaction(chemistryProperties.lookup("turbulentReaction"));
|
||||
|
||||
dimensionedScalar Cmix("Cmix", dimless, 1.0);
|
||||
|
||||
if (turbulentReaction)
|
||||
{
|
||||
chemistryProperties.lookup("Cmix") >> Cmix;
|
||||
}
|
||||
@ -5,7 +5,8 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
||||
-I$(LIB_SRC)/ODE/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/combustionModels/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lcompressibleTurbulenceModel \
|
||||
@ -16,4 +17,5 @@ EXE_LIBS = \
|
||||
-lbasicThermophysicalModels \
|
||||
-lchemistryModel \
|
||||
-lODE \
|
||||
-lfiniteVolume
|
||||
-lfiniteVolume \
|
||||
-lcombustionModels
|
||||
|
||||
@ -10,6 +10,8 @@ tmp<fv::convectionScheme<scalar> > mvConvection
|
||||
);
|
||||
|
||||
{
|
||||
combustion->correct();
|
||||
dQ = combustion->dQ();
|
||||
label inertIndex = -1;
|
||||
volScalarField Yt(0.0*Y[0]);
|
||||
|
||||
@ -19,16 +21,18 @@ tmp<fv::convectionScheme<scalar> > mvConvection
|
||||
{
|
||||
volScalarField& Yi = Y[i];
|
||||
|
||||
solve
|
||||
fvScalarMatrix YiEqn
|
||||
(
|
||||
fvm::ddt(rho, Yi)
|
||||
+ mvConvection->fvmDiv(phi, Yi)
|
||||
- fvm::laplacian(turbulence->muEff(), Yi)
|
||||
==
|
||||
kappa*chemistry.RR(i),
|
||||
mesh.solver("Yi")
|
||||
combustion->R(Yi)
|
||||
);
|
||||
|
||||
YiEqn.relax();
|
||||
YiEqn.solve(mesh.solver("Yi"));
|
||||
|
||||
Yi.max(0.0);
|
||||
Yt += Yi;
|
||||
}
|
||||
|
||||
@ -1,44 +0,0 @@
|
||||
if (chemistry.chemistry())
|
||||
{
|
||||
Info<< "Solving chemistry" << endl;
|
||||
|
||||
chemistry.solve
|
||||
(
|
||||
runTime.value() - runTime.deltaTValue(),
|
||||
runTime.deltaTValue()
|
||||
);
|
||||
|
||||
// turbulent time scale
|
||||
if (turbulentReaction)
|
||||
{
|
||||
tmp<volScalarField> tepsilon(turbulence->epsilon());
|
||||
const volScalarField& epsilon = tepsilon();
|
||||
tmp<volScalarField> tmuEff(turbulence->muEff());
|
||||
const volScalarField& muEff = tmuEff();
|
||||
tmp<volScalarField> ttc(chemistry.tc());
|
||||
const volScalarField& tc = ttc();
|
||||
|
||||
forAll(epsilon, i)
|
||||
{
|
||||
if (epsilon[i] > 0)
|
||||
{
|
||||
// Chalmers PaSR model
|
||||
scalar tk = Cmix.value()*Foam::sqrt(muEff[i]/rho[i]/epsilon[i]);
|
||||
kappa[i] =
|
||||
(runTime.deltaTValue() + tc[i])
|
||||
/(runTime.deltaTValue() + tc[i] + tk);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Return to laminar combustion
|
||||
kappa[i] = 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
kappa = 1.0;
|
||||
}
|
||||
|
||||
chemistrySh = kappa*chemistry.Sh()();
|
||||
}
|
||||
@ -1,9 +1,14 @@
|
||||
Info<< nl << "Reading thermophysicalProperties" << endl;
|
||||
autoPtr<psiChemistryModel> pChemistry
|
||||
Info<< "Creating combustion model\n" << endl;
|
||||
|
||||
autoPtr<combustionModels::psiChemistryCombustionModel> combustion
|
||||
(
|
||||
psiChemistryModel::New(mesh)
|
||||
combustionModels::psiChemistryCombustionModel::New
|
||||
(
|
||||
mesh
|
||||
)
|
||||
);
|
||||
psiChemistryModel& chemistry = pChemistry();
|
||||
|
||||
psiChemistryModel& chemistry = combustion->pChemistry();
|
||||
|
||||
hsCombustionThermo& thermo = chemistry.thermo();
|
||||
|
||||
@ -45,20 +50,6 @@ const volScalarField& T = thermo.T();
|
||||
|
||||
#include "compressibleCreatePhi.H"
|
||||
|
||||
volScalarField kappa
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"kappa",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("zero", dimless, 0.0)
|
||||
);
|
||||
|
||||
Info << "Creating turbulence model.\n" << nl;
|
||||
autoPtr<compressible::turbulenceModel> turbulence
|
||||
(
|
||||
@ -71,6 +62,9 @@ autoPtr<compressible::turbulenceModel> turbulence
|
||||
)
|
||||
);
|
||||
|
||||
// Set the turbulence into the combustion model
|
||||
combustion->setTurbulence(turbulence());
|
||||
|
||||
Info<< "Creating field DpDt\n" << endl;
|
||||
volScalarField DpDt
|
||||
(
|
||||
@ -85,16 +79,16 @@ forAll(Y, i)
|
||||
}
|
||||
fields.add(hs);
|
||||
|
||||
DimensionedField<scalar, volMesh> chemistrySh
|
||||
volScalarField dQ
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"chemistry::Sh",
|
||||
"dQ",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("chemistrySh", dimEnergy/dimTime/dimVolume, 0.0)
|
||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
|
||||
);
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
// - fvm::laplacian(turbulence->muEff(), hs) // unit lewis no.
|
||||
==
|
||||
DpDt
|
||||
+ chemistrySh
|
||||
+ combustion->Sh()
|
||||
);
|
||||
|
||||
hsEqn.relax();
|
||||
|
||||
@ -30,10 +30,8 @@ Description
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "hCombustionThermo.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "psiChemistryModel.H"
|
||||
#include "chemistrySolver.H"
|
||||
#include "psiChemistryCombustionModel.H"
|
||||
#include "multivariateScheme.H"
|
||||
#include "pimpleControl.H"
|
||||
|
||||
@ -44,7 +42,6 @@ int main(int argc, char *argv[])
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "readChemistryProperties.H"
|
||||
#include "readGravitationalAcceleration.H"
|
||||
#include "createFields.H"
|
||||
#include "initContinuityErrs.H"
|
||||
@ -67,7 +64,6 @@ int main(int argc, char *argv[])
|
||||
runTime++;
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
#include "chemistry.H"
|
||||
#include "rhoEqn.H"
|
||||
|
||||
for (pimple.start(); pimple.loop(); pimple++)
|
||||
@ -88,11 +84,6 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
if (runTime.write())
|
||||
{
|
||||
chemistry.dQ()().write();
|
||||
}
|
||||
|
||||
runTime.write();
|
||||
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
|
||||
@ -1,23 +0,0 @@
|
||||
Info<< "Reading chemistry properties\n" << endl;
|
||||
|
||||
IOdictionary chemistryProperties
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"chemistryProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
)
|
||||
);
|
||||
|
||||
Switch turbulentReaction(chemistryProperties.lookup("turbulentReaction"));
|
||||
|
||||
dimensionedScalar Cmix("Cmix", dimless, 1.0);
|
||||
|
||||
if (turbulentReaction)
|
||||
{
|
||||
chemistryProperties.lookup("Cmix") >> Cmix;
|
||||
}
|
||||
@ -6,7 +6,8 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
||||
-I$(LIB_SRC)/ODE/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(FOAM_SOLVERS)/combustion/reactingFoam
|
||||
-I$(FOAM_SOLVERS)/combustion/reactingFoam \
|
||||
-I$(LIB_SRC)/combustionModels/lnInclude
|
||||
|
||||
|
||||
EXE_LIBS = \
|
||||
@ -18,4 +19,5 @@ EXE_LIBS = \
|
||||
-lbasicThermophysicalModels \
|
||||
-lchemistryModel \
|
||||
-lODE \
|
||||
-lfiniteVolume
|
||||
-lfiniteVolume \
|
||||
-lcombustionModels
|
||||
|
||||
@ -10,6 +10,8 @@ tmp<fv::convectionScheme<scalar> > mvConvection
|
||||
);
|
||||
|
||||
{
|
||||
combustion->correct();
|
||||
dQ = combustion->dQ();
|
||||
label inertIndex = -1;
|
||||
volScalarField Yt(0.0*Y[0]);
|
||||
|
||||
@ -19,14 +21,13 @@ tmp<fv::convectionScheme<scalar> > mvConvection
|
||||
{
|
||||
volScalarField& Yi = Y[i];
|
||||
|
||||
solve
|
||||
fvScalarMatrix YiEqn
|
||||
(
|
||||
fvm::ddt(rho, Yi)
|
||||
+ mvConvection->fvmDiv(phi, Yi)
|
||||
- fvm::laplacian(turbulence->muEff(), Yi)
|
||||
==
|
||||
kappa*chemistry.RR(i),
|
||||
mesh.solver("Yi")
|
||||
combustion->R(Yi)
|
||||
);
|
||||
|
||||
Yi.max(0.0);
|
||||
|
||||
@ -1,9 +1,14 @@
|
||||
Info<< nl << "Reading thermophysicalProperties" << endl;
|
||||
autoPtr<rhoChemistryModel> pChemistry
|
||||
Info<< "Creating combustion model\n" << endl;
|
||||
|
||||
autoPtr<combustionModels::rhoChemistryCombustionModel> combustion
|
||||
(
|
||||
rhoChemistryModel::New(mesh)
|
||||
combustionModels::rhoChemistryCombustionModel::New
|
||||
(
|
||||
mesh
|
||||
)
|
||||
);
|
||||
rhoChemistryModel& chemistry = pChemistry();
|
||||
|
||||
rhoChemistryModel& chemistry = combustion->pChemistry();
|
||||
|
||||
hsReactionThermo& thermo = chemistry.thermo();
|
||||
|
||||
@ -46,19 +51,6 @@ const volScalarField& T = thermo.T();
|
||||
|
||||
#include "compressibleCreatePhi.H"
|
||||
|
||||
volScalarField kappa
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"kappa",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("zero", dimless, 0.0)
|
||||
);
|
||||
|
||||
Info << "Creating turbulence model.\n" << nl;
|
||||
autoPtr<compressible::turbulenceModel> turbulence
|
||||
@ -72,6 +64,9 @@ autoPtr<compressible::turbulenceModel> turbulence
|
||||
)
|
||||
);
|
||||
|
||||
// Set the turbulence into the combustion model
|
||||
combustion->setTurbulence(turbulence());
|
||||
|
||||
Info<< "Creating field DpDt\n" << endl;
|
||||
volScalarField DpDt
|
||||
(
|
||||
@ -86,16 +81,16 @@ forAll(Y, i)
|
||||
}
|
||||
fields.add(hs);
|
||||
|
||||
DimensionedField<scalar, volMesh> chemistrySh
|
||||
volScalarField dQ
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"chemistry::Sh",
|
||||
"dQ",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("chemistrySh", dimEnergy/dimTime/dimVolume, 0.0)
|
||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
|
||||
);
|
||||
|
||||
@ -4,9 +4,10 @@
|
||||
fvm::ddt(rho, hs)
|
||||
+ mvConvection->fvmDiv(phi, hs)
|
||||
- fvm::laplacian(turbulence->alphaEff(), hs)
|
||||
// - fvm::laplacian(turbulence->muEff(), hs) // unit lewis no.
|
||||
==
|
||||
DpDt
|
||||
+ chemistrySh
|
||||
+ combustion->Sh()
|
||||
);
|
||||
|
||||
hsEqn.relax();
|
||||
@ -14,6 +15,6 @@
|
||||
|
||||
thermo.correct();
|
||||
|
||||
Info<< "T gas min/max = " << min(T).value() << ", "
|
||||
<< max(T).value() << endl;
|
||||
Info<< "min/max(T) = "
|
||||
<< min(T).value() << ", " << max(T).value() << endl;
|
||||
}
|
||||
|
||||
@ -1,23 +0,0 @@
|
||||
Info<< "Reading chemistry properties\n" << endl;
|
||||
|
||||
IOdictionary chemistryProperties
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"chemistryProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
)
|
||||
);
|
||||
|
||||
Switch turbulentReaction(chemistryProperties.lookup("turbulentReaction"));
|
||||
|
||||
dimensionedScalar Cmix("Cmix", dimless, 1.0);
|
||||
|
||||
if (turbulentReaction)
|
||||
{
|
||||
chemistryProperties.lookup("Cmix") >> Cmix;
|
||||
}
|
||||
@ -31,10 +31,8 @@ Description
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "hReactionThermo.H"
|
||||
#include "rhoChemistryCombustionModel.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "rhoChemistryModel.H"
|
||||
#include "chemistrySolver.H"
|
||||
#include "multivariateScheme.H"
|
||||
#include "pimpleControl.H"
|
||||
|
||||
@ -45,7 +43,6 @@ int main(int argc, char *argv[])
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "readChemistryProperties.H"
|
||||
#include "readGravitationalAcceleration.H"
|
||||
#include "createFields.H"
|
||||
#include "initContinuityErrs.H"
|
||||
@ -68,7 +65,6 @@ int main(int argc, char *argv[])
|
||||
runTime++;
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
#include "chemistry.H"
|
||||
#include "rhoEqn.H"
|
||||
|
||||
// --- Pressure-velocity PIMPLE corrector loop
|
||||
@ -92,10 +88,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
rho = thermo.rho();
|
||||
|
||||
if (runTime.write())
|
||||
{
|
||||
chemistry.dQ()().write();
|
||||
}
|
||||
runTime.write();
|
||||
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basicSolidThermo/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels \
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \
|
||||
|
||||
@ -36,11 +36,9 @@ Description
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "hReactionThermo.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "basicReactingMultiphaseCloud.H"
|
||||
#include "rhoChemistryModel.H"
|
||||
#include "chemistrySolver.H"
|
||||
#include "rhoChemistryCombustionModel.H"
|
||||
#include "radiationModel.H"
|
||||
#include "porousZones.H"
|
||||
#include "timeActivatedExplicitSource.H"
|
||||
@ -75,7 +73,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
while (runTime.run())
|
||||
{
|
||||
#include "readChemistryProperties.H"
|
||||
#include "readAdditionalSolutionControls.H"
|
||||
#include "readTimeControls.H"
|
||||
|
||||
@ -85,7 +82,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
parcels.evolve();
|
||||
|
||||
#include "chemistry.H"
|
||||
#include "timeScales.H"
|
||||
|
||||
#include "rhoEqn.H"
|
||||
@ -111,10 +107,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
if (runTime.write())
|
||||
{
|
||||
chemistry.dQ()().write();
|
||||
}
|
||||
runTime.write();
|
||||
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
|
||||
@ -20,7 +20,8 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/ODE/lnInclude \
|
||||
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
||||
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/combustionModels/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
@ -44,4 +45,5 @@ EXE_LIBS = \
|
||||
-lODE \
|
||||
-lregionModels \
|
||||
-lsurfaceFilmModels \
|
||||
-lsampling
|
||||
-lsampling \
|
||||
-lcombustionModels
|
||||
|
||||
@ -9,6 +9,9 @@ tmp<fv::convectionScheme<scalar> > mvConvection
|
||||
)
|
||||
);
|
||||
|
||||
combustion->correct();
|
||||
dQ = combustion->dQ();
|
||||
|
||||
if (solveSpecies)
|
||||
{
|
||||
label inertIndex = -1;
|
||||
@ -19,14 +22,15 @@ if (solveSpecies)
|
||||
if (Y[i].name() != inertSpecie)
|
||||
{
|
||||
volScalarField& Yi = Y[i];
|
||||
|
||||
solve
|
||||
(
|
||||
fvm::ddt(rho, Yi)
|
||||
+ mvConvection->fvmDiv(phi, Yi)
|
||||
- fvm::laplacian(turbulence->muEff(), Yi)
|
||||
==
|
||||
==
|
||||
parcels.SYi(i, Yi)
|
||||
+ kappa*chemistry.RR(i)().dimensionedInternalField()
|
||||
+ combustion->R(Yi)
|
||||
+ massSource.Su(i),
|
||||
mesh.solver("Yi")
|
||||
);
|
||||
|
||||
@ -1,10 +1,14 @@
|
||||
Info<< "Reading thermophysical properties\n" << endl;
|
||||
Info<< "Creating combustion model\n" << endl;
|
||||
|
||||
autoPtr<rhoChemistryModel> pChemistry
|
||||
autoPtr<combustionModels::rhoChemistryCombustionModel> combustion
|
||||
(
|
||||
rhoChemistryModel::New(mesh)
|
||||
combustionModels::rhoChemistryCombustionModel::New
|
||||
(
|
||||
mesh
|
||||
)
|
||||
);
|
||||
rhoChemistryModel& chemistry = pChemistry();
|
||||
|
||||
rhoChemistryModel& chemistry = combustion->pChemistry();
|
||||
|
||||
hsReactionThermo& thermo = chemistry.thermo();
|
||||
|
||||
@ -57,20 +61,6 @@
|
||||
|
||||
#include "compressibleCreatePhi.H"
|
||||
|
||||
DimensionedField<scalar, volMesh> kappa
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"kappa",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("zero", dimless, 0.0)
|
||||
);
|
||||
|
||||
dimensionedScalar rhoMax
|
||||
(
|
||||
mesh.solutionDict().subDict("PIMPLE").lookup("rhoMax")
|
||||
@ -93,6 +83,9 @@
|
||||
)
|
||||
);
|
||||
|
||||
// Set the turbulence into the combustion model
|
||||
combustion->setTurbulence(turbulence());
|
||||
|
||||
Info<< "Creating multi-variate interpolation scheme\n" << endl;
|
||||
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
|
||||
|
||||
@ -102,20 +95,21 @@
|
||||
}
|
||||
fields.add(hs);
|
||||
|
||||
DimensionedField<scalar, volMesh> chemistrySh
|
||||
volScalarField dQ
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"chemistry::Sh",
|
||||
"dQ",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("chemistrySh", dimEnergy/dimTime/dimVolume, 0.0)
|
||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
|
||||
);
|
||||
|
||||
|
||||
volScalarField rDeltaT
|
||||
(
|
||||
IOobject
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
+ parcels.Sh(hs)
|
||||
+ radiation->Shs(thermo)
|
||||
+ energySource.Su()
|
||||
+ chemistrySh
|
||||
+ combustion->Sh()
|
||||
);
|
||||
|
||||
hsEqn.solve();
|
||||
|
||||
@ -1,23 +0,0 @@
|
||||
// Info<< "Reading chemistry properties\n" << endl;
|
||||
|
||||
IOdictionary chemistryProperties
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"chemistryProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
)
|
||||
);
|
||||
|
||||
Switch turbulentReaction(chemistryProperties.lookup("turbulentReaction"));
|
||||
|
||||
dimensionedScalar Cmix("Cmix", dimless, 1.0);
|
||||
|
||||
if (turbulentReaction)
|
||||
{
|
||||
chemistryProperties.lookup("Cmix") >> Cmix;
|
||||
}
|
||||
@ -77,7 +77,7 @@ Info<< "Time scales min/max:" << endl;
|
||||
DpDt
|
||||
+ parcels.hsTrans()/(mesh.V()*runTime.deltaT())
|
||||
+ energySource.Su()
|
||||
+ chemistrySh
|
||||
+ combustion->Sh()()
|
||||
)
|
||||
/rho
|
||||
);
|
||||
|
||||
@ -21,6 +21,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
|
||||
-I$(LIB_SRC)/ODE/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/combustionModels/lnInclude \
|
||||
-I$(FOAM_SOLVERS)/combustion/reactingFoam
|
||||
|
||||
|
||||
@ -47,4 +48,5 @@ EXE_LIBS = \
|
||||
-lregionModels \
|
||||
-lsurfaceFilmModels \
|
||||
-lODE \
|
||||
-lsampling
|
||||
-lsampling \
|
||||
-lcombustionModels
|
||||
|
||||
@ -11,6 +11,8 @@ tmp<fv::convectionScheme<scalar> > mvConvection
|
||||
|
||||
|
||||
{
|
||||
combustion->correct();
|
||||
dQ = combustion->dQ();
|
||||
label inertIndex = -1;
|
||||
volScalarField Yt(0.0*Y[0]);
|
||||
|
||||
@ -19,16 +21,20 @@ tmp<fv::convectionScheme<scalar> > mvConvection
|
||||
if (Y[i].name() != inertSpecie)
|
||||
{
|
||||
volScalarField& Yi = Y[i];
|
||||
solve
|
||||
|
||||
fvScalarMatrix YiEqn
|
||||
(
|
||||
fvm::ddt(rho, Yi)
|
||||
+ mvConvection->fvmDiv(phi, Yi)
|
||||
- fvm::laplacian(turbulence->muEff(), Yi)
|
||||
==
|
||||
coalParcels.SYi(i, Yi)
|
||||
+ kappa*chemistry.RR(i)().dimensionedInternalField()
|
||||
+ combustion->R(Yi)
|
||||
);
|
||||
|
||||
YiEqn.relax();
|
||||
YiEqn.solve(mesh.solver("Yi"));
|
||||
|
||||
Yi.max(0.0);
|
||||
Yt += Yi;
|
||||
}
|
||||
|
||||
@ -36,12 +36,10 @@ Description
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "hCombustionThermo.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "basicThermoCloud.H"
|
||||
#include "coalCloud.H"
|
||||
#include "psiChemistryModel.H"
|
||||
#include "chemistrySolver.H"
|
||||
#include "psiChemistryCombustionModel.H"
|
||||
#include "timeActivatedExplicitSource.H"
|
||||
#include "radiationModel.H"
|
||||
#include "SLGThermo.H"
|
||||
@ -55,7 +53,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "readChemistryProperties.H"
|
||||
#include "readGravitationalAcceleration.H"
|
||||
#include "createFields.H"
|
||||
#include "createClouds.H"
|
||||
@ -88,7 +85,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
limestoneParcels.evolve();
|
||||
|
||||
#include "chemistry.H"
|
||||
#include "rhoEqn.H"
|
||||
|
||||
// --- Pressure-velocity PIMPLE corrector loop
|
||||
@ -112,10 +108,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
rho = thermo.rho();
|
||||
|
||||
if (runTime.write())
|
||||
{
|
||||
chemistry.dQ()().write();
|
||||
}
|
||||
runTime.write();
|
||||
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
|
||||
@ -1,10 +1,14 @@
|
||||
Info<< "Reading thermophysical properties\n" << endl;
|
||||
Info<< "Creating combustion model\n" << endl;
|
||||
|
||||
autoPtr<psiChemistryModel> pChemistry
|
||||
autoPtr<combustionModels::psiChemistryCombustionModel> combustion
|
||||
(
|
||||
psiChemistryModel::New(mesh)
|
||||
combustionModels::psiChemistryCombustionModel::New
|
||||
(
|
||||
mesh
|
||||
)
|
||||
);
|
||||
psiChemistryModel& chemistry = pChemistry();
|
||||
|
||||
psiChemistryModel& chemistry = combustion->pChemistry();
|
||||
|
||||
hsCombustionThermo& thermo = chemistry.thermo();
|
||||
|
||||
@ -96,20 +100,6 @@
|
||||
|
||||
#include "compressibleCreatePhi.H"
|
||||
|
||||
DimensionedField<scalar, volMesh> kappa
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"kappa",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("zero", dimless, 0.0)
|
||||
);
|
||||
|
||||
Info<< "Creating turbulence model\n" << endl;
|
||||
autoPtr<compressible::turbulenceModel> turbulence
|
||||
(
|
||||
@ -122,6 +112,9 @@
|
||||
)
|
||||
);
|
||||
|
||||
// Set the turbulence into the combustion model
|
||||
combustion->setTurbulence(turbulence());
|
||||
|
||||
Info<< "Creating field DpDt\n" << endl;
|
||||
volScalarField DpDt
|
||||
(
|
||||
@ -138,16 +131,16 @@
|
||||
"hs"
|
||||
);
|
||||
|
||||
DimensionedField<scalar, volMesh> chemistrySh
|
||||
volScalarField dQ
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"chemistry::Sh",
|
||||
"dQ",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("chemistrySh", dimEnergy/dimTime/dimVolume, 0.0)
|
||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
|
||||
);
|
||||
|
||||
@ -6,15 +6,14 @@
|
||||
- fvm::laplacian(turbulence->alphaEff(), hs)
|
||||
==
|
||||
DpDt
|
||||
+ combustion->Sh()
|
||||
+ coalParcels.Sh(hs)
|
||||
+ limestoneParcels.Sh(hs)
|
||||
+ enthalpySource.Su()
|
||||
+ radiation->Shs(thermo)
|
||||
+ chemistrySh
|
||||
);
|
||||
|
||||
hsEqn.relax();
|
||||
|
||||
hsEqn.solve();
|
||||
|
||||
thermo.correct();
|
||||
|
||||
@ -1,23 +0,0 @@
|
||||
Info<< "Reading chemistry properties\n" << endl;
|
||||
|
||||
IOdictionary chemistryProperties
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"chemistryProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
)
|
||||
);
|
||||
|
||||
Switch turbulentReaction(chemistryProperties.lookup("turbulentReaction"));
|
||||
|
||||
dimensionedScalar Cmix("Cmix", dimless, 1.0);
|
||||
|
||||
if (turbulentReaction)
|
||||
{
|
||||
chemistryProperties.lookup("Cmix") >> Cmix;
|
||||
}
|
||||
@ -21,6 +21,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
||||
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/combustionModels/lnInclude \
|
||||
-I$(FOAM_SOLVERS)/combustion/reactingFoam
|
||||
|
||||
|
||||
@ -46,4 +47,5 @@ EXE_LIBS = \
|
||||
-lODE \
|
||||
-lregionModels \
|
||||
-lsurfaceFilmModels \
|
||||
-lsampling
|
||||
-lsampling \
|
||||
-lcombustionModels
|
||||
|
||||
@ -10,6 +10,8 @@ tmp<fv::convectionScheme<scalar> > mvConvection
|
||||
)
|
||||
);
|
||||
|
||||
combustion->correct();
|
||||
dQ = combustion->dQ();
|
||||
|
||||
if (solveSpecies)
|
||||
{
|
||||
@ -21,6 +23,7 @@ if (solveSpecies)
|
||||
if (Y[i].name() != inertSpecie)
|
||||
{
|
||||
volScalarField& Yi = Y[i];
|
||||
|
||||
solve
|
||||
(
|
||||
fvm::ddt(rho, Yi)
|
||||
@ -28,7 +31,7 @@ if (solveSpecies)
|
||||
- fvm::laplacian(turbulence->muEff(), Yi)
|
||||
==
|
||||
parcels.SYi(i, Yi)
|
||||
+ kappa*chemistry.RR(i)().dimensionedInternalField()
|
||||
+ combustion->R(Yi)
|
||||
+ massSource.Su(i),
|
||||
mesh.solver("Yi")
|
||||
);
|
||||
|
||||
@ -1,10 +1,14 @@
|
||||
Info<< "Reading thermophysical properties\n" << endl;
|
||||
Info<< "Creating combustion model\n" << endl;
|
||||
|
||||
autoPtr<rhoChemistryModel> pChemistry
|
||||
autoPtr<combustionModels::rhoChemistryCombustionModel> combustion
|
||||
(
|
||||
rhoChemistryModel::New(mesh)
|
||||
combustionModels::rhoChemistryCombustionModel::New
|
||||
(
|
||||
mesh
|
||||
)
|
||||
);
|
||||
rhoChemistryModel& chemistry = pChemistry();
|
||||
|
||||
rhoChemistryModel& chemistry = combustion->pChemistry();
|
||||
|
||||
hsReactionThermo& thermo = chemistry.thermo();
|
||||
|
||||
@ -57,20 +61,6 @@
|
||||
|
||||
#include "compressibleCreatePhi.H"
|
||||
|
||||
DimensionedField<scalar, volMesh> kappa
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"kappa",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("zero", dimless, 0.0)
|
||||
);
|
||||
|
||||
Info<< "Creating turbulence model\n" << endl;
|
||||
autoPtr<compressible::turbulenceModel> turbulence
|
||||
(
|
||||
@ -83,6 +73,9 @@
|
||||
)
|
||||
);
|
||||
|
||||
// Set the turbulence into the combustion model
|
||||
combustion->setTurbulence(turbulence());
|
||||
|
||||
Info<< "Creating multi-variate interpolation scheme\n" << endl;
|
||||
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
|
||||
|
||||
@ -92,16 +85,16 @@
|
||||
}
|
||||
fields.add(hs);
|
||||
|
||||
DimensionedField<scalar, volMesh> chemistrySh
|
||||
volScalarField dQ
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"chemistry::Sh",
|
||||
"dQ",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("chemistrySh", dimEnergy/dimTime/dimVolume, 0.0)
|
||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
|
||||
);
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
+ parcels.Sh(hs)
|
||||
+ radiation->Shs(thermo)
|
||||
+ energySource.Su()
|
||||
+ chemistrySh
|
||||
+ combustion->Sh()
|
||||
);
|
||||
|
||||
thermo.correct();
|
||||
|
||||
@ -40,11 +40,9 @@ Description
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "hReactionThermo.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "basicReactingMultiphaseCloud.H"
|
||||
#include "rhoChemistryModel.H"
|
||||
#include "chemistrySolver.H"
|
||||
#include "rhoChemistryCombustionModel.H"
|
||||
#include "radiationModel.H"
|
||||
#include "porousZones.H"
|
||||
#include "timeActivatedExplicitSource.H"
|
||||
@ -59,7 +57,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "readChemistryProperties.H"
|
||||
#include "readGravitationalAcceleration.H"
|
||||
#include "createFields.H"
|
||||
#include "createRadiationModel.H"
|
||||
@ -90,7 +87,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
parcels.evolve();
|
||||
|
||||
#include "chemistry.H"
|
||||
#include "rhoEqn.H"
|
||||
|
||||
// --- Pressure-velocity PIMPLE corrector loop
|
||||
@ -114,10 +110,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
rho = thermo.rho();
|
||||
|
||||
if (runTime.write())
|
||||
{
|
||||
chemistry.dQ()().write();
|
||||
}
|
||||
runTime.write();
|
||||
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
|
||||
@ -1,23 +0,0 @@
|
||||
Info<< "Reading chemistry properties\n" << endl;
|
||||
|
||||
IOdictionary chemistryProperties
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"chemistryProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
)
|
||||
);
|
||||
|
||||
Switch turbulentReaction(chemistryProperties.lookup("turbulentReaction"));
|
||||
|
||||
dimensionedScalar Cmix("Cmix", dimless, 1.0);
|
||||
|
||||
if (turbulentReaction)
|
||||
{
|
||||
chemistryProperties.lookup("Cmix") >> Cmix;
|
||||
}
|
||||
@ -20,6 +20,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
|
||||
-I$(LIB_SRC)/ODE/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/combustionModels/lnInclude \
|
||||
-I$(FOAM_SOLVERS)/combustion/reactingFoam
|
||||
|
||||
|
||||
@ -41,4 +42,5 @@ EXE_LIBS = \
|
||||
-lsurfaceFilmModels \
|
||||
-llagrangianIntermediate \
|
||||
-lODE \
|
||||
-lsampling
|
||||
-lsampling \
|
||||
-lcombustionModels
|
||||
|
||||
@ -11,6 +11,8 @@ tmp<fv::convectionScheme<scalar> > mvConvection
|
||||
|
||||
|
||||
{
|
||||
combustion->correct();
|
||||
dQ = combustion->dQ();
|
||||
label inertIndex = -1;
|
||||
volScalarField Yt(0.0*Y[0]);
|
||||
|
||||
@ -19,6 +21,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection
|
||||
if (Y[i].name() != inertSpecie)
|
||||
{
|
||||
volScalarField& Yi = Y[i];
|
||||
|
||||
solve
|
||||
(
|
||||
fvm::ddt(rho, Yi)
|
||||
@ -27,7 +30,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection
|
||||
==
|
||||
parcels.SYi(i, Yi)
|
||||
+ surfaceFilm.Srho(i)
|
||||
+ kappa*chemistry.RR(i)().dimensionedInternalField(),
|
||||
+ combustion->R(Yi),
|
||||
mesh.solver("Yi")
|
||||
);
|
||||
|
||||
|
||||
@ -1,10 +1,14 @@
|
||||
Info<< "Reading thermophysical properties\n" << endl;
|
||||
Info<< "Creating combustion model\n" << endl;
|
||||
|
||||
autoPtr<psiChemistryModel> pChemistry
|
||||
autoPtr<combustionModels::psiChemistryCombustionModel> combustion
|
||||
(
|
||||
psiChemistryModel::New(mesh)
|
||||
combustionModels::psiChemistryCombustionModel::New
|
||||
(
|
||||
mesh
|
||||
)
|
||||
);
|
||||
psiChemistryModel& chemistry = pChemistry();
|
||||
|
||||
psiChemistryModel& chemistry = combustion->pChemistry();
|
||||
|
||||
hsCombustionThermo& thermo = chemistry.thermo();
|
||||
|
||||
@ -50,21 +54,6 @@
|
||||
|
||||
#include "compressibleCreatePhi.H"
|
||||
|
||||
Info<< "Creating field kappa\n" << endl;
|
||||
DimensionedField<scalar, volMesh> kappa
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"kappa",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("zero", dimless, 0.0)
|
||||
);
|
||||
|
||||
Info<< "Creating turbulence model\n" << endl;
|
||||
autoPtr<compressible::turbulenceModel> turbulence
|
||||
(
|
||||
@ -77,6 +66,9 @@
|
||||
)
|
||||
);
|
||||
|
||||
// Set the turbulence into the combustion model
|
||||
combustion->setTurbulence(turbulence());
|
||||
|
||||
Info<< "Creating field DpDt\n" << endl;
|
||||
volScalarField DpDt
|
||||
(
|
||||
@ -131,16 +123,16 @@
|
||||
additionalControlsDict.lookup("solvePrimaryRegion")
|
||||
);
|
||||
|
||||
DimensionedField<scalar, volMesh> chemistrySh
|
||||
volScalarField dQ
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"chemistry::Sh",
|
||||
"dQ",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("chemistrySh", dimEnergy/dimTime/dimVolume, 0.0)
|
||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
|
||||
);
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
+ parcels.Sh(hs)
|
||||
+ surfaceFilm.Sh()
|
||||
+ radiation->Shs(thermo)
|
||||
+ chemistrySh
|
||||
+ combustion->Sh()
|
||||
);
|
||||
|
||||
hsEqn.relax();
|
||||
|
||||
@ -31,12 +31,10 @@ Description
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "hCombustionThermo.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "basicReactingCloud.H"
|
||||
#include "surfaceFilmModel.H"
|
||||
#include "psiChemistryModel.H"
|
||||
#include "chemistrySolver.H"
|
||||
#include "psiChemistryCombustionModel.H"
|
||||
#include "radiationModel.H"
|
||||
#include "SLGThermo.H"
|
||||
#include "pimpleControl.H"
|
||||
@ -49,7 +47,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "readChemistryProperties.H"
|
||||
#include "readGravitationalAcceleration.H"
|
||||
#include "createFields.H"
|
||||
#include "createClouds.H"
|
||||
@ -83,7 +80,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (solvePrimaryRegion)
|
||||
{
|
||||
#include "chemistry.H"
|
||||
#include "rhoEqn.H"
|
||||
|
||||
// --- PIMPLE loop
|
||||
@ -107,10 +103,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
rho = thermo.rho();
|
||||
|
||||
if (runTime.write())
|
||||
{
|
||||
chemistry.dQ()().write();
|
||||
}
|
||||
runTime.write();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -1,23 +0,0 @@
|
||||
Info<< "Reading chemistry properties\n" << endl;
|
||||
|
||||
IOdictionary chemistryProperties
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"chemistryProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
)
|
||||
);
|
||||
|
||||
Switch turbulentReaction(chemistryProperties.lookup("turbulentReaction"));
|
||||
|
||||
dimensionedScalar Cmix("Cmix", dimless, 1.0);
|
||||
|
||||
if (turbulentReaction)
|
||||
{
|
||||
chemistryProperties.lookup("Cmix") >> Cmix;
|
||||
}
|
||||
@ -20,6 +20,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
||||
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/combustionModels/lnInclude \
|
||||
-I$(FOAM_SOLVERS)/combustion/reactingFoam
|
||||
|
||||
|
||||
@ -45,4 +46,5 @@ EXE_LIBS = \
|
||||
-lODE \
|
||||
-lregionModels \
|
||||
-lsurfaceFilmModels \
|
||||
-lsampling
|
||||
-lsampling \
|
||||
-lcombustionModels
|
||||
|
||||
@ -11,6 +11,8 @@ tmp<fv::convectionScheme<scalar> > mvConvection
|
||||
|
||||
|
||||
{
|
||||
combustion->correct();
|
||||
dQ = combustion->dQ();
|
||||
label inertIndex = -1;
|
||||
volScalarField Yt(0.0*Y[0]);
|
||||
|
||||
@ -19,17 +21,20 @@ tmp<fv::convectionScheme<scalar> > mvConvection
|
||||
if (Y[i].name() != inertSpecie)
|
||||
{
|
||||
volScalarField& Yi = Y[i];
|
||||
solve
|
||||
|
||||
fvScalarMatrix YiEqn
|
||||
(
|
||||
fvm::ddt(rho, Yi)
|
||||
+ mvConvection->fvmDiv(phi, Yi)
|
||||
- fvm::laplacian(turbulence->muEff(), Yi)
|
||||
==
|
||||
parcels.SYi(i, Yi)
|
||||
+ kappa*chemistry.RR(i)().dimensionedInternalField(),
|
||||
mesh.solver("Yi")
|
||||
+ combustion->R(Yi)
|
||||
);
|
||||
|
||||
YiEqn.relax();
|
||||
YiEqn.solve(mesh.solver("Yi"));
|
||||
|
||||
Yi.max(0.0);
|
||||
Yt += Yi;
|
||||
}
|
||||
|
||||
@ -1,10 +1,14 @@
|
||||
Info<< "Reading thermophysical properties\n" << endl;
|
||||
Info<< "Creating combustion model\n" << endl;
|
||||
|
||||
autoPtr<psiChemistryModel> pChemistry
|
||||
autoPtr<combustionModels::psiChemistryCombustionModel> combustion
|
||||
(
|
||||
psiChemistryModel::New(mesh)
|
||||
combustionModels::psiChemistryCombustionModel::New
|
||||
(
|
||||
mesh
|
||||
)
|
||||
);
|
||||
psiChemistryModel& chemistry = pChemistry();
|
||||
|
||||
psiChemistryModel& chemistry = combustion->pChemistry();
|
||||
|
||||
hsCombustionThermo& thermo = chemistry.thermo();
|
||||
|
||||
@ -57,20 +61,6 @@
|
||||
|
||||
#include "compressibleCreatePhi.H"
|
||||
|
||||
DimensionedField<scalar, volMesh> kappa
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"kappa",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("zero", dimless, 0.0)
|
||||
);
|
||||
|
||||
Info<< "Creating turbulence model\n" << endl;
|
||||
autoPtr<compressible::turbulenceModel> turbulence
|
||||
(
|
||||
@ -83,6 +73,9 @@
|
||||
)
|
||||
);
|
||||
|
||||
// Set the turbulence into the combustion model
|
||||
combustion->setTurbulence(turbulence());
|
||||
|
||||
Info<< "Creating field DpDt\n" << endl;
|
||||
volScalarField DpDt
|
||||
(
|
||||
@ -98,16 +91,16 @@
|
||||
}
|
||||
fields.add(hs);
|
||||
|
||||
DimensionedField<scalar, volMesh> chemistrySh
|
||||
volScalarField dQ
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"chemistry::Sh",
|
||||
"dQ",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("chemistry::Sh", dimEnergy/dimTime/dimVolume, 0.0)
|
||||
);
|
||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
|
||||
);
|
||||
@ -8,7 +8,7 @@
|
||||
DpDt
|
||||
+ parcels.Sh(hs)
|
||||
+ radiation->Shs(thermo)
|
||||
+ chemistrySh
|
||||
+ combustion->Sh()
|
||||
);
|
||||
|
||||
hEqn.relax();
|
||||
|
||||
@ -31,11 +31,9 @@ Description
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "hCombustionThermo.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "basicReactingCloud.H"
|
||||
#include "psiChemistryModel.H"
|
||||
#include "chemistrySolver.H"
|
||||
#include "psiChemistryCombustionModel.H"
|
||||
#include "radiationModel.H"
|
||||
#include "SLGThermo.H"
|
||||
#include "pimpleControl.H"
|
||||
@ -48,7 +46,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "readChemistryProperties.H"
|
||||
#include "readGravitationalAcceleration.H"
|
||||
#include "createFields.H"
|
||||
#include "createClouds.H"
|
||||
@ -76,7 +73,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
parcels.evolve();
|
||||
|
||||
#include "chemistry.H"
|
||||
#include "rhoEqn.H"
|
||||
|
||||
// --- Pressure-velocity PIMPLE corrector loop
|
||||
@ -100,10 +96,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
rho = thermo.rho();
|
||||
|
||||
if (runTime.write())
|
||||
{
|
||||
chemistry.dQ()().write();
|
||||
}
|
||||
runTime.write();
|
||||
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
|
||||
@ -1,23 +0,0 @@
|
||||
Info<< "Reading chemistry properties\n" << endl;
|
||||
|
||||
IOdictionary chemistryProperties
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"chemistryProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
)
|
||||
);
|
||||
|
||||
Switch turbulentReaction(chemistryProperties.lookup("turbulentReaction"));
|
||||
|
||||
dimensionedScalar Cmix("Cmix", dimless, 1.0);
|
||||
|
||||
if (turbulentReaction)
|
||||
{
|
||||
chemistryProperties.lookup("Cmix") >> Cmix;
|
||||
}
|
||||
@ -21,6 +21,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
||||
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/combustionModels/lnInclude \
|
||||
-I$(FOAM_SOLVERS)/lagrangian/reactingParcelFoam
|
||||
|
||||
|
||||
@ -47,4 +48,5 @@ EXE_LIBS = \
|
||||
-lODE \
|
||||
-lregionModels \
|
||||
-lsurfaceFilmModels \
|
||||
-lsampling
|
||||
-lsampling \
|
||||
-lcombustionModels
|
||||
|
||||
@ -1,44 +0,0 @@
|
||||
if (chemistry.chemistry())
|
||||
{
|
||||
Info<< "Solving chemistry" << endl;
|
||||
|
||||
chemistry.solve
|
||||
(
|
||||
runTime.value() - runTime.deltaTValue(),
|
||||
runTime.deltaTValue()
|
||||
);
|
||||
|
||||
// turbulent time scale
|
||||
if (turbulentReaction)
|
||||
{
|
||||
tmp<volScalarField> tepsilon(turbulence->epsilon());
|
||||
const volScalarField& epsilon = tepsilon();
|
||||
tmp<volScalarField> tmuEff(turbulence->muEff());
|
||||
const volScalarField& muEff = tmuEff();
|
||||
tmp<volScalarField> ttc(chemistry.tc());
|
||||
const volScalarField& tc = ttc();
|
||||
|
||||
forAll(epsilon, i)
|
||||
{
|
||||
if (epsilon[i] > 0)
|
||||
{
|
||||
// Chalmers PaSR model
|
||||
scalar tk = Cmix.value()*Foam::sqrt(muEff[i]/rho[i]/epsilon[i]);
|
||||
kappa[i] =
|
||||
(runTime.deltaTValue() + tc[i])
|
||||
/(runTime.deltaTValue() + tc[i] + tk);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Return to laminar combustion
|
||||
kappa[i] = 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
kappa = 1.0;
|
||||
}
|
||||
|
||||
chemistrySh = kappa*chemistry.Sh()();
|
||||
}
|
||||
@ -31,11 +31,9 @@ Description
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "hCombustionThermo.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "basicSprayCloud.H"
|
||||
#include "psiChemistryModel.H"
|
||||
#include "chemistrySolver.H"
|
||||
#include "psiChemistryCombustionModel.H"
|
||||
#include "radiationModel.H"
|
||||
#include "SLGThermo.H"
|
||||
#include "pimpleControl.H"
|
||||
@ -48,7 +46,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "readChemistryProperties.H"
|
||||
#include "readGravitationalAcceleration.H"
|
||||
#include "createFields.H"
|
||||
#include "createClouds.H"
|
||||
@ -76,7 +73,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
parcels.evolve();
|
||||
|
||||
#include "chemistry.H"
|
||||
#include "rhoEqn.H"
|
||||
|
||||
// --- Pressure-velocity PIMPLE corrector loop
|
||||
|
||||
@ -34,6 +34,7 @@ Description
|
||||
#include "nearWallDist.H"
|
||||
#include "wallFvPatch.H"
|
||||
#include "Switch.H"
|
||||
|
||||
#include "pimpleControl.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -47,6 +48,9 @@ int main(int argc, char *argv[])
|
||||
#include "readGravitationalAcceleration.H"
|
||||
#include "createFields.H"
|
||||
#include "initContinuityErrs.H"
|
||||
#include "readTimeControls.H"
|
||||
#include "CourantNo.H"
|
||||
#include "setInitialDeltaT.H"
|
||||
|
||||
pimpleControl pimple(mesh);
|
||||
|
||||
@ -54,16 +58,23 @@ int main(int argc, char *argv[])
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
while (runTime.loop())
|
||||
while (runTime.run())
|
||||
{
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
#include "readBubbleFoamControls.H"
|
||||
#include "CourantNo.H"
|
||||
#include "setDeltaT.H"
|
||||
|
||||
runTime++;
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
// --- Pressure-velocity PIMPLE corrector loop
|
||||
for (pimple.start(); pimple.loop(); pimple++)
|
||||
{
|
||||
if (pimple.nOuterCorr() != 1)
|
||||
{
|
||||
p.storePrevIter();
|
||||
}
|
||||
|
||||
#include "alphaEqn.H"
|
||||
#include "liftDragCoeffs.H"
|
||||
#include "UEqns.H"
|
||||
@ -73,7 +84,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
#include "pEqn.H"
|
||||
|
||||
if (correctAlpha)
|
||||
if (correctAlpha && !pimple.finalIter())
|
||||
{
|
||||
#include "alphaEqn.H"
|
||||
}
|
||||
|
||||
@ -21,9 +21,6 @@ License
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
threePhaseMixture
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "threePhaseMixture.H"
|
||||
|
||||
@ -26,7 +26,7 @@ Application
|
||||
|
||||
Description
|
||||
Solver for a system of 2 incompressible fluid phases with one phase
|
||||
dispersed, e.g. gas bubbles in a liquid.
|
||||
dispersed, e.g. gas bubbles in a liquid or solid particles in a gas.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -78,10 +78,13 @@ int main(int argc, char *argv[])
|
||||
// --- Pressure-velocity PIMPLE corrector loop
|
||||
for (pimple.start(); pimple.loop(); pimple++)
|
||||
{
|
||||
if (pimple.nOuterCorr() != 1)
|
||||
{
|
||||
p.storePrevIter();
|
||||
}
|
||||
|
||||
#include "alphaEqn.H"
|
||||
|
||||
#include "liftDragCoeffs.H"
|
||||
|
||||
#include "UEqns.H"
|
||||
|
||||
// --- PISO loop
|
||||
|
||||
Reference in New Issue
Block a user