updates for new thermo and general code tidying

This commit is contained in:
andy
2009-06-15 15:36:57 +01:00
parent 87103bfc84
commit 7d73dd3171
118 changed files with 658 additions and 1033 deletions

View File

@ -36,7 +36,7 @@ Description
to be appropriate by comparison with the results from the
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
done on this issue, particularly regarding the enhanced removal rate
caused by flame compression. Analysis using results of the spectral
@ -85,7 +85,7 @@ int main(int argc, char *argv[])
scalar StCoNum = 0.0;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;

View File

@ -39,11 +39,13 @@ if (mesh.nInternalFaces())
mesh.surfaceInterpolation::deltaCoeffs()
*mag(phiSt/fvc::interpolate(rho));
StCoNum = max(SfUfbyDelta/mesh.magSf())
.value()*runTime.deltaT().value();
StCoNum =
max(SfUfbyDelta/mesh.magSf()).value()
*runTime.deltaT().value();
meanStCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf()))
.value()*runTime.deltaT().value();
meanStCoNum =
(sum(SfUfbyDelta)/sum(mesh.magSf())).value()
*runTime.deltaT().value();
}
Info<< "St courant Number mean: " << meanStCoNum

View File

@ -25,7 +25,7 @@ if (ign.ignited())
// Unburnt gas density
// ~~~~~~~~~~~~~~~~~~~
volScalarField rhou = thermo->rhou();
volScalarField rhou = thermo.rhou();
// Calculate flame normal etc.
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -1,10 +1,11 @@
Info<< "Reading thermophysical properties\n" << endl;
autoPtr<hhuCombustionThermo> thermo
autoPtr<hhuCombustionThermo> pThermo
(
hhuCombustionThermo::New(mesh)
);
combustionMixture& composition = thermo->composition();
hhuCombustionThermo& thermo = pThermo();
basicMultiComponentMixture& composition = thermo.composition();
volScalarField rho
(
@ -16,13 +17,13 @@
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
thermo->rho()
thermo.rho()
);
volScalarField& p = thermo->p();
const volScalarField& psi = thermo->psi();
volScalarField& h = thermo->h();
volScalarField& hu = thermo->hu();
volScalarField& p = thermo.p();
const volScalarField& psi = thermo.psi();
volScalarField& h = thermo.h();
volScalarField& hu = thermo.hu();
volScalarField& b = composition.Y("b");
Info<< "min(b) = " << min(b).value() << endl;
@ -54,7 +55,7 @@
rho,
U,
phi,
thermo()
thermo
)
);

View File

@ -8,5 +8,5 @@
betav*DpDt
);
thermo->correct();
thermo.correct();
}

View File

@ -13,6 +13,6 @@ if (ign.ignited())
//+ fvm::Sp(fvc::div(muEff*fvc::grad(b)/(b + 0.001)), hu)
==
betav*DpDt*rho/thermo->rhou()
betav*DpDt*rho/thermo.rhou()
);
}

View File

@ -196,7 +196,6 @@ public:
// Destructor
~SCOPE();

View File

@ -1,4 +1,4 @@
rho = thermo->rho();
rho = thermo.rho();
volScalarField rUA = 1.0/UEqn.A();
U = invA & UEqn.H();
@ -8,7 +8,7 @@ if (transonic)
surfaceScalarField phid
(
"phid",
fvc::interpolate(thermo->psi())
fvc::interpolate(psi)
*(
(fvc::interpolate(U) & mesh.Sf())
+ fvc::ddtPhiCorr(rUA, rho, U, phi)

View File

@ -109,7 +109,7 @@ int main(int argc, char *argv[])
turbulence->correct();
rho = thermo->rho();
rho = thermo.rho();
runTime.write();

View File

@ -6,7 +6,7 @@ if (ign.ignited())
// Unburnt gas density
// ~~~~~~~~~~~~~~~~~~~
volScalarField rhou = thermo->rhou();
volScalarField rhou = thermo.rhou();
// Calculate flame normal etc.
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -76,7 +76,7 @@ if (ign.ignited())
volScalarField epsilon = pow(uPrimeCoef, 3)*turbulence->epsilon();
volScalarField tauEta = sqrt(thermo->muu()/(rhou*epsilon));
volScalarField tauEta = sqrt(thermo.muu()/(rhou*epsilon));
volScalarField Reta = up/
(

View File

@ -1,10 +1,11 @@
Info<< "Reading thermophysical properties\n" << endl;
autoPtr<hhuCombustionThermo> thermo
autoPtr<hhuCombustionThermo> pThermo
(
hhuCombustionThermo::New(mesh)
);
combustionMixture& composition = thermo->composition();
hhuCombustionThermo& thermo = pThermo();
basicMultiComponentMixture& composition = thermo.composition();
volScalarField rho
(
@ -16,18 +17,18 @@
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
thermo->rho()
thermo.rho()
);
volScalarField& p = thermo->p();
const volScalarField& psi = thermo->psi();
volScalarField& h = thermo->h();
volScalarField& hu = thermo->hu();
volScalarField& p = thermo.p();
const volScalarField& psi = thermo.psi();
volScalarField& h = thermo.h();
volScalarField& hu = thermo.hu();
volScalarField& b = composition.Y("b");
Info<< "min(b) = " << min(b).value() << endl;
const volScalarField& T = thermo->T();
const volScalarField& T = thermo.T();
Info<< "\nReading field U\n" << endl;
@ -55,7 +56,7 @@
rho,
U,
phi,
thermo()
thermo
)
);

View File

@ -8,5 +8,5 @@
DpDt
);
thermo->correct();
thermo.correct();
}

View File

@ -13,6 +13,6 @@ if (ign.ignited())
//+ fvm::Sp(fvc::div(muEff*fvc::grad(b)/(b + 0.001)), hu)
==
DpDt*rho/thermo->rhou()
DpDt*rho/thermo.rhou()
);
}

View File

