mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Further update to pressure tools function object
This commit is contained in:
@ -154,14 +154,15 @@ Foam::tmp<Foam::volScalarField> Foam::pressureTools::pDyn
|
|||||||
|
|
||||||
Foam::tmp<Foam::volScalarField> Foam::pressureTools::convertToCoeff
|
Foam::tmp<Foam::volScalarField> Foam::pressureTools::convertToCoeff
|
||||||
(
|
(
|
||||||
const volScalarField& p
|
const volScalarField& pCalculated,
|
||||||
|
const volScalarField& pIn
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
tmp<volScalarField> tCoeff(p);
|
tmp<volScalarField> tCoeff(pCalculated);
|
||||||
|
|
||||||
if (calcCoeff_)
|
if (calcCoeff_)
|
||||||
{
|
{
|
||||||
tCoeff() /= pDyn(p);
|
tCoeff() /= pDyn(pIn) + dimensionedScalar("p0", dimPressure, SMALL);
|
||||||
}
|
}
|
||||||
|
|
||||||
return tCoeff;
|
return tCoeff;
|
||||||
@ -271,7 +272,7 @@ void Foam::pressureTools::write()
|
|||||||
obr_,
|
obr_,
|
||||||
IOobject::NO_READ
|
IOobject::NO_READ
|
||||||
),
|
),
|
||||||
convertToCoeff(rhoScale(p)*p + pDyn(p) + pRef())
|
convertToCoeff(rhoScale(p)*p + pDyn(p) + pRef(), p)
|
||||||
);
|
);
|
||||||
|
|
||||||
pResult.write();
|
pResult.write();
|
||||||
|
|||||||
@ -153,7 +153,11 @@ class pressureTools
|
|||||||
tmp<volScalarField> pDyn(const volScalarField& p) const;
|
tmp<volScalarField> pDyn(const volScalarField& p) const;
|
||||||
|
|
||||||
//- Convert to coeff data by applying the pDyn scaling
|
//- Convert to coeff data by applying the pDyn scaling
|
||||||
tmp<volScalarField> convertToCoeff(const volScalarField& p) const;
|
tmp<volScalarField> convertToCoeff
|
||||||
|
(
|
||||||
|
const volScalarField& pCalculated,
|
||||||
|
const volScalarField& pIn
|
||||||
|
) const;
|
||||||
|
|
||||||
//- Disallow default bitwise copy construct
|
//- Disallow default bitwise copy construct
|
||||||
pressureTools(const pressureTools&);
|
pressureTools(const pressureTools&);
|
||||||
|
|||||||
Reference in New Issue
Block a user