From cd2e69923e83232de9ffcc691a636cbff6b965b2 Mon Sep 17 00:00:00 2001 From: sergio Date: Mon, 13 Dec 2021 14:59:47 -0800 Subject: [PATCH] STY: Function names and arguments order --- .../twoPhaseMixtureThermo/twoPhaseMixtureThermo.H | 6 +++--- .../multiphaseMixtureThermo.H | 6 +++--- .../twoPhaseMixtureEThermo.H | 6 +++--- .../phasesSystem/phaseSystem/phaseSystem.C | 14 +------------- .../phasesSystem/phaseSystem/phaseSystem.H | 12 ++++++++---- .../wallBoilingSubModels/CHFModels/Zuber/Zuber.C | 4 ++-- .../CHFSubCoolModels/HuaXu/HuaXu.C | 4 ++-- .../CHFSubCoolModels/Tatsumoto/Tatsumoto.C | 6 +++--- .../MHFModels/Jeschar/Jeschar.C | 9 ++++++--- .../BreenWestwater/BreenWestwater.C | 6 +++--- .../filmBoilingModels/Bromley/Bromley.C | 9 ++++----- .../nucleateFluxModels/Kutadeladze/Kutadeladze.C | 9 ++++----- .../basic/basicThermo/basicThermo.H | 10 +++++----- src/thermophysicalModels/basic/heThermo/heThermo.C | 6 +++--- src/thermophysicalModels/basic/heThermo/heThermo.H | 6 +++--- 15 files changed, 53 insertions(+), 60 deletions(-) diff --git a/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/twoPhaseMixtureThermo.H b/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/twoPhaseMixtureThermo.H index 5c45642814..c712e5a47f 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/twoPhaseMixtureThermo.H +++ b/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/twoPhaseMixtureThermo.H @@ -205,10 +205,10 @@ public: ) const; //- Heat capacity using pressure and temperature - virtual tmp CpThermo + virtual tmp Cp ( - const scalarField& T, const scalarField& p, + const scalarField& T, const labelList& cells ) const { @@ -230,8 +230,8 @@ public: //- Density from pressure and temperature virtual tmp rhoEoS ( - const scalarField& T, const scalarField& p, + const scalarField& T, const labelList& cells ) const { diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.H b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.H index 2882b64c3d..472bd285aa 100644 --- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.H +++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.H @@ -319,10 +319,10 @@ public: ) const; //- Heat capacity using pressure and temperature - virtual tmp CpThermo + virtual tmp Cp ( - const scalarField& T, const scalarField& p, + const scalarField& T, const labelList& cells ) const { @@ -344,8 +344,8 @@ public: //- Density from pressure and temperature virtual tmp rhoEoS ( - const scalarField& T, const scalarField& p, + const scalarField& T, const labelList& cells ) const { diff --git a/applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/twoPhaseMixtureEThermo/twoPhaseMixtureEThermo.H b/applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/twoPhaseMixtureEThermo/twoPhaseMixtureEThermo.H index b962e19e64..cedad45329 100644 --- a/applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/twoPhaseMixtureEThermo/twoPhaseMixtureEThermo.H +++ b/applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/twoPhaseMixtureEThermo/twoPhaseMixtureEThermo.H @@ -174,10 +174,10 @@ public: ) const; //- Heat capacity using pressure and temperature - virtual tmp CpThermo + virtual tmp Cp ( - const scalarField& T, const scalarField& p, + const scalarField& T, const labelList& cells ) const { @@ -199,8 +199,8 @@ public: //- Density from pressure and temperature virtual tmp rhoEoS ( - const scalarField& T, const scalarField& p, + const scalarField& T, const labelList& cells ) const { diff --git a/src/phaseSystemModels/multiphaseInter/phasesSystem/phaseSystem/phaseSystem.C b/src/phaseSystemModels/multiphaseInter/phasesSystem/phaseSystem/phaseSystem.C index 830ae51381..a4d0230bdc 100644 --- a/src/phaseSystemModels/multiphaseInter/phasesSystem/phaseSystem/phaseSystem.C +++ b/src/phaseSystemModels/multiphaseInter/phasesSystem/phaseSystem/phaseSystem.C @@ -455,18 +455,6 @@ Foam::tmp Foam::phaseSystem::Cp } -Foam::tmp Foam::phaseSystem::CpThermo -( - const scalarField& T, - const scalarField& p, - const labelList& cells -) const -{ - NotImplemented; - return nullptr; -} - - Foam::tmp Foam::phaseSystem::Cv() const { auto iter = phaseModels_.cbegin(); @@ -510,8 +498,8 @@ Foam::tmp Foam::phaseSystem::Cv Foam::tmp Foam::phaseSystem::rhoEoS ( - const scalarField& T, const scalarField& p, + const scalarField& T, const labelList& cells ) const { diff --git a/src/phaseSystemModels/multiphaseInter/phasesSystem/phaseSystem/phaseSystem.H b/src/phaseSystemModels/multiphaseInter/phasesSystem/phaseSystem/phaseSystem.H index 45af20a88d..c6a30787cb 100644 --- a/src/phaseSystemModels/multiphaseInter/phasesSystem/phaseSystem/phaseSystem.H +++ b/src/phaseSystemModels/multiphaseInter/phasesSystem/phaseSystem/phaseSystem.H @@ -352,12 +352,16 @@ public: ) const; //- Heat capacity using pressure and temperature - virtual tmp CpThermo + virtual tmp Cp ( - const scalarField& T, const scalarField& p, + const scalarField& T, const labelList& cells - ) const; + ) const + { + NotImplemented; + return tmp::New(p); + } //- Return Cv of the mixture virtual tmp Cv() const; @@ -373,8 +377,8 @@ public: //- Density from pressure and temperature virtual tmp rhoEoS ( - const scalarField& T, const scalarField& p, + const scalarField& T, const labelList& cells ) const; diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/CHFModels/Zuber/Zuber.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/CHFModels/Zuber/Zuber.C index 26d2dacb3a..78740a8ec5 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/CHFModels/Zuber/Zuber.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/CHFModels/Zuber/Zuber.C @@ -83,10 +83,10 @@ Foam::wallBoilingModels::CHFModels::Zuber::CHF const scalarField& pw = liquid.thermo().p().boundaryField()[patchi]; - tmp trhoVapor = vapor.thermo().rhoEoS(Tsatw, pw, cells); + tmp trhoVapor = vapor.thermo().rhoEoS(pw ,Tsatw, cells); const scalarField& rhoVapor = trhoVapor.ref(); - tmp trhoLiq = liquid.thermo().rhoEoS(Tsatw, pw, cells); + tmp trhoLiq = liquid.thermo().rhoEoS(pw, Tsatw, cells); const scalarField& rhoLiq = trhoLiq.ref(); const phasePairKey pair(liquid.name(), vapor.name()); const scalarField sigma diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/CHFSubCoolModels/HuaXu/HuaXu.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/CHFSubCoolModels/HuaXu/HuaXu.C index 3284a5d4a9..2e6448ccda 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/CHFSubCoolModels/HuaXu/HuaXu.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/CHFSubCoolModels/HuaXu/HuaXu.C @@ -85,10 +85,10 @@ Foam::wallBoilingModels::CHFModels::HuaXu::CHFSubCool const scalarField& pw = liquid.thermo().p().boundaryField()[patchi]; - tmp trhoVapor = vapor.thermo().rhoEoS(Tsatw, pw, cells); + tmp trhoVapor = vapor.thermo().rhoEoS(pw, Tsatw, cells); const scalarField& rhoVapor = trhoVapor.ref(); - tmp trhoLiq = liquid.thermo().rhoEoS(Tsatw, pw, cells); + tmp trhoLiq = liquid.thermo().rhoEoS(pw, Tsatw, cells); const scalarField& rhoLiq = trhoLiq.ref(); diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/CHFSubCoolModels/Tatsumoto/Tatsumoto.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/CHFSubCoolModels/Tatsumoto/Tatsumoto.C index f1d6565f6a..d516e27152 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/CHFSubCoolModels/Tatsumoto/Tatsumoto.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/CHFSubCoolModels/Tatsumoto/Tatsumoto.C @@ -78,13 +78,13 @@ Foam::wallBoilingModels::CHFModels::Tatsumoto::CHFSubCool const labelUList& cells = liquid.mesh().boundary()[patchi].faceCells(); const scalarField& pw = liquid.thermo().p().boundaryField()[patchi]; - tmp trhoVapor = vapor.thermo().rhoEoS(Tsatw, pw, cells); + tmp trhoVapor = vapor.thermo().rhoEoS(pw, Tsatw, cells); const scalarField& rhoVapor = trhoVapor.ref(); - tmp trhoLiq = liquid.thermo().rhoEoS(Tsatw, pw, cells); + tmp trhoLiq = liquid.thermo().rhoEoS(pw, Tsatw, cells); const scalarField& rhoLiq = trhoLiq.ref(); - tmp tCp = liquid.thermo().CpThermo(Tsatw, pw, cells); + tmp tCp = liquid.thermo().Cp(pw, Tsatw, cells); const scalarField& Cp = tCp(); return diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/MHFModels/Jeschar/Jeschar.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/MHFModels/Jeschar/Jeschar.C index 61419a6ef9..e0c929f6dd 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/MHFModels/Jeschar/Jeschar.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/MHFModels/Jeschar/Jeschar.C @@ -83,10 +83,10 @@ Foam::wallBoilingModels::CHFModels::Jeschar::MHF const scalarField& pw = liquid.thermo().p().boundaryField()[patchi]; - tmp trhoVapor = vapor.thermo().rhoEoS(Tsatw, pw, cells); + tmp trhoVapor = vapor.thermo().rhoEoS(pw, Tsatw, cells); const scalarField& rhoVapor = trhoVapor.ref(); - tmp trhoLiq = liquid.thermo().rhoEoS(Tsatw, pw, cells); + tmp trhoLiq = liquid.thermo().rhoEoS(pw, Tsatw, cells); const scalarField& rhoLiq = trhoLiq.ref(); const phasePairKey pair(liquid.name(), vapor.name()); @@ -99,7 +99,10 @@ Foam::wallBoilingModels::CHFModels::Jeschar::MHF Kmhf_*rhoVapor*L *( pow(sigma/(mag(g.value())*(rhoLiq - rhoVapor)), 0.25) - * sqrt(mag(g.value())*(rhoLiq - rhoVapor)/(rhoLiq + rhoVapor + VSMALL)) + * sqrt + ( + mag(g.value())*(rhoLiq - rhoVapor)/(rhoLiq + rhoVapor + VSMALL) + ) ); } diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/filmBoilingModels/BreenWestwater/BreenWestwater.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/filmBoilingModels/BreenWestwater/BreenWestwater.C index 3f44030d60..c916bdc05c 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/filmBoilingModels/BreenWestwater/BreenWestwater.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/filmBoilingModels/BreenWestwater/BreenWestwater.C @@ -84,16 +84,16 @@ Foam::wallBoilingModels::filmBoilingModels::BreenWestwater::htcFilmBoil const labelUList& cells = liquid.mesh().boundary()[patchi].faceCells(); const scalarField& pw = liquid.thermo().p().boundaryField()[patchi]; - tmp trhoVapor = vapor.thermo().rhoEoS(Tsatw, pw, cells); + tmp trhoVapor = vapor.thermo().rhoEoS(pw, Tsatw, cells); const scalarField& rhoVapor = trhoVapor.ref(); - tmp trhoLiq = liquid.thermo().rhoEoS(Tsatw, pw, cells); + tmp trhoLiq = liquid.thermo().rhoEoS(pw, Tsatw, cells); const scalarField& rhoLiq = trhoLiq.ref(); const scalarField kappaLiquid(liquid.kappa(patchi)); - tmp tCp = vapor.thermo().CpThermo(Tsatw, pw, cells); + tmp tCp = vapor.thermo().Cp(pw, Tsatw, cells); const scalarField& CpVapor = tCp(); const scalarField nuLiquid(liquid.nu(patchi)); diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/filmBoilingModels/Bromley/Bromley.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/filmBoilingModels/Bromley/Bromley.C index 5a929a980b..ca421a779e 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/filmBoilingModels/Bromley/Bromley.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/filmBoilingModels/Bromley/Bromley.C @@ -88,18 +88,17 @@ Foam::wallBoilingModels::filmBoilingModels::Bromley::htcFilmBoil const scalarField& pw = liquid.thermo().p().boundaryField()[patchi]; - tmp trhoVapor = vapor.thermo().rhoEoS(Tsatw, pw, cells); + tmp trhoVapor = vapor.thermo().rhoEoS(pw, Tsatw, cells); const scalarField& rhoVapor = trhoVapor.ref(); - tmp trhoLiq = liquid.thermo().rhoEoS(Tsatw, pw, cells); + tmp trhoLiq = liquid.thermo().rhoEoS(pw, Tsatw, cells); const scalarField& rhoLiq = trhoLiq.ref(); const scalarField kappaVapor(vapor.kappa(patchi)); - tmp tCp = vapor.thermo().Cp(); - const volScalarField& Cp = tCp(); - const scalarField& CpVapor = Cp.boundaryField()[patchi]; + tmp tCp = vapor.thermo().Cp(pw, Tsatw, cells); + const scalarField& CpVapor = tCp(); const scalarField muVapor(vapor.mu(patchi)); diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/nucleateFluxModels/Kutadeladze/Kutadeladze.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/nucleateFluxModels/Kutadeladze/Kutadeladze.C index 2b0f4edfa7..f30f59a0e7 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/nucleateFluxModels/Kutadeladze/Kutadeladze.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/nucleateFluxModels/Kutadeladze/Kutadeladze.C @@ -83,10 +83,10 @@ Foam::wallBoilingModels::nucleateFluxModels::Kutadeladze::qNucleate const labelUList& cells = liquid.mesh().boundary()[patchi].faceCells(); - tmp trhoVapor = vapor.thermo().rhoEoS(Tsatw, pb, cells); + tmp trhoVapor = vapor.thermo().rhoEoS(pb, Tsatw, cells); const scalarField& rhoVapor = trhoVapor.ref(); - tmp trhoLiq = liquid.thermo().rhoEoS(Tsatw, pb, cells); + tmp trhoLiq = liquid.thermo().rhoEoS(pb, Tsatw, cells); const scalarField& rhoLiq = trhoLiq.ref(); const phasePairKey pair(liquid.name(), vapor.name()); @@ -100,9 +100,8 @@ Foam::wallBoilingModels::nucleateFluxModels::Kutadeladze::qNucleate const scalarField kappaLiquid(liquid.kappa(patchi)); - tmp tCpliq = liquid.thermo().Cp(); - const volScalarField& Cpliq = tCpliq(); - const scalarField& Cpliquid = Cpliq.boundaryField()[patchi]; + tmp tCpliq = liquid.thermo().Cp(pb, Tsatw, cells); + const scalarField& Cpliquid = tCpliq(); const scalarField muLiquid(liquid.mu(patchi)); diff --git a/src/thermophysicalModels/basic/basicThermo/basicThermo.H b/src/thermophysicalModels/basic/basicThermo/basicThermo.H index 1776cb901c..54dc0061d0 100644 --- a/src/thermophysicalModels/basic/basicThermo/basicThermo.H +++ b/src/thermophysicalModels/basic/basicThermo/basicThermo.H @@ -443,11 +443,11 @@ public: const label patchi ) const = 0; - //- Heat capacity using pressure and temperature - virtual tmp CpThermo + //- Heat capacity using pressure and temperature [J/kg/K] + virtual tmp Cp ( - const scalarField& T, const scalarField& p, + const scalarField& T, const labelList& cells ) const = 0; @@ -462,11 +462,11 @@ public: const label patchi ) const = 0; - //- Density from pressure and temperature + //- Density from pressure and temperature from EoS virtual tmp rhoEoS ( - const scalarField& T, const scalarField& p, + const scalarField& T, const labelList& cells ) const = 0; diff --git a/src/thermophysicalModels/basic/heThermo/heThermo.C b/src/thermophysicalModels/basic/heThermo/heThermo.C index c4287668d6..b880caa00c 100644 --- a/src/thermophysicalModels/basic/heThermo/heThermo.C +++ b/src/thermophysicalModels/basic/heThermo/heThermo.C @@ -378,10 +378,10 @@ Foam::tmp Foam::heThermo::Cp template Foam::tmp -Foam::heThermo::CpThermo +Foam::heThermo::Cp ( - const scalarField& T, const scalarField& p, + const scalarField& T, const labelList& cells ) const { @@ -475,8 +475,8 @@ template Foam::tmp Foam::heThermo::rhoEoS ( - const scalarField& T, const scalarField& p, + const scalarField& T, const labelList& cells ) const { diff --git a/src/thermophysicalModels/basic/heThermo/heThermo.H b/src/thermophysicalModels/basic/heThermo/heThermo.H index 54cfc36b11..a52b17fd92 100644 --- a/src/thermophysicalModels/basic/heThermo/heThermo.H +++ b/src/thermophysicalModels/basic/heThermo/heThermo.H @@ -229,10 +229,10 @@ public: ) const; //- Heat capacity using pressure and temperature - virtual tmp CpThermo + virtual tmp Cp ( - const scalarField& T, const scalarField& p, + const scalarField& T, const labelList& cells ) const; @@ -250,8 +250,8 @@ public: //- Density from pressure and temperature virtual tmp rhoEoS ( - const scalarField& T, const scalarField& p, + const scalarField& T, const labelList& cells ) const;