ENH: Stability updates to thermo surface film models

This commit is contained in:
andy
2010-11-08 15:47:10 +00:00
parent 9c350ab501
commit e15b50bc7a
3 changed files with 13 additions and 4 deletions

View File

@ -77,6 +77,7 @@ Foam::surfaceFilmModels::standardPhaseChange::standardPhaseChange
Tb_(readScalar(coeffs_.lookup("Tb"))),
deltaMin_(readScalar(coeffs_.lookup("deltaMin"))),
L_(readScalar(coeffs_.lookup("L"))),
TbFactor_(coeffs_.lookupOrDefault<scalar>("TbFactor", 1.1)),
totalMass_(0.0),
vapourRate_(0.0)
{}
@ -133,7 +134,7 @@ void Foam::surfaceFilmModels::standardPhaseChange::correct
const scalar pc = pInf[cellI];
// local temperature - impose lower limit of 200 K for stability
const scalar Tloc = min(liq.Tc(), max(200.0, T[cellI]));
const scalar Tloc = min(TbFactor_*Tb_, max(200.0, T[cellI]));
// saturation pressure [Pa]
const scalar pSat = liq.pv(pc, Tloc);
@ -149,7 +150,9 @@ void Foam::surfaceFilmModels::standardPhaseChange::correct
const scalar qDotFilm = hFilm[cellI]*(T[cellI] - Tw[cellI]);
const scalar Cp = liq.Cp(pc, Tloc);
const scalar qCorr = availableMass[cellI]*Cp*(T[cellI] - Tb_);
const scalar Tcorr = max(0.0, T[cellI] - Tb_);
const scalar qCorr = availableMass[cellI]*Cp*(Tcorr);
dMass[cellI] =
dt*magSf[cellI]/hVap*(qDotInf + qDotFilm)
+ qCorr/hVap;
@ -185,7 +188,7 @@ void Foam::surfaceFilmModels::standardPhaseChange::correct
const scalar Sh = this->Sh(Re, Sc);
// mass transfer coefficient [m/s]
const scalar hm = Sh*Dab/L_;
const scalar hm = Sh*Dab/(L_ + ROOTVSMALL);
// add mass contribution to source
dMass[cellI] =

View File

@ -76,6 +76,10 @@ protected:
//- Length scale / [m]
const scalar L_;
//- Boiling temperature factor / []
// Used to set max limit on temperature to Tb*TbFactor
const scalar TbFactor_;
//- Total mass evolved / [kg]
scalar totalMass_;

View File

@ -209,12 +209,14 @@ void Foam::surfaceFilmModels::thermoSingleLayer::solveEnergy()
massForPrimary_/magSf_/time_.deltaT()
);
// dimensionedScalar hs0("SMALL", hs_.dimensions(), SMALL);
solve
(
fvm::ddt(deltaRho_, hs_)
+ fvm::div(phi_, hs_)
==
// fvm::Sp(hsSp_/hs_, hs_)
// fvm::Sp(hsSp_/(hs_ + hs0), hs_)
hsSp_
+ q(hs_)
- fvm::Sp(mLossCoeff, hs_)