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
|
||||
(
|
||||
const volScalarField& p
|
||||
const volScalarField& pCalculated,
|
||||
const volScalarField& pIn
|
||||
) const
|
||||
{
|
||||
tmp<volScalarField> tCoeff(p);
|
||||
tmp<volScalarField> tCoeff(pCalculated);
|
||||
|
||||
if (calcCoeff_)
|
||||
{
|
||||
tCoeff() /= pDyn(p);
|
||||
tCoeff() /= pDyn(pIn) + dimensionedScalar("p0", dimPressure, SMALL);
|
||||
}
|
||||
|
||||
return tCoeff;
|
||||
@ -271,7 +272,7 @@ void Foam::pressureTools::write()
|
||||
obr_,
|
||||
IOobject::NO_READ
|
||||
),
|
||||
convertToCoeff(rhoScale(p)*p + pDyn(p) + pRef())
|
||||
convertToCoeff(rhoScale(p)*p + pDyn(p) + pRef(), p)
|
||||
);
|
||||
|
||||
pResult.write();
|
||||
|
||||
@ -153,7 +153,11 @@ class pressureTools
|
||||
tmp<volScalarField> pDyn(const volScalarField& p) const;
|
||||
|
||||
//- 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
|
||||
pressureTools(const pressureTools&);
|
||||
|
||||
Reference in New Issue
Block a user