diff --git a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C index 1cb392eb6aae39549fc56095e0c6908e382cf919..758abe807b4c53a109d08c708fb49a9b14341a50 100644 --- a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C +++ b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C @@ -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_ diff --git a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.H b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.H index 6814e25a3e4c0e934378bd72b0e77d2a55110358..bce30b44837c663b6bfc202408cdbae576d6fcde 100644 --- a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.H +++ b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.H @@ -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();