@ -1,4 +1,4 @@
rho = thermo->rho();
rho = thermo.rho();
volScalarField rUA = 1.0/UEqn.A();
U = rUA*UEqn.H();
@ -8,7 +8,7 @@ if (transonic)
surfaceScalarField phid
(
"phid",
fvc::interpolate(thermo->psi())
fvc::interpolate(psi)
*(
(fvc::interpolate(U) & mesh.Sf())
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
@ -35,8 +35,8 @@ if (transonic)
else
{
phi =
fvc::interpolate(rho)*
(
fvc::interpolate(rho)
*(
(fvc::interpolate(U) & mesh.Sf())
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
);

View File

@ -33,7 +33,7 @@ Description
#include "fvCFD.H"
#include "engineTime.H"
#include "engineMesh.H"
#include "basicThermo.H"
#include "basicPsiThermo.H"
#include "turbulenceModel.H"
#include "OFstream.H"
@ -52,7 +52,7 @@ int main(int argc, char *argv[])
#include "setInitialDeltaT.H"
#include "startSummary.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;

View File

@ -1,9 +1,10 @@
Info<< "Reading thermophysical properties\n" << endl;
autoPtr<basicThermo> thermo
autoPtr<basicPsiThermo> pThermo
(
basicThermo::New(mesh)
basicPsiThermo::New(mesh)
);
basicPsiThermo& thermo = pThermo();
volScalarField rho
(
@ -15,13 +16,13 @@
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
thermo->rho()
thermo.rho()
);
volScalarField& p = thermo->p();
const volScalarField& psi = thermo->psi();
volScalarField& h = thermo->h();
const volScalarField& T = thermo->T();
volScalarField& p = thermo.p();
const volScalarField& psi = thermo.psi();
volScalarField& h = thermo.h();
const volScalarField& T = thermo.T();
Info<< "\nReading field U\n" << endl;
@ -49,7 +50,7 @@
rho,
U,
phi,
thermo()
thermo
)
);

View File

@ -8,5 +8,5 @@
DpDt
);
thermo->correct();
thermo.correct();
}

View File

@ -1,13 +1,17 @@
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();
word inertSpecie(thermo->lookup("inertSpecie"));
word inertSpecie(thermo.lookup("inertSpecie"));
volScalarField rho
(
@ -17,7 +21,7 @@ volScalarField rho
runTime.timeName(),
mesh
),
thermo->rho()
thermo.rho()
);
Info<< "Reading field U\n" << endl;
@ -35,10 +39,10 @@ volVectorField U
);
volScalarField& p = thermo->p();
const volScalarField& psi = thermo->psi();
const volScalarField& T = thermo->T();
volScalarField& h = thermo->h();
volScalarField& p = thermo.p();
const volScalarField& psi = thermo.psi();
const volScalarField& T = thermo.T();
volScalarField& h = thermo.h();
#include "compressibleCreatePhi.H"
@ -65,7 +69,7 @@ autoPtr<compressible::turbulenceModel> turbulence
rho,
U,
phi,
thermo()
thermo
)
);
@ -73,31 +77,11 @@ Info<< "Creating field DpDt\n" << endl;
volScalarField DpDt =
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
Info << "Constructing chemical mechanism" << endl;
chemistryModel chemistry
(
thermo(),
rho
);
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
for(label i=0; i<Y.size(); i++)
forAll (Y, i)
{
fields.add(Y[i]);
}
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)
);

View File

@ -1,14 +1,15 @@
Info << "Constructing Spray" << endl;
PtrList<specieProperties> gasProperties(Y.size());
PtrList<gasThermoPhysics> gasProperties(Y.size());
forAll(gasProperties, i)
{
gasProperties.set
(
i,
new specieProperties
new gasThermoPhysics
(
dynamic_cast<const reactingMixture&>(thermo()).speciesData()[i]
dynamic_cast<const reactingMixture<gasThermoPhysics>&>
(thermo).speciesData()[i]
)
);
}

View File

@ -36,12 +36,13 @@ Description
#include "hCombustionThermo.H"
#include "turbulenceModel.H"
#include "spray.H"
#include "chemistryModel.H"
#include "psiChemistryModel.H"
#include "chemistrySolver.H"
#include "multivariateScheme.H"
#include "Switch.H"
#include "OFstream.H"
#include "volPointInterpolation.H"
#include "thermoPhysicsTypes.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -60,7 +61,7 @@ int main(int argc, char *argv[])
#include "setInitialDeltaT.H"
#include "startSummary.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info << "\nStarting time loop\n" << endl;
@ -121,7 +122,7 @@ int main(int argc, char *argv[])
#include "logSummary.H"
#include "spraySummary.H"
rho = thermo->rho();
rho = thermo.rho();
runTime.write();

View File

@ -9,32 +9,5 @@
+ dieselSpray.heatTransferSource()
);
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];
}
thermo.correct();
}

View File

@ -1,4 +1,4 @@
rho = thermo->rho();
rho = thermo.rho();
volScalarField A = UEqn.A();
U = UEqn.H()/A;
@ -8,7 +8,7 @@ if (transonic)
surfaceScalarField phid
(
"phid",
fvc::interpolate(thermo->psi())
fvc::interpolate(psi)
*((fvc::interpolate(U) & mesh.Sf()) - fvc::meshPhi(rho, U))
);

View File

