COMP: avoid ambiguous construct from tmp - solvers/ combustion

This commit is contained in:
Mark Olesen 2010-12-21 09:49:34 +01:00
parent 7b5bff1a9e
commit c5ee4e1b04
36 changed files with 184 additions and 133 deletions

View File

@ -34,8 +34,8 @@ namespace XiEqModels
{
defineTypeNameAndDebug(basicSubGrid, 0);
addToRunTimeSelectionTable(XiEqModel, basicSubGrid, dictionary);
};
};
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -123,20 +123,24 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::basicSubGrid::XiEq() const
const objectRegistry& db = Su_.db();
const volVectorField& U = db.lookupObject<volVectorField>("U");
volScalarField magU = mag(U);
volVectorField Uhat =
U/(mag(U) + dimensionedScalar("Usmall", U.dimensions(), 1e-4));
volScalarField magU(mag(U));
volVectorField Uhat
(
U/(mag(U) + dimensionedScalar("Usmall", U.dimensions(), 1e-4))
);
volScalarField n = max(N_ - (Uhat & ns_ & Uhat), scalar(1e-4));
volScalarField n(max(N_ - (Uhat & ns_ & Uhat), scalar(1e-4)));
volScalarField b = (Uhat & B_ & Uhat)/n;
volScalarField b((Uhat & B_ & Uhat)/n);
volScalarField up = sqrt((2.0/3.0)*turbulence_.k());
volScalarField up(sqrt((2.0/3.0)*turbulence_.k()));
volScalarField XiSubEq =
volScalarField XiSubEq
(
scalar(1)
+ max(2.2*sqrt(b), min(0.34*magU/up, scalar(1.6)))
*min(0.25*n, scalar(1));
*min(0.25*n, scalar(1))
);
return XiSubEq*XiEqModel_->XiEq();
}

View File

