31 #include "addToRunTimeSelectionTable.H"
53 const dictionary& dict
56 QGDCoeffs(io, mesh, dict)
59 if (dict.found(
"PrQGD"))
61 dict.lookup(
"PrQGD") >> PrQGD;
63 PrQGD_.primitiveFieldRef() = PrQGD;
64 PrQGD_.boundaryFieldRef() = PrQGD;
69 mesh.time().timeName(),
71 IOobject::READ_IF_PRESENT,
75 if (ScHeader.typeHeaderOk<volScalarField>())
78 ScQGD_.writeOpt() = IOobject::AUTO_WRITE;
83 if (dict.found(
"ScQGD"))
85 dict.lookup(
"ScQGD") >> ScQGD;
87 ScQGD_.primitiveFieldRef() = ScQGD;
88 ScQGD_.boundaryFieldRef() = ScQGD;
100 const volScalarField& cSound = qgdThermo.
c();
101 const volScalarField&
p = qgdThermo.
p();
102 if (!p.mesh().thisDb().foundObject<volVectorField>(
"U"))
104 this->tauQGDf_= linearInterpolate(this->aQGD_) * hQGDf_ /linearInterpolate(cSound);
105 this->tauQGD_ = this->aQGD_ * this->hQGD_ / cSound;
109 const surfaceScalarField magUn
115 p.mesh().thisDb().lookupObject<volVectorField>(
"U")
116 ) & (p.mesh().Sf()/p.mesh().magSf())
119 const volScalarField magU
123 p.mesh().thisDb().lookupObject<volVectorField>(
"U")
126 this->tauQGD_ = this->aQGD_ * this->hQGD_ / (magU + cSound);
128 this->tauQGDf_= linearInterpolate(this->tauQGD_);
131 forAll(p.primitiveField(), celli)
133 muQGD_.primitiveFieldRef()[celli] =
134 p.primitiveField()[celli] *
135 ScQGD_.primitiveField()[celli] *
136 tauQGD_.primitiveField()[celli];
138 alphauQGD_.primitiveFieldRef()[celli] = muQGD_.primitiveField()[celli] /
139 PrQGD_.primitiveField()[celli];
142 forAll(p.boundaryField(), patchi)
144 forAll(p.boundaryField()[patchi], facei)
146 muQGD_.boundaryFieldRef()[patchi][facei] =
147 p.boundaryField()[patchi][facei] *
148 ScQGD_.boundaryField()[patchi][facei] *
149 tauQGD_.boundaryField()[patchi][facei];
151 alphauQGD_.boundaryFieldRef()[patchi][facei] =
152 muQGD_.boundaryFieldRef()[patchi][facei] /
153 PrQGD_.boundaryField()[patchi][facei];
virtual const volScalarField & c() const =0
constScPrModel1n(const IOobject &io, const fvMesh &mesh, const dictionary &dict)
Abstract base class for classes implementing thermophysical properties of gases and fluids governed b...
void correct(const QGDThermo &)
virtual const volScalarField & p() const =0
addToRunTimeSelectionTable(QGDCoeffs, constScPrModel1, dictionary)
defineTypeNameAndDebug(constScPrModel1, 0)