@ -34,7 +34,7 @@ Description
#include "hCombustionThermo.H"
#include "turbulenceModel.H"
#include "spray.H"
#include "chemistryModel.H"
#include "psiChemistryModel.H"
#include "chemistrySolver.H"
#include "multivariateScheme.H"
@ -46,7 +46,6 @@ Description
int main(int argc, char *argv[])
{
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
@ -59,7 +58,7 @@ int main(int argc, char *argv[])
#include "compressibleCourantNo.H"
#include "setInitialDeltaT.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info << "\nStarting time loop\n" << endl;
@ -113,7 +112,7 @@ int main(int argc, char *argv[])
#include "spraySummary.H"
rho = thermo->rho();
rho = thermo.rho();
runTime.write();

View File

@ -1,4 +1,4 @@
rho = thermo->rho();
rho = thermo.rho();
volScalarField rUA = 1.0/UEqn.A();
U = rUA*UEqn.H();
@ -8,7 +8,7 @@ if (transonic)
surfaceScalarField phid
(
"phid",
fvc::interpolate(thermo->psi())
fvc::interpolate(psi)
*(
(fvc::interpolate(U) & mesh.Sf())
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
@ -37,8 +37,8 @@ if (transonic)
else
{
phi =
fvc::interpolate(rho)*
(
fvc::interpolate(rho)
*(
(fvc::interpolate(U) & mesh.Sf())
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
);

View File

@ -76,7 +76,7 @@ int main(int argc, char *argv[])
#include "setInitialDeltaT.H"
#include "startSummary.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info << "\nStarting time loop\n" << endl;
@ -117,7 +117,7 @@ int main(int argc, char *argv[])
#include "logSummary.H"
rho = thermo->rho();
rho = thermo.rho();
runTime.write();

View File

@ -1,4 +1,4 @@
rho = thermo->rho();
rho = thermo.rho();
volScalarField rUA = 1.0/UEqn.A();
U = rUA*UEqn.H();
@ -8,7 +8,7 @@ if (transonic)
surfaceScalarField phid
(
"phid",
fvc::interpolate(thermo->psi())
fvc::interpolate(psi)
*((fvc::interpolate(U) & mesh.Sf()) - fvc::meshPhi(rho, U))
);

View File

@ -1,13 +1,16 @@
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();
word inertSpecie(thermo->lookup("inertSpecie"));
word inertSpecie(thermo.lookup("inertSpecie"));
volScalarField rho
(
@ -17,7 +20,7 @@ volScalarField rho
runTime.timeName(),
mesh
),
thermo->rho()
thermo.rho()
);
Info<< "Reading field U\n" << endl;
@ -35,9 +38,9 @@ volVectorField U
);
volScalarField& p = thermo->p();
const volScalarField& psi = thermo->psi();
volScalarField& h = thermo->h();
volScalarField& p = thermo.p();
const volScalarField& psi = thermo.psi();
volScalarField& h = thermo.h();
#include "compressibleCreatePhi.H"
@ -64,7 +67,7 @@ autoPtr<compressible::turbulenceModel> turbulence
rho,
U,
phi,
thermo()
thermo
)
);
@ -72,31 +75,11 @@ Info<< "Creating field DpDt\n" << endl;
volScalarField DpDt =
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
Info << "Constructing chemical mechanism" << endl;
chemistryModel chemistry
(
thermo(),
rho
);
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
for(label i=0; i<Y.size(); i++)
forAll (Y, i)
{
fields.add(Y[i]);
}
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)
);

View File

@ -33,7 +33,7 @@ Description
#include "fvCFD.H"
#include "hCombustionThermo.H"
#include "turbulenceModel.H"
#include "chemistryModel.H"
#include "psiChemistryModel.H"
#include "chemistrySolver.H"
#include "multivariateScheme.H"
@ -52,7 +52,7 @@ int main(int argc, char *argv[])
#include "compressibleCourantNo.H"
#include "setInitialDeltaT.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info << "\nStarting time loop\n" << endl;
@ -86,7 +86,7 @@ int main(int argc, char *argv[])
turbulence->correct();
rho = thermo->rho();
rho = thermo.rho();
runTime.write();

View File

@ -38,11 +38,11 @@ if (mesh.nInternalFaces())
surfaceScalarField amaxSfbyDelta =
mesh.surfaceInterpolation::deltaCoeffs()*amaxSf;
CoNum = max(amaxSfbyDelta/mesh.magSf())
.value()*runTime.deltaT().value();
CoNum = max(amaxSfbyDelta/mesh.magSf()).value()*runTime.deltaT().value();
meanCoNum = (sum(amaxSfbyDelta)/sum(mesh.magSf()))
.value()*runTime.deltaT().value();
meanCoNum =
(sum(amaxSfbyDelta)/sum(mesh.magSf())).value()
*runTime.deltaT().value();
}
Info<< "Mean and max Courant Numbers = "

View File

@ -1,15 +1,16 @@
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& h = thermo->h();
const volScalarField& T = thermo->T();
const volScalarField& psi = thermo->psi();
const volScalarField& mu = thermo->mu();
volScalarField& p = thermo.p();
volScalarField& h = thermo.h();
const volScalarField& T = thermo.T();
const volScalarField& psi = thermo.psi();
const volScalarField& mu = thermo.mu();
bool inviscid(true);
if (max(mu.internalField()) > 0.0)
@ -42,7 +43,7 @@ volScalarField rho
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
thermo->rho(),
thermo.rho(),
rhoBoundaryTypes
);

View File

@ -3,10 +3,7 @@ wordList rhoBoundaryTypes = pbf.types();
forAll(rhoBoundaryTypes, patchi)
{
if
(
rhoBoundaryTypes[patchi] == "waveTransmissive"
)
if (rhoBoundaryTypes[patchi] == "waveTransmissive")
{
rhoBoundaryTypes[patchi] = zeroGradientFvPatchScalarField::typeName;
}

View File

@ -32,7 +32,7 @@ Description
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "basicThermo.H"
#include "basicPsiThermo.H"
#include "zeroGradientFvPatchFields.H"
#include "fixedRhoFvPatchScalarField.H"
@ -40,7 +40,6 @@ Description
int main(int argc, char *argv[])
{
#include "setRootCase.H"
#include "createTime.H"
@ -49,7 +48,7 @@ int main(int argc, char *argv[])
#include "readThermophysicalProperties.H"
#include "readTimeControls.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "readFluxScheme.H"
@ -91,7 +90,7 @@ int main(int argc, char *argv[])
surfaceScalarField phiv_pos = U_pos & 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_neg = fvc::interpolate(c, neg, "reconstruct(T)")*mesh.magSf();
@ -183,7 +182,7 @@ int main(int argc, char *argv[])
h = (rhoE + p)/rho - 0.5*magSqr(U);
h.correctBoundaryConditions();
thermo->correct();
thermo.correct();
rhoE.boundaryField() =
rho.boundaryField()*
(
@ -193,15 +192,15 @@ int main(int argc, char *argv[])
if (!inviscid)
{
volScalarField k("k", thermo->Cp()*mu/Pr);
volScalarField k("k", thermo.Cp()*mu/Pr);
solve
(
fvm::ddt(rho, h) - fvc::ddt(rho, h)
- fvm::laplacian(thermo->alpha(), h)
+ fvc::laplacian(thermo->alpha(), h)
- fvm::laplacian(thermo.alpha(), h)
+ fvc::laplacian(thermo.alpha(), h)
- fvc::laplacian(k, T)
);
thermo->correct();
thermo.correct();
rhoE = rho*(h + 0.5*magSqr(U)) - p;
}

View File

@ -1,13 +1,14 @@
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& h = thermo->h();
const volScalarField& psi = thermo->psi();
volScalarField& p = thermo.p();
volScalarField& h = thermo.h();
const volScalarField& psi = thermo.psi();
volScalarField rho
(
@ -19,7 +20,7 @@
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
thermo->rho()
thermo.rho()
);
Info<< "Reading field U\n" << endl;
@ -51,7 +52,7 @@
rho,
U,
phi,
thermo()
thermo
)
);

View File

@ -19,5 +19,5 @@
hEqn.solve();
}
thermo->correct();
thermo.correct();
}

