mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
merge of thermo branch into master
This commit is contained in:
@ -8,7 +8,7 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/sampling/lnInclude \
|
-I$(LIB_SRC)/sampling/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||||
-I$(LIB_SRC)/turbulenceModels \
|
-I$(LIB_SRC)/turbulenceModels \
|
||||||
-I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \
|
-I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \
|
||||||
@ -23,7 +23,7 @@ EXE_LIBS = \
|
|||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
-lcompressibleRASModels \
|
-lcompressibleRASModels \
|
||||||
-lbasicThermophysicalModels \
|
-lbasicThermophysicalModels \
|
||||||
-lcombustionThermophysicalModels \
|
-lreactionThermophysicalModels \
|
||||||
-lspecie \
|
-lspecie \
|
||||||
-llaminarFlameSpeedModels \
|
-llaminarFlameSpeedModels \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
|
|||||||
@ -36,7 +36,7 @@ Description
|
|||||||
to be appropriate by comparison with the results from the
|
to be appropriate by comparison with the results from the
|
||||||
spectral model.
|
spectral model.
|
||||||
|
|
||||||
Strain effects are encorporated directly into the Xi equation
|
Strain effects are incorporated directly into the Xi equation
|
||||||
but not in the algebraic approximation. Further work need to be
|
but not in the algebraic approximation. Further work need to be
|
||||||
done on this issue, particularly regarding the enhanced removal rate
|
done on this issue, particularly regarding the enhanced removal rate
|
||||||
caused by flame compression. Analysis using results of the spectral
|
caused by flame compression. Analysis using results of the spectral
|
||||||
@ -70,53 +70,53 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
# include "setRootCase.H"
|
#include "setRootCase.H"
|
||||||
|
|
||||||
# include "createTime.H"
|
#include "createTime.H"
|
||||||
# include "createMesh.H"
|
#include "createMesh.H"
|
||||||
# include "readCombustionProperties.H"
|
#include "readCombustionProperties.H"
|
||||||
# include "readEnvironmentalProperties.H"
|
#include "readEnvironmentalProperties.H"
|
||||||
# include "createFields.H"
|
#include "createFields.H"
|
||||||
# include "readPISOControls.H"
|
#include "readPISOControls.H"
|
||||||
# include "initContinuityErrs.H"
|
#include "initContinuityErrs.H"
|
||||||
# include "readTimeControls.H"
|
#include "readTimeControls.H"
|
||||||
# include "CourantNo.H"
|
#include "CourantNo.H"
|
||||||
# include "setInitialDeltaT.H"
|
#include "setInitialDeltaT.H"
|
||||||
|
|
||||||
scalar StCoNum = 0.0;
|
scalar StCoNum = 0.0;
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Info<< "\nStarting time loop\n" << endl;
|
Info<< "\nStarting time loop\n" << endl;
|
||||||
|
|
||||||
while (runTime.run())
|
while (runTime.run())
|
||||||
{
|
{
|
||||||
# include "readTimeControls.H"
|
#include "readTimeControls.H"
|
||||||
# include "readPISOControls.H"
|
#include "readPISOControls.H"
|
||||||
# include "CourantNo.H"
|
#include "CourantNo.H"
|
||||||
# include "setDeltaT.H"
|
#include "setDeltaT.H"
|
||||||
|
|
||||||
runTime++;
|
runTime++;
|
||||||
|
|
||||||
Info<< "\n\nTime = " << runTime.timeName() << endl;
|
Info<< "\n\nTime = " << runTime.timeName() << endl;
|
||||||
|
|
||||||
# include "rhoEqn.H"
|
#include "rhoEqn.H"
|
||||||
# include "UEqn.H"
|
#include "UEqn.H"
|
||||||
|
|
||||||
// --- PISO loop
|
// --- PISO loop
|
||||||
for (int corr=1; corr<=nCorr; corr++)
|
for (int corr=1; corr<=nCorr; corr++)
|
||||||
{
|
{
|
||||||
# include "bEqn.H"
|
#include "bEqn.H"
|
||||||
# include "ftEqn.H"
|
#include "ftEqn.H"
|
||||||
# include "huEqn.H"
|
#include "huEqn.H"
|
||||||
# include "hEqn.H"
|
#include "hEqn.H"
|
||||||
|
|
||||||
if (!ign.ignited())
|
if (!ign.ignited())
|
||||||
{
|
{
|
||||||
hu == h;
|
hu == h;
|
||||||
}
|
}
|
||||||
|
|
||||||
# include "pEqn.H"
|
#include "pEqn.H"
|
||||||
}
|
}
|
||||||
|
|
||||||
turbulence->correct();
|
turbulence->correct();
|
||||||
|
|||||||
@ -31,22 +31,24 @@ Description
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
{
|
{
|
||||||
scalar meanStCoNum = 0.0;
|
scalar meanStCoNum = 0.0;
|
||||||
|
|
||||||
if (mesh.nInternalFaces())
|
if (mesh.nInternalFaces())
|
||||||
{
|
{
|
||||||
surfaceScalarField SfUfbyDelta =
|
surfaceScalarField SfUfbyDelta =
|
||||||
mesh.surfaceInterpolation::deltaCoeffs()
|
mesh.surfaceInterpolation::deltaCoeffs()
|
||||||
*mag(phiSt/fvc::interpolate(rho));
|
*mag(phiSt/fvc::interpolate(rho));
|
||||||
|
|
||||||
StCoNum = max(SfUfbyDelta/mesh.magSf())
|
StCoNum =
|
||||||
.value()*runTime.deltaT().value();
|
max(SfUfbyDelta/mesh.magSf()).value()
|
||||||
|
*runTime.deltaT().value();
|
||||||
|
|
||||||
meanStCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf()))
|
meanStCoNum =
|
||||||
.value()*runTime.deltaT().value();
|
(sum(SfUfbyDelta)/sum(mesh.magSf())).value()
|
||||||
}
|
*runTime.deltaT().value();
|
||||||
|
}
|
||||||
|
|
||||||
Info<< "St courant Number mean: " << meanStCoNum
|
Info<< "St courant Number mean: " << meanStCoNum
|
||||||
<< " max: " << StCoNum << endl;
|
<< " max: " << StCoNum << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -25,7 +25,7 @@ if (ign.ignited())
|
|||||||
|
|
||||||
// Unburnt gas density
|
// Unburnt gas density
|
||||||
// ~~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~~
|
||||||
volScalarField rhou = thermo->rhou();
|
volScalarField rhou = thermo.rhou();
|
||||||
|
|
||||||
// Calculate flame normal etc.
|
// Calculate flame normal etc.
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|||||||
@ -1,10 +1,11 @@
|
|||||||
Info<< "Reading thermophysical properties\n" << endl;
|
Info<< "Reading thermophysical properties\n" << endl;
|
||||||
|
|
||||||
autoPtr<hhuCombustionThermo> thermo
|
autoPtr<hhuCombustionThermo> pThermo
|
||||||
(
|
(
|
||||||
hhuCombustionThermo::New(mesh)
|
hhuCombustionThermo::New(mesh)
|
||||||
);
|
);
|
||||||
combustionMixture& composition = thermo->composition();
|
hhuCombustionThermo& thermo = pThermo();
|
||||||
|
basicMultiComponentMixture& composition = thermo.composition();
|
||||||
|
|
||||||
volScalarField rho
|
volScalarField rho
|
||||||
(
|
(
|
||||||
@ -16,13 +17,13 @@
|
|||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::AUTO_WRITE
|
||||||
),
|
),
|
||||||
thermo->rho()
|
thermo.rho()
|
||||||
);
|
);
|
||||||
|
|
||||||
volScalarField& p = thermo->p();
|
volScalarField& p = thermo.p();
|
||||||
const volScalarField& psi = thermo->psi();
|
const volScalarField& psi = thermo.psi();
|
||||||
volScalarField& h = thermo->h();
|
volScalarField& h = thermo.h();
|
||||||
volScalarField& hu = thermo->hu();
|
volScalarField& hu = thermo.hu();
|
||||||
|
|
||||||
volScalarField& b = composition.Y("b");
|
volScalarField& b = composition.Y("b");
|
||||||
Info<< "min(b) = " << min(b).value() << endl;
|
Info<< "min(b) = " << min(b).value() << endl;
|
||||||
@ -54,7 +55,7 @@
|
|||||||
rho,
|
rho,
|
||||||
U,
|
U,
|
||||||
phi,
|
phi,
|
||||||
thermo()
|
thermo
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -8,5 +8,5 @@
|
|||||||
betav*DpDt
|
betav*DpDt
|
||||||
);
|
);
|
||||||
|
|
||||||
thermo->correct();
|
thermo.correct();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,6 +13,6 @@ if (ign.ignited())
|
|||||||
//+ fvm::Sp(fvc::div(muEff*fvc::grad(b)/(b + 0.001)), hu)
|
//+ fvm::Sp(fvc::div(muEff*fvc::grad(b)/(b + 0.001)), hu)
|
||||||
|
|
||||||
==
|
==
|
||||||
betav*DpDt*rho/thermo->rhou()
|
betav*DpDt*rho/thermo.rhou()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -196,7 +196,6 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
|
|
||||||
~SCOPE();
|
~SCOPE();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
rho = thermo->rho();
|
rho = thermo.rho();
|
||||||
|
|
||||||
volScalarField rUA = 1.0/UEqn.A();
|
volScalarField rUA = 1.0/UEqn.A();
|
||||||
U = invA & UEqn.H();
|
U = invA & UEqn.H();
|
||||||
@ -8,7 +8,7 @@ if (transonic)
|
|||||||
surfaceScalarField phid
|
surfaceScalarField phid
|
||||||
(
|
(
|
||||||
"phid",
|
"phid",
|
||||||
fvc::interpolate(thermo->psi())
|
fvc::interpolate(psi)
|
||||||
*(
|
*(
|
||||||
(fvc::interpolate(U) & mesh.Sf())
|
(fvc::interpolate(U) & mesh.Sf())
|
||||||
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
||||||
|
|||||||
@ -2,7 +2,7 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/engine/lnInclude \
|
-I$(LIB_SRC)/engine/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \
|
||||||
-I$(LIB_SRC)/sampling/lnInclude \
|
-I$(LIB_SRC)/sampling/lnInclude \
|
||||||
@ -13,7 +13,7 @@ EXE_LIBS = \
|
|||||||
-lcompressibleRASModels \
|
-lcompressibleRASModels \
|
||||||
-lcompressibleLESModels \
|
-lcompressibleLESModels \
|
||||||
-lbasicThermophysicalModels \
|
-lbasicThermophysicalModels \
|
||||||
-lcombustionThermophysicalModels \
|
-lreactionThermophysicalModels \
|
||||||
-lspecie \
|
-lspecie \
|
||||||
-llaminarFlameSpeedModels \
|
-llaminarFlameSpeedModels \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
|
|||||||
@ -109,7 +109,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
turbulence->correct();
|
turbulence->correct();
|
||||||
|
|
||||||
rho = thermo->rho();
|
rho = thermo.rho();
|
||||||
|
|
||||||
runTime.write();
|
runTime.write();
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ if (ign.ignited())
|
|||||||
|
|
||||||
// Unburnt gas density
|
// Unburnt gas density
|
||||||
// ~~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~~
|
||||||
volScalarField rhou = thermo->rhou();
|
volScalarField rhou = thermo.rhou();
|
||||||
|
|
||||||
// Calculate flame normal etc.
|
// Calculate flame normal etc.
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
@ -76,7 +76,7 @@ if (ign.ignited())
|
|||||||
|
|
||||||
volScalarField epsilon = pow(uPrimeCoef, 3)*turbulence->epsilon();
|
volScalarField epsilon = pow(uPrimeCoef, 3)*turbulence->epsilon();
|
||||||
|
|
||||||
volScalarField tauEta = sqrt(thermo->muu()/(rhou*epsilon));
|
volScalarField tauEta = sqrt(thermo.muu()/(rhou*epsilon));
|
||||||
|
|
||||||
volScalarField Reta = up/
|
volScalarField Reta = up/
|
||||||
(
|
(
|
||||||
|
|||||||
@ -1,10 +1,11 @@
|
|||||||
Info<< "Reading thermophysical properties\n" << endl;
|
Info<< "Reading thermophysical properties\n" << endl;
|
||||||
|
|
||||||
autoPtr<hhuCombustionThermo> thermo
|
autoPtr<hhuCombustionThermo> pThermo
|
||||||
(
|
(
|
||||||
hhuCombustionThermo::New(mesh)
|
hhuCombustionThermo::New(mesh)
|
||||||
);
|
);
|
||||||
combustionMixture& composition = thermo->composition();
|
hhuCombustionThermo& thermo = pThermo();
|
||||||
|
basicMultiComponentMixture& composition = thermo.composition();
|
||||||
|
|
||||||
volScalarField rho
|
volScalarField rho
|
||||||
(
|
(
|
||||||
@ -16,18 +17,18 @@
|
|||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::AUTO_WRITE
|
||||||
),
|
),
|
||||||
thermo->rho()
|
thermo.rho()
|
||||||
);
|
);
|
||||||
|
|
||||||
volScalarField& p = thermo->p();
|
volScalarField& p = thermo.p();
|
||||||
const volScalarField& psi = thermo->psi();
|
const volScalarField& psi = thermo.psi();
|
||||||
volScalarField& h = thermo->h();
|
volScalarField& h = thermo.h();
|
||||||
volScalarField& hu = thermo->hu();
|
volScalarField& hu = thermo.hu();
|
||||||
|
|
||||||
volScalarField& b = composition.Y("b");
|
volScalarField& b = composition.Y("b");
|
||||||
Info<< "min(b) = " << min(b).value() << endl;
|
Info<< "min(b) = " << min(b).value() << endl;
|
||||||
|
|
||||||
const volScalarField& T = thermo->T();
|
const volScalarField& T = thermo.T();
|
||||||
|
|
||||||
|
|
||||||
Info<< "\nReading field U\n" << endl;
|
Info<< "\nReading field U\n" << endl;
|
||||||
@ -55,7 +56,7 @@
|
|||||||
rho,
|
rho,
|
||||||
U,
|
U,
|
||||||
phi,
|
phi,
|
||||||
thermo()
|
thermo
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -8,5 +8,5 @@
|
|||||||
DpDt
|
DpDt
|
||||||
);
|
);
|
||||||
|
|
||||||
thermo->correct();
|
thermo.correct();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,6 +13,6 @@ if (ign.ignited())
|
|||||||
//+ fvm::Sp(fvc::div(muEff*fvc::grad(b)/(b + 0.001)), hu)
|
//+ fvm::Sp(fvc::div(muEff*fvc::grad(b)/(b + 0.001)), hu)
|
||||||
|
|
||||||
==
|
==
|
||||||
DpDt*rho/thermo->rhou()
|
DpDt*rho/thermo.rhou()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
rho = thermo->rho();
|
rho = thermo.rho();
|
||||||
|
|
||||||
volScalarField rUA = 1.0/UEqn.A();
|
volScalarField rUA = 1.0/UEqn.A();
|
||||||
U = rUA*UEqn.H();
|
U = rUA*UEqn.H();
|
||||||
@ -8,7 +8,7 @@ if (transonic)
|
|||||||
surfaceScalarField phid
|
surfaceScalarField phid
|
||||||
(
|
(
|
||||||
"phid",
|
"phid",
|
||||||
fvc::interpolate(thermo->psi())
|
fvc::interpolate(psi)
|
||||||
*(
|
*(
|
||||||
(fvc::interpolate(U) & mesh.Sf())
|
(fvc::interpolate(U) & mesh.Sf())
|
||||||
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
||||||
@ -35,8 +35,8 @@ if (transonic)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
phi =
|
phi =
|
||||||
fvc::interpolate(rho)*
|
fvc::interpolate(rho)
|
||||||
(
|
*(
|
||||||
(fvc::interpolate(U) & mesh.Sf())
|
(fvc::interpolate(U) & mesh.Sf())
|
||||||
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -1,48 +0,0 @@
|
|||||||
{
|
|
||||||
tmp<volScalarField> tdQ
|
|
||||||
(
|
|
||||||
new volScalarField
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"dQ",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::NO_READ,
|
|
||||||
IOobject::AUTO_WRITE
|
|
||||||
),
|
|
||||||
mesh,
|
|
||||||
dimensionedScalar
|
|
||||||
(
|
|
||||||
"zero",
|
|
||||||
dimensionSet(1, -3, -1, 0, 0, 0, 0),
|
|
||||||
0.0
|
|
||||||
)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
scalarField& dQ = tdQ();
|
|
||||||
|
|
||||||
scalarField cp(dQ.size(), 0.0);
|
|
||||||
|
|
||||||
forAll(Y, i)
|
|
||||||
{
|
|
||||||
volScalarField RRi = chemistry.RR(i);
|
|
||||||
|
|
||||||
forAll(h, celli)
|
|
||||||
{
|
|
||||||
scalar Ti = T[celli];
|
|
||||||
cp[celli] += Y[i][celli]*chemistry.specieThermo()[i].Cp(Ti);
|
|
||||||
scalar hi = chemistry.specieThermo()[i].h(Ti);
|
|
||||||
scalar RR = RRi[celli];
|
|
||||||
dQ[celli] -= hi*RR;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
forAll(dQ, celli)
|
|
||||||
{
|
|
||||||
dQ[celli] /= cp[celli];
|
|
||||||
}
|
|
||||||
|
|
||||||
tdQ().write();
|
|
||||||
}
|
|
||||||
@ -4,7 +4,7 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/engine/lnInclude \
|
-I$(LIB_SRC)/engine/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||||
|
|
||||||
|
|||||||
@ -33,7 +33,7 @@ Description
|
|||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "engineTime.H"
|
#include "engineTime.H"
|
||||||
#include "engineMesh.H"
|
#include "engineMesh.H"
|
||||||
#include "basicThermo.H"
|
#include "basicPsiThermo.H"
|
||||||
#include "turbulenceModel.H"
|
#include "turbulenceModel.H"
|
||||||
#include "OFstream.H"
|
#include "OFstream.H"
|
||||||
|
|
||||||
@ -41,27 +41,27 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
# include "setRootCase.H"
|
#include "setRootCase.H"
|
||||||
|
|
||||||
# include "createEngineTime.H"
|
#include "createEngineTime.H"
|
||||||
# include "createEngineMesh.H"
|
#include "createEngineMesh.H"
|
||||||
# include "createFields.H"
|
#include "createFields.H"
|
||||||
# include "initContinuityErrs.H"
|
#include "initContinuityErrs.H"
|
||||||
# include "readEngineTimeControls.H"
|
#include "readEngineTimeControls.H"
|
||||||
# include "compressibleCourantNo.H"
|
#include "compressibleCourantNo.H"
|
||||||
# include "setInitialDeltaT.H"
|
#include "setInitialDeltaT.H"
|
||||||
# include "startSummary.H"
|
#include "startSummary.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Info<< "\nStarting time loop\n" << endl;
|
Info<< "\nStarting time loop\n" << endl;
|
||||||
|
|
||||||
while (runTime.run())
|
while (runTime.run())
|
||||||
{
|
{
|
||||||
# include "readPISOControls.H"
|
#include "readPISOControls.H"
|
||||||
# include "readEngineTimeControls.H"
|
#include "readEngineTimeControls.H"
|
||||||
# include "compressibleCourantNo.H"
|
#include "compressibleCourantNo.H"
|
||||||
# include "setDeltaT.H"
|
#include "setDeltaT.H"
|
||||||
|
|
||||||
runTime++;
|
runTime++;
|
||||||
|
|
||||||
@ -70,22 +70,22 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
mesh.move();
|
mesh.move();
|
||||||
|
|
||||||
# include "rhoEqn.H"
|
#include "rhoEqn.H"
|
||||||
|
|
||||||
# include "UEqn.H"
|
#include "UEqn.H"
|
||||||
|
|
||||||
// --- PISO loop
|
// --- PISO loop
|
||||||
for (int corr=1; corr<=nCorr; corr++)
|
for (int corr=1; corr<=nCorr; corr++)
|
||||||
{
|
{
|
||||||
# include "hEqn.H"
|
#include "hEqn.H"
|
||||||
# include "pEqn.H"
|
#include "pEqn.H"
|
||||||
}
|
}
|
||||||
|
|
||||||
turbulence->correct();
|
turbulence->correct();
|
||||||
|
|
||||||
runTime.write();
|
runTime.write();
|
||||||
|
|
||||||
# include "logSummary.H"
|
#include "logSummary.H"
|
||||||
|
|
||||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||||
|
|||||||
@ -1,9 +1,10 @@
|
|||||||
Info<< "Reading thermophysical properties\n" << endl;
|
Info<< "Reading thermophysical properties\n" << endl;
|
||||||
|
|
||||||
autoPtr<basicThermo> thermo
|
autoPtr<basicPsiThermo> pThermo
|
||||||
(
|
(
|
||||||
basicThermo::New(mesh)
|
basicPsiThermo::New(mesh)
|
||||||
);
|
);
|
||||||
|
basicPsiThermo& thermo = pThermo();
|
||||||
|
|
||||||
volScalarField rho
|
volScalarField rho
|
||||||
(
|
(
|
||||||
@ -15,13 +16,13 @@
|
|||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::AUTO_WRITE
|
||||||
),
|
),
|
||||||
thermo->rho()
|
thermo.rho()
|
||||||
);
|
);
|
||||||
|
|
||||||
volScalarField& p = thermo->p();
|
volScalarField& p = thermo.p();
|
||||||
const volScalarField& psi = thermo->psi();
|
const volScalarField& psi = thermo.psi();
|
||||||
volScalarField& h = thermo->h();
|
volScalarField& h = thermo.h();
|
||||||
const volScalarField& T = thermo->T();
|
const volScalarField& T = thermo.T();
|
||||||
|
|
||||||
|
|
||||||
Info<< "\nReading field U\n" << endl;
|
Info<< "\nReading field U\n" << endl;
|
||||||
@ -38,7 +39,7 @@
|
|||||||
mesh
|
mesh
|
||||||
);
|
);
|
||||||
|
|
||||||
# include "compressibleCreatePhi.H"
|
#include "compressibleCreatePhi.H"
|
||||||
|
|
||||||
|
|
||||||
Info<< "Creating turbulence model\n" << endl;
|
Info<< "Creating turbulence model\n" << endl;
|
||||||
@ -49,7 +50,7 @@
|
|||||||
rho,
|
rho,
|
||||||
U,
|
U,
|
||||||
phi,
|
phi,
|
||||||
thermo()
|
thermo
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -8,5 +8,5 @@
|
|||||||
DpDt
|
DpDt
|
||||||
);
|
);
|
||||||
|
|
||||||
thermo->correct();
|
thermo.correct();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,10 +7,10 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/thermophysicalModels/liquidMixture/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/liquidMixture/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \
|
||||||
-I$(LIB_SRC)/../applications/solvers/combustion/XiFoam \
|
-I$(LIB_SRC)/../applications/solvers/reactionThermo/XiFoam \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
||||||
-I$(LIB_SRC)/ODE/lnInclude \
|
-I$(LIB_SRC)/ODE/lnInclude \
|
||||||
-I$(LIB_SRC)/engine/lnInclude \
|
-I$(LIB_SRC)/engine/lnInclude \
|
||||||
@ -20,7 +20,7 @@ EXE_LIBS = \
|
|||||||
-lengine \
|
-lengine \
|
||||||
-lcompressibleRASModels \
|
-lcompressibleRASModels \
|
||||||
-lcompressibleLESModels \
|
-lcompressibleLESModels \
|
||||||
-lcombustionThermophysicalModels \
|
-lreactionThermophysicalModels \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-llagrangian \
|
-llagrangian \
|
||||||
-ldieselSpray \
|
-ldieselSpray \
|
||||||
|
|||||||
@ -14,7 +14,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection
|
|||||||
label inertIndex = -1;
|
label inertIndex = -1;
|
||||||
volScalarField Yt = 0.0*Y[0];
|
volScalarField Yt = 0.0*Y[0];
|
||||||
|
|
||||||
for(label i=0; i<Y.size(); i++)
|
for (label i=0; i<Y.size(); i++)
|
||||||
{
|
{
|
||||||
if (Y[i].name() != inertSpecie)
|
if (Y[i].name() != inertSpecie)
|
||||||
{
|
{
|
||||||
@ -42,5 +42,4 @@ tmp<fv::convectionScheme<scalar> > mvConvection
|
|||||||
|
|
||||||
Y[inertIndex] = scalar(1) - Yt;
|
Y[inertIndex] = scalar(1) - Yt;
|
||||||
Y[inertIndex].max(0.0);
|
Y[inertIndex].max(0.0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,13 +1,17 @@
|
|||||||
Info<< nl << "Reading thermophysicalProperties" << endl;
|
Info<< nl << "Reading thermophysicalProperties" << endl;
|
||||||
autoPtr<hCombustionThermo> thermo
|
|
||||||
(
|
|
||||||
hCombustionThermo::New(mesh)
|
|
||||||
);
|
|
||||||
|
|
||||||
combustionMixture& composition = thermo->composition();
|
autoPtr<psiChemistryModel> pChemistry
|
||||||
|
(
|
||||||
|
psiChemistryModel::New(mesh)
|
||||||
|
);
|
||||||
|
psiChemistryModel& chemistry = pChemistry();
|
||||||
|
|
||||||
|
hCombustionThermo& thermo = chemistry.thermo();
|
||||||
|
|
||||||
|
basicMultiComponentMixture& composition = thermo.composition();
|
||||||
PtrList<volScalarField>& Y = composition.Y();
|
PtrList<volScalarField>& Y = composition.Y();
|
||||||
|
|
||||||
word inertSpecie(thermo->lookup("inertSpecie"));
|
word inertSpecie(thermo.lookup("inertSpecie"));
|
||||||
|
|
||||||
volScalarField rho
|
volScalarField rho
|
||||||
(
|
(
|
||||||
@ -17,7 +21,7 @@ volScalarField rho
|
|||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
mesh
|
mesh
|
||||||
),
|
),
|
||||||
thermo->rho()
|
thermo.rho()
|
||||||
);
|
);
|
||||||
|
|
||||||
Info<< "Reading field U\n" << endl;
|
Info<< "Reading field U\n" << endl;
|
||||||
@ -35,10 +39,10 @@ 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& h = thermo.h();
|
||||||
|
|
||||||
|
|
||||||
#include "compressibleCreatePhi.H"
|
#include "compressibleCreatePhi.H"
|
||||||
@ -65,7 +69,7 @@ autoPtr<compressible::turbulenceModel> turbulence
|
|||||||
rho,
|
rho,
|
||||||
U,
|
U,
|
||||||
phi,
|
phi,
|
||||||
thermo()
|
thermo
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -73,31 +77,11 @@ Info<< "Creating field DpDt\n" << endl;
|
|||||||
volScalarField DpDt =
|
volScalarField DpDt =
|
||||||
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
|
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
|
||||||
|
|
||||||
Info << "Constructing chemical mechanism" << endl;
|
|
||||||
chemistryModel chemistry
|
|
||||||
(
|
|
||||||
thermo(),
|
|
||||||
rho
|
|
||||||
);
|
|
||||||
|
|
||||||
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
|
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
|
||||||
|
|
||||||
for(label i=0; i<Y.size(); i++)
|
forAll (Y, i)
|
||||||
{
|
{
|
||||||
fields.add(Y[i]);
|
fields.add(Y[i]);
|
||||||
}
|
}
|
||||||
fields.add(h);
|
fields.add(h);
|
||||||
|
|
||||||
volScalarField dQ
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"dQ",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::NO_READ,
|
|
||||||
IOobject::AUTO_WRITE
|
|
||||||
),
|
|
||||||
mesh,
|
|
||||||
dimensionedScalar("zero", dimensionSet(1,-3,-1,0,0,0,0), 0.0)
|
|
||||||
);
|
|
||||||
|
|||||||
@ -1,14 +1,15 @@
|
|||||||
Info << "Constructing Spray" << endl;
|
Info << "Constructing Spray" << endl;
|
||||||
|
|
||||||
PtrList<specieProperties> gasProperties(Y.size());
|
PtrList<gasThermoPhysics> gasProperties(Y.size());
|
||||||
forAll(gasProperties, i)
|
forAll(gasProperties, i)
|
||||||
{
|
{
|
||||||
gasProperties.set
|
gasProperties.set
|
||||||
(
|
(
|
||||||
i,
|
i,
|
||||||
new specieProperties
|
new gasThermoPhysics
|
||||||
(
|
(
|
||||||
dynamic_cast<const reactingMixture&>(thermo()).speciesData()[i]
|
dynamic_cast<const reactingMixture<gasThermoPhysics>&>
|
||||||
|
(thermo).speciesData()[i]
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,40 +36,41 @@ Description
|
|||||||
#include "hCombustionThermo.H"
|
#include "hCombustionThermo.H"
|
||||||
#include "turbulenceModel.H"
|
#include "turbulenceModel.H"
|
||||||
#include "spray.H"
|
#include "spray.H"
|
||||||
#include "chemistryModel.H"
|
#include "psiChemistryModel.H"
|
||||||
#include "chemistrySolver.H"
|
#include "chemistrySolver.H"
|
||||||
#include "multivariateScheme.H"
|
#include "multivariateScheme.H"
|
||||||
#include "Switch.H"
|
#include "Switch.H"
|
||||||
#include "OFstream.H"
|
#include "OFstream.H"
|
||||||
#include "volPointInterpolation.H"
|
#include "volPointInterpolation.H"
|
||||||
|
#include "thermoPhysicsTypes.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
# include "setRootCase.H"
|
#include "setRootCase.H"
|
||||||
# include "createEngineTime.H"
|
#include "createEngineTime.H"
|
||||||
# include "createEngineMesh.H"
|
#include "createEngineMesh.H"
|
||||||
# include "createFields.H"
|
#include "createFields.H"
|
||||||
# include "readEnvironmentalProperties.H"
|
#include "readEnvironmentalProperties.H"
|
||||||
# include "readCombustionProperties.H"
|
#include "readCombustionProperties.H"
|
||||||
# include "createSpray.H"
|
#include "createSpray.H"
|
||||||
# include "initContinuityErrs.H"
|
#include "initContinuityErrs.H"
|
||||||
# include "readEngineTimeControls.H"
|
#include "readEngineTimeControls.H"
|
||||||
# include "compressibleCourantNo.H"
|
#include "compressibleCourantNo.H"
|
||||||
# include "setInitialDeltaT.H"
|
#include "setInitialDeltaT.H"
|
||||||
# include "startSummary.H"
|
#include "startSummary.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Info << "\nStarting time loop\n" << endl;
|
Info << "\nStarting time loop\n" << endl;
|
||||||
|
|
||||||
while (runTime.run())
|
while (runTime.run())
|
||||||
{
|
{
|
||||||
# include "readPISOControls.H"
|
#include "readPISOControls.H"
|
||||||
# include "readEngineTimeControls.H"
|
#include "readEngineTimeControls.H"
|
||||||
# include "compressibleCourantNo.H"
|
#include "compressibleCourantNo.H"
|
||||||
# include "setDeltaT.H"
|
#include "setDeltaT.H"
|
||||||
|
|
||||||
runTime++;
|
runTime++;
|
||||||
|
|
||||||
@ -101,27 +102,27 @@ int main(int argc, char *argv[])
|
|||||||
kappa = (runTime.deltaT() + tc)/(runTime.deltaT() + tc + tk);
|
kappa = (runTime.deltaT() + tc)/(runTime.deltaT() + tc + tk);
|
||||||
}
|
}
|
||||||
|
|
||||||
# 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 "hEqn.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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
turbulence->correct();
|
turbulence->correct();
|
||||||
|
|
||||||
# include "logSummary.H"
|
#include "logSummary.H"
|
||||||
# include "spraySummary.H"
|
#include "spraySummary.H"
|
||||||
|
|
||||||
rho = thermo->rho();
|
rho = thermo.rho();
|
||||||
|
|
||||||
runTime.write();
|
runTime.write();
|
||||||
|
|
||||||
|
|||||||
@ -9,32 +9,5 @@
|
|||||||
+ dieselSpray.heatTransferSource()
|
+ dieselSpray.heatTransferSource()
|
||||||
);
|
);
|
||||||
|
|
||||||
thermo->correct();
|
thermo.correct();
|
||||||
|
|
||||||
forAll(dQ, i)
|
|
||||||
{
|
|
||||||
dQ[i] = 0.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
scalarField cp(dQ.size(), 0.0);
|
|
||||||
|
|
||||||
forAll(Y, i)
|
|
||||||
{
|
|
||||||
volScalarField RRi = chemistry.RR(i);
|
|
||||||
|
|
||||||
forAll(h, celli)
|
|
||||||
{
|
|
||||||
scalar Ti = T[celli];
|
|
||||||
cp[celli] += Y[i][celli]*chemistry.specieThermo()[i].Cp(Ti);
|
|
||||||
scalar hi = chemistry.specieThermo()[i].h(Ti);
|
|
||||||
scalar RR = RRi[celli];
|
|
||||||
dQ[celli] -= hi*RR;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
forAll(dQ, celli)
|
|
||||||
{
|
|
||||||
dQ[celli] /= cp[celli];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
rho = thermo->rho();
|
rho = thermo.rho();
|
||||||
|
|
||||||
volScalarField A = UEqn.A();
|
volScalarField A = UEqn.A();
|
||||||
U = UEqn.H()/A;
|
U = UEqn.H()/A;
|
||||||
@ -8,7 +8,7 @@ if (transonic)
|
|||||||
surfaceScalarField phid
|
surfaceScalarField phid
|
||||||
(
|
(
|
||||||
"phid",
|
"phid",
|
||||||
fvc::interpolate(thermo->psi())
|
fvc::interpolate(psi)
|
||||||
*((fvc::interpolate(U) & mesh.Sf()) - fvc::meshPhi(rho, U))
|
*((fvc::interpolate(U) & mesh.Sf()) - fvc::meshPhi(rho, U))
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -44,7 +44,7 @@ volScalarField Sevap
|
|||||||
dimensionedScalar("zero", dimensionSet(1, -3, -1, 0, 0), 0.0)
|
dimensionedScalar("zero", dimensionSet(1, -3, -1, 0, 0), 0.0)
|
||||||
);
|
);
|
||||||
|
|
||||||
for(label i=0; i<Y.size(); i++)
|
for (label i=0; i<Y.size(); i++)
|
||||||
{
|
{
|
||||||
if (dieselSpray.isLiquidFuel()[i])
|
if (dieselSpray.isLiquidFuel()[i])
|
||||||
{
|
{
|
||||||
|
|||||||
@ -8,17 +8,17 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/thermophysicalModels/liquidMixture/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/liquidMixture/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \
|
||||||
-I$(LIB_SRC)/../applications/solvers/combustion/XiFoam \
|
-I$(LIB_SRC)/../applications/solvers/reactionThermo/XiFoam \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
||||||
-I$(LIB_SRC)/ODE/lnInclude
|
-I$(LIB_SRC)/ODE/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lcompressibleRASModels \
|
-lcompressibleRASModels \
|
||||||
-lcompressibleLESModels \
|
-lcompressibleLESModels \
|
||||||
-lcombustionThermophysicalModels \
|
-lreactionThermophysicalModels \
|
||||||
-llagrangian \
|
-llagrangian \
|
||||||
-ldieselSpray \
|
-ldieselSpray \
|
||||||
-lliquids \
|
-lliquids \
|
||||||
|
|||||||
@ -34,7 +34,7 @@ Description
|
|||||||
#include "hCombustionThermo.H"
|
#include "hCombustionThermo.H"
|
||||||
#include "turbulenceModel.H"
|
#include "turbulenceModel.H"
|
||||||
#include "spray.H"
|
#include "spray.H"
|
||||||
#include "chemistryModel.H"
|
#include "psiChemistryModel.H"
|
||||||
#include "chemistrySolver.H"
|
#include "chemistrySolver.H"
|
||||||
|
|
||||||
#include "multivariateScheme.H"
|
#include "multivariateScheme.H"
|
||||||
@ -46,28 +46,27 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
#include "setRootCase.H"
|
||||||
|
#include "createTime.H"
|
||||||
|
#include "createMesh.H"
|
||||||
|
#include "createFields.H"
|
||||||
|
#include "readEnvironmentalProperties.H"
|
||||||
|
#include "readCombustionProperties.H"
|
||||||
|
#include "createSpray.H"
|
||||||
|
#include "initContinuityErrs.H"
|
||||||
|
#include "readTimeControls.H"
|
||||||
|
#include "compressibleCourantNo.H"
|
||||||
|
#include "setInitialDeltaT.H"
|
||||||
|
|
||||||
# include "setRootCase.H"
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
# include "createTime.H"
|
|
||||||
# include "createMesh.H"
|
|
||||||
# include "createFields.H"
|
|
||||||
# include "readEnvironmentalProperties.H"
|
|
||||||
# include "readCombustionProperties.H"
|
|
||||||
# include "createSpray.H"
|
|
||||||
# include "initContinuityErrs.H"
|
|
||||||
# include "readTimeControls.H"
|
|
||||||
# include "compressibleCourantNo.H"
|
|
||||||
# include "setInitialDeltaT.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Info << "\nStarting time loop\n" << endl;
|
Info << "\nStarting time loop\n" << endl;
|
||||||
|
|
||||||
while (runTime.run())
|
while (runTime.run())
|
||||||
{
|
{
|
||||||
# include "readPISOControls.H"
|
#include "readPISOControls.H"
|
||||||
# include "compressibleCourantNo.H"
|
#include "compressibleCourantNo.H"
|
||||||
# include "setDeltaT.H"
|
#include "setDeltaT.H"
|
||||||
|
|
||||||
runTime++;
|
runTime++;
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
@ -94,26 +93,26 @@ int main(int argc, char *argv[])
|
|||||||
kappa = (runTime.deltaT() + tc)/(runTime.deltaT()+tc+tk);
|
kappa = (runTime.deltaT() + tc)/(runTime.deltaT()+tc+tk);
|
||||||
}
|
}
|
||||||
|
|
||||||
# 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 "hEqn.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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
turbulence->correct();
|
turbulence->correct();
|
||||||
|
|
||||||
# include "spraySummary.H"
|
#include "spraySummary.H"
|
||||||
|
|
||||||
rho = thermo->rho();
|
rho = thermo.rho();
|
||||||
|
|
||||||
runTime.write();
|
runTime.write();
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
rho = thermo->rho();
|
rho = thermo.rho();
|
||||||
|
|
||||||
volScalarField rUA = 1.0/UEqn.A();
|
volScalarField rUA = 1.0/UEqn.A();
|
||||||
U = rUA*UEqn.H();
|
U = rUA*UEqn.H();
|
||||||
@ -8,7 +8,7 @@ if (transonic)
|
|||||||
surfaceScalarField phid
|
surfaceScalarField phid
|
||||||
(
|
(
|
||||||
"phid",
|
"phid",
|
||||||
fvc::interpolate(thermo->psi())
|
fvc::interpolate(psi)
|
||||||
*(
|
*(
|
||||||
(fvc::interpolate(U) & mesh.Sf())
|
(fvc::interpolate(U) & mesh.Sf())
|
||||||
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
||||||
@ -37,8 +37,8 @@ if (transonic)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
phi =
|
phi =
|
||||||
fvc::interpolate(rho)*
|
fvc::interpolate(rho)
|
||||||
(
|
*(
|
||||||
(fvc::interpolate(U) & mesh.Sf())
|
(fvc::interpolate(U) & mesh.Sf())
|
||||||
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -3,7 +3,7 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/engine/lnInclude \
|
-I$(LIB_SRC)/engine/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||||
@ -13,7 +13,7 @@ EXE_LIBS = \
|
|||||||
-lcompressibleRASModels \
|
-lcompressibleRASModels \
|
||||||
-lcompressibleLESModels \
|
-lcompressibleLESModels \
|
||||||
-lbasicThermophysicalModels \
|
-lbasicThermophysicalModels \
|
||||||
-lcombustionThermophysicalModels \
|
-lreactionThermophysicalModels \
|
||||||
-lspecie \
|
-lspecie \
|
||||||
-llaminarFlameSpeedModels \
|
-llaminarFlameSpeedModels \
|
||||||
-lfiniteVolume
|
-lfiniteVolume
|
||||||
|
|||||||
@ -63,29 +63,29 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
# include "setRootCase.H"
|
#include "setRootCase.H"
|
||||||
|
|
||||||
# include "createEngineTime.H"
|
#include "createEngineTime.H"
|
||||||
# include "createEngineMesh.H"
|
#include "createEngineMesh.H"
|
||||||
# include "readPISOControls.H"
|
#include "readPISOControls.H"
|
||||||
# include "readCombustionProperties.H"
|
#include "readCombustionProperties.H"
|
||||||
# include "createFields.H"
|
#include "createFields.H"
|
||||||
# include "initContinuityErrs.H"
|
#include "initContinuityErrs.H"
|
||||||
# include "readEngineTimeControls.H"
|
#include "readEngineTimeControls.H"
|
||||||
# include "compressibleCourantNo.H"
|
#include "compressibleCourantNo.H"
|
||||||
# include "setInitialDeltaT.H"
|
#include "setInitialDeltaT.H"
|
||||||
# include "startSummary.H"
|
#include "startSummary.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Info << "\nStarting time loop\n" << endl;
|
Info << "\nStarting time loop\n" << endl;
|
||||||
|
|
||||||
while (runTime.run())
|
while (runTime.run())
|
||||||
{
|
{
|
||||||
# include "readPISOControls.H"
|
#include "readPISOControls.H"
|
||||||
# include "readEngineTimeControls.H"
|
#include "readEngineTimeControls.H"
|
||||||
# include "compressibleCourantNo.H"
|
#include "compressibleCourantNo.H"
|
||||||
# include "setDeltaT.H"
|
#include "setDeltaT.H"
|
||||||
|
|
||||||
runTime++;
|
runTime++;
|
||||||
|
|
||||||
@ -93,31 +93,31 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
mesh.move();
|
mesh.move();
|
||||||
|
|
||||||
# include "rhoEqn.H"
|
#include "rhoEqn.H"
|
||||||
|
|
||||||
# include "UEqn.H"
|
#include "UEqn.H"
|
||||||
|
|
||||||
// --- PISO loop
|
// --- PISO loop
|
||||||
for (int corr=1; corr<=nCorr; corr++)
|
for (int corr=1; corr<=nCorr; corr++)
|
||||||
{
|
{
|
||||||
# include "ftEqn.H"
|
#include "ftEqn.H"
|
||||||
# include "bEqn.H"
|
#include "bEqn.H"
|
||||||
# include "huEqn.H"
|
#include "huEqn.H"
|
||||||
# include "hEqn.H"
|
#include "hEqn.H"
|
||||||
|
|
||||||
if (!ign.ignited())
|
if (!ign.ignited())
|
||||||
{
|
{
|
||||||
hu == h;
|
hu == h;
|
||||||
}
|
}
|
||||||
|
|
||||||
# include "pEqn.H"
|
#include "pEqn.H"
|
||||||
}
|
}
|
||||||
|
|
||||||
turbulence->correct();
|
turbulence->correct();
|
||||||
|
|
||||||
# include "logSummary.H"
|
#include "logSummary.H"
|
||||||
|
|
||||||
rho = thermo->rho();
|
rho = thermo.rho();
|
||||||
|
|
||||||
runTime.write();
|
runTime.write();
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
rho = thermo->rho();
|
rho = thermo.rho();
|
||||||
|
|
||||||
volScalarField rUA = 1.0/UEqn.A();
|
volScalarField rUA = 1.0/UEqn.A();
|
||||||
U = rUA*UEqn.H();
|
U = rUA*UEqn.H();
|
||||||
@ -8,7 +8,7 @@ if (transonic)
|
|||||||
surfaceScalarField phid
|
surfaceScalarField phid
|
||||||
(
|
(
|
||||||
"phid",
|
"phid",
|
||||||
fvc::interpolate(thermo->psi())
|
fvc::interpolate(psi)
|
||||||
*((fvc::interpolate(U) & mesh.Sf()) - fvc::meshPhi(rho, U))
|
*((fvc::interpolate(U) & mesh.Sf()) - fvc::meshPhi(rho, U))
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,3 @@
|
|||||||
#include "readTimeControls.H"
|
#include "readTimeControls.H"
|
||||||
|
|
||||||
maxDeltaT = runTime.userTimeToTime(maxDeltaT);
|
maxDeltaT = runTime.userTimeToTime(maxDeltaT);
|
||||||
|
|||||||
@ -2,7 +2,7 @@ EXE_INC = \
|
|||||||
-I../XiFoam \
|
-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/combustion/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
||||||
-I$(LIB_SRC)/ODE/lnInclude \
|
-I$(LIB_SRC)/ODE/lnInclude \
|
||||||
@ -11,7 +11,7 @@ EXE_INC = \
|
|||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lcompressibleRASModels \
|
-lcompressibleRASModels \
|
||||||
-lcompressibleLESModels \
|
-lcompressibleLESModels \
|
||||||
-lcombustionThermophysicalModels \
|
-lreactionThermophysicalModels \
|
||||||
-lspecie \
|
-lspecie \
|
||||||
-lbasicThermophysicalModels \
|
-lbasicThermophysicalModels \
|
||||||
-lchemistryModel \
|
-lchemistryModel \
|
||||||
|
|||||||
@ -13,7 +13,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection
|
|||||||
label inertIndex = -1;
|
label inertIndex = -1;
|
||||||
volScalarField Yt = 0.0*Y[0];
|
volScalarField Yt = 0.0*Y[0];
|
||||||
|
|
||||||
for(label i=0; i<Y.size(); i++)
|
for (label i=0; i<Y.size(); i++)
|
||||||
{
|
{
|
||||||
if (Y[i].name() != inertSpecie)
|
if (Y[i].name() != inertSpecie)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,13 +1,16 @@
|
|||||||
Info<< nl << "Reading thermophysicalProperties" << endl;
|
Info<< nl << "Reading thermophysicalProperties" << endl;
|
||||||
autoPtr<hCombustionThermo> thermo
|
autoPtr<psiChemistryModel> pChemistry
|
||||||
(
|
(
|
||||||
hCombustionThermo::New(mesh)
|
psiChemistryModel::New(mesh)
|
||||||
);
|
);
|
||||||
|
psiChemistryModel& chemistry = pChemistry();
|
||||||
|
|
||||||
combustionMixture& composition = thermo->composition();
|
hCombustionThermo& thermo = chemistry.thermo();
|
||||||
|
|
||||||
|
basicMultiComponentMixture& composition = thermo.composition();
|
||||||
PtrList<volScalarField>& Y = composition.Y();
|
PtrList<volScalarField>& Y = composition.Y();
|
||||||
|
|
||||||
word inertSpecie(thermo->lookup("inertSpecie"));
|
word inertSpecie(thermo.lookup("inertSpecie"));
|
||||||
|
|
||||||
volScalarField rho
|
volScalarField rho
|
||||||
(
|
(
|
||||||
@ -17,7 +20,7 @@ volScalarField rho
|
|||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
mesh
|
mesh
|
||||||
),
|
),
|
||||||
thermo->rho()
|
thermo.rho()
|
||||||
);
|
);
|
||||||
|
|
||||||
Info<< "Reading field U\n" << endl;
|
Info<< "Reading field U\n" << endl;
|
||||||
@ -35,9 +38,9 @@ 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& h = thermo.h();
|
||||||
|
|
||||||
|
|
||||||
#include "compressibleCreatePhi.H"
|
#include "compressibleCreatePhi.H"
|
||||||
@ -64,7 +67,7 @@ autoPtr<compressible::turbulenceModel> turbulence
|
|||||||
rho,
|
rho,
|
||||||
U,
|
U,
|
||||||
phi,
|
phi,
|
||||||
thermo()
|
thermo
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -72,31 +75,11 @@ Info<< "Creating field DpDt\n" << endl;
|
|||||||
volScalarField DpDt =
|
volScalarField DpDt =
|
||||||
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
|
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
|
||||||
|
|
||||||
Info << "Constructing chemical mechanism" << endl;
|
|
||||||
chemistryModel chemistry
|
|
||||||
(
|
|
||||||
thermo(),
|
|
||||||
rho
|
|
||||||
);
|
|
||||||
|
|
||||||
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
|
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
|
||||||
|
|
||||||
for(label i=0; i<Y.size(); i++)
|
forAll (Y, i)
|
||||||
{
|
{
|
||||||
fields.add(Y[i]);
|
fields.add(Y[i]);
|
||||||
}
|
}
|
||||||
fields.add(h);
|
fields.add(h);
|
||||||
|
|
||||||
volScalarField dQ
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"dQ",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::NO_READ,
|
|
||||||
IOobject::AUTO_WRITE
|
|
||||||
),
|
|
||||||
mesh,
|
|
||||||
dimensionedScalar("zero", dimensionSet(1, -3, -1, 0, 0, 0, 0), 0.0)
|
|
||||||
);
|
|
||||||
|
|||||||
@ -33,7 +33,7 @@ Description
|
|||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "hCombustionThermo.H"
|
#include "hCombustionThermo.H"
|
||||||
#include "turbulenceModel.H"
|
#include "turbulenceModel.H"
|
||||||
#include "chemistryModel.H"
|
#include "psiChemistryModel.H"
|
||||||
#include "chemistrySolver.H"
|
#include "chemistrySolver.H"
|
||||||
#include "multivariateScheme.H"
|
#include "multivariateScheme.H"
|
||||||
|
|
||||||
@ -41,52 +41,52 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
# include "setRootCase.H"
|
#include "setRootCase.H"
|
||||||
# include "createTime.H"
|
#include "createTime.H"
|
||||||
# include "createMesh.H"
|
#include "createMesh.H"
|
||||||
# include "readChemistryProperties.H"
|
#include "readChemistryProperties.H"
|
||||||
# include "readEnvironmentalProperties.H"
|
#include "readEnvironmentalProperties.H"
|
||||||
# include "createFields.H"
|
#include "createFields.H"
|
||||||
# include "initContinuityErrs.H"
|
#include "initContinuityErrs.H"
|
||||||
# include "readTimeControls.H"
|
#include "readTimeControls.H"
|
||||||
# include "compressibleCourantNo.H"
|
#include "compressibleCourantNo.H"
|
||||||
# include "setInitialDeltaT.H"
|
#include "setInitialDeltaT.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Info << "\nStarting time loop\n" << endl;
|
Info << "\nStarting time loop\n" << endl;
|
||||||
|
|
||||||
while (runTime.run())
|
while (runTime.run())
|
||||||
{
|
{
|
||||||
# include "readTimeControls.H"
|
#include "readTimeControls.H"
|
||||||
# include "readPISOControls.H"
|
#include "readPISOControls.H"
|
||||||
# include "compressibleCourantNo.H"
|
#include "compressibleCourantNo.H"
|
||||||
# include "setDeltaT.H"
|
#include "setDeltaT.H"
|
||||||
|
|
||||||
runTime++;
|
runTime++;
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
# include "chemistry.H"
|
#include "chemistry.H"
|
||||||
# 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"
|
||||||
|
|
||||||
# define Db turbulence->alphaEff()
|
#define Db turbulence->alphaEff()
|
||||||
# include "hEqn.H"
|
#include "hEqn.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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
turbulence->correct();
|
turbulence->correct();
|
||||||
|
|
||||||
rho = thermo->rho();
|
rho = thermo.rho();
|
||||||
|
|
||||||
runTime.write();
|
runTime.write();
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,8 @@ IOdictionary chemistryProperties
|
|||||||
runTime.constant(),
|
runTime.constant(),
|
||||||
mesh,
|
mesh,
|
||||||
IOobject::MUST_READ,
|
IOobject::MUST_READ,
|
||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE,
|
||||||
|
false
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -38,11 +38,11 @@ if (mesh.nInternalFaces())
|
|||||||
surfaceScalarField amaxSfbyDelta =
|
surfaceScalarField amaxSfbyDelta =
|
||||||
mesh.surfaceInterpolation::deltaCoeffs()*amaxSf;
|
mesh.surfaceInterpolation::deltaCoeffs()*amaxSf;
|
||||||
|
|
||||||
CoNum = max(amaxSfbyDelta/mesh.magSf())
|
CoNum = max(amaxSfbyDelta/mesh.magSf()).value()*runTime.deltaT().value();
|
||||||
.value()*runTime.deltaT().value();
|
|
||||||
|
|
||||||
meanCoNum = (sum(amaxSfbyDelta)/sum(mesh.magSf()))
|
meanCoNum =
|
||||||
.value()*runTime.deltaT().value();
|
(sum(amaxSfbyDelta)/sum(mesh.magSf())).value()
|
||||||
|
*runTime.deltaT().value();
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "Mean and max Courant Numbers = "
|
Info<< "Mean and max Courant Numbers = "
|
||||||
|
|||||||
@ -1,15 +1,16 @@
|
|||||||
Info<< "Reading thermophysical properties\n" << endl;
|
Info<< "Reading thermophysical properties\n" << endl;
|
||||||
|
|
||||||
autoPtr<basicThermo> thermo
|
autoPtr<basicPsiThermo> pThermo
|
||||||
(
|
(
|
||||||
basicThermo::New(mesh)
|
basicPsiThermo::New(mesh)
|
||||||
);
|
);
|
||||||
|
basicPsiThermo& thermo = pThermo();
|
||||||
|
|
||||||
volScalarField& p = thermo->p();
|
volScalarField& p = thermo.p();
|
||||||
volScalarField& h = thermo->h();
|
volScalarField& h = thermo.h();
|
||||||
const volScalarField& T = thermo->T();
|
const volScalarField& T = thermo.T();
|
||||||
const volScalarField& psi = thermo->psi();
|
const volScalarField& psi = thermo.psi();
|
||||||
const volScalarField& mu = thermo->mu();
|
const volScalarField& mu = thermo.mu();
|
||||||
|
|
||||||
bool inviscid(true);
|
bool inviscid(true);
|
||||||
if (max(mu.internalField()) > 0.0)
|
if (max(mu.internalField()) > 0.0)
|
||||||
@ -42,7 +43,7 @@ volScalarField rho
|
|||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::AUTO_WRITE
|
||||||
),
|
),
|
||||||
thermo->rho(),
|
thermo.rho(),
|
||||||
rhoBoundaryTypes
|
rhoBoundaryTypes
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -3,10 +3,7 @@ wordList rhoBoundaryTypes = pbf.types();
|
|||||||
|
|
||||||
forAll(rhoBoundaryTypes, patchi)
|
forAll(rhoBoundaryTypes, patchi)
|
||||||
{
|
{
|
||||||
if
|
if (rhoBoundaryTypes[patchi] == "waveTransmissive")
|
||||||
(
|
|
||||||
rhoBoundaryTypes[patchi] == "waveTransmissive"
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
rhoBoundaryTypes[patchi] = zeroGradientFvPatchScalarField::typeName;
|
rhoBoundaryTypes[patchi] = zeroGradientFvPatchScalarField::typeName;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,7 +32,7 @@ Description
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "basicThermo.H"
|
#include "basicPsiThermo.H"
|
||||||
#include "zeroGradientFvPatchFields.H"
|
#include "zeroGradientFvPatchFields.H"
|
||||||
#include "fixedRhoFvPatchScalarField.H"
|
#include "fixedRhoFvPatchScalarField.H"
|
||||||
|
|
||||||
@ -40,18 +40,17 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
#include "setRootCase.H"
|
||||||
|
|
||||||
# include "setRootCase.H"
|
#include "createTime.H"
|
||||||
|
#include "createMesh.H"
|
||||||
|
#include "createFields.H"
|
||||||
|
#include "readThermophysicalProperties.H"
|
||||||
|
#include "readTimeControls.H"
|
||||||
|
|
||||||
# include "createTime.H"
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
# include "createMesh.H"
|
|
||||||
# include "createFields.H"
|
|
||||||
# include "readThermophysicalProperties.H"
|
|
||||||
# include "readTimeControls.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
#include "readFluxScheme.H"
|
||||||
|
|
||||||
# include "readFluxScheme.H"
|
|
||||||
|
|
||||||
dimensionedScalar v_zero("v_zero",dimVolume/dimTime, 0.0);
|
dimensionedScalar v_zero("v_zero",dimVolume/dimTime, 0.0);
|
||||||
|
|
||||||
@ -91,7 +90,7 @@ int main(int argc, char *argv[])
|
|||||||
surfaceScalarField phiv_pos = U_pos & mesh.Sf();
|
surfaceScalarField phiv_pos = U_pos & mesh.Sf();
|
||||||
surfaceScalarField phiv_neg = U_neg & mesh.Sf();
|
surfaceScalarField phiv_neg = U_neg & mesh.Sf();
|
||||||
|
|
||||||
volScalarField c = sqrt(thermo->Cp()/thermo->Cv()*rPsi);
|
volScalarField c = sqrt(thermo.Cp()/thermo.Cv()*rPsi);
|
||||||
surfaceScalarField cSf_pos = fvc::interpolate(c, pos, "reconstruct(T)")*mesh.magSf();
|
surfaceScalarField cSf_pos = fvc::interpolate(c, pos, "reconstruct(T)")*mesh.magSf();
|
||||||
surfaceScalarField cSf_neg = fvc::interpolate(c, neg, "reconstruct(T)")*mesh.magSf();
|
surfaceScalarField cSf_neg = fvc::interpolate(c, neg, "reconstruct(T)")*mesh.magSf();
|
||||||
|
|
||||||
@ -102,9 +101,9 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
surfaceScalarField amaxSf("amaxSf", max(mag(am), mag(ap)));
|
surfaceScalarField amaxSf("amaxSf", max(mag(am), mag(ap)));
|
||||||
|
|
||||||
# include "compressibleCourantNo.H"
|
#include "compressibleCourantNo.H"
|
||||||
# include "readTimeControls.H"
|
#include "readTimeControls.H"
|
||||||
# include "setDeltaT.H"
|
#include "setDeltaT.H"
|
||||||
|
|
||||||
runTime++;
|
runTime++;
|
||||||
|
|
||||||
@ -183,7 +182,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
h = (rhoE + p)/rho - 0.5*magSqr(U);
|
h = (rhoE + p)/rho - 0.5*magSqr(U);
|
||||||
h.correctBoundaryConditions();
|
h.correctBoundaryConditions();
|
||||||
thermo->correct();
|
thermo.correct();
|
||||||
rhoE.boundaryField() =
|
rhoE.boundaryField() =
|
||||||
rho.boundaryField()*
|
rho.boundaryField()*
|
||||||
(
|
(
|
||||||
@ -193,15 +192,15 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (!inviscid)
|
if (!inviscid)
|
||||||
{
|
{
|
||||||
volScalarField k("k", thermo->Cp()*mu/Pr);
|
volScalarField k("k", thermo.Cp()*mu/Pr);
|
||||||
solve
|
solve
|
||||||
(
|
(
|
||||||
fvm::ddt(rho, h) - fvc::ddt(rho, h)
|
fvm::ddt(rho, h) - fvc::ddt(rho, h)
|
||||||
- fvm::laplacian(thermo->alpha(), h)
|
- fvm::laplacian(thermo.alpha(), h)
|
||||||
+ fvc::laplacian(thermo->alpha(), h)
|
+ fvc::laplacian(thermo.alpha(), h)
|
||||||
- fvc::laplacian(k, T)
|
- fvc::laplacian(k, T)
|
||||||
);
|
);
|
||||||
thermo->correct();
|
thermo.correct();
|
||||||
rhoE = rho*(h + 0.5*magSqr(U)) - p;
|
rhoE = rho*(h + 0.5*magSqr(U)) - p;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,13 +1,14 @@
|
|||||||
Info<< "Reading thermophysical properties\n" << endl;
|
Info<< "Reading thermophysical properties\n" << endl;
|
||||||
|
|
||||||
autoPtr<basicThermo> thermo
|
autoPtr<basicPsiThermo> pThermo
|
||||||
(
|
(
|
||||||
basicThermo::New(mesh)
|
basicPsiThermo::New(mesh)
|
||||||
);
|
);
|
||||||
|
basicPsiThermo& thermo = pThermo();
|
||||||
|
|
||||||
volScalarField& p = thermo->p();
|
volScalarField& p = thermo.p();
|
||||||
volScalarField& h = thermo->h();
|
volScalarField& h = thermo.h();
|
||||||
const volScalarField& psi = thermo->psi();
|
const volScalarField& psi = thermo.psi();
|
||||||
|
|
||||||
volScalarField rho
|
volScalarField rho
|
||||||
(
|
(
|
||||||
@ -19,7 +20,7 @@
|
|||||||
IOobject::READ_IF_PRESENT,
|
IOobject::READ_IF_PRESENT,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::AUTO_WRITE
|
||||||
),
|
),
|
||||||
thermo->rho()
|
thermo.rho()
|
||||||
);
|
);
|
||||||
|
|
||||||
Info<< "Reading field U\n" << endl;
|
Info<< "Reading field U\n" << endl;
|
||||||
@ -51,7 +52,7 @@
|
|||||||
rho,
|
rho,
|
||||||
U,
|
U,
|
||||||
phi,
|
phi,
|
||||||
thermo()
|
thermo
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -19,5 +19,5 @@
|
|||||||
hEqn.solve();
|
hEqn.solve();
|
||||||
}
|
}
|
||||||
|
|
||||||
thermo->correct();
|
thermo.correct();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
rho = thermo->rho();
|
rho = thermo.rho();
|
||||||
|
|
||||||
volScalarField rUA = 1.0/UEqn().A();
|
volScalarField rUA = 1.0/UEqn().A();
|
||||||
U = rUA*UEqn().H();
|
U = rUA*UEqn().H();
|
||||||
@ -13,7 +13,7 @@ if (transonic)
|
|||||||
surfaceScalarField phid
|
surfaceScalarField phid
|
||||||
(
|
(
|
||||||
"phid",
|
"phid",
|
||||||
fvc::interpolate(thermo->psi())
|
fvc::interpolate(psi)
|
||||||
*(
|
*(
|
||||||
(fvc::interpolate(U) & mesh.Sf())
|
(fvc::interpolate(U) & mesh.Sf())
|
||||||
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
||||||
@ -99,7 +99,7 @@ else
|
|||||||
// Explicitly relax pressure for momentum corrector
|
// Explicitly relax pressure for momentum corrector
|
||||||
p.relax();
|
p.relax();
|
||||||
|
|
||||||
rho = thermo->rho();
|
rho = thermo.rho();
|
||||||
rho.relax();
|
rho.relax();
|
||||||
Info<< "rho max/min : " << max(rho).value()
|
Info<< "rho max/min : " << max(rho).value()
|
||||||
<< " " << min(rho).value() << endl;
|
<< " " << min(rho).value() << endl;
|
||||||
@ -117,7 +117,7 @@ bound(p, pMin);
|
|||||||
/*
|
/*
|
||||||
if (closedVolume)
|
if (closedVolume)
|
||||||
{
|
{
|
||||||
p += (initialMass - fvc::domainIntegrate(thermo->psi()*p))
|
p += (initialMass - fvc::domainIntegrate(psi*p))
|
||||||
/fvc::domainIntegrate(thermo->psi());
|
/fvc::domainIntegrate(psi);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -35,7 +35,7 @@ Description
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "basicThermo.H"
|
#include "basicPsiThermo.H"
|
||||||
#include "turbulenceModel.H"
|
#include "turbulenceModel.H"
|
||||||
#include "bound.H"
|
#include "bound.H"
|
||||||
|
|
||||||
|
|||||||
@ -1,13 +1,14 @@
|
|||||||
Info<< "Reading thermophysical properties\n" << endl;
|
Info<< "Reading thermophysical properties\n" << endl;
|
||||||
|
|
||||||
autoPtr<basicThermo> thermo
|
autoPtr<basicPsiThermo> pThermo
|
||||||
(
|
(
|
||||||
basicThermo::New(mesh)
|
basicPsiThermo::New(mesh)
|
||||||
);
|
);
|
||||||
|
basicPsiThermo& thermo = pThermo();
|
||||||
|
|
||||||
volScalarField& p = thermo->p();
|
volScalarField& p = thermo.p();
|
||||||
volScalarField& h = thermo->h();
|
volScalarField& h = thermo.h();
|
||||||
const volScalarField& psi = thermo->psi();
|
const volScalarField& psi = thermo.psi();
|
||||||
|
|
||||||
volScalarField rho
|
volScalarField rho
|
||||||
(
|
(
|
||||||
@ -19,7 +20,7 @@
|
|||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::AUTO_WRITE
|
||||||
),
|
),
|
||||||
thermo->rho()
|
thermo.rho()
|
||||||
);
|
);
|
||||||
|
|
||||||
Info<< "\nReading field U\n" << endl;
|
Info<< "\nReading field U\n" << endl;
|
||||||
@ -47,7 +48,7 @@
|
|||||||
rho,
|
rho,
|
||||||
U,
|
U,
|
||||||
phi,
|
phi,
|
||||||
thermo()
|
thermo
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -8,5 +8,5 @@
|
|||||||
DpDt
|
DpDt
|
||||||
);
|
);
|
||||||
|
|
||||||
thermo->correct();
|
thermo.correct();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
rho = thermo->rho();
|
rho = thermo.rho();
|
||||||
|
|
||||||
volScalarField rUA = 1.0/UEqn.A();
|
volScalarField rUA = 1.0/UEqn.A();
|
||||||
U = rUA*UEqn.H();
|
U = rUA*UEqn.H();
|
||||||
@ -8,7 +8,7 @@ if (transonic)
|
|||||||
surfaceScalarField phid
|
surfaceScalarField phid
|
||||||
(
|
(
|
||||||
"phid",
|
"phid",
|
||||||
fvc::interpolate(thermo->psi())
|
fvc::interpolate(psi)
|
||||||
*(
|
*(
|
||||||
(fvc::interpolate(U) & mesh.Sf())
|
(fvc::interpolate(U) & mesh.Sf())
|
||||||
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
||||||
|
|||||||
@ -31,7 +31,7 @@ Description
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "basicThermo.H"
|
#include "basicPsiThermo.H"
|
||||||
#include "turbulenceModel.H"
|
#include "turbulenceModel.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -77,7 +77,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
turbulence->correct();
|
turbulence->correct();
|
||||||
|
|
||||||
rho = thermo->rho();
|
rho = thermo.rho();
|
||||||
|
|
||||||
runTime.write();
|
runTime.write();
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,10 @@
|
|||||||
Info<< "Reading thermophysical properties\n" << endl;
|
Info<< "Reading thermophysical properties\n" << endl;
|
||||||
|
|
||||||
autoPtr<basicThermo> thermo
|
autoPtr<basicPsiThermo> pThermo
|
||||||
(
|
(
|
||||||
basicThermo::New(mesh)
|
basicPsiThermo::New(mesh)
|
||||||
);
|
);
|
||||||
|
basicPsiThermo& thermo = pThermo();
|
||||||
|
|
||||||
volScalarField rho
|
volScalarField rho
|
||||||
(
|
(
|
||||||
@ -15,11 +16,12 @@
|
|||||||
IOobject::READ_IF_PRESENT,
|
IOobject::READ_IF_PRESENT,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::AUTO_WRITE
|
||||||
),
|
),
|
||||||
thermo->rho()
|
thermo.rho()
|
||||||
);
|
);
|
||||||
|
|
||||||
volScalarField& p = thermo->p();
|
volScalarField& p = thermo.p();
|
||||||
volScalarField& h = thermo->h();
|
volScalarField& h = thermo.h();
|
||||||
|
const volScalarField& psi = thermo.psi();
|
||||||
|
|
||||||
|
|
||||||
Info<< "Reading field U\n" << endl;
|
Info<< "Reading field U\n" << endl;
|
||||||
@ -36,7 +38,7 @@
|
|||||||
mesh
|
mesh
|
||||||
);
|
);
|
||||||
|
|
||||||
# include "compressibleCreatePhi.H"
|
#include "compressibleCreatePhi.H"
|
||||||
|
|
||||||
|
|
||||||
label pRefCell = 0;
|
label pRefCell = 0;
|
||||||
@ -56,7 +58,7 @@
|
|||||||
rho,
|
rho,
|
||||||
U,
|
U,
|
||||||
phi,
|
phi,
|
||||||
thermo()
|
thermo
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -14,5 +14,5 @@
|
|||||||
eqnResidual = hEqn.solve().initialResidual();
|
eqnResidual = hEqn.solve().initialResidual();
|
||||||
maxResidual = max(eqnResidual, maxResidual);
|
maxResidual = max(eqnResidual, maxResidual);
|
||||||
|
|
||||||
thermo->correct();
|
thermo.correct();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -65,10 +65,10 @@ bound(p, pMin);
|
|||||||
// to obey overall mass continuity
|
// to obey overall mass continuity
|
||||||
if (closedVolume)
|
if (closedVolume)
|
||||||
{
|
{
|
||||||
p += (initialMass - fvc::domainIntegrate(thermo->psi()*p))
|
p += (initialMass - fvc::domainIntegrate(psi*p))
|
||||||
/fvc::domainIntegrate(thermo->psi());
|
/fvc::domainIntegrate(psi);
|
||||||
}
|
}
|
||||||
|
|
||||||
rho = thermo->rho();
|
rho = thermo.rho();
|
||||||
rho.relax();
|
rho.relax();
|
||||||
Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value() << endl;
|
Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value() << endl;
|
||||||
|
|||||||
@ -27,12 +27,12 @@ Application
|
|||||||
|
|
||||||
Description
|
Description
|
||||||
Steady-state solver for turbulent flow of compressible fluids with
|
Steady-state solver for turbulent flow of compressible fluids with
|
||||||
implicit or explicit porosity treatment
|
RANS turbulence modelling, and implicit or explicit porosity treatment
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "basicThermo.H"
|
#include "basicPsiThermo.H"
|
||||||
#include "RASModel.H"
|
#include "RASModel.H"
|
||||||
#include "porousZones.H"
|
#include "porousZones.H"
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,10 @@
|
|||||||
Info<< "Reading thermophysical properties\n" << endl;
|
Info<< "Reading thermophysical properties\n" << endl;
|
||||||
|
|
||||||
autoPtr<basicThermo> thermo
|
autoPtr<basicPsiThermo> pThermo
|
||||||
(
|
(
|
||||||
basicThermo::New(mesh)
|
basicPsiThermo::New(mesh)
|
||||||
);
|
);
|
||||||
|
basicPsiThermo& thermo = pThermo();
|
||||||
|
|
||||||
volScalarField rho
|
volScalarField rho
|
||||||
(
|
(
|
||||||
@ -15,12 +16,12 @@
|
|||||||
IOobject::READ_IF_PRESENT,
|
IOobject::READ_IF_PRESENT,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::AUTO_WRITE
|
||||||
),
|
),
|
||||||
thermo->rho()
|
thermo.rho()
|
||||||
);
|
);
|
||||||
|
|
||||||
volScalarField& p = thermo->p();
|
volScalarField& p = thermo.p();
|
||||||
volScalarField& h = thermo->h();
|
volScalarField& h = thermo.h();
|
||||||
|
const volScalarField& psi = thermo.psi();
|
||||||
|
|
||||||
Info<< "Reading field U\n" << endl;
|
Info<< "Reading field U\n" << endl;
|
||||||
volVectorField U
|
volVectorField U
|
||||||
@ -56,7 +57,7 @@
|
|||||||
rho,
|
rho,
|
||||||
U,
|
U,
|
||||||
phi,
|
phi,
|
||||||
thermo()
|
thermo
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -14,5 +14,5 @@
|
|||||||
eqnResidual = hEqn.solve().initialResidual();
|
eqnResidual = hEqn.solve().initialResidual();
|
||||||
maxResidual = max(eqnResidual, maxResidual);
|
maxResidual = max(eqnResidual, maxResidual);
|
||||||
|
|
||||||
thermo->correct();
|
thermo.correct();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
rho = thermo->rho();
|
rho = thermo.rho();
|
||||||
|
|
||||||
volScalarField rUA = 1.0/UEqn().A();
|
volScalarField rUA = 1.0/UEqn().A();
|
||||||
U = rUA*UEqn().H();
|
U = rUA*UEqn().H();
|
||||||
@ -11,7 +11,7 @@ if (transonic)
|
|||||||
surfaceScalarField phid
|
surfaceScalarField phid
|
||||||
(
|
(
|
||||||
"phid",
|
"phid",
|
||||||
fvc::interpolate(thermo->psi())*(fvc::interpolate(U) & mesh.Sf())
|
fvc::interpolate(psi)*(fvc::interpolate(U) & mesh.Sf())
|
||||||
);
|
);
|
||||||
|
|
||||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||||
@ -82,7 +82,7 @@ else
|
|||||||
// Explicitly relax pressure for momentum corrector
|
// Explicitly relax pressure for momentum corrector
|
||||||
p.relax();
|
p.relax();
|
||||||
|
|
||||||
rho = thermo->rho();
|
rho = thermo.rho();
|
||||||
rho.relax();
|
rho.relax();
|
||||||
Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value() << endl;
|
Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value() << endl;
|
||||||
|
|
||||||
@ -95,6 +95,6 @@ bound(p, pMin);
|
|||||||
// to obey overall mass continuity
|
// to obey overall mass continuity
|
||||||
if (closedVolume)
|
if (closedVolume)
|
||||||
{
|
{
|
||||||
p += (initialMass - fvc::domainIntegrate(thermo->psi()*p))
|
p += (initialMass - fvc::domainIntegrate(psi*p))
|
||||||
/fvc::domainIntegrate(thermo->psi());
|
/fvc::domainIntegrate(psi);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,13 +26,13 @@ Application
|
|||||||
rhoSimpleFoam
|
rhoSimpleFoam
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Steady-state SIMPLE solver for laminar or turbulent flow of
|
Steady-state SIMPLE solver for laminar or turbulent RANS flow of
|
||||||
compressible fluids.
|
compressible fluids.
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "basicThermo.H"
|
#include "basicPsiThermo.H"
|
||||||
#include "RASModel.H"
|
#include "RASModel.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
# include "rhoEqn.H"
|
#include "rhoEqn.H"
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
scalar sumLocalContErr =
|
scalar sumLocalContErr =
|
||||||
|
|||||||
@ -1,13 +1,14 @@
|
|||||||
Info<< "Reading thermophysical properties\n" << endl;
|
Info<< "Reading thermophysical properties\n" << endl;
|
||||||
|
|
||||||
autoPtr<basicThermo> thermo
|
autoPtr<basicPsiThermo> pThermo
|
||||||
(
|
(
|
||||||
basicThermo::New(mesh)
|
basicPsiThermo::New(mesh)
|
||||||
);
|
);
|
||||||
|
basicPsiThermo& thermo = pThermo();
|
||||||
|
|
||||||
volScalarField& p = thermo->p();
|
volScalarField& p = thermo.p();
|
||||||
volScalarField& h = thermo->h();
|
volScalarField& h = thermo.h();
|
||||||
const volScalarField& psi = thermo->psi();
|
const volScalarField& psi = thermo.psi();
|
||||||
|
|
||||||
volScalarField rho
|
volScalarField rho
|
||||||
(
|
(
|
||||||
@ -17,7 +18,7 @@
|
|||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
mesh
|
mesh
|
||||||
),
|
),
|
||||||
thermo->rho()
|
thermo.rho()
|
||||||
);
|
);
|
||||||
|
|
||||||
Info<< "Reading field U\n" << endl;
|
Info<< "Reading field U\n" << endl;
|
||||||
@ -45,7 +46,7 @@
|
|||||||
rho,
|
rho,
|
||||||
U,
|
U,
|
||||||
phi,
|
phi,
|
||||||
thermo()
|
thermo
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -32,7 +32,7 @@ Description
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "basicThermo.H"
|
#include "basicPsiThermo.H"
|
||||||
#include "turbulenceModel.H"
|
#include "turbulenceModel.H"
|
||||||
#include "motionSolver.H"
|
#include "motionSolver.H"
|
||||||
|
|
||||||
@ -84,8 +84,8 @@ int main(int argc, char *argv[])
|
|||||||
surfaceScalarField phid
|
surfaceScalarField phid
|
||||||
(
|
(
|
||||||
"phid",
|
"phid",
|
||||||
fvc::interpolate(psi)*
|
fvc::interpolate(psi)
|
||||||
(
|
*(
|
||||||
(fvc::interpolate(U) & mesh.Sf()) - fvc::meshPhi(rho, U)
|
(fvc::interpolate(U) & mesh.Sf()) - fvc::meshPhi(rho, U)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -1,13 +1,14 @@
|
|||||||
Info<< "Reading thermophysical properties\n" << endl;
|
Info<< "Reading thermophysical properties\n" << endl;
|
||||||
|
|
||||||
autoPtr<basicThermo> thermo
|
autoPtr<basicPsiThermo> pThermo
|
||||||
(
|
(
|
||||||
basicThermo::New(mesh)
|
basicPsiThermo::New(mesh)
|
||||||
);
|
);
|
||||||
|
basicPsiThermo& thermo = pThermo();
|
||||||
|
|
||||||
volScalarField& p = thermo->p();
|
volScalarField& p = thermo.p();
|
||||||
volScalarField& h = thermo->h();
|
volScalarField& h = thermo.h();
|
||||||
const volScalarField& psi = thermo->psi();
|
const volScalarField& psi = thermo.psi();
|
||||||
|
|
||||||
volScalarField rho
|
volScalarField rho
|
||||||
(
|
(
|
||||||
@ -17,7 +18,7 @@
|
|||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
mesh
|
mesh
|
||||||
),
|
),
|
||||||
thermo->rho()
|
thermo.rho()
|
||||||
);
|
);
|
||||||
|
|
||||||
Info<< "Reading field U\n" << endl;
|
Info<< "Reading field U\n" << endl;
|
||||||
@ -45,7 +46,7 @@
|
|||||||
rho,
|
rho,
|
||||||
U,
|
U,
|
||||||
phi,
|
phi,
|
||||||
thermo()
|
thermo
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -8,5 +8,5 @@
|
|||||||
DpDt
|
DpDt
|
||||||
);
|
);
|
||||||
|
|
||||||
thermo->correct();
|
thermo.correct();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,7 +32,7 @@ Description
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "basicThermo.H"
|
#include "basicPsiThermo.H"
|
||||||
#include "turbulenceModel.H"
|
#include "turbulenceModel.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -80,7 +80,7 @@ int main(int argc, char *argv[])
|
|||||||
surfaceScalarField phid
|
surfaceScalarField phid
|
||||||
(
|
(
|
||||||
"phid",
|
"phid",
|
||||||
fvc::interpolate(thermo->psi())
|
fvc::interpolate(psi)
|
||||||
*(
|
*(
|
||||||
(fvc::interpolate(U) & mesh.Sf())
|
(fvc::interpolate(U) & mesh.Sf())
|
||||||
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
||||||
|
|||||||
@ -41,4 +41,4 @@
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
# include "compressibleCreatePhi.H"
|
#include "compressibleCreatePhi.H"
|
||||||
|
|||||||
@ -37,16 +37,15 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
#include "setRootCase.H"
|
||||||
|
#include "createTime.H"
|
||||||
|
#include "createMesh.H"
|
||||||
|
#include "readThermodynamicProperties.H"
|
||||||
|
#include "readTransportProperties.H"
|
||||||
|
#include "createFields.H"
|
||||||
|
#include "initContinuityErrs.H"
|
||||||
|
|
||||||
# include "setRootCase.H"
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
# include "createTime.H"
|
|
||||||
# include "createMesh.H"
|
|
||||||
# include "readThermodynamicProperties.H"
|
|
||||||
# include "readTransportProperties.H"
|
|
||||||
# include "createFields.H"
|
|
||||||
# include "initContinuityErrs.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Info<< "\nStarting time loop\n" << endl;
|
Info<< "\nStarting time loop\n" << endl;
|
||||||
|
|
||||||
@ -54,10 +53,10 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
# include "readPISOControls.H"
|
#include "readPISOControls.H"
|
||||||
# include "compressibleCourantNo.H"
|
#include "compressibleCourantNo.H"
|
||||||
|
|
||||||
# include "rhoEqn.H"
|
#include "rhoEqn.H"
|
||||||
|
|
||||||
fvVectorMatrix UEqn
|
fvVectorMatrix UEqn
|
||||||
(
|
(
|
||||||
@ -79,8 +78,8 @@ int main(int argc, char *argv[])
|
|||||||
surfaceScalarField phid
|
surfaceScalarField phid
|
||||||
(
|
(
|
||||||
"phid",
|
"phid",
|
||||||
psi*
|
psi
|
||||||
(
|
*(
|
||||||
(fvc::interpolate(U) & mesh.Sf())
|
(fvc::interpolate(U) & mesh.Sf())
|
||||||
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
||||||
)
|
)
|
||||||
@ -100,7 +99,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
phi += pEqn.flux();
|
phi += pEqn.flux();
|
||||||
|
|
||||||
# include "compressibleContinuityErrs.H"
|
#include "compressibleContinuityErrs.H"
|
||||||
|
|
||||||
U -= rUA*fvc::grad(p);
|
U -= rUA*fvc::grad(p);
|
||||||
U.correctBoundaryConditions();
|
U.correctBoundaryConditions();
|
||||||
|
|||||||
@ -28,12 +28,12 @@ Application
|
|||||||
Description
|
Description
|
||||||
Transient Solver for buoyant, turbulent flow of compressible fluids for
|
Transient Solver for buoyant, turbulent flow of compressible fluids for
|
||||||
ventilation and heat-transfer. Turbulence is modelled using a run-time
|
ventilation and heat-transfer. Turbulence is modelled using a run-time
|
||||||
selectable compressible RAS model.
|
selectable compressible RAS or LES model.
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "basicThermo.H"
|
#include "basicRhoThermo.H"
|
||||||
#include "turbulenceModel.H"
|
#include "turbulenceModel.H"
|
||||||
#include "fixedGradientFvPatchFields.H"
|
#include "fixedGradientFvPatchFields.H"
|
||||||
|
|
||||||
@ -81,6 +81,8 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
turbulence->correct();
|
turbulence->correct();
|
||||||
|
|
||||||
|
rho = thermo.rho();
|
||||||
|
|
||||||
runTime.write();
|
runTime.write();
|
||||||
|
|
||||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||||
|
|||||||
@ -1,9 +1,10 @@
|
|||||||
Info<< "Reading thermophysical properties\n" << endl;
|
Info<< "Reading thermophysical properties\n" << endl;
|
||||||
|
|
||||||
autoPtr<basicThermo> thermo
|
autoPtr<basicRhoThermo> pThermo
|
||||||
(
|
(
|
||||||
basicThermo::New(mesh)
|
basicRhoThermo::New(mesh)
|
||||||
);
|
);
|
||||||
|
basicRhoThermo& thermo = pThermo();
|
||||||
|
|
||||||
volScalarField rho
|
volScalarField rho
|
||||||
(
|
(
|
||||||
@ -15,12 +16,12 @@
|
|||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
),
|
),
|
||||||
thermo->rho()
|
thermo.rho()
|
||||||
);
|
);
|
||||||
|
|
||||||
volScalarField& p = thermo->p();
|
volScalarField& p = thermo.p();
|
||||||
volScalarField& h = thermo->h();
|
volScalarField& h = thermo.h();
|
||||||
const volScalarField& psi = thermo->psi();
|
const volScalarField& psi = thermo.psi();
|
||||||
|
|
||||||
|
|
||||||
Info<< "Reading field U\n" << endl;
|
Info<< "Reading field U\n" << endl;
|
||||||
@ -37,7 +38,7 @@
|
|||||||
mesh
|
mesh
|
||||||
);
|
);
|
||||||
|
|
||||||
# include "compressibleCreatePhi.H"
|
#include "compressibleCreatePhi.H"
|
||||||
|
|
||||||
|
|
||||||
Info<< "Creating turbulence model\n" << endl;
|
Info<< "Creating turbulence model\n" << endl;
|
||||||
@ -48,7 +49,7 @@
|
|||||||
rho,
|
rho,
|
||||||
U,
|
U,
|
||||||
phi,
|
phi,
|
||||||
thermo()
|
thermo
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -59,6 +60,9 @@
|
|||||||
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p)
|
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p)
|
||||||
);
|
);
|
||||||
|
|
||||||
thermo->correct();
|
thermo.correct();
|
||||||
|
|
||||||
dimensionedScalar initialMass = fvc::domainIntegrate(rho);
|
dimensionedScalar initialMass = fvc::domainIntegrate(rho);
|
||||||
|
|
||||||
|
dimensionedScalar totalVolume = sum(mesh.V());
|
||||||
|
|
||||||
|
|||||||
@ -11,5 +11,5 @@
|
|||||||
hEqn.relax();
|
hEqn.relax();
|
||||||
hEqn.solve();
|
hEqn.solve();
|
||||||
|
|
||||||
thermo->correct();
|
thermo.correct();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,11 @@
|
|||||||
{
|
{
|
||||||
bool closedVolume = p.needReference();
|
bool closedVolume = p.needReference();
|
||||||
|
|
||||||
rho = thermo->rho();
|
rho = thermo.rho();
|
||||||
|
|
||||||
|
// Thermodynamic density needs to be updated by psi*d(p) after the
|
||||||
|
// pressure solution - done in 2 parts. Part 1:
|
||||||
|
thermo.rho() -= psi*p;
|
||||||
|
|
||||||
volScalarField rUA = 1.0/UEqn.A();
|
volScalarField rUA = 1.0/UEqn.A();
|
||||||
surfaceScalarField rhorUAf("(rho*(1|A(U)))", fvc::interpolate(rho*rUA));
|
surfaceScalarField rhorUAf("(rho*(1|A(U)))", fvc::interpolate(rho*rUA));
|
||||||
@ -23,7 +27,7 @@
|
|||||||
{
|
{
|
||||||
fvScalarMatrix pEqn
|
fvScalarMatrix pEqn
|
||||||
(
|
(
|
||||||
fvm::ddt(psi, p)
|
fvc::ddt(rho) + psi*correction(fvm::ddt(p))
|
||||||
+ fvc::div(phi)
|
+ fvc::div(phi)
|
||||||
- fvm::laplacian(rhorUAf, p)
|
- fvm::laplacian(rhorUAf, p)
|
||||||
);
|
);
|
||||||
@ -43,6 +47,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Second part of thermodynamic density update
|
||||||
|
thermo.rho() += psi*p;
|
||||||
|
|
||||||
U += rUA*fvc::reconstruct((phi - phiU)/rhorUAf);
|
U += rUA*fvc::reconstruct((phi - phiU)/rhorUAf);
|
||||||
U.correctBoundaryConditions();
|
U.correctBoundaryConditions();
|
||||||
|
|
||||||
@ -55,8 +62,10 @@
|
|||||||
// to obey overall mass continuity
|
// to obey overall mass continuity
|
||||||
if (closedVolume)
|
if (closedVolume)
|
||||||
{
|
{
|
||||||
p += (initialMass - fvc::domainIntegrate(thermo->psi()*p))
|
p +=
|
||||||
/fvc::domainIntegrate(thermo->psi());
|
(initialMass - fvc::domainIntegrate(psi*p))
|
||||||
rho = thermo->rho();
|
/fvc::domainIntegrate(psi);
|
||||||
|
thermo.rho() = psi*p;
|
||||||
|
rho += (initialMass - fvc::domainIntegrate(rho))/totalVolume;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -31,7 +31,7 @@ Description
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "basicThermo.H"
|
#include "basicPsiThermo.H"
|
||||||
#include "RASModel.H"
|
#include "RASModel.H"
|
||||||
#include "fixedGradientFvPatchFields.H"
|
#include "fixedGradientFvPatchFields.H"
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,10 @@
|
|||||||
Info<< "Reading thermophysical properties\n" << endl;
|
Info<< "Reading thermophysical properties\n" << endl;
|
||||||
|
|
||||||
autoPtr<basicThermo> thermo
|
autoPtr<basicPsiThermo> pThermo
|
||||||
(
|
(
|
||||||
basicThermo::New(mesh)
|
basicPsiThermo::New(mesh)
|
||||||
);
|
);
|
||||||
|
basicPsiThermo& thermo = pThermo();
|
||||||
|
|
||||||
volScalarField rho
|
volScalarField rho
|
||||||
(
|
(
|
||||||
@ -15,11 +16,12 @@
|
|||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
),
|
),
|
||||||
thermo->rho()
|
thermo.rho()
|
||||||
);
|
);
|
||||||
|
|
||||||
volScalarField& p = thermo->p();
|
volScalarField& p = thermo.p();
|
||||||
volScalarField& h = thermo->h();
|
volScalarField& h = thermo.h();
|
||||||
|
const volScalarField& psi = thermo.psi();
|
||||||
|
|
||||||
|
|
||||||
Info<< "Reading field U\n" << endl;
|
Info<< "Reading field U\n" << endl;
|
||||||
@ -36,7 +38,7 @@
|
|||||||
mesh
|
mesh
|
||||||
);
|
);
|
||||||
|
|
||||||
# include "compressibleCreatePhi.H"
|
#include "compressibleCreatePhi.H"
|
||||||
|
|
||||||
|
|
||||||
Info<< "Creating turbulence model\n" << endl;
|
Info<< "Creating turbulence model\n" << endl;
|
||||||
@ -47,11 +49,11 @@
|
|||||||
rho,
|
rho,
|
||||||
U,
|
U,
|
||||||
phi,
|
phi,
|
||||||
thermo()
|
thermo
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
thermo->correct();
|
thermo.correct();
|
||||||
|
|
||||||
label pRefCell = 0;
|
label pRefCell = 0;
|
||||||
scalar pRefValue = 0.0;
|
scalar pRefValue = 0.0;
|
||||||
|
|||||||
@ -14,5 +14,5 @@
|
|||||||
eqnResidual = hEqn.solve().initialResidual();
|
eqnResidual = hEqn.solve().initialResidual();
|
||||||
maxResidual = max(eqnResidual, maxResidual);
|
maxResidual = max(eqnResidual, maxResidual);
|
||||||
|
|
||||||
thermo->correct();
|
thermo.correct();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
// initialize values for convergence checks
|
// initialize values for convergence checks
|
||||||
|
|
||||||
scalar eqnResidual = 1, maxResidual = 0;
|
scalar eqnResidual = 1, maxResidual = 0;
|
||||||
scalar convergenceCriterion = 0;
|
scalar convergenceCriterion = 0;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
rho = thermo->rho();
|
rho = thermo.rho();
|
||||||
|
|
||||||
volScalarField rUA = 1.0/UEqn().A();
|
volScalarField rUA = 1.0/UEqn().A();
|
||||||
surfaceScalarField rhorUAf("(rho*(1|A(U)))", fvc::interpolate(rho*rUA));
|
surfaceScalarField rhorUAf("(rho*(1|A(U)))", fvc::interpolate(rho*rUA));
|
||||||
@ -39,8 +39,8 @@
|
|||||||
// to obey overall mass continuity
|
// to obey overall mass continuity
|
||||||
if (closedVolume)
|
if (closedVolume)
|
||||||
{
|
{
|
||||||
p += (initialMass - fvc::domainIntegrate(thermo->psi()*p))
|
p += (initialMass - fvc::domainIntegrate(psi*p))
|
||||||
/fvc::domainIntegrate(thermo->psi());
|
/fvc::domainIntegrate(psi);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Calculate the conservative fluxes
|
// Calculate the conservative fluxes
|
||||||
@ -58,7 +58,7 @@
|
|||||||
|
|
||||||
#include "continuityErrs.H"
|
#include "continuityErrs.H"
|
||||||
|
|
||||||
rho = thermo->rho();
|
rho = thermo.rho();
|
||||||
rho.relax();
|
rho.relax();
|
||||||
Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value()
|
Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value()
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|||||||
@ -32,7 +32,7 @@ Description
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "basicThermo.H"
|
#include "basicPsiThermo.H"
|
||||||
#include "RASModel.H"
|
#include "RASModel.H"
|
||||||
#include "fixedGradientFvPatchFields.H"
|
#include "fixedGradientFvPatchFields.H"
|
||||||
#include "radiationModel.H"
|
#include "radiationModel.H"
|
||||||
@ -61,7 +61,7 @@ int main(int argc, char *argv[])
|
|||||||
# include "readSIMPLEControls.H"
|
# include "readSIMPLEControls.H"
|
||||||
# include "initConvergenceCheck.H"
|
# include "initConvergenceCheck.H"
|
||||||
|
|
||||||
pd.storePrevIter();
|
p.storePrevIter();
|
||||||
rho.storePrevIter();
|
rho.storePrevIter();
|
||||||
|
|
||||||
// Pressure-velocity SIMPLE corrector
|
// Pressure-velocity SIMPLE corrector
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
==
|
==
|
||||||
fvc::div(phi/fvc::interpolate(rho)*fvc::interpolate(p))
|
fvc::div(phi/fvc::interpolate(rho)*fvc::interpolate(p))
|
||||||
- p*fvc::div(phi/fvc::interpolate(rho))
|
- p*fvc::div(phi/fvc::interpolate(rho))
|
||||||
+ radiation->Sh(thermo())
|
+ radiation->Sh(thermo)
|
||||||
);
|
);
|
||||||
|
|
||||||
hEqn.relax();
|
hEqn.relax();
|
||||||
@ -15,7 +15,7 @@
|
|||||||
eqnResidual = hEqn.solve().initialResidual();
|
eqnResidual = hEqn.solve().initialResidual();
|
||||||
maxResidual = max(eqnResidual, maxResidual);
|
maxResidual = max(eqnResidual, maxResidual);
|
||||||
|
|
||||||
thermo->correct();
|
thermo.correct();
|
||||||
|
|
||||||
radiation->correct();
|
radiation->correct();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,7 +32,7 @@ Description
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "basicThermo.H"
|
#include "basicPsiThermo.H"
|
||||||
#include "turbulenceModel.H"
|
#include "turbulenceModel.H"
|
||||||
#include "fixedGradientFvPatchFields.H"
|
#include "fixedGradientFvPatchFields.H"
|
||||||
#include "regionProperties.H"
|
#include "regionProperties.H"
|
||||||
@ -42,37 +42,36 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
#include "setRootCase.H"
|
||||||
# include "setRootCase.H"
|
#include "createTime.H"
|
||||||
# include "createTime.H"
|
|
||||||
|
|
||||||
regionProperties rp(runTime);
|
regionProperties rp(runTime);
|
||||||
|
|
||||||
# include "createFluidMeshes.H"
|
#include "createFluidMeshes.H"
|
||||||
# include "createSolidMeshes.H"
|
#include "createSolidMeshes.H"
|
||||||
|
|
||||||
# include "createFluidFields.H"
|
#include "createFluidFields.H"
|
||||||
# include "createSolidFields.H"
|
#include "createSolidFields.H"
|
||||||
|
|
||||||
# include "initContinuityErrs.H"
|
#include "initContinuityErrs.H"
|
||||||
|
|
||||||
# include "readTimeControls.H"
|
#include "readTimeControls.H"
|
||||||
|
|
||||||
if (fluidRegions.size())
|
if (fluidRegions.size())
|
||||||
{
|
{
|
||||||
# include "compressibleMultiRegionCourantNo.H"
|
#include "compressibleMultiRegionCourantNo.H"
|
||||||
# include "setInitialDeltaT.H"
|
#include "setInitialDeltaT.H"
|
||||||
}
|
}
|
||||||
|
|
||||||
while (runTime.run())
|
while (runTime.run())
|
||||||
{
|
{
|
||||||
# include "readTimeControls.H"
|
#include "readTimeControls.H"
|
||||||
# include "readPIMPLEControls.H"
|
#include "readPIMPLEControls.H"
|
||||||
|
|
||||||
if (fluidRegions.size())
|
if (fluidRegions.size())
|
||||||
{
|
{
|
||||||
# include "compressibleMultiRegionCourantNo.H"
|
#include "compressibleMultiRegionCourantNo.H"
|
||||||
# include "setDeltaT.H"
|
#include "setDeltaT.H"
|
||||||
}
|
}
|
||||||
|
|
||||||
runTime++;
|
runTime++;
|
||||||
@ -83,8 +82,8 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
forAll(fluidRegions, i)
|
forAll(fluidRegions, i)
|
||||||
{
|
{
|
||||||
# include "setRegionFluidFields.H"
|
#include "setRegionFluidFields.H"
|
||||||
# include "storeOldFluidFields.H"
|
#include "storeOldFluidFields.H"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,18 +95,18 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
Info<< "\nSolving for fluid region "
|
Info<< "\nSolving for fluid region "
|
||||||
<< fluidRegions[i].name() << endl;
|
<< fluidRegions[i].name() << endl;
|
||||||
# include "setRegionFluidFields.H"
|
#include "setRegionFluidFields.H"
|
||||||
# include "readFluidMultiRegionPIMPLEControls.H"
|
#include "readFluidMultiRegionPIMPLEControls.H"
|
||||||
# include "solveFluid.H"
|
#include "solveFluid.H"
|
||||||
}
|
}
|
||||||
|
|
||||||
forAll(solidRegions, i)
|
forAll(solidRegions, i)
|
||||||
{
|
{
|
||||||
Info<< "\nSolving for solid region "
|
Info<< "\nSolving for solid region "
|
||||||
<< solidRegions[i].name() << endl;
|
<< solidRegions[i].name() << endl;
|
||||||
# include "setRegionSolidFields.H"
|
#include "setRegionSolidFields.H"
|
||||||
# include "readSolidMultiRegionPIMPLEControls.H"
|
#include "readSolidMultiRegionPIMPLEControls.H"
|
||||||
# include "solveSolid.H"
|
#include "solveSolid.H"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// Initialise fluid field pointer lists
|
// Initialise fluid field pointer lists
|
||||||
PtrList<basicThermo> thermoFluid(fluidRegions.size());
|
PtrList<basicPsiThermo> thermoFluid(fluidRegions.size());
|
||||||
PtrList<volScalarField> rhoFluid(fluidRegions.size());
|
PtrList<volScalarField> rhoFluid(fluidRegions.size());
|
||||||
PtrList<volScalarField> KFluid(fluidRegions.size());
|
PtrList<volScalarField> KFluid(fluidRegions.size());
|
||||||
PtrList<volVectorField> UFluid(fluidRegions.size());
|
PtrList<volVectorField> UFluid(fluidRegions.size());
|
||||||
@ -19,7 +19,7 @@
|
|||||||
thermoFluid.set
|
thermoFluid.set
|
||||||
(
|
(
|
||||||
i,
|
i,
|
||||||
basicThermo::New(fluidRegions[i]).ptr()
|
basicPsiThermo::New(fluidRegions[i]).ptr()
|
||||||
);
|
);
|
||||||
|
|
||||||
Info<< " Adding to rhoFluid\n" << endl;
|
Info<< " Adding to rhoFluid\n" << endl;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
const fvMesh& mesh = fluidRegions[i];
|
const fvMesh& mesh = fluidRegions[i];
|
||||||
|
|
||||||
basicThermo& thermo = thermoFluid[i];
|
basicPsiThermo& thermo = thermoFluid[i];
|
||||||
volScalarField& rho = rhoFluid[i];
|
volScalarField& rho = rhoFluid[i];
|
||||||
volScalarField& K = KFluid[i];
|
volScalarField& K = KFluid[i];
|
||||||
volVectorField& U = UFluid[i];
|
volVectorField& U = UFluid[i];
|
||||||
|
|||||||
@ -13,7 +13,7 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/thermophysicalModels/solids/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/solids/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/solidMixture/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/solidMixture/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
||||||
-I$(LIB_SRC)/ODE/lnInclude
|
-I$(LIB_SRC)/ODE/lnInclude
|
||||||
@ -33,7 +33,7 @@ EXE_LIBS = \
|
|||||||
-lsolids \
|
-lsolids \
|
||||||
-lsolidMixture \
|
-lsolidMixture \
|
||||||
-lthermophysicalFunctions \
|
-lthermophysicalFunctions \
|
||||||
-lcombustionThermophysicalModels \
|
-lreactionThermophysicalModels \
|
||||||
-lchemistryModel \
|
-lchemistryModel \
|
||||||
-lradiation \
|
-lradiation \
|
||||||
-lODE
|
-lODE
|
||||||
@ -36,9 +36,9 @@ Description
|
|||||||
#include "turbulenceModel.H"
|
#include "turbulenceModel.H"
|
||||||
#include "basicThermoCloud.H"
|
#include "basicThermoCloud.H"
|
||||||
#include "CoalCloud.H"
|
#include "CoalCloud.H"
|
||||||
#include "chemistryModel.H"
|
#include "psiChemistryModel.H"
|
||||||
#include "chemistrySolver.H"
|
#include "chemistrySolver.H"
|
||||||
#include "reactingThermoTypes.H"
|
#include "thermoPhysicsTypes.H"
|
||||||
#include "timeActivatedExplicitCellSource.H"
|
#include "timeActivatedExplicitCellSource.H"
|
||||||
#include "radiationModel.H"
|
#include "radiationModel.H"
|
||||||
|
|
||||||
@ -113,12 +113,9 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
turbulence->correct();
|
turbulence->correct();
|
||||||
|
|
||||||
rho = thermo->rho();
|
rho = thermo.rho();
|
||||||
|
|
||||||
if (runTime.write())
|
runTime.write();
|
||||||
{
|
|
||||||
#include "additionalOutput.H"
|
|
||||||
}
|
|
||||||
|
|
||||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||||
@ -1,11 +1,11 @@
|
|||||||
Info<< "\nConstructing coal cloud" << endl;
|
Info<< "\nConstructing coal cloud" << endl;
|
||||||
CoalCloud<specieReactingProperties> coalParcels
|
CoalCloud<gasThermoPhysics> coalParcels
|
||||||
(
|
(
|
||||||
"coalCloud1",
|
"coalCloud1",
|
||||||
rho,
|
rho,
|
||||||
U,
|
U,
|
||||||
g,
|
g,
|
||||||
thermo()
|
thermo
|
||||||
);
|
);
|
||||||
|
|
||||||
Info<< "\nConstructing limestone cloud" << endl;
|
Info<< "\nConstructing limestone cloud" << endl;
|
||||||
@ -15,5 +15,5 @@ basicThermoCloud limestoneParcels
|
|||||||
rho,
|
rho,
|
||||||
U,
|
U,
|
||||||
g,
|
g,
|
||||||
thermo()
|
thermo
|
||||||
);
|
);
|
||||||
@ -1,19 +1,30 @@
|
|||||||
Info<< "Reading thermophysical properties\n" << endl;
|
Info<< "Reading thermophysical properties\n" << endl;
|
||||||
|
|
||||||
autoPtr<hCombustionThermo> thermo
|
autoPtr<psiChemistryModel> pChemistry
|
||||||
(
|
(
|
||||||
hCombustionThermo::New(mesh)
|
psiChemistryModel::New(mesh)
|
||||||
);
|
);
|
||||||
|
psiChemistryModel& chemistry = pChemistry();
|
||||||
|
|
||||||
combustionMixture& composition = thermo->composition();
|
hCombustionThermo& thermo = chemistry.thermo();
|
||||||
|
|
||||||
|
basicMultiComponentMixture& composition = thermo.composition();
|
||||||
PtrList<volScalarField>& Y = composition.Y();
|
PtrList<volScalarField>& Y = composition.Y();
|
||||||
|
|
||||||
word inertSpecie(thermo->lookup("inertSpecie"));
|
word inertSpecie(thermo.lookup("inertSpecie"));
|
||||||
|
|
||||||
volScalarField& p = thermo->p();
|
volScalarField& p = thermo.p();
|
||||||
volScalarField& h = thermo->h();
|
volScalarField& h = thermo.h();
|
||||||
const volScalarField& T = thermo->T();
|
const volScalarField& T = thermo.T();
|
||||||
const volScalarField& psi = thermo->psi();
|
const volScalarField& psi = thermo.psi();
|
||||||
|
|
||||||
|
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
|
||||||
|
|
||||||
|
forAll (Y, i)
|
||||||
|
{
|
||||||
|
fields.add(Y[i]);
|
||||||
|
}
|
||||||
|
fields.add(h);
|
||||||
|
|
||||||
volScalarField rho
|
volScalarField rho
|
||||||
(
|
(
|
||||||
@ -25,7 +36,7 @@
|
|||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::AUTO_WRITE
|
||||||
),
|
),
|
||||||
thermo->rho()
|
thermo.rho()
|
||||||
);
|
);
|
||||||
|
|
||||||
// lagrangian effective density field - used externally (optional)
|
// lagrangian effective density field - used externally (optional)
|
||||||
@ -73,7 +84,7 @@
|
|||||||
mesh
|
mesh
|
||||||
);
|
);
|
||||||
|
|
||||||
# include "compressibleCreatePhi.H"
|
#include "compressibleCreatePhi.H"
|
||||||
|
|
||||||
DimensionedField<scalar, volMesh> kappa
|
DimensionedField<scalar, volMesh> kappa
|
||||||
(
|
(
|
||||||
@ -97,13 +108,16 @@
|
|||||||
rho,
|
rho,
|
||||||
U,
|
U,
|
||||||
phi,
|
phi,
|
||||||
thermo()
|
thermo
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
Info<< "Creating field DpDt\n" << endl;
|
Info<< "Creating field DpDt\n" << endl;
|
||||||
volScalarField DpDt =
|
volScalarField DpDt
|
||||||
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
|
(
|
||||||
|
"DpDt",
|
||||||
|
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p)
|
||||||
|
);
|
||||||
|
|
||||||
Info<< "\nConstructing explicit enthalpy cell source" << endl;
|
Info<< "\nConstructing explicit enthalpy cell source" << endl;
|
||||||
timeActivatedExplicitCellSource enthalpySource
|
timeActivatedExplicitCellSource enthalpySource
|
||||||
@ -112,18 +126,3 @@
|
|||||||
mesh,
|
mesh,
|
||||||
h.dimensions()*phi.dimensions()/mesh.V().dimensions()
|
h.dimensions()*phi.dimensions()/mesh.V().dimensions()
|
||||||
);
|
);
|
||||||
|
|
||||||
Info << "Constructing chemical mechanism" << endl;
|
|
||||||
chemistryModel chemistry
|
|
||||||
(
|
|
||||||
thermo(),
|
|
||||||
rho
|
|
||||||
);
|
|
||||||
|
|
||||||
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
|
|
||||||
|
|
||||||
forAll (Y, i)
|
|
||||||
{
|
|
||||||
fields.add(Y[i]);
|
|
||||||
}
|
|
||||||
fields.add(h);
|
|
||||||
@ -2,21 +2,21 @@
|
|||||||
fvScalarMatrix hEqn
|
fvScalarMatrix hEqn
|
||||||
(
|
(
|
||||||
fvm::ddt(rho, h)
|
fvm::ddt(rho, h)
|
||||||
+ fvm::div(phi, h)
|
+ mvConvection->fvmDiv(phi, h)
|
||||||
- fvm::laplacian(turbulence->alphaEff(), h)
|
- fvm::laplacian(turbulence->alphaEff(), h)
|
||||||
==
|
==
|
||||||
DpDt
|
DpDt
|
||||||
+ coalParcels.Sh()
|
+ coalParcels.Sh()
|
||||||
+ limestoneParcels.Sh()
|
+ limestoneParcels.Sh()
|
||||||
+ enthalpySource.Su()
|
+ enthalpySource.Su()
|
||||||
+ radiation->Sh(thermo())
|
+ radiation->Sh(thermo)
|
||||||
);
|
);
|
||||||
|
|
||||||
hEqn.relax();
|
hEqn.relax();
|
||||||
|
|
||||||
hEqn.solve();
|
hEqn.solve();
|
||||||
|
|
||||||
thermo->correct();
|
thermo.correct();
|
||||||
|
|
||||||
radiation->correct();
|
radiation->correct();
|
||||||
}
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
rho = thermo->rho();
|
rho = thermo.rho();
|
||||||
|
|
||||||
volScalarField rUA = 1.0/UEqn.A();
|
volScalarField rUA = 1.0/UEqn.A();
|
||||||
U = rUA*UEqn.H();
|
U = rUA*UEqn.H();
|
||||||
@ -8,7 +8,7 @@ if (transonic)
|
|||||||
surfaceScalarField phid
|
surfaceScalarField phid
|
||||||
(
|
(
|
||||||
"phid",
|
"phid",
|
||||||
fvc::interpolate(thermo->psi())
|
fvc::interpolate(psi)
|
||||||
*(
|
*(
|
||||||
(fvc::interpolate(U) & mesh.Sf())
|
(fvc::interpolate(U) & mesh.Sf())
|
||||||
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
||||||
@ -8,7 +8,8 @@ IOdictionary chemistryProperties
|
|||||||
runTime.constant(),
|
runTime.constant(),
|
||||||
mesh,
|
mesh,
|
||||||
IOobject::MUST_READ,
|
IOobject::MUST_READ,
|
||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE,
|
||||||
|
false
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -12,7 +12,7 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/thermophysicalModels/solids/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/solids/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/solidMixture/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/solidMixture/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
||||||
-I$(LIB_SRC)/ODE/lnInclude
|
-I$(LIB_SRC)/ODE/lnInclude
|
||||||
@ -31,7 +31,7 @@ EXE_LIBS = \
|
|||||||
-lsolids \
|
-lsolids \
|
||||||
-lsolidMixture \
|
-lsolidMixture \
|
||||||
-lthermophysicalFunctions \
|
-lthermophysicalFunctions \
|
||||||
-lcombustionThermophysicalModels \
|
-lreactionThermophysicalModels \
|
||||||
-lchemistryModel \
|
-lchemistryModel \
|
||||||
-lradiation \
|
-lradiation \
|
||||||
-lODE
|
-lODE
|
||||||
|
|||||||
@ -26,7 +26,8 @@ tmp<fv::convectionScheme<scalar> > mvConvection
|
|||||||
- fvm::laplacian(turbulence->muEff(), Yi)
|
- fvm::laplacian(turbulence->muEff(), Yi)
|
||||||
==
|
==
|
||||||
parcels.Srho(i)
|
parcels.Srho(i)
|
||||||
+ kappa*chemistry.RR(i)().dimensionedInternalField()
|
+ kappa*chemistry.RR(i)().dimensionedInternalField(),
|
||||||
|
mesh.solver("Yi")
|
||||||
);
|
);
|
||||||
|
|
||||||
Yi.max(0.0);
|
Yi.max(0.0);
|
||||||
|
|||||||
@ -1,48 +0,0 @@
|
|||||||
{
|
|
||||||
tmp<volScalarField> tdQ
|
|
||||||
(
|
|
||||||
new volScalarField
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"dQ",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::NO_READ,
|
|
||||||
IOobject::AUTO_WRITE
|
|
||||||
),
|
|
||||||
mesh,
|
|
||||||
dimensionedScalar
|
|
||||||
(
|
|
||||||
"zero",
|
|
||||||
dimensionSet(1, -3, -1, 0, 0, 0, 0),
|
|
||||||
0.0
|
|
||||||
)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
scalarField& dQ = tdQ();
|
|
||||||
|
|
||||||
scalarField cp(dQ.size(), 0.0);
|
|
||||||
|
|
||||||
forAll(Y, i)
|
|
||||||
{
|
|
||||||
volScalarField RRi = chemistry.RR(i);
|
|
||||||
|
|
||||||
forAll(h, celli)
|
|
||||||
{
|
|
||||||
scalar Ti = T[celli];
|
|
||||||
cp[celli] += Y[i][celli]*chemistry.specieThermo()[i].Cp(Ti);
|
|
||||||
scalar hi = chemistry.specieThermo()[i].h(Ti);
|
|
||||||
scalar RR = RRi[celli];
|
|
||||||
dQ[celli] -= hi*RR;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
forAll(dQ, celli)
|
|
||||||
{
|
|
||||||
dQ[celli] /= cp[celli];
|
|
||||||
}
|
|
||||||
|
|
||||||
tdQ().write();
|
|
||||||
}
|
|
||||||
@ -1,9 +1,9 @@
|
|||||||
Info<< "\nConstructing reacting cloud" << endl;
|
Info<< "\nConstructing reacting cloud" << endl;
|
||||||
BasicReactingCloud<specieReactingProperties> parcels
|
BasicReactingCloud<gasThermoPhysics> parcels
|
||||||
(
|
(
|
||||||
"reactingCloud1",
|
"reactingCloud1",
|
||||||
rho,
|
rho,
|
||||||
U,
|
U,
|
||||||
g,
|
g,
|
||||||
thermo()
|
thermo
|
||||||
);
|
);
|
||||||
|
|||||||
@ -1,19 +1,22 @@
|
|||||||
Info<< "Reading thermophysical properties\n" << endl;
|
Info<< "Reading thermophysical properties\n" << endl;
|
||||||
|
|
||||||
autoPtr<hCombustionThermo> thermo
|
autoPtr<psiChemistryModel> pChemistry
|
||||||
(
|
(
|
||||||
hCombustionThermo::New(mesh)
|
psiChemistryModel::New(mesh)
|
||||||
);
|
);
|
||||||
|
psiChemistryModel& chemistry = pChemistry();
|
||||||
|
|
||||||
combustionMixture& composition = thermo->composition();
|
hCombustionThermo& thermo = chemistry.thermo();
|
||||||
|
|
||||||
|
basicMultiComponentMixture& composition = thermo.composition();
|
||||||
PtrList<volScalarField>& Y = composition.Y();
|
PtrList<volScalarField>& Y = composition.Y();
|
||||||
|
|
||||||
word inertSpecie(thermo->lookup("inertSpecie"));
|
word inertSpecie(thermo.lookup("inertSpecie"));
|
||||||
|
|
||||||
volScalarField& p = thermo->p();
|
volScalarField& p = thermo.p();
|
||||||
volScalarField& h = thermo->h();
|
volScalarField& h = thermo.h();
|
||||||
const volScalarField& T = thermo->T();
|
const volScalarField& T = thermo.T();
|
||||||
const volScalarField& psi = thermo->psi();
|
const volScalarField& psi = thermo.psi();
|
||||||
|
|
||||||
volScalarField rho
|
volScalarField rho
|
||||||
(
|
(
|
||||||
@ -25,7 +28,7 @@
|
|||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::AUTO_WRITE
|
||||||
),
|
),
|
||||||
thermo->rho()
|
thermo.rho()
|
||||||
);
|
);
|
||||||
|
|
||||||
Info<< "\nReading field U\n" << endl;
|
Info<< "\nReading field U\n" << endl;
|
||||||
@ -42,7 +45,7 @@
|
|||||||
mesh
|
mesh
|
||||||
);
|
);
|
||||||
|
|
||||||
# include "compressibleCreatePhi.H"
|
#include "compressibleCreatePhi.H"
|
||||||
|
|
||||||
DimensionedField<scalar, volMesh> kappa
|
DimensionedField<scalar, volMesh> kappa
|
||||||
(
|
(
|
||||||
@ -66,19 +69,15 @@
|
|||||||
rho,
|
rho,
|
||||||
U,
|
U,
|
||||||
phi,
|
phi,
|
||||||
thermo()
|
thermo
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
Info<< "Creating field DpDt\n" << endl;
|
Info<< "Creating field DpDt\n" << endl;
|
||||||
volScalarField DpDt =
|
volScalarField DpDt
|
||||||
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
|
|
||||||
|
|
||||||
Info << "Constructing chemical mechanism" << endl;
|
|
||||||
chemistryModel chemistry
|
|
||||||
(
|
(
|
||||||
thermo(),
|
"DpDt",
|
||||||
rho
|
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p)
|
||||||
);
|
);
|
||||||
|
|
||||||
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
|
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user