From 0de24cd7109dd4c9fb2a0d3547a05207cfeca428 Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 7 Sep 2010 16:10:16 +0100 Subject: [PATCH] ENH: Using specie::Tstd instead of explicitly declaring (potentially different) Tstd --- .../thermoSingleLayer/thermoSingleLayer.C | 9 +++++---- .../thermoSingleLayer/thermoSingleLayerI.H | 9 +++++++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/surfaceFilmModels/surfaceFilmModel/thermoSingleLayer/thermoSingleLayer.C b/src/surfaceFilmModels/surfaceFilmModel/thermoSingleLayer/thermoSingleLayer.C index ac251146e8..2d0b4a2fff 100644 --- a/src/surfaceFilmModels/surfaceFilmModel/thermoSingleLayer/thermoSingleLayer.C +++ b/src/surfaceFilmModels/surfaceFilmModel/thermoSingleLayer/thermoSingleLayer.C @@ -30,6 +30,7 @@ License #include "addToRunTimeSelectionTable.H" #include "zeroGradientFvPatchFields.H" #include "directMappedWallPolyPatch.H" +#include "specie.H" // Sub-models #include "heatTransferModel.H" @@ -195,12 +196,12 @@ Foam::tmp Foam::surfaceFilmModels::thermoSingleLayer::q volScalarField& hs ) const { + const dimensionedScalar Tstd("Tstd", dimTemperature, specie::Tstd); + return ( - - fvm::Sp(htcs_->h()/cp_, hs) - - htcs_->h()*(dimensionedScalar("Tstd", dimTemperature, 298.15) - Ts_) - - fvm::Sp(htcw_->h()/cp_, hs) - - htcw_->h()*(dimensionedScalar("Tstd", dimTemperature, 298.15) - Tw_) + - fvm::Sp(htcs_->h()/cp_, hs) - htcs_->h()*(Tstd - Ts_) + - fvm::Sp(htcw_->h()/cp_, hs) - htcw_->h()*(Tstd - Tw_) ); } diff --git a/src/surfaceFilmModels/surfaceFilmModel/thermoSingleLayer/thermoSingleLayerI.H b/src/surfaceFilmModels/surfaceFilmModel/thermoSingleLayer/thermoSingleLayerI.H index a6c979eca8..f98802a51a 100644 --- a/src/surfaceFilmModels/surfaceFilmModel/thermoSingleLayer/thermoSingleLayerI.H +++ b/src/surfaceFilmModels/surfaceFilmModel/thermoSingleLayer/thermoSingleLayerI.H @@ -24,6 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "thermoSingleLayer.H" +#include "specie.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -46,6 +47,8 @@ Foam::surfaceFilmModels::thermoSingleLayer::hs const volScalarField& T ) const { + const dimensionedScalar Tstd("Tstd", dimTemperature, specie::Tstd); + return tmp ( new volScalarField @@ -58,7 +61,7 @@ Foam::surfaceFilmModels::thermoSingleLayer::hs IOobject::NO_READ, IOobject::NO_WRITE ), - cp_*(T - (dimensionedScalar("Tstd", dimTemperature, 298.15))), + cp_*(T - Tstd), zeroGradientFvPatchScalarField::typeName ) ); @@ -71,6 +74,8 @@ Foam::surfaceFilmModels::thermoSingleLayer::T const volScalarField& hs ) const { + const dimensionedScalar Tstd("Tstd", dimTemperature, specie::Tstd); + return tmp ( new volScalarField @@ -83,7 +88,7 @@ Foam::surfaceFilmModels::thermoSingleLayer::T IOobject::NO_READ, IOobject::NO_WRITE ), - hs/cp_ + dimensionedScalar("Tstd", dimTemperature, 298.15), + hs/cp_ + Tstd, zeroGradientFvPatchScalarField::typeName ) );