multiphaseEuler: Updated to us the new phaseSolidThermophysicalTransportModel class
for thermophysical transport within stationary solid phases. This provides a consistent interface to heat transport within solids for single and now multiphase solvers so that for example the wallHeatFlux functionObject can now be used with multiphaseEuler, see tutorials/multiphaseEuler/boilingBed. Also this development supports anisotropic thermal conductivity within the stationary solid regions which was not possible previously. The tutorials/multiphaseEuler/bed and tutorials/multiphaseEuler/boilingBed tutorial cases have been updated for phaseSolidThermophysicalTransportModel by changing the thermo type in physicalProperties.solid to heSolidThermo. This change will need to be made to all multiphaseEuler cases involving stationary phases.
This commit is contained in:
@ -498,7 +498,10 @@ void Foam::solvers::multiphaseEuler::cellPressureCorrector()
|
||||
forAll(phases, phasei)
|
||||
{
|
||||
phaseModel& phase = phases_[phasei];
|
||||
phase.rho() += phase.thermo().psi()*(p_rgh - p_rgh_0);
|
||||
if (!phase.incompressible())
|
||||
{
|
||||
phase.rho() += phase.fluidThermo().psi()*(p_rgh - p_rgh_0);
|
||||
}
|
||||
}
|
||||
|
||||
// Update mass transfer rates for change in p_rgh
|
||||
|
||||
@ -75,7 +75,7 @@ Foam::solvers::multiphaseEuler::compressibilityEqns
|
||||
const surfaceScalarField phid
|
||||
(
|
||||
IOobject::groupName("phid", phase.name()),
|
||||
fvc::interpolate(phase.thermo().psi())*phase.phi()
|
||||
fvc::interpolate(phase.fluidThermo().psi())*phase.phi()
|
||||
);
|
||||
|
||||
pEqnComp +=
|
||||
@ -83,7 +83,7 @@ Foam::solvers::multiphaseEuler::compressibilityEqns
|
||||
(
|
||||
(alpha/rho)*
|
||||
(
|
||||
phase.thermo().psi()*fvm::ddt(p_rgh)
|
||||
phase.fluidThermo().psi()*fvm::ddt(p_rgh)
|
||||
+ fvm::div(phid, p_rgh)
|
||||
- fvm::Sp(fvc::div(phid), p_rgh)
|
||||
)
|
||||
@ -94,7 +94,7 @@ Foam::solvers::multiphaseEuler::compressibilityEqns
|
||||
else
|
||||
{
|
||||
pEqnComp +=
|
||||
(alpha*phase.thermo().psi()/rho)
|
||||
(alpha*phase.fluidThermo().psi()/rho)
|
||||
*correction(fvm::ddt(p_rgh));
|
||||
}
|
||||
}
|
||||
|
||||
@ -387,7 +387,10 @@ void Foam::solvers::multiphaseEuler::facePressureCorrector()
|
||||
forAll(phases, phasei)
|
||||
{
|
||||
phaseModel& phase = phases_[phasei];
|
||||
phase.rho() += phase.thermo().psi()*(p_rgh - p_rgh_0);
|
||||
if (!phase.incompressible())
|
||||
{
|
||||
phase.rho() += phase.fluidThermo().psi()*(p_rgh - p_rgh_0);
|
||||
}
|
||||
}
|
||||
|
||||
// Update mass transfer rates for change in p_rgh
|
||||
|
||||
@ -145,13 +145,14 @@ void Foam::fv::interfaceTurbulenceDamping::addRhoSup
|
||||
|
||||
volScalarField::Internal aSqrnu
|
||||
(
|
||||
movingPhases[0]*sqr(movingPhases[0].thermo().nu()()())
|
||||
movingPhases[0]*sqr(movingPhases[0].fluidThermo().nu()()())
|
||||
);
|
||||
|
||||
for (label phasei=1; phasei<movingPhases.size(); phasei++)
|
||||
{
|
||||
aSqrnu +=
|
||||
movingPhases[phasei]*sqr(movingPhases[phasei].thermo().nu()()());
|
||||
movingPhases[phasei]
|
||||
*sqr(movingPhases[phasei].fluidThermo().nu()()());
|
||||
}
|
||||
|
||||
if (field.name() == "epsilon")
|
||||
@ -275,7 +276,7 @@ void Foam::fv::interfaceTurbulenceDamping::addSup
|
||||
|
||||
const volScalarField::Internal aSqrnu
|
||||
(
|
||||
alpha*sqr(phase_.thermo().nu()()())
|
||||
alpha*sqr(phase_.fluidThermo().nu()()())
|
||||
);
|
||||
|
||||
if (field.name() == IOobject::groupName("epsilon", phaseName_))
|
||||
|
||||
@ -58,7 +58,7 @@ Foam::dragModels::AttouFerschneider::KGasLiquid
|
||||
const volScalarField magURel(mag(gas.U() - liquid.U()));
|
||||
|
||||
return
|
||||
E2_*gas.thermo().mu()*sqr(oneMinusGas/solid.d())*sqr(cbrtR)
|
||||
E2_*gas.fluidThermo().mu()*sqr(oneMinusGas/solid.d())*sqr(cbrtR)
|
||||
/max(gas, gas.residualAlpha())
|
||||
+ E2_*gas.rho()*magURel*(1 - gas)/solid.d()*cbrtR;
|
||||
}
|
||||
@ -78,7 +78,7 @@ Foam::dragModels::AttouFerschneider::KGasSolid
|
||||
);
|
||||
|
||||
return
|
||||
E1_*gas.thermo().mu()*sqr(oneMinusGas/solid.d())*sqr(cbrtR)
|
||||
E1_*gas.fluidThermo().mu()*sqr(oneMinusGas/solid.d())*sqr(cbrtR)
|
||||
/max(gas, gas.residualAlpha())
|
||||
+ E2_*gas.rho()*mag(gas.U())*(1 - gas)/solid.d()*cbrtR;
|
||||
}
|
||||
@ -94,7 +94,7 @@ Foam::dragModels::AttouFerschneider::KLiquidSolid
|
||||
const phaseModel& gas = liquid.fluid().phases()[gasName_];
|
||||
|
||||
return
|
||||
E1_*liquid.thermo().mu()
|
||||
E1_*liquid.fluidThermo().mu()
|
||||
*sqr(max(solid, solid.residualAlpha())/solid.d())
|
||||
/max(liquid, liquid.residualAlpha())
|
||||
+ E2_*liquid.rho()*mag(gas.U())*solid/solid.d();
|
||||
|
||||
@ -65,8 +65,8 @@ Foam::dragModels::IshiiZuber::CdRe() const
|
||||
const volScalarField Re(interface_.Re());
|
||||
const volScalarField Eo(interface_.Eo());
|
||||
|
||||
const volScalarField mud(interface_.dispersed().thermo().mu());
|
||||
const volScalarField muc(interface_.continuous().thermo().mu());
|
||||
const volScalarField mud(interface_.dispersed().fluidThermo().mu());
|
||||
const volScalarField muc(interface_.continuous().fluidThermo().mu());
|
||||
|
||||
const volScalarField muStar((mud + 0.4*muc)/(mud + muc));
|
||||
|
||||
|
||||
@ -71,7 +71,7 @@ Foam::dragModels::aerosolDrag::~aerosolDrag()
|
||||
Foam::tmp<Foam::volScalarField> Foam::dragModels::aerosolDrag::CdRe() const
|
||||
{
|
||||
const volScalarField& T = interface_.continuous().thermo().T();
|
||||
const volScalarField& p = interface_.continuous().thermo().p();
|
||||
const volScalarField& p = interface_.continuous().fluidThermo().p();
|
||||
tmp<volScalarField> td(interface_.dispersed().d());
|
||||
const volScalarField& d = td();
|
||||
|
||||
|
||||
@ -62,7 +62,7 @@ Foam::tmp<Foam::volScalarField> Foam::dragModels::dispersedDragModel::Ki() const
|
||||
*CdRe()
|
||||
*swarmCorrection_->Cs()
|
||||
*interface_.continuous().rho()
|
||||
*interface_.continuous().thermo().nu()
|
||||
*interface_.continuous().fluidThermo().nu()
|
||||
/sqr(interface_.dispersed().d());
|
||||
}
|
||||
|
||||
|
||||
@ -75,8 +75,8 @@ Foam::tmp<Foam::volScalarField> Foam::dragModels::segregated::K() const
|
||||
const volScalarField::Internal& rho1(interface_.phase1().rho());
|
||||
const volScalarField::Internal& rho2(interface_.phase2().rho());
|
||||
|
||||
tmp<volScalarField> tnu1(interface_.phase1().thermo().nu());
|
||||
tmp<volScalarField> tnu2(interface_.phase2().thermo().nu());
|
||||
tmp<volScalarField> tnu1(interface_.phase1().fluidThermo().nu());
|
||||
tmp<volScalarField> tnu2(interface_.phase2().fluidThermo().nu());
|
||||
|
||||
const volScalarField::Internal& nu1(tnu1());
|
||||
const volScalarField::Internal& nu2(tnu2());
|
||||
|
||||
@ -83,7 +83,7 @@ Foam::dragModels::timeScaleFilteredDrag::CdRe() const
|
||||
/0.75
|
||||
/swarmCorrection_->Cs()
|
||||
/interface_.continuous().rho()
|
||||
/interface_.continuous().thermo().nu()
|
||||
/interface_.continuous().fluidThermo().nu()
|
||||
/minRelaxTime_
|
||||
);
|
||||
|
||||
|
||||
@ -71,7 +71,7 @@ class interfaceCompositionModel
|
||||
const rhoFluidMulticomponentThermo& thermo_;
|
||||
|
||||
//- General thermo model for the other side of the interface
|
||||
const rhoFluidThermo& otherThermo_;
|
||||
const rhoThermo& otherThermo_;
|
||||
|
||||
|
||||
public:
|
||||
@ -133,7 +133,7 @@ public:
|
||||
inline const rhoFluidMulticomponentThermo& thermo() const;
|
||||
|
||||
//- Return the other thermo
|
||||
inline const rhoFluidThermo& otherThermo() const;
|
||||
inline const rhoThermo& otherThermo() const;
|
||||
|
||||
//- Return the other multicomponent thermo
|
||||
inline const rhoFluidMulticomponentThermo&
|
||||
|
||||
@ -48,7 +48,7 @@ Foam::interfaceCompositionModel::thermo() const
|
||||
}
|
||||
|
||||
|
||||
const Foam::rhoFluidThermo& Foam::interfaceCompositionModel::otherThermo() const
|
||||
const Foam::rhoThermo& Foam::interfaceCompositionModel::otherThermo() const
|
||||
{
|
||||
return otherThermo_;
|
||||
}
|
||||
|
||||
@ -67,7 +67,7 @@ Foam::tmp<Foam::volScalarField> Foam::liftModels::LegendreMagnaudet::Cl() const
|
||||
const volScalarField Sr
|
||||
(
|
||||
sqr(interface_.dispersed().d())
|
||||
/(Re*interface_.continuous().thermo().nu())
|
||||
/(Re*interface_.continuous().fluidThermo().nu())
|
||||
*mag(fvc::grad(interface_.continuous().U()))
|
||||
);
|
||||
|
||||
|
||||
@ -66,7 +66,7 @@ Foam::tmp<Foam::volScalarField> Foam::liftModels::Moraga::Cl() const
|
||||
volScalarField sqrSr
|
||||
(
|
||||
sqr(interface_.dispersed().d())
|
||||
/interface_.continuous().thermo().nu()
|
||||
/interface_.continuous().fluidThermo().nu()
|
||||
*mag(fvc::grad(interface_.continuous().U()))
|
||||
);
|
||||
|
||||
|
||||
@ -69,7 +69,7 @@ Foam::tmp<Foam::volScalarField> Foam::liftModels::SaffmanMei::Cl() const
|
||||
mag(fvc::curl(interface_.continuous().U()))
|
||||
*sqr(interface_.dispersed().d())
|
||||
/(
|
||||
interface_.continuous().thermo().nu()
|
||||
interface_.continuous().fluidThermo().nu()
|
||||
+ dimensionedScalar(dimViscosity, small)
|
||||
)
|
||||
);
|
||||
|
||||
@ -87,7 +87,7 @@ Foam::phaseTransferModels::cavitation::dmdtf() const
|
||||
|
||||
const Pair<tmp<volScalarField::Internal>> coeffs(cavitation_->mDot12P());
|
||||
|
||||
const volScalarField::Internal& p = interface_.phase1().thermo().p();
|
||||
const volScalarField::Internal& p = interface_.phase1().fluidThermo().p();
|
||||
const volScalarField::Internal pSat1(cavitation_->pSat1());
|
||||
const volScalarField::Internal pSat2(cavitation_->pSat2());
|
||||
|
||||
|
||||
@ -169,7 +169,7 @@ Foam::solvers::multiphaseEuler::multiphaseEuler(fvMesh& mesh)
|
||||
|
||||
phi_(fluid_.phi()),
|
||||
|
||||
p_(phases_[0].thermo().p()),
|
||||
p_(phases_[0].fluidThermo().p()),
|
||||
|
||||
p_rgh(buoyancy.p_rgh),
|
||||
|
||||
|
||||
@ -7,6 +7,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/multicomponentThermo/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/saturationModels/lnInclude \
|
||||
-I$(LIB_SRC)/twoPhaseModels/twoPhaseMixture/lnInclude \
|
||||
-I$(LIB_SRC)/twoPhaseModels/compressibleTwoPhases/lnInclude \
|
||||
@ -16,6 +17,8 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/phaseCompressible/lnInclude \
|
||||
-I$(LIB_SRC)/ThermophysicalTransportModels/thermophysicalTransportModel/lnInclude \
|
||||
-I$(LIB_SRC)/ThermophysicalTransportModels/fluid/lnInclude \
|
||||
-I$(LIB_SRC)/ThermophysicalTransportModels/solid/lnInclude \
|
||||
-I$(LIB_SRC)/ThermophysicalTransportModels/phaseSolid/lnInclude \
|
||||
-I$(LIB_SRC)/combustionModels/lnInclude
|
||||
|
||||
LIB_LIBS = \
|
||||
@ -26,4 +29,5 @@ LIB_LIBS = \
|
||||
-lmultiphaseProperties \
|
||||
-lphaseCompressibleMomentumTransportModels \
|
||||
-lphaseFluidMulticomponentThermophysicalTransportModels \
|
||||
-lphaseSolidThermophysicalTransportModels \
|
||||
-lcombustionModels
|
||||
|
||||
@ -92,7 +92,7 @@ Foam::tmp<Foam::volScalarField> Foam::diameterModels::IATEsource::Ut() const
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::diameterModels::IATEsource::Re() const
|
||||
{
|
||||
return max(Ur()*phase().d()/otherPhase().thermo().nu(), scalar(1e-3));
|
||||
return max(Ur()*phase().d()/otherPhase().fluidThermo().nu(), scalar(1e-3));
|
||||
}
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::diameterModels::IATEsource::CD() const
|
||||
@ -118,7 +118,7 @@ Foam::tmp<Foam::volScalarField> Foam::diameterModels::IATEsource::Mo() const
|
||||
phase().db().lookupObject<uniformDimensionedVectorField>("g");
|
||||
|
||||
return
|
||||
mag(g)*pow4(otherPhase().thermo().nu())*sqr(otherPhase().rho())
|
||||
mag(g)*pow4(otherPhase().fluidThermo().nu())*sqr(otherPhase().rho())
|
||||
*(otherPhase().rho() - phase().rho())
|
||||
/pow3(sigma());
|
||||
}
|
||||
|
||||
@ -119,7 +119,7 @@ void Foam::diameterModels::linearTsub::correct()
|
||||
|
||||
const volScalarField Tsub
|
||||
(
|
||||
satModel.Tsat(liquid.thermo().p()) - liquid.thermo().T()
|
||||
satModel.Tsat(liquid.fluidThermo().p()) - liquid.thermo().T()
|
||||
);
|
||||
|
||||
d_ = max
|
||||
|
||||
@ -111,14 +111,14 @@ Foam::tmp<Foam::volVectorField> Foam::dispersedPhaseInterface::Ur() const
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::dispersedPhaseInterface::Re() const
|
||||
{
|
||||
return magUr()*dispersed().d()/continuous().thermo().nu();
|
||||
return magUr()*dispersed().d()/continuous().fluidThermo().nu();
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::dispersedPhaseInterface::Pr() const
|
||||
{
|
||||
return
|
||||
continuous().thermo().nu()
|
||||
continuous().fluidThermo().nu()
|
||||
*continuous().thermo().Cp()
|
||||
*continuous().rho()
|
||||
/continuous().thermo().kappa();
|
||||
@ -148,10 +148,10 @@ Foam::tmp<Foam::volScalarField> Foam::dispersedPhaseInterface::Mo() const
|
||||
{
|
||||
return
|
||||
mag(g())
|
||||
*continuous().thermo().nu()
|
||||
*continuous().fluidThermo().nu()
|
||||
*pow3
|
||||
(
|
||||
continuous().thermo().nu()
|
||||
continuous().fluidThermo().nu()
|
||||
*continuous().rho()
|
||||
/sigma()
|
||||
);
|
||||
|
||||
@ -41,13 +41,13 @@ inline const Foam::volScalarField& Foam::phaseInterface::alpha2() const
|
||||
|
||||
inline const Foam::rhoFluidThermo& Foam::phaseInterface::thermo1() const
|
||||
{
|
||||
return phase1().thermo();
|
||||
return phase1().fluidThermo();
|
||||
}
|
||||
|
||||
|
||||
inline const Foam::rhoFluidThermo& Foam::phaseInterface::thermo2() const
|
||||
{
|
||||
return phase2().thermo();
|
||||
return phase2().fluidThermo();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -255,10 +255,16 @@ public:
|
||||
// Thermo
|
||||
|
||||
//- Return the thermophysical model
|
||||
virtual const rhoFluidThermo& thermo() const = 0;
|
||||
virtual const rhoThermo& thermo() const = 0;
|
||||
|
||||
//- Access the thermophysical model
|
||||
virtual rhoFluidThermo& thermo() = 0;
|
||||
virtual rhoThermo& thermo() = 0;
|
||||
|
||||
//- Return the thermophysical model
|
||||
virtual const rhoFluidThermo& fluidThermo() const = 0;
|
||||
|
||||
//- Access the thermophysical model
|
||||
virtual rhoFluidThermo& fluidThermo() = 0;
|
||||
|
||||
//- Return the density field
|
||||
virtual const volScalarField& rho() const = 0;
|
||||
|
||||
@ -72,7 +72,15 @@ Foam::AnisothermalPhaseModel<BasePhaseModel>::AnisothermalPhaseModel
|
||||
)
|
||||
:
|
||||
BasePhaseModel(fluid, phaseName, referencePhase, index),
|
||||
g_(fluid.mesh().lookupObject<uniformDimensionedVectorField>("g"))
|
||||
g_(fluid.mesh().lookupObject<uniformDimensionedVectorField>("g")),
|
||||
thermophysicalTransport_
|
||||
(
|
||||
PhaseThermophysicalTransportModel
|
||||
<
|
||||
phaseCompressible::momentumTransportModel,
|
||||
transportThermoModel
|
||||
>::New(this->momentumTransport_, this->thermo_)
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
@ -101,6 +109,48 @@ bool Foam::AnisothermalPhaseModel<BasePhaseModel>::isothermal() const
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel>
|
||||
void Foam::AnisothermalPhaseModel<BasePhaseModel>::
|
||||
predictThermophysicalTransport()
|
||||
{
|
||||
BasePhaseModel::predictThermophysicalTransport();
|
||||
thermophysicalTransport_->predict();
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel>
|
||||
void Foam::AnisothermalPhaseModel<BasePhaseModel>::
|
||||
correctThermophysicalTransport()
|
||||
{
|
||||
BasePhaseModel::correctThermophysicalTransport();
|
||||
thermophysicalTransport_->correct();
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel>
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::AnisothermalPhaseModel<BasePhaseModel>::kappaEff(const label patchi) const
|
||||
{
|
||||
return thermophysicalTransport_->kappaEff(patchi);
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel>
|
||||
Foam::tmp<Foam::fvScalarMatrix>
|
||||
Foam::AnisothermalPhaseModel<BasePhaseModel>::divq(volScalarField& he) const
|
||||
{
|
||||
return thermophysicalTransport_->divq(he);
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel>
|
||||
Foam::tmp<Foam::fvScalarMatrix>
|
||||
Foam::AnisothermalPhaseModel<BasePhaseModel>::divj(volScalarField& Yi) const
|
||||
{
|
||||
return thermophysicalTransport_->divj(Yi);
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel>
|
||||
Foam::tmp<Foam::fvScalarMatrix>
|
||||
Foam::AnisothermalPhaseModel<BasePhaseModel>::heEqn()
|
||||
@ -145,9 +195,9 @@ Foam::AnisothermalPhaseModel<BasePhaseModel>::heEqn()
|
||||
fvc::div
|
||||
(
|
||||
fvc::absolute(alphaRhoPhi, alpha, rho, U),
|
||||
this->thermo().p()/rho
|
||||
this->fluidThermo().p()/rho
|
||||
)
|
||||
+ (fvc::ddt(alpha) - contErr/rho)*this->thermo().p()
|
||||
+ (fvc::ddt(alpha) - contErr/rho)*this->fluidThermo().p()
|
||||
);
|
||||
}
|
||||
else if (this->thermo_->dpdt())
|
||||
|
||||
@ -38,12 +38,34 @@ SourceFiles
|
||||
|
||||
#include "phaseModel.H"
|
||||
#include "uniformDimensionedFields.H"
|
||||
#include "phaseCompressibleMomentumTransportModel.H"
|
||||
#include "PhaseThermophysicalTransportModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Trait for converting the ThermoModel's thermo type to the thermo type needed
|
||||
// for the thermophysical transport model type; i.e., from rho-type thermo to
|
||||
// fluid-type thermo.
|
||||
|
||||
template<class ThermoModel>
|
||||
struct MovingPhaseModelTransportThermoModel;
|
||||
|
||||
template<>
|
||||
struct MovingPhaseModelTransportThermoModel<rhoFluidThermo>
|
||||
{
|
||||
typedef fluidThermo type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct MovingPhaseModelTransportThermoModel<rhoFluidMulticomponentThermo>
|
||||
{
|
||||
typedef fluidMulticomponentThermo type;
|
||||
};
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class AnisothermalPhaseModel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
@ -58,6 +80,24 @@ class AnisothermalPhaseModel
|
||||
//- Gravitational acceleration
|
||||
const uniformDimensionedVectorField& g_;
|
||||
|
||||
//- Thermo type for the thermophysical transport model
|
||||
typedef
|
||||
typename MovingPhaseModelTransportThermoModel
|
||||
<
|
||||
typename BasePhaseModel::thermoModel
|
||||
>::type
|
||||
transportThermoModel;
|
||||
|
||||
//- Thermophysical transport model
|
||||
autoPtr
|
||||
<
|
||||
PhaseThermophysicalTransportModel
|
||||
<
|
||||
phaseCompressible::momentumTransportModel,
|
||||
transportThermoModel
|
||||
>
|
||||
> thermophysicalTransport_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
@ -87,14 +127,31 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Correct the thermodynamics
|
||||
virtual void correctThermo();
|
||||
|
||||
//- Return whether the phase is isothermal
|
||||
virtual bool isothermal() const;
|
||||
|
||||
//- Correct the thermodynamics
|
||||
virtual void correctThermo();
|
||||
|
||||
//- Predict the energy transport e.g. alphat
|
||||
virtual void predictThermophysicalTransport();
|
||||
|
||||
//- Correct the energy transport e.g. alphat
|
||||
virtual void correctThermophysicalTransport();
|
||||
|
||||
//- Return the effective thermal conductivity on a patch
|
||||
virtual tmp<scalarField> kappaEff(const label patchi) const;
|
||||
|
||||
//- Return the source term for the energy equation
|
||||
virtual tmp<fvScalarMatrix> divq(volScalarField& he) const;
|
||||
|
||||
//- Return the source term for the given specie mass-fraction
|
||||
// equation
|
||||
virtual tmp<fvScalarMatrix> divj(volScalarField& Yi) const;
|
||||
|
||||
//- Return the enthalpy equation
|
||||
virtual tmp<fvScalarMatrix> heEqn();
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -56,17 +56,17 @@ void Foam::IsothermalPhaseModel<BasePhaseModel>::correctThermo()
|
||||
BasePhaseModel::correctThermo();
|
||||
|
||||
// Correct the thermo, but make sure that the temperature remains the same
|
||||
tmp<volScalarField> TCopy
|
||||
(
|
||||
volScalarField::New
|
||||
(
|
||||
this->thermo().T().name() + ":Copy",
|
||||
this->thermo().T()
|
||||
)
|
||||
);
|
||||
this->thermo_->he() = this->thermo().he(this->thermo().p(), TCopy);
|
||||
this->thermo_->correct();
|
||||
this->thermo_->T() = TCopy;
|
||||
// tmp<volScalarField> TCopy
|
||||
// (
|
||||
// volScalarField::New
|
||||
// (
|
||||
// this->thermo().T().name() + ":Copy",
|
||||
// this->thermo().T()
|
||||
// )
|
||||
// );
|
||||
// this->thermo_->he() = this->thermo().he(this->fluidThermo().p(), TCopy);
|
||||
// this->thermo_->correct();
|
||||
// this->thermo_->T() = TCopy;
|
||||
}
|
||||
|
||||
|
||||
@ -77,6 +77,15 @@ bool Foam::IsothermalPhaseModel<BasePhaseModel>::isothermal() const
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel>
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::IsothermalPhaseModel<BasePhaseModel>::kappaEff(const label patchi) const
|
||||
{
|
||||
NotImplemented;
|
||||
return this->thermo().kappa().boundaryField()[patchi];
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel>
|
||||
Foam::tmp<Foam::fvScalarMatrix>
|
||||
Foam::IsothermalPhaseModel<BasePhaseModel>::heEqn()
|
||||
|
||||
@ -78,6 +78,9 @@ public:
|
||||
//- Return whether the phase is isothermal
|
||||
virtual bool isothermal() const;
|
||||
|
||||
//- Return the effective thermal conductivity on a patch
|
||||
virtual tmp<scalarField> kappaEff(const label patchi) const;
|
||||
|
||||
//- Return the enthalpy equation
|
||||
virtual tmp<fvScalarMatrix> heEqn();
|
||||
};
|
||||
|
||||
@ -175,14 +175,6 @@ Foam::MovingPhaseModel<BasePhaseModel>::MovingPhaseModel
|
||||
*this
|
||||
)
|
||||
),
|
||||
thermophysicalTransport_
|
||||
(
|
||||
PhaseThermophysicalTransportModel
|
||||
<
|
||||
phaseCompressible::momentumTransportModel,
|
||||
transportThermoModel
|
||||
>::New(momentumTransport_, this->thermo_)
|
||||
),
|
||||
continuityError_
|
||||
(
|
||||
IOobject
|
||||
@ -265,14 +257,6 @@ void Foam::MovingPhaseModel<BasePhaseModel>::predictMomentumTransport()
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel>
|
||||
void Foam::MovingPhaseModel<BasePhaseModel>::predictThermophysicalTransport()
|
||||
{
|
||||
BasePhaseModel::predictThermophysicalTransport();
|
||||
thermophysicalTransport_->predict();
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel>
|
||||
void Foam::MovingPhaseModel<BasePhaseModel>::correctMomentumTransport()
|
||||
{
|
||||
@ -281,14 +265,6 @@ void Foam::MovingPhaseModel<BasePhaseModel>::correctMomentumTransport()
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel>
|
||||
void Foam::MovingPhaseModel<BasePhaseModel>::correctThermophysicalTransport()
|
||||
{
|
||||
BasePhaseModel::correctThermophysicalTransport();
|
||||
thermophysicalTransport_->correct();
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel>
|
||||
void Foam::MovingPhaseModel<BasePhaseModel>::correctUf()
|
||||
{
|
||||
@ -581,28 +557,4 @@ Foam::MovingPhaseModel<BasePhaseModel>::pPrimef() const
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel>
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::MovingPhaseModel<BasePhaseModel>::kappaEff(const label patchi) const
|
||||
{
|
||||
return thermophysicalTransport_->kappaEff(patchi);
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel>
|
||||
Foam::tmp<Foam::fvScalarMatrix>
|
||||
Foam::MovingPhaseModel<BasePhaseModel>::divq(volScalarField& he) const
|
||||
{
|
||||
return thermophysicalTransport_->divq(he);
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel>
|
||||
Foam::tmp<Foam::fvScalarMatrix>
|
||||
Foam::MovingPhaseModel<BasePhaseModel>::divj(volScalarField& Yi) const
|
||||
{
|
||||
return thermophysicalTransport_->divj(Yi);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -46,7 +46,6 @@ SourceFiles
|
||||
#define MovingPhaseModel_H
|
||||
|
||||
#include "phaseModel.H"
|
||||
#include "PhaseThermophysicalTransportModel.H"
|
||||
#include "phaseCompressibleMomentumTransportModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -54,25 +53,6 @@ SourceFiles
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Trait for converting the ThermoModel's thermo type to the thermo type needed
|
||||
// for the thermophysical transport model type; i.e., from rho-type thermo to
|
||||
// fluid-type thermo.
|
||||
|
||||
template<class ThermoModel>
|
||||
struct MovingPhaseModelTransportThermoModel;
|
||||
|
||||
template<>
|
||||
struct MovingPhaseModelTransportThermoModel<rhoFluidThermo>
|
||||
{
|
||||
typedef fluidThermo type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct MovingPhaseModelTransportThermoModel<rhoFluidMulticomponentThermo>
|
||||
{
|
||||
typedef fluidMulticomponentThermo type;
|
||||
};
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class MovingPhaseModel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
@ -84,17 +64,6 @@ class MovingPhaseModel
|
||||
{
|
||||
protected:
|
||||
|
||||
// Protected typedefs
|
||||
|
||||
//- Thermo type for the thermophysical transport model
|
||||
typedef
|
||||
typename MovingPhaseModelTransportThermoModel
|
||||
<
|
||||
typename BasePhaseModel::thermoModel
|
||||
>::type
|
||||
transportThermoModel;
|
||||
|
||||
|
||||
// Protected data
|
||||
|
||||
//- Velocity field
|
||||
@ -118,16 +87,6 @@ protected:
|
||||
//- Turbulence model
|
||||
autoPtr<phaseCompressible::momentumTransportModel> momentumTransport_;
|
||||
|
||||
//- Thermophysical transport model
|
||||
autoPtr
|
||||
<
|
||||
PhaseThermophysicalTransportModel
|
||||
<
|
||||
phaseCompressible::momentumTransportModel,
|
||||
transportThermoModel
|
||||
>
|
||||
> thermophysicalTransport_;
|
||||
|
||||
//- Continuity error
|
||||
volScalarField continuityError_;
|
||||
|
||||
@ -175,15 +134,9 @@ public:
|
||||
//- Predict the momentumTransport
|
||||
virtual void predictMomentumTransport();
|
||||
|
||||
//- Predict the energy transport e.g. alphat
|
||||
virtual void predictThermophysicalTransport();
|
||||
|
||||
//- Correct the momentumTransport
|
||||
virtual void correctMomentumTransport();
|
||||
|
||||
//- Correct the energy transport e.g. alphat
|
||||
virtual void correctThermophysicalTransport();
|
||||
|
||||
//- Correct the face velocity for moving meshes
|
||||
virtual void correctUf();
|
||||
|
||||
@ -277,19 +230,6 @@ public:
|
||||
//- Return the face-phase-pressure'
|
||||
// (derivative of phase-pressure w.r.t. phase-fraction)
|
||||
virtual tmp<surfaceScalarField> pPrimef() const;
|
||||
|
||||
|
||||
// Thermophysical transport
|
||||
|
||||
//- Return the effective thermal conductivity on a patch
|
||||
virtual tmp<scalarField> kappaEff(const label patchi) const;
|
||||
|
||||
//- Return the source term for the energy equation
|
||||
virtual tmp<fvScalarMatrix> divq(volScalarField& he) const;
|
||||
|
||||
//- Return the source term for the given specie mass-fraction
|
||||
// equation
|
||||
virtual tmp<fvScalarMatrix> divj(volScalarField& Yi) const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -26,6 +26,7 @@ License
|
||||
#include "SolidThermalPhaseModel.H"
|
||||
#include "fvmDdt.H"
|
||||
#include "fvmSup.H"
|
||||
#include "fvcLaplacian.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
@ -38,7 +39,11 @@ Foam::SolidThermalPhaseModel<BasePhaseModel>::SolidThermalPhaseModel
|
||||
const label index
|
||||
)
|
||||
:
|
||||
BasePhaseModel(fluid, phaseName, referencePhase, index)
|
||||
BasePhaseModel(fluid, phaseName, referencePhase, index),
|
||||
thermophysicalTransport_
|
||||
(
|
||||
phaseSolidThermophysicalTransportModel::New(*this, this->thermo_)
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
@ -51,6 +56,13 @@ Foam::SolidThermalPhaseModel<BasePhaseModel>::~SolidThermalPhaseModel()
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class BasePhaseModel>
|
||||
bool Foam::SolidThermalPhaseModel<BasePhaseModel>::isothermal() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel>
|
||||
void Foam::SolidThermalPhaseModel<BasePhaseModel>::correctThermo()
|
||||
{
|
||||
@ -61,9 +73,36 @@ void Foam::SolidThermalPhaseModel<BasePhaseModel>::correctThermo()
|
||||
|
||||
|
||||
template<class BasePhaseModel>
|
||||
bool Foam::SolidThermalPhaseModel<BasePhaseModel>::isothermal() const
|
||||
void Foam::SolidThermalPhaseModel<BasePhaseModel>::
|
||||
predictThermophysicalTransport()
|
||||
{
|
||||
return false;
|
||||
BasePhaseModel::predictThermophysicalTransport();
|
||||
thermophysicalTransport_->predict();
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel>
|
||||
void Foam::SolidThermalPhaseModel<BasePhaseModel>::
|
||||
correctThermophysicalTransport()
|
||||
{
|
||||
BasePhaseModel::correctThermophysicalTransport();
|
||||
thermophysicalTransport_->correct();
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel>
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::SolidThermalPhaseModel<BasePhaseModel>::kappaEff(const label patchi) const
|
||||
{
|
||||
return thermophysicalTransport_->kappaEff(patchi);
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel>
|
||||
Foam::tmp<Foam::fvScalarMatrix>
|
||||
Foam::SolidThermalPhaseModel<BasePhaseModel>::divq(volScalarField& he) const
|
||||
{
|
||||
return thermophysicalTransport_->divq(he);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -38,6 +38,7 @@ SourceFiles
|
||||
#define SolidThermalPhaseModel_H
|
||||
|
||||
#include "phaseModel.H"
|
||||
#include "phaseSolidThermophysicalTransportModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -53,6 +54,12 @@ class SolidThermalPhaseModel
|
||||
:
|
||||
public BasePhaseModel
|
||||
{
|
||||
// Thermophysical transport
|
||||
|
||||
//- Pointer to the solid thermophysical transport model
|
||||
autoPtr<phaseSolidThermophysicalTransportModel>
|
||||
thermophysicalTransport_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -73,11 +80,23 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Return whether the phase is isothermal
|
||||
virtual bool isothermal() const;
|
||||
|
||||
//- Correct the thermodynamics
|
||||
virtual void correctThermo();
|
||||
|
||||
//- Return whether the phase is isothermal
|
||||
virtual bool isothermal() const;
|
||||
//- Predict the energy transport e.g. alphat
|
||||
virtual void predictThermophysicalTransport();
|
||||
|
||||
//- Correct the energy transport e.g. alphat
|
||||
virtual void correctThermophysicalTransport();
|
||||
|
||||
//- Return the effective thermal conductivity on a patch
|
||||
virtual tmp<scalarField> kappaEff(const label patchi) const;
|
||||
|
||||
//- Return the source term for the energy equation
|
||||
virtual tmp<fvScalarMatrix> divq(volScalarField& he) const;
|
||||
|
||||
//- Return the enthalpy equation
|
||||
virtual tmp<fvScalarMatrix> heEqn();
|
||||
|
||||
@ -0,0 +1,170 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 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 "SolidThermoPhaseModel.H"
|
||||
#include "phaseSystem.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class BasePhaseModel, class ThermoModel>
|
||||
Foam::SolidThermoPhaseModel<BasePhaseModel, ThermoModel>::SolidThermoPhaseModel
|
||||
(
|
||||
const phaseSystem& fluid,
|
||||
const word& phaseName,
|
||||
const bool referencePhase,
|
||||
const label index
|
||||
)
|
||||
:
|
||||
BasePhaseModel(fluid, phaseName, referencePhase, index),
|
||||
viscosity(),
|
||||
thermo_(ThermoModel::New(fluid.mesh(), this->name()))
|
||||
{
|
||||
thermo_->validate
|
||||
(
|
||||
IOobject::groupName(phaseModel::typeName, this->name()),
|
||||
"h",
|
||||
"e"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class BasePhaseModel, class ThermoModel>
|
||||
Foam::SolidThermoPhaseModel<BasePhaseModel, ThermoModel>::
|
||||
~SolidThermoPhaseModel()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class BasePhaseModel, class ThermoModel>
|
||||
bool
|
||||
Foam::SolidThermoPhaseModel<BasePhaseModel, ThermoModel>::incompressible() const
|
||||
{
|
||||
return thermo_().incompressible();
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel, class ThermoModel>
|
||||
bool Foam::SolidThermoPhaseModel<BasePhaseModel, ThermoModel>::isochoric() const
|
||||
{
|
||||
return thermo_().isochoric();
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel, class ThermoModel>
|
||||
const Foam::rhoThermo&
|
||||
Foam::SolidThermoPhaseModel<BasePhaseModel, ThermoModel>::thermo() const
|
||||
{
|
||||
return thermo_();
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel, class ThermoModel>
|
||||
Foam::rhoThermo&
|
||||
Foam::SolidThermoPhaseModel<BasePhaseModel, ThermoModel>::thermo()
|
||||
{
|
||||
return thermo_();
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel, class ThermoModel>
|
||||
const Foam::rhoFluidThermo&
|
||||
Foam::SolidThermoPhaseModel<BasePhaseModel, ThermoModel>::fluidThermo() const
|
||||
{
|
||||
NotImplemented;
|
||||
return refCast<const rhoFluidThermo>(thermo_());
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel, class ThermoModel>
|
||||
Foam::rhoFluidThermo&
|
||||
Foam::SolidThermoPhaseModel<BasePhaseModel, ThermoModel>::fluidThermo()
|
||||
{
|
||||
NotImplemented;
|
||||
return refCast<rhoFluidThermo>(thermo_());
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel, class ThermoModel>
|
||||
const Foam::volScalarField&
|
||||
Foam::SolidThermoPhaseModel<BasePhaseModel, ThermoModel>::rho() const
|
||||
{
|
||||
return thermo_->rho();
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel, class ThermoModel>
|
||||
Foam::volScalarField&
|
||||
Foam::SolidThermoPhaseModel<BasePhaseModel, ThermoModel>::rho()
|
||||
{
|
||||
return thermo_->rho();
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel, class ThermoModel>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::SolidThermoPhaseModel<BasePhaseModel, ThermoModel>::mu() const
|
||||
{
|
||||
NotImplemented;
|
||||
return tmp<volScalarField>(nullptr);
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel, class ThermoModel>
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::SolidThermoPhaseModel<BasePhaseModel, ThermoModel>::mu
|
||||
(
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
NotImplemented;
|
||||
return tmp<scalarField>(nullptr);
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel, class ThermoModel>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::SolidThermoPhaseModel<BasePhaseModel, ThermoModel>::nu() const
|
||||
{
|
||||
NotImplemented;
|
||||
return tmp<volScalarField>(nullptr);
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel, class ThermoModel>
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::SolidThermoPhaseModel<BasePhaseModel, ThermoModel>::nu
|
||||
(
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
NotImplemented;
|
||||
return tmp<scalarField>(nullptr);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,149 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 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::SolidThermoPhaseModel
|
||||
|
||||
Description
|
||||
Class which represents a solid phase with a thermodynamic model. Provides
|
||||
access to the thermodynamic variables. Note that the thermo model itself is
|
||||
not returned as this class could be substituted in the hierarchy for one
|
||||
which mirrors the functionality, but does not include a thermo model; an
|
||||
incompressible phase model, for example.
|
||||
|
||||
SourceFiles
|
||||
SolidThermoPhaseModel.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef SolidThermoPhaseModel_H
|
||||
#define SolidThermoPhaseModel_H
|
||||
|
||||
#include "phaseModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
class rhoThermo;
|
||||
class rhoFluidThermo;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class SolidThermoPhaseModel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class BasePhaseModel, class ThermoModel>
|
||||
class SolidThermoPhaseModel
|
||||
:
|
||||
public BasePhaseModel,
|
||||
public viscosity
|
||||
{
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
//- Thermophysical model
|
||||
autoPtr<ThermoModel> thermo_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
typedef ThermoModel thermoModel;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
SolidThermoPhaseModel
|
||||
(
|
||||
const phaseSystem& fluid,
|
||||
const word& phaseName,
|
||||
const bool referencePhase,
|
||||
const label index
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~SolidThermoPhaseModel();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Thermo
|
||||
|
||||
//- Return whether the phase is incompressible
|
||||
virtual bool incompressible() const;
|
||||
|
||||
//- Return whether the phase is constant density
|
||||
virtual bool isochoric() const;
|
||||
|
||||
//- Return the thermophysical model
|
||||
virtual const rhoThermo& thermo() const;
|
||||
|
||||
//- Access the thermophysical model
|
||||
virtual rhoThermo& thermo();
|
||||
|
||||
//- Return the thermophysical model
|
||||
virtual const rhoFluidThermo& fluidThermo() const;
|
||||
|
||||
//- Access the thermophysical model
|
||||
virtual rhoFluidThermo& fluidThermo();
|
||||
|
||||
//- Return the density field
|
||||
virtual const volScalarField& rho() const;
|
||||
|
||||
//- Access the the density field
|
||||
virtual volScalarField& rho();
|
||||
|
||||
|
||||
// Transport
|
||||
|
||||
//- Return the laminar dynamic viscosity
|
||||
virtual tmp<volScalarField> mu() const;
|
||||
|
||||
//- Return the laminar dynamic viscosity on a patch
|
||||
virtual tmp<scalarField> mu(const label patchi) const;
|
||||
|
||||
//- Return the laminar kinematic viscosity
|
||||
virtual tmp<volScalarField> nu() const;
|
||||
|
||||
//- Return the laminar kinematic viscosity on a patch
|
||||
virtual tmp<scalarField> nu(const label patchi) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
#include "SolidThermoPhaseModel.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -24,7 +24,6 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "StationaryPhaseModel.H"
|
||||
#include "fvcLaplacian.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
@ -335,14 +334,6 @@ void Foam::StationaryPhaseModel<BasePhaseModel>::divU
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel>
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::StationaryPhaseModel<BasePhaseModel>::kappaEff(const label patchi) const
|
||||
{
|
||||
return this->thermo().kappa().boundaryField()[patchi];
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::StationaryPhaseModel<BasePhaseModel>::k() const
|
||||
@ -368,28 +359,4 @@ Foam::StationaryPhaseModel<BasePhaseModel>::pPrimef() const
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel>
|
||||
Foam::tmp<Foam::fvScalarMatrix>
|
||||
Foam::StationaryPhaseModel<BasePhaseModel>::divq(volScalarField& he) const
|
||||
{
|
||||
const volScalarField& alpha = *this;
|
||||
|
||||
const surfaceScalarField alphaKappa
|
||||
(
|
||||
alpha.name() + '*' + this->thermo().kappa().name(),
|
||||
fvc::interpolate(alpha)*fvc::interpolate(this->thermo().kappa())
|
||||
);
|
||||
|
||||
// Return heat flux source as an implicit energy correction
|
||||
// to the temperature gradient flux
|
||||
return
|
||||
-fvc::laplacian(alphaKappa, this->thermo().T())
|
||||
-fvm::laplacianCorrection
|
||||
(
|
||||
alphaKappa/fvc::interpolate(this->thermo().Cpv()),
|
||||
he
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -160,21 +160,12 @@ public:
|
||||
|
||||
// Momentum transport
|
||||
|
||||
//- Return the effective thermal conductivity on a patch
|
||||
virtual tmp<scalarField> kappaEff(const label patchi) const;
|
||||
|
||||
//- Return the turbulent kinetic energy
|
||||
virtual tmp<volScalarField> k() const;
|
||||
|
||||
//- Return the face-phase-pressure'
|
||||
// (derivative of phase-pressure w.r.t. phase-fraction)
|
||||
virtual tmp<surfaceScalarField> pPrimef() const;
|
||||
|
||||
|
||||
// Thermophysical transport
|
||||
|
||||
//- Return the source term for the energy equation
|
||||
virtual tmp<fvScalarMatrix> divq(volScalarField& he) const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -74,7 +74,7 @@ bool Foam::ThermoPhaseModel<BasePhaseModel, ThermoModel>::isochoric() const
|
||||
|
||||
|
||||
template<class BasePhaseModel, class ThermoModel>
|
||||
const Foam::rhoFluidThermo&
|
||||
const Foam::rhoThermo&
|
||||
Foam::ThermoPhaseModel<BasePhaseModel, ThermoModel>::thermo() const
|
||||
{
|
||||
return thermo_();
|
||||
@ -82,13 +82,29 @@ Foam::ThermoPhaseModel<BasePhaseModel, ThermoModel>::thermo() const
|
||||
|
||||
|
||||
template<class BasePhaseModel, class ThermoModel>
|
||||
Foam::rhoFluidThermo&
|
||||
Foam::rhoThermo&
|
||||
Foam::ThermoPhaseModel<BasePhaseModel, ThermoModel>::thermo()
|
||||
{
|
||||
return thermo_();
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel, class ThermoModel>
|
||||
const Foam::rhoFluidThermo&
|
||||
Foam::ThermoPhaseModel<BasePhaseModel, ThermoModel>::fluidThermo() const
|
||||
{
|
||||
return thermo_();
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel, class ThermoModel>
|
||||
Foam::rhoFluidThermo&
|
||||
Foam::ThermoPhaseModel<BasePhaseModel, ThermoModel>::fluidThermo()
|
||||
{
|
||||
return thermo_();
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel, class ThermoModel>
|
||||
const Foam::volScalarField&
|
||||
Foam::ThermoPhaseModel<BasePhaseModel, ThermoModel>::rho() const
|
||||
|
||||
@ -46,6 +46,7 @@ SourceFiles
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
class rhoThermo;
|
||||
class rhoFluidThermo;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
@ -97,10 +98,16 @@ public:
|
||||
virtual bool isochoric() const;
|
||||
|
||||
//- Return the thermophysical model
|
||||
virtual const rhoFluidThermo& thermo() const;
|
||||
virtual const rhoThermo& thermo() const;
|
||||
|
||||
//- Access the thermophysical model
|
||||
virtual rhoFluidThermo& thermo();
|
||||
virtual rhoThermo& thermo();
|
||||
|
||||
//- Return the thermophysical model
|
||||
virtual const rhoFluidThermo& fluidThermo() const;
|
||||
|
||||
//- Access the thermophysical model
|
||||
virtual rhoFluidThermo& fluidThermo();
|
||||
|
||||
//- Return the density field
|
||||
virtual const volScalarField& rho() const;
|
||||
|
||||
@ -28,10 +28,13 @@ License
|
||||
#include "rhoFluidThermo.H"
|
||||
#include "rhoFluidMulticomponentThermo.H"
|
||||
|
||||
#include "solidThermo.H"
|
||||
|
||||
#include "combustionModel.H"
|
||||
|
||||
#include "phaseModel.H"
|
||||
#include "ThermoPhaseModel.H"
|
||||
#include "SolidThermoPhaseModel.H"
|
||||
#include "IsothermalPhaseModel.H"
|
||||
#include "AnisothermalPhaseModel.H"
|
||||
#include "SolidThermalPhaseModel.H"
|
||||
@ -83,10 +86,10 @@ namespace Foam
|
||||
<
|
||||
StationaryPhaseModel
|
||||
<
|
||||
ThermoPhaseModel
|
||||
SolidThermoPhaseModel
|
||||
<
|
||||
phaseModel,
|
||||
rhoFluidThermo
|
||||
solidThermo
|
||||
>
|
||||
>
|
||||
>
|
||||
@ -139,10 +142,10 @@ namespace Foam
|
||||
<
|
||||
StationaryPhaseModel
|
||||
<
|
||||
ThermoPhaseModel
|
||||
SolidThermoPhaseModel
|
||||
<
|
||||
phaseModel,
|
||||
rhoFluidThermo
|
||||
solidThermo
|
||||
>
|
||||
>
|
||||
>
|
||||
@ -159,9 +162,9 @@ namespace Foam
|
||||
);
|
||||
|
||||
typedef
|
||||
AnisothermalPhaseModel
|
||||
MulticomponentPhaseModel
|
||||
<
|
||||
MulticomponentPhaseModel
|
||||
AnisothermalPhaseModel
|
||||
<
|
||||
InertPhaseModel
|
||||
<
|
||||
@ -197,37 +200,9 @@ namespace Foam
|
||||
);
|
||||
|
||||
typedef
|
||||
IsothermalPhaseModel
|
||||
MulticomponentPhaseModel
|
||||
<
|
||||
MulticomponentPhaseModel
|
||||
<
|
||||
InertPhaseModel
|
||||
<
|
||||
MovingPhaseModel
|
||||
<
|
||||
ThermoPhaseModel
|
||||
<
|
||||
phaseModel,
|
||||
rhoFluidMulticomponentThermo
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
multicomponentIsothermalPhaseModel;
|
||||
|
||||
addNamedToRunTimeSelectionTable
|
||||
(
|
||||
phaseModel,
|
||||
multicomponentIsothermalPhaseModel,
|
||||
phaseSystem,
|
||||
multicomponentIsothermalPhaseModel
|
||||
);
|
||||
|
||||
typedef
|
||||
AnisothermalPhaseModel
|
||||
<
|
||||
MulticomponentPhaseModel
|
||||
AnisothermalPhaseModel
|
||||
<
|
||||
ReactingPhaseModel
|
||||
<
|
||||
|
||||
@ -606,7 +606,7 @@ void Foam::phaseSystem::correctKinematics()
|
||||
// Update the pressure time-derivative if required
|
||||
if (updateDpdt)
|
||||
{
|
||||
dpdt_ = fvc::ddt(phaseModels_.begin()().thermo().p());
|
||||
dpdt_ = fvc::ddt(phaseModels_.begin()().fluidThermo().p());
|
||||
}
|
||||
}
|
||||
|
||||
@ -800,7 +800,7 @@ void Foam::phaseSystem::correctPhi
|
||||
phaseModel& phase = phases()[phasei];
|
||||
const volScalarField& alpha = phase;
|
||||
|
||||
psi += alpha*phase.thermo().psi()/phase.rho();
|
||||
psi += alpha*phase.fluidThermo().psi()/phase.rho();
|
||||
}
|
||||
|
||||
fv::correctPhi
|
||||
|
||||
@ -47,8 +47,8 @@ void Foam::HeatTransferPhaseSystem<BasePhaseSystem>::addDmdtHefs
|
||||
|
||||
const phaseModel& phase1 = interface.phase1();
|
||||
const phaseModel& phase2 = interface.phase2();
|
||||
const rhoFluidThermo& thermo1 = phase1.thermo();
|
||||
const rhoFluidThermo& thermo2 = phase2.thermo();
|
||||
const rhoFluidThermo& thermo1 = phase1.fluidThermo();
|
||||
const rhoFluidThermo& thermo2 = phase2.fluidThermo();
|
||||
const volScalarField& he1 = thermo1.he();
|
||||
const volScalarField& he2 = thermo2.he();
|
||||
const volScalarField hs1(thermo1.hs());
|
||||
@ -89,8 +89,8 @@ void Foam::HeatTransferPhaseSystem<BasePhaseSystem>::addDmidtHefs
|
||||
|
||||
const phaseModel& phase1 = interface.phase1();
|
||||
const phaseModel& phase2 = interface.phase2();
|
||||
const rhoFluidThermo& thermo1 = phase1.thermo();
|
||||
const rhoFluidThermo& thermo2 = phase2.thermo();
|
||||
const rhoFluidThermo& thermo1 = phase1.fluidThermo();
|
||||
const rhoFluidThermo& thermo2 = phase2.fluidThermo();
|
||||
const rhoFluidMulticomponentThermo* mcThermoPtr1 =
|
||||
isA<rhoFluidMulticomponentThermo>(thermo1)
|
||||
? &refCast<const rhoFluidMulticomponentThermo>(thermo1)
|
||||
@ -195,8 +195,8 @@ void Foam::HeatTransferPhaseSystem<BasePhaseSystem>::addDmdtHefsWithoutL
|
||||
|
||||
const phaseModel& phase1 = interface.phase1();
|
||||
const phaseModel& phase2 = interface.phase2();
|
||||
const rhoFluidThermo& thermo1 = phase1.thermo();
|
||||
const rhoFluidThermo& thermo2 = phase2.thermo();
|
||||
const rhoFluidThermo& thermo1 = phase1.fluidThermo();
|
||||
const rhoFluidThermo& thermo2 = phase2.fluidThermo();
|
||||
const volScalarField& he1 = thermo1.he();
|
||||
const volScalarField& he2 = thermo2.he();
|
||||
const volScalarField K1(phase1.K());
|
||||
@ -305,8 +305,8 @@ void Foam::HeatTransferPhaseSystem<BasePhaseSystem>::addDmidtHefsWithoutL
|
||||
|
||||
const phaseModel& phase1 = interface.phase1();
|
||||
const phaseModel& phase2 = interface.phase2();
|
||||
const rhoFluidThermo& thermo1 = phase1.thermo();
|
||||
const rhoFluidThermo& thermo2 = phase2.thermo();
|
||||
const rhoFluidThermo& thermo1 = phase1.fluidThermo();
|
||||
const rhoFluidThermo& thermo2 = phase2.fluidThermo();
|
||||
const rhoFluidMulticomponentThermo* mcThermoPtr1 =
|
||||
isA<rhoFluidMulticomponentThermo>(thermo1)
|
||||
? &refCast<const rhoFluidMulticomponentThermo>(thermo1)
|
||||
@ -512,8 +512,8 @@ Foam::HeatTransferPhaseSystem<BasePhaseSystem>::L
|
||||
const latentHeatScheme scheme
|
||||
) const
|
||||
{
|
||||
const rhoFluidThermo& thermo1 = interface.phase1().thermo();
|
||||
const rhoFluidThermo& thermo2 = interface.phase2().thermo();
|
||||
const rhoFluidThermo& thermo1 = interface.phase1().fluidThermo();
|
||||
const rhoFluidThermo& thermo2 = interface.phase2().fluidThermo();
|
||||
|
||||
// Interface enthalpies
|
||||
const volScalarField haf1(thermo1.ha(thermo1.p(), Tf));
|
||||
@ -552,8 +552,8 @@ Foam::HeatTransferPhaseSystem<BasePhaseSystem>::L
|
||||
const latentHeatScheme scheme
|
||||
) const
|
||||
{
|
||||
const rhoFluidThermo& thermo1 = interface.phase1().thermo();
|
||||
const rhoFluidThermo& thermo2 = interface.phase2().thermo();
|
||||
const rhoFluidThermo& thermo1 = interface.phase1().fluidThermo();
|
||||
const rhoFluidThermo& thermo2 = interface.phase2().fluidThermo();
|
||||
|
||||
// Interface enthalpies
|
||||
const scalarField haf1(thermo1.ha(Tf, cells));
|
||||
@ -595,8 +595,8 @@ Foam::HeatTransferPhaseSystem<BasePhaseSystem>::Li
|
||||
const latentHeatScheme scheme
|
||||
) const
|
||||
{
|
||||
const rhoFluidThermo& thermo1 = interface.phase1().thermo();
|
||||
const rhoFluidThermo& thermo2 = interface.phase2().thermo();
|
||||
const rhoFluidThermo& thermo1 = interface.phase1().fluidThermo();
|
||||
const rhoFluidThermo& thermo2 = interface.phase2().fluidThermo();
|
||||
const rhoFluidMulticomponentThermo* mcThermoPtr1 =
|
||||
isA<rhoFluidMulticomponentThermo>(thermo1)
|
||||
? &refCast<const rhoFluidMulticomponentThermo>(thermo1)
|
||||
@ -668,8 +668,8 @@ Foam::HeatTransferPhaseSystem<BasePhaseSystem>::Li
|
||||
const latentHeatScheme scheme
|
||||
) const
|
||||
{
|
||||
const rhoFluidThermo& thermo1 = interface.phase1().thermo();
|
||||
const rhoFluidThermo& thermo2 = interface.phase2().thermo();
|
||||
const rhoFluidThermo& thermo1 = interface.phase1().fluidThermo();
|
||||
const rhoFluidThermo& thermo2 = interface.phase2().fluidThermo();
|
||||
const rhoFluidMulticomponentThermo* mcThermoPtr1 =
|
||||
isA<rhoFluidMulticomponentThermo>(thermo1)
|
||||
? &refCast<const rhoFluidMulticomponentThermo>(thermo1)
|
||||
|
||||
@ -180,8 +180,8 @@ ThermalPhaseChangePhaseSystem
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
(
|
||||
interface.phase1().thermo().T()
|
||||
+ interface.phase2().thermo().T()
|
||||
interface.phase1().fluidThermo().T()
|
||||
+ interface.phase2().fluidThermo().T()
|
||||
)/2
|
||||
)
|
||||
);
|
||||
@ -205,7 +205,7 @@ ThermalPhaseChangePhaseSystem
|
||||
),
|
||||
saturationModels_[interface]->Tsat
|
||||
(
|
||||
interface.phase1().thermo().p()
|
||||
interface.phase1().fluidThermo().p()
|
||||
)
|
||||
)
|
||||
);
|
||||
@ -363,7 +363,7 @@ Foam::ThermalPhaseChangePhaseSystem<BasePhaseSystem>::heatTransfer() const
|
||||
Tns.insert
|
||||
(
|
||||
interface,
|
||||
satModel.Tsat(interface.phase1().thermo().p()).ptr()
|
||||
satModel.Tsat(interface.phase1().fluidThermo().p()).ptr()
|
||||
);
|
||||
}
|
||||
|
||||
@ -457,7 +457,7 @@ Foam::ThermalPhaseChangePhaseSystem<BasePhaseSystem>::heatTransfer() const
|
||||
fvm::Sp
|
||||
(
|
||||
dmdt0s_[phase.index()] - dmdts[phase.index()],
|
||||
phase.thermo().he()
|
||||
phase.fluidThermo().he()
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -562,8 +562,8 @@ Foam::ThermalPhaseChangePhaseSystem<BasePhaseSystem>::correctInterfaceThermo()
|
||||
const phaseInterface& interface = saturationModelIter()->interface();
|
||||
const phaseModel& phase1 = interface.phase1();
|
||||
const phaseModel& phase2 = interface.phase2();
|
||||
const rhoFluidThermo& thermo1 = phase1.thermo();
|
||||
const rhoFluidThermo& thermo2 = phase2.thermo();
|
||||
const rhoFluidThermo& thermo1 = phase1.fluidThermo();
|
||||
const rhoFluidThermo& thermo2 = phase2.fluidThermo();
|
||||
const volScalarField& T1(thermo1.T());
|
||||
const volScalarField& T2(thermo2.T());
|
||||
|
||||
|
||||
@ -59,8 +59,8 @@ void Foam::TwoResistanceHeatTransferPhaseSystem<BasePhaseSystem>::addDmdtHefs
|
||||
|
||||
const phaseModel& phase1 = interface.phase1();
|
||||
const phaseModel& phase2 = interface.phase2();
|
||||
const rhoFluidThermo& thermo1 = phase1.thermo();
|
||||
const rhoFluidThermo& thermo2 = phase2.thermo();
|
||||
const rhoThermo& thermo1 = phase1.thermo();
|
||||
const rhoThermo& 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 rhoFluidThermo& thermo1 = phase1.thermo();
|
||||
const rhoFluidThermo& thermo2 = phase2.thermo();
|
||||
const rhoThermo& thermo1 = phase1.thermo();
|
||||
const rhoThermo& thermo2 = phase2.thermo();
|
||||
|
||||
// Transfer coefficients
|
||||
const sidedBlendedHeatTransferModel& heatTransferModel =
|
||||
|
||||
@ -122,7 +122,7 @@ addToBinaryBreakupRate
|
||||
{
|
||||
const volScalarField tauShear
|
||||
(
|
||||
BShear_*continuousPhase.thermo().mu()*shearStrainRate_
|
||||
BShear_*continuousPhase.fluidThermo().mu()*shearStrainRate_
|
||||
);
|
||||
|
||||
binaryBreakupRate +=
|
||||
@ -135,7 +135,7 @@ addToBinaryBreakupRate
|
||||
const volScalarField tauEddy
|
||||
(
|
||||
pos0(kolmogorovLengthScale_ - fj.dSph())
|
||||
*BEddy_*continuousPhase.thermo().mu()*eddyStrainRate_
|
||||
*BEddy_*continuousPhase.fluidThermo().mu()*eddyStrainRate_
|
||||
);
|
||||
|
||||
binaryBreakupRate +=
|
||||
|
||||
@ -93,7 +93,7 @@ void Foam::diameterModels::LiaoBase::precompute()
|
||||
kolmogorovLengthScale_ =
|
||||
pow025
|
||||
(
|
||||
pow3(populationBalance_.continuousPhase().thermo().nu())
|
||||
pow3(populationBalance_.continuousPhase().fluidThermo().nu())
|
||||
/populationBalance_.continuousTurbulence().epsilon()
|
||||
);
|
||||
|
||||
@ -106,7 +106,7 @@ void Foam::diameterModels::LiaoBase::precompute()
|
||||
(
|
||||
populationBalance_.continuousPhase().rho()
|
||||
*populationBalance_.continuousTurbulence().epsilon()
|
||||
/populationBalance_.continuousPhase().thermo().mu()
|
||||
/populationBalance_.continuousPhase().fluidThermo().mu()
|
||||
);
|
||||
|
||||
if (uTerminal_.empty())
|
||||
@ -119,7 +119,7 @@ void Foam::diameterModels::LiaoBase::precompute()
|
||||
(
|
||||
"nuc",
|
||||
dimViscosity,
|
||||
gAverage(populationBalance_.continuousPhase().thermo().nu()())
|
||||
gAverage(populationBalance_.continuousPhase().fluidThermo().nu()())
|
||||
);
|
||||
|
||||
const dimensionedScalar rhoc
|
||||
|
||||
@ -156,7 +156,7 @@ void Foam::diameterModels::binaryBreakupModels::LuoSvendsen::precompute()
|
||||
(
|
||||
pow3
|
||||
(
|
||||
popBal_.continuousPhase().thermo().nu()
|
||||
popBal_.continuousPhase().fluidThermo().nu()
|
||||
)
|
||||
/popBal_.continuousTurbulence().epsilon()
|
||||
);
|
||||
|
||||
@ -76,7 +76,7 @@ void Foam::diameterModels::breakupModels::Kusters::setBreakupRate
|
||||
sqrt
|
||||
(
|
||||
4*popBal_.continuousTurbulence().epsilon()
|
||||
/(15*pi*popBal_.continuousPhase().thermo().nu())
|
||||
/(15*pi*popBal_.continuousPhase().fluidThermo().nu())
|
||||
)
|
||||
*exp
|
||||
(
|
||||
|
||||
@ -94,7 +94,7 @@ Foam::diameterModels::breakupModels::Laakkonen::setBreakupRate
|
||||
continuousPhase.rho()*pow(fi.dSph(), 5.0/3.0)
|
||||
*pow(popBal_.continuousTurbulence().epsilon(), 2.0/3.0)
|
||||
)
|
||||
+ C3_*continuousPhase.thermo().mu()
|
||||
+ C3_*continuousPhase.fluidThermo().mu()
|
||||
/(
|
||||
sqrt(continuousPhase.rho()*fi.phase().rho())
|
||||
*cbrt(popBal_.continuousTurbulence().epsilon())
|
||||
|
||||
@ -79,7 +79,7 @@ addToCoalescenceRate
|
||||
*sqrt
|
||||
(
|
||||
0.3*pi*popBal_.continuousTurbulence().epsilon()
|
||||
/popBal_.continuousPhase().thermo().nu()
|
||||
/popBal_.continuousPhase().fluidThermo().nu()
|
||||
)
|
||||
*pow3(fi.d() + fj.d());
|
||||
}
|
||||
|
||||
@ -88,7 +88,7 @@ BrownianCollisions
|
||||
void Foam::diameterModels::coalescenceModels::BrownianCollisions::precompute()
|
||||
{
|
||||
const volScalarField& T = popBal_.continuousPhase().thermo().T();
|
||||
const volScalarField& p = popBal_.continuousPhase().thermo().p();
|
||||
const volScalarField& p = popBal_.continuousPhase().fluidThermo().p();
|
||||
|
||||
lambda_ = k*T/(sqrt(2.0)*pi*p*sqr(sigma_));
|
||||
}
|
||||
@ -108,7 +108,7 @@ addToCoalescenceRate
|
||||
|
||||
const volScalarField& T = popBal_.continuousPhase().thermo().T();
|
||||
|
||||
tmp<volScalarField> tmu(popBal_.continuousPhase().thermo().mu());
|
||||
tmp<volScalarField> tmu(popBal_.continuousPhase().fluidThermo().mu());
|
||||
const volScalarField& mu = tmu();
|
||||
|
||||
const volScalarField Cci
|
||||
|
||||
@ -82,7 +82,7 @@ addToCoalescenceRate
|
||||
*cbrt(popBal_.continuousTurbulence().epsilon())/(1 + popBal_.alphas())
|
||||
*exp
|
||||
(
|
||||
- C2_*continuousPhase.thermo().mu()*continuousPhase.rho()
|
||||
- C2_*continuousPhase.fluidThermo().mu()*continuousPhase.rho()
|
||||
*popBal_.continuousTurbulence().epsilon()
|
||||
/sqr(popBal_.sigmaWithContinuousPhase(fi.phase()))
|
||||
/pow3(1 + popBal_.alphas())
|
||||
|
||||
@ -231,7 +231,7 @@ addToCoalescenceRate
|
||||
+ pos0(kolmogorovLengthScale_ - (fi.dSph() + fj.dSph()))
|
||||
*exp
|
||||
(
|
||||
- 3*continuousPhase.thermo().mu()*dEq*eddyStrainRate_
|
||||
- 3*continuousPhase.fluidThermo().mu()*dEq*eddyStrainRate_
|
||||
/(4*popBal_.sigmaWithContinuousPhase(fi.phase()))
|
||||
*log
|
||||
(
|
||||
|
||||
@ -76,7 +76,7 @@ addToCoalescenceRate
|
||||
|
||||
const volScalarField& rho = popBal_.continuousPhase().rho();
|
||||
tmp<volScalarField> epsilon(popBal_.continuousTurbulence().epsilon());
|
||||
tmp<volScalarField> mu(popBal_.continuousPhase().thermo().mu());
|
||||
tmp<volScalarField> mu(popBal_.continuousPhase().fluidThermo().mu());
|
||||
|
||||
coalescenceRate += C_*sqrt(epsilon*rho/mu)*pow3(fi.d() + fj.d());
|
||||
}
|
||||
|
||||
@ -225,7 +225,7 @@ struct alphatWallBoilingWallFunctionFvPatchScalarField::boilingLiquidProperties
|
||||
trhoVapourw(vapour.thermo().rho(patchi())),
|
||||
rhoVapourw(trhoVapourw()),
|
||||
Cpw(liquid.thermo().Cp().boundaryField()[patchi()]),
|
||||
tnuw(liquid.thermo().nu(patchi())),
|
||||
tnuw(liquid.fluidThermo().nu(patchi())),
|
||||
nuw(tnuw()),
|
||||
kappaByCp
|
||||
(
|
||||
@ -265,7 +265,7 @@ struct alphatWallBoilingWallFunctionFvPatchScalarField::boilingLiquidProperties
|
||||
interfaceSaturationTemperatureModel
|
||||
>
|
||||
(interface)
|
||||
.Tsat(liquid.thermo().p())()
|
||||
.Tsat(liquid.fluidThermo().p())()
|
||||
.boundaryField()[patchi()]
|
||||
),
|
||||
L
|
||||
|
||||
@ -52,7 +52,7 @@ void Foam::coupledMultiphaseTemperatureFvPatchScalarField::getThis
|
||||
forAll(fluid.phases(), phasei)
|
||||
{
|
||||
const phaseModel& phase = fluid.phases()[phasei];
|
||||
const fluidThermo& thermo = phase.thermo();
|
||||
const rhoThermo& thermo = phase.thermo();
|
||||
|
||||
const fvPatchScalarField& Tw =
|
||||
thermo.T().boundaryField()[patch().index()];
|
||||
@ -105,7 +105,7 @@ void Foam::coupledMultiphaseTemperatureFvPatchScalarField::getNbr
|
||||
forAll(fluid.phases(), phasei)
|
||||
{
|
||||
const phaseModel& phase = fluid.phases()[phasei];
|
||||
const fluidThermo& thermo = phase.thermo();
|
||||
const rhoThermo& thermo = phase.thermo();
|
||||
|
||||
const fvPatchScalarField& alpha =
|
||||
phase.boundaryField()[patch().index()];
|
||||
@ -143,7 +143,7 @@ void Foam::coupledMultiphaseTemperatureFvPatchScalarField::getNbr
|
||||
forAll(fluid.phases(), phasei)
|
||||
{
|
||||
const phaseModel& phase = fluid.phases()[phasei];
|
||||
const fluidThermo& thermo = phase.thermo();
|
||||
const rhoThermo& thermo = phase.thermo();
|
||||
|
||||
const fvPatchScalarField& alpha =
|
||||
phase.boundaryField()[patch().index()];
|
||||
|
||||
@ -237,9 +237,9 @@ Foam::heatTransferModels::wallBoilingHeatTransfer::K
|
||||
const phaseModel& vapour = fluid.phases()[vapourPhaseName_];
|
||||
const phaseModel& solid = interface_.dispersed();
|
||||
|
||||
const rhoFluidThermo& lThermo = liquid.thermo();
|
||||
const rhoFluidThermo& vThermo = vapour.thermo();
|
||||
const rhoFluidThermo& sThermo = solid.thermo();
|
||||
const rhoThermo& lThermo = liquid.thermo();
|
||||
const rhoThermo& vThermo = vapour.thermo();
|
||||
const rhoThermo& 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
|
||||
@ -263,12 +263,12 @@ Foam::heatTransferModels::wallBoilingHeatTransfer::K
|
||||
interfaceSaturationTemperatureModel
|
||||
>
|
||||
(phaseInterface(liquid, vapour))
|
||||
.Tsat(liquid.thermo().p())()
|
||||
.Tsat(liquid.fluidThermo().p())()
|
||||
);
|
||||
|
||||
const volScalarField L
|
||||
(
|
||||
vThermo.ha(lThermo.p(), Tsat) - lThermo.ha()
|
||||
vThermo.ha(liquid.fluidThermo().p(), Tsat) - lThermo.ha()
|
||||
);
|
||||
|
||||
// Wetted fraction
|
||||
|
||||
Reference in New Issue
Block a user