View File

@ -1,4 +1,4 @@
rho = thermo->rho();
rho = thermo.rho();
volScalarField rUA = 1.0/UEqn().A();
U = rUA*UEqn().H();
@ -13,7 +13,7 @@ if (transonic)
surfaceScalarField phid
(
"phid",
fvc::interpolate(thermo->psi())
fvc::interpolate(psi)
*(
(fvc::interpolate(U) & mesh.Sf())
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
@ -99,7 +99,7 @@ else
// Explicitly relax pressure for momentum corrector
p.relax();
rho = thermo->rho();
rho = thermo.rho();
rho.relax();
Info<< "rho max/min : " << max(rho).value()
<< " " << min(rho).value() << endl;
@ -117,7 +117,7 @@ bound(p, pMin);
/*
if (closedVolume)
{
p += (initialMass - fvc::domainIntegrate(thermo->psi()*p))
/fvc::domainIntegrate(thermo->psi());
p += (initialMass - fvc::domainIntegrate(psi*p))
/fvc::domainIntegrate(psi);
}
*/

View File

@ -35,7 +35,7 @@ Description
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "basicThermo.H"
#include "basicPsiThermo.H"
#include "turbulenceModel.H"
#include "bound.H"

View File

@ -1,13 +1,14 @@
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& h = thermo->h();
const volScalarField& psi = thermo->psi();
volScalarField& p = thermo.p();
volScalarField& h = thermo.h();
const volScalarField& psi = thermo.psi();
volScalarField rho
(
@ -19,7 +20,7 @@
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
thermo->rho()
thermo.rho()
);
Info<< "\nReading field U\n" << endl;
@ -47,7 +48,7 @@
rho,
U,
phi,
thermo()
thermo
)
);

View File

@ -8,5 +8,5 @@
DpDt
);
thermo->correct();
thermo.correct();
}

View File

@ -1,4 +1,4 @@
rho = thermo->rho();
rho = thermo.rho();
volScalarField rUA = 1.0/UEqn.A();
U = rUA*UEqn.H();
@ -8,7 +8,7 @@ if (transonic)
surfaceScalarField phid
(
"phid",
fvc::interpolate(thermo->psi())
fvc::interpolate(psi)
*(
(fvc::interpolate(U) & mesh.Sf())
+ fvc::ddtPhiCorr(rUA, rho, U, phi)

View File

@ -31,7 +31,7 @@ Description
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "basicThermo.H"
#include "basicPsiThermo.H"
#include "turbulenceModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -77,7 +77,7 @@ int main(int argc, char *argv[])
turbulence->correct();
rho = thermo->rho();
rho = thermo.rho();
runTime.write();

View File

@ -1,9 +1,10 @@
Info<< "Reading thermophysical properties\n" << endl;
autoPtr<basicThermo> thermo
autoPtr<basicPsiThermo> pThermo
(
basicThermo::New(mesh)
basicPsiThermo::New(mesh)
);
basicPsiThermo& thermo = pThermo();
volScalarField rho
(
@ -15,11 +16,12 @@
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
thermo->rho()
thermo.rho()
);
volScalarField& p = thermo->p();
volScalarField& h = thermo->h();
volScalarField& p = thermo.p();
volScalarField& h = thermo.h();
const volScalarField& psi = thermo.psi();
Info<< "Reading field U\n" << endl;
@ -56,7 +58,7 @@
rho,
U,
phi,
thermo()
thermo
)
);

View File

@ -14,5 +14,5 @@
eqnResidual = hEqn.solve().initialResidual();
maxResidual = max(eqnResidual, maxResidual);
thermo->correct();
thermo.correct();
}

View File

@ -65,10 +65,10 @@ bound(p, pMin);
// to obey overall mass continuity
if (closedVolume)
{
p += (initialMass - fvc::domainIntegrate(thermo->psi()*p))
/fvc::domainIntegrate(thermo->psi());
p += (initialMass - fvc::domainIntegrate(psi*p))
/fvc::domainIntegrate(psi);
}
rho = thermo->rho();
rho = thermo.rho();
rho.relax();
Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value() << endl;

View File

@ -27,12 +27,12 @@ Application
Description
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 "basicThermo.H"
#include "basicPsiThermo.H"
#include "RASModel.H"
#include "porousZones.H"

View File

@ -1,9 +1,10 @@
Info<< "Reading thermophysical properties\n" << endl;
autoPtr<basicThermo> thermo
autoPtr<basicPsiThermo> pThermo
(
basicThermo::New(mesh)
basicPsiThermo::New(mesh)
);
basicPsiThermo& thermo = pThermo();
volScalarField rho
(
@ -15,12 +16,12 @@
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
thermo->rho()
thermo.rho()
);
volScalarField& p = thermo->p();
volScalarField& h = thermo->h();
volScalarField& p = thermo.p();
volScalarField& h = thermo.h();
const volScalarField& psi = thermo.psi();
Info<< "Reading field U\n" << endl;
volVectorField U
@ -56,7 +57,7 @@
rho,
U,
phi,
thermo()
thermo
)
);

View File

@ -14,5 +14,5 @@
eqnResidual = hEqn.solve().initialResidual();
maxResidual = max(eqnResidual, maxResidual);
thermo->correct();
thermo.correct();
}

View File

@ -1,4 +1,4 @@
rho = thermo->rho();
rho = thermo.rho();
volScalarField rUA = 1.0/UEqn().A();
U = rUA*UEqn().H();
@ -11,7 +11,7 @@ if (transonic)
surfaceScalarField 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++)
@ -82,7 +82,7 @@ else
// Explicitly relax pressure for momentum corrector
p.relax();
rho = thermo->rho();
rho = thermo.rho();
rho.relax();
Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value() << endl;
@ -95,6 +95,6 @@ bound(p, pMin);
// to obey overall mass continuity
if (closedVolume)
{
p += (initialMass - fvc::domainIntegrate(thermo->psi()*p))
/fvc::domainIntegrate(thermo->psi());
p += (initialMass - fvc::domainIntegrate(psi*p))
/fvc::domainIntegrate(psi);
}

