From 25ace9a507161325025d80a4532c2ef3487e7ae2 Mon Sep 17 00:00:00 2001 From: Sergio Ferraris <sergio@alex.opencfd.co.uk> Date: Fri, 7 Jun 2013 12:44:05 +0100 Subject: [PATCH] ENH: Clipping htcs and htcw of the film to near zero where there is not film. This avoid heat transfer in regions where the surface is dry --- .../thermoSingleLayer/thermoSingleLayer.C | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C index 42d459ce012..03d1654fda5 100644 --- a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C +++ b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C @@ -294,10 +294,20 @@ tmp<fvScalarMatrix> thermoSingleLayer::q(volScalarField& hs) const { dimensionedScalar Tstd("Tstd", dimTemperature, 298.15); + volScalarField htcst = htcs_->h()(); + volScalarField htcwt = htcw_->h()(); + forAll(alpha_, i) + { + htcst[i] *= max(alpha_[i], ROOTVSMALL); + htcwt[i] *= max(alpha_[i], ROOTVSMALL); + } + htcst.correctBoundaryConditions(); + htcwt.correctBoundaryConditions(); + return ( - - fvm::Sp(htcs_->h()/Cp_, hs) - htcs_->h()*(Tstd - TPrimary_) - - fvm::Sp(htcw_->h()/Cp_, hs) - htcw_->h()*(Tstd - Tw_) + - fvm::Sp(htcst/Cp_, hs) - htcst*(Tstd - TPrimary_) + - fvm::Sp(htcwt/Cp_, hs) -htcwt*(Tstd - Tw_) ); } -- GitLab