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:
@ -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;
|
||||
|
||||
@ -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_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user