diff --git a/applications/modules/compressibleMultiphaseVoF/compressibleMultiphaseVoFMixture/compressibleVoFphase/compressibleVoFphase.C b/applications/modules/compressibleMultiphaseVoF/compressibleMultiphaseVoFMixture/compressibleVoFphase/compressibleVoFphase.C index 0d3cf2721b..87b34de719 100644 --- a/applications/modules/compressibleMultiphaseVoF/compressibleMultiphaseVoFMixture/compressibleVoFphase/compressibleVoFphase.C +++ b/applications/modules/compressibleMultiphaseVoF/compressibleMultiphaseVoFMixture/compressibleVoFphase/compressibleVoFphase.C @@ -66,7 +66,7 @@ Foam::compressibleVoFphase::compressibleVoFphase Tp.write(); } - thermo_ = rhoThermo::New(mesh, name); + thermo_ = rhoFluidThermo::New(mesh, name); thermo_->validate(name, "e"); } diff --git a/applications/modules/compressibleMultiphaseVoF/compressibleMultiphaseVoFMixture/compressibleVoFphase/compressibleVoFphase.H b/applications/modules/compressibleMultiphaseVoF/compressibleMultiphaseVoFMixture/compressibleVoFphase/compressibleVoFphase.H index bbc8fe982f..bcf22b5aa9 100644 --- a/applications/modules/compressibleMultiphaseVoF/compressibleMultiphaseVoFMixture/compressibleVoFphase/compressibleVoFphase.H +++ b/applications/modules/compressibleMultiphaseVoF/compressibleMultiphaseVoFMixture/compressibleVoFphase/compressibleVoFphase.H @@ -43,7 +43,7 @@ See also #define compressibleVoFphase_H #include "VoFphase.H" -#include "rhoThermo.H" +#include "rhoFluidThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -61,7 +61,7 @@ class compressibleVoFphase // Private Data //- Phase thermo - autoPtr thermo_; + autoPtr thermo_; //- Phase mass-fraction volScalarField Alpha_; @@ -115,14 +115,14 @@ public: // Member Functions - //- Return const-access to phase rhoThermo - const rhoThermo& thermo() const + //- Return const-access to phase rhoFluidThermo + const rhoFluidThermo& thermo() const { return thermo_(); } - //- Return access to phase rhoThermo - rhoThermo& thermo() + //- Return access to phase rhoFluidThermo + rhoFluidThermo& thermo() { return thermo_(); } diff --git a/applications/modules/compressibleMultiphaseVoF/pressureCorrector.C b/applications/modules/compressibleMultiphaseVoF/pressureCorrector.C index 5cbaccba86..1247a8815c 100644 --- a/applications/modules/compressibleMultiphaseVoF/pressureCorrector.C +++ b/applications/modules/compressibleMultiphaseVoF/pressureCorrector.C @@ -79,7 +79,7 @@ void Foam::solvers::compressibleMultiphaseVoF::pressureCorrector() forAll(phases, phasei) { const compressibleVoFphase& phase = phases[phasei]; - const rhoThermo& thermo = phase.thermo(); + const rhoFluidThermo& thermo = phase.thermo(); const volScalarField& rho = phases[phasei].thermo().rho(); p_rghEqnComps.set diff --git a/applications/modules/compressibleVoF/compressibleTwoPhaseVoFMixture/compressibleTwoPhaseVoFMixture.C b/applications/modules/compressibleVoF/compressibleTwoPhaseVoFMixture/compressibleTwoPhaseVoFMixture.C index 2b0198bddc..1b01d29094 100644 --- a/applications/modules/compressibleVoF/compressibleTwoPhaseVoFMixture/compressibleTwoPhaseVoFMixture.C +++ b/applications/modules/compressibleVoF/compressibleTwoPhaseVoFMixture/compressibleTwoPhaseVoFMixture.C @@ -143,8 +143,8 @@ Foam::compressibleTwoPhaseVoFMixture::compressibleTwoPhaseVoFMixture // Avoid any thread-writing problems. // fileHandler().flush(); - thermo1_ = rhoThermo::New(mesh, phase1Name()); - thermo2_ = rhoThermo::New(mesh, phase2Name()); + thermo1_ = rhoFluidThermo::New(mesh, phase1Name()); + thermo2_ = rhoFluidThermo::New(mesh, phase2Name()); // thermo1_->validate(phase1Name(), "e"); // thermo2_->validate(phase2Name(), "e"); diff --git a/applications/modules/compressibleVoF/compressibleTwoPhaseVoFMixture/compressibleTwoPhaseVoFMixture.H b/applications/modules/compressibleVoF/compressibleTwoPhaseVoFMixture/compressibleTwoPhaseVoFMixture.H index 84078cd0a0..2a3775a2e3 100644 --- a/applications/modules/compressibleVoF/compressibleTwoPhaseVoFMixture/compressibleTwoPhaseVoFMixture.H +++ b/applications/modules/compressibleVoF/compressibleTwoPhaseVoFMixture/compressibleTwoPhaseVoFMixture.H @@ -25,7 +25,7 @@ Class Foam::compressibleTwoPhaseVoFMixture Description - Class to represent a mixture of two rhoThermo-based phases + Class to represent a mixture of two rhoFluidThermo-based phases SourceFiles compressibleTwoPhaseVoFMixture.C @@ -37,7 +37,7 @@ SourceFiles #include "twoPhaseVoFMixture.H" #include "compressibleTwoPhases.H" -#include "rhoThermo.H" +#include "rhoFluidThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -67,10 +67,10 @@ class compressibleTwoPhaseVoFMixture volScalarField T_; //- Thermo-package of phase 1 - autoPtr thermo1_; + autoPtr thermo1_; //- Thermo-package of phase 2 - autoPtr thermo2_; + autoPtr thermo2_; //- Mixture density volScalarField rho_; @@ -126,25 +126,25 @@ public: } //- Return the thermo for phase 1 - const rhoThermo& thermo1() const + const rhoFluidThermo& thermo1() const { return thermo1_(); } //- Return the thermo for phase 2 - const rhoThermo& thermo2() const + const rhoFluidThermo& thermo2() const { return thermo2_(); } //- Return the thermo for phase 1 - rhoThermo& thermo1() + rhoFluidThermo& thermo1() { return thermo1_(); } //- Return the thermo for phase 2 - rhoThermo& thermo2() + rhoFluidThermo& thermo2() { return thermo2_(); } diff --git a/applications/modules/isothermalFilm/fvModels/filmVoFTransfer/VoFFilmTransfer.H b/applications/modules/isothermalFilm/fvModels/filmVoFTransfer/VoFFilmTransfer.H index 2d32385f23..d985161881 100644 --- a/applications/modules/isothermalFilm/fvModels/filmVoFTransfer/VoFFilmTransfer.H +++ b/applications/modules/isothermalFilm/fvModels/filmVoFTransfer/VoFFilmTransfer.H @@ -86,7 +86,7 @@ class VoFFilmTransfer word phaseName_; //- Reference to the transferred phase thermo - const rhoThermo& thermo_; + const rhoFluidThermo& thermo_; //- Reference to the transferred phase volume fraction const volScalarField& alpha_; diff --git a/applications/modules/isothermalFilm/isothermalFilm.C b/applications/modules/isothermalFilm/isothermalFilm.C index 03773fd0ae..27ad68ef0b 100644 --- a/applications/modules/isothermalFilm/isothermalFilm.C +++ b/applications/modules/isothermalFilm/isothermalFilm.C @@ -241,7 +241,7 @@ Foam::wordList Foam::solvers::isothermalFilm::alphaTypes() const Foam::solvers::isothermalFilm::isothermalFilm ( fvMesh& mesh, - autoPtr thermoPtr + autoPtr thermoPtr ) : solver(mesh), @@ -411,7 +411,7 @@ Foam::solvers::isothermalFilm::isothermalFilm Foam::solvers::isothermalFilm::isothermalFilm(fvMesh& mesh) : - isothermalFilm(mesh, rhoThermo::New(mesh)) + isothermalFilm(mesh, rhoFluidThermo::New(mesh)) {} diff --git a/applications/modules/isothermalFilm/isothermalFilm.H b/applications/modules/isothermalFilm/isothermalFilm.H index 30720e96d9..a79d9c24ea 100644 --- a/applications/modules/isothermalFilm/isothermalFilm.H +++ b/applications/modules/isothermalFilm/isothermalFilm.H @@ -46,7 +46,7 @@ See also #define isothermalFilm_H #include "solver.H" -#include "rhoThermo.H" +#include "rhoFluidThermo.H" #include "filmCompressibleMomentumTransportModel.H" #include "uniformDimensionedFields.H" @@ -93,10 +93,10 @@ protected: // Thermophysical properties //- Pointer to the fluid thermophysical properties - autoPtr thermoPtr_; + autoPtr thermoPtr_; //- Reference to the fluid thermophysical properties - rhoThermo& thermo_; + rhoFluidThermo& thermo_; //- The thermodynamic pressure field volScalarField& p; @@ -270,7 +270,7 @@ public: const volScalarField& alpha; //- Reference to the fluid thermophysical properties - const rhoThermo& thermo; + const rhoFluidThermo& thermo; //- Reference to the thermodynamic density field const volScalarField& rho; @@ -302,7 +302,7 @@ public: // Constructors //- Construct from region mesh and thermophysical properties - isothermalFilm(fvMesh& mesh, autoPtr); + isothermalFilm(fvMesh& mesh, autoPtr); //- Construct from region mesh isothermalFilm(fvMesh& mesh); diff --git a/applications/modules/multiphaseEuler/interfacialCompositionModels/interfaceCompositionModels/interfaceCompositionModel/interfaceCompositionModel.C b/applications/modules/multiphaseEuler/interfacialCompositionModels/interfaceCompositionModels/interfaceCompositionModel/interfaceCompositionModel.C index d35df1cdc6..bc7f86b9b5 100644 --- a/applications/modules/multiphaseEuler/interfacialCompositionModels/interfaceCompositionModels/interfaceCompositionModel/interfaceCompositionModel.C +++ b/applications/modules/multiphaseEuler/interfacialCompositionModels/interfaceCompositionModels/interfaceCompositionModel/interfaceCompositionModel.C @@ -26,7 +26,7 @@ License #include "interfaceCompositionModel.H" #include "phaseModel.H" #include "phaseSystem.H" -#include "rhoMulticomponentThermo.H" +#include "rhoFluidMulticomponentThermo.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -54,7 +54,7 @@ Foam::interfaceCompositionModel::interfaceCompositionModel Le_("Le", dimless, dict), thermo_ ( - refCast(interface_.phase().thermo()) + refCast(interface_.phase().thermo()) ), otherThermo_(interface_.otherPhase().thermo()) {} diff --git a/applications/modules/multiphaseEuler/interfacialCompositionModels/interfaceCompositionModels/interfaceCompositionModel/interfaceCompositionModel.H b/applications/modules/multiphaseEuler/interfacialCompositionModels/interfaceCompositionModels/interfaceCompositionModel/interfaceCompositionModel.H index c0e53f757e..656981c476 100644 --- a/applications/modules/multiphaseEuler/interfacialCompositionModels/interfaceCompositionModels/interfaceCompositionModel/interfaceCompositionModel.H +++ b/applications/modules/multiphaseEuler/interfacialCompositionModels/interfaceCompositionModels/interfaceCompositionModel/interfaceCompositionModel.H @@ -42,7 +42,7 @@ SourceFiles #include "volFields.H" #include "dictionary.H" #include "hashedWordList.H" -#include "rhoMulticomponentThermo.H" +#include "rhoFluidMulticomponentThermo.H" #include "runTimeSelectionTables.H" #include "sidedPhaseInterface.H" #include "SidedInterfacialModel.H" @@ -68,10 +68,10 @@ class interfaceCompositionModel const dimensionedScalar Le_; //- Multi-component thermo model for this side of the interface - const rhoMulticomponentThermo& thermo_; + const rhoFluidMulticomponentThermo& thermo_; //- General thermo model for the other side of the interface - const rhoThermo& otherThermo_; + const rhoFluidThermo& otherThermo_; public: @@ -130,13 +130,13 @@ public: inline const hashedWordList& species() const; //- Return the thermo - inline const rhoMulticomponentThermo& thermo() const; + inline const rhoFluidMulticomponentThermo& thermo() const; //- Return the other thermo - inline const rhoThermo& otherThermo() const; + inline const rhoFluidThermo& otherThermo() const; //- Return the other multicomponent thermo - inline const rhoMulticomponentThermo& + inline const rhoFluidMulticomponentThermo& otherMulticomponentThermo() const; diff --git a/applications/modules/multiphaseEuler/interfacialCompositionModels/interfaceCompositionModels/interfaceCompositionModel/interfaceCompositionModelI.H b/applications/modules/multiphaseEuler/interfacialCompositionModels/interfaceCompositionModels/interfaceCompositionModel/interfaceCompositionModelI.H index c329d1dabe..03fd9995e7 100644 --- a/applications/modules/multiphaseEuler/interfacialCompositionModels/interfaceCompositionModels/interfaceCompositionModel/interfaceCompositionModelI.H +++ b/applications/modules/multiphaseEuler/interfacialCompositionModels/interfaceCompositionModels/interfaceCompositionModel/interfaceCompositionModelI.H @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "interfaceCompositionModel.H" -#include "rhoMulticomponentThermo.H" +#include "rhoFluidMulticomponentThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -41,23 +41,23 @@ const Foam::hashedWordList& Foam::interfaceCompositionModel::species() const } -const Foam::rhoMulticomponentThermo& +const Foam::rhoFluidMulticomponentThermo& Foam::interfaceCompositionModel::thermo() const { return thermo_; } -const Foam::rhoThermo& Foam::interfaceCompositionModel::otherThermo() const +const Foam::rhoFluidThermo& Foam::interfaceCompositionModel::otherThermo() const { return otherThermo_; } -const Foam::rhoMulticomponentThermo& +const Foam::rhoFluidMulticomponentThermo& Foam::interfaceCompositionModel::otherMulticomponentThermo() const { - return refCast(otherThermo_); + return refCast(otherThermo_); } diff --git a/applications/modules/multiphaseEuler/multiphaseThermophysicalTransportModels/HeatTransferPhaseSystem/HeatTransferPhaseSystem.C b/applications/modules/multiphaseEuler/multiphaseThermophysicalTransportModels/HeatTransferPhaseSystem/HeatTransferPhaseSystem.C index 45b00fa966..bcfc43b62d 100644 --- a/applications/modules/multiphaseEuler/multiphaseThermophysicalTransportModels/HeatTransferPhaseSystem/HeatTransferPhaseSystem.C +++ b/applications/modules/multiphaseEuler/multiphaseThermophysicalTransportModels/HeatTransferPhaseSystem/HeatTransferPhaseSystem.C @@ -25,7 +25,7 @@ License #include "HeatTransferPhaseSystem.H" #include "fvmSup.H" -#include "rhoMulticomponentThermo.H" +#include "rhoFluidMulticomponentThermo.H" // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // @@ -47,8 +47,8 @@ void Foam::HeatTransferPhaseSystem::addDmdtHefs const phaseModel& phase1 = interface.phase1(); const phaseModel& phase2 = interface.phase2(); - const rhoThermo& thermo1 = phase1.thermo(); - const rhoThermo& thermo2 = phase2.thermo(); + const rhoFluidThermo& thermo1 = phase1.thermo(); + const rhoFluidThermo& thermo2 = phase2.thermo(); const volScalarField& he1 = thermo1.he(); const volScalarField& he2 = thermo2.he(); const volScalarField hs1(thermo1.hs()); @@ -89,16 +89,16 @@ void Foam::HeatTransferPhaseSystem::addDmidtHefs const phaseModel& phase1 = interface.phase1(); const phaseModel& phase2 = interface.phase2(); - const rhoThermo& thermo1 = phase1.thermo(); - const rhoThermo& thermo2 = phase2.thermo(); - const rhoMulticomponentThermo* mcThermoPtr1 = - isA(thermo1) - ? &refCast(thermo1) - : static_cast(nullptr); - const rhoMulticomponentThermo* mcThermoPtr2 = - isA(thermo2) - ? &refCast(thermo2) - : static_cast(nullptr); + const rhoFluidThermo& thermo1 = phase1.thermo(); + const rhoFluidThermo& thermo2 = phase2.thermo(); + const rhoFluidMulticomponentThermo* mcThermoPtr1 = + isA(thermo1) + ? &refCast(thermo1) + : static_cast(nullptr); + const rhoFluidMulticomponentThermo* mcThermoPtr2 = + isA(thermo2) + ? &refCast(thermo2) + : static_cast(nullptr); const volScalarField& he1 = thermo1.he(); const volScalarField& he2 = thermo2.he(); const volScalarField hs1(thermo1.hs()); @@ -195,8 +195,8 @@ void Foam::HeatTransferPhaseSystem::addDmdtHefsWithoutL const phaseModel& phase1 = interface.phase1(); const phaseModel& phase2 = interface.phase2(); - const rhoThermo& thermo1 = phase1.thermo(); - const rhoThermo& thermo2 = phase2.thermo(); + const rhoFluidThermo& thermo1 = phase1.thermo(); + const rhoFluidThermo& thermo2 = phase2.thermo(); const volScalarField& he1 = thermo1.he(); const volScalarField& he2 = thermo2.he(); const volScalarField K1(phase1.K()); @@ -305,16 +305,16 @@ void Foam::HeatTransferPhaseSystem::addDmidtHefsWithoutL const phaseModel& phase1 = interface.phase1(); const phaseModel& phase2 = interface.phase2(); - const rhoThermo& thermo1 = phase1.thermo(); - const rhoThermo& thermo2 = phase2.thermo(); - const rhoMulticomponentThermo* mcThermoPtr1 = - isA(thermo1) - ? &refCast(thermo1) - : static_cast(nullptr); - const rhoMulticomponentThermo* mcThermoPtr2 = - isA(thermo2) - ? &refCast(thermo2) - : static_cast(nullptr); + const rhoFluidThermo& thermo1 = phase1.thermo(); + const rhoFluidThermo& thermo2 = phase2.thermo(); + const rhoFluidMulticomponentThermo* mcThermoPtr1 = + isA(thermo1) + ? &refCast(thermo1) + : static_cast(nullptr); + const rhoFluidMulticomponentThermo* mcThermoPtr2 = + isA(thermo2) + ? &refCast(thermo2) + : static_cast(nullptr); const volScalarField& he1 = thermo1.he(); const volScalarField& he2 = thermo2.he(); const volScalarField K1(phase1.K()); @@ -512,8 +512,8 @@ Foam::HeatTransferPhaseSystem::L const latentHeatScheme scheme ) const { - const rhoThermo& thermo1 = interface.phase1().thermo(); - const rhoThermo& thermo2 = interface.phase2().thermo(); + const rhoFluidThermo& thermo1 = interface.phase1().thermo(); + const rhoFluidThermo& thermo2 = interface.phase2().thermo(); // Interface enthalpies const volScalarField haf1(thermo1.ha(thermo1.p(), Tf)); @@ -552,8 +552,8 @@ Foam::HeatTransferPhaseSystem::L const latentHeatScheme scheme ) const { - const rhoThermo& thermo1 = interface.phase1().thermo(); - const rhoThermo& thermo2 = interface.phase2().thermo(); + const rhoFluidThermo& thermo1 = interface.phase1().thermo(); + const rhoFluidThermo& thermo2 = interface.phase2().thermo(); // Interface enthalpies const scalarField haf1(thermo1.ha(Tf, cells)); @@ -595,16 +595,16 @@ Foam::HeatTransferPhaseSystem::Li const latentHeatScheme scheme ) const { - const rhoThermo& thermo1 = interface.phase1().thermo(); - const rhoThermo& thermo2 = interface.phase2().thermo(); - const rhoMulticomponentThermo* mcThermoPtr1 = - isA(thermo1) - ? &refCast(thermo1) - : static_cast(nullptr); - const rhoMulticomponentThermo* mcThermoPtr2 = - isA(thermo2) - ? &refCast(thermo2) - : static_cast(nullptr); + const rhoFluidThermo& thermo1 = interface.phase1().thermo(); + const rhoFluidThermo& thermo2 = interface.phase2().thermo(); + const rhoFluidMulticomponentThermo* mcThermoPtr1 = + isA(thermo1) + ? &refCast(thermo1) + : static_cast(nullptr); + const rhoFluidMulticomponentThermo* mcThermoPtr2 = + isA(thermo2) + ? &refCast(thermo2) + : static_cast(nullptr); const label speciei1 = mcThermoPtr1 ? mcThermoPtr1->species()[specie] : -1; const label speciei2 = @@ -668,16 +668,16 @@ Foam::HeatTransferPhaseSystem::Li const latentHeatScheme scheme ) const { - const rhoThermo& thermo1 = interface.phase1().thermo(); - const rhoThermo& thermo2 = interface.phase2().thermo(); - const rhoMulticomponentThermo* mcThermoPtr1 = - isA(thermo1) - ? &refCast(thermo1) - : static_cast(nullptr); - const rhoMulticomponentThermo* mcThermoPtr2 = - isA(thermo2) - ? &refCast(thermo2) - : static_cast(nullptr); + const rhoFluidThermo& thermo1 = interface.phase1().thermo(); + const rhoFluidThermo& thermo2 = interface.phase2().thermo(); + const rhoFluidMulticomponentThermo* mcThermoPtr1 = + isA(thermo1) + ? &refCast(thermo1) + : static_cast(nullptr); + const rhoFluidMulticomponentThermo* mcThermoPtr2 = + isA(thermo2) + ? &refCast(thermo2) + : static_cast(nullptr); const label speciei1 = mcThermoPtr1 ? mcThermoPtr1->species()[specie] : -1; const label speciei2 = diff --git a/applications/modules/multiphaseEuler/multiphaseThermophysicalTransportModels/TwoResistanceHeatTransferPhaseSystem/TwoResistanceHeatTransferPhaseSystem.C b/applications/modules/multiphaseEuler/multiphaseThermophysicalTransportModels/TwoResistanceHeatTransferPhaseSystem/TwoResistanceHeatTransferPhaseSystem.C index 8a82551384..2856f34445 100644 --- a/applications/modules/multiphaseEuler/multiphaseThermophysicalTransportModels/TwoResistanceHeatTransferPhaseSystem/TwoResistanceHeatTransferPhaseSystem.C +++ b/applications/modules/multiphaseEuler/multiphaseThermophysicalTransportModels/TwoResistanceHeatTransferPhaseSystem/TwoResistanceHeatTransferPhaseSystem.C @@ -26,7 +26,7 @@ License #include "TwoResistanceHeatTransferPhaseSystem.H" #include "heatTransferModel.H" #include "fvmSup.H" -#include "rhoMulticomponentThermo.H" +#include "rhoFluidMulticomponentThermo.H" // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // @@ -59,8 +59,8 @@ void Foam::TwoResistanceHeatTransferPhaseSystem::addDmdtHefs const phaseModel& phase1 = interface.phase1(); const phaseModel& phase2 = interface.phase2(); - const rhoThermo& thermo1 = phase1.thermo(); - const rhoThermo& thermo2 = phase2.thermo(); + const rhoFluidThermo& thermo1 = phase1.thermo(); + const rhoFluidThermo& thermo2 = phase2.thermo(); // Transfer coefficients const sidedBlendedHeatTransferModel& heatTransferModel = @@ -124,8 +124,8 @@ void Foam::TwoResistanceHeatTransferPhaseSystem::addDmidtHefs const phaseModel& phase1 = interface.phase1(); const phaseModel& phase2 = interface.phase2(); - const rhoThermo& thermo1 = phase1.thermo(); - const rhoThermo& thermo2 = phase2.thermo(); + const rhoFluidThermo& thermo1 = phase1.thermo(); + const rhoFluidThermo& thermo2 = phase2.thermo(); // Transfer coefficients const sidedBlendedHeatTransferModel& heatTransferModel = diff --git a/applications/modules/multiphaseEuler/multiphaseThermophysicalTransportModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C b/applications/modules/multiphaseEuler/multiphaseThermophysicalTransportModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C index 772415ac98..bf1c034841 100644 --- a/applications/modules/multiphaseEuler/multiphaseThermophysicalTransportModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C +++ b/applications/modules/multiphaseEuler/multiphaseThermophysicalTransportModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C @@ -31,7 +31,7 @@ License #include "compressibleMomentumTransportModel.H" #include "phaseCompressibleMomentumTransportModel.H" #include "interfaceSaturationTemperatureModel.H" -#include "rhoMulticomponentThermo.H" +#include "rhoFluidMulticomponentThermo.H" #include "fixedValueFvPatchFields.H" #include "zeroGradientFvPatchFields.H" diff --git a/applications/modules/multiphaseEuler/multiphaseThermophysicalTransportModels/heatTransferModels/wallBoiling/wallBoilingHeatTransfer.C b/applications/modules/multiphaseEuler/multiphaseThermophysicalTransportModels/heatTransferModels/wallBoiling/wallBoilingHeatTransfer.C index e8444c6755..5b670de314 100644 --- a/applications/modules/multiphaseEuler/multiphaseThermophysicalTransportModels/heatTransferModels/wallBoiling/wallBoilingHeatTransfer.C +++ b/applications/modules/multiphaseEuler/multiphaseThermophysicalTransportModels/heatTransferModels/wallBoiling/wallBoilingHeatTransfer.C @@ -237,9 +237,9 @@ Foam::heatTransferModels::wallBoilingHeatTransfer::K const phaseModel& vapour = fluid.phases()[vapourPhaseName_]; const phaseModel& solid = interface_.dispersed(); - const rhoThermo& lThermo = liquid.thermo(); - const rhoThermo& vThermo = vapour.thermo(); - const rhoThermo& sThermo = solid.thermo(); + const rhoFluidThermo& lThermo = liquid.thermo(); + const rhoFluidThermo& vThermo = vapour.thermo(); + const rhoFluidThermo& sThermo = solid.thermo(); // Estimate the surface temperature from the surrounding temperature and // heat transfer coefficients. Note that a lagged value of K is used in diff --git a/applications/modules/multiphaseEuler/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.C b/applications/modules/multiphaseEuler/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.C index 7669f74d89..6782e3b414 100644 --- a/applications/modules/multiphaseEuler/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.C +++ b/applications/modules/multiphaseEuler/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.C @@ -28,7 +28,7 @@ License #include "alphatPhaseChangeWallFunctionBase.H" #include "fvcVolumeIntegrate.H" #include "fvmSup.H" -#include "rhoMulticomponentThermo.H" +#include "rhoFluidMulticomponentThermo.H" #include "wallBoilingHeatTransfer.H" // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // @@ -562,8 +562,8 @@ Foam::ThermalPhaseChangePhaseSystem::correctInterfaceThermo() const phaseInterface& interface = saturationModelIter()->interface(); const phaseModel& phase1 = interface.phase1(); const phaseModel& phase2 = interface.phase2(); - const rhoThermo& thermo1 = phase1.thermo(); - const rhoThermo& thermo2 = phase2.thermo(); + const rhoFluidThermo& thermo1 = phase1.thermo(); + const rhoFluidThermo& thermo2 = phase2.thermo(); const volScalarField& T1(thermo1.T()); const volScalarField& T2(thermo2.T()); diff --git a/applications/modules/multiphaseEuler/phaseSystems/phaseInterface/phaseInterface/phaseInterface.H b/applications/modules/multiphaseEuler/phaseSystems/phaseInterface/phaseInterface/phaseInterface.H index e2ca9d6ae9..5ba4da35ec 100644 --- a/applications/modules/multiphaseEuler/phaseSystems/phaseInterface/phaseInterface/phaseInterface.H +++ b/applications/modules/multiphaseEuler/phaseSystems/phaseInterface/phaseInterface/phaseInterface.H @@ -300,10 +300,10 @@ public: virtual inline const volScalarField& alpha2() const; //- Return the thermo for phase 1 - virtual inline const rhoThermo& thermo1() const; + virtual inline const rhoFluidThermo& thermo1() const; //- Return the thermo for phase 2 - virtual inline const rhoThermo& thermo2() const; + virtual inline const rhoFluidThermo& thermo2() const; //- Return the density of phase 1 virtual inline const volScalarField& rho1() const; diff --git a/applications/modules/multiphaseEuler/phaseSystems/phaseInterface/phaseInterface/phaseInterfaceI.H b/applications/modules/multiphaseEuler/phaseSystems/phaseInterface/phaseInterface/phaseInterfaceI.H index 382c90452c..663bdffc5b 100644 --- a/applications/modules/multiphaseEuler/phaseSystems/phaseInterface/phaseInterface/phaseInterfaceI.H +++ b/applications/modules/multiphaseEuler/phaseSystems/phaseInterface/phaseInterface/phaseInterfaceI.H @@ -39,13 +39,13 @@ inline const Foam::volScalarField& Foam::phaseInterface::alpha2() const } -inline const Foam::rhoThermo& Foam::phaseInterface::thermo1() const +inline const Foam::rhoFluidThermo& Foam::phaseInterface::thermo1() const { return phase1().thermo(); } -inline const Foam::rhoThermo& Foam::phaseInterface::thermo2() const +inline const Foam::rhoFluidThermo& Foam::phaseInterface::thermo2() const { return phase2().thermo(); } diff --git a/applications/modules/multiphaseEuler/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.H b/applications/modules/multiphaseEuler/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.H index 80480c16e3..29431aceb6 100644 --- a/applications/modules/multiphaseEuler/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.H +++ b/applications/modules/multiphaseEuler/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.H @@ -62,13 +62,13 @@ template struct MovingPhaseModelTransportThermoModel; template<> -struct MovingPhaseModelTransportThermoModel +struct MovingPhaseModelTransportThermoModel { typedef fluidThermo type; }; template<> -struct MovingPhaseModelTransportThermoModel +struct MovingPhaseModelTransportThermoModel { typedef fluidMulticomponentThermo type; }; diff --git a/applications/modules/multiphaseEuler/phaseSystems/phaseModel/ThermoPhaseModel/ThermoPhaseModel.C b/applications/modules/multiphaseEuler/phaseSystems/phaseModel/ThermoPhaseModel/ThermoPhaseModel.C index ec6c346e3a..ea87eece78 100644 --- a/applications/modules/multiphaseEuler/phaseSystems/phaseModel/ThermoPhaseModel/ThermoPhaseModel.C +++ b/applications/modules/multiphaseEuler/phaseSystems/phaseModel/ThermoPhaseModel/ThermoPhaseModel.C @@ -74,7 +74,7 @@ bool Foam::ThermoPhaseModel::isochoric() const template -const Foam::rhoThermo& +const Foam::rhoFluidThermo& Foam::ThermoPhaseModel::thermo() const { return thermo_(); @@ -82,7 +82,7 @@ Foam::ThermoPhaseModel::thermo() const template -Foam::rhoThermo& +Foam::rhoFluidThermo& Foam::ThermoPhaseModel::thermo() { return thermo_(); diff --git a/applications/modules/multiphaseEuler/phaseSystems/phaseModel/ThermoPhaseModel/ThermoPhaseModel.H b/applications/modules/multiphaseEuler/phaseSystems/phaseModel/ThermoPhaseModel/ThermoPhaseModel.H index daae144e62..367e6a7b3c 100644 --- a/applications/modules/multiphaseEuler/phaseSystems/phaseModel/ThermoPhaseModel/ThermoPhaseModel.H +++ b/applications/modules/multiphaseEuler/phaseSystems/phaseModel/ThermoPhaseModel/ThermoPhaseModel.H @@ -46,7 +46,7 @@ SourceFiles namespace Foam { -class rhoThermo; +class rhoFluidThermo; /*---------------------------------------------------------------------------*\ Class ThermoPhaseModel Declaration @@ -97,10 +97,10 @@ public: virtual bool isochoric() const; //- Return the thermophysical model - virtual const rhoThermo& thermo() const; + virtual const rhoFluidThermo& thermo() const; //- Access the thermophysical model - virtual rhoThermo& thermo(); + virtual rhoFluidThermo& thermo(); //- Return the density field virtual const volScalarField& rho() const; diff --git a/applications/modules/multiphaseEuler/phaseSystems/phaseModel/phaseModel/phaseModel.H b/applications/modules/multiphaseEuler/phaseSystems/phaseModel/phaseModel/phaseModel.H index 8d1265a6fd..f42991ab34 100644 --- a/applications/modules/multiphaseEuler/phaseSystems/phaseModel/phaseModel/phaseModel.H +++ b/applications/modules/multiphaseEuler/phaseSystems/phaseModel/phaseModel/phaseModel.H @@ -37,7 +37,7 @@ SourceFiles #include "volFields.H" #include "surfaceFields.H" #include "fvMatricesFwd.H" -#include "rhoThermo.H" +#include "rhoFluidThermo.H" #include "runTimeSelectionTables.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -255,10 +255,10 @@ public: // Thermo //- Return the thermophysical model - virtual const rhoThermo& thermo() const = 0; + virtual const rhoFluidThermo& thermo() const = 0; //- Access the thermophysical model - virtual rhoThermo& thermo() = 0; + virtual rhoFluidThermo& thermo() = 0; //- Return the density field virtual const volScalarField& rho() const = 0; diff --git a/applications/modules/multiphaseEuler/phaseSystems/phaseModel/phaseModel/phaseModels.C b/applications/modules/multiphaseEuler/phaseSystems/phaseModel/phaseModel/phaseModels.C index 06f1a87b13..3e41fb4352 100644 --- a/applications/modules/multiphaseEuler/phaseSystems/phaseModel/phaseModel/phaseModels.C +++ b/applications/modules/multiphaseEuler/phaseSystems/phaseModel/phaseModel/phaseModels.C @@ -25,8 +25,8 @@ License #include "addToRunTimeSelectionTable.H" -#include "rhoThermo.H" -#include "rhoMulticomponentThermo.H" +#include "rhoFluidThermo.H" +#include "rhoFluidMulticomponentThermo.H" #include "combustionModel.H" @@ -54,7 +54,11 @@ namespace Foam < MovingPhaseModel < - ThermoPhaseModel + ThermoPhaseModel + < + phaseModel, + rhoFluidThermo + > > > > @@ -78,7 +82,11 @@ namespace Foam < StationaryPhaseModel < - ThermoPhaseModel + ThermoPhaseModel + < + phaseModel, + rhoFluidThermo + > > > > @@ -102,7 +110,11 @@ namespace Foam < MovingPhaseModel < - ThermoPhaseModel + ThermoPhaseModel + < + phaseModel, + rhoFluidThermo + > > > > @@ -126,7 +138,11 @@ namespace Foam < StationaryPhaseModel < - ThermoPhaseModel + ThermoPhaseModel + < + phaseModel, + rhoFluidThermo + > > > > @@ -150,7 +166,11 @@ namespace Foam < MovingPhaseModel < - ThermoPhaseModel + ThermoPhaseModel + < + phaseModel, + rhoFluidMulticomponentThermo + > > > > @@ -184,7 +204,11 @@ namespace Foam < MovingPhaseModel < - ThermoPhaseModel + ThermoPhaseModel + < + phaseModel, + rhoFluidMulticomponentThermo + > > > > @@ -208,7 +232,11 @@ namespace Foam < MovingPhaseModel < - ThermoPhaseModel + ThermoPhaseModel + < + phaseModel, + rhoFluidMulticomponentThermo + > > > > diff --git a/etc/codeTemplates/dynamicCode/fluidMulticomponentThermo b/etc/codeTemplates/dynamicCode/fluidMulticomponentThermo index 7c42883911..fdcacde026 100644 --- a/etc/codeTemplates/dynamicCode/fluidMulticomponentThermo +++ b/etc/codeTemplates/dynamicCode/fluidMulticomponentThermo @@ -22,7 +22,7 @@ type typeRenamed ( hePsiThermo psiMulticomponentThermo - heRhoThermo rhoMulticomponentThermo + heRhoThermo rhoFluidMulticomponentThermo ); energy diff --git a/etc/codeTemplates/dynamicCode/fluidThermo b/etc/codeTemplates/dynamicCode/fluidThermo index 1e364e0ba0..2aa506c1c2 100644 --- a/etc/codeTemplates/dynamicCode/fluidThermo +++ b/etc/codeTemplates/dynamicCode/fluidThermo @@ -22,7 +22,7 @@ type typeRenamed ( hePsiThermo psiThermo - heRhoThermo rhoThermo + heRhoThermo rhoFluidThermo ); energy diff --git a/etc/codeTemplates/dynamicCode/rhoMulticomponentThermo b/etc/codeTemplates/dynamicCode/rhoFluidMulticomponentThermo similarity index 100% rename from etc/codeTemplates/dynamicCode/rhoMulticomponentThermo rename to etc/codeTemplates/dynamicCode/rhoFluidMulticomponentThermo diff --git a/etc/codeTemplates/dynamicCode/rhoMulticomponentThermoTemplate.C b/etc/codeTemplates/dynamicCode/rhoFluidMulticomponentThermoTemplate.C similarity index 100% rename from etc/codeTemplates/dynamicCode/rhoMulticomponentThermoTemplate.C rename to etc/codeTemplates/dynamicCode/rhoFluidMulticomponentThermoTemplate.C diff --git a/etc/codeTemplates/dynamicCode/rhoThermo b/etc/codeTemplates/dynamicCode/rhoFluidThermo similarity index 100% rename from etc/codeTemplates/dynamicCode/rhoThermo rename to etc/codeTemplates/dynamicCode/rhoFluidThermo diff --git a/etc/codeTemplates/dynamicCode/rhoThermoTemplate.C b/etc/codeTemplates/dynamicCode/rhoFluidThermoTemplate.C similarity index 100% rename from etc/codeTemplates/dynamicCode/rhoThermoTemplate.C rename to etc/codeTemplates/dynamicCode/rhoFluidThermoTemplate.C diff --git a/src/thermophysicalModels/basic/Make/files b/src/thermophysicalModels/basic/Make/files index 9edb4bbfa7..f5edef8978 100644 --- a/src/thermophysicalModels/basic/Make/files +++ b/src/thermophysicalModels/basic/Make/files @@ -3,14 +3,16 @@ basicThermo/BasicThermoName.C pureThermo/pureThermo.C +rhoThermo/rhoThermo.C + fluidThermo/fluidThermo.C fluidThermo/hydrostaticInitialisation.C psiThermo/psiThermo.C psiThermo/psiThermos.C -rhoThermo/rhoThermo.C -rhoThermo/rhoThermos.C +rhoFluidThermo/rhoFluidThermo.C +rhoFluidThermo/rhoFluidThermos.C liquidThermo/liquidThermo.C liquidThermo/liquidThermos.C diff --git a/src/thermophysicalModels/basic/liquidThermo/liquidThermo.H b/src/thermophysicalModels/basic/liquidThermo/liquidThermo.H index 50bc067945..2227a8299d 100644 --- a/src/thermophysicalModels/basic/liquidThermo/liquidThermo.H +++ b/src/thermophysicalModels/basic/liquidThermo/liquidThermo.H @@ -39,7 +39,7 @@ SourceFiles #define liquidThermo_H #include "LiquidThermo.H" -#include "rhoThermo.H" +#include "rhoFluidThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -52,7 +52,7 @@ namespace Foam class liquidThermo : - virtual public rhoThermo + virtual public rhoFluidThermo { public: @@ -67,7 +67,7 @@ public: //- The derived type template using DerivedThermoType = - LiquidThermo>>; + LiquidThermo>>; //- Runtime type information @@ -114,8 +114,8 @@ class liquidThermo::composite : public basicThermo::implementation, public pureThermo, - public fluidThermo::implementation, public rhoThermo::implementation, + public fluidThermo::implementation, public liquidThermo { public: @@ -133,8 +133,8 @@ public: ) : basicThermo::implementation(dict, mesh, phaseName), - fluidThermo::implementation(dict, mesh, phaseName), - rhoThermo::implementation(dict, mesh, phaseName) + rhoThermo::implementation(dict, mesh, phaseName), + fluidThermo::implementation(dict, mesh, phaseName) {} }; diff --git a/src/thermophysicalModels/basic/liquidThermo/liquidThermos.C b/src/thermophysicalModels/basic/liquidThermo/liquidThermos.C index ced93601f1..698b3d7765 100644 --- a/src/thermophysicalModels/basic/liquidThermo/liquidThermos.C +++ b/src/thermophysicalModels/basic/liquidThermo/liquidThermos.C @@ -42,7 +42,7 @@ License \ addThermo(basicThermo, liquidThermo, pureMixture, ThermoPhysics); \ addThermo(fluidThermo, liquidThermo, pureMixture, ThermoPhysics); \ - addThermo(rhoThermo, liquidThermo, pureMixture, ThermoPhysics); \ + addThermo(rhoFluidThermo, liquidThermo, pureMixture, ThermoPhysics); \ addThermo(liquidThermo, liquidThermo, pureMixture, ThermoPhysics) namespace Foam diff --git a/src/thermophysicalModels/basic/psiThermo/psiThermo.C b/src/thermophysicalModels/basic/psiThermo/psiThermo.C index e8c8ebdb69..b627380d02 100644 --- a/src/thermophysicalModels/basic/psiThermo/psiThermo.C +++ b/src/thermophysicalModels/basic/psiThermo/psiThermo.C @@ -75,6 +75,12 @@ void Foam::psiThermo::correctRho(const Foam::volScalarField& deltaRho) {} +Foam::tmp Foam::psiThermo::renameRho() +{ + return rho(); +} + + Foam::tmp Foam::psiThermo::implementation::rho() const { return p()*psi(); @@ -90,10 +96,4 @@ Foam::tmp Foam::psiThermo::implementation::rho } -Foam::tmp Foam::psiThermo::implementation::renameRho() -{ - return rho(); -} - - // ************************************************************************* // diff --git a/src/thermophysicalModels/basic/psiThermo/psiThermo.H b/src/thermophysicalModels/basic/psiThermo/psiThermo.H index 4c1c631367..9331bed254 100644 --- a/src/thermophysicalModels/basic/psiThermo/psiThermo.H +++ b/src/thermophysicalModels/basic/psiThermo/psiThermo.H @@ -39,8 +39,8 @@ SourceFiles #define psiThermo_H #include "PsiThermo.H" -#include "fluidThermo.H" #include "pureThermo.H" +#include "fluidThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -110,11 +110,6 @@ public: // Fields derived from thermodynamic state variables - //- Add the given density correction to the density field. - // Used to update the density field following pressure solution. - // For psiThermo does nothing. - virtual void correctRho(const volScalarField& deltaRho); - //- Density [kg/m^3] - uses current value of pressure virtual tmp rho() const = 0; @@ -123,7 +118,12 @@ public: //- Return the thermodynamic density field [kg/m^3] // This is used by solvers which create a separate continuity rho - virtual tmp renameRho() = 0; + virtual tmp renameRho(); + + //- Add the given density correction to the density field. + // Used to update the density field following pressure solution. + // For psiThermo does nothing. + virtual void correctRho(const volScalarField& deltaRho); }; @@ -135,7 +135,6 @@ class psiThermo::implementation : virtual public psiThermo { - public: // Constructors @@ -161,10 +160,6 @@ public: //- Density for patch [kg/m^3] virtual tmp rho(const label patchi) const; - //- Return the thermodynamic density field [kg/m^3] - // This is used by solvers which create a separate continuity rho - virtual tmp renameRho(); - // Member Operators diff --git a/src/thermophysicalModels/basic/rhoThermo/RhoThermo.C b/src/thermophysicalModels/basic/rhoFluidThermo/RhoFluidThermo.C similarity index 96% rename from src/thermophysicalModels/basic/rhoThermo/RhoThermo.C rename to src/thermophysicalModels/basic/rhoFluidThermo/RhoFluidThermo.C index c569910bf6..4c5e7410b3 100644 --- a/src/thermophysicalModels/basic/rhoThermo/RhoThermo.C +++ b/src/thermophysicalModels/basic/rhoFluidThermo/RhoFluidThermo.C @@ -23,12 +23,12 @@ License \*---------------------------------------------------------------------------*/ -#include "RhoThermo.H" +#include "RhoFluidThermo.H" // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // template -void Foam::RhoThermo::calculate() +void Foam::RhoFluidThermo::calculate() { const scalarField& hCells = this->he(); const scalarField& pCells = this->p_; @@ -163,7 +163,7 @@ void Foam::RhoThermo::calculate() // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template -Foam::RhoThermo::RhoThermo +Foam::RhoFluidThermo::RhoFluidThermo ( const fvMesh& mesh, const word& phaseName @@ -178,14 +178,14 @@ Foam::RhoThermo::RhoThermo // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // template -Foam::RhoThermo::~RhoThermo() +Foam::RhoFluidThermo::~RhoFluidThermo() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template -void Foam::RhoThermo::correct() +void Foam::RhoFluidThermo::correct() { if (BaseThermo::debug) { diff --git a/src/thermophysicalModels/basic/rhoThermo/RhoThermo.H b/src/thermophysicalModels/basic/rhoFluidThermo/RhoFluidThermo.H similarity index 84% rename from src/thermophysicalModels/basic/rhoThermo/RhoThermo.H rename to src/thermophysicalModels/basic/rhoFluidThermo/RhoFluidThermo.H index e82b57afcf..30b79175d5 100644 --- a/src/thermophysicalModels/basic/rhoThermo/RhoThermo.H +++ b/src/thermophysicalModels/basic/rhoFluidThermo/RhoFluidThermo.H @@ -22,18 +22,18 @@ License along with OpenFOAM. If not, see . Class - Foam::RhoThermo + Foam::RhoFluidThermo Description Thermo implementation based on density SourceFiles - RhoThermo.C + RhoFluidThermo.C \*---------------------------------------------------------------------------*/ -#ifndef RhoThermo_H -#define RhoThermo_H +#ifndef RhoFluidThermo_H +#define RhoFluidThermo_H #include "BasicThermo.H" @@ -43,11 +43,11 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class RhoThermo Declaration + Class RhoFluidThermo Declaration \*---------------------------------------------------------------------------*/ template -class RhoThermo +class RhoFluidThermo : public BaseThermo { @@ -62,14 +62,14 @@ public: // Constructors //- Construct from mesh and phase name - RhoThermo(const fvMesh&, const word& phaseName); + RhoFluidThermo(const fvMesh&, const word& phaseName); //- Disallow default bitwise copy construction - RhoThermo(const RhoThermo&) = delete; + RhoFluidThermo(const RhoFluidThermo&) = delete; //- Destructor - virtual ~RhoThermo(); + virtual ~RhoFluidThermo(); // Member Functions @@ -81,7 +81,7 @@ public: // Member Operators //- Disallow default bitwise assignment - void operator=(const RhoThermo&) = delete; + void operator=(const RhoFluidThermo&) = delete; }; @@ -92,7 +92,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #ifdef NoRepository - #include "RhoThermo.C" + #include "RhoFluidThermo.C" #endif // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/thermophysicalModels/basic/rhoFluidThermo/rhoFluidThermo.C b/src/thermophysicalModels/basic/rhoFluidThermo/rhoFluidThermo.C new file mode 100644 index 0000000000..63a5f15c55 --- /dev/null +++ b/src/thermophysicalModels/basic/rhoFluidThermo/rhoFluidThermo.C @@ -0,0 +1,73 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "rhoFluidThermo.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(rhoFluidThermo, 0); + defineRunTimeSelectionTable(rhoFluidThermo, fvMesh); +} + +const Foam::word Foam::rhoFluidThermo::derivedThermoName("heRhoThermo"); + + +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // + +Foam::autoPtr Foam::rhoFluidThermo::New +( + const fvMesh& mesh, + const word& phaseName +) +{ + return basicThermo::New(mesh, phaseName); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::rhoFluidThermo::~rhoFluidThermo() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::tmp +Foam::rhoFluidThermo::renameRho() +{ + rho().rename(phasePropertyName(Foam::typedName("rho"))); + return rho(); +} + + +void Foam::rhoFluidThermo::correctRho(const volScalarField& deltaRho) +{ + rho() += deltaRho; +} + + +// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/rhoFluidThermo/rhoFluidThermo.H b/src/thermophysicalModels/basic/rhoFluidThermo/rhoFluidThermo.H new file mode 100644 index 0000000000..37c2683ef5 --- /dev/null +++ b/src/thermophysicalModels/basic/rhoFluidThermo/rhoFluidThermo.H @@ -0,0 +1,163 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::rhoFluidThermo + +Description + Base-class for fluid thermodynamic properties based on density. + +See also + Foam::basicThermo + +SourceFiles + rhoFluidThermo.C + +\*---------------------------------------------------------------------------*/ + +#ifndef rhoFluidThermo_H +#define rhoFluidThermo_H + +#include "RhoFluidThermo.H" +#include "pureThermo.H" +#include "rhoThermo.H" +#include "fluidThermo.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class rhoFluidThermo Declaration +\*---------------------------------------------------------------------------*/ + +class rhoFluidThermo +: + virtual public rhoThermo, + virtual public fluidThermo +{ +public: + + // Public Classes + + //- Forward declare the composite class + class composite; + + + // Public Typedefs + + //- The derived type + template + using DerivedThermoType = + RhoFluidThermo>; + + //- The derived name + static const word derivedThermoName; + + + //- Runtime type information + TypeName("rhoFluidThermo"); + + + //- Declare run-time constructor selection table + declareRunTimeSelectionTable + ( + autoPtr, + rhoFluidThermo, + fvMesh, + (const fvMesh& mesh, const word& phaseName), + (mesh, phaseName) + ); + + + // Selectors + + //- Standard selection based on fvMesh + static autoPtr New + ( + const fvMesh&, + const word& phaseName=word::null + ); + + + //- Destructor + virtual ~rhoFluidThermo(); + + + // Member Functions + + // Fields derived from thermodynamic state variables + + //- Rename and return the thermodynamic density field [kg/m^3] + // This is used by solvers which create a separate continuity rho + virtual tmp renameRho(); + + //- Add the given density correction to the density field. + // Used to update the density field following pressure solution + virtual void correctRho(const volScalarField& deltaRho); +}; + + +/*---------------------------------------------------------------------------*\ + Class rhoFluidThermo::composite Declaration +\*---------------------------------------------------------------------------*/ + +class rhoFluidThermo::composite +: + public basicThermo::implementation, + public pureThermo, + public rhoThermo::implementation, + public fluidThermo::implementation, + public rhoFluidThermo +{ +public: + + // Constructors + + //- Construct from dictionary, mesh and phase name + template + composite + ( + const dictionary& dict, + const MixtureType& mixture, + const fvMesh& mesh, + const word& phaseName + ) + : + basicThermo::implementation(dict, mesh, phaseName), + rhoThermo::implementation(dict, mesh, phaseName), + fluidThermo::implementation(dict, mesh, phaseName) + {} +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/rhoThermo/rhoThermos.C b/src/thermophysicalModels/basic/rhoFluidThermo/rhoFluidThermos.C similarity index 87% rename from src/thermophysicalModels/basic/rhoThermo/rhoThermos.C rename to src/thermophysicalModels/basic/rhoFluidThermo/rhoFluidThermos.C index 0f61bbcd76..2413d820f5 100644 --- a/src/thermophysicalModels/basic/rhoThermo/rhoThermos.C +++ b/src/thermophysicalModels/basic/rhoFluidThermo/rhoFluidThermos.C @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "rhoThermo.H" +#include "rhoFluidThermo.H" #include "pureMixture.H" @@ -37,9 +37,9 @@ License namespace Foam { - forGases(makeFluidThermo, rhoThermo, pureMixture); - forLiquids(makeFluidThermo, rhoThermo, pureMixture); - forTabulated(makeFluidThermo, rhoThermo, pureMixture); + forGases(makeFluidThermo, rhoFluidThermo, pureMixture); + forLiquids(makeFluidThermo, rhoFluidThermo, pureMixture); + forTabulated(makeFluidThermo, rhoFluidThermo, pureMixture); } // ************************************************************************* // diff --git a/src/thermophysicalModels/basic/rhoThermo/rhoThermo.C b/src/thermophysicalModels/basic/rhoThermo/rhoThermo.C index 087aacf294..2403b915ce 100644 --- a/src/thermophysicalModels/basic/rhoThermo/rhoThermo.C +++ b/src/thermophysicalModels/basic/rhoThermo/rhoThermo.C @@ -25,17 +25,6 @@ License #include "rhoThermo.H" -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -namespace Foam -{ - defineTypeNameAndDebug(rhoThermo, 0); - defineRunTimeSelectionTable(rhoThermo, fvMesh); -} - -const Foam::word Foam::rhoThermo::derivedThermoName("heRhoThermo"); - - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // Foam::rhoThermo::implementation::implementation @@ -61,18 +50,6 @@ Foam::rhoThermo::implementation::implementation {} -// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // - -Foam::autoPtr Foam::rhoThermo::New -( - const fvMesh& mesh, - const word& phaseName -) -{ - return basicThermo::New(mesh, phaseName); -} - - // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // Foam::rhoThermo::~rhoThermo() @@ -85,7 +62,8 @@ Foam::rhoThermo::implementation::~implementation() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::tmp Foam::rhoThermo::implementation::rho() const +Foam::tmp +Foam::rhoThermo::implementation::rho() const { return rho_; } @@ -100,23 +78,10 @@ Foam::tmp Foam::rhoThermo::implementation::rho } -Foam::tmp Foam::rhoThermo::implementation::renameRho() -{ - rho_.rename(phasePropertyName(Foam::typedName("rho"))); - return rho_; -} - - Foam::volScalarField& Foam::rhoThermo::implementation::rho() { return rho_; } -void Foam::rhoThermo::implementation::correctRho(const volScalarField& deltaRho) -{ - rho_ += deltaRho; -} - - // ************************************************************************* // diff --git a/src/thermophysicalModels/basic/rhoThermo/rhoThermo.H b/src/thermophysicalModels/basic/rhoThermo/rhoThermo.H index d7b6491f36..19daff8606 100644 --- a/src/thermophysicalModels/basic/rhoThermo/rhoThermo.H +++ b/src/thermophysicalModels/basic/rhoThermo/rhoThermo.H @@ -25,7 +25,7 @@ Class Foam::rhoThermo Description - Base-class for fluid thermodynamic properties based on density. + Base-class for thermodynamic properties based on density. See also Foam::basicThermo @@ -38,9 +38,7 @@ SourceFiles #ifndef rhoThermo_H #define rhoThermo_H -#include "RhoThermo.H" -#include "fluidThermo.H" -#include "pureThermo.H" +#include "basicThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -53,7 +51,7 @@ namespace Foam class rhoThermo : - virtual public fluidThermo + virtual public basicThermo { public: @@ -62,45 +60,6 @@ public: //- Forward declare the implementation class class implementation; - //- Forward declare the composite class - class composite; - - - // Public Typedefs - - //- The derived type - template - using DerivedThermoType = - RhoThermo>; - - //- The derived name - static const word derivedThermoName; - - - //- Runtime type information - TypeName("rhoThermo"); - - - //- Declare run-time constructor selection table - declareRunTimeSelectionTable - ( - autoPtr, - rhoThermo, - fvMesh, - (const fvMesh& mesh, const word& phaseName), - (mesh, phaseName) - ); - - - // Selectors - - //- Standard selection based on fvMesh - static autoPtr New - ( - const fvMesh&, - const word& phaseName=word::null - ); - //- Destructor virtual ~rhoThermo(); @@ -116,16 +75,8 @@ public: //- Density for patch [kg/m^3] virtual tmp rho(const label patchi) const = 0; - //- Rename and return the thermodynamic density field [kg/m^3] - // This is used by solvers which create a separate continuity rho - virtual tmp renameRho() = 0; - //- Return non-const access to the local density field [kg/m^3] virtual volScalarField& rho() = 0; - - //- Add the given density correction to the density field. - // Used to update the density field following pressure solution - virtual void correctRho(const volScalarField& deltaRho) = 0; }; @@ -142,7 +93,6 @@ protected: // Protected data //- Density field [kg/m^3] - // Named 'rho' to avoid (potential) conflict with solver density volScalarField rho_; @@ -171,17 +121,9 @@ public: //- Density for patch [kg/m^3] virtual tmp rho(const label patchi) const; - //- Rename and return the thermodynamic density field [kg/m^3] - // This is used by solvers which create a separate continuity rho - virtual tmp renameRho(); - //- Return non-const access to the local density field [kg/m^3] virtual volScalarField& rho(); - //- Add the given density correction to the density field. - // Used to update the density field following pressure solution - virtual void correctRho(const volScalarField& deltaRho); - // Member Operators @@ -190,38 +132,6 @@ public: }; -/*---------------------------------------------------------------------------*\ - Class rhoThermo::composite Declaration -\*---------------------------------------------------------------------------*/ - -class rhoThermo::composite -: - public basicThermo::implementation, - public pureThermo, - public fluidThermo::implementation, - public rhoThermo::implementation -{ -public: - - // Constructors - - //- Construct from dictionary, mesh and phase name - template - composite - ( - const dictionary& dict, - const MixtureType& mixture, - const fvMesh& mesh, - const word& phaseName - ) - : - basicThermo::implementation(dict, mesh, phaseName), - fluidThermo::implementation(dict, mesh, phaseName), - rhoThermo::implementation(dict, mesh, phaseName) - {} -}; - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam diff --git a/src/thermophysicalModels/multicomponentThermo/Make/files b/src/thermophysicalModels/multicomponentThermo/Make/files index 50c5b315b4..f636ada488 100644 --- a/src/thermophysicalModels/multicomponentThermo/Make/files +++ b/src/thermophysicalModels/multicomponentThermo/Make/files @@ -8,8 +8,8 @@ psiMulticomponentThermo/psiMulticomponentThermos.C psiuMulticomponentThermo/psiuMulticomponentThermo.C psiuMulticomponentThermo/psiuMulticomponentThermos.C -rhoMulticomponentThermo/rhoMulticomponentThermo.C -rhoMulticomponentThermo/rhoMulticomponentThermos.C +rhoFluidMulticomponentThermo/rhoFluidMulticomponentThermo.C +rhoFluidMulticomponentThermo/rhoFluidMulticomponentThermos.C derivedFvPatchFields/fixedUnburntEnthalpy/fixedUnburntEnthalpyFvPatchScalarField.C derivedFvPatchFields/gradientUnburntEnthalpy/gradientUnburntEnthalpyFvPatchScalarField.C diff --git a/src/thermophysicalModels/multicomponentThermo/rhoMulticomponentThermo/rhoMulticomponentThermo.C b/src/thermophysicalModels/multicomponentThermo/rhoFluidMulticomponentThermo/rhoFluidMulticomponentThermo.C similarity index 79% rename from src/thermophysicalModels/multicomponentThermo/rhoMulticomponentThermo/rhoMulticomponentThermo.C rename to src/thermophysicalModels/multicomponentThermo/rhoFluidMulticomponentThermo/rhoFluidMulticomponentThermo.C index 0eaa36d9f8..9f3ffaf027 100644 --- a/src/thermophysicalModels/multicomponentThermo/rhoMulticomponentThermo/rhoMulticomponentThermo.C +++ b/src/thermophysicalModels/multicomponentThermo/rhoFluidMulticomponentThermo/rhoFluidMulticomponentThermo.C @@ -23,32 +23,33 @@ License \*---------------------------------------------------------------------------*/ -#include "rhoMulticomponentThermo.H" +#include "rhoFluidMulticomponentThermo.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - defineTypeNameAndDebug(rhoMulticomponentThermo, 0); - defineRunTimeSelectionTable(rhoMulticomponentThermo, fvMesh); + defineTypeNameAndDebug(rhoFluidMulticomponentThermo, 0); + defineRunTimeSelectionTable(rhoFluidMulticomponentThermo, fvMesh); } // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::rhoMulticomponentThermo::New +Foam::autoPtr +Foam::rhoFluidMulticomponentThermo::New ( const fvMesh& mesh, const word& phaseName ) { - return basicThermo::New(mesh, phaseName); + return basicThermo::New(mesh, phaseName); } // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -Foam::rhoMulticomponentThermo::~rhoMulticomponentThermo() +Foam::rhoFluidMulticomponentThermo::~rhoFluidMulticomponentThermo() {} diff --git a/src/thermophysicalModels/multicomponentThermo/rhoMulticomponentThermo/rhoMulticomponentThermo.H b/src/thermophysicalModels/multicomponentThermo/rhoFluidMulticomponentThermo/rhoFluidMulticomponentThermo.H similarity index 84% rename from src/thermophysicalModels/multicomponentThermo/rhoMulticomponentThermo/rhoMulticomponentThermo.H rename to src/thermophysicalModels/multicomponentThermo/rhoFluidMulticomponentThermo/rhoFluidMulticomponentThermo.H index 7afa64f81b..9106a72dcb 100644 --- a/src/thermophysicalModels/multicomponentThermo/rhoMulticomponentThermo/rhoMulticomponentThermo.H +++ b/src/thermophysicalModels/multicomponentThermo/rhoFluidMulticomponentThermo/rhoFluidMulticomponentThermo.H @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see . Class - Foam::rhoMulticomponentThermo + Foam::rhoFluidMulticomponentThermo Description Base-class for multi-component fluid thermodynamic properties based on @@ -32,14 +32,14 @@ See also Foam::basicThermo SourceFiles - rhoMulticomponentThermo.C + rhoFluidMulticomponentThermo.C \*---------------------------------------------------------------------------*/ -#ifndef rhoMulticomponentThermo_H -#define rhoMulticomponentThermo_H +#ifndef rhoFluidMulticomponentThermo_H +#define rhoFluidMulticomponentThermo_H -#include "rhoThermo.H" +#include "rhoFluidThermo.H" #include "fluidMulticomponentThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -48,12 +48,12 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class rhoMulticomponentThermo Declaration + Class rhoFluidMulticomponentThermo Declaration \*---------------------------------------------------------------------------*/ -class rhoMulticomponentThermo +class rhoFluidMulticomponentThermo : - virtual public rhoThermo, + virtual public rhoFluidThermo, virtual public fluidMulticomponentThermo { public: @@ -73,7 +73,7 @@ public: < MulticomponentThermo < - RhoThermo + RhoFluidThermo < BasicThermo > @@ -82,14 +82,14 @@ public: //- Runtime type information - TypeName("rhoMulticomponentThermo"); + TypeName("rhoFluidMulticomponentThermo"); //- Declare run-time constructor selection tables declareRunTimeSelectionTable ( autoPtr, - rhoMulticomponentThermo, + rhoFluidMulticomponentThermo, fvMesh, (const fvMesh& mesh, const word& phaseName), (mesh, phaseName) @@ -99,7 +99,7 @@ public: // Selectors //- Standard selection based on fvMesh - static autoPtr New + static autoPtr New ( const fvMesh&, const word& phaseName=word::null @@ -107,21 +107,21 @@ public: //- Destructor - virtual ~rhoMulticomponentThermo(); + virtual ~rhoFluidMulticomponentThermo(); }; /*---------------------------------------------------------------------------*\ - Class rhoMulticomponentThermo::composite Declaration + Class rhoFluidMulticomponentThermo::composite Declaration \*---------------------------------------------------------------------------*/ -class rhoMulticomponentThermo::composite +class rhoFluidMulticomponentThermo::composite : public basicThermo::implementation, - public fluidThermo::implementation, public rhoThermo::implementation, + public fluidThermo::implementation, public multicomponentThermo::implementation, - public rhoMulticomponentThermo + public rhoFluidMulticomponentThermo { public: @@ -138,8 +138,8 @@ public: ) : basicThermo::implementation(dict, mesh, phaseName), - fluidThermo::implementation(dict, mesh, phaseName), rhoThermo::implementation(dict, mesh, phaseName), + fluidThermo::implementation(dict, mesh, phaseName), multicomponentThermo::implementation ( dict, diff --git a/src/thermophysicalModels/multicomponentThermo/rhoMulticomponentThermo/rhoMulticomponentThermos.C b/src/thermophysicalModels/multicomponentThermo/rhoFluidMulticomponentThermo/rhoFluidMulticomponentThermos.C similarity index 84% rename from src/thermophysicalModels/multicomponentThermo/rhoMulticomponentThermo/rhoMulticomponentThermos.C rename to src/thermophysicalModels/multicomponentThermo/rhoFluidMulticomponentThermo/rhoFluidMulticomponentThermos.C index 62deb11d03..4337ff58f3 100644 --- a/src/thermophysicalModels/multicomponentThermo/rhoMulticomponentThermo/rhoMulticomponentThermos.C +++ b/src/thermophysicalModels/multicomponentThermo/rhoFluidMulticomponentThermo/rhoFluidMulticomponentThermos.C @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "rhoMulticomponentThermo.H" +#include "rhoFluidMulticomponentThermo.H" #include "coefficientMulticomponentMixture.H" #include "coefficientWilkeMulticomponentMixture.H" @@ -43,56 +43,56 @@ namespace Foam forCoeffGases ( makeFluidMulticomponentThermos, - rhoThermo, - rhoMulticomponentThermo, + rhoFluidThermo, + rhoFluidMulticomponentThermo, coefficientMulticomponentMixture ); forCoeffGases ( makeFluidMulticomponentThermos, - rhoThermo, - rhoMulticomponentThermo, + rhoFluidThermo, + rhoFluidMulticomponentThermo, coefficientWilkeMulticomponentMixture ); forGases ( makeFluidMulticomponentThermo, - rhoMulticomponentThermo, + rhoFluidMulticomponentThermo, singleComponentMixture ); forCoeffLiquids ( makeFluidMulticomponentThermos, - rhoThermo, - rhoMulticomponentThermo, + rhoFluidThermo, + rhoFluidMulticomponentThermo, coefficientMulticomponentMixture ); forLiquids ( makeFluidMulticomponentThermos, - rhoThermo, - rhoMulticomponentThermo, + rhoFluidThermo, + rhoFluidMulticomponentThermo, valueMulticomponentMixture ); forLiquids ( makeFluidMulticomponentThermo, - rhoMulticomponentThermo, + rhoFluidMulticomponentThermo, singleComponentMixture ); forTabulated ( makeFluidMulticomponentThermos, - rhoThermo, - rhoMulticomponentThermo, + rhoFluidThermo, + rhoFluidMulticomponentThermo, valueMulticomponentMixture ); forTabulated ( makeFluidMulticomponentThermo, - rhoMulticomponentThermo, + rhoFluidMulticomponentThermo, singleComponentMixture ); } diff --git a/src/thermophysicalModels/solidThermo/solidThermo/solidThermo.C b/src/thermophysicalModels/solidThermo/solidThermo/solidThermo.C index 0aa347aff0..c4d5e022c6 100644 --- a/src/thermophysicalModels/solidThermo/solidThermo/solidThermo.C +++ b/src/thermophysicalModels/solidThermo/solidThermo/solidThermo.C @@ -57,19 +57,6 @@ Foam::solidThermo::implementation::implementation IOobject::NO_WRITE ), dimensionedScalar(phasePropertyName("p", phaseName), dimPressure, NaN) - ), - rho_ - ( - IOobject - ( - phasePropertyName("rho", phaseName), - mesh.time().name(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimDensity ) {} @@ -96,27 +83,4 @@ Foam::solidThermo::implementation::~implementation() {} -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -Foam::tmp Foam::solidThermo::implementation::rho() const -{ - return rho_; -} - - -Foam::tmp Foam::solidThermo::implementation::rho -( - const label patchi -) const -{ - return rho_.boundaryField()[patchi]; -} - - -Foam::volScalarField& Foam::solidThermo::implementation::rho() -{ - return rho_; -} - - // ************************************************************************* // diff --git a/src/thermophysicalModels/solidThermo/solidThermo/solidThermo.H b/src/thermophysicalModels/solidThermo/solidThermo/solidThermo.H index 919f02bfc3..0ff3bdf647 100644 --- a/src/thermophysicalModels/solidThermo/solidThermo/solidThermo.H +++ b/src/thermophysicalModels/solidThermo/solidThermo/solidThermo.H @@ -38,8 +38,9 @@ SourceFiles #ifndef solidThermo_H #define solidThermo_H -#include "pureThermo.H" #include "SolidThermo.H" +#include "pureThermo.H" +#include "rhoThermo.H" #include "uniformGeometricFields.H" #include "fvScalarMatrix.H" @@ -54,7 +55,8 @@ namespace Foam class solidThermo : - virtual public basicThermo + virtual public basicThermo, + virtual public rhoThermo { public: @@ -109,15 +111,6 @@ public: // Member Functions - //- Density [kg/m^3] - virtual tmp rho() const = 0; - - //- Density for patch [kg/m^3] - virtual tmp rho(const label patchi) const = 0; - - //- Return non-const access to the local density field [kg/m^3] - virtual volScalarField& rho() = 0; - //- Return true if thermal conductivity is isotropic virtual bool isotropic() const = 0; @@ -148,9 +141,6 @@ protected: // code will exit. uniformGeometricScalarField p_; - //- Density field [kg/m^3] - volScalarField rho_; - public: @@ -162,18 +152,6 @@ public: //- Destructor virtual ~implementation(); - - - // Member Functions - - //- Density [kg/m^3] - virtual tmp rho() const; - - //- Density for patch [kg/m^3] - virtual tmp rho(const label patchi) const; - - //- Return non-const access to the local density field [kg/m^3] - virtual volScalarField& rho(); }; @@ -185,6 +163,7 @@ class solidThermo::composite : public basicThermo::implementation, public pureThermo, + public rhoThermo::implementation, public solidThermo::implementation { public: @@ -200,6 +179,7 @@ public: ) : basicThermo::implementation(dict, mesh, phaseName), + rhoThermo::implementation(dict, mesh, phaseName), solidThermo::implementation(dict, mesh, phaseName) {} diff --git a/src/twoPhaseModels/compressibleCavitation/Saito/Saito.C b/src/twoPhaseModels/compressibleCavitation/Saito/Saito.C index ed5fc31ee0..1bd68e67ee 100644 --- a/src/twoPhaseModels/compressibleCavitation/Saito/Saito.C +++ b/src/twoPhaseModels/compressibleCavitation/Saito/Saito.C @@ -71,7 +71,10 @@ Foam::compressible::cavitationModels::Saito::Saito // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // Foam::tmp -Foam::compressible::cavitationModels::Saito::fT(const rhoThermo& thermo) const +Foam::compressible::cavitationModels::Saito::fT +( + const rhoFluidThermo& thermo +) const { return sqrt(2*pi*(RR/thermo.W()()())*thermo.T()()); } diff --git a/src/twoPhaseModels/compressibleCavitation/Saito/Saito.H b/src/twoPhaseModels/compressibleCavitation/Saito/Saito.H index 40219b82bf..d6f128bf4b 100644 --- a/src/twoPhaseModels/compressibleCavitation/Saito/Saito.H +++ b/src/twoPhaseModels/compressibleCavitation/Saito/Saito.H @@ -107,7 +107,7 @@ class Saito // Private Member functions //- Return the function of temperature - tmp fT(const rhoThermo& thermo) const; + tmp fT(const rhoFluidThermo& thermo) const; public: diff --git a/src/twoPhaseModels/compressibleCavitation/cavitationModel/cavitationModel.H b/src/twoPhaseModels/compressibleCavitation/cavitationModel/cavitationModel.H index d5f809d896..3ec8169c0f 100644 --- a/src/twoPhaseModels/compressibleCavitation/cavitationModel/cavitationModel.H +++ b/src/twoPhaseModels/compressibleCavitation/cavitationModel/cavitationModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2021-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2021-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -94,13 +94,13 @@ protected: } //- Return the liquid thermo - inline const rhoThermo& thermol() const + inline const rhoFluidThermo& thermol() const { return phases_.thermo(liquidIndex_); } //- Return the vapour thermo - inline const rhoThermo& thermov() const + inline const rhoFluidThermo& thermov() const { return phases_.thermo(!liquidIndex_); } diff --git a/src/twoPhaseModels/compressibleTwoPhases/compressibleTwoPhases.H b/src/twoPhaseModels/compressibleTwoPhases/compressibleTwoPhases.H index 0282530db1..c688537977 100644 --- a/src/twoPhaseModels/compressibleTwoPhases/compressibleTwoPhases.H +++ b/src/twoPhaseModels/compressibleTwoPhases/compressibleTwoPhases.H @@ -25,7 +25,7 @@ Class Foam::compressibleTwoPhaseMixture Description - Interface to two rhoThermo-based phases + Interface to two rhoFluidThermo-based phases SourceFiles compressibleTwoPhases.C @@ -36,7 +36,7 @@ SourceFiles #define compressibleTwoPhases_H #include "twoPhases.H" -#include "rhoThermo.H" +#include "rhoFluidThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -72,13 +72,13 @@ public: // Member Functions //- Return the thermo for phase 1 - virtual const rhoThermo& thermo1() const = 0; + virtual const rhoFluidThermo& thermo1() const = 0; //- Return the thermo for phase 2 - virtual const rhoThermo& thermo2() const = 0; + virtual const rhoFluidThermo& thermo2() const = 0; //- Return the density of a given phase - inline const rhoThermo& thermo(const bool index) const + inline const rhoFluidThermo& thermo(const bool index) const { return index ? thermo2() : thermo1(); } diff --git a/test/multiphaseEuler/interfaceComposition/waterAndIsopropanolEvaporation/system/continuity b/test/multiphaseEuler/interfaceComposition/waterAndIsopropanolEvaporation/system/continuity index 41687f051b..89f647fd2d 100644 --- a/test/multiphaseEuler/interfaceComposition/waterAndIsopropanolEvaporation/system/continuity +++ b/test/multiphaseEuler/interfaceComposition/waterAndIsopropanolEvaporation/system/continuity @@ -23,11 +23,11 @@ codeOptions codeInclude #{ - #include "rhoThermo.H" + #include "rhoFluidThermo.H" namespace Foam { - tmp ea(const rhoThermo& thermo) + tmp ea(const rhoFluidThermo& thermo) { tmp tEa = thermo.he() + thermo.hc(); @@ -70,10 +70,10 @@ codeRead mesh().lookupObject("alpha.gas"); const volScalarField& alphaLiq = mesh().lookupObject("alpha.liquid"); - const rhoThermo& thermoGas = - mesh().lookupObject("physicalProperties.gas"); - const rhoThermo& thermoLiq = - mesh().lookupObject("physicalProperties.liquid"); + const rhoFluidThermo& thermoGas = + mesh().lookupObject("physicalProperties.gas"); + const rhoFluidThermo& thermoLiq = + mesh().lookupObject("physicalProperties.liquid"); *mass0Gas = alphaGas*thermoGas.rho(); *mass0Liq = alphaLiq*thermoLiq.rho(); @@ -124,10 +124,10 @@ codeExecute mesh().lookupObject("alpha.gas"); const volScalarField& alphaLiq = mesh().lookupObject("alpha.liquid"); - const rhoThermo& thermoGas = - mesh().lookupObject("physicalProperties.gas"); - const rhoThermo& thermoLiq = - mesh().lookupObject("physicalProperties.liquid"); + const rhoFluidThermo& thermoGas = + mesh().lookupObject("physicalProperties.gas"); + const rhoFluidThermo& thermoLiq = + mesh().lookupObject("physicalProperties.liquid"); dMassGas = alphaGas*thermoGas.rho() - mass0Gas; dMassLiq = alphaLiq*thermoLiq.rho() - mass0Liq; diff --git a/test/multiphaseEuler/interfaceComposition/waterEvaporation/system/continuity b/test/multiphaseEuler/interfaceComposition/waterEvaporation/system/continuity index 41687f051b..89f647fd2d 100644 --- a/test/multiphaseEuler/interfaceComposition/waterEvaporation/system/continuity +++ b/test/multiphaseEuler/interfaceComposition/waterEvaporation/system/continuity @@ -23,11 +23,11 @@ codeOptions codeInclude #{ - #include "rhoThermo.H" + #include "rhoFluidThermo.H" namespace Foam { - tmp ea(const rhoThermo& thermo) + tmp ea(const rhoFluidThermo& thermo) { tmp tEa = thermo.he() + thermo.hc(); @@ -70,10 +70,10 @@ codeRead mesh().lookupObject("alpha.gas"); const volScalarField& alphaLiq = mesh().lookupObject("alpha.liquid"); - const rhoThermo& thermoGas = - mesh().lookupObject("physicalProperties.gas"); - const rhoThermo& thermoLiq = - mesh().lookupObject("physicalProperties.liquid"); + const rhoFluidThermo& thermoGas = + mesh().lookupObject("physicalProperties.gas"); + const rhoFluidThermo& thermoLiq = + mesh().lookupObject("physicalProperties.liquid"); *mass0Gas = alphaGas*thermoGas.rho(); *mass0Liq = alphaLiq*thermoLiq.rho(); @@ -124,10 +124,10 @@ codeExecute mesh().lookupObject("alpha.gas"); const volScalarField& alphaLiq = mesh().lookupObject("alpha.liquid"); - const rhoThermo& thermoGas = - mesh().lookupObject("physicalProperties.gas"); - const rhoThermo& thermoLiq = - mesh().lookupObject("physicalProperties.liquid"); + const rhoFluidThermo& thermoGas = + mesh().lookupObject("physicalProperties.gas"); + const rhoFluidThermo& thermoLiq = + mesh().lookupObject("physicalProperties.liquid"); dMassGas = alphaGas*thermoGas.rho() - mass0Gas; dMassLiq = alphaLiq*thermoLiq.rho() - mass0Liq; diff --git a/test/multiphaseEuler/thermal/waterEvaporation/system/continuity b/test/multiphaseEuler/thermal/waterEvaporation/system/continuity index c02430165f..7c2dd583e9 100644 --- a/test/multiphaseEuler/thermal/waterEvaporation/system/continuity +++ b/test/multiphaseEuler/thermal/waterEvaporation/system/continuity @@ -23,11 +23,11 @@ codeOptions codeInclude #{ - #include "rhoThermo.H" + #include "rhoFluidThermo.H" namespace Foam { - tmp ea(const rhoThermo& thermo) + tmp ea(const rhoFluidThermo& thermo) { tmp tEa = thermo.he() + thermo.hc(); @@ -70,10 +70,10 @@ codeRead mesh().lookupObject("alpha.steam"); const volScalarField& alphaLiq = mesh().lookupObject("alpha.water"); - const rhoThermo& thermoGas = - mesh().lookupObject("physicalProperties.steam"); - const rhoThermo& thermoLiq = - mesh().lookupObject("physicalProperties.water"); + const rhoFluidThermo& thermoGas = + mesh().lookupObject("physicalProperties.steam"); + const rhoFluidThermo& thermoLiq = + mesh().lookupObject("physicalProperties.water"); *mass0Gas = alphaGas*thermoGas.rho(); *mass0Liq = alphaLiq*thermoLiq.rho(); @@ -124,10 +124,10 @@ codeExecute mesh().lookupObject("alpha.steam"); const volScalarField& alphaLiq = mesh().lookupObject("alpha.water"); - const rhoThermo& thermoGas = - mesh().lookupObject("physicalProperties.steam"); - const rhoThermo& thermoLiq = - mesh().lookupObject("physicalProperties.water"); + const rhoFluidThermo& thermoGas = + mesh().lookupObject("physicalProperties.steam"); + const rhoFluidThermo& thermoLiq = + mesh().lookupObject("physicalProperties.water"); dMassGas = alphaGas*thermoGas.rho() - mass0Gas; dMassLiq = alphaLiq*thermoLiq.rho() - mass0Liq;