View File

@ -26,13 +26,13 @@ Application
rhoSimpleFoam
Description
Steady-state SIMPLE solver for laminar or turbulent flow of
Steady-state SIMPLE solver for laminar or turbulent RANS flow of
compressible fluids.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "basicThermo.H"
#include "basicPsiThermo.H"
#include "RASModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -1,13 +1,14 @@
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& h = thermo->h();
const volScalarField& psi = thermo->psi();
volScalarField& p = thermo.p();
volScalarField& h = thermo.h();
const volScalarField& psi = thermo.psi();
volScalarField rho
(
@ -17,7 +18,7 @@
runTime.timeName(),
mesh
),
thermo->rho()
thermo.rho()
);
Info<< "Reading field U\n" << endl;
@ -45,7 +46,7 @@
rho,
U,
phi,
thermo()
thermo
)
);

View File

@ -32,7 +32,7 @@ Description
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "basicThermo.H"
#include "basicPsiThermo.H"
#include "turbulenceModel.H"
#include "motionSolver.H"
@ -84,8 +84,8 @@ int main(int argc, char *argv[])
surfaceScalarField phid
(
"phid",
fvc::interpolate(psi)*
(
fvc::interpolate(psi)
*(
(fvc::interpolate(U) & mesh.Sf()) - fvc::meshPhi(rho, U)
)
);

View File

@ -1,13 +1,14 @@
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& h = thermo->h();
const volScalarField& psi = thermo->psi();
volScalarField& p = thermo.p();
volScalarField& h = thermo.h();
const volScalarField& psi = thermo.psi();
volScalarField rho
(
@ -17,7 +18,7 @@
runTime.timeName(),
mesh
),
thermo->rho()
thermo.rho()
);
Info<< "Reading field U\n" << endl;
@ -45,7 +46,7 @@
rho,
U,
phi,
thermo()
thermo
)
);

View File

@ -8,5 +8,5 @@
DpDt
);
thermo->correct();
thermo.correct();
}

View File

@ -32,7 +32,7 @@ Description
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "basicThermo.H"
#include "basicPsiThermo.H"
#include "turbulenceModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -80,7 +80,7 @@ int main(int argc, char *argv[])
surfaceScalarField phid
(
"phid",
fvc::interpolate(thermo->psi())
fvc::interpolate(psi)
*(
(fvc::interpolate(U) & mesh.Sf())
+ fvc::ddtPhiCorr(rUA, rho, U, phi)

View File

@ -37,7 +37,6 @@ Description
int main(int argc, char *argv[])
{
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
@ -46,7 +45,7 @@ int main(int argc, char *argv[])
#include "createFields.H"
#include "initContinuityErrs.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;
@ -79,8 +78,8 @@ int main(int argc, char *argv[])
surfaceScalarField phid
(
"phid",
psi*
(
psi
*(
(fvc::interpolate(U) & mesh.Sf())
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
)

View File

@ -81,7 +81,7 @@ int main(int argc, char *argv[])
turbulence->correct();
rho = thermo->rho();
rho = thermo.rho();
runTime.write();

View File

@ -1,9 +1,10 @@
Info<< "Reading thermophysical properties\n" << endl;
autoPtr<basicRhoThermo> thermo
autoPtr<basicRhoThermo> pThermo
(
basicRhoThermo::New(mesh)
);
basicRhoThermo& thermo = pThermo();
volScalarField rho
(
@ -15,12 +16,12 @@
IOobject::NO_READ,
IOobject::NO_WRITE
),
thermo->rho()
thermo.rho()
);
volScalarField& p = thermo->p();
volScalarField& h = thermo->h();
const volScalarField& psi = thermo->psi();
volScalarField& p = thermo.p();
volScalarField& h = thermo.h();
const volScalarField& psi = thermo.psi();
Info<< "Reading field U\n" << endl;
@ -48,7 +49,7 @@
rho,
U,
phi,
thermo()
thermo
)
);
@ -59,7 +60,7 @@
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p)
);
thermo->correct();
thermo.correct();
dimensionedScalar initialMass = fvc::domainIntegrate(rho);

View File

@ -11,5 +11,5 @@
hEqn.relax();
hEqn.solve();
thermo->correct();
thermo.correct();
}

View File

@ -1,11 +1,11 @@
{
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;
thermo.rho() -= psi*p;
volScalarField rUA = 1.0/UEqn.A();
surfaceScalarField rhorUAf("(rho*(1|A(U)))", fvc::interpolate(rho*rUA));
@ -48,7 +48,7 @@
}
// Second part of thermodynamic density update
thermo->rho() += psi*p;
thermo.rho() += psi*p;
U += rUA*fvc::reconstruct((phi - phiU)/rhorUAf);
U.correctBoundaryConditions();
@ -65,7 +65,7 @@
p +=
(initialMass - fvc::domainIntegrate(psi*p))
/fvc::domainIntegrate(psi);
thermo->rho() = psi*p;
thermo.rho() = psi*p;
rho += (initialMass - fvc::domainIntegrate(rho))/totalVolume;
}
}

View File

@ -31,7 +31,7 @@ Description
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "basicThermo.H"
#include "basicPsiThermo.H"
#include "RASModel.H"
#include "fixedGradientFvPatchFields.H"

View File

@ -1,9 +1,10 @@
Info<< "Reading thermophysical properties\n" << endl;
autoPtr<basicThermo> thermo
autoPtr<basicPsiThermo> pThermo
(
basicThermo::New(mesh)
basicPsiThermo::New(mesh)
);
basicPsiThermo& thermo = pThermo();
volScalarField rho
(
@ -15,11 +16,12 @@
IOobject::NO_READ,
IOobject::NO_WRITE
),
thermo->rho()
thermo.rho()
);
volScalarField& p = thermo->p();
volScalarField& h = thermo->h();
volScalarField& p = thermo.p();
volScalarField& h = thermo.h();
const volScalarField& psi = thermo.psi();
Info<< "Reading field U\n" << endl;
@ -47,11 +49,11 @@
rho,
U,
phi,
thermo()
thermo
)
);
thermo->correct();
thermo.correct();
label pRefCell = 0;
scalar pRefValue = 0.0;

View File

