29 #include "interfaceHeatResistance.H" 43 namespace temperaturePhaseChangeTwoPhaseMixtures
48 temperaturePhaseChangeTwoPhaseMixture,
49 interfaceHeatResistance,
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)
170 return Pair<tmp<volScalarField>>
182 return Pair<tmp<volScalarField>>
184 tmp<volScalarField>(mDotc_),
185 tmp<volScalarField>(mDote_)
194 const twoPhaseMixtureEThermo&
thermo =
195 refCast<const twoPhaseMixtureEThermo>
204 Pair<tmp<volScalarField>> mDotce(mDot());
206 return Pair<tmp<volScalarField>>
208 mDotc_*
pos(TSat -
T.oldTime())/(TSat -
T.oldTime()),
209 -mDote_*
pos(
T.oldTime() - TSat)/(
T.oldTime() - TSat)
221 auto& TSource = tTSource.ref();
223 const twoPhaseMixtureEThermo&
thermo =
224 refCast<const twoPhaseMixtureEThermo>
234 TSource =
fvm::Sp(IHRcoeff,
T) - IHRcoeff*TSat;
249 const twoPhaseMixtureEThermo&
thermo =
250 refCast<const twoPhaseMixtureEThermo>
261 mDotc_ = interfaceArea_*R_*
max(TSat -
T,
T0)/
L;
262 mDote_ = interfaceArea_*R_*
max(
T - TSat,
T0)/
L;
278 if (
max(mDotc_) > MDotMin)
291 if (
max(mDote_) > MDotMin)
306 void Foam::temperaturePhaseChangeTwoPhaseMixtures::interfaceHeatResistance::
317 cutCellIso cutCell(mesh_, ap);
319 forAll(interfaceArea_, celli)
321 label status = cutCell.calcSubCell(celli, 0.5);
322 interfaceArea_[celli] = 0;
325 interfaceArea_[celli] =
326 mag(cutCell.faceArea())/mesh_.V()[celli];
339 return Pair<tmp<volScalarField>>
352 optionalSubDict(
type() +
"Coeffs").readEntry(
"R", R_);
353 optionalSubDict(
type() +
"Coeffs").readEntry(
"spread", spread_);
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
word dictName() const
The local dictionary name (final part of scoped name)
virtual void correct()
Correct the interfaceHeatResistance phaseChange model.
virtual bool read()
Read the transportProperties dictionary and update.
MinMax< scalar > scalarMinMax
A scalar min/max range.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
virtual Pair< tmp< volScalarField > > vDotAlphal() const
Volumetric source for alpha (used by alphaEq)
const vector L(dict.get< vector >("L"))
static const volPointInterpolation & New(const fvMesh &mesh, Args &&... args)
Get existing or create a new MeshObject. Registered with typeName.
bool interpolate(const vector &p1, const vector &p2, const vector &o, vector &n, scalar l)
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
void spreadSource(volScalarField &mDotOut, const volScalarField &mDotIn, const volScalarField &alpha1, const volScalarField &alpha2, const dimensionedScalar &D, const scalar cutoff)
Info<< "Creating temperaturePhaseChangeTwoPhaseMixture\"<< endl;autoPtr< temperaturePhaseChangeTwoPhaseMixture > mixture
virtual tmp< fvScalarMatrix > TSource() const
Source for T equarion.
const volScalarField & alpha2
const dimensionSet dimless
Dimensionless.
Macros for easy insertion into run-time selection tables.
#define forAll(list, i)
Loop across all elements in list.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
psiReactionThermo & thermo
dimensionedScalar pos(const dimensionedScalar &ds)
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.
An ordered pair of two objects of type <T> with first() and second() elements.
virtual Pair< tmp< volScalarField > > mDotAlphal() const
Return the mass condensation and vaporisation rates as a.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
const dimensionSet dimTemperature(0, 0, 0, 1, 0, 0, 0)
static tmp< T > New(Args &&... args)
Construct tmp with forwarding arguments.
virtual bool read()
Read the transportProperties dictionary and update.
zeroField Sp(const Foam::zero, const GeometricField< Type, fvPatchField, volMesh > &)
A no-op source.
const dimensionSet dimPower
Info<< "Predicted p max-min : "<< max(p).value()<< " "<< min(p).value()<< endl;rho==max(psi *p+alphal *rhol0+((alphav *psiv+alphal *psil) - psi) *pSat, rhoMin);# 1 "/home/chef2/andy/OpenFOAM/release/v2312/OpenFOAM-v2312/applications/solvers/multiphase/cavitatingFoam/alphavPsi.H" 1{ alphav=clamp((rho - rholSat)/(rhovSat - rholSat), zero_one{});alphal=1.0 - alphav;Info<< "max-min alphav: "<< max(alphav).value()<< " "<< min(alphav).value()<< endl;psiModel-> correct()
defineTypeNameAndDebug(combustionModel, 0)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
const dimensionSet dimEnergy
const dimensionSet dimDensity
virtual Pair< tmp< volScalarField > > vDot() const
Return the volumetric condensation and vaporisation rates as.
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)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Type gAverage(const FieldField< Field, Type > &f)
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
const dimensionedScalar & D
virtual Pair< tmp< volScalarField > > mDotDeltaT() const
Return the mass condensation and vaporisation rates as a.
A class for managing temporary objects.
Provides functions smooth spread and sweep which use the FaceCellWave algorithm to smooth and redistr...
Calculate the finiteVolume matrix for implicit and explicit sources.
interfaceHeatResistance(const thermoIncompressibleTwoPhaseMixture &mixture, const fvMesh &mesh)
Construct from components.
const dimensionSet dimArea(sqr(dimLength))
dimensionSet clamp(const dimensionSet &a, const dimensionSet &range)
addToRunTimeSelectionTable(functionObject, pointHistory, dictionary)
static constexpr const zero Zero
Global zero (0)
const volScalarField & alpha1