44 rhoThermo::composite(U.
mesh(), word::null),
45 twoPhaseMixture(U.
mesh(), *this),
53 IOobject::groupName(
"Alpha", phase1Name()),
58 calculatedFvPatchScalarField::typeName
64 IOobject::groupName(
"Alpha", phase2Name()),
69 calculatedFvPatchScalarField::typeName
78 U.mesh().time().timeName(),
82 calculatedFvPatchScalarField::typeName
93 U.mesh().time().timeName(),
97 calculatedFvPatchScalarField::typeName
127 thermo1_->he() = thermo1_->he(p_, T_);
131 thermo2_->he() = thermo2_->he(p_, T_);
142 rho_ = alphaRho1 + alphaRho2;
143 Alpha1_ = alphaRho1/rho_;
144 Alpha2_ = alphaRho2/rho_;
147 psi_ =
alpha1()*thermo1_->psi() +
alpha2()*thermo2_->psi();
148 mu_ =
alpha1()*thermo1_->mu() +
alpha2()*thermo2_->mu();
149 alpha_ =
alpha1()*thermo1_->alpha() +
alpha2()*thermo2_->alpha();
157 return thermo1_->thermoName() +
',' + thermo2_->thermoName();
163 return thermo1_->incompressible() && thermo2_->incompressible();
169 return thermo1_->isochoric() && thermo2_->isochoric();
179 return Alpha1_*thermo1_->he(p, T) + Alpha2_*thermo2_->he(p, T);
191 +
scalarField(Alpha2_, cells)*thermo2_->he(T, cells);
203 + Alpha2_.boundaryField()[
patchi]*thermo2_->he(T, patchi);
209 return Alpha1_*thermo1_->hs() + Alpha2_*thermo2_->hs();
219 return Alpha1_*thermo1_->hs(p, T) + Alpha2_*thermo2_->hs(p, T);
231 +
scalarField(Alpha2_, cells)*thermo2_->hs(T, cells);
242 Alpha1_.boundaryField()[
patchi]*thermo1_->hs(T, patchi)
243 + Alpha2_.boundaryField()[
patchi]*thermo2_->hs(T, patchi);
249 return Alpha1_*thermo1_->ha() + Alpha2_*thermo2_->ha();
259 return Alpha1_*thermo1_->ha(p, T) + Alpha2_*thermo2_->ha(p, T);
271 +
scalarField(Alpha2_, cells)*thermo2_->ha(T, cells);
282 Alpha1_.boundaryField()[
patchi]*thermo1_->ha(T, patchi)
283 + Alpha2_.boundaryField()[
patchi]*thermo2_->ha(T, patchi);
289 return Alpha1_*thermo1_->hc() + Alpha2_*thermo2_->hc();
331 return Alpha1_*thermo1_->Cp() + Alpha2_*thermo2_->Cp();
342 Alpha1_.boundaryField()[
patchi]*thermo1_->Cp(T, patchi)
343 + Alpha2_.boundaryField()[
patchi]*thermo2_->Cp(T, patchi);
349 return Alpha1_*thermo1_->Cv() + Alpha2_*thermo2_->Cv();
360 Alpha1_.boundaryField()[
patchi]*thermo1_->Cv(T, patchi)
361 + Alpha2_.boundaryField()[
patchi]*thermo2_->Cv(T, patchi);
377 return Cp(T, patchi)/
Cv(T, patchi);
383 return Alpha1_*thermo1_->Cpv() + Alpha2_*thermo2_->Cpv();
394 Alpha1_.boundaryField()[
patchi]*thermo1_->Cpv(T, patchi)
395 + Alpha2_.boundaryField()[
patchi]*thermo2_->Cpv(T, patchi);
401 return 1/(Alpha1_/thermo1_->W() + Alpha2_/thermo2_->W());
412 Alpha1_.boundaryField()[
patchi]/thermo1_->W(patchi)
413 + Alpha2_.boundaryField()[
patchi]/thermo2_->W(patchi)
429 return mu(patchi)/rho_.boundaryField()[
patchi];
435 return alpha1()*thermo1_->kappa() +
alpha2()*thermo2_->kappa();
445 alpha1().boundaryField()[
patchi]*thermo1_->kappa(patchi)
446 +
alpha2().boundaryField()[
patchi]*thermo2_->kappa(patchi);
452 return alpha1()*thermo1_->alphahe() +
alpha2()*thermo2_->alphahe();
462 alpha1().boundaryField()[
patchi]*thermo1_->alphahe(patchi)
463 +
alpha2().boundaryField()[
patchi]*thermo2_->alphahe(patchi);
473 alpha1()*thermo1_->kappaEff(alphat)
474 +
alpha2()*thermo2_->kappaEff(alphat);
485 alpha1().boundaryField()[
patchi]*thermo1_->kappaEff(alphat, patchi)
486 +
alpha2().boundaryField()[
patchi]*thermo2_->kappaEff(alphat, patchi);
496 alpha1()*thermo1_->alphaEff(alphat)
497 +
alpha2()*thermo2_->alphaEff(alphat);
508 alpha1().boundaryField()[
patchi]*thermo1_->alphaEff(alphat, patchi)
509 +
alpha2().boundaryField()[
patchi]*thermo2_->alphaEff(alphat, patchi);
scalar Cv(const scalar p, const scalar T) const
virtual tmp< volScalarField > Cp() const
Heat capacity at constant pressure [J/kg/K].
twoPhaseMixtureThermo(const volVectorField &U, const surfaceScalarField &phi)
Construct from components.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
virtual tmp< volScalarField > ha() const
Absolute enthalpy [J/kg].
virtual tmp< volScalarField > alphaEff(const volScalarField &alphat) const
Effective thermal diffusivity of mixture [W/m/K].
virtual tmp< volScalarField > hc() const
Enthalpy of formation [J/kg].
const Boundary & boundaryField() const
Return const-reference to the boundary field.
IOobject(const word &name, const fileName &instance, const objectRegistry ®istry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true)
Construct from name, instance, registry, io options.
volScalarField & alpha1(mixture.alpha1())
virtual tmp< volScalarField > hs() const
Sensible enthalpy [J/kg].
static autoPtr< rhoThermo > New(const fvMesh &, const word &phaseName=word::null)
Standard selection based on fvMesh.
bool read()
Read transportProperties dictionary.
virtual tmp< volScalarField > alphahe() const
Thermal diffusivity for energy of mixture [kg/m/s].
virtual tmp< volScalarField > THE(const volScalarField &h, const volScalarField &p, const volScalarField &T0) const
Temperature from enthalpy/internal energy.
virtual void correctThermo()
Correct the thermodynamics of each phase.
virtual bool read()
Read base transportProperties dictionary.
virtual tmp< volScalarField > gamma() const
Gamma = Cp/Cv [].
GeometricField< vector, fvPatchField, volMesh > volVectorField
const dimensionedScalar h
Planck constant.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
virtual bool isochoric() const
Return true if the equation of state is isochoric.
virtual tmp< volScalarField > Cv() const
Heat capacity at constant volume [J/kg/K].
A class for handling words, derived from string.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Info<< "Predicted p max-min : "<< max(p).value()<< " "<< min(p).value()<< endl;rho==max(rho0+psi *p, rhoMin);# 1 "/home/ubuntu/OpenFOAM-9/applications/solvers/multiphase/cavitatingFoam/alphavPsi.H" 1{ alphav=max(min((rho - rholSat)/(rhovSat - rholSat), scalar(1)), scalar(0));alphal=1.0 - alphav;Info<< "max-min alphav: "<< max(alphav).value()<< " "<< min(alphav).value()<< endl;psiModel-> correct()
static word groupName(Name name, const word &group)
virtual tmp< volScalarField > W() const
Molecular weight [kg/kmol].
virtual ~twoPhaseMixtureThermo()
Destructor.
List< label > labelList
A List of labels.
const fileOperation & fileHandler()
Get current file handler.
const dimensionedScalar mu
Atomic mass unit.
defineTypeNameAndDebug(combustionModel, 0)
virtual tmp< volScalarField > Cpv() const
Heat capacity at constant pressure/volume [J/kg/K].
virtual volScalarField & he()
Enthalpy/Internal energy [J/kg].
virtual void flush() const
Forcibly wait until all output done. Flush any cached data.
virtual word thermoName() const
Return the name of the thermo physics.
virtual void correct()
Update mixture properties.
virtual bool incompressible() const
Return true if the equation of state is incompressible.
virtual tmp< volScalarField > kappa() const
Thermal diffusivity for temperature of mixture [W/m/K].
virtual tmp< volScalarField > kappaEff(const volScalarField &alphat) const
Effective thermal diffusivity of mixture [W/m/K].
scalar Cp(const scalar p, const scalar T) const
virtual tmp< volScalarField > nu() const
Kinematic viscosity of mixture [m^2/s].
A class for managing temporary objects.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
virtual bool read()
Read thermophysical properties dictionary.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.