From 53cf9e2182aeeab456cf2f8591f6fa44b8cfc1db Mon Sep 17 00:00:00 2001 From: Andrew Heather <> Date: Mon, 24 Jun 2019 12:11:53 +0100 Subject: [PATCH] STYLE: pressure FO - provided feedback re: which calculation mode is applied --- src/functionObjects/field/pressure/pressure.C | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/functionObjects/field/pressure/pressure.C b/src/functionObjects/field/pressure/pressure.C index e13bcd6b41..e923c83975 100644 --- a/src/functionObjects/field/pressure/pressure.C +++ b/src/functionObjects/field/pressure/pressure.C @@ -157,8 +157,10 @@ Foam::tmp Foam::functionObjects::pressure::calcPressure } case ISENTROPIC: { +DebugVar("getting thermo"); const basicThermo* thermoPtr = p.mesh().lookupObjectPtr(basicThermo::dictName); +DebugVar("got thermo"); if (!thermoPtr) { @@ -167,14 +169,16 @@ Foam::tmp Foam::functionObjects::pressure::calcPressure << "thermodynamics package" << exit(FatalError); } +DebugVar("calc gamma"); const volScalarField gamma(thermoPtr->gamma()); - +DebugVar(gamma); const volScalarField Mb ( mag(lookupObject(UName_)) /sqrt(gamma*tp.ref()/thermoPtr->rho()) ); +DebugVar(Mb); return tp()*(pow(1 + (gamma - 1)/2*sqr(Mb), gamma/(gamma - 1))); } @@ -270,6 +274,8 @@ Foam::functionObjects::pressure::pressure bool Foam::functionObjects::pressure::read(const dictionary& dict) { + Info<< type() << " " << name() << ":" << nl; + fieldExpression::read(dict); UName_ = dict.lookupOrDefault("U", "U"); @@ -306,6 +312,8 @@ bool Foam::functionObjects::pressure::read(const dictionary& dict) } } + Info<< " operating mode: " << modeNames[mode_] << nl; + pRef_ = dict.lookupOrDefault("pRef", 0); if (mode_ & COEFF) @@ -330,6 +338,8 @@ bool Foam::functionObjects::pressure::read(const dictionary& dict) resultName_ = dict.lookupOrDefault("result", resultName()); + Info<< endl; + return true; }