Go to the documentation of this file.
29 #include "interfaceHeatResistance.H"
43 namespace temperaturePhaseChangeTwoPhaseMixtures
48 temperaturePhaseChangeTwoPhaseMixture,
60 const thermoIncompressibleTwoPhaseMixture&
mixture,
64 temperaturePhaseChangeTwoPhaseMixture(
mixture,
mesh),
143 optionalSubDict(
type() +
"Coeffs").get<scalar>(
"spread")
158 return Pair<tmp<volScalarField>>
160 (alphalCoeff*mDotc_)/(mixture_.alpha2() + SMALL),
161 -(alphalCoeff*mDote_)/(mixture_.alpha1() + SMALL)
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_*(
T - TSat)/
L;
276 scalar rhobyDt = mixture_.rho1().value()/mesh_.time().deltaTValue();
277 scalar maxEvap = mixture_.alpha1()[celli]*rhobyDt;
278 scalar maxCond = -mixture_.alpha2()[celli]*rhobyDt;
279 mDote_[celli] =
min(
max(mDote_[celli], maxCond), maxEvap);
280 mDotc_[celli] =
min(
max(mDotc_[celli], maxCond), maxEvap);
298 if (
max(mDotc_) > MDotMin)
311 if (
max(mDote_) > MDotMin)
326 void Foam::temperaturePhaseChangeTwoPhaseMixtures::interfaceHeatResistance::
330 const twoPhaseMixtureEThermo&
thermo =
331 refCast<const twoPhaseMixtureEThermo>
345 cutCellIso cutCell(mesh_, ap);
347 forAll(interfaceArea_, celli)
349 label status = cutCell.calcSubCell(celli, 0.5);
350 interfaceArea_[celli] = 0;
353 interfaceArea_[celli] =
354 mag(cutCell.faceArea())/mesh_.V()[celli];
358 const polyBoundaryMesh& pbm = mesh_.boundaryMesh();
362 if (isA<wallPolyPatch>(pbm[patchi]))
364 const polyPatch& pp = pbm[patchi];
367 const label pCelli = pp.faceCells()[i];
371 (TSat.value() -
T[pCelli]) > 0
372 && mixture_.alpha1()[pCelli] < 0.9
375 interfaceArea_[pCelli] =
376 mag(pp.faceAreas()[i])/mesh_.V()[pCelli];
391 return Pair<tmp<volScalarField>>
404 optionalSubDict(
type() +
"Coeffs").readEntry(
"R", R_);
405 optionalSubDict(
type() +
"Coeffs").readEntry(
"spread", spread_);
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
virtual Pair< tmp< volScalarField > > vDot() const
Return the volumetric condensation and vaporisation rates as.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
const vector L(dict.get< vector >("L"))
interfaceHeatResistance(const thermoIncompressibleTwoPhaseMixture &mixture, const fvMesh &mesh)
Construct from components.
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
Dimensionless.
virtual Pair< tmp< volScalarField > > mDot() const
Return the mass condensation and vaporisation rates as coefficients.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
A class for managing temporary objects.
static constexpr const zero Zero
Global zero (0)
const dimensionSet dimEnergy
const dimensionSet dimDensity
Type gAverage(const FieldField< Field, Type > &f)
const volScalarField & alpha2
static const volPointInterpolation & New(const fvMesh &mesh, Args &&... args)
Get existing or create a new MeshObject.
virtual Pair< tmp< volScalarField > > vDotAlphal() const
Volumetric source for alpha (used by alphaEq)
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
const volScalarField & alpha1
virtual tmp< fvScalarMatrix > TSource() const
Source for T equarion.
void spreadSource(volScalarField &mDotOut, const volScalarField &mDotIn, const volScalarField &alpha1, const volScalarField &alpha2, const dimensionedScalar &D, const scalar cutoff)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
#define forAll(list, i)
Loop across all elements in list.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Interface Heat Resistance type of condensation/saturation model using spread source distribution foll...
bool interpolate(const vector &p1, const vector &p2, const vector &o, vector &n, scalar l)
const dimensionSet dimArea(sqr(dimLength))
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const GeometricField< Type, fvPatchField, volMesh > &)
virtual bool read()
Read the transportProperties dictionary and update.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
word dictName() const
The local dictionary name (final part of scoped name)
const dimensionSet dimPower
virtual Pair< tmp< volScalarField > > mDotAlphal() const
Return the mass condensation and vaporisation rates as a.
Macros for easy insertion into run-time selection tables.
Calculate the matrix for implicit and explicit sources.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
An ordered pair of two objects of type <T> with first() and second() elements.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
const dimensionedScalar e
Elementary charge.
virtual Pair< tmp< volScalarField > > mDotDeltaT() const
Return the mass condensation and vaporisation rates as a.
static tmp< T > New(Args &&... args)
Construct tmp of T with forwarding arguments.
const dimensionedScalar & D
const dimensionSet dimTemperature(0, 0, 0, 1, 0, 0, 0)
defineTypeNameAndDebug(combustionModel, 0)
virtual void correct()
Correct the interfaceHeatResistance phaseChange model.
Info<< "Creating temperaturePhaseChangeTwoPhaseMixture\n"<< endl;autoPtr< temperaturePhaseChangeTwoPhaseMixture > mixture
Provides functions smooth spread and sweep which use the FaceCellWave algorithm to smooth and redistr...
virtual bool read()
Read the transportProperties dictionary and update.
dimensionedScalar pos(const dimensionedScalar &ds)