solidThermo: Add rhoThermo interface
The old fluid-specific rhoThermo has been split into a non-fluid specific part which is still called rhoThermo, and a fluid-specific part called rhoFluidThermo. The rhoThermo interface has been added to the solidThermo model. This permits models and solvers that access the density to operate on both solid and fluid thermophysical models.
This commit is contained in:
@ -66,7 +66,7 @@ Foam::compressibleVoFphase::compressibleVoFphase
|
||||
Tp.write();
|
||||
}
|
||||
|
||||
thermo_ = rhoThermo::New(mesh, name);
|
||||
thermo_ = rhoFluidThermo::New(mesh, name);
|
||||
thermo_->validate(name, "e");
|
||||
}
|
||||
|
||||
|
||||
@ -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<rhoThermo> thermo_;
|
||||
autoPtr<rhoFluidThermo> 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_();
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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");
|
||||
|
||||
@ -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<rhoThermo> thermo1_;
|
||||
autoPtr<rhoFluidThermo> thermo1_;
|
||||
|
||||
//- Thermo-package of phase 2
|
||||
autoPtr<rhoThermo> thermo2_;
|
||||
autoPtr<rhoFluidThermo> 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_();
|
||||
}
|
||||
|
||||
@ -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_;
|
||||
|
||||
@ -241,7 +241,7 @@ Foam::wordList Foam::solvers::isothermalFilm::alphaTypes() const
|
||||
Foam::solvers::isothermalFilm::isothermalFilm
|
||||
(
|
||||
fvMesh& mesh,
|
||||
autoPtr<rhoThermo> thermoPtr
|
||||
autoPtr<rhoFluidThermo> 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))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -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<rhoThermo> thermoPtr_;
|
||||
autoPtr<rhoFluidThermo> 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<rhoThermo>);
|
||||
isothermalFilm(fvMesh& mesh, autoPtr<rhoFluidThermo>);
|
||||
|
||||
//- Construct from region mesh
|
||||
isothermalFilm(fvMesh& mesh);
|
||||
|
||||
@ -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<const rhoMulticomponentThermo>(interface_.phase().thermo())
|
||||
refCast<const rhoFluidMulticomponentThermo>(interface_.phase().thermo())
|
||||
),
|
||||
otherThermo_(interface_.otherPhase().thermo())
|
||||
{}
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
|
||||
@ -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<const rhoMulticomponentThermo>(otherThermo_);
|
||||
return refCast<const rhoFluidMulticomponentThermo>(otherThermo_);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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<BasePhaseSystem>::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<BasePhaseSystem>::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<rhoMulticomponentThermo>(thermo1)
|
||||
? &refCast<const rhoMulticomponentThermo>(thermo1)
|
||||
: static_cast<const rhoMulticomponentThermo*>(nullptr);
|
||||
const rhoMulticomponentThermo* mcThermoPtr2 =
|
||||
isA<rhoMulticomponentThermo>(thermo2)
|
||||
? &refCast<const rhoMulticomponentThermo>(thermo2)
|
||||
: static_cast<const rhoMulticomponentThermo*>(nullptr);
|
||||
const rhoFluidThermo& thermo1 = phase1.thermo();
|
||||
const rhoFluidThermo& thermo2 = phase2.thermo();
|
||||
const rhoFluidMulticomponentThermo* mcThermoPtr1 =
|
||||
isA<rhoFluidMulticomponentThermo>(thermo1)
|
||||
? &refCast<const rhoFluidMulticomponentThermo>(thermo1)
|
||||
: static_cast<const rhoFluidMulticomponentThermo*>(nullptr);
|
||||
const rhoFluidMulticomponentThermo* mcThermoPtr2 =
|
||||
isA<rhoFluidMulticomponentThermo>(thermo2)
|
||||
? &refCast<const rhoFluidMulticomponentThermo>(thermo2)
|
||||
: static_cast<const rhoFluidMulticomponentThermo*>(nullptr);
|
||||
const volScalarField& he1 = thermo1.he();
|
||||
const volScalarField& he2 = thermo2.he();
|
||||
const volScalarField hs1(thermo1.hs());
|
||||
@ -195,8 +195,8 @@ void Foam::HeatTransferPhaseSystem<BasePhaseSystem>::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<BasePhaseSystem>::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<rhoMulticomponentThermo>(thermo1)
|
||||
? &refCast<const rhoMulticomponentThermo>(thermo1)
|
||||
: static_cast<const rhoMulticomponentThermo*>(nullptr);
|
||||
const rhoMulticomponentThermo* mcThermoPtr2 =
|
||||
isA<rhoMulticomponentThermo>(thermo2)
|
||||
? &refCast<const rhoMulticomponentThermo>(thermo2)
|
||||
: static_cast<const rhoMulticomponentThermo*>(nullptr);
|
||||
const rhoFluidThermo& thermo1 = phase1.thermo();
|
||||
const rhoFluidThermo& thermo2 = phase2.thermo();
|
||||
const rhoFluidMulticomponentThermo* mcThermoPtr1 =
|
||||
isA<rhoFluidMulticomponentThermo>(thermo1)
|
||||
? &refCast<const rhoFluidMulticomponentThermo>(thermo1)
|
||||
: static_cast<const rhoFluidMulticomponentThermo*>(nullptr);
|
||||
const rhoFluidMulticomponentThermo* mcThermoPtr2 =
|
||||
isA<rhoFluidMulticomponentThermo>(thermo2)
|
||||
? &refCast<const rhoFluidMulticomponentThermo>(thermo2)
|
||||
: static_cast<const rhoFluidMulticomponentThermo*>(nullptr);
|
||||
const volScalarField& he1 = thermo1.he();
|
||||
const volScalarField& he2 = thermo2.he();
|
||||
const volScalarField K1(phase1.K());
|
||||
@ -512,8 +512,8 @@ Foam::HeatTransferPhaseSystem<BasePhaseSystem>::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<BasePhaseSystem>::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<BasePhaseSystem>::Li
|
||||
const latentHeatScheme scheme
|
||||
) const
|
||||
{
|
||||
const rhoThermo& thermo1 = interface.phase1().thermo();
|
||||
const rhoThermo& thermo2 = interface.phase2().thermo();
|
||||
const rhoMulticomponentThermo* mcThermoPtr1 =
|
||||
isA<rhoMulticomponentThermo>(thermo1)
|
||||
? &refCast<const rhoMulticomponentThermo>(thermo1)
|
||||
: static_cast<const rhoMulticomponentThermo*>(nullptr);
|
||||
const rhoMulticomponentThermo* mcThermoPtr2 =
|
||||
isA<rhoMulticomponentThermo>(thermo2)
|
||||
? &refCast<const rhoMulticomponentThermo>(thermo2)
|
||||
: static_cast<const rhoMulticomponentThermo*>(nullptr);
|
||||
const rhoFluidThermo& thermo1 = interface.phase1().thermo();
|
||||
const rhoFluidThermo& thermo2 = interface.phase2().thermo();
|
||||
const rhoFluidMulticomponentThermo* mcThermoPtr1 =
|
||||
isA<rhoFluidMulticomponentThermo>(thermo1)
|
||||
? &refCast<const rhoFluidMulticomponentThermo>(thermo1)
|
||||
: static_cast<const rhoFluidMulticomponentThermo*>(nullptr);
|
||||
const rhoFluidMulticomponentThermo* mcThermoPtr2 =
|
||||
isA<rhoFluidMulticomponentThermo>(thermo2)
|
||||
? &refCast<const rhoFluidMulticomponentThermo>(thermo2)
|
||||
: static_cast<const rhoFluidMulticomponentThermo*>(nullptr);
|
||||
const label speciei1 =
|
||||
mcThermoPtr1 ? mcThermoPtr1->species()[specie] : -1;
|
||||
const label speciei2 =
|
||||
@ -668,16 +668,16 @@ Foam::HeatTransferPhaseSystem<BasePhaseSystem>::Li
|
||||
const latentHeatScheme scheme
|
||||
) const
|
||||
{
|
||||
const rhoThermo& thermo1 = interface.phase1().thermo();
|
||||
const rhoThermo& thermo2 = interface.phase2().thermo();
|
||||
const rhoMulticomponentThermo* mcThermoPtr1 =
|
||||
isA<rhoMulticomponentThermo>(thermo1)
|
||||
? &refCast<const rhoMulticomponentThermo>(thermo1)
|
||||
: static_cast<const rhoMulticomponentThermo*>(nullptr);
|
||||
const rhoMulticomponentThermo* mcThermoPtr2 =
|
||||
isA<rhoMulticomponentThermo>(thermo2)
|
||||
? &refCast<const rhoMulticomponentThermo>(thermo2)
|
||||
: static_cast<const rhoMulticomponentThermo*>(nullptr);
|
||||
const rhoFluidThermo& thermo1 = interface.phase1().thermo();
|
||||
const rhoFluidThermo& thermo2 = interface.phase2().thermo();
|
||||
const rhoFluidMulticomponentThermo* mcThermoPtr1 =
|
||||
isA<rhoFluidMulticomponentThermo>(thermo1)
|
||||
? &refCast<const rhoFluidMulticomponentThermo>(thermo1)
|
||||
: static_cast<const rhoFluidMulticomponentThermo*>(nullptr);
|
||||
const rhoFluidMulticomponentThermo* mcThermoPtr2 =
|
||||
isA<rhoFluidMulticomponentThermo>(thermo2)
|
||||
? &refCast<const rhoFluidMulticomponentThermo>(thermo2)
|
||||
: static_cast<const rhoFluidMulticomponentThermo*>(nullptr);
|
||||
const label speciei1 =
|
||||
mcThermoPtr1 ? mcThermoPtr1->species()[specie] : -1;
|
||||
const label speciei2 =
|
||||
|
||||
@ -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<BasePhaseSystem>::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<BasePhaseSystem>::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 =
|
||||
|
||||
@ -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"
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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<BasePhaseSystem>::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());
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
@ -62,13 +62,13 @@ template<class ThermoModel>
|
||||
struct MovingPhaseModelTransportThermoModel;
|
||||
|
||||
template<>
|
||||
struct MovingPhaseModelTransportThermoModel<rhoThermo>
|
||||
struct MovingPhaseModelTransportThermoModel<rhoFluidThermo>
|
||||
{
|
||||
typedef fluidThermo type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct MovingPhaseModelTransportThermoModel<rhoMulticomponentThermo>
|
||||
struct MovingPhaseModelTransportThermoModel<rhoFluidMulticomponentThermo>
|
||||
{
|
||||
typedef fluidMulticomponentThermo type;
|
||||
};
|
||||
|
||||
@ -74,7 +74,7 @@ bool Foam::ThermoPhaseModel<BasePhaseModel, ThermoModel>::isochoric() const
|
||||
|
||||
|
||||
template<class BasePhaseModel, class ThermoModel>
|
||||
const Foam::rhoThermo&
|
||||
const Foam::rhoFluidThermo&
|
||||
Foam::ThermoPhaseModel<BasePhaseModel, ThermoModel>::thermo() const
|
||||
{
|
||||
return thermo_();
|
||||
@ -82,7 +82,7 @@ Foam::ThermoPhaseModel<BasePhaseModel, ThermoModel>::thermo() const
|
||||
|
||||
|
||||
template<class BasePhaseModel, class ThermoModel>
|
||||
Foam::rhoThermo&
|
||||
Foam::rhoFluidThermo&
|
||||
Foam::ThermoPhaseModel<BasePhaseModel, ThermoModel>::thermo()
|
||||
{
|
||||
return thermo_();
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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<phaseModel, rhoThermo>
|
||||
ThermoPhaseModel
|
||||
<
|
||||
phaseModel,
|
||||
rhoFluidThermo
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
@ -78,7 +82,11 @@ namespace Foam
|
||||
<
|
||||
StationaryPhaseModel
|
||||
<
|
||||
ThermoPhaseModel<phaseModel, rhoThermo>
|
||||
ThermoPhaseModel
|
||||
<
|
||||
phaseModel,
|
||||
rhoFluidThermo
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
@ -102,7 +110,11 @@ namespace Foam
|
||||
<
|
||||
MovingPhaseModel
|
||||
<
|
||||
ThermoPhaseModel<phaseModel, rhoThermo>
|
||||
ThermoPhaseModel
|
||||
<
|
||||
phaseModel,
|
||||
rhoFluidThermo
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
@ -126,7 +138,11 @@ namespace Foam
|
||||
<
|
||||
StationaryPhaseModel
|
||||
<
|
||||
ThermoPhaseModel<phaseModel, rhoThermo>
|
||||
ThermoPhaseModel
|
||||
<
|
||||
phaseModel,
|
||||
rhoFluidThermo
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
@ -150,7 +166,11 @@ namespace Foam
|
||||
<
|
||||
MovingPhaseModel
|
||||
<
|
||||
ThermoPhaseModel<phaseModel, rhoMulticomponentThermo>
|
||||
ThermoPhaseModel
|
||||
<
|
||||
phaseModel,
|
||||
rhoFluidMulticomponentThermo
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
@ -184,7 +204,11 @@ namespace Foam
|
||||
<
|
||||
MovingPhaseModel
|
||||
<
|
||||
ThermoPhaseModel<phaseModel, rhoMulticomponentThermo>
|
||||
ThermoPhaseModel
|
||||
<
|
||||
phaseModel,
|
||||
rhoFluidMulticomponentThermo
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
@ -208,7 +232,11 @@ namespace Foam
|
||||
<
|
||||
MovingPhaseModel
|
||||
<
|
||||
ThermoPhaseModel<phaseModel, rhoMulticomponentThermo>
|
||||
ThermoPhaseModel
|
||||
<
|
||||
phaseModel,
|
||||
rhoFluidMulticomponentThermo
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
|
||||
@ -22,7 +22,7 @@ type
|
||||
typeRenamed
|
||||
(
|
||||
hePsiThermo psiMulticomponentThermo
|
||||
heRhoThermo rhoMulticomponentThermo
|
||||
heRhoThermo rhoFluidMulticomponentThermo
|
||||
);
|
||||
|
||||
energy
|
||||
|
||||
@ -22,7 +22,7 @@ type
|
||||
typeRenamed
|
||||
(
|
||||
hePsiThermo psiThermo
|
||||
heRhoThermo rhoThermo
|
||||
heRhoThermo rhoFluidThermo
|
||||
);
|
||||
|
||||
energy
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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<class MixtureType>
|
||||
using DerivedThermoType =
|
||||
LiquidThermo<RhoThermo<BasicThermo<MixtureType, composite>>>;
|
||||
LiquidThermo<RhoFluidThermo<BasicThermo<MixtureType, composite>>>;
|
||||
|
||||
|
||||
//- 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)
|
||||
{}
|
||||
};
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -75,6 +75,12 @@ void Foam::psiThermo::correctRho(const Foam::volScalarField& deltaRho)
|
||||
{}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::psiThermo::renameRho()
|
||||
{
|
||||
return rho();
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::psiThermo::implementation::rho() const
|
||||
{
|
||||
return p()*psi();
|
||||
@ -90,10 +96,4 @@ Foam::tmp<Foam::scalarField> Foam::psiThermo::implementation::rho
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::psiThermo::implementation::renameRho()
|
||||
{
|
||||
return rho();
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -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<volScalarField> 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<volScalarField> renameRho() = 0;
|
||||
virtual tmp<volScalarField> 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<scalarField> 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<volScalarField> renameRho();
|
||||
|
||||
|
||||
// Member Operators
|
||||
|
||||
|
||||
@ -23,12 +23,12 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "RhoThermo.H"
|
||||
#include "RhoFluidThermo.H"
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
template<class BaseThermo>
|
||||
void Foam::RhoThermo<BaseThermo>::calculate()
|
||||
void Foam::RhoFluidThermo<BaseThermo>::calculate()
|
||||
{
|
||||
const scalarField& hCells = this->he();
|
||||
const scalarField& pCells = this->p_;
|
||||
@ -163,7 +163,7 @@ void Foam::RhoThermo<BaseThermo>::calculate()
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class BaseThermo>
|
||||
Foam::RhoThermo<BaseThermo>::RhoThermo
|
||||
Foam::RhoFluidThermo<BaseThermo>::RhoFluidThermo
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
@ -178,14 +178,14 @@ Foam::RhoThermo<BaseThermo>::RhoThermo
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class BaseThermo>
|
||||
Foam::RhoThermo<BaseThermo>::~RhoThermo()
|
||||
Foam::RhoFluidThermo<BaseThermo>::~RhoFluidThermo()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class BaseThermo>
|
||||
void Foam::RhoThermo<BaseThermo>::correct()
|
||||
void Foam::RhoFluidThermo<BaseThermo>::correct()
|
||||
{
|
||||
if (BaseThermo::debug)
|
||||
{
|
||||
@ -22,18 +22,18 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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 BaseThermo>
|
||||
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<BaseThermo>&) = delete;
|
||||
RhoFluidThermo(const RhoFluidThermo<BaseThermo>&) = delete;
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~RhoThermo();
|
||||
virtual ~RhoFluidThermo();
|
||||
|
||||
|
||||
// Member Functions
|
||||
@ -81,7 +81,7 @@ public:
|
||||
// Member Operators
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const RhoThermo<BaseThermo>&) = delete;
|
||||
void operator=(const RhoFluidThermo<BaseThermo>&) = delete;
|
||||
};
|
||||
|
||||
|
||||
@ -92,7 +92,7 @@ public:
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
#include "RhoThermo.C"
|
||||
#include "RhoFluidThermo.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#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> Foam::rhoFluidThermo::New
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
)
|
||||
{
|
||||
return basicThermo::New<rhoFluidThermo>(mesh, phaseName);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::rhoFluidThermo::~rhoFluidThermo()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::rhoFluidThermo::renameRho()
|
||||
{
|
||||
rho().rename(phasePropertyName(Foam::typedName<rhoFluidThermo>("rho")));
|
||||
return rho();
|
||||
}
|
||||
|
||||
|
||||
void Foam::rhoFluidThermo::correctRho(const volScalarField& deltaRho)
|
||||
{
|
||||
rho() += deltaRho;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
163
src/thermophysicalModels/basic/rhoFluidThermo/rhoFluidThermo.H
Normal file
163
src/thermophysicalModels/basic/rhoFluidThermo/rhoFluidThermo.H
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
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<class MixtureType>
|
||||
using DerivedThermoType =
|
||||
RhoFluidThermo<BasicThermo<MixtureType, composite>>;
|
||||
|
||||
//- 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<rhoFluidThermo> 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<volScalarField> 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<class MixtureType>
|
||||
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
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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> Foam::rhoThermo::New
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
)
|
||||
{
|
||||
return basicThermo::New<rhoThermo>(mesh, phaseName);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::rhoThermo::~rhoThermo()
|
||||
@ -85,7 +62,8 @@ Foam::rhoThermo::implementation::~implementation()
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::rhoThermo::implementation::rho() const
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::rhoThermo::implementation::rho() const
|
||||
{
|
||||
return rho_;
|
||||
}
|
||||
@ -100,23 +78,10 @@ Foam::tmp<Foam::scalarField> Foam::rhoThermo::implementation::rho
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::rhoThermo::implementation::renameRho()
|
||||
{
|
||||
rho_.rename(phasePropertyName(Foam::typedName<rhoThermo>("rho")));
|
||||
return rho_;
|
||||
}
|
||||
|
||||
|
||||
Foam::volScalarField& Foam::rhoThermo::implementation::rho()
|
||||
{
|
||||
return rho_;
|
||||
}
|
||||
|
||||
|
||||
void Foam::rhoThermo::implementation::correctRho(const volScalarField& deltaRho)
|
||||
{
|
||||
rho_ += deltaRho;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -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<class MixtureType>
|
||||
using DerivedThermoType =
|
||||
RhoThermo<BasicThermo<MixtureType, composite>>;
|
||||
|
||||
//- 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<rhoThermo> New
|
||||
(
|
||||
const fvMesh&,
|
||||
const word& phaseName=word::null
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~rhoThermo();
|
||||
@ -116,16 +75,8 @@ public:
|
||||
//- Density for patch [kg/m^3]
|
||||
virtual tmp<scalarField> 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<volScalarField> 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<scalarField> 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<volScalarField> 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<class MixtureType>
|
||||
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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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> Foam::rhoMulticomponentThermo::New
|
||||
Foam::autoPtr<Foam::rhoFluidMulticomponentThermo>
|
||||
Foam::rhoFluidMulticomponentThermo::New
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
)
|
||||
{
|
||||
return basicThermo::New<rhoMulticomponentThermo>(mesh, phaseName);
|
||||
return basicThermo::New<rhoFluidMulticomponentThermo>(mesh, phaseName);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::rhoMulticomponentThermo::~rhoMulticomponentThermo()
|
||||
Foam::rhoFluidMulticomponentThermo::~rhoFluidMulticomponentThermo()
|
||||
{}
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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<MixtureType, composite>
|
||||
>
|
||||
@ -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<rhoMulticomponentThermo> New
|
||||
static autoPtr<rhoFluidMulticomponentThermo> 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,
|
||||
@ -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
|
||||
);
|
||||
}
|
||||
@ -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::volScalarField> Foam::solidThermo::implementation::rho() const
|
||||
{
|
||||
return rho_;
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::solidThermo::implementation::rho
|
||||
(
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
return rho_.boundaryField()[patchi];
|
||||
}
|
||||
|
||||
|
||||
Foam::volScalarField& Foam::solidThermo::implementation::rho()
|
||||
{
|
||||
return rho_;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -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<volScalarField> rho() const = 0;
|
||||
|
||||
//- Density for patch [kg/m^3]
|
||||
virtual tmp<scalarField> 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<volScalarField> rho() const;
|
||||
|
||||
//- Density for patch [kg/m^3]
|
||||
virtual tmp<scalarField> 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)
|
||||
{}
|
||||
|
||||
|
||||
@ -71,7 +71,10 @@ Foam::compressible::cavitationModels::Saito::Saito
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField::Internal>
|
||||
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()());
|
||||
}
|
||||
|
||||
@ -107,7 +107,7 @@ class Saito
|
||||
// Private Member functions
|
||||
|
||||
//- Return the function of temperature
|
||||
tmp<volScalarField::Internal> fT(const rhoThermo& thermo) const;
|
||||
tmp<volScalarField::Internal> fT(const rhoFluidThermo& thermo) const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -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_);
|
||||
}
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
@ -23,11 +23,11 @@ codeOptions
|
||||
|
||||
codeInclude
|
||||
#{
|
||||
#include "rhoThermo.H"
|
||||
#include "rhoFluidThermo.H"
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
tmp<volScalarField> ea(const rhoThermo& thermo)
|
||||
tmp<volScalarField> ea(const rhoFluidThermo& thermo)
|
||||
{
|
||||
tmp<volScalarField> tEa = thermo.he() + thermo.hc();
|
||||
|
||||
@ -70,10 +70,10 @@ codeRead
|
||||
mesh().lookupObject<volScalarField>("alpha.gas");
|
||||
const volScalarField& alphaLiq =
|
||||
mesh().lookupObject<volScalarField>("alpha.liquid");
|
||||
const rhoThermo& thermoGas =
|
||||
mesh().lookupObject<rhoThermo>("physicalProperties.gas");
|
||||
const rhoThermo& thermoLiq =
|
||||
mesh().lookupObject<rhoThermo>("physicalProperties.liquid");
|
||||
const rhoFluidThermo& thermoGas =
|
||||
mesh().lookupObject<rhoFluidThermo>("physicalProperties.gas");
|
||||
const rhoFluidThermo& thermoLiq =
|
||||
mesh().lookupObject<rhoFluidThermo>("physicalProperties.liquid");
|
||||
|
||||
*mass0Gas = alphaGas*thermoGas.rho();
|
||||
*mass0Liq = alphaLiq*thermoLiq.rho();
|
||||
@ -124,10 +124,10 @@ codeExecute
|
||||
mesh().lookupObject<volScalarField>("alpha.gas");
|
||||
const volScalarField& alphaLiq =
|
||||
mesh().lookupObject<volScalarField>("alpha.liquid");
|
||||
const rhoThermo& thermoGas =
|
||||
mesh().lookupObject<rhoThermo>("physicalProperties.gas");
|
||||
const rhoThermo& thermoLiq =
|
||||
mesh().lookupObject<rhoThermo>("physicalProperties.liquid");
|
||||
const rhoFluidThermo& thermoGas =
|
||||
mesh().lookupObject<rhoFluidThermo>("physicalProperties.gas");
|
||||
const rhoFluidThermo& thermoLiq =
|
||||
mesh().lookupObject<rhoFluidThermo>("physicalProperties.liquid");
|
||||
|
||||
dMassGas = alphaGas*thermoGas.rho() - mass0Gas;
|
||||
dMassLiq = alphaLiq*thermoLiq.rho() - mass0Liq;
|
||||
|
||||
@ -23,11 +23,11 @@ codeOptions
|
||||
|
||||
codeInclude
|
||||
#{
|
||||
#include "rhoThermo.H"
|
||||
#include "rhoFluidThermo.H"
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
tmp<volScalarField> ea(const rhoThermo& thermo)
|
||||
tmp<volScalarField> ea(const rhoFluidThermo& thermo)
|
||||
{
|
||||
tmp<volScalarField> tEa = thermo.he() + thermo.hc();
|
||||
|
||||
@ -70,10 +70,10 @@ codeRead
|
||||
mesh().lookupObject<volScalarField>("alpha.gas");
|
||||
const volScalarField& alphaLiq =
|
||||
mesh().lookupObject<volScalarField>("alpha.liquid");
|
||||
const rhoThermo& thermoGas =
|
||||
mesh().lookupObject<rhoThermo>("physicalProperties.gas");
|
||||
const rhoThermo& thermoLiq =
|
||||
mesh().lookupObject<rhoThermo>("physicalProperties.liquid");
|
||||
const rhoFluidThermo& thermoGas =
|
||||
mesh().lookupObject<rhoFluidThermo>("physicalProperties.gas");
|
||||
const rhoFluidThermo& thermoLiq =
|
||||
mesh().lookupObject<rhoFluidThermo>("physicalProperties.liquid");
|
||||
|
||||
*mass0Gas = alphaGas*thermoGas.rho();
|
||||
*mass0Liq = alphaLiq*thermoLiq.rho();
|
||||
@ -124,10 +124,10 @@ codeExecute
|
||||
mesh().lookupObject<volScalarField>("alpha.gas");
|
||||
const volScalarField& alphaLiq =
|
||||
mesh().lookupObject<volScalarField>("alpha.liquid");
|
||||
const rhoThermo& thermoGas =
|
||||
mesh().lookupObject<rhoThermo>("physicalProperties.gas");
|
||||
const rhoThermo& thermoLiq =
|
||||
mesh().lookupObject<rhoThermo>("physicalProperties.liquid");
|
||||
const rhoFluidThermo& thermoGas =
|
||||
mesh().lookupObject<rhoFluidThermo>("physicalProperties.gas");
|
||||
const rhoFluidThermo& thermoLiq =
|
||||
mesh().lookupObject<rhoFluidThermo>("physicalProperties.liquid");
|
||||
|
||||
dMassGas = alphaGas*thermoGas.rho() - mass0Gas;
|
||||
dMassLiq = alphaLiq*thermoLiq.rho() - mass0Liq;
|
||||
|
||||
@ -23,11 +23,11 @@ codeOptions
|
||||
|
||||
codeInclude
|
||||
#{
|
||||
#include "rhoThermo.H"
|
||||
#include "rhoFluidThermo.H"
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
tmp<volScalarField> ea(const rhoThermo& thermo)
|
||||
tmp<volScalarField> ea(const rhoFluidThermo& thermo)
|
||||
{
|
||||
tmp<volScalarField> tEa = thermo.he() + thermo.hc();
|
||||
|
||||
@ -70,10 +70,10 @@ codeRead
|
||||
mesh().lookupObject<volScalarField>("alpha.steam");
|
||||
const volScalarField& alphaLiq =
|
||||
mesh().lookupObject<volScalarField>("alpha.water");
|
||||
const rhoThermo& thermoGas =
|
||||
mesh().lookupObject<rhoThermo>("physicalProperties.steam");
|
||||
const rhoThermo& thermoLiq =
|
||||
mesh().lookupObject<rhoThermo>("physicalProperties.water");
|
||||
const rhoFluidThermo& thermoGas =
|
||||
mesh().lookupObject<rhoFluidThermo>("physicalProperties.steam");
|
||||
const rhoFluidThermo& thermoLiq =
|
||||
mesh().lookupObject<rhoFluidThermo>("physicalProperties.water");
|
||||
|
||||
*mass0Gas = alphaGas*thermoGas.rho();
|
||||
*mass0Liq = alphaLiq*thermoLiq.rho();
|
||||
@ -124,10 +124,10 @@ codeExecute
|
||||
mesh().lookupObject<volScalarField>("alpha.steam");
|
||||
const volScalarField& alphaLiq =
|
||||
mesh().lookupObject<volScalarField>("alpha.water");
|
||||
const rhoThermo& thermoGas =
|
||||
mesh().lookupObject<rhoThermo>("physicalProperties.steam");
|
||||
const rhoThermo& thermoLiq =
|
||||
mesh().lookupObject<rhoThermo>("physicalProperties.water");
|
||||
const rhoFluidThermo& thermoGas =
|
||||
mesh().lookupObject<rhoFluidThermo>("physicalProperties.steam");
|
||||
const rhoFluidThermo& thermoLiq =
|
||||
mesh().lookupObject<rhoFluidThermo>("physicalProperties.water");
|
||||
|
||||
dMassGas = alphaGas*thermoGas.rho() - mass0Gas;
|
||||
dMassLiq = alphaLiq*thermoLiq.rho() - mass0Liq;
|
||||
|
||||
Reference in New Issue
Block a user