@ -14,5 +14,5 @@
eqnResidual = hEqn.solve().initialResidual();
maxResidual = max(eqnResidual, maxResidual);
thermo->correct();
thermo.correct();
}

View File

@ -1,5 +1,5 @@
{
rho = thermo->rho();
rho = thermo.rho();
volScalarField rUA = 1.0/UEqn().A();
surfaceScalarField rhorUAf("(rho*(1|A(U)))", fvc::interpolate(rho*rUA));
@ -39,8 +39,8 @@
// to obey overall mass continuity
if (closedVolume)
{
p += (initialMass - fvc::domainIntegrate(thermo->psi()*p))
/fvc::domainIntegrate(thermo->psi());
p += (initialMass - fvc::domainIntegrate(psi*p))
/fvc::domainIntegrate(psi);
}
// Calculate the conservative fluxes
@ -58,7 +58,7 @@
#include "continuityErrs.H"
rho = thermo->rho();
rho = thermo.rho();
rho.relax();
Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value()
<< endl;

View File

@ -32,7 +32,7 @@ Description
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "basicThermo.H"
#include "basicPsiThermo.H"
#include "RASModel.H"
#include "fixedGradientFvPatchFields.H"
#include "radiationModel.H"
@ -61,7 +61,7 @@ int main(int argc, char *argv[])
# include "readSIMPLEControls.H"
# include "initConvergenceCheck.H"
pd.storePrevIter();
p.storePrevIter();
rho.storePrevIter();
// Pressure-velocity SIMPLE corrector

View File

@ -7,7 +7,7 @@
==
fvc::div(phi/fvc::interpolate(rho)*fvc::interpolate(p))
- p*fvc::div(phi/fvc::interpolate(rho))
+ radiation->Sh(thermo())
+ radiation->Sh(thermo)
);
hEqn.relax();
@ -15,7 +15,7 @@
eqnResidual = hEqn.solve().initialResidual();
maxResidual = max(eqnResidual, maxResidual);
thermo->correct();
thermo.correct();
radiation->correct();
}

View File

@ -32,7 +32,7 @@ Description
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "basicThermo.H"
#include "basicPsiThermo.H"
#include "turbulenceModel.H"
#include "fixedGradientFvPatchFields.H"
#include "regionProperties.H"
@ -42,7 +42,6 @@ Description
int main(int argc, char *argv[])
{
#include "setRootCase.H"
#include "createTime.H"

View File

@ -1,5 +1,5 @@
// Initialise fluid field pointer lists
PtrList<basicThermo> thermoFluid(fluidRegions.size());
PtrList<basicPsiThermo> thermoFluid(fluidRegions.size());
PtrList<volScalarField> rhoFluid(fluidRegions.size());
PtrList<volScalarField> KFluid(fluidRegions.size());
PtrList<volVectorField> UFluid(fluidRegions.size());
@ -19,7 +19,7 @@
thermoFluid.set
(
i,
basicThermo::New(fluidRegions[i]).ptr()
basicPsiThermo::New(fluidRegions[i]).ptr()
);
Info<< " Adding to rhoFluid\n" << endl;

View File

@ -1,6 +1,6 @@
const fvMesh& mesh = fluidRegions[i];
basicThermo& thermo = thermoFluid[i];
basicPsiThermo& thermo = thermoFluid[i];
volScalarField& rho = rhoFluid[i];
volScalarField& K = KFluid[i];
volVectorField& U = UFluid[i];

View File

@ -12,7 +12,7 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/solids/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/solidMixture/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/radiation/lnInclude \
-I$(LIB_SRC)/ODE/lnInclude
@ -31,7 +31,7 @@ EXE_LIBS = \
-lsolids \
-lsolidMixture \
-lthermophysicalFunctions \
-lcombustionThermophysicalModels \
-lreactionThermophysicalModels \
-lchemistryModel \
-lradiation \
-lODE

View File

@ -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();
}

View File

@ -1,9 +1,9 @@
Info<< "\nConstructing reacting cloud" << endl;
BasicReactingCloud<specieReactingProperties> parcels
BasicReactingCloud<gasThermoPhysics> parcels
(
"reactingCloud1",
rho,
U,
g,
thermo()
thermo
);

View File

@ -1,19 +1,22 @@
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();
word inertSpecie(thermo->lookup("inertSpecie"));
word inertSpecie(thermo.lookup("inertSpecie"));
volScalarField& p = thermo->p();
volScalarField& h = thermo->h();
const volScalarField& T = thermo->T();
const volScalarField& psi = thermo->psi();
volScalarField& p = thermo.p();
volScalarField& h = thermo.h();
const volScalarField& T = thermo.T();
const volScalarField& psi = thermo.psi();
volScalarField rho
(
@ -25,7 +28,7 @@
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
thermo->rho()
thermo.rho()
);
Info<< "\nReading field U\n" << endl;
@ -66,7 +69,7 @@
rho,
U,
phi,
thermo()
thermo
)
);
@ -74,13 +77,6 @@
volScalarField DpDt =
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
Info << "Constructing chemical mechanism" << endl;
chemistryModel chemistry
(
thermo(),
rho
);
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
forAll (Y, i)

View File

@ -7,14 +7,14 @@
==
DpDt
+ parcels.Sh()
+ radiation->Sh(thermo())
+ radiation->Sh(thermo)
);
hEqn.relax();
hEqn.solve();
thermo->correct();
thermo.correct();
radiation->correct();
}

View File

