LiquidEvaporation: Added condensation switch

This switch controls whether or not the model clips a droplet's outlet
mass flow rate to zero or permits it to become negative and thereby
represent condensation. By default condensation is not permitted.
This commit is contained in:
Will Bainbridge
2021-12-16 15:58:54 +00:00
parent 145eb5392a
commit cc3b257ce3
2 changed files with 19 additions and 2 deletions

View File

@ -72,6 +72,14 @@ Foam::LiquidEvaporation<CloudType>::LiquidEvaporation
:
PhaseChangeModel<CloudType>(dict, owner, typeName),
liquids_(owner.thermo().liquids()),
condensation_
(
this->coeffDict().template lookupOrDefault<Switch>
(
"condensation",
false
)
),
activeLiquids_(this->coeffDict().lookup("activeLiquids")),
liqToCarrierMap_(activeLiquids_.size(), -1),
liqToLiqMap_(activeLiquids_.size(), -1)
@ -200,7 +208,13 @@ void Foam::LiquidEvaporation<CloudType>::calculate
const scalar Cinf = Xc[gid]*pc/(RR*Ts);
// molar flux of vapour [kmol/m2/s]
const scalar Ni = max(kc*(Cs - Cinf), 0.0);
scalar Ni = kc*(Cs - Cinf);
// limit if not permitting condensation
if (!condensation_)
{
Ni = max(Ni, 0);
}
// mass transfer [kg]
dMassPC[lid] += Ni*pi*sqr(d)*liquids_.properties()[lid].W()*dt;

View File

@ -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
@ -56,6 +56,9 @@ protected:
//- Global liquid properties data
const liquidMixtureProperties& liquids_;
//- Whether or not to permit condensation (default false)
Switch condensation_;
//- List of active liquid names
List<word> activeLiquids_;