From e8e95a38cb985dec3527157f9739cf2de9f1bbf5 Mon Sep 17 00:00:00 2001 From: andy Date: Mon, 12 Nov 2012 11:24:06 +0000 Subject: [PATCH] ENH: Added on-the-fly heat flux calculations to thermoFilm --- .../thermoSingleLayer/thermoSingleLayer.H | 9 ++++++++ .../thermoSingleLayer/thermoSingleLayerI.H | 21 +++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.H b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.H index c67a6ef6b5..ae0dc780c9 100644 --- a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.H +++ b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.H @@ -370,6 +370,15 @@ public: inline const filmRadiationModel& radiation() const; + // Derived fields (calculated on-the-fly) + + //- Return the convective heat energy from film to wall + inline tmp Qconvw(const label patchI) const; + + //- Return the convective heat energy from primary region to film + inline tmp Qconvp(const label patchI) const; + + // Evolution //- Pre-evolve film hook diff --git a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayerI.H b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayerI.H index c8ba48f984..659a315f49 100644 --- a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayerI.H +++ b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayerI.H @@ -24,6 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "thermoSingleLayer.H" +#include "heatTransferModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -160,6 +161,26 @@ inline const filmRadiationModel& thermoSingleLayer::radiation() const } +inline tmp thermoSingleLayer::Qconvw(const label patchI) const +{ + const scalarField htc(htcw_->h()().boundaryField()[patchI]); + const scalarField& Tp = T_.boundaryField()[patchI]; + const scalarField& Twp = Tw_.boundaryField()[patchI]; + + return htc*(Tp - Twp); +} + + +inline tmp thermoSingleLayer::Qconvp(const label patchI) const +{ + const scalarField htc(htcs_->h()().boundaryField()[patchI]); + const scalarField& Tp = T_.boundaryField()[patchI]; + const scalarField& Tpp = TPrimary_.boundaryField()[patchI]; + + return htc*(Tp - Tpp); +} + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace surfaceFilmModels