@ -1,4 +1,4 @@
rho = thermo->rho();
rho = thermo.rho();
volScalarField rUA = 1.0/UEqn.A();
U = rUA*UEqn.H();
@ -8,7 +8,7 @@ if (transonic)
surfaceScalarField phid
(
"phid",
fvc::interpolate(thermo->psi())
fvc::interpolate(psi)
*(
(fvc::interpolate(U) & mesh.Sf())
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
@ -37,8 +37,8 @@ if (transonic)
else
{
phi =
fvc::interpolate(rho)*
(
fvc::interpolate(rho)
*(
(fvc::interpolate(U) & mesh.Sf())
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
);

View File

@ -35,9 +35,9 @@ Description
#include "hCombustionThermo.H"
#include "turbulenceModel.H"
#include "BasicReactingCloud.H"
#include "chemistryModel.H"
#include "psiChemistryModel.H"
#include "chemistrySolver.H"
#include "thermoPhsyicsTypes.H"
#include "thermoPhysicsTypes.H"
#include "radiationModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -100,12 +100,9 @@ int main(int argc, char *argv[])
turbulence->correct();
rho = thermo->rho();
rho = thermo.rho();
if (runTime.write())
{
#include "additionalOutput.H"
}
runTime.write();
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2008-2007 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License

View File

@ -1,4 +1,7 @@
REACTINGPARCELFOAM = ../reactingParcelFoam
EXE_INC = \
-I$(REACTINGPARCELFOAM) \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I${LIB_SRC}/meshTools/lnInclude \
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \

View File

@ -5,7 +5,7 @@
+ turbulence->divDevRhoReff(U)
==
rho.dimensionedInternalField()*g
+ reactingParcels.SU()
+ parcels.SU()
);
UEqn.relax();

View File

@ -26,7 +26,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection
+ mvConvection->fvmDiv(phi, Yi)
- fvm::laplacian(turbulence->muEff(), Yi)
==
reactingParcels.Srho(i)
parcels.Srho(i)
+ kappa*chemistry.RR(i)().dimensionedInternalField()
+ pointMassSources.Su(i)
);

View File

@ -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();
}

View File

@ -1,25 +0,0 @@
{
Info << "Solving chemistry" << endl;
chemistry.solve
(
runTime.value() - runTime.deltaT().value(),
runTime.deltaT().value()
);
// turbulent time scale
if (turbulentReaction)
{
DimensionedField<scalar, volMesh> tk =
Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon());
DimensionedField<scalar, volMesh> tc =
chemistry.tc()().dimensionedInternalField();
// Chalmers PaSR model
kappa = (runTime.deltaT() + tc)/(runTime.deltaT() + tc + tk);
}
else
{
kappa = 1.0;
}
}

View File

@ -1,9 +1,9 @@
Info<< "\nConstructing reacting cloud" << endl;
BasicTrackedReactingCloud<specieReactingProperties> reactingParcels
BasicTrackedReactingCloud<gasThermoPhysics> parcels
(
"reactingCloud1",
rho,
U,
g,
thermo()
thermo
);

View File

@ -1,111 +0,0 @@
Info<< "Reading thermophysical properties" << nl << endl;
autoPtr<hCombustionThermo> thermo
(
hCombustionThermo::New(mesh)
);
combustionMixture& composition = thermo->composition();
PtrList<volScalarField>& Y = composition.Y();
word inertSpecie(thermo->lookup("inertSpecie"));
volScalarField& p = thermo->p();
volScalarField& h = thermo->h();
const volScalarField& T = thermo->T();
const volScalarField& psi = thermo->psi();
volScalarField rho
(
IOobject
(
"rho",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
thermo->rho()
);
Info<< "Reading field U" << nl << endl;
volVectorField U
(
IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
# include "compressibleCreatePhi.H"
DimensionedField<scalar, volMesh> kappa
(
IOobject
(
"kappa",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("zero", dimless, 0.0)
);
Info<< "Creating turbulence model" << nl << endl;
autoPtr<compressible::turbulenceModel> turbulence
(
compressible::turbulenceModel::New
(
rho,
U,
phi,
thermo()
)
);
Info<< "Creating field DpDt" << nl << endl;
volScalarField DpDt =
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
Info << "Constructing chemical mechanism" << nl << endl;
chemistryModel chemistry
(
thermo(),
rho
);
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
forAll (Y, i)
{
fields.add(Y[i]);
}
fields.add(h);
Info<< "Creating porous zones" << nl << endl;
porousZones pZones(mesh);
Switch pressureImplicitPorosity(false);
label nUCorr = 0;
if (pZones.size())
{
// nUCorrectors for pressureImplicitPorosity
if (mesh.solutionDict().subDict("PISO").found("nUCorrectors"))
{
mesh.solutionDict().subDict("PISO").lookup("nUCorrectors")
>> nUCorr;
}
if (nUCorr > 0)
{
pressureImplicitPorosity = true;
}
}

View File

@ -0,0 +1,21 @@
Info<< "Creating porous zones" << nl << endl;
porousZones pZones(mesh);
Switch pressureImplicitPorosity(false);
label nUCorr = 0;
if (pZones.size())
{
// nUCorrectors for pressureImplicitPorosity
if (mesh.solutionDict().subDict("PISO").found("nUCorrectors"))
{
mesh.solutionDict().subDict("PISO").lookup("nUCorrectors")
>> nUCorr;
}
if (nUCorr > 0)
{
pressureImplicitPorosity = true;
}
}

View File

@ -1,20 +0,0 @@
{
fvScalarMatrix hEqn
(
fvm::ddt(rho, h)
+ fvm::div(phi, h)
- fvm::laplacian(turbulence->alphaEff(), h)
==
DpDt
+ reactingParcels.Sh()
+ radiation->Sh(thermo())
);
hEqn.relax();
hEqn.solve();
thermo->correct();
radiation->correct();
}

View File

@ -1,4 +1,4 @@
rho = thermo->rho();
rho = thermo.rho();
if (pressureImplicitPorosity)
{
@ -14,7 +14,7 @@ if (transonic)
surfaceScalarField phid
(
"phid",
fvc::interpolate(thermo->psi())
fvc::interpolate(psi)
*(
(fvc::interpolate(U) & mesh.Sf())
// + fvc::ddtPhiCorr(rUA, rho, U, phi)
@ -40,7 +40,7 @@ if (transonic)
+ fvm::div(phid, p)
- lapTerm()
==
reactingParcels.Srho()
parcels.Srho()
+ pointMassSources.Su()
);
@ -80,7 +80,7 @@ else
+ fvc::div(phi)
- lapTerm()
==
reactingParcels.Srho()
parcels.Srho()
+ pointMassSources.Su()
);

View File

@ -1,22 +0,0 @@
Info<< "Reading chemistry properties\n" << endl;
IOdictionary chemistryProperties
(
IOobject
(
"chemistryProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
)
);
Switch turbulentReaction(chemistryProperties.lookup("turbulentReaction"));
dimensionedScalar Cmix("Cmix", dimless, 1.0);
if (turbulentReaction)
{
chemistryProperties.lookup("Cmix") >> Cmix;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2008-2007 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -36,7 +36,7 @@ Description
fvm::ddt(rho)
+ fvc::div(phi)
==
reactingParcels.Srho()
parcels.Srho()
+ pointMassSources.Su()
);
}

View File

@ -32,9 +32,9 @@ Description
#include "hCombustionThermo.H"
#include "turbulenceModel.H"
#include "BasicTrackedReactingCloud.H"
#include "chemistryModel.H"
#include "psiChemistryModel.H"
#include "chemistrySolver.H"
#include "reactingThermoTypes.H"
#include "thermoPhysicsTypes.H"
#include "radiationModel.H"
#include "porousZones.H"
#include "timeActivatedExplicitMulticomponentPointSource.H"
@ -53,6 +53,7 @@ int main(int argc, char *argv[])
#include "createRadiationModel.H"
#include "createClouds.H"
#include "createMulticomponentPointSources.H"
#include "createPorousZones.H"
#include "readPISOControls.H"
#include "initContinuityErrs.H"
#include "readTimeControls.H"
@ -74,9 +75,9 @@ int main(int argc, char *argv[])
Info<< "Time = " << runTime.timeName() << nl << endl;
reactingParcels.evolve();
parcels.evolve();
reactingParcels.info();
parcels.info();
#include "chemistry.H"
#include "rhoEqn.H"
@ -100,12 +101,9 @@ int main(int argc, char *argv[])
turbulence->correct();
rho = thermo->rho();
rho = thermo.rho();
if (runTime.write())
{
#include "additionalOutput.H"
}
runTime.write();
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"

View File

@ -1,9 +1,10 @@
Info<< "Reading thermophysical properties\n" << endl;
autoPtr<basicThermo> thermo
autoPtr<basicPsiThermo> pThermo
(
basicThermo::New(mesh)
basicPsiThermo::New(mesh)
);
basicPsiThermo& thermo = pThermo();
volScalarField rho
(
@ -15,7 +16,7 @@
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
thermo->rho()
thermo.rho()
);
Info<< "\nReading field U\n" << endl;
@ -42,7 +43,7 @@
rho,
U,
phi,
thermo()
thermo
)
);
@ -55,6 +56,6 @@
kinematicCloudName,
rho,
U,
thermo().mu(),
thermo.mu(),
g
);

