From f06f20662e1962668fa160b408650dd371238d87 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Tue, 4 Oct 2016 16:37:32 +0100 Subject: [PATCH] alphatWallBoilingWallFunctionFvPatchScalarField: Evaluate alphatConv_ outside loop to improve speed Patch contributed by Juho Peltola --- .../alphatWallBoilingWallFunctionFvPatchScalarField.C | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C index 6f850cdc1..e13e850b2 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C @@ -411,6 +411,9 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs() const scalarField fLiquid(partitioningModel_->fLiquid(liquidw)); + // Convective thermal diffusivity + alphatConv_ = calcAlphat(alphatConv_); + for (label i=0; i<10; i++) { // Liquid temperature at y+=250 is estimated from logarithmic @@ -494,9 +497,6 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs() // Quenching heat flux const scalarField Qq(A2*hQ*max(Tw - Tl, scalar(0))); - // Convective heat flux - alphatConv_ = calcAlphat(alphatConv_); - // Effective thermal diffusivity that corresponds to the // calculated convective, quenching and evaporative heat fluxes