51 void Foam::fv::heatTransferLimitedPhaseChange::readCoeffs
53 const dictionary&
dict
56 saturationModelPtr_.reset
60 "saturationTemperature",
65 pressureImplicit_ =
dict.lookup<
bool>(
"pressureImplicit");
67 if (pressureImplicit_ && !dmDotdpPtr_.valid())
87 if (!pressureImplicit_ && dmDotdpPtr_.valid())
94 void Foam::fv::heatTransferLimitedPhaseChange::correctMDot()
const
106 <<
" = " <<
gMin(Tsat.primitiveField())
107 <<
'/' <<
gAverage(Tsat.primitiveField())
108 <<
'/' <<
gMax(Tsat.primitiveField())
115 const Pair<tmp<volScalarField>> Hs =
116 solver_.heatTransfer.Hs(phase1_, phase2_, scalar(0));
124 mDot_ = (1 -
f)*mDot_ +
f*(H1*(T1 - Tsat) + H2*(T2 - Tsat))/L;
127 <<
" = " <<
gMin(mDot_.primitiveField())
128 <<
'/' <<
gAverage(mDot_.primitiveField())
129 <<
'/' <<
gMax(mDot_.primitiveField())
133 if (pressureImplicit_)
138 saturationModelPtr_->TsatPrime(
p)
141 dmDotdpPtr_() = (1 -
f)*dmDotdpPtr_() -
f*(H1 + H2)*TsatPrime/L;
153 const word& modelType,
159 solver_(
mesh().lookupObject<solvers::multiphaseEuler>(
solver::typeName)),
160 fluid_(solver_.fluid),
161 phase1_(fluid_.phases()[phaseNames().
first()]),
162 phase2_(fluid_.phases()[phaseNames().
second()]),
163 saturationModelPtr_(nullptr),
164 pressureImplicit_(false),
165 pressureEquationIndex_(-1),
192 solver_.heatTransfer.Hs(phase1_, phase2_);
218 && (&
rho == &phase1_.rho() || &
rho == &phase2_.rho())
219 && &eqn.
psi() == &solver_.p_rgh
224 if (pressureEquationIndex_ % 2 == 0) correctMDot();
225 pressureEquationIndex_ ++;
228 if (pressureImplicit_)
244 pressureEquationIndex_ = 0;
255 readCoeffs(coeffs(
dict));
Macros for easy insertion into run-time selection tables.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Generic GeometricField class.
DimensionedField< Type, GeoMesh, PrimitiveField > Internal
Type of the internal field from which this GeometricField is derived.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
An ordered pair of two objects of type <Type> with first() and second() elements.
const Type & second() const
Return second.
const Type & first() const
Return first.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Mesh data needed to do the Finite Volume discretisation.
const fvSolution & solution() const
Return the fvSolution.
Finite volume model abstract base class.
static const dictionary & coeffs(const word &modelType, const dictionary &)
Return the coefficients sub-dictionary for a given model type.
const fvMesh & mesh() const
Return const access to the mesh database.
const word & name() const
Return const access to the source name.
Model for heat transfer rate limited phase change between two phases.
virtual tmp< DimensionedField< scalar, volMesh > > Lfraction() const
Return the fraction of the latent heat that is transferred into.
virtual void correct()
Correct the fvModel.
virtual tmp< DimensionedField< scalar, volMesh > > mDot() const
Return the mass transfer rate.
virtual bool read(const dictionary &dict)
Read source dictionary.
void addSup(const volScalarField &alpha, const volScalarField &rho, const volScalarField &heOrYi, fvMatrix< scalar > &eqn) const
Use phaseChange's source functions.
heatTransferLimitedPhaseChange(const word &name, const word &modelType, const fvMesh &mesh, const dictionary &dict)
Construct from explicit source name and mesh.
virtual void addSup(fvMatrix< scalar > &eqn) const
Add a source term to a field-less proxy equation.
Base class for phase change models.
virtual bool read(const dictionary &dict)
Read source dictionary.
static autoPtr< saturationTemperatureModel > New(const dictionary &dict)
Select with dictionary.
scalar fieldRelaxationFactor(const word &name) const
Return the relaxation factor for the given field.
Abstract base class for run-time selectable region solvers.
A class for managing temporary objects.
A class for handling words, derived from string.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
Calculate the matrix for implicit and explicit sources.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(lagrangian::Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(lagrangian::Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(lagrangian::Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.name(), lagrangian::cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
addToRunTimeSelectionTable(fvConstraint, bound, dictionary)
defineTypeNameAndDebug(bound, 0)
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const VolField< Type > &)
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const dimensionSet dimPressure
Ostream & endl(Ostream &os)
Add newline and flush stream.
labelList second(const UList< labelPair > &p)
Ostream & incrIndent(Ostream &os)
Increment the indent level.
labelList first(const UList< labelPair > &p)
const dimensionSet dimTime
const dimensionSet dimDensity
tmp< fvMatrix< Type > > correction(const fvMatrix< Type > &)
Return the correction form of the given matrix.
Type gAverage(const FieldField< Field, Type > &f)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
Type gMin(const FieldField< Field, Type > &f)
Ostream & indent(Ostream &os)
Indent stream.
Type gMax(const FieldField< Field, Type > &f)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.