@ -78,7 +78,7 @@ void PDRkEpsilon::correct()
RASModel::correct();
volScalarField divU = fvc::div(phi_/fvc::interpolate(rho_));
volScalarField divU(fvc::div(phi_/fvc::interpolate(rho_)));
if (mesh_.moving())
{
@ -99,7 +99,7 @@ void PDRkEpsilon::correct()
const PDRDragModel& drag =
U_.db().lookupObject<PDRDragModel>("PDRDragModel");
volScalarField GR = drag.Gk();
volScalarField GR(drag.Gk());
// Dissipation equation
tmp<fvScalarMatrix> epsEqn

View File

@ -34,9 +34,11 @@ Description
if (mesh.nInternalFaces())
{
scalarField sumPhi =
scalarField sumPhi
(
fvc::surfaceSum(mag(phiSt))().internalField()
/rho.internalField();
/ rho.internalField()
);
StCoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();

View File

@ -7,7 +7,7 @@
betav*rho*g
);
volSymmTensorField invA = inv(I*UEqn.A() + drag->Dcu());
volSymmTensorField invA(inv(I*UEqn.A() + drag->Dcu()));
if (momentumPredictor)
{

View File

@ -34,8 +34,8 @@ namespace XiEqModels
{
defineTypeNameAndDebug(Gulder, 0);
addToRunTimeSelectionTable(XiEqModel, Gulder, dictionary);
};
};
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -64,15 +64,18 @@ Foam::XiEqModels::Gulder::~Gulder()
Foam::tmp<Foam::volScalarField> Foam::XiEqModels::Gulder::XiEq() const
{
volScalarField up = sqrt((2.0/3.0)*turbulence_.k());
volScalarField up(sqrt((2.0/3.0)*turbulence_.k()));
const volScalarField& epsilon = turbulence_.epsilon();
volScalarField tauEta = sqrt(mag(thermo_.muu()/(thermo_.rhou()*epsilon)));
volScalarField tauEta(sqrt(mag(thermo_.muu()/(thermo_.rhou()*epsilon))));
volScalarField Reta = up/
volScalarField Reta
(
sqrt(epsilon*tauEta)
+ dimensionedScalar("1e-8", up.dimensions(), 1e-8)
up
/ (
sqrt(epsilon*tauEta)
+ dimensionedScalar("1e-8", up.dimensions(), 1e-8)
)
);
return 1.0 + XiEqCoef*sqrt(up/(Su_ + SuMin))*Reta;

View File

@ -34,8 +34,8 @@ namespace XiEqModels
{
defineTypeNameAndDebug(SCOPEXiEq, 0);
addToRunTimeSelectionTable(XiEqModel, SCOPEXiEq, dictionary);
};
};
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -83,13 +83,13 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::SCOPEXiEq::XiEq() const
const volScalarField& k = turbulence_.k();
const volScalarField& epsilon = turbulence_.epsilon();
volScalarField up = sqrt((2.0/3.0)*k);
volScalarField l = (lCoef*sqrt(3.0/2.0))*up*k/epsilon;
volScalarField Rl = up*l*thermo_.rhou()/thermo_.muu();
volScalarField up(sqrt((2.0/3.0)*k));
volScalarField l((lCoef*sqrt(3.0/2.0))*up*k/epsilon);
volScalarField Rl(up*l*thermo_.rhou()/thermo_.muu());
volScalarField upBySu = up/(Su_ + SuMin);
volScalarField K = 0.157*upBySu/sqrt(Rl);
volScalarField Ma = MaModel.Ma();
volScalarField upBySu(up/(Su_ + SuMin));
volScalarField K(0.157*upBySu/sqrt(Rl));
volScalarField Ma(MaModel.Ma());
tmp<volScalarField> tXiEq
(

View File

@ -34,8 +34,8 @@ namespace XiEqModels
{
defineTypeNameAndDebug(instability, 0);
addToRunTimeSelectionTable(XiEqModel, instability, dictionary);
};
};
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -64,7 +64,7 @@ Foam::XiEqModels::instability::~instability()
Foam::tmp<Foam::volScalarField> Foam::XiEqModels::instability::XiEq() const
{
volScalarField turbXiEq = XiEqModel_->XiEq();
volScalarField turbXiEq(XiEqModel_->XiEq());
return XiEqIn/turbXiEq + turbXiEq;
}

View File

@ -34,8 +34,8 @@ namespace XiGModels
{
defineTypeNameAndDebug(KTS, 0);
addToRunTimeSelectionTable(XiGModel, KTS, dictionary);
};
};
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -63,10 +63,11 @@ Foam::XiGModels::KTS::~KTS()
Foam::tmp<Foam::volScalarField> Foam::XiGModels::KTS::G() const
{
volScalarField up = sqrt((2.0/3.0)*turbulence_.k());
// volScalarField up(sqrt((2.0/3.0)*turbulence_.k()));
const volScalarField& epsilon = turbulence_.epsilon();
volScalarField tauEta = sqrt(mag(thermo_.muu()/(thermo_.rhou()*epsilon)));
tmp<volScalarField> tauEta =
sqrt(mag(thermo_.muu()/(thermo_.rhou()*epsilon)));
return GEtaCoef/tauEta;
}

View File

@ -65,7 +65,7 @@ Foam::XiGModels::instabilityG::~instabilityG()
Foam::tmp<Foam::volScalarField> Foam::XiGModels::instabilityG::G() const
{
volScalarField turbXiG = XiGModel_->G();
volScalarField turbXiG(XiGModel_->G());
return GIn*GIn/(GIn + turbXiG) + turbXiG;
}

View File

@ -34,8 +34,8 @@ namespace XiModels
{
defineTypeNameAndDebug(algebraic, 0);
addToRunTimeSelectionTable(XiModel, algebraic, dictionary);
};
};
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -74,12 +74,12 @@ Foam::tmp<Foam::volScalarField> Foam::XiModels::algebraic::Db() const
void Foam::XiModels::algebraic::correct()
{
volScalarField XiEqEta = XiEqModel_->XiEq();
volScalarField GEta = XiGModel_->G();
volScalarField XiEqEta(XiEqModel_->XiEq());
volScalarField GEta(XiGModel_->G());
volScalarField R = GEta*XiEqEta/(XiEqEta - 0.999);
volScalarField R(GEta*XiEqEta/(XiEqEta - 0.999));
volScalarField XiEqStar = R/(R - GEta);
volScalarField XiEqStar(R/(R - GEta));
Xi_ == 1.0 + (1.0 + (2*XiShapeCoef)*(0.5 - b_))*(XiEqStar - 1.0);
}