View File

@ -32,7 +32,7 @@ Description
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "basicThermo.H"
#include "basicPsiThermo.H"
#include "turbulenceModel.H"
#include "basicKinematicCloud.H"

View File

@ -40,7 +40,6 @@ Description
int main(int argc, char *argv[])
{
#include "setRootCase.H"
#include "createTime.H"
@ -49,7 +48,7 @@ int main(int argc, char *argv[])
#include "createFields.H"
#include "initContinuityErrs.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;

View File

@ -49,7 +49,6 @@ if(turbulence)
nutb = Cmu*sqr(k)/epsilon;
#include "wallViscosity.H"
}
nuEffa = sqr(Ct)*nutb + nua;

View File

@ -41,7 +41,6 @@ Description
int main(int argc, char *argv[])
{
#include "setRootCase.H"
#include "createTime.H"
@ -53,7 +52,7 @@ int main(int argc, char *argv[])
#include "compressibleCourantNo.H"
#include "setInitialDeltaT.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;

View File

@ -83,5 +83,4 @@
<< " " << min(rho).value() << endl;
#include "gammaPsi.H"
}

View File

@ -43,7 +43,6 @@ Description
int main(int argc, char *argv[])
{
#include "setRootCase.H"
#include "createTime.H"
@ -52,8 +51,7 @@ int main(int argc, char *argv[])
#include "createFields.H"
#include "initContinuityErrs.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;

View File

@ -47,7 +47,6 @@ Description
int main(int argc, char *argv[])
{
#include "setRootCase.H"
#include "createTime.H"
@ -60,7 +59,7 @@ int main(int argc, char *argv[])
#include "CourantNo.H"
#include "setInitialDeltaT.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;

View File

@ -42,7 +42,7 @@ Description
#include "incompressible/RAS/RASModel/RASModel.H"
#include "incompressible/LES/LESModel/LESModel.H"
#include "basicThermo.H"
#include "basicPsiThermo.H"
#include "compressible/RAS/RASModel/RASModel.H"
#include "compressible/LES/LESModel/LESModel.H"
@ -194,7 +194,7 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
}
else if (phi.dimensions() == dimensionSet(1, 0, -1, 0, 0))
{
autoPtr<basicThermo> thermo(basicThermo::New(mesh));
autoPtr<basicPsiThermo> thermo(basicPsiThermo::New(mesh));
volScalarField rho
(

View File

@ -33,7 +33,7 @@ Description
\*---------------------------------------------------------------------------*/
#include "calc.H"
#include "basicThermo.H"
#include "basicPsiThermo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
@ -66,9 +66,9 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
if (isFile(runTime.constantPath()/"thermophysicalProperties"))
{
// thermophysical Mach
autoPtr<basicThermo> thermo
autoPtr<basicPsiThermo> thermo
(
basicThermo::New(mesh)
basicPsiThermo::New(mesh)
);
volScalarField Cp = thermo->Cp();

View File

@ -18,9 +18,9 @@
{
volVectorField U(Uheader, mesh);
autoPtr<basicThermo> thermo
autoPtr<basicPsiThermo> thermo
(
basicThermo::New(mesh)
basicPsiThermo::New(mesh)
);
volScalarField Cp = thermo->Cp();

View File

@ -39,7 +39,7 @@ Description
#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H"
#include "incompressible/RAS/RASModel/RASModel.H"
#include "incompressible/LES/LESModel/LESModel.H"
#include "basicThermo.H"
#include "basicPsiThermo.H"
#include "compressible/RAS/RASModel/RASModel.H"
#include "compressible/LES/LESModel/LESModel.H"
@ -204,7 +204,7 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
{
IOdictionary RASProperties(RASPropertiesHeader);
autoPtr<basicThermo> thermo(basicThermo::New(mesh));
autoPtr<basicPsiThermo> thermo(basicPsiThermo::New(mesh));
volScalarField rho
(
@ -252,7 +252,7 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
{
IOdictionary LESProperties(LESPropertiesHeader);
autoPtr<basicThermo> thermo(basicThermo::New(mesh));
autoPtr<basicPsiThermo> thermo(basicPsiThermo::New(mesh));
volScalarField rho
(

Some files were not shown because too many files have changed in this diff Show More