surfaceFilmModels: Replaced the simplistic constant heat capacity thermodynamics with rhoThermo
The constant heat capacity hacked thermo in surfaceFilmModels and the corresponding transfer terms in Lagrangian have been replaced by the standard OpenFOAM rhoThermo which provides a general handling of thermo-physical properties, in particular non-constant heat capacity. Further rationalisation of liquid and solid properties has also been undertaken in support of this work to provide a completely consistent interface to sensible and absolute enthalpy. Now for surfaceFilmModels the thermo-physical model and properties are specified in a constant/<region>/thermophysicalProperties dictionary consistent with all other types of continuum simulation. This significantly rationalises, simplifies and generalises the handling of thermo-physical properties for film simulations and is a start at doing the same for Lagrangian.
This commit is contained in:
@ -225,6 +225,9 @@ void VoFPatchTransfer::correct
|
||||
const polyPatch& pp = pbm[patchi];
|
||||
const labelList& faceCells = pp.faceCells();
|
||||
|
||||
const vectorField& U = film.U();
|
||||
const scalarField& he = film.thermo().he();
|
||||
|
||||
// Accumulate the total mass removed from patch
|
||||
scalar dMassPatch = 0;
|
||||
|
||||
@ -244,8 +247,8 @@ void VoFPatchTransfer::correct
|
||||
transferRateCoeff_*delta[celli]*rho[celli]*magSf[celli];
|
||||
|
||||
massToTransfer[celli] += dMass;
|
||||
momentumToTransfer[celli] += dMass*film.U()[celli];
|
||||
energyToTransfer[celli] += dMass*film.h()[celli];
|
||||
momentumToTransfer[celli] += dMass*U[celli];
|
||||
energyToTransfer[celli] += dMass*he[celli];
|
||||
}
|
||||
|
||||
if
|
||||
|
||||
@ -131,11 +131,11 @@ void Foam::fv::VoFSurfaceFilm::addSup
|
||||
)
|
||||
);
|
||||
|
||||
const volScalarField CpVoF(thermo.thermo1().Cp());
|
||||
const volScalarField::Internal Cv(thermo.thermo1().Cv());
|
||||
|
||||
eqn +=
|
||||
film_->Sh()()/thermo.thermo1().Cp()()
|
||||
+ film_->Tref*film_->Srho();
|
||||
film_->Sh()()/Cv
|
||||
+ film_->Srho()*(eqn.psi() - thermo.thermo1().he()/Cv);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -346,8 +346,8 @@ Foam::scalar Foam::SprayParcel<ParcelType>::chi
|
||||
scalar TBoil = liq.pvInvert(p0);
|
||||
|
||||
scalar hl = liq.hl(pAmb, TBoil);
|
||||
scalar iTp = liq.h(pAmb, T0) - pAmb/liq.rho(pAmb, T0);
|
||||
scalar iTb = liq.h(pAmb, TBoil) - pAmb/liq.rho(pAmb, TBoil);
|
||||
scalar iTp = liq.Ha(pAmb, T0) - pAmb/liq.rho(pAmb, T0);
|
||||
scalar iTb = liq.Ha(pAmb, TBoil) - pAmb/liq.rho(pAmb, TBoil);
|
||||
|
||||
chi += X[i]*(iTp - iTb)/hl;
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2020-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -34,4 +34,3 @@ namespace Foam
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -369,9 +369,6 @@ public:
|
||||
//- Return const access to specific heat capacity
|
||||
inline scalar Cp() const;
|
||||
|
||||
//- Return the parcel sensible enthalpy
|
||||
inline scalar hs() const;
|
||||
|
||||
|
||||
// Edit
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -174,13 +174,6 @@ inline Foam::scalar Foam::ThermoParcel<ParcelType>::Cp() const
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::scalar Foam::ThermoParcel<ParcelType>::hs() const
|
||||
{
|
||||
return Cp_*(T_ - 298.15);
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::scalar& Foam::ThermoParcel<ParcelType>::T()
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -299,7 +299,7 @@ Foam::scalar Foam::CompositionModel<CloudType>::H
|
||||
{
|
||||
forAll(Y, i)
|
||||
{
|
||||
HMixture += Y[i]*thermo_.liquids().properties()[i].h(p, T);
|
||||
HMixture += Y[i]*thermo_.liquids().properties()[i].Ha(p, T);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -307,12 +307,7 @@ Foam::scalar Foam::CompositionModel<CloudType>::H
|
||||
{
|
||||
forAll(Y, i)
|
||||
{
|
||||
HMixture +=
|
||||
Y[i]
|
||||
*(
|
||||
thermo_.solids().properties()[i].Hf()
|
||||
+ thermo_.solids().properties()[i].Cp()*T
|
||||
);
|
||||
HMixture += Y[i]*thermo_.solids().properties()[i].Ha(T);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -354,11 +349,7 @@ Foam::scalar Foam::CompositionModel<CloudType>::Hs
|
||||
forAll(Y, i)
|
||||
{
|
||||
HsMixture +=
|
||||
Y[i]
|
||||
*(
|
||||
thermo_.liquids().properties()[i].h(p, T)
|
||||
- thermo_.liquids().properties()[i].h(p, 298.15)
|
||||
);
|
||||
Y[i]*(thermo_.liquids().properties()[i].Hs(p, T));
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -366,7 +357,7 @@ Foam::scalar Foam::CompositionModel<CloudType>::Hs
|
||||
{
|
||||
forAll(Y, i)
|
||||
{
|
||||
HsMixture += Y[i]*thermo_.solids().properties()[i].Cp()*T;
|
||||
HsMixture += Y[i]*thermo_.solids().properties()[i].Hs(T);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -408,8 +399,7 @@ Foam::scalar Foam::CompositionModel<CloudType>::Hc
|
||||
{
|
||||
forAll(Y, i)
|
||||
{
|
||||
HcMixture +=
|
||||
Y[i]*thermo_.liquids().properties()[i].h(p, 298.15);
|
||||
HcMixture += Y[i]*thermo_.liquids().properties()[i].Hf();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -230,7 +230,7 @@ Foam::scalar Foam::LiquidEvaporation<CloudType>::dh
|
||||
case (parent::etEnthalpyDifference):
|
||||
{
|
||||
scalar hc = this->owner().composition().carrier().Ha(idc, p, T);
|
||||
scalar hp = liquids_.properties()[idl].h(p, T);
|
||||
scalar hp = liquids_.properties()[idl].Ha(p, T);
|
||||
|
||||
dh = hc - hp;
|
||||
break;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -326,7 +326,7 @@ Foam::scalar Foam::LiquidEvaporationBoil<CloudType>::dh
|
||||
case (parent::etEnthalpyDifference):
|
||||
{
|
||||
scalar hc = this->owner().composition().carrier().Ha(idc, p, TDash);
|
||||
scalar hp = liquids_.properties()[idl].h(p, TDash);
|
||||
scalar hp = liquids_.properties()[idl].Ha(p, TDash);
|
||||
|
||||
dh = hc - hp;
|
||||
break;
|
||||
|
||||
@ -140,6 +140,11 @@ void Foam::ThermoSurfaceFilm<CloudType>::absorbInteraction
|
||||
// Parcel tangential velocity
|
||||
const vector Ut = Urel - Un;
|
||||
|
||||
const liquidProperties& liq = thermo_.liquids().properties()[0];
|
||||
|
||||
// Local pressure
|
||||
const scalar pc = thermo_.thermo().p()[p.cell()];
|
||||
|
||||
filmModel.addSources
|
||||
(
|
||||
pp.index(),
|
||||
@ -147,7 +152,7 @@ void Foam::ThermoSurfaceFilm<CloudType>::absorbInteraction
|
||||
mass, // mass
|
||||
mass*Ut, // tangential momentum
|
||||
mass*mag(Un), // impingement pressure
|
||||
mass*p.hs() // energy
|
||||
mass*liq.Hs(pc, p.T()) // energy
|
||||
);
|
||||
|
||||
this->nParcelsTransferred()++;
|
||||
@ -625,11 +630,11 @@ void Foam::ThermoSurfaceFilm<CloudType>::cacheFilmFields
|
||||
filmModel
|
||||
);
|
||||
|
||||
TFilmPatch_ = thermalFilmModel.T().boundaryField()[filmPatchi];
|
||||
TFilmPatch_ = thermalFilmModel.thermo().T().boundaryField()[filmPatchi];
|
||||
filmModel.toPrimary(filmPatchi, TFilmPatch_);
|
||||
|
||||
// CpFilmPatch_ = thermalFilmModel.Cpv().boundaryField()[filmPatchi];
|
||||
CpFilmPatch_ = thermalFilmModel.Cp().boundaryField()[filmPatchi];
|
||||
CpFilmPatch_ =
|
||||
thermalFilmModel.thermo().Cpv()().boundaryField()[filmPatchi];
|
||||
filmModel.toPrimary(filmPatchi, CpFilmPatch_);
|
||||
}
|
||||
|
||||
|
||||
@ -32,15 +32,19 @@ $(KINEMATICMODELS)/transferModels/transferModel/transferModel.C
|
||||
$(KINEMATICMODELS)/transferModels/transferModel/transferModelNew.C
|
||||
$(KINEMATICMODELS)/transferModels/transferModelList/transferModelList.C
|
||||
|
||||
$(KINEMATICMODELS)/filmThermoModel/filmThermoModel/filmThermoModel.C
|
||||
$(KINEMATICMODELS)/filmThermoModel/filmThermoModel/filmThermoModelNew.C
|
||||
$(KINEMATICMODELS)/filmThermoModel/constantFilmThermo/constantFilmThermo.C
|
||||
$(KINEMATICMODELS)/filmThermoModel/liquidFilmThermo/liquidFilmThermo.C
|
||||
|
||||
$(KINEMATICMODELS)/filmMomentumTransportModel/filmMomentumTransportModel/filmMomentumTransportModel.C
|
||||
$(KINEMATICMODELS)/filmMomentumTransportModel/filmMomentumTransportModel/filmMomentumTransportModelNew.C
|
||||
$(KINEMATICMODELS)/filmMomentumTransportModel/laminar/laminar.C
|
||||
|
||||
$(KINEMATICMODELS)/filmViscosityModel/filmViscosityModel/filmViscosityModel.C
|
||||
$(KINEMATICMODELS)/filmViscosityModel/filmViscosityModel/filmViscosityModelNew.C
|
||||
$(KINEMATICMODELS)/filmViscosityModel/constant/constantViscosity.C
|
||||
$(KINEMATICMODELS)/filmViscosityModel/Newtonian/NewtonianViscosity.C
|
||||
$(KINEMATICMODELS)/filmViscosityModel/thixotropic/thixotropicViscosity.C
|
||||
$(KINEMATICMODELS)/filmViscosityModel/Arrhenius/ArrheniusViscosity.C
|
||||
$(KINEMATICMODELS)/filmViscosityModel/function1/function1Viscosity.C
|
||||
$(KINEMATICMODELS)/filmViscosityModel/waxSolvent/waxSolventViscosity.C
|
||||
|
||||
THERMOMODELS=submodels/thermo
|
||||
$(THERMOMODELS)/phaseChangeModel/phaseChangeModel/phaseChangeModel.C
|
||||
$(THERMOMODELS)/phaseChangeModel/phaseChangeModel/phaseChangeModelNew.C
|
||||
@ -62,15 +66,6 @@ $(THERMOMODELS)/filmRadiationModel/constantRadiation/constantRadiation.C
|
||||
$(THERMOMODELS)/filmRadiationModel/primaryRadiation/primaryRadiation.C
|
||||
$(THERMOMODELS)/filmRadiationModel/standardRadiation/standardRadiation.C
|
||||
|
||||
$(THERMOMODELS)/filmViscosityModel/filmViscosityModel/filmViscosityModel.C
|
||||
$(THERMOMODELS)/filmViscosityModel/filmViscosityModel/filmViscosityModelNew.C
|
||||
$(THERMOMODELS)/filmViscosityModel/constantViscosity/constantViscosity.C
|
||||
$(THERMOMODELS)/filmViscosityModel/liquidViscosity/liquidViscosity.C
|
||||
$(THERMOMODELS)/filmViscosityModel/thixotropicViscosity/thixotropicViscosity.C
|
||||
$(THERMOMODELS)/filmViscosityModel/ArrheniusViscosity/ArrheniusViscosity.C
|
||||
$(THERMOMODELS)/filmViscosityModel/function1Viscosity/function1Viscosity.C
|
||||
$(THERMOMODELS)/filmViscosityModel/waxSolventViscosity/waxSolventViscosity.C
|
||||
|
||||
|
||||
# Boundary conditions
|
||||
PATCHFIELDS=derivedFvPatchFields
|
||||
|
||||
@ -39,10 +39,9 @@ License
|
||||
#include "fvmSup.H"
|
||||
#include "constrainHbyA.H"
|
||||
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "mappedWallPolyPatch.H"
|
||||
#include "mapDistribute.H"
|
||||
#include "filmThermoModel.H"
|
||||
#include "filmViscosityModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -57,8 +56,6 @@ namespace surfaceFilmModels
|
||||
|
||||
defineTypeNameAndDebug(kinematicSingleLayer, 0);
|
||||
|
||||
addToRunTimeSelectionTable(surfaceFilmRegionModel, kinematicSingleLayer, mesh);
|
||||
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
|
||||
bool kinematicSingleLayer::read()
|
||||
@ -67,14 +64,6 @@ bool kinematicSingleLayer::read()
|
||||
}
|
||||
|
||||
|
||||
void kinematicSingleLayer::correctThermoFields()
|
||||
{
|
||||
rho_ == thermo_->rho();
|
||||
mu_ == thermo_->mu();
|
||||
sigma_ == thermo_->sigma();
|
||||
}
|
||||
|
||||
|
||||
void kinematicSingleLayer::resetPrimaryRegionSourceTerms()
|
||||
{
|
||||
DebugInFunction << endl;
|
||||
@ -92,7 +81,7 @@ void kinematicSingleLayer::transferPrimaryRegionThermoFields()
|
||||
// Update fields from primary region via direct mapped
|
||||
// (coupled) boundary conditions
|
||||
UPrimary_.correctBoundaryConditions();
|
||||
pPrimary_.correctBoundaryConditions();
|
||||
p_.correctBoundaryConditions();
|
||||
rhoPrimary_.correctBoundaryConditions();
|
||||
muPrimary_.correctBoundaryConditions();
|
||||
}
|
||||
@ -147,7 +136,7 @@ void kinematicSingleLayer::transferPrimaryRegionSourceFields()
|
||||
|
||||
tmp<volScalarField> kinematicSingleLayer::pc()
|
||||
{
|
||||
return -fvc::laplacian(sigma_, delta_);
|
||||
return -fvc::laplacian(sigma(), delta_);
|
||||
}
|
||||
|
||||
|
||||
@ -170,7 +159,7 @@ tmp<volScalarField> kinematicSingleLayer::pe()
|
||||
return volScalarField::New
|
||||
(
|
||||
IOobject::modelName("pe", typeName),
|
||||
pPrimary_ // Pressure (mapped from primary region)
|
||||
p_ // Pressure (mapped from primary region)
|
||||
- tpSp // Accumulated particle impingement
|
||||
);
|
||||
}
|
||||
@ -181,8 +170,8 @@ tmp<surfaceScalarField> kinematicSingleLayer::rhog() const
|
||||
return
|
||||
fvc::interpolate
|
||||
(
|
||||
max(nHat() & -g_, dimensionedScalar(g_.dimensions(), 0))*VbyA()
|
||||
)*fvc::interpolate(rho_);
|
||||
max(nHat() & -g(), dimensionedScalar(g().dimensions(), 0))*VbyA()
|
||||
)*fvc::interpolate(rho());
|
||||
}
|
||||
|
||||
|
||||
@ -191,8 +180,8 @@ tmp<surfaceScalarField> kinematicSingleLayer::gGradRho() const
|
||||
return
|
||||
fvc::interpolate
|
||||
(
|
||||
max(nHat() & -g_, dimensionedScalar(g_.dimensions(), 0))*VbyA()
|
||||
)*fvc::snGrad(rho_);
|
||||
max(nHat() & -g(), dimensionedScalar(g().dimensions(), 0))*VbyA()
|
||||
)*fvc::snGrad(rho());
|
||||
}
|
||||
|
||||
|
||||
@ -229,7 +218,7 @@ void kinematicSingleLayer::predictDelta()
|
||||
{
|
||||
DebugInFunction << endl;
|
||||
|
||||
solve(fvm::ddt(rho_, alpha_) + fvc::div(phi_) == -rhoSp_);
|
||||
solve(fvm::ddt(rho(), alpha_) + fvc::div(phi_) == -rhoSp_);
|
||||
|
||||
// Bound film volume fraction
|
||||
alpha_.max(0);
|
||||
@ -243,7 +232,7 @@ void kinematicSingleLayer::predictDelta()
|
||||
|
||||
void kinematicSingleLayer::updateContinuityErr()
|
||||
{
|
||||
continuityErr_ = (fvc::ddt(alpha_, rho_) + fvc::div(phi_))() + rhoSp_;
|
||||
continuityErr_ = (fvc::ddt(alpha_, rho()) + fvc::div(phi_))() + rhoSp_;
|
||||
}
|
||||
|
||||
|
||||
@ -316,6 +305,9 @@ tmp<Foam::fvVectorMatrix> kinematicSingleLayer::solveMomentum
|
||||
{
|
||||
DebugInFunction << endl;
|
||||
|
||||
// Evaluate viscosity from user-model
|
||||
viscosity_->correct(thermo_->p(), thermo_->T());
|
||||
|
||||
const volScalarField::Internal rVDt
|
||||
(
|
||||
1/(time().deltaT()*regionMesh().V())
|
||||
@ -324,7 +316,7 @@ tmp<Foam::fvVectorMatrix> kinematicSingleLayer::solveMomentum
|
||||
// Momentum equation
|
||||
tmp<fvVectorMatrix> tUEqn
|
||||
(
|
||||
fvm::ddt(alpha_, rho_, U_) + fvm::div(phi_, U_)
|
||||
fvm::ddt(alpha_, rho(), U_) + fvm::div(phi_, U_)
|
||||
- fvm::Sp(continuityErr_, U_)
|
||||
==
|
||||
- USp_
|
||||
@ -355,7 +347,7 @@ tmp<Foam::fvVectorMatrix> kinematicSingleLayer::solveMomentum
|
||||
+ gGradRho()*alphaf
|
||||
+ rhog()*fvc::snGrad(alpha_)
|
||||
)*regionMesh().magSf()
|
||||
- fvc::interpolate(rho_)*(g_ & regionMesh().Sf())
|
||||
- fvc::interpolate(rho())*(g() & regionMesh().Sf())
|
||||
), 0
|
||||
)
|
||||
)
|
||||
@ -384,7 +376,7 @@ void kinematicSingleLayer::solveAlpha
|
||||
const volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U_, alpha_));
|
||||
|
||||
const surfaceScalarField alphaf(fvc::interpolate(alpha_));
|
||||
const surfaceScalarField rhof(fvc::interpolate(rho_));
|
||||
const surfaceScalarField rhof(fvc::interpolate(rho()));
|
||||
const surfaceScalarField alpharAUf(fvc::interpolate(alpha_*rAU));
|
||||
const surfaceScalarField rhogf(rhog());
|
||||
|
||||
@ -398,7 +390,7 @@ void kinematicSingleLayer::solveAlpha
|
||||
fvc::snGrad(pe + pc, "snGrad(p)")
|
||||
+ gGradRho()*alphaf
|
||||
)*regionMesh().magSf()
|
||||
- rhof*(g_ & regionMesh().Sf()),
|
||||
- rhof*(g() & regionMesh().Sf()),
|
||||
0
|
||||
)
|
||||
)
|
||||
@ -423,7 +415,7 @@ void kinematicSingleLayer::solveAlpha
|
||||
// Film thickness equation
|
||||
fvScalarMatrix alphaEqn
|
||||
(
|
||||
fvm::ddt(rho_, alpha_)
|
||||
fvm::ddt(rho(), alpha_)
|
||||
+ fvm::div(phid, alpha_)
|
||||
- fvm::laplacian(ddrhorAUrhogf, alpha_)
|
||||
==
|
||||
@ -488,21 +480,21 @@ kinematicSingleLayer::kinematicSingleLayer
|
||||
deltaSmall_("deltaSmall", dimLength, small),
|
||||
deltaCoLimit_(solution().lookupOrDefault("deltaCoLimit", 1e-4)),
|
||||
|
||||
rho_
|
||||
p_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"rho",
|
||||
"p",
|
||||
time().timeName(),
|
||||
regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
regionMesh()
|
||||
),
|
||||
regionMesh(),
|
||||
dimensionedScalar(dimDensity, 0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
dimensionedScalar(dimPressure, 0),
|
||||
this->mappedFieldAndInternalPatchTypes<scalar>()
|
||||
),
|
||||
|
||||
thermo_(rhoThermo::New(regionMesh())),
|
||||
|
||||
mu_
|
||||
(
|
||||
IOobject
|
||||
@ -518,21 +510,6 @@ kinematicSingleLayer::kinematicSingleLayer
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
),
|
||||
|
||||
sigma_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"sigma",
|
||||
time().timeName(),
|
||||
regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
regionMesh(),
|
||||
dimensionedScalar(dimMass/sqr(dimTime), 0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
),
|
||||
|
||||
delta_
|
||||
(
|
||||
IOobject
|
||||
@ -798,21 +775,6 @@ kinematicSingleLayer::kinematicSingleLayer
|
||||
this->mappedFieldAndInternalPatchTypes<vector>()
|
||||
),
|
||||
|
||||
pPrimary_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"p", // must have same name as p to enable mapping
|
||||
time().timeName(),
|
||||
regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
regionMesh(),
|
||||
dimensionedScalar(dimPressure, 0),
|
||||
this->mappedFieldAndInternalPatchTypes<scalar>()
|
||||
),
|
||||
|
||||
rhoPrimary_
|
||||
(
|
||||
IOobject
|
||||
@ -843,7 +805,9 @@ kinematicSingleLayer::kinematicSingleLayer
|
||||
this->mappedFieldAndInternalPatchTypes<scalar>()
|
||||
),
|
||||
|
||||
thermo_(thermoModel::New(*this, coeffs_)),
|
||||
viscosity_(viscosityModel::New(*this, coeffs(), mu_)),
|
||||
|
||||
sigma_(Function1<scalar>::New("sigma", coeffs())),
|
||||
|
||||
availableMass_(regionMesh().nCells(), 0),
|
||||
|
||||
@ -865,8 +829,6 @@ kinematicSingleLayer::kinematicSingleLayer
|
||||
|
||||
correctCoverage();
|
||||
|
||||
correctThermoFields();
|
||||
|
||||
surfaceScalarField phi
|
||||
(
|
||||
IOobject
|
||||
@ -878,7 +840,7 @@ kinematicSingleLayer::kinematicSingleLayer
|
||||
IOobject::AUTO_WRITE,
|
||||
false
|
||||
),
|
||||
fvc::flux(alpha_*rho_*U_)
|
||||
fvc::flux(alpha_*rho()*U_)
|
||||
);
|
||||
|
||||
phi_ == phi;
|
||||
@ -895,6 +857,27 @@ kinematicSingleLayer::~kinematicSingleLayer()
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
tmp<volScalarField> kinematicSingleLayer::sigma() const
|
||||
{
|
||||
tmp<volScalarField> tsigma
|
||||
(
|
||||
volScalarField::New
|
||||
(
|
||||
type() + ":sigma",
|
||||
regionMesh(),
|
||||
dimensionedScalar(dimMass/sqr(dimTime), 0),
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
tsigma.ref().primitiveFieldRef() = sigma_->value(thermo_->T());
|
||||
|
||||
tsigma.ref().correctBoundaryConditions();
|
||||
|
||||
return tsigma;
|
||||
}
|
||||
|
||||
|
||||
void kinematicSingleLayer::addSources
|
||||
(
|
||||
const label patchi,
|
||||
@ -927,8 +910,6 @@ void kinematicSingleLayer::preEvolveRegion()
|
||||
|
||||
transferPrimaryRegionThermoFields();
|
||||
|
||||
correctThermoFields();
|
||||
|
||||
transferPrimaryRegionSourceFields();
|
||||
|
||||
// Reset transfer fields
|
||||
@ -1028,7 +1009,7 @@ void kinematicSingleLayer::info()
|
||||
|
||||
Info<< indent << "added mass = " << addedMassTotal << nl
|
||||
<< indent << "current mass = "
|
||||
<< gSum((delta_*rho_*magSf())()) << nl
|
||||
<< gSum((delta_*rho()*magSf())()) << nl
|
||||
<< indent << "min/max(mag(U)) = " << gMin(mag(Uinternal)) << ", "
|
||||
<< gMax(mag(Uinternal)) << nl
|
||||
<< indent << "min/max(delta) = " << gMin(deltaInternal) << ", "
|
||||
|
||||
@ -41,6 +41,8 @@ SourceFiles
|
||||
#include "surfaceFields.H"
|
||||
#include "fvMatrices.H"
|
||||
#include "pimpleControl.H"
|
||||
#include "rhoThermo.H"
|
||||
#include "Function1.H"
|
||||
|
||||
#include "ejectionModelList.H"
|
||||
#include "transferModelList.H"
|
||||
@ -57,7 +59,7 @@ namespace surfaceFilmModels
|
||||
{
|
||||
|
||||
// Forward class declarations
|
||||
class thermoModel;
|
||||
class viscosityModel;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class kinematicSingleLayer Declaration
|
||||
@ -88,20 +90,17 @@ protected:
|
||||
|
||||
// Thermo properties
|
||||
|
||||
// Fields
|
||||
//- Pressure [Pa]
|
||||
volScalarField p_;
|
||||
|
||||
//- Density [kg/m^3]
|
||||
volScalarField rho_;
|
||||
|
||||
//- Dynamic viscosity [Pa.s]
|
||||
volScalarField mu_;
|
||||
|
||||
//- Surface tension [m/s^2]
|
||||
volScalarField sigma_;
|
||||
autoPtr<rhoThermo> thermo_;
|
||||
|
||||
|
||||
// Fields
|
||||
|
||||
//- Dynamic viscosity [Pa.s]
|
||||
volScalarField mu_;
|
||||
|
||||
//- Film thickness [m]
|
||||
volScalarField delta_;
|
||||
|
||||
@ -177,9 +176,6 @@ protected:
|
||||
//- Velocity [m/s]
|
||||
volVectorField UPrimary_;
|
||||
|
||||
//- Pressure [Pa]
|
||||
volScalarField pPrimary_;
|
||||
|
||||
//- Density [kg/m^3]
|
||||
volScalarField rhoPrimary_;
|
||||
|
||||
@ -189,8 +185,11 @@ protected:
|
||||
|
||||
// Sub-models
|
||||
|
||||
//- Film thermo model
|
||||
autoPtr<thermoModel> thermo_;
|
||||
//- Viscosity model
|
||||
autoPtr<viscosityModel> viscosity_;
|
||||
|
||||
//- Surface tension function
|
||||
autoPtr<Function1<scalar>> sigma_;
|
||||
|
||||
//- Available mass for transfer via sub-models
|
||||
scalarField availableMass_;
|
||||
@ -219,9 +218,6 @@ protected:
|
||||
//- Read control parameters from dictionary
|
||||
virtual bool read();
|
||||
|
||||
//- Correct the thermo fields
|
||||
virtual void correctThermoFields();
|
||||
|
||||
//- Reset source term fields
|
||||
virtual void resetPrimaryRegionSourceTerms();
|
||||
|
||||
@ -325,11 +321,14 @@ public:
|
||||
|
||||
// Thermo properties
|
||||
|
||||
//- Return the film density [kg/m^3]
|
||||
inline const volScalarField& rho() const;
|
||||
|
||||
//- Return const access to the dynamic viscosity [Pa.s]
|
||||
inline const volScalarField& mu() const;
|
||||
|
||||
//- Return const access to the surface tension [kg/s^2]
|
||||
inline const volScalarField& sigma() const;
|
||||
//- Return the surface tension coefficient [kg/s^2]
|
||||
tmp<volScalarField> sigma() const;
|
||||
|
||||
|
||||
// Fields
|
||||
@ -340,9 +339,6 @@ public:
|
||||
//- Return const access to the film volume fraction []
|
||||
inline const volScalarField& alpha() const;
|
||||
|
||||
//- Return the film density [kg/m^3]
|
||||
inline const volScalarField& rho() const;
|
||||
|
||||
//- Return the film velocity [m/s]
|
||||
inline const volVectorField& U() const;
|
||||
|
||||
@ -450,7 +446,7 @@ public:
|
||||
// Sub-models
|
||||
|
||||
//- Film thermo
|
||||
inline const thermoModel& thermo() const;
|
||||
inline const rhoThermo& thermo() const;
|
||||
|
||||
//- Ejection
|
||||
inline ejectionModelList& ejection();
|
||||
|
||||
@ -23,7 +23,6 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "filmThermoModel.H"
|
||||
#include "surfaceInterpolate.H"
|
||||
#include "fvcSurfaceIntegrate.H"
|
||||
|
||||
@ -44,15 +43,15 @@ inline const dimensionedScalar& kinematicSingleLayer::deltaSmall() const
|
||||
}
|
||||
|
||||
|
||||
inline const volScalarField& kinematicSingleLayer::mu() const
|
||||
inline const volScalarField& kinematicSingleLayer::rho() const
|
||||
{
|
||||
return mu_;
|
||||
return thermo_->rho();
|
||||
}
|
||||
|
||||
|
||||
inline const volScalarField& kinematicSingleLayer::sigma() const
|
||||
inline const volScalarField& kinematicSingleLayer::mu() const
|
||||
{
|
||||
return sigma_;
|
||||
return mu_;
|
||||
}
|
||||
|
||||
|
||||
@ -68,12 +67,6 @@ inline const volScalarField& kinematicSingleLayer::alpha() const
|
||||
}
|
||||
|
||||
|
||||
inline const volScalarField& kinematicSingleLayer::rho() const
|
||||
{
|
||||
return rho_;
|
||||
}
|
||||
|
||||
|
||||
inline const volVectorField& kinematicSingleLayer::U() const
|
||||
{
|
||||
return U_;
|
||||
@ -173,7 +166,7 @@ inline const volVectorField& kinematicSingleLayer::UPrimary() const
|
||||
|
||||
inline const volScalarField& kinematicSingleLayer::pPrimary() const
|
||||
{
|
||||
return pPrimary_;
|
||||
return thermo_->p();
|
||||
}
|
||||
|
||||
|
||||
@ -189,7 +182,7 @@ inline const volScalarField& kinematicSingleLayer::muPrimary() const
|
||||
}
|
||||
|
||||
|
||||
inline const thermoModel& kinematicSingleLayer::thermo() const
|
||||
inline const rhoThermo& kinematicSingleLayer::thermo() const
|
||||
{
|
||||
return thermo_();
|
||||
}
|
||||
@ -216,7 +209,7 @@ kinematicSingleLayer::momentumTransport() const
|
||||
|
||||
inline tmp<volScalarField::Internal> kinematicSingleLayer::mass() const
|
||||
{
|
||||
return rho_()*delta_()*magSf();
|
||||
return rho()()*delta_()*magSf();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -82,7 +82,10 @@ void BrunDrippingEjection::correct
|
||||
|
||||
const scalarField& delta = film.delta();
|
||||
const scalarField& rho = film.rho();
|
||||
const scalarField& sigma = film.sigma();
|
||||
|
||||
const tmp<volScalarField> tsigma = film.sigma();
|
||||
const volScalarField::Internal& sigma = tsigma();
|
||||
|
||||
const scalar magg = mag(film.g().value());
|
||||
|
||||
forAll(delta, celli)
|
||||
|
||||
@ -250,7 +250,9 @@ void curvatureSeparation::correct
|
||||
const surfaceScalarField& phi = film.phi();
|
||||
const volScalarField& rho = film.rho();
|
||||
const scalarField magSqrU(magSqr(film.U()));
|
||||
const volScalarField& sigma = film.sigma();
|
||||
|
||||
const tmp<volScalarField> tsigma = film.sigma();
|
||||
const volScalarField::Internal& sigma = tsigma();
|
||||
|
||||
const scalarField invR1(calcInvR1(U));
|
||||
const scalarField cosAngle(calcCosAngle(phi));
|
||||
|
||||
@ -1,366 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "constantFilmThermo.H"
|
||||
#include "extrapolatedCalculatedFvPatchFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace regionModels
|
||||
{
|
||||
namespace surfaceFilmModels
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(constantFilmThermo, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
thermoModel,
|
||||
constantFilmThermo,
|
||||
dictionary
|
||||
);
|
||||
|
||||
|
||||
void constantFilmThermo::init(thermoData& td)
|
||||
{
|
||||
if (coeffDict_.readIfPresent(td.name_, td.value_))
|
||||
{
|
||||
td.set_ = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
constantFilmThermo::constantFilmThermo
|
||||
(
|
||||
surfaceFilmRegionModel& film,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
thermoModel(typeName, film, dict),
|
||||
name_(coeffDict_.lookup("specie")),
|
||||
rho0_("rho0"),
|
||||
mu0_("mu0"),
|
||||
sigma0_("sigma0"),
|
||||
Cp0_("Cp0"),
|
||||
kappa0_("kappa0"),
|
||||
D0_("D0"),
|
||||
hl0_("hl0"),
|
||||
pv0_("pv0"),
|
||||
W0_("W0"),
|
||||
Tb0_("Tb0")
|
||||
{
|
||||
init(rho0_);
|
||||
init(mu0_);
|
||||
init(sigma0_);
|
||||
init(Cp0_);
|
||||
init(kappa0_);
|
||||
init(D0_);
|
||||
init(hl0_);
|
||||
init(pv0_);
|
||||
init(W0_);
|
||||
init(Tb0_);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
constantFilmThermo::~constantFilmThermo()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
const word& constantFilmThermo::name() const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
||||
|
||||
scalar constantFilmThermo::rho
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
if (!rho0_.set_)
|
||||
{
|
||||
coeffDict_.lookup(rho0_.name_) >> rho0_.value_;
|
||||
rho0_.set_ = true;
|
||||
}
|
||||
|
||||
return rho0_.value_;
|
||||
}
|
||||
|
||||
|
||||
scalar constantFilmThermo::mu
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
if (!mu0_.set_)
|
||||
{
|
||||
coeffDict_.lookup(mu0_.name_) >> mu0_.value_;
|
||||
mu0_.set_ = true;
|
||||
}
|
||||
|
||||
return mu0_.value_;
|
||||
}
|
||||
|
||||
|
||||
scalar constantFilmThermo::sigma
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
if (!sigma0_.set_)
|
||||
{
|
||||
coeffDict_.lookup(sigma0_.name_) >> sigma0_.value_;
|
||||
sigma0_.set_ = true;
|
||||
}
|
||||
|
||||
return sigma0_.value_;
|
||||
}
|
||||
|
||||
|
||||
scalar constantFilmThermo::Cp
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
if (!Cp0_.set_)
|
||||
{
|
||||
coeffDict_.lookup(Cp0_.name_) >> Cp0_.value_;
|
||||
Cp0_.set_ = true;
|
||||
}
|
||||
|
||||
return Cp0_.value_;
|
||||
}
|
||||
|
||||
|
||||
scalar constantFilmThermo::kappa
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
if (!kappa0_.set_)
|
||||
{
|
||||
coeffDict_.lookup(kappa0_.name_) >> kappa0_.value_;
|
||||
kappa0_.set_ = true;
|
||||
}
|
||||
|
||||
return kappa0_.value_;
|
||||
}
|
||||
|
||||
|
||||
scalar constantFilmThermo::D
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
if (!D0_.set_)
|
||||
{
|
||||
coeffDict_.lookup(D0_.name_) >> D0_.value_;
|
||||
D0_.set_ = true;
|
||||
}
|
||||
|
||||
return D0_.value_;
|
||||
}
|
||||
|
||||
|
||||
scalar constantFilmThermo::hl
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
if (!hl0_.set_)
|
||||
{
|
||||
coeffDict_.lookup(hl0_.name_) >> hl0_.value_;
|
||||
hl0_.set_ = true;
|
||||
}
|
||||
|
||||
return hl0_.value_;
|
||||
}
|
||||
|
||||
|
||||
scalar constantFilmThermo::pv
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
if (!pv0_.set_)
|
||||
{
|
||||
coeffDict_.lookup(pv0_.name_) >> pv0_.value_;
|
||||
pv0_.set_ = true;
|
||||
}
|
||||
|
||||
return pv0_.value_;
|
||||
}
|
||||
|
||||
|
||||
scalar constantFilmThermo::W() const
|
||||
{
|
||||
if (!W0_.set_)
|
||||
{
|
||||
coeffDict_.lookup(W0_.name_) >> W0_.value_;
|
||||
W0_.set_ = true;
|
||||
}
|
||||
|
||||
return W0_.value_;
|
||||
}
|
||||
|
||||
|
||||
scalar constantFilmThermo::Tb(const scalar p) const
|
||||
{
|
||||
if (!Tb0_.set_)
|
||||
{
|
||||
coeffDict_.lookup(Tb0_.name_) >> Tb0_.value_;
|
||||
Tb0_.set_ = true;
|
||||
}
|
||||
|
||||
return Tb0_.value_;
|
||||
}
|
||||
|
||||
|
||||
tmp<volScalarField> constantFilmThermo::rho() const
|
||||
{
|
||||
tmp<volScalarField> trho
|
||||
(
|
||||
volScalarField::New
|
||||
(
|
||||
type() + ':' + rho0_.name_,
|
||||
film().regionMesh(),
|
||||
dimensionedScalar(dimDensity, 0),
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
trho.ref().primitiveFieldRef() = this->rho(0, 0);
|
||||
trho.ref().correctBoundaryConditions();
|
||||
|
||||
return trho;
|
||||
}
|
||||
|
||||
|
||||
tmp<volScalarField> constantFilmThermo::mu() const
|
||||
{
|
||||
tmp<volScalarField> tmu
|
||||
(
|
||||
volScalarField::New
|
||||
(
|
||||
type() + ':' + mu0_.name_,
|
||||
film().regionMesh(),
|
||||
dimensionedScalar(dimPressure*dimTime, 0),
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
tmu.ref().primitiveFieldRef() = this->mu(0, 0);
|
||||
tmu.ref().correctBoundaryConditions();
|
||||
|
||||
return tmu;
|
||||
}
|
||||
|
||||
|
||||
tmp<volScalarField> constantFilmThermo::sigma() const
|
||||
{
|
||||
tmp<volScalarField> tsigma
|
||||
(
|
||||
volScalarField::New
|
||||
(
|
||||
type() + ':' + sigma0_.name_,
|
||||
film().regionMesh(),
|
||||
dimensionedScalar(dimMass/sqr(dimTime), 0),
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
tsigma.ref().primitiveFieldRef() = this->sigma(0, 0);
|
||||
tsigma.ref().correctBoundaryConditions();
|
||||
|
||||
return tsigma;
|
||||
}
|
||||
|
||||
|
||||
tmp<volScalarField> constantFilmThermo::Cp() const
|
||||
{
|
||||
tmp<volScalarField> tCp
|
||||
(
|
||||
volScalarField::New
|
||||
(
|
||||
type() + ':' + Cp0_.name_,
|
||||
film().regionMesh(),
|
||||
dimensionedScalar(dimEnergy/dimMass/dimTemperature, 0),
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
tCp.ref().primitiveFieldRef() = this->Cp(0, 0);
|
||||
tCp.ref().correctBoundaryConditions();
|
||||
|
||||
return tCp;
|
||||
}
|
||||
|
||||
|
||||
tmp<volScalarField> constantFilmThermo::kappa() const
|
||||
{
|
||||
tmp<volScalarField> tkappa
|
||||
(
|
||||
volScalarField::New
|
||||
(
|
||||
type() + ':' + kappa0_.name_,
|
||||
film().regionMesh(),
|
||||
dimensionedScalar(dimPower/dimLength/dimTemperature, 0),
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
tkappa.ref().primitiveFieldRef() = this->kappa(0, 0);
|
||||
tkappa.ref().correctBoundaryConditions();
|
||||
|
||||
return tkappa;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace surfaceFilmModels
|
||||
} // End namespace regionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,223 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::regionModels::surfaceFilmModels::constantFilmThermo
|
||||
|
||||
Description
|
||||
Constant thermo model
|
||||
|
||||
SourceFiles
|
||||
constantFilmThermo.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef constantFilmThermo_H
|
||||
#define constantFilmThermo_H
|
||||
|
||||
#include "filmThermoModel.H"
|
||||
#include "dimensionSet.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace regionModels
|
||||
{
|
||||
namespace surfaceFilmModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class constantFilmThermo Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class constantFilmThermo
|
||||
:
|
||||
public thermoModel
|
||||
{
|
||||
public:
|
||||
|
||||
struct thermoData
|
||||
{
|
||||
word name_;
|
||||
scalar value_;
|
||||
bool set_;
|
||||
|
||||
thermoData()
|
||||
:
|
||||
name_("unknown"),
|
||||
value_(0.0),
|
||||
set_(false)
|
||||
{}
|
||||
|
||||
thermoData(const word& n)
|
||||
:
|
||||
name_(n),
|
||||
value_(0.0),
|
||||
set_(false)
|
||||
{}
|
||||
};
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// Private Data
|
||||
|
||||
//- Specie name
|
||||
word name_;
|
||||
|
||||
//- Density [kg/m^3]
|
||||
mutable thermoData rho0_;
|
||||
|
||||
//- Dynamic viscosity [Pa.s]
|
||||
mutable thermoData mu0_;
|
||||
|
||||
//- Surface tension [kg/s^2]
|
||||
mutable thermoData sigma0_;
|
||||
|
||||
//- Specific heat capacity [J/kg/K]
|
||||
mutable thermoData Cp0_;
|
||||
|
||||
//- Thermal conductivity [W/m/K]
|
||||
mutable thermoData kappa0_;
|
||||
|
||||
//- Diffusivity [m^2/s]
|
||||
mutable thermoData D0_;
|
||||
|
||||
//- Latent heat [J/kg]
|
||||
mutable thermoData hl0_;
|
||||
|
||||
//- Vapour pressure [Pa]
|
||||
mutable thermoData pv0_;
|
||||
|
||||
//- Molecular weight [kg/kmol]
|
||||
mutable thermoData W0_;
|
||||
|
||||
//- Boiling temperature [K]
|
||||
mutable thermoData Tb0_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Initialise thermoData object
|
||||
void init(thermoData& td);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("constant");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from surface film model and dictionary
|
||||
constantFilmThermo
|
||||
(
|
||||
surfaceFilmRegionModel& film,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
//- Disallow default bitwise copy construction
|
||||
constantFilmThermo(const constantFilmThermo&) = delete;
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~constantFilmThermo();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Return the specie name
|
||||
virtual const word& name() const;
|
||||
|
||||
|
||||
// Elemental access
|
||||
|
||||
//- Return density [kg/m^3]
|
||||
virtual scalar rho(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return dynamic viscosity [Pa.s]
|
||||
virtual scalar mu(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return surface tension [kg/s^2]
|
||||
virtual scalar sigma(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return specific heat capacity [J/kg/K]
|
||||
virtual scalar Cp(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return thermal conductivity [W/m/K]
|
||||
virtual scalar kappa(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return diffusivity [m^2/s]
|
||||
virtual scalar D(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return latent heat [J/kg]
|
||||
virtual scalar hl(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return vapour pressure [Pa]
|
||||
virtual scalar pv(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return molecular weight [kg/kmol]
|
||||
virtual scalar W() const;
|
||||
|
||||
//- Return boiling temperature [K]
|
||||
virtual scalar Tb(const scalar p) const;
|
||||
|
||||
|
||||
// Field access
|
||||
|
||||
//- Return density [kg/m^3]
|
||||
virtual tmp<volScalarField> rho() const;
|
||||
|
||||
//- Return dynamic viscosity [Pa.s]
|
||||
virtual tmp<volScalarField> mu() const;
|
||||
|
||||
//- Return surface tension [kg/s^2]
|
||||
virtual tmp<volScalarField> sigma() const;
|
||||
|
||||
//- Return specific heat capacity [J/kg/K]
|
||||
virtual tmp<volScalarField> Cp() const;
|
||||
|
||||
//- Return thermal conductivity [W/m/K]
|
||||
virtual tmp<volScalarField> kappa() const;
|
||||
|
||||
|
||||
// Member Operators
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const constantFilmThermo&) = delete;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace surfaceFilmModels
|
||||
} // End namespace regionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,76 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "filmThermoModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace regionModels
|
||||
{
|
||||
namespace surfaceFilmModels
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(thermoModel, 0);
|
||||
defineRunTimeSelectionTable(thermoModel, dictionary);
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
thermoModel::thermoModel
|
||||
(
|
||||
surfaceFilmRegionModel& film
|
||||
)
|
||||
:
|
||||
filmSubModelBase(film)
|
||||
{}
|
||||
|
||||
|
||||
thermoModel::thermoModel
|
||||
(
|
||||
const word& modelType,
|
||||
surfaceFilmRegionModel& film,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
filmSubModelBase(film, dict, typeName, modelType)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoModel::~thermoModel()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace surfaceFilmModels
|
||||
} // End namespace regionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,184 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::regionModels::surfaceFilmModels::thermoModel
|
||||
|
||||
Description
|
||||
Base class for film thermo models
|
||||
|
||||
SourceFiles
|
||||
filmThermoModel.C
|
||||
filmThermoModelNew.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef filmThermoModel_H
|
||||
#define filmThermoModel_H
|
||||
|
||||
#include "filmSubModelBase.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace regionModels
|
||||
{
|
||||
namespace surfaceFilmModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class thermoModel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class thermoModel
|
||||
:
|
||||
public filmSubModelBase
|
||||
{
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("thermophysicalProperties");
|
||||
|
||||
|
||||
// Declare runtime constructor selection table
|
||||
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
thermoModel,
|
||||
dictionary,
|
||||
(
|
||||
surfaceFilmRegionModel& film,
|
||||
const dictionary& dict
|
||||
),
|
||||
(film, dict)
|
||||
);
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
thermoModel(surfaceFilmRegionModel& film);
|
||||
|
||||
//- Construct from type name, dictionary and surface film model
|
||||
thermoModel
|
||||
(
|
||||
const word& modelType,
|
||||
surfaceFilmRegionModel& film,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
//- Disallow default bitwise copy construction
|
||||
thermoModel(const thermoModel&) = delete;
|
||||
|
||||
|
||||
// Selectors
|
||||
|
||||
//- Return a reference to the selected phase change model
|
||||
static autoPtr<thermoModel> New
|
||||
(
|
||||
surfaceFilmRegionModel& film,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~thermoModel();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Return the specie name
|
||||
virtual const word& name() const = 0;
|
||||
|
||||
|
||||
// Elemental access
|
||||
|
||||
//- Return density [kg/m^3]
|
||||
virtual scalar rho(const scalar p, const scalar T) const = 0;
|
||||
|
||||
//- Return dynamic viscosity [Pa.s]
|
||||
virtual scalar mu(const scalar p, const scalar T) const = 0;
|
||||
|
||||
//- Return surface tension [kg/s^2]
|
||||
virtual scalar sigma(const scalar p, const scalar T) const = 0;
|
||||
|
||||
//- Return specific heat capacity [J/kg/K]
|
||||
virtual scalar Cp(const scalar p, const scalar T) const = 0;
|
||||
|
||||
//- Return thermal conductivity [W/m/K]
|
||||
virtual scalar kappa(const scalar p, const scalar T) const = 0;
|
||||
|
||||
//- Return diffusivity [m^2/s]
|
||||
virtual scalar D(const scalar p, const scalar T) const = 0;
|
||||
|
||||
//- Return latent heat [J/kg]
|
||||
virtual scalar hl(const scalar p, const scalar T) const = 0;
|
||||
|
||||
//- Return vapour pressure [Pa]
|
||||
virtual scalar pv(const scalar p, const scalar T) const = 0;
|
||||
|
||||
//- Return molecular weight [kg/kmol]
|
||||
virtual scalar W() const = 0;
|
||||
|
||||
//- Return boiling temperature [K]
|
||||
virtual scalar Tb(const scalar p) const = 0;
|
||||
|
||||
|
||||
// Field access
|
||||
|
||||
//- Return density [kg/m^3]
|
||||
virtual tmp<volScalarField> rho() const = 0;
|
||||
|
||||
//- Return dynamic viscosity [Pa.s]
|
||||
virtual tmp<volScalarField> mu() const = 0;
|
||||
|
||||
//- Return surface tension [kg/s^2]
|
||||
virtual tmp<volScalarField> sigma() const = 0;
|
||||
|
||||
//- Return specific heat capacity [J/kg/K]
|
||||
virtual tmp<volScalarField> Cp() const = 0;
|
||||
|
||||
//- Return thermal conductivity [W/m/K]
|
||||
virtual tmp<volScalarField> kappa() const = 0;
|
||||
|
||||
|
||||
// Member Operators
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const thermoModel&) = delete;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace surfaceFilmModels
|
||||
} // End namespace regionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,95 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "filmThermoModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace regionModels
|
||||
{
|
||||
namespace surfaceFilmModels
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
|
||||
|
||||
autoPtr<thermoModel> thermoModel::New
|
||||
(
|
||||
surfaceFilmRegionModel& model,
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
dict.lookupEntryBackwardsCompatible
|
||||
(
|
||||
{thermoModel::typeName, "filmThermoModel"},
|
||||
false,
|
||||
true
|
||||
);
|
||||
|
||||
const dictionary& thermophysicalPropertiesDict
|
||||
(
|
||||
dict.found(thermoModel::typeName)
|
||||
? dict.subDict(thermoModel::typeName)
|
||||
: dict
|
||||
);
|
||||
|
||||
const word modelType
|
||||
(
|
||||
dict.found(thermoModel::typeName)
|
||||
? thermophysicalPropertiesDict.lookup("type")
|
||||
: thermophysicalPropertiesDict.lookup("filmThermoModel")
|
||||
);
|
||||
|
||||
Info<< " Selecting " << thermoModel::typeName
|
||||
<< " " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(modelType);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown " << thermoModel::typeName
|
||||
<< " type " << modelType << nl << nl
|
||||
<< "Valid " << thermoModel::typeName << " types are:" << nl
|
||||
<< dictionaryConstructorTablePtr_->toc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<thermoModel>
|
||||
(
|
||||
cstrIter()(model, thermophysicalPropertiesDict)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace surfaceFilmModels
|
||||
} // End namespace regionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,429 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "liquidFilmThermo.H"
|
||||
#include "demandDrivenData.H"
|
||||
#include "thermoSingleLayer.H"
|
||||
#include "extrapolatedCalculatedFvPatchFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace regionModels
|
||||
{
|
||||
namespace surfaceFilmModels
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(liquidFilmThermo, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
thermoModel,
|
||||
liquidFilmThermo,
|
||||
dictionary
|
||||
);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
|
||||
const thermoSingleLayer& liquidFilmThermo::thermoFilm() const
|
||||
{
|
||||
if (!isA<thermoSingleLayer>(filmModel_))
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Thermo model requires a " << thermoSingleLayer::typeName
|
||||
<< " film to supply the pressure and temperature, but "
|
||||
<< filmModel_.type() << " film model selected. "
|
||||
<< "Use the 'useReferenceValues' flag to employ reference "
|
||||
<< "pressure and temperature" << exit(FatalError);
|
||||
}
|
||||
|
||||
return refCast<const thermoSingleLayer>(filmModel_);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
liquidFilmThermo::liquidFilmThermo
|
||||
(
|
||||
surfaceFilmRegionModel& film,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
thermoModel(typeName, film, dict),
|
||||
useReferenceValues_(readBool(coeffDict_.lookup("useReferenceValues"))),
|
||||
pRef_(0.0),
|
||||
TRef_(0.0)
|
||||
{
|
||||
if (dict.found("mixture"))
|
||||
{
|
||||
const dictionary& mixtureDict = dict.subDict("mixture");
|
||||
|
||||
const word name(mixtureDict.first()->keyword());
|
||||
|
||||
if (mixtureDict.isDict(name))
|
||||
{
|
||||
liquidPtr_ = liquidProperties::New(mixtureDict.subDict(name));
|
||||
}
|
||||
else
|
||||
{
|
||||
liquidPtr_ = liquidProperties::New(name);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
liquidPtr_ = liquidProperties::New(dict.lookup<word>("liquid"));
|
||||
}
|
||||
|
||||
if (useReferenceValues_)
|
||||
{
|
||||
coeffDict_.lookup("pRef") >> pRef_;
|
||||
coeffDict_.lookup("TRef") >> TRef_;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
liquidFilmThermo::~liquidFilmThermo()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
const word& liquidFilmThermo::name() const
|
||||
{
|
||||
return liquidPtr_->name();
|
||||
}
|
||||
|
||||
|
||||
scalar liquidFilmThermo::rho
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return liquidPtr_->rho(p, T);
|
||||
}
|
||||
|
||||
|
||||
scalar liquidFilmThermo::mu
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return liquidPtr_->mu(p, T);
|
||||
}
|
||||
|
||||
|
||||
scalar liquidFilmThermo::sigma
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return liquidPtr_->sigma(p, T);
|
||||
}
|
||||
|
||||
|
||||
scalar liquidFilmThermo::Cp
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return liquidPtr_->Cp(p, T);
|
||||
}
|
||||
|
||||
|
||||
scalar liquidFilmThermo::kappa
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return liquidPtr_->kappa(p, T);
|
||||
}
|
||||
|
||||
|
||||
scalar liquidFilmThermo::D
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return liquidPtr_->D(p, T);
|
||||
}
|
||||
|
||||
|
||||
scalar liquidFilmThermo::hl
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return liquidPtr_->hl(p, T);
|
||||
}
|
||||
|
||||
|
||||
scalar liquidFilmThermo::pv
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return liquidPtr_->pv(p, T);
|
||||
}
|
||||
|
||||
|
||||
scalar liquidFilmThermo::W() const
|
||||
{
|
||||
return liquidPtr_->W();
|
||||
}
|
||||
|
||||
|
||||
scalar liquidFilmThermo::Tb(const scalar p) const
|
||||
{
|
||||
return liquidPtr_->pvInvert(p);
|
||||
}
|
||||
|
||||
|
||||
tmp<volScalarField> liquidFilmThermo::rho() const
|
||||
{
|
||||
tmp<volScalarField> trho
|
||||
(
|
||||
volScalarField::New
|
||||
(
|
||||
type() + ":rho",
|
||||
film().regionMesh(),
|
||||
dimensionedScalar(dimDensity, 0),
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
scalarField& rho = trho.ref().primitiveFieldRef();
|
||||
|
||||
if (useReferenceValues_)
|
||||
{
|
||||
forAll(rho, celli)
|
||||
{
|
||||
rho[celli] = this->rho(pRef_, TRef_);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const thermoSingleLayer& film = thermoFilm();
|
||||
|
||||
const volScalarField& T = film.T();
|
||||
const volScalarField& p = film.pPrimary();
|
||||
|
||||
forAll(rho, celli)
|
||||
{
|
||||
rho[celli] = this->rho(p[celli], T[celli]);
|
||||
}
|
||||
}
|
||||
|
||||
trho.ref().correctBoundaryConditions();
|
||||
|
||||
return trho;
|
||||
}
|
||||
|
||||
|
||||
tmp<volScalarField> liquidFilmThermo::mu() const
|
||||
{
|
||||
tmp<volScalarField> tmu
|
||||
(
|
||||
volScalarField::New
|
||||
(
|
||||
type() + ":mu",
|
||||
film().regionMesh(),
|
||||
dimensionedScalar(dimPressure*dimTime, 0),
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
scalarField& mu = tmu.ref().primitiveFieldRef();
|
||||
|
||||
if (useReferenceValues_)
|
||||
{
|
||||
forAll(mu, celli)
|
||||
{
|
||||
mu[celli] = this->mu(pRef_, TRef_);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const thermoSingleLayer& film = thermoFilm();
|
||||
|
||||
const volScalarField& T = film.T();
|
||||
const volScalarField& p = film.pPrimary();
|
||||
|
||||
forAll(mu, celli)
|
||||
{
|
||||
mu[celli] = this->mu(p[celli], T[celli]);
|
||||
}
|
||||
}
|
||||
|
||||
tmu.ref().correctBoundaryConditions();
|
||||
|
||||
return tmu;
|
||||
}
|
||||
|
||||
|
||||
tmp<volScalarField> liquidFilmThermo::sigma() const
|
||||
{
|
||||
tmp<volScalarField> tsigma
|
||||
(
|
||||
volScalarField::New
|
||||
(
|
||||
type() + ":sigma",
|
||||
film().regionMesh(),
|
||||
dimensionedScalar(dimMass/sqr(dimTime), 0),
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
scalarField& sigma = tsigma.ref().primitiveFieldRef();
|
||||
|
||||
if (useReferenceValues_)
|
||||
{
|
||||
forAll(sigma, celli)
|
||||
{
|
||||
sigma[celli] = this->sigma(pRef_, TRef_);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const thermoSingleLayer& film = thermoFilm();
|
||||
|
||||
const volScalarField& T = film.T();
|
||||
const volScalarField& p = film.pPrimary();
|
||||
|
||||
forAll(sigma, celli)
|
||||
{
|
||||
sigma[celli] = this->sigma(p[celli], T[celli]);
|
||||
}
|
||||
}
|
||||
|
||||
tsigma.ref().correctBoundaryConditions();
|
||||
|
||||
return tsigma;
|
||||
}
|
||||
|
||||
|
||||
tmp<volScalarField> liquidFilmThermo::Cp() const
|
||||
{
|
||||
tmp<volScalarField> tCp
|
||||
(
|
||||
volScalarField::New
|
||||
(
|
||||
type() + ":Cp",
|
||||
film().regionMesh(),
|
||||
dimensionedScalar(dimEnergy/dimMass/dimTemperature, 0),
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
scalarField& Cp = tCp.ref().primitiveFieldRef();
|
||||
|
||||
if (useReferenceValues_)
|
||||
{
|
||||
forAll(Cp, celli)
|
||||
{
|
||||
Cp[celli] = this->Cp(pRef_, TRef_);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const thermoSingleLayer& film = thermoFilm();
|
||||
|
||||
const volScalarField& T = film.T();
|
||||
const volScalarField& p = film.pPrimary();
|
||||
|
||||
forAll(Cp, celli)
|
||||
{
|
||||
Cp[celli] = this->Cp(p[celli], T[celli]);
|
||||
}
|
||||
}
|
||||
|
||||
tCp.ref().correctBoundaryConditions();
|
||||
|
||||
return tCp;
|
||||
}
|
||||
|
||||
|
||||
tmp<volScalarField> liquidFilmThermo::kappa() const
|
||||
{
|
||||
tmp<volScalarField> tkappa
|
||||
(
|
||||
volScalarField::New
|
||||
(
|
||||
type() + ":kappa",
|
||||
film().regionMesh(),
|
||||
dimensionedScalar(dimPower/dimLength/dimTemperature, 0),
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
scalarField& kappa = tkappa.ref().primitiveFieldRef();
|
||||
|
||||
if (useReferenceValues_)
|
||||
{
|
||||
forAll(kappa, celli)
|
||||
{
|
||||
kappa[celli] = this->kappa(pRef_, TRef_);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const thermoSingleLayer& film = thermoFilm();
|
||||
|
||||
const volScalarField& T = film.T();
|
||||
const volScalarField& p = film.pPrimary();
|
||||
|
||||
forAll(kappa, celli)
|
||||
{
|
||||
kappa[celli] = this->kappa(p[celli], T[celli]);
|
||||
}
|
||||
}
|
||||
|
||||
tkappa.ref().correctBoundaryConditions();
|
||||
|
||||
return tkappa;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace surfaceFilmModels
|
||||
} // End namespace regionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,187 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::regionModels::surfaceFilmModels::liquidFilmThermo
|
||||
|
||||
Description
|
||||
Liquid thermo model
|
||||
|
||||
SourceFiles
|
||||
liquidFilmThermo.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef liquidFilmThermo_H
|
||||
#define liquidFilmThermo_H
|
||||
|
||||
#include "filmThermoModel.H"
|
||||
#include "liquidProperties.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace regionModels
|
||||
{
|
||||
namespace surfaceFilmModels
|
||||
{
|
||||
|
||||
// Forward class declarations
|
||||
class thermoSingleLayer;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class liquidFilmThermo Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class liquidFilmThermo
|
||||
:
|
||||
public thermoModel
|
||||
{
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
//- Pointer to the liquid properties
|
||||
autoPtr<liquidProperties> liquidPtr_;
|
||||
|
||||
//- Flag to indicate that model owns the liquid object
|
||||
bool ownLiquid_;
|
||||
|
||||
//- Flag to indicate that reference values of p and T should be used
|
||||
bool useReferenceValues_;
|
||||
|
||||
//- Reference pressure [pa]
|
||||
scalar pRef_;
|
||||
|
||||
//- Reference temperature [K]
|
||||
scalar TRef_;
|
||||
|
||||
|
||||
// Protected member functions
|
||||
|
||||
//- Return a reference to a thermo film
|
||||
const thermoSingleLayer& thermoFilm() const;
|
||||
|
||||
//- Initialise the liquid pointer
|
||||
void initLiquid(const dictionary& dict);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("liquid");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from surface film model and dictionary
|
||||
liquidFilmThermo
|
||||
(
|
||||
surfaceFilmRegionModel& film,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
//- Disallow default bitwise copy construction
|
||||
liquidFilmThermo(const liquidFilmThermo&) = delete;
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~liquidFilmThermo();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Return the specie name
|
||||
virtual const word& name() const;
|
||||
|
||||
|
||||
// Elemental access
|
||||
|
||||
//- Return density [kg/m^3]
|
||||
virtual scalar rho(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return dynamic viscosity [Pa.s]
|
||||
virtual scalar mu(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return surface tension [kg/s^2]
|
||||
virtual scalar sigma(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return specific heat capacity [J/kg/K]
|
||||
virtual scalar Cp(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return thermal conductivity [W/m/K]
|
||||
virtual scalar kappa(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return diffusivity [m^2/s]
|
||||
virtual scalar D(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return latent heat [J/kg]
|
||||
virtual scalar hl(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return vapour pressure [Pa]
|
||||
virtual scalar pv(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return molecular weight [kg/kmol]
|
||||
virtual scalar W() const;
|
||||
|
||||
//- Return boiling temperature [K]
|
||||
virtual scalar Tb(const scalar p) const;
|
||||
|
||||
|
||||
// Field access
|
||||
|
||||
//- Return density [kg/m^3]
|
||||
virtual tmp<volScalarField> rho() const;
|
||||
|
||||
//- Return dynamic viscosity [Pa.s]
|
||||
virtual tmp<volScalarField> mu() const;
|
||||
|
||||
//- Return surface tension [kg/s^2]
|
||||
virtual tmp<volScalarField> sigma() const;
|
||||
|
||||
//- Return specific heat capacity [J/kg/K]
|
||||
virtual tmp<volScalarField> Cp() const;
|
||||
|
||||
//- Return thermal conductivity [W/m/K]
|
||||
virtual tmp<volScalarField> kappa() const;
|
||||
|
||||
|
||||
// Member Operators
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const liquidFilmThermo&) = delete;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace surfaceFilmModels
|
||||
} // End namespace regionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2015-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2015-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2015-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2015-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -23,7 +23,7 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "liquidViscosity.H"
|
||||
#include "NewtonianViscosity.H"
|
||||
#include "thermoSingleLayer.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
@ -38,18 +38,18 @@ namespace surfaceFilmModels
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(liquidViscosity, 0);
|
||||
defineTypeNameAndDebug(NewtonianViscosity, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
viscosityModel,
|
||||
liquidViscosity,
|
||||
NewtonianViscosity,
|
||||
dictionary
|
||||
);
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
liquidViscosity::liquidViscosity
|
||||
NewtonianViscosity::NewtonianViscosity
|
||||
(
|
||||
surfaceFilmRegionModel& film,
|
||||
const dictionary& dict,
|
||||
@ -62,13 +62,13 @@ liquidViscosity::liquidViscosity
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
liquidViscosity::~liquidViscosity()
|
||||
NewtonianViscosity::~NewtonianViscosity()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
void liquidViscosity::correct
|
||||
void NewtonianViscosity::correct
|
||||
(
|
||||
const volScalarField& p,
|
||||
const volScalarField& T
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -22,18 +22,19 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::regionModels::surfaceFilmModels::liquidViscosity
|
||||
Foam::regionModels::surfaceFilmModels::NewtonianViscosity
|
||||
|
||||
Description
|
||||
liquidViscosity viscosity model
|
||||
Newtonian viscosity model
|
||||
with the viscosity obtain directly from the thermophysical properties.
|
||||
|
||||
SourceFiles
|
||||
liquidViscosity.C
|
||||
NewtonianViscosity.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef liquidViscosity_H
|
||||
#define liquidViscosity_H
|
||||
#ifndef NewtonianViscosity_H
|
||||
#define NewtonianViscosity_H
|
||||
|
||||
#include "filmViscosityModel.H"
|
||||
|
||||
@ -47,23 +48,23 @@ namespace surfaceFilmModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class liquidViscosity Declaration
|
||||
Class NewtonianViscosity Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class liquidViscosity
|
||||
class NewtonianViscosity
|
||||
:
|
||||
public viscosityModel
|
||||
{
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("liquid");
|
||||
TypeName("Newtonian");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from surface film model
|
||||
liquidViscosity
|
||||
NewtonianViscosity
|
||||
(
|
||||
surfaceFilmRegionModel& film,
|
||||
const dictionary& dict,
|
||||
@ -71,11 +72,11 @@ public:
|
||||
);
|
||||
|
||||
//- Disallow default bitwise copy construction
|
||||
liquidViscosity(const liquidViscosity&) = delete;
|
||||
NewtonianViscosity(const NewtonianViscosity&) = delete;
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~liquidViscosity();
|
||||
virtual ~NewtonianViscosity();
|
||||
|
||||
|
||||
// Member Functions
|
||||
@ -93,7 +94,7 @@ public:
|
||||
// Member Operators
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const liquidViscosity&) = delete;
|
||||
void operator=(const NewtonianViscosity&) = delete;
|
||||
};
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2017-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2017-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2017-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2017-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2017-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2017-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2017-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2017-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -146,7 +146,9 @@ tmp<fvVectorMatrix> contactAngleForce::correct(volVectorField& U)
|
||||
const scalarField& V = filmModel_.regionMesh().V();
|
||||
|
||||
const volScalarField& coverage = filmModel_.coverage();
|
||||
const volScalarField& sigma = filmModel_.sigma();
|
||||
|
||||
const tmp<volScalarField> tsigma = filmModel_.sigma();
|
||||
const volScalarField& sigma = tsigma();
|
||||
|
||||
const tmp<volScalarField> ttheta = theta();
|
||||
const volScalarField& theta = ttheta();
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2017-2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2017-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -97,7 +97,7 @@ perturbedTemperatureDependentContactAngleForce::theta() const
|
||||
|
||||
const thermoSingleLayer& film = filmType<thermoSingleLayer>();
|
||||
|
||||
const volScalarField& T = film.T();
|
||||
const volScalarField& T = film.thermo().T();
|
||||
|
||||
// Initialize with the function of temperature
|
||||
thetai.field() = thetaPtr_->value(T());
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2017-2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2017-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -84,7 +84,7 @@ tmp<volScalarField> temperatureDependentContactAngleForce::theta() const
|
||||
|
||||
const thermoSingleLayer& film = filmType<thermoSingleLayer>();
|
||||
|
||||
const volScalarField& T = film.T();
|
||||
const volScalarField& T = film.thermo().T();
|
||||
|
||||
theta.ref().field() = thetaPtr_->value(T());
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -63,12 +63,10 @@ thermocapillaryForce::~thermocapillaryForce()
|
||||
|
||||
tmp<fvVectorMatrix> thermocapillaryForce::correct(volVectorField& U)
|
||||
{
|
||||
const volScalarField& sigma = filmModel_.sigma();
|
||||
|
||||
tmp<fvVectorMatrix>
|
||||
tfvm(new fvVectorMatrix(U, dimForce));
|
||||
|
||||
tfvm.ref() += fvc::grad(sigma)/filmModel_.VbyA();
|
||||
tfvm.ref() += fvc::grad(filmModel_.sigma())/filmModel_.VbyA();
|
||||
|
||||
return tfvm;
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2013-2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -118,8 +118,8 @@ void solidification::correctModel
|
||||
{
|
||||
const thermoSingleLayer& film = filmType<thermoSingleLayer>();
|
||||
|
||||
const scalarField& T = film.T();
|
||||
const scalarField& h = film.h();
|
||||
const scalarField& T = film.thermo().T();
|
||||
const scalarField& he = film.thermo().he();
|
||||
const scalarField& coverage = film.coverage();
|
||||
|
||||
const scalar rateLimiter = min
|
||||
@ -144,7 +144,7 @@ void solidification::correctModel
|
||||
|
||||
// Heat is assumed to be removed by heat-transfer to the wall
|
||||
// so the energy remains unchanged by the phase-change.
|
||||
dEnergy[celli] += dm*h[celli];
|
||||
dEnergy[celli] += dm*he[celli];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -27,6 +27,7 @@ License
|
||||
#include "thermoSingleLayer.H"
|
||||
#include "fluidThermo.H"
|
||||
#include "basicSpecieMixture.H"
|
||||
#include "liquidThermo.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -67,12 +68,16 @@ speciePhaseChange::~speciePhaseChange()
|
||||
Foam::label speciePhaseChange::vapId() const
|
||||
{
|
||||
const thermoSingleLayer& film = filmType<thermoSingleLayer>();
|
||||
const thermoModel& thermo = film.thermo();
|
||||
|
||||
// Set local liquidThermo properties
|
||||
const liquidProperties& liquidThermo =
|
||||
refCast<const heRhoThermopureMixtureliquidProperties>(film.thermo())
|
||||
.cellThermoMixture(0).properties();
|
||||
|
||||
const basicSpecieMixture& primarySpecieThermo =
|
||||
refCast<const basicSpecieMixture>(film.primaryThermo());
|
||||
|
||||
return primarySpecieThermo.species()[thermo.name()];
|
||||
return primarySpecieThermo.species()[liquidThermo.name()];
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -26,6 +26,7 @@ License
|
||||
#include "standardPhaseChange.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "thermoSingleLayer.H"
|
||||
#include "liquidThermo.H"
|
||||
#include "zeroField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -103,14 +104,16 @@ void standardPhaseChange::correctModel
|
||||
{
|
||||
const thermoSingleLayer& film = filmType<thermoSingleLayer>();
|
||||
|
||||
// Set local thermo properties
|
||||
const thermoModel& thermo = film.thermo();
|
||||
// Set local liquidThermo properties
|
||||
const liquidProperties& liquidThermo =
|
||||
refCast<const heRhoThermopureMixtureliquidProperties>(film.thermo())
|
||||
.cellThermoMixture(0).properties();
|
||||
|
||||
// Retrieve fields from film model
|
||||
const scalarField& delta = film.delta();
|
||||
const scalarField& pInf = film.pPrimary();
|
||||
const scalarField& T = film.T();
|
||||
const scalarField& h = film.h();
|
||||
const scalarField& T = film.thermo().T();
|
||||
const scalarField& he = film.thermo().he();
|
||||
const scalarField& rho = film.rho();
|
||||
const scalarField& rhoInf = film.rhoPrimary();
|
||||
const scalarField& muInf = film.muPrimary();
|
||||
@ -125,7 +128,7 @@ void standardPhaseChange::correctModel
|
||||
const scalar Wvap = this->Wvap();
|
||||
|
||||
// Molecular weight of liquid [kg/kmol]
|
||||
const scalar Wliq = thermo.W();
|
||||
const scalar Wliq = liquidThermo.W();
|
||||
|
||||
forAll(dMass, celli)
|
||||
{
|
||||
@ -137,22 +140,22 @@ void standardPhaseChange::correctModel
|
||||
const scalar pc = pInf[celli];
|
||||
|
||||
// Calculate the boiling temperature
|
||||
const scalar Tb = thermo.Tb(pc);
|
||||
const scalar Tb = liquidThermo.pvInvert(pc);
|
||||
|
||||
// Local temperature - impose lower limit of 200 K for stability
|
||||
const scalar Tloc = min(TbFactor_*Tb, max(200.0, T[celli]));
|
||||
|
||||
// Saturation pressure [Pa]
|
||||
const scalar pSat = thermo.pv(pc, Tloc);
|
||||
const scalar pSat = liquidThermo.pv(pc, Tloc);
|
||||
|
||||
// Latent heat [J/kg]
|
||||
const scalar hVap = thermo.hl(pc, Tloc);
|
||||
const scalar hVap = liquidThermo.hl(pc, Tloc);
|
||||
|
||||
// Calculate mass transfer
|
||||
if (pSat >= 0.95*pc)
|
||||
{
|
||||
// Boiling
|
||||
const scalar Cp = thermo.Cp(pc, Tloc);
|
||||
const scalar Cp = liquidThermo.Cp(pc, Tloc);
|
||||
const scalar Tcorr = max(0.0, T[celli] - Tb);
|
||||
const scalar qCorr = limMass[celli]*Cp*(Tcorr);
|
||||
dm = qCorr/hVap;
|
||||
@ -172,7 +175,7 @@ void standardPhaseChange::correctModel
|
||||
const scalar Ys = Wliq*pSat/(Wliq*pSat + Wvap*(pc - pSat));
|
||||
|
||||
// Vapour diffusivity [m^2/s]
|
||||
const scalar Dab = thermo.D(pc, Tloc);
|
||||
const scalar Dab = liquidThermo.D(pc, Tloc);
|
||||
|
||||
// Schmidt number
|
||||
const scalar Sc = muInfc/(rhoInfc*(Dab + rootVSmall));
|
||||
@ -187,11 +190,13 @@ void standardPhaseChange::correctModel
|
||||
dm = dt*magSf[celli]*rhoInfc*hm*(Ys - YInf[celli])/(1.0 - Ys);
|
||||
}
|
||||
|
||||
dMass[celli] += min(limMass[celli], max(dm, 0));
|
||||
dm = min(limMass[celli], max(dm, 0));
|
||||
|
||||
dMass[celli] += dm;
|
||||
|
||||
// Heat is assumed to be removed by heat-transfer to the wall
|
||||
// so the energy remains unchanged by the phase-change.
|
||||
dEnergy[celli] += dm*h[celli];
|
||||
dEnergy[celli] += dm*he[celli];
|
||||
// dEnergy[celli] += dm*(h[celli] + hVap);
|
||||
}
|
||||
}
|
||||
|
||||
@ -26,6 +26,7 @@ License
|
||||
#include "waxSolventEvaporation.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "thermoSingleLayer.H"
|
||||
#include "liquidThermo.H"
|
||||
#include "zeroField.H"
|
||||
|
||||
#include "fvmDdt.H"
|
||||
@ -160,13 +161,15 @@ void waxSolventEvaporation::correctModel
|
||||
const volScalarField& rho = film.rho();
|
||||
const surfaceScalarField& phi = film.phi();
|
||||
|
||||
// Set local thermo properties
|
||||
const thermoModel& thermo = film.thermo();
|
||||
// Set local liquidThermo properties
|
||||
const liquidProperties& liquidThermo =
|
||||
refCast<const heRhoThermopureMixtureliquidProperties>(film.thermo())
|
||||
.cellThermoMixture(0).properties();
|
||||
|
||||
// Retrieve fields from film model
|
||||
const scalarField& pInf = film.pPrimary();
|
||||
const scalarField& T = film.T();
|
||||
const scalarField& h = film.h();
|
||||
const scalarField& T = film.thermo().T();
|
||||
const scalarField& he = film.thermo().he();
|
||||
const scalarField& rhoInf = film.rhoPrimary();
|
||||
const scalarField& muInf = film.muPrimary();
|
||||
const scalarField& V = film.regionMesh().V();
|
||||
@ -237,14 +240,14 @@ void waxSolventEvaporation::correctModel
|
||||
const scalar pc = pInf[celli];
|
||||
|
||||
// Calculate the boiling temperature
|
||||
const scalar Tb = thermo.Tb(pc);
|
||||
const scalar Tb = liquidThermo.pvInvert(pc);
|
||||
|
||||
// Local temperature - impose lower limit of 200 K for stability
|
||||
const scalar Tloc = min(TbFactor_*Tb, max(200.0, T[celli]));
|
||||
|
||||
const scalar pPartialCoeff
|
||||
(
|
||||
thermo.pv(pc, Tloc)*activityCoeff_->value(Xsolvent)
|
||||
liquidThermo.pv(pc, Tloc)*activityCoeff_->value(Xsolvent)
|
||||
);
|
||||
|
||||
scalar XsCoeff = pPartialCoeff/pc;
|
||||
@ -275,7 +278,7 @@ void waxSolventEvaporation::correctModel
|
||||
const scalar Re = rhoInfc*mag(dU[celli])*L_/muInfc;
|
||||
|
||||
// Vapour diffusivity [m^2/s]
|
||||
const scalar Dab = thermo.D(pc, Tloc);
|
||||
const scalar Dab = liquidThermo.D(pc, Tloc);
|
||||
|
||||
// Schmidt number
|
||||
const scalar Sc = muInfc/(rhoInfc*(Dab + rootVSmall));
|
||||
@ -306,7 +309,7 @@ void waxSolventEvaporation::correctModel
|
||||
evapRateInf[celli] = evapRateCoeff[celli]*YInf[celli];
|
||||
evapRateCoeff[celli] *= YsCoeff;
|
||||
|
||||
// hVap[celli] = thermo.hl(pc, Tloc);
|
||||
// hVap[celli] = liquidThermo.hl(pc, Tloc);
|
||||
}
|
||||
}
|
||||
|
||||
@ -367,9 +370,7 @@ void waxSolventEvaporation::correctModel
|
||||
|
||||
// Heat is assumed to be removed by heat-transfer to the wall
|
||||
// so the energy remains unchanged by the phase-change.
|
||||
dEnergy += dm*h;
|
||||
|
||||
// Latent heat [J/kg]
|
||||
dEnergy += dm*he;
|
||||
// dEnergy += dm*(h[celli] + hVap);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2017-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -37,13 +37,6 @@ namespace regionModels
|
||||
defineTypeNameAndDebug(surfaceFilmModel, 0);
|
||||
defineRunTimeSelectionTable(surfaceFilmModel, mesh);
|
||||
|
||||
const dimensionedScalar surfaceFilmModel::Tref
|
||||
(
|
||||
"Tref",
|
||||
dimTemperature,
|
||||
298.15
|
||||
);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -58,9 +58,6 @@ public:
|
||||
//- Runtime type information
|
||||
TypeName("surfaceFilmModel");
|
||||
|
||||
//- Reference temperature for enthalpy
|
||||
static const dimensionedScalar Tref;
|
||||
|
||||
|
||||
// Declare runtime constructor selection table
|
||||
|
||||
|
||||
@ -56,14 +56,15 @@ class surfaceFilmRegionModel
|
||||
public surfaceFilmModel,
|
||||
public singleLayerRegion
|
||||
{
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
// Private data
|
||||
|
||||
//- Acceleration due to gravity [m/s^2]
|
||||
const dimensionedVector& g_;
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
// Protected member functions
|
||||
|
||||
//- Read control parameters from dictionary
|
||||
@ -135,19 +136,19 @@ public:
|
||||
virtual const volScalarField& rho() const = 0;
|
||||
|
||||
//- Return the film surface tension [N/m]
|
||||
virtual const volScalarField& sigma() const = 0;
|
||||
virtual tmp<volScalarField> sigma() const = 0;
|
||||
|
||||
|
||||
// Transfer fields - to the primary region
|
||||
// Transfer fields - to the primary region
|
||||
|
||||
//- Return mass transfer source - Eulerian phase only
|
||||
virtual tmp<volScalarField> primaryMassTrans() const = 0;
|
||||
//- Return mass transfer source - Eulerian phase only
|
||||
virtual tmp<volScalarField> primaryMassTrans() const = 0;
|
||||
|
||||
//- Return the film mass available for transfer
|
||||
virtual const volScalarField& cloudMassTrans() const = 0;
|
||||
//- Return the film mass available for transfer
|
||||
virtual const volScalarField& cloudMassTrans() const = 0;
|
||||
|
||||
//- Return the parcel diameters originating from film
|
||||
virtual const volScalarField& cloudDiameterTrans() const = 0;
|
||||
//- Return the parcel diameters originating from film
|
||||
virtual const volScalarField& cloudDiameterTrans() const = 0;
|
||||
|
||||
|
||||
// Evolution
|
||||
|
||||
@ -26,6 +26,7 @@ License
|
||||
#include "thermoSingleLayer.H"
|
||||
#include "fluidThermo.H"
|
||||
#include "basicSpecieMixture.H"
|
||||
#include "liquidThermo.H"
|
||||
|
||||
#include "fvcDdt.H"
|
||||
#include "fvcDiv.H"
|
||||
@ -41,9 +42,6 @@ License
|
||||
#include "mapDistribute.H"
|
||||
#include "constants.H"
|
||||
|
||||
// Sub-models
|
||||
#include "filmThermoModel.H"
|
||||
#include "filmViscosityModel.H"
|
||||
#include "heatTransferModel.H"
|
||||
#include "phaseChangeModel.H"
|
||||
#include "filmRadiationModel.H"
|
||||
@ -64,27 +62,6 @@ namespace surfaceFilmModels
|
||||
defineTypeNameAndDebug(thermoSingleLayer, 0);
|
||||
addToRunTimeSelectionTable(surfaceFilmRegionModel, thermoSingleLayer, mesh);
|
||||
|
||||
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
|
||||
|
||||
wordList thermoSingleLayer::hBoundaryTypes()
|
||||
{
|
||||
wordList bTypes(T_.boundaryField().types());
|
||||
forAll(bTypes, patchi)
|
||||
{
|
||||
if
|
||||
(
|
||||
T_.boundaryField()[patchi].fixesValue()
|
||||
|| isA<mixedFvPatchScalarField>(T_.boundaryField()[patchi])
|
||||
|| isA<mappedFieldFvPatchField<scalar>>(T_.boundaryField()[patchi])
|
||||
)
|
||||
{
|
||||
bTypes[patchi] = fixedValueFvPatchField<scalar>::typeName;
|
||||
}
|
||||
}
|
||||
|
||||
return bTypes;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
|
||||
@ -105,27 +82,20 @@ void thermoSingleLayer::resetPrimaryRegionSourceTerms()
|
||||
}
|
||||
|
||||
|
||||
void thermoSingleLayer::correctThermoFields()
|
||||
{
|
||||
rho_ == thermo_->rho();
|
||||
sigma_ == thermo_->sigma();
|
||||
Cp_ == thermo_->Cp();
|
||||
kappa_ == thermo_->kappa();
|
||||
}
|
||||
|
||||
|
||||
void thermoSingleLayer::correctHforMappedT()
|
||||
{
|
||||
T_.correctBoundaryConditions();
|
||||
volScalarField& T = thermo_->T();
|
||||
|
||||
volScalarField::Boundary& hBf = h_.boundaryFieldRef();
|
||||
T.correctBoundaryConditions();
|
||||
|
||||
forAll(hBf, patchi)
|
||||
volScalarField::Boundary& heBf = thermo_->he().boundaryFieldRef();
|
||||
|
||||
forAll(heBf, patchi)
|
||||
{
|
||||
const fvPatchField<scalar>& Tp = T_.boundaryField()[patchi];
|
||||
const fvPatchField<scalar>& Tp = T.boundaryField()[patchi];
|
||||
if (isA<mappedFieldFvPatchField<scalar>>(Tp))
|
||||
{
|
||||
hBf[patchi] == h(Tp, patchi);
|
||||
heBf[patchi] == thermo().he(Tp, patchi);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -242,10 +212,12 @@ void thermoSingleLayer::updateSubmodels()
|
||||
1/(time().deltaT()*regionMesh().V())
|
||||
);
|
||||
|
||||
volScalarField& he = thermo_->he();
|
||||
|
||||
// Update source fields
|
||||
rhoSp_ += rVDt*(cloudMassTrans_() + primaryMassTrans_());
|
||||
USp_ += rVDt*(cloudMassTrans_()*U_() + primaryMomentumTrans_());
|
||||
hSp_ += rVDt*(cloudMassTrans_()*h_() + primaryEnergyTrans_());
|
||||
hSp_ += rVDt*(cloudMassTrans_()*he() + primaryEnergyTrans_());
|
||||
|
||||
momentumTransport_->correct();
|
||||
}
|
||||
@ -255,15 +227,20 @@ tmp<fvScalarMatrix> thermoSingleLayer::q(volScalarField& h) const
|
||||
{
|
||||
const volScalarField::Internal coverage(pos(delta_() - deltaSmall_));
|
||||
|
||||
const volScalarField::Internal& T = thermo().T();
|
||||
|
||||
const tmp<volScalarField> tCpv = thermo().Cpv();
|
||||
const volScalarField::Internal& Cpv = tCpv();
|
||||
|
||||
return
|
||||
(
|
||||
// Heat-transfer to the primary region
|
||||
- fvm::Sp((htcs_->h()/VbyA())/Cp_, h)
|
||||
+ (htcs_->h()/VbyA())*(h()/Cp_ + coverage*(TPrimary_() - T_()))
|
||||
- fvm::Sp((htcs_->h()/VbyA())/Cpv, h)
|
||||
+ (htcs_->h()/VbyA())*(h()/Cpv + coverage*(TPrimary_() - T))
|
||||
|
||||
// Heat-transfer to the wall
|
||||
- fvm::Sp((htcw_->h()/VbyA())/Cp_, h)
|
||||
+ (htcw_->h()/VbyA())*(h()/Cp_ + coverage*(Tw() - T_()))
|
||||
- fvm::Sp((htcw_->h()/VbyA())/Cpv, h)
|
||||
+ (htcw_->h()/VbyA())*(h()/Cpv + coverage*(Tw() - T))
|
||||
);
|
||||
}
|
||||
|
||||
@ -274,27 +251,23 @@ void thermoSingleLayer::solveEnergy()
|
||||
|
||||
correctHforMappedT();
|
||||
|
||||
fvScalarMatrix hEqn
|
||||
volScalarField& he = thermo_->he();
|
||||
|
||||
fvScalarMatrix heEqn
|
||||
(
|
||||
fvm::ddt(alpha_, rho_, h_) + fvm::div(phi_, h_)
|
||||
- fvm::Sp(continuityErr_, h_)
|
||||
fvm::ddt(alpha_, rho(), he) + fvm::div(phi_, he)
|
||||
- fvm::Sp(continuityErr_, he)
|
||||
==
|
||||
- hSp_
|
||||
+ q(h_)
|
||||
+ q(he)
|
||||
+ radiation_->Shs()/VbyA()
|
||||
);
|
||||
|
||||
hEqn.relax();
|
||||
heEqn.relax();
|
||||
|
||||
hEqn.solve();
|
||||
heEqn.solve();
|
||||
|
||||
// Update temperature using latest h_
|
||||
T_ == T(h_);
|
||||
|
||||
correctThermoFields();
|
||||
|
||||
// Evaluate viscosity from user-model
|
||||
viscosity_->correct(pPrimary_, T_);
|
||||
thermo_->correct();
|
||||
}
|
||||
|
||||
|
||||
@ -320,64 +293,6 @@ thermoSingleLayer::thermoSingleLayer
|
||||
)
|
||||
),
|
||||
|
||||
Cp_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Cp",
|
||||
time().timeName(),
|
||||
regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
regionMesh(),
|
||||
dimensionedScalar(dimEnergy/dimMass/dimTemperature, 0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
),
|
||||
|
||||
kappa_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"kappa",
|
||||
time().timeName(),
|
||||
regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
regionMesh(),
|
||||
dimensionedScalar(dimEnergy/dimTime/dimLength/dimTemperature, 0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
),
|
||||
|
||||
T_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"T",
|
||||
time().timeName(),
|
||||
regionMesh(),
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
regionMesh()
|
||||
),
|
||||
|
||||
h_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"h",
|
||||
time().timeName(),
|
||||
regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
regionMesh(),
|
||||
dimensionedScalar(dimEnergy/dimMass, 0),
|
||||
hBoundaryTypes()
|
||||
),
|
||||
|
||||
primaryEnergyTrans_
|
||||
(
|
||||
IOobject
|
||||
@ -443,8 +358,6 @@ thermoSingleLayer::thermoSingleLayer
|
||||
|
||||
YPrimary_(),
|
||||
|
||||
viscosity_(viscosityModel::New(*this, coeffs(), mu_)),
|
||||
|
||||
htcs_
|
||||
(
|
||||
heatTransferModel::New(*this, coeffs().subDict("upperSurfaceModels"))
|
||||
@ -512,11 +425,6 @@ thermoSingleLayer::thermoSingleLayer
|
||||
|
||||
correctCoverage();
|
||||
|
||||
correctThermoFields();
|
||||
|
||||
// Update derived fields
|
||||
h_ == h(T_);
|
||||
|
||||
surfaceScalarField phi
|
||||
(
|
||||
IOobject
|
||||
@ -528,13 +436,10 @@ thermoSingleLayer::thermoSingleLayer
|
||||
IOobject::AUTO_WRITE,
|
||||
false
|
||||
),
|
||||
fvc::flux(alpha_*rho_*U_)
|
||||
fvc::flux(alpha_*rho()*U_)
|
||||
);
|
||||
|
||||
phi_ == phi;
|
||||
|
||||
// Evaluate viscosity from user-model
|
||||
viscosity_->correct(pPrimary_, T_);
|
||||
}
|
||||
}
|
||||
|
||||
@ -626,27 +531,9 @@ void thermoSingleLayer::evolveRegion()
|
||||
}
|
||||
|
||||
|
||||
const volScalarField& thermoSingleLayer::Cp() const
|
||||
{
|
||||
return Cp_;
|
||||
}
|
||||
|
||||
|
||||
const volScalarField& thermoSingleLayer::kappa() const
|
||||
{
|
||||
return kappa_;
|
||||
}
|
||||
|
||||
|
||||
const volScalarField& thermoSingleLayer::T() const
|
||||
{
|
||||
return T_;
|
||||
}
|
||||
|
||||
|
||||
tmp<volScalarField::Internal> thermoSingleLayer::Ts() const
|
||||
{
|
||||
return T_;
|
||||
return thermo().T();
|
||||
}
|
||||
|
||||
|
||||
@ -664,30 +551,26 @@ tmp<volScalarField::Internal> thermoSingleLayer::Tw() const
|
||||
|
||||
volScalarField::Internal& Tw = tTw.ref();
|
||||
|
||||
const volScalarField& T = thermo().T();
|
||||
|
||||
// Push boundary film temperature into wall temperature internal field
|
||||
for (label i=0; i<intCoupledPatchIDs_.size(); i++)
|
||||
{
|
||||
label patchi = intCoupledPatchIDs_[i];
|
||||
const polyPatch& pp = regionMesh().boundaryMesh()[patchi];
|
||||
UIndirectList<scalar>(Tw, pp.faceCells()) =
|
||||
T_.boundaryField()[patchi];
|
||||
T.boundaryField()[patchi];
|
||||
}
|
||||
|
||||
return tTw;
|
||||
}
|
||||
|
||||
|
||||
const volScalarField& thermoSingleLayer::h() const
|
||||
{
|
||||
return h_;
|
||||
}
|
||||
|
||||
|
||||
void thermoSingleLayer::info()
|
||||
{
|
||||
kinematicSingleLayer::info();
|
||||
|
||||
const scalarField& Tinternal = T_;
|
||||
const scalarField& Tinternal = thermo().T();
|
||||
|
||||
Info<< indent << "min/mean/max(T) = "
|
||||
<< gMin(Tinternal) << ", "
|
||||
@ -706,7 +589,12 @@ tmp<volScalarField::Internal> thermoSingleLayer::Srho
|
||||
const basicSpecieMixture& primarySpecieThermo =
|
||||
refCast<const basicSpecieMixture>(primaryThermo_);
|
||||
|
||||
const label vapId = primarySpecieThermo.species()[thermo_->name()];
|
||||
// Set local liquidThermo properties
|
||||
const liquidProperties& liquidThermo =
|
||||
refCast<const heRhoThermopureMixtureliquidProperties>(thermo())
|
||||
.cellThermoMixture(0).properties();
|
||||
|
||||
const label vapId = primarySpecieThermo.species()[liquidThermo.name()];
|
||||
|
||||
tmp<volScalarField::Internal> tSrho
|
||||
(
|
||||
|
||||
@ -70,11 +70,6 @@ class thermoSingleLayer
|
||||
:
|
||||
public kinematicSingleLayer
|
||||
{
|
||||
// Private Member Functions
|
||||
|
||||
//- Return boundary types for sensible enthalpy field
|
||||
wordList hBoundaryTypes();
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
@ -87,22 +82,6 @@ protected:
|
||||
//- Reference to the primary region thermo
|
||||
const fluidThermo& primaryThermo_;
|
||||
|
||||
|
||||
// Fields
|
||||
|
||||
//- Specific heat capacity [J/kg/K]
|
||||
volScalarField Cp_;
|
||||
|
||||
//- Thermal conductivity [W/m/K]
|
||||
volScalarField kappa_;
|
||||
|
||||
//- Temperature - mean [K]
|
||||
volScalarField T_;
|
||||
|
||||
//- Sensible enthalpy [J/kg]
|
||||
volScalarField h_;
|
||||
|
||||
|
||||
// Transfer fields - to the primary region
|
||||
|
||||
//- Film energy transfer
|
||||
@ -156,9 +135,6 @@ protected:
|
||||
|
||||
// Sub-models
|
||||
|
||||
//- Viscosity model
|
||||
autoPtr<viscosityModel> viscosity_;
|
||||
|
||||
//- Heat transfer coefficient between film surface and primary
|
||||
// region [W/m^2/K]
|
||||
autoPtr<heatTransferModel> htcs_;
|
||||
@ -187,9 +163,6 @@ protected:
|
||||
//- Read control parameters from dictionary
|
||||
virtual bool read();
|
||||
|
||||
//- Correct the thermo fields
|
||||
virtual void correctThermoFields();
|
||||
|
||||
//- Correct sensible enthalpy for mapped temperature fields
|
||||
virtual void correctHforMappedT();
|
||||
|
||||
@ -252,21 +225,6 @@ public:
|
||||
inline const fluidThermo& primaryThermo() const;
|
||||
|
||||
|
||||
// Fields
|
||||
|
||||
//- Return the film specific heat capacity [J/kg/K]
|
||||
virtual const volScalarField& Cp() const;
|
||||
|
||||
//- Return the film thermal conductivity [W/m/K]
|
||||
virtual const volScalarField& kappa() const;
|
||||
|
||||
//- Return the film mean temperature [K]
|
||||
virtual const volScalarField& T() const;
|
||||
|
||||
//- Return the film sensible enthalpy [J/kg]
|
||||
virtual const volScalarField& h() const;
|
||||
|
||||
|
||||
// Derived Fields
|
||||
|
||||
//- Return the film surface temperature [K]
|
||||
@ -278,29 +236,6 @@ public:
|
||||
virtual tmp<volScalarField::Internal> Tw() const;
|
||||
|
||||
|
||||
// Thermo functions
|
||||
|
||||
//- Return sensible enthalpy as a function of temperature
|
||||
// for a patch
|
||||
inline tmp<scalarField> h
|
||||
(
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const;
|
||||
|
||||
//- Return sensible enthalpy as a function of temperature
|
||||
inline tmp<volScalarField> h
|
||||
(
|
||||
const volScalarField& T
|
||||
) const;
|
||||
|
||||
//- Return temperature as a function of sensible enthalpy
|
||||
inline tmp<volScalarField> T
|
||||
(
|
||||
const volScalarField& h
|
||||
) const;
|
||||
|
||||
|
||||
// Source fields (read/write access)
|
||||
|
||||
//- External hook to add sources to the film
|
||||
|
||||
@ -45,47 +45,6 @@ inline const fluidThermo& thermoSingleLayer::primaryThermo() const
|
||||
}
|
||||
|
||||
|
||||
inline tmp<scalarField> thermoSingleLayer::h
|
||||
(
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
const scalarField& Cp = Cp_.boundaryField()[patchi];
|
||||
return Cp*(T - Tref.value());
|
||||
}
|
||||
|
||||
|
||||
inline tmp<volScalarField> thermoSingleLayer::h
|
||||
(
|
||||
const volScalarField& T
|
||||
) const
|
||||
{
|
||||
return volScalarField::New
|
||||
(
|
||||
"h(" + T.name() + ")",
|
||||
Cp_*(T - Tref)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
inline tmp<volScalarField> thermoSingleLayer::T
|
||||
(
|
||||
const volScalarField& h
|
||||
) const
|
||||
{
|
||||
tmp<volScalarField> tT
|
||||
(
|
||||
volScalarField::New("T(" + h.name() + ")", h/Cp_ + Tref)
|
||||
);
|
||||
|
||||
tT.ref().min(Tmax_);
|
||||
tT.ref().max(Tmin_);
|
||||
|
||||
return tT;
|
||||
}
|
||||
|
||||
|
||||
inline const volScalarField::Internal& thermoSingleLayer::hSp() const
|
||||
{
|
||||
return hSp_;
|
||||
|
||||
@ -26,6 +26,9 @@ License
|
||||
#include "Ar.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
#include "thermodynamicConstants.H"
|
||||
using namespace Foam::constant::thermodynamic;
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
@ -92,7 +95,8 @@ Foam::Ar::Ar()
|
||||
kappa_("kappa", 0.1819, -0.0003176, -4.11e-06, 0.0, 0.0, 0.0),
|
||||
kappag_("kappag", 0.0001236, 0.8262, -132.8, 16000),
|
||||
sigma_("sigma", 150.86, 0.03823, 1.2927, 0.0, 0.0, 0.0),
|
||||
D_("D", 147.18, 20.1, 39.948, 28) // note: Same as nHeptane
|
||||
D_("D", 147.18, 20.1, 39.948, 28), // note: Same as nHeptane
|
||||
Hf_(h_.value(Tstd))
|
||||
{}
|
||||
|
||||
|
||||
@ -127,7 +131,8 @@ Foam::Ar::Ar
|
||||
kappa_(thermalConductivity),
|
||||
kappag_(vapourThermalConductivity),
|
||||
sigma_(surfaceTension),
|
||||
D_(vapourDiffusivity)
|
||||
D_(vapourDiffusivity),
|
||||
Hf_(h_.value(Tstd))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -76,6 +76,9 @@ class Ar
|
||||
Function1s::NSRDS6 sigma_;
|
||||
Function2s::APIdiffCoef D_;
|
||||
|
||||
//- Liquid heat of formation [J/kg]
|
||||
scalar Hf_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -133,8 +136,14 @@ public:
|
||||
//- Liquid heat capacity [J/kg/K]
|
||||
inline scalar Cp(scalar p, scalar T) const;
|
||||
|
||||
//- Liquid enthalpy [J/kg]
|
||||
inline scalar h(scalar p, scalar T) const;
|
||||
//- Liquid sensible enthalpy [J/kg]
|
||||
inline scalar Hs(scalar p, scalar T) const;
|
||||
|
||||
//- Liquid heat of formation [J/kg]
|
||||
inline scalar Hf() const;
|
||||
|
||||
//- Liquid absolute enthalpy [J/kg]
|
||||
inline scalar Ha(scalar p, scalar T) const;
|
||||
|
||||
//- Ideal gas heat capacity [J/kg/K]
|
||||
inline scalar Cpg(scalar p, scalar T) const;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -47,7 +47,19 @@ inline Foam::scalar Foam::Ar::Cp(scalar p, scalar T) const
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::Ar::h(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::Ar::Hs(scalar p, scalar T) const
|
||||
{
|
||||
return Ha(p, T) - Hf();
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::Ar::Hf() const
|
||||
{
|
||||
return Hf_;
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::Ar::Ha(scalar p, scalar T) const
|
||||
{
|
||||
return h_.value(T);
|
||||
}
|
||||
|
||||
@ -26,6 +26,9 @@ License
|
||||
#include "C10H22.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
#include "thermodynamicConstants.H"
|
||||
using namespace Foam::constant::thermodynamic;
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
@ -100,7 +103,8 @@ Foam::C10H22::C10H22()
|
||||
kappa_("kappa", 0.2063, -0.000254, 0.0, 0.0, 0.0, 0.0),
|
||||
kappag_("kappag", -668.4, 0.9323, -4071000000.0, 0.0),
|
||||
sigma_("sigma", 617.70, 0.055435, 1.3095, 0.0, 0.0, 0.0),
|
||||
D_("D", 147.18, 20.1, 142.285, 28.0) // note: Same as nHeptane
|
||||
D_("D", 147.18, 20.1, 142.285, 28.0), // note: Same as nHeptane
|
||||
Hf_(h_.value(Tstd))
|
||||
{}
|
||||
|
||||
|
||||
@ -135,7 +139,8 @@ Foam::C10H22::C10H22
|
||||
kappa_(thermalConductivity),
|
||||
kappag_(vapourThermalConductivity),
|
||||
sigma_(surfaceTension),
|
||||
D_(vapourDiffusivity)
|
||||
D_(vapourDiffusivity),
|
||||
Hf_(h_.value(Tstd))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -76,6 +76,9 @@ class C10H22
|
||||
Function1s::NSRDS6 sigma_;
|
||||
Function2s::APIdiffCoef D_;
|
||||
|
||||
//- Liquid heat of formation [J/kg]
|
||||
scalar Hf_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -133,8 +136,14 @@ public:
|
||||
//- Liquid heat capacity [J/kg/K]
|
||||
inline scalar Cp(scalar p, scalar T) const;
|
||||
|
||||
//- Liquid enthalpy [J/kg]
|
||||
inline scalar h(scalar p, scalar T) const;
|
||||
//- Liquid sensible enthalpy [J/kg]
|
||||
inline scalar Hs(scalar p, scalar T) const;
|
||||
|
||||
//- Liquid heat of formation [J/kg]
|
||||
inline scalar Hf() const;
|
||||
|
||||
//- Liquid absolute enthalpy [J/kg]
|
||||
inline scalar Ha(scalar p, scalar T) const;
|
||||
|
||||
//- Ideal gas heat capacity [J/kg/K]
|
||||
inline scalar Cpg(scalar p, scalar T) const;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -47,7 +47,19 @@ inline Foam::scalar Foam::C10H22::Cp(scalar p, scalar T) const
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C10H22::h(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::C10H22::Hs(scalar p, scalar T) const
|
||||
{
|
||||
return Ha(p, T) - Hf();
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C10H22::Hf() const
|
||||
{
|
||||
return Hf_;
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C10H22::Ha(scalar p, scalar T) const
|
||||
{
|
||||
return h_.value(T);
|
||||
}
|
||||
|
||||
@ -26,6 +26,9 @@ License
|
||||
#include "C12H26.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
#include "thermodynamicConstants.H"
|
||||
using namespace Foam::constant::thermodynamic;
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
@ -100,7 +103,8 @@ Foam::C12H26::C12H26()
|
||||
kappa_("kappa", 0.2047, -0.0002326, 0.0, 0.0, 0.0, 0.0),
|
||||
kappag_("kappag", 5.719e-06, 1.4699, 579.4, 0.0),
|
||||
sigma_("sigma", 658.0, 0.055493, 1.3262, 0.0, 0.0, 0.0),
|
||||
D_("D", 147.18, 20.1, 170.338, 28.0) // note: Same as nHeptane
|
||||
D_("D", 147.18, 20.1, 170.338, 28.0), // note: Same as nHeptane
|
||||
Hf_(h_.value(Tstd))
|
||||
{}
|
||||
|
||||
|
||||
@ -135,7 +139,8 @@ Foam::C12H26::C12H26
|
||||
kappa_(thermalConductivity),
|
||||
kappag_(vapourThermalConductivity),
|
||||
sigma_(surfaceTension),
|
||||
D_(vapourDiffusivity)
|
||||
D_(vapourDiffusivity),
|
||||
Hf_(h_.value(Tstd))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -76,6 +76,9 @@ class C12H26
|
||||
Function1s::NSRDS6 sigma_;
|
||||
Function2s::APIdiffCoef D_;
|
||||
|
||||
//- Liquid heat of formation [J/kg]
|
||||
scalar Hf_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -133,8 +136,14 @@ public:
|
||||
//- Liquid heat capacity [J/kg/K]
|
||||
inline scalar Cp(scalar p, scalar T) const;
|
||||
|
||||
//- Liquid enthalpy [J/kg]
|
||||
inline scalar h(scalar p, scalar T) const;
|
||||
//- Liquid sensible enthalpy [J/kg]
|
||||
inline scalar Hs(scalar p, scalar T) const;
|
||||
|
||||
//- Liquid heat of formation [J/kg]
|
||||
inline scalar Hf() const;
|
||||
|
||||
//- Liquid absolute enthalpy [J/kg]
|
||||
inline scalar Ha(scalar p, scalar T) const;
|
||||
|
||||
//- Ideal gas heat capacity [J/kg/K]
|
||||
inline scalar Cpg(scalar p, scalar T) const;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -47,7 +47,19 @@ inline Foam::scalar Foam::C12H26::Cp(scalar p, scalar T) const
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C12H26::h(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::C12H26::Hs(scalar p, scalar T) const
|
||||
{
|
||||
return Ha(p, T) - Hf();
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C12H26::Hf() const
|
||||
{
|
||||
return Hf_;
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C12H26::Ha(scalar p, scalar T) const
|
||||
{
|
||||
return h_.value(T);
|
||||
}
|
||||
|
||||
@ -26,6 +26,9 @@ License
|
||||
#include "C13H28.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
#include "thermodynamicConstants.H"
|
||||
using namespace Foam::constant::thermodynamic;
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
@ -100,7 +103,8 @@ Foam::C13H28::C13H28()
|
||||
kappa_("kappa", 0.1981, -0.0002046, 0.0, 0.0, 0.0, 0.0),
|
||||
kappag_("kappag", 5.3701e-06, 1.4751, 599.09, 0.0),
|
||||
sigma_("sigma", 675.80, 0.05561, 1.3361, 0.0, 0.0, 0.0),
|
||||
D_("D", 147.18, 20.1, 184.365, 28.0) // note: Same as nHeptane
|
||||
D_("D", 147.18, 20.1, 184.365, 28.0), // note: Same as nHeptane
|
||||
Hf_(h_.value(Tstd))
|
||||
{}
|
||||
|
||||
|
||||
@ -135,7 +139,8 @@ Foam::C13H28::C13H28
|
||||
kappa_(thermalConductivity),
|
||||
kappag_(vapourThermalConductivity),
|
||||
sigma_(surfaceTension),
|
||||
D_(vapourDiffusivity)
|
||||
D_(vapourDiffusivity),
|
||||
Hf_(h_.value(Tstd))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -76,6 +76,9 @@ class C13H28
|
||||
Function1s::NSRDS6 sigma_;
|
||||
Function2s::APIdiffCoef D_;
|
||||
|
||||
//- Liquid heat of formation [J/kg]
|
||||
scalar Hf_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -133,8 +136,14 @@ public:
|
||||
//- Liquid heat capacity [J/kg/K]
|
||||
inline scalar Cp(scalar p, scalar T) const;
|
||||
|
||||
//- Liquid enthalpy [J/kg]
|
||||
inline scalar h(scalar p, scalar T) const;
|
||||
//- Liquid sensible enthalpy [J/kg]
|
||||
inline scalar Hs(scalar p, scalar T) const;
|
||||
|
||||
//- Liquid heat of formation [J/kg]
|
||||
inline scalar Hf() const;
|
||||
|
||||
//- Liquid absolute enthalpy [J/kg]
|
||||
inline scalar Ha(scalar p, scalar T) const;
|
||||
|
||||
//- Ideal gas heat capacity [J/kg/K]
|
||||
inline scalar Cpg(scalar p, scalar T) const;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -47,7 +47,19 @@ inline Foam::scalar Foam::C13H28::Cp(scalar p, scalar T) const
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C13H28::h(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::C13H28::Hs(scalar p, scalar T) const
|
||||
{
|
||||
return Ha(p, T) - Hf();
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C13H28::Hf() const
|
||||
{
|
||||
return Hf_;
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C13H28::Ha(scalar p, scalar T) const
|
||||
{
|
||||
return h_.value(T);
|
||||
}
|
||||
|
||||
@ -26,6 +26,9 @@ License
|
||||
#include "C14H30.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
#include "thermodynamicConstants.H"
|
||||
using namespace Foam::constant::thermodynamic;
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
@ -100,7 +103,8 @@ Foam::C14H30::C14H30()
|
||||
kappa_("kappa", 0.1957, -0.0001993, 0.0, 0.0, 0.0, 0.0),
|
||||
kappag_("kappag", -0.000628, 0.944, -5490, 0.0),
|
||||
sigma_("sigma", 692.40, 0.056436, 1.3658, 0.0, 0.0, 0.0),
|
||||
D_("D", 147.18, 20.1, 198.392, 28.0) // note: Same as nHeptane
|
||||
D_("D", 147.18, 20.1, 198.392, 28.0), // note: Same as nHeptane
|
||||
Hf_(h_.value(Tstd))
|
||||
{}
|
||||
|
||||
|
||||
@ -135,7 +139,8 @@ Foam::C14H30::C14H30
|
||||
kappa_(thermalConductivity),
|
||||
kappag_(vapourThermalConductivity),
|
||||
sigma_(surfaceTension),
|
||||
D_(vapourDiffusivity)
|
||||
D_(vapourDiffusivity),
|
||||
Hf_(h_.value(Tstd))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -76,6 +76,9 @@ class C14H30
|
||||
Function1s::NSRDS6 sigma_;
|
||||
Function2s::APIdiffCoef D_;
|
||||
|
||||
//- Liquid heat of formation [J/kg]
|
||||
scalar Hf_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -133,8 +136,14 @@ public:
|
||||
//- Liquid heat capacity [J/kg/K]
|
||||
inline scalar Cp(scalar p, scalar T) const;
|
||||
|
||||
//- Liquid enthalpy [J/kg]
|
||||
inline scalar h(scalar p, scalar T) const;
|
||||
//- Liquid sensible enthalpy [J/kg]
|
||||
inline scalar Hs(scalar p, scalar T) const;
|
||||
|
||||
//- Liquid heat of formation [J/kg]
|
||||
inline scalar Hf() const;
|
||||
|
||||
//- Liquid absolute enthalpy [J/kg]
|
||||
inline scalar Ha(scalar p, scalar T) const;
|
||||
|
||||
//- Ideal gas heat capacity [J/kg/K]
|
||||
inline scalar Cpg(scalar p, scalar T) const;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -47,7 +47,19 @@ inline Foam::scalar Foam::C14H30::Cp(scalar p, scalar T) const
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C14H30::h(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::C14H30::Hs(scalar p, scalar T) const
|
||||
{
|
||||
return Ha(p, T) - Hf();
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C14H30::Hf() const
|
||||
{
|
||||
return Hf_;
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C14H30::Ha(scalar p, scalar T) const
|
||||
{
|
||||
return h_.value(T);
|
||||
}
|
||||
|
||||
@ -26,6 +26,9 @@ License
|
||||
#include "C16H34.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
#include "thermodynamicConstants.H"
|
||||
using namespace Foam::constant::thermodynamic;
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
@ -100,7 +103,8 @@ Foam::C16H34::C16H34()
|
||||
kappa_("kappa", 0.1963, -0.00019, 0.0, 0.0, 0.0, 0.0),
|
||||
kappag_("kappag", 3.075e-06, 1.552, 678.0, 0.0),
|
||||
sigma_("sigma", 720.60, 0.05699, 1.3929, 0.0, 0.0, 0.0),
|
||||
D_("D", 147.18, 20.1, 226.446, 28.0) // note: Same as nHeptane
|
||||
D_("D", 147.18, 20.1, 226.446, 28.0), // note: Same as nHeptane
|
||||
Hf_(h_.value(Tstd))
|
||||
{}
|
||||
|
||||
|
||||
@ -135,7 +139,8 @@ Foam::C16H34::C16H34
|
||||
kappa_(thermalConductivity),
|
||||
kappag_(vapourThermalConductivity),
|
||||
sigma_(surfaceTension),
|
||||
D_(vapourDiffusivity)
|
||||
D_(vapourDiffusivity),
|
||||
Hf_(h_.value(Tstd))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -76,6 +76,9 @@ class C16H34
|
||||
Function1s::NSRDS6 sigma_;
|
||||
Function2s::APIdiffCoef D_;
|
||||
|
||||
//- Liquid heat of formation [J/kg]
|
||||
scalar Hf_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -133,8 +136,14 @@ public:
|
||||
//- Liquid heat capacity [J/kg/K]
|
||||
inline scalar Cp(scalar p, scalar T) const;
|
||||
|
||||
//- Liquid enthalpy [J/kg]
|
||||
inline scalar h(scalar p, scalar T) const;
|
||||
//- Liquid sensible enthalpy [J/kg]
|
||||
inline scalar Hs(scalar p, scalar T) const;
|
||||
|
||||
//- Liquid heat of formation [J/kg]
|
||||
inline scalar Hf() const;
|
||||
|
||||
//- Liquid absolute enthalpy [J/kg]
|
||||
inline scalar Ha(scalar p, scalar T) const;
|
||||
|
||||
//- Ideal gas heat capacity [J/kg/K]
|
||||
inline scalar Cpg(scalar p, scalar T) const;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -47,7 +47,19 @@ inline Foam::scalar Foam::C16H34::Cp(scalar p, scalar T) const
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C16H34::h(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::C16H34::Hs(scalar p, scalar T) const
|
||||
{
|
||||
return Ha(p, T) - Hf();
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C16H34::Hf() const
|
||||
{
|
||||
return Hf_;
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C16H34::Ha(scalar p, scalar T) const
|
||||
{
|
||||
return h_.value(T);
|
||||
}
|
||||
|
||||
@ -26,6 +26,9 @@ License
|
||||
#include "C2H5OH.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
#include "thermodynamicConstants.H"
|
||||
using namespace Foam::constant::thermodynamic;
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
@ -100,7 +103,8 @@ Foam::C2H5OH::C2H5OH()
|
||||
kappa_("kappa", 0.253, -0.000281, 0.0, 0.0, 0.0, 0.0),
|
||||
kappag_("kappag", -3.12, 0.7152, -3550000.0, 0.0),
|
||||
sigma_("sigma", 3.7640e-02, -2.1570e-05, -1.025e-07, 0.0, 0.0, 0.0),
|
||||
D_("D", 147.18, 20.1, 46.069, 28) // note: Same as nHeptane
|
||||
D_("D", 147.18, 20.1, 46.069, 28), // note: Same as nHeptane
|
||||
Hf_(h_.value(Tstd))
|
||||
{}
|
||||
|
||||
|
||||
@ -135,7 +139,8 @@ Foam::C2H5OH::C2H5OH
|
||||
kappa_(thermalConductivity),
|
||||
kappag_(vapourThermalConductivity),
|
||||
sigma_(surfaceTension),
|
||||
D_(vapourDiffusivity)
|
||||
D_(vapourDiffusivity),
|
||||
Hf_(h_.value(Tstd))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -76,6 +76,9 @@ class C2H5OH
|
||||
Function1s::NSRDS0 sigma_;
|
||||
Function2s::APIdiffCoef D_;
|
||||
|
||||
//- Liquid heat of formation [J/kg]
|
||||
scalar Hf_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -133,8 +136,14 @@ public:
|
||||
//- Liquid heat capacity [J/kg/K]
|
||||
inline scalar Cp(scalar p, scalar T) const;
|
||||
|
||||
//- Liquid enthalpy [J/kg]
|
||||
inline scalar h(scalar p, scalar T) const;
|
||||
//- Liquid sensible enthalpy [J/kg]
|
||||
inline scalar Hs(scalar p, scalar T) const;
|
||||
|
||||
//- Liquid heat of formation [J/kg]
|
||||
inline scalar Hf() const;
|
||||
|
||||
//- Liquid absolute enthalpy [J/kg]
|
||||
inline scalar Ha(scalar p, scalar T) const;
|
||||
|
||||
//- Ideal gas heat capacity [J/kg/K]
|
||||
inline scalar Cpg(scalar p, scalar T) const;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -47,7 +47,19 @@ inline Foam::scalar Foam::C2H5OH::Cp(scalar p, scalar T) const
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C2H5OH::h(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::C2H5OH::Hs(scalar p, scalar T) const
|
||||
{
|
||||
return Ha(p, T) - Hf();
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C2H5OH::Hf() const
|
||||
{
|
||||
return Hf_;
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C2H5OH::Ha(scalar p, scalar T) const
|
||||
{
|
||||
return h_.value(T);
|
||||
}
|
||||
|
||||
@ -26,6 +26,9 @@ License
|
||||
#include "C2H6.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
#include "thermodynamicConstants.H"
|
||||
using namespace Foam::constant::thermodynamic;
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
@ -90,7 +93,8 @@ Foam::C2H6::C2H6()
|
||||
kappa_("kappa", 0.35758, -0.0011458, 6.1866e-07, 0.0, 0.0, 0.0),
|
||||
kappag_("kappag", 7.3869e-05, 1.1689, 500.73, 0.0),
|
||||
sigma_("sigma", 305.32, 0.048643, 1.1981, 0.0, 0.0, 0.0),
|
||||
D_("D", 147.18, 20.1, 30.070, 28) // note: Same as nHeptane
|
||||
D_("D", 147.18, 20.1, 30.070, 28), // note: Same as nHeptane
|
||||
Hf_(h_.value(Tstd))
|
||||
{}
|
||||
|
||||
|
||||
@ -125,7 +129,8 @@ Foam::C2H6::C2H6
|
||||
kappa_(thermalConductivity),
|
||||
kappag_(vapourThermalConductivity),
|
||||
sigma_(surfaceTension),
|
||||
D_(vapourDiffusivity)
|
||||
D_(vapourDiffusivity),
|
||||
Hf_(h_.value(Tstd))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -76,6 +76,9 @@ class C2H6
|
||||
Function1s::NSRDS6 sigma_;
|
||||
Function2s::APIdiffCoef D_;
|
||||
|
||||
//- Liquid heat of formation [J/kg]
|
||||
scalar Hf_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -133,8 +136,14 @@ public:
|
||||
//- Liquid heat capacity [J/kg/K]
|
||||
inline scalar Cp(scalar p, scalar T) const;
|
||||
|
||||
//- Liquid enthalpy [J/kg]
|
||||
inline scalar h(scalar p, scalar T) const;
|
||||
//- Liquid sensible enthalpy [J/kg]
|
||||
inline scalar Hs(scalar p, scalar T) const;
|
||||
|
||||
//- Liquid heat of formation [J/kg]
|
||||
inline scalar Hf() const;
|
||||
|
||||
//- Liquid absolute enthalpy [J/kg]
|
||||
inline scalar Ha(scalar p, scalar T) const;
|
||||
|
||||
//- Ideal gas heat capacity [J/kg/K]
|
||||
inline scalar Cpg(scalar p, scalar T) const;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -47,7 +47,19 @@ inline Foam::scalar Foam::C2H6::Cp(scalar p, scalar T) const
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C2H6::h(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::C2H6::Hs(scalar p, scalar T) const
|
||||
{
|
||||
return Ha(p, T) - Hf();
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C2H6::Hf() const
|
||||
{
|
||||
return Hf_;
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C2H6::Ha(scalar p, scalar T) const
|
||||
{
|
||||
return h_.value(T);
|
||||
}
|
||||
|
||||
@ -26,6 +26,9 @@ License
|
||||
#include "C2H6O.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
#include "thermodynamicConstants.H"
|
||||
using namespace Foam::constant::thermodynamic;
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
@ -92,7 +95,8 @@ Foam::C2H6O::C2H6O()
|
||||
kappa_("kappa", 0.31276, -0.0005677, 0.0, 0.0, 0.0, 0.0),
|
||||
kappag_("kappag", 0.2247, 0.1026, 997.06, 1762900),
|
||||
sigma_("sigma", 400.10, 0.06096, 1.2286, 0, 0, 0),
|
||||
D_("D", 147.18, 20.1, 46.069, 28) // note: Same as nHeptane
|
||||
D_("D", 147.18, 20.1, 46.069, 28), // note: Same as nHeptane
|
||||
Hf_(h_.value(Tstd))
|
||||
{}
|
||||
|
||||
|
||||
@ -127,7 +131,8 @@ Foam::C2H6O::C2H6O
|
||||
kappa_(thermalConductivity),
|
||||
kappag_(vapourThermalConductivity),
|
||||
sigma_(surfaceTension),
|
||||
D_(vapourDiffusivity)
|
||||
D_(vapourDiffusivity),
|
||||
Hf_(h_.value(Tstd))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -76,6 +76,9 @@ class C2H6O
|
||||
Function1s::NSRDS6 sigma_;
|
||||
Function2s::APIdiffCoef D_;
|
||||
|
||||
//- Liquid heat of formation [J/kg]
|
||||
scalar Hf_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -133,8 +136,14 @@ public:
|
||||
//- Liquid heat capacity [J/kg/K]
|
||||
inline scalar Cp(scalar p, scalar T) const;
|
||||
|
||||
//- Liquid enthalpy [J/kg]
|
||||
inline scalar h(scalar p, scalar T) const;
|
||||
//- Liquid sensible enthalpy [J/kg]
|
||||
inline scalar Hs(scalar p, scalar T) const;
|
||||
|
||||
//- Liquid heat of formation [J/kg]
|
||||
inline scalar Hf() const;
|
||||
|
||||
//- Liquid absolute enthalpy [J/kg]
|
||||
inline scalar Ha(scalar p, scalar T) const;
|
||||
|
||||
//- Ideal gas heat capacity [J/kg/K]
|
||||
inline scalar Cpg(scalar p, scalar T) const;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -47,7 +47,19 @@ inline Foam::scalar Foam::C2H6O::Cp(scalar p, scalar T) const
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C2H6O::h(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::C2H6O::Hs(scalar p, scalar T) const
|
||||
{
|
||||
return Ha(p, T) - Hf();
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C2H6O::Hf() const
|
||||
{
|
||||
return Hf_;
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C2H6O::Ha(scalar p, scalar T) const
|
||||
{
|
||||
return h_.value(T);
|
||||
}
|
||||
|
||||
@ -26,6 +26,9 @@ License
|
||||
#include "C3H6O.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
#include "thermodynamicConstants.H"
|
||||
using namespace Foam::constant::thermodynamic;
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
@ -100,7 +103,8 @@ Foam::C3H6O::C3H6O()
|
||||
kappa_("kappa", 0.2502, -0.000298, 0.0, 0.0, 0.0, 0.0),
|
||||
kappag_("kappag", -26.8, 0.9098, -126500000, 0.0),
|
||||
sigma_("sigma", 508.20, 0.0622, 1.124, 0.0, 0.0, 0.0),
|
||||
D_("D", 147.18, 20.1, 58.08, 28) // note: Same as nHeptane
|
||||
D_("D", 147.18, 20.1, 58.08, 28), // note: Same as nHeptane
|
||||
Hf_(h_.value(Tstd))
|
||||
{}
|
||||
|
||||
|
||||
@ -135,7 +139,8 @@ Foam::C3H6O::C3H6O
|
||||
kappa_(thermalConductivity),
|
||||
kappag_(vapourThermalConductivity),
|
||||
sigma_(surfaceTension),
|
||||
D_(vapourDiffusivity)
|
||||
D_(vapourDiffusivity),
|
||||
Hf_(h_.value(Tstd))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -76,6 +76,9 @@ class C3H6O
|
||||
Function1s::NSRDS6 sigma_;
|
||||
Function2s::APIdiffCoef D_;
|
||||
|
||||
//- Liquid heat of formation [J/kg]
|
||||
scalar Hf_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -133,8 +136,14 @@ public:
|
||||
//- Liquid heat capacity [J/kg/K]
|
||||
inline scalar Cp(scalar p, scalar T) const;
|
||||
|
||||
//- Liquid enthalpy [J/kg]
|
||||
inline scalar h(scalar p, scalar T) const;
|
||||
//- Liquid sensible enthalpy [J/kg]
|
||||
inline scalar Hs(scalar p, scalar T) const;
|
||||
|
||||
//- Liquid heat of formation [J/kg]
|
||||
inline scalar Hf() const;
|
||||
|
||||
//- Liquid absolute enthalpy [J/kg]
|
||||
inline scalar Ha(scalar p, scalar T) const;
|
||||
|
||||
//- Ideal gas heat capacity [J/kg/K]
|
||||
inline scalar Cpg(scalar p, scalar T) const;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -47,7 +47,19 @@ inline Foam::scalar Foam::C3H6O::Cp(scalar p, scalar T) const
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C3H6O::h(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::C3H6O::Hs(scalar p, scalar T) const
|
||||
{
|
||||
return Ha(p, T) - Hf();
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C3H6O::Hf() const
|
||||
{
|
||||
return Hf_;
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C3H6O::Ha(scalar p, scalar T) const
|
||||
{
|
||||
return h_.value(T);
|
||||
}
|
||||
|
||||
@ -26,6 +26,9 @@ License
|
||||
#include "C3H8.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
#include "thermodynamicConstants.H"
|
||||
using namespace Foam::constant::thermodynamic;
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
@ -89,7 +92,8 @@ Foam::C3H8::C3H8()
|
||||
kappa_("kappa", 0.26755, -0.00066457, 2.774e-07, 0.0, 0.0, 0.0),
|
||||
kappag_("kappag", -1.12, 0.10972, -9834.6, -7535800),
|
||||
sigma_("sigma", 369.83, 0.05092, 1.2197, 0.0, 0.0, 0.0),
|
||||
D_("D", 147.18, 20.1, 44.096, 28) // note: Same as nHeptane
|
||||
D_("D", 147.18, 20.1, 44.096, 28), // note: Same as nHeptane
|
||||
Hf_(h_.value(Tstd))
|
||||
{}
|
||||
|
||||
|
||||
@ -124,7 +128,8 @@ Foam::C3H8::C3H8
|
||||
kappa_(thermalConductivity),
|
||||
kappag_(vapourThermalConductivity),
|
||||
sigma_(surfaceTension),
|
||||
D_(vapourDiffusivity)
|
||||
D_(vapourDiffusivity),
|
||||
Hf_(h_.value(Tstd))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -76,6 +76,9 @@ class C3H8
|
||||
Function1s::NSRDS6 sigma_;
|
||||
Function2s::APIdiffCoef D_;
|
||||
|
||||
//- Liquid heat of formation [J/kg]
|
||||
scalar Hf_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -133,8 +136,14 @@ public:
|
||||
//- Liquid heat capacity [J/kg/K]
|
||||
inline scalar Cp(scalar p, scalar T) const;
|
||||
|
||||
//- Liquid enthalpy [J/kg]
|
||||
inline scalar h(scalar p, scalar T) const;
|
||||
//- Liquid sensible enthalpy [J/kg]
|
||||
inline scalar Hs(scalar p, scalar T) const;
|
||||
|
||||
//- Liquid heat of formation [J/kg]
|
||||
inline scalar Hf() const;
|
||||
|
||||
//- Liquid absolute enthalpy [J/kg]
|
||||
inline scalar Ha(scalar p, scalar T) const;
|
||||
|
||||
//- Ideal gas heat capacity [J/kg/K]
|
||||
inline scalar Cpg(scalar p, scalar T) const;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -47,7 +47,19 @@ inline Foam::scalar Foam::C3H8::Cp(scalar p, scalar T) const
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C3H8::h(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::C3H8::Hs(scalar p, scalar T) const
|
||||
{
|
||||
return Ha(p, T) - Hf();
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C3H8::Hf() const
|
||||
{
|
||||
return Hf_;
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C3H8::Ha(scalar p, scalar T) const
|
||||
{
|
||||
return h_.value(T);
|
||||
}
|
||||
|
||||
@ -26,6 +26,9 @@ License
|
||||
#include "C4H10O.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
#include "thermodynamicConstants.H"
|
||||
using namespace Foam::constant::thermodynamic;
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
@ -100,7 +103,8 @@ Foam::C4H10O::C4H10O()
|
||||
kappa_("kappa", 0.249, -0.0004005, 0.0, 0.0, 0.0, 0.0),
|
||||
kappag_("kappag", -0.0044894, 0.6155, -3266.3, 0.0),
|
||||
sigma_("sigma", 466.70, 0.057356, 1.288, 0.0, 0.0, 0.0),
|
||||
D_("D", 147.18, 20.1, 74.123, 28) // note: Same as nHeptane
|
||||
D_("D", 147.18, 20.1, 74.123, 28), // note: Same as nHeptane
|
||||
Hf_(h_.value(Tstd))
|
||||
{}
|
||||
|
||||
|
||||
@ -135,7 +139,8 @@ Foam::C4H10O::C4H10O
|
||||
kappa_(thermalConductivity),
|
||||
kappag_(vapourThermalConductivity),
|
||||
sigma_(surfaceTension),
|
||||
D_(vapourDiffusivity)
|
||||
D_(vapourDiffusivity),
|
||||
Hf_(h_.value(Tstd))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -76,6 +76,9 @@ class C4H10O
|
||||
Function1s::NSRDS6 sigma_;
|
||||
Function2s::APIdiffCoef D_;
|
||||
|
||||
//- Liquid heat of formation [J/kg]
|
||||
scalar Hf_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -133,8 +136,14 @@ public:
|
||||
//- Liquid heat capacity [J/kg/K]
|
||||
inline scalar Cp(scalar p, scalar T) const;
|
||||
|
||||
//- Liquid enthalpy [J/kg]
|
||||
inline scalar h(scalar p, scalar T) const;
|
||||
//- Liquid sensible enthalpy [J/kg]
|
||||
inline scalar Hs(scalar p, scalar T) const;
|
||||
|
||||
//- Liquid heat of formation [J/kg]
|
||||
inline scalar Hf() const;
|
||||
|
||||
//- Liquid absolute enthalpy [J/kg]
|
||||
inline scalar Ha(scalar p, scalar T) const;
|
||||
|
||||
//- Ideal gas heat capacity [J/kg/K]
|
||||
inline scalar Cpg(scalar p, scalar T) const;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -47,7 +47,19 @@ inline Foam::scalar Foam::C4H10O::Cp(scalar p, scalar T) const
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C4H10O::h(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::C4H10O::Hs(scalar p, scalar T) const
|
||||
{
|
||||
return Ha(p, T) - Hf();
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C4H10O::Hf() const
|
||||
{
|
||||
return Hf_;
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C4H10O::Ha(scalar p, scalar T) const
|
||||
{
|
||||
return h_.value(T);
|
||||
}
|
||||
|
||||
@ -26,6 +26,9 @@ License
|
||||
#include "C6H14.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
#include "thermodynamicConstants.H"
|
||||
using namespace Foam::constant::thermodynamic;
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
@ -100,7 +103,8 @@ Foam::C6H14::C6H14()
|
||||
kappa_("kappa", 0.22492, -0.0003533, 0.0, 0.0, 0.0, 0.0),
|
||||
kappag_("kappag", -650.5, 0.8053, -1412100000, 0.0),
|
||||
sigma_("sigma", 507.60, 0.055003, 1.2674, 0.0, 0.0, 0.0),
|
||||
D_("D", 147.18, 20.1, 86.177, 28) // note: Same as nHeptane
|
||||
D_("D", 147.18, 20.1, 86.177, 28), // note: Same as nHeptane
|
||||
Hf_(h_.value(Tstd))
|
||||
{}
|
||||
|
||||
|
||||
@ -135,7 +139,8 @@ Foam::C6H14::C6H14
|
||||
kappa_(thermalConductivity),
|
||||
kappag_(vapourThermalConductivity),
|
||||
sigma_(surfaceTension),
|
||||
D_(vapourDiffusivity)
|
||||
D_(vapourDiffusivity),
|
||||
Hf_(h_.value(Tstd))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -76,6 +76,9 @@ class C6H14
|
||||
Function1s::NSRDS6 sigma_;
|
||||
Function2s::APIdiffCoef D_;
|
||||
|
||||
//- Liquid heat of formation [J/kg]
|
||||
scalar Hf_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -133,8 +136,14 @@ public:
|
||||
//- Liquid heat capacity [J/kg/K]
|
||||
inline scalar Cp(scalar p, scalar T) const;
|
||||
|
||||
//- Liquid enthalpy [J/kg]
|
||||
inline scalar h(scalar p, scalar T) const;
|
||||
//- Liquid sensible enthalpy [J/kg]
|
||||
inline scalar Hs(scalar p, scalar T) const;
|
||||
|
||||
//- Liquid heat of formation [J/kg]
|
||||
inline scalar Hf() const;
|
||||
|
||||
//- Liquid absolute enthalpy [J/kg]
|
||||
inline scalar Ha(scalar p, scalar T) const;
|
||||
|
||||
//- Ideal gas heat capacity [J/kg/K]
|
||||
inline scalar Cpg(scalar p, scalar T) const;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -47,12 +47,23 @@ inline Foam::scalar Foam::C6H14::Cp(scalar p, scalar T) const
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C6H14::h(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::C6H14::Hs(scalar p, scalar T) const
|
||||
{
|
||||
return Ha(p, T) - Hf();
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C6H14::Hf() const
|
||||
{
|
||||
return Hf_;
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C6H14::Ha(scalar p, scalar T) const
|
||||
{
|
||||
return h_.value(T);
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C6H14::Cpg(scalar p, scalar T) const
|
||||
{
|
||||
return Cpg_.value(T);
|
||||
|
||||
@ -26,6 +26,9 @@ License
|
||||
#include "C6H6.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
#include "thermodynamicConstants.H"
|
||||
using namespace Foam::constant::thermodynamic;
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
@ -100,7 +103,8 @@ Foam::C6H6::C6H6()
|
||||
kappa_("kappa", 0.2407, -0.0003202, 0.0, 0.0, 0.0, 0.0),
|
||||
kappag_("kappag", 1.652e-05, 1.3117, 491, 0.0),
|
||||
sigma_("sigma", 562.16, 0.07195, 1.2389, 0.0, 0.0, 0.0),
|
||||
D_("D", 147.18, 20.1, 78.114, 28) // note: Same as nHeptane
|
||||
D_("D", 147.18, 20.1, 78.114, 28), // note: Same as nHeptane
|
||||
Hf_(h_.value(Tstd))
|
||||
{}
|
||||
|
||||
|
||||
@ -135,7 +139,8 @@ Foam::C6H6::C6H6
|
||||
kappa_(thermalConductivity),
|
||||
kappag_(vapourThermalConductivity),
|
||||
sigma_(surfaceTension),
|
||||
D_(vapourDiffusivity)
|
||||
D_(vapourDiffusivity),
|
||||
Hf_(h_.value(Tstd))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -76,6 +76,9 @@ class C6H6
|
||||
Function1s::NSRDS6 sigma_;
|
||||
Function2s::APIdiffCoef D_;
|
||||
|
||||
//- Liquid heat of formation [J/kg]
|
||||
scalar Hf_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -133,8 +136,14 @@ public:
|
||||
//- Liquid heat capacity [J/kg/K]
|
||||
inline scalar Cp(scalar p, scalar T) const;
|
||||
|
||||
//- Liquid enthalpy [J/kg]
|
||||
inline scalar h(scalar p, scalar T) const;
|
||||
//- Liquid sensible enthalpy [J/kg]
|
||||
inline scalar Hs(scalar p, scalar T) const;
|
||||
|
||||
//- Liquid heat of formation [J/kg]
|
||||
inline scalar Hf() const;
|
||||
|
||||
//- Liquid absolute enthalpy [J/kg]
|
||||
inline scalar Ha(scalar p, scalar T) const;
|
||||
|
||||
//- Ideal gas heat capacity [J/kg/K]
|
||||
inline scalar Cpg(scalar p, scalar T) const;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -47,7 +47,19 @@ inline Foam::scalar Foam::C6H6::Cp(scalar p, scalar T) const
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C6H6::h(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::C6H6::Hs(scalar p, scalar T) const
|
||||
{
|
||||
return Ha(p, T) - Hf();
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C6H6::Hf() const
|
||||
{
|
||||
return Hf_;
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C6H6::Ha(scalar p, scalar T) const
|
||||
{
|
||||
return h_.value(T);
|
||||
}
|
||||
|
||||
@ -26,6 +26,9 @@ License
|
||||
#include "C7H16.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
#include "thermodynamicConstants.H"
|
||||
using namespace Foam::constant::thermodynamic;
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
@ -99,7 +102,8 @@ Foam::C7H16::C7H16()
|
||||
kappa_("kappa", 0.215, -0.000303, 0.0, 0.0, 0.0, 0.0),
|
||||
kappag_("kappag", -0.070028, 0.38068, -7049.9, -2400500.0),
|
||||
sigma_("sigma", 540.20, 0.054143, 1.2512, 0.0, 0.0, 0.0),
|
||||
D_("D", 147.18, 20.1, 100.204, 28.0)
|
||||
D_("D", 147.18, 20.1, 100.204, 28.0),
|
||||
Hf_(h_.value(Tstd))
|
||||
{}
|
||||
|
||||
|
||||
@ -134,7 +138,8 @@ Foam::C7H16::C7H16
|
||||
kappa_(thermalConductivity),
|
||||
kappag_(vapourThermalConductivity),
|
||||
sigma_(surfaceTension),
|
||||
D_(vapourDiffusivity)
|
||||
D_(vapourDiffusivity),
|
||||
Hf_(h_.value(Tstd))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -76,6 +76,9 @@ class C7H16
|
||||
Function1s::NSRDS6 sigma_;
|
||||
Function2s::APIdiffCoef D_;
|
||||
|
||||
//- Liquid heat of formation [J/kg]
|
||||
scalar Hf_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -133,8 +136,14 @@ public:
|
||||
//- Liquid heat capacity [J/kg/K]
|
||||
inline scalar Cp(scalar p, scalar T) const;
|
||||
|
||||
//- Liquid enthalpy [J/kg]
|
||||
inline scalar h(scalar p, scalar T) const;
|
||||
//- Liquid sensible enthalpy [J/kg]
|
||||
inline scalar Hs(scalar p, scalar T) const;
|
||||
|
||||
//- Liquid heat of formation [J/kg]
|
||||
inline scalar Hf() const;
|
||||
|
||||
//- Liquid absolute enthalpy [J/kg]
|
||||
inline scalar Ha(scalar p, scalar T) const;
|
||||
|
||||
//- Ideal gas heat capacity [J/kg/K]
|
||||
inline scalar Cpg(scalar p, scalar T) const;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -47,7 +47,19 @@ inline Foam::scalar Foam::C7H16::Cp(scalar p, scalar T) const
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C7H16::h(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::C7H16::Hs(scalar p, scalar T) const
|
||||
{
|
||||
return Ha(p, T) - Hf();
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C7H16::Hf() const
|
||||
{
|
||||
return Hf_;
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C7H16::Ha(scalar p, scalar T) const
|
||||
{
|
||||
return h_.value(T);
|
||||
}
|
||||
|
||||
@ -26,6 +26,9 @@ License
|
||||
#include "C7H8.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
#include "thermodynamicConstants.H"
|
||||
using namespace Foam::constant::thermodynamic;
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
@ -100,7 +103,8 @@ Foam::C7H8::C7H8()
|
||||
kappa_("kappa", 0.2043, -0.000239, 0.0, 0.0, 0.0, 0.0),
|
||||
kappag_("kappag", 2.392e-05, 1.2694, 537, 0.0),
|
||||
sigma_("sigma", 591.79, 0.06685, 1.2456, 0.0, 0.0, 0.0),
|
||||
D_("D", 147.18, 20.1, 92.141, 28) // note: Same as nHeptane
|
||||
D_("D", 147.18, 20.1, 92.141, 28), // note: Same as nHeptane
|
||||
Hf_(h_.value(Tstd))
|
||||
{}
|
||||
|
||||
|
||||
@ -135,7 +139,8 @@ Foam::C7H8::C7H8
|
||||
kappa_(thermalConductivity),
|
||||
kappag_(vapourThermalConductivity),
|
||||
sigma_(surfaceTension),
|
||||
D_(vapourDiffusivity)
|
||||
D_(vapourDiffusivity),
|
||||
Hf_(h_.value(Tstd))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -76,6 +76,9 @@ class C7H8
|
||||
Function1s::NSRDS6 sigma_;
|
||||
Function2s::APIdiffCoef D_;
|
||||
|
||||
//- Liquid heat of formation [J/kg]
|
||||
scalar Hf_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -133,8 +136,14 @@ public:
|
||||
//- Liquid heat capacity [J/kg/K]
|
||||
inline scalar Cp(scalar p, scalar T) const;
|
||||
|
||||
//- Liquid enthalpy [J/kg]
|
||||
inline scalar h(scalar p, scalar T) const;
|
||||
//- Liquid sensible enthalpy [J/kg]
|
||||
inline scalar Hs(scalar p, scalar T) const;
|
||||
|
||||
//- Liquid heat of formation [J/kg]
|
||||
inline scalar Hf() const;
|
||||
|
||||
//- Liquid absolute enthalpy [J/kg]
|
||||
inline scalar Ha(scalar p, scalar T) const;
|
||||
|
||||
//- Ideal gas heat capacity [J/kg/K]
|
||||
inline scalar Cpg(scalar p, scalar T) const;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -47,7 +47,19 @@ inline Foam::scalar Foam::C7H8::Cp(scalar p, scalar T) const
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C7H8::h(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::C7H8::Hs(scalar p, scalar T) const
|
||||
{
|
||||
return Ha(p, T) - Hf();
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C7H8::Hf() const
|
||||
{
|
||||
return Hf_;
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::C7H8::Ha(scalar p, scalar T) const
|
||||
{
|
||||
return h_.value(T);
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user