View File

@ -34,8 +34,8 @@ namespace XiModels
{
defineTypeNameAndDebug(transport, 0);
addToRunTimeSelectionTable(XiModel, transport, dictionary);
};
};
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -77,17 +77,19 @@ void Foam::XiModels::transport::correct
const fv::convectionScheme<scalar>& mvConvection
)
{
volScalarField XiEqEta = XiEqModel_->XiEq();
volScalarField GEta = XiGModel_->G();
volScalarField XiEqEta(XiEqModel_->XiEq());
volScalarField GEta(XiGModel_->G());
volScalarField R = GEta*XiEqEta/(XiEqEta - 0.999);
volScalarField R(GEta*XiEqEta/(XiEqEta - 0.999));
volScalarField XiEqStar = R/(R - GEta);
volScalarField XiEqStar(R/(R - GEta));
volScalarField XiEq =
1.0 + (1.0 + (2*XiShapeCoef)*(0.5 - b_))*(XiEqStar - 1.0);
volScalarField XiEq
(
1.0 + (1.0 + (2*XiShapeCoef)*(0.5 - b_))*(XiEqStar - 1.0)
);
volScalarField G = R*(XiEq - 1.0)/XiEq;
volScalarField G(R*(XiEq - 1.0)/XiEq);
const objectRegistry& db = b_.db();
const volScalarField& betav = db.lookupObject<volScalarField>("betav");

View File

@ -25,20 +25,20 @@ if (ign.ignited())
// Unburnt gas density
// ~~~~~~~~~~~~~~~~~~~
volScalarField rhou = thermo.rhou();
volScalarField rhou(thermo.rhou());
// Calculate flame normal etc.
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//volVectorField n = fvc::grad(b);
volVectorField n = fvc::reconstruct(fvc::snGrad(b)*mesh.magSf());
// volVectorField n(fvc::grad(b));
volVectorField n(fvc::reconstruct(fvc::snGrad(b)*mesh.magSf()));
volScalarField mgb("mgb", mag(n));
dimensionedScalar dMgb("dMgb", mgb.dimensions(), SMALL);
{
volScalarField bc = b*c;
volScalarField bc(b*c);
dMgb += 1.0e-3*
(bc*mgb)().weightedAverage(mesh.V())
@ -47,8 +47,8 @@ if (ign.ignited())
mgb += dMgb;
surfaceVectorField Sfhat = mesh.Sf()/mesh.magSf();
surfaceVectorField nfVec = fvc::interpolate(n);
surfaceVectorField Sfhat(mesh.Sf()/mesh.magSf());
surfaceVectorField nfVec(fvc::interpolate(n));
nfVec += Sfhat*(fvc::snGrad(b) - (Sfhat & nfVec));
nfVec /= (mag(nfVec) + dMgb);
surfaceScalarField nf("nf", mesh.Sf() & nfVec);

View File

@ -1,6 +1,6 @@
rho = thermo.rho();
volScalarField rAU = 1.0/UEqn.A();
volScalarField rAU(1.0/UEqn.A());
U = invA & UEqn.H();
if (transonic)

View File

@ -2,18 +2,18 @@ if (ign.ignited())
{
// progress variable
// ~~~~~~~~~~~~~~~~~
volScalarField c = scalar(1) - b;
volScalarField c(scalar(1) - b);
// Unburnt gas density
// ~~~~~~~~~~~~~~~~~~~
volScalarField rhou = thermo.rhou();
volScalarField rhou(thermo.rhou());
// Calculate flame normal etc.
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
volVectorField n = fvc::grad(b);
volVectorField n(fvc::grad(b));
volScalarField mgb = mag(n);
volScalarField mgb(mag(n));
dimensionedScalar dMgb = 1.0e-3*
(b*c*mgb)().weightedAverage(mesh.V())
@ -22,11 +22,11 @@ if (ign.ignited())
mgb += dMgb;
surfaceVectorField SfHat = mesh.Sf()/mesh.magSf();
surfaceVectorField nfVec = fvc::interpolate(n);
surfaceVectorField SfHat(mesh.Sf()/mesh.magSf());
surfaceVectorField nfVec(fvc::interpolate(n));
nfVec += SfHat*(fvc::snGrad(b) - (SfHat & nfVec));
nfVec /= (mag(nfVec) + dMgb);
surfaceScalarField nf = (mesh.Sf() & nfVec);
surfaceScalarField nf((mesh.Sf() & nfVec));
n /= mgb;
@ -34,7 +34,7 @@ if (ign.ignited())
// Calculate turbulent flame speed flux
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
surfaceScalarField phiSt = fvc::interpolate(rhou*StCorr*Su*Xi)*nf;
surfaceScalarField phiSt(fvc::interpolate(rhou*StCorr*Su*Xi)*nf);
scalar StCoNum = max
(
@ -71,16 +71,20 @@ if (ign.ignited())
// Calculate coefficients for Gulder's flame speed correlation
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
volScalarField up = uPrimeCoef*sqrt((2.0/3.0)*turbulence->k());
//volScalarField up = sqrt(mag(diag(n * n) & diag(turbulence->r())));
volScalarField up(uPrimeCoef*sqrt((2.0/3.0)*turbulence->k()));
//volScalarField up(sqrt(mag(diag(n * n) & diag(turbulence->r()))));
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
(
sqrt(epsilon*tauEta) + dimensionedScalar("1e-8", up.dimensions(), 1e-8)
up
/ (
sqrt(epsilon*tauEta)
+ dimensionedScalar("1e-8", up.dimensions(), 1e-8)
)
);
//volScalarField l = 0.337*k*sqrt(k)/epsilon;
@ -88,34 +92,38 @@ if (ign.ignited())
// Calculate Xi flux
// ~~~~~~~~~~~~~~~~~
surfaceScalarField phiXi =
surfaceScalarField phiXi
(
phiSt
- fvc::interpolate(fvc::laplacian(turbulence->alphaEff(), b)/mgb)*nf
+ fvc::interpolate(rho)*fvc::interpolate(Su*(1.0/Xi - Xi))*nf;
+ fvc::interpolate(rho)*fvc::interpolate(Su*(1.0/Xi - Xi))*nf
);
// Calculate mean and turbulent strain rates
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
volVectorField Ut = U + Su*Xi*n;
volScalarField sigmat = (n & n)*fvc::div(Ut) - (n & fvc::grad(Ut) & n);
volVectorField Ut(U + Su*Xi*n);
volScalarField sigmat((n & n)*fvc::div(Ut) - (n & fvc::grad(Ut) & n));
volScalarField sigmas =
volScalarField sigmas
(
((n & n)*fvc::div(U) - (n & fvc::grad(U) & n))/Xi
+ (
(n & n)*fvc::div(Su*n)
- (n & fvc::grad(Su*n) & n)
)*(Xi + scalar(1))/(2*Xi);
)*(Xi + scalar(1))/(2*Xi)
);
// Calculate the unstrained laminar flame speed
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
volScalarField Su0 = unstrainedLaminarFlameSpeed()();
volScalarField Su0(unstrainedLaminarFlameSpeed()());
// Calculate the laminar flame speed in equilibrium with the applied strain
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
volScalarField SuInf = Su0*max(scalar(1) - sigmas/sigmaExt, scalar(0.01));
volScalarField SuInf(Su0*max(scalar(1) - sigmas/sigmaExt, scalar(0.01)));
if (SuModel == "unstrained")
{
@ -130,9 +138,11 @@ if (ign.ignited())
// Solve for the strained laminar flame speed
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
volScalarField Rc =
volScalarField Rc
(
(sigmas*SuInf*(Su0 - SuInf) + sqr(SuMin)*sigmaExt)
/(sqr(Su0 - SuInf) + sqr(SuMin));
/(sqr(Su0 - SuInf) + sqr(SuMin))
);
fvScalarMatrix SuEqn
(
@ -183,17 +193,21 @@ if (ign.ignited())
// with a linear correction function to give a plausible profile for Xi
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
volScalarField XiEqStar =
scalar(1.001) + XiCoef*sqrt(up/(Su + SuMin))*Reta;
volScalarField XiEqStar
(
scalar(1.001) + XiCoef*sqrt(up/(Su + SuMin))*Reta
);
volScalarField XiEq =
volScalarField XiEq
(
scalar(1.001)
+ (scalar(1) + (2*XiShapeCoef)*(scalar(0.5) - b))
*(XiEqStar - scalar(1.001));
*(XiEqStar - scalar(1.001))
);
volScalarField Gstar = 0.28/tauEta;
volScalarField R = Gstar*XiEqStar/(XiEqStar - scalar(1));
volScalarField G = R*(XiEq - scalar(1.001))/XiEq;
volScalarField Gstar(0.28/tauEta);
volScalarField R(Gstar*XiEqStar/(XiEqStar - scalar(1)));
volScalarField G(R*(XiEq - scalar(1.001))/XiEq);
//R *= (Gstar + 2*mag(dev(symm(fvc::grad(U)))))/Gstar;

View File

@ -61,8 +61,10 @@
);
Info<< "Creating field DpDt\n" << endl;
volScalarField DpDt =
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
volScalarField DpDt
(
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p)
);
Info<< "Creating field Xi\n" << endl;

View File

@ -1,6 +1,6 @@
rho = thermo.rho();
volScalarField rAU = 1.0/UEqn.A();
volScalarField rAU(1.0/UEqn.A());
U = rAU*UEqn.H();
if (transonic)

View File

@ -55,5 +55,7 @@
);
Info<< "Creating field DpDt\n" << endl;
volScalarField DpDt =
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
volScalarField DpDt
(
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p)
);

View File

@ -12,7 +12,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection
{
label inertIndex = -1;
volScalarField Yt = 0.0*Y[0];
volScalarField Yt(0.0*Y[0]);
forAll(Y, i)
{

View File

@ -82,8 +82,10 @@ autoPtr<compressible::turbulenceModel> turbulence
);
Info<< "Creating field DpDt\n" << endl;
volScalarField DpDt =
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
volScalarField DpDt
(
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p)
);
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;

View File

@ -94,11 +94,13 @@ int main(int argc, char *argv[])
// turbulent time scale
{
volScalarField tk =
Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon());
volScalarField tc = chemistry.tc();
volScalarField tk
(
Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon())
);
volScalarField tc(chemistry.tc());
//Chalmers PaSR model
// Chalmers PaSR model
kappa = (runTime.deltaT() + tc)/(runTime.deltaT() + tc + tk);
}

View File

@ -1,6 +1,6 @@
rho = thermo.rho();
volScalarField A = UEqn.A();
volScalarField A(UEqn.A());
U = UEqn.H()/A;
if (transonic)

View File

@ -85,9 +85,11 @@ int main(int argc, char *argv[])
// turbulent time scale
{
volScalarField tk =
Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon());
volScalarField tc = chemistry.tc();
volScalarField tk
(
Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon())
);
volScalarField tc(chemistry.tc());
// Chalmers PaSR model
kappa = (runTime.deltaT() + tc)/(runTime.deltaT()+tc+tk);

View File

@ -1,6 +1,6 @@
rho = thermo.rho();
volScalarField rAU = 1.0/UEqn.A();
volScalarField rAU(1.0/UEqn.A());
U = rAU*UEqn.H();
if (transonic)

View File

@ -1,6 +1,6 @@
rho = thermo.rho();
volScalarField rAU = 1.0/UEqn.A();
volScalarField rAU(1.0/UEqn.A());
U = rAU*UEqn.H();
if (transonic)

View File

@ -32,7 +32,7 @@ namespace Foam
{
defineTypeNameAndDebug(combustionModel, 0);
defineRunTimeSelectionTable(combustionModel, dictionary);
};
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -78,8 +78,8 @@ Foam::combustionModel::combustionModel::R(volScalarField& fu) const
{
const basicMultiComponentMixture& composition = thermo_.composition();
const volScalarField& ft = composition.Y("ft");
volScalarField fres = composition.fres(ft, stoicRatio_.value());
volScalarField wFuelNorm = this->wFuelNorm()*pos(fu - fres);
volScalarField fres(composition.fres(ft, stoicRatio_.value()));
volScalarField wFuelNorm(this->wFuelNorm()*pos(fu - fres));
return wFuelNorm*fres - fvm::Sp(wFuelNorm, fu);
}

View File

@ -123,8 +123,10 @@ volScalarField dQ
Info<< "Creating field DpDt\n" << endl;
volScalarField DpDt =
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
volScalarField DpDt
(
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p)
);
dimensionedScalar initialMass = fvc::domainIntegrate(rho);

View File

@ -1,7 +1,7 @@
{
// Solve fuel equation
// ~~~~~~~~~~~~~~~~~~~
fvScalarMatrix R = combustion->R(fu);
fvScalarMatrix R(combustion->R(fu));
{
fvScalarMatrix fuEqn

View File

@ -1,6 +1,6 @@
rho = thermo.rho();
volScalarField rAU = 1.0/UEqn.A();
volScalarField rAU(1.0/UEqn.A());
surfaceScalarField rhorAUf("(rho*(1|A(U)))", fvc::interpolate(rho*rAU));
U = rAU*UEqn.H();
@ -17,7 +17,7 @@ phi = phiU - rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf();
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
surfaceScalarField rhorAUf = fvc::interpolate(rho*rAU);
surfaceScalarField rhorAUf(fvc::interpolate(rho*rAU));
fvScalarMatrix p_rghEqn
(

View File

@ -11,7 +11,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection
{
label inertIndex = -1;
volScalarField Yt = 0.0*Y[0];
volScalarField Yt(0.0*Y[0]);
forAll(Y, i)
{

View File

@ -10,9 +10,14 @@
// turbulent time scale
if (turbulentReaction)
{
volScalarField tk =
Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon());
volScalarField tc = chemistry.tc();
volScalarField tk
(
Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon())
);
volScalarField tc
(
chemistry.tc()
);
// Chalmers PaSR model
kappa = (runTime.deltaT() + tc)/(runTime.deltaT() + tc + tk);

View File

@ -72,8 +72,10 @@ autoPtr<compressible::turbulenceModel> turbulence
);
Info<< "Creating field DpDt\n" << endl;
volScalarField DpDt =
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
volScalarField DpDt
(
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p)
);
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;

View File

@ -1,6 +1,6 @@
rho = thermo.rho();
volScalarField rAU = 1.0/UEqn.A();
volScalarField rAU(1.0/UEqn.A());
U = rAU*UEqn.H();
if (transonic)

View File

@ -11,7 +11,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection
{
label inertIndex = -1;
volScalarField Yt = 0.0*Y[0];
volScalarField Yt(0.0*Y[0]);
forAll(Y, i)
{

View File

@ -10,9 +10,11 @@
// turbulent time scale
if (turbulentReaction)
{
volScalarField tk =
Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon());
volScalarField tc = chemistry.tc();
volScalarField tk
(
Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon())
);
volScalarField tc(chemistry.tc());
// Chalmers PaSR model
kappa = (runTime.deltaT() + tc)/(runTime.deltaT() + tc + tk);

View File

@ -73,8 +73,10 @@ autoPtr<compressible::turbulenceModel> turbulence
);
Info<< "Creating field DpDt\n" << endl;
volScalarField DpDt =
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
volScalarField DpDt
(
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p)
);
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;

View File

@ -5,14 +5,16 @@
// pressure solution - done in 2 parts. Part 1:
thermo.rho() -= psi*p;
volScalarField rAU = 1.0/UEqn.A();
volScalarField rAU(1.0/UEqn.A());
U = rAU*UEqn.H();
if (transonic)
{
surfaceScalarField phiv =
surfaceScalarField phiv
(
(fvc::interpolate(U) & mesh.Sf())
+ fvc::ddtPhiCorr(rAU, rho, U, phi);
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
);
phi = fvc::interpolate(rho)*phiv;