ENH: Added film coverage calculation to thermoSingleLayer film model

This commit is contained in:
andy
2012-11-12 10:45:11 +00:00
parent 711a0e99cf
commit f75d998b10
2 changed files with 60 additions and 1 deletions

View File

@ -227,6 +227,33 @@ void thermoSingleLayer::transferPrimaryRegionSourceFields()
}
void thermoSingleLayer::correctAlpha()
{
if (hydrophilic_)
{
const scalar hydrophilicDry = hydrophilicDryScale_*deltaWet_;
const scalar hydrophilicWet = hydrophilicWetScale_*deltaWet_;
forAll(alpha_, i)
{
if ((alpha_[i] < 0.5) && (delta_[i] > hydrophilicDry))
{
alpha_[i] = 1.0;
}
else if ((alpha_[i] > 0.5) && (delta_[i] < hydrophilicWet))
{
alpha_[i] = 0.0;
}
}
}
else
{
alpha_ ==
pos(delta_ - dimensionedScalar("deltaWet", dimLength, deltaWet_));
}
}
void thermoSingleLayer::updateSubmodels()
{
if (debug)
@ -426,6 +453,11 @@ thermoSingleLayer::thermoSingleLayer
zeroGradientFvPatchScalarField::typeName
),
deltaWet_(readScalar(coeffs_.lookup("deltaWet"))),
hydrophilic_(readBool(coeffs_.lookup("hydrophilic"))),
hydrophilicDryScale_(0.0),
hydrophilicWetScale_(0.0),
hsSp_
(
IOobject
@ -510,6 +542,12 @@ thermoSingleLayer::thermoSingleLayer
}
}
if (hydrophilic_)
{
coeffs_.lookup("hydrophilicDryScale") >> hydrophilicDryScale_;
coeffs_.lookup("hydrophilicWetScale") >> hydrophilicWetScale_;
}
if (readFields)
{
transferPrimaryRegionThermoFields();
@ -584,6 +622,8 @@ void thermoSingleLayer::evolveRegion()
Info<< "thermoSingleLayer::evolveRegion()" << endl;
}
correctAlpha();
updateSubmodels();
// Solve continuity for deltaRho_

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -123,6 +123,22 @@ protected:
volScalarField primaryEnergyPCTrans_;
//- Threshold film thickness beyond which the film is considered 'wet'
scalar deltaWet_;
// Hyprophilic/phobic properties
//- Activation flag
bool hydrophilic_;
//- Length scale applied to deltaWet_ for dry faces, typically 0.5
scalar hydrophilicDryScale_;
//- Length scale applied to deltaWet_ for wet faces, typically 0.001
scalar hydrophilicWetScale_;
// Source term fields
// Film region - registered to the film region mesh
@ -190,6 +206,9 @@ protected:
//- Transfer source fields from the primary region to the film region
virtual void transferPrimaryRegionSourceFields();
//- Correct film coverage field
virtual void correctAlpha();
//- Update the film sub-models
virtual void updateSubmodels();