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
104 infoField(
"Tsat", Tsat);
110 const Pair<tmp<volScalarField>> Hs =
111 solver_.heatTransfer.Hs(phase1_, phase2_, scalar(0));
119 mDot_ = (1 -
f)*mDot_ +
f*(H1*(T1 - Tsat) + H2*(T2 - Tsat))/L;
120 infoField(
"mDot", mDot_);
123 if (pressureImplicit_)
128 saturationModelPtr_->TsatPrime(
p)
131 dmDotdpPtr_() = (1 -
f)*dmDotdpPtr_() -
f*(H1 + H2)*TsatPrime/L;
143 const word& modelType,
150 fluid_(solver_.fluid),
151 phase1_(fluid_.phases()[phaseNames().
first()]),
152 phase2_(fluid_.phases()[phaseNames().
second()]),
153 saturationModelPtr_(nullptr),
154 pressureImplicit_(false),
155 pressureEquationIndex_(-1),
182 solver_.heatTransfer.Hs(phase1_, phase2_);
208 && (&
rho == &phase1_.rho() || &
rho == &phase2_.rho())
209 && &eqn.
psi() == &solver_.p_rgh
214 if (pressureEquationIndex_ % 2 == 0) correctMDot();
215 pressureEquationIndex_ ++;
218 if (pressureImplicit_)
234 pressureEquationIndex_ = 0;
245 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, fvMesh > > Lfraction() const
Return the fraction of the latent heat that is transferred into.
virtual void correct()
Correct the fvModel.
virtual tmp< DimensionedField< scalar, fvMesh > > 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 word &name, const dictionary &dict)
Select with name within a 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.
Template function which returns the un-mangled name of a given type. Useful for types which do not ha...
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.
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
const dimensionSet & dimPressure
tmp< fvMatrix< Type > > correction(const fvMatrix< Type > &)
Return the correction form of the given matrix.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
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.