29#include "interfaceHeatResistance.H"
43namespace temperaturePhaseChangeTwoPhaseMixtures
48 temperaturePhaseChangeTwoPhaseMixture,
57Foam::temperaturePhaseChangeTwoPhaseMixtures::interfaceHeatResistance::
58interfaceHeatResistance
60 const thermoIncompressibleTwoPhaseMixture&
mixture,
64 temperaturePhaseChangeTwoPhaseMixture(
mixture,
mesh),
143 optionalSubDict(
type() +
"Coeffs").
get<scalar>(
"spread")
158 return Pair<tmp<volScalarField>>
172 min(
max(mixture_.alpha1(), scalar(0)), scalar(1))
177 min(
max(mixture_.alpha2(), scalar(0)), scalar(1))
180 return Pair<tmp<volScalarField>>
182 (mDotc_/(limitedAlpha2 + SMALL)),
183 -(mDote_/(limitedAlpha1 + SMALL))
192 return Pair<tmp<volScalarField>>
194 tmp<volScalarField>(mDotc_),
195 tmp<volScalarField>(mDote_)
204 const twoPhaseMixtureEThermo&
thermo =
205 refCast<const twoPhaseMixtureEThermo>
214 Pair<tmp<volScalarField>> mDotce(mDot());
216 return Pair<tmp<volScalarField>>
218 mDotc_*
pos(TSat -
T.oldTime())/(TSat -
T.oldTime()),
219 -mDote_*
pos(
T.oldTime() - TSat)/(
T.oldTime() - TSat)
231 auto& TSource = tTSource.ref();
233 const twoPhaseMixtureEThermo&
thermo =
234 refCast<const twoPhaseMixtureEThermo>
244 TSource =
fvm::Sp(IHRcoeff,
T) - IHRcoeff*TSat;
259 const twoPhaseMixtureEThermo&
thermo =
260 refCast<const twoPhaseMixtureEThermo>
271 mDotc_ = interfaceArea_*R_*
max(TSat -
T,
T0)/
L;
272 mDote_ = interfaceArea_*R_*
max(
T - TSat,
T0)/
L;
288 if (
max(mDotc_) > MDotMin)
301 if (
max(mDote_) > MDotMin)
316void Foam::temperaturePhaseChangeTwoPhaseMixtures::interfaceHeatResistance::
327 cutCellIso cutCell(mesh_, ap);
329 forAll(interfaceArea_, celli)
331 label status = cutCell.calcSubCell(celli, 0.5);
332 interfaceArea_[celli] = 0;
335 interfaceArea_[celli] =
336 mag(cutCell.faceArea())/mesh_.V()[celli];
349 return Pair<tmp<volScalarField>>
362 optionalSubDict(
type() +
"Coeffs").readEntry(
"R", R_);
363 optionalSubDict(
type() +
"Coeffs").readEntry(
"spread", spread_);
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
const volScalarField & alpha1
const volScalarField & alpha2
An ordered pair of two objects of type <T> with first() and second() elements.
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
static const word dictName
const dimensionedScalar & rho1() const
Return const-access to phase1 density.
Interface Heat Resistance type of condensation/saturation model using spread source distribution foll...
const thermoIncompressibleTwoPhaseMixture & mixture_
Reference to the thermoIncompressibleTwoPhaseMixture.
virtual bool read()
Read the transportProperties dictionary and update.
virtual Pair< tmp< volScalarField > > vDot() const
Return the volumetric condensation and vaporisation rates as.
virtual Pair< tmp< volScalarField > > mDotAlphal() const
Return the mass condensation and vaporisation rates as a.
virtual Pair< tmp< volScalarField > > mDotDeltaT() const
Return the mass condensation and vaporisation rates as a.
virtual tmp< fvScalarMatrix > TSource() const
Source for T equarion.
virtual void correct()
Correct the interfaceHeatResistance phaseChange model.
virtual Pair< tmp< volScalarField > > vDotAlphal() const
Volumetric source for alpha (used by alphaEq)
virtual bool read()
Read the transportProperties dictionary and update.
virtual Pair< tmp< volScalarField > > mDot() const
Return the mass condensation and vaporisation rates as coefficients.
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
A class for managing temporary objects.
const volScalarField & alpha2() const
Return the phase-fraction of phase 2.
const volScalarField & alpha1() const
Return the phase-fraction of phase 1.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Provides functions smooth spread and sweep which use the FaceCellWave algorithm to smooth and redistr...
Calculate the finiteVolume matrix for implicit and explicit sources.
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
void spreadSource(volScalarField &mDotOut, const volScalarField &mDotIn, const volScalarField &alpha1, const volScalarField &alpha2, const dimensionedScalar &D, const scalar cutoff)
zeroField Sp(const Foam::zero, const GeometricField< Type, fvPatchField, volMesh > &)
A no-op source.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
dimensionedScalar pos(const dimensionedScalar &ds)
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
const dimensionSet dimPower
const dimensionSet dimless
Dimensionless.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
const dimensionSet dimEnergy
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const dimensionSet dimArea(sqr(dimLength))
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
const dimensionSet dimTemperature(0, 0, 0, 1, 0, 0, 0)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
Type gAverage(const FieldField< Field, Type > &f)
static constexpr const zero Zero
Global zero (0)
bool interpolate(const vector &p1, const vector &p2, const vector &o, vector &n, scalar l)
const dimensionSet dimDensity
const dimensionedScalar & D
Info<< "Creating temperaturePhaseChangeTwoPhaseMixture\n"<< endl;autoPtr< temperaturePhaseChangeTwoPhaseMixture > mixture
#define forAll(list, i)
Loop across all elements in list.
const vector L(dict.get< vector >("L"))