From ee36fe8c0f8a4065b4cfd80230cf1372d2cac9a1 Mon Sep 17 00:00:00 2001 From: sergio Date: Tue, 14 Dec 2021 10:31:25 -0800 Subject: [PATCH] ENH: Adding optional output fields for Tdew and HR --- ...emperatureCoupledMixedFvPatchScalarField.C | 29 +++++++++++++------ 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/src/thermophysicalModels/thermophysicalPropertiesFvPatchFields/liquidProperties/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.C b/src/thermophysicalModels/thermophysicalPropertiesFvPatchFields/liquidProperties/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.C index 8f6719195a..d64f100256 100644 --- a/src/thermophysicalModels/thermophysicalPropertiesFvPatchFields/liquidProperties/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.C +++ b/src/thermophysicalModels/thermophysicalPropertiesFvPatchFields/liquidProperties/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.C @@ -110,7 +110,7 @@ Foam::humidityTemperatureCoupledMixedFvPatchScalarField::thicknessField IOobject::AUTO_WRITE ), mesh, - dimensionedScalar(dimLength, Zero) + dimensionedScalar(dimless, Zero) ); ptr->store(); @@ -568,7 +568,7 @@ void Foam::humidityTemperatureCoupledMixedFvPatchScalarField::updateCoeffs() RH[faceI] = min(Xv*pf/pSat, 1.0); scalar RHmin = 0.01; - Tdew[faceI] = -GREAT; + Tdew[faceI] = 0.0; if (RH[faceI] > RHmin) { @@ -679,14 +679,25 @@ void Foam::humidityTemperatureCoupledMixedFvPatchScalarField::updateCoeffs() // Heat flux due to change of phase [W/m2] dmHfg_ = dm*hfg; - // Output RH and Tdew - scalarField& bRH = - thicknessField("RH", refCast(mesh)); - bRH = RH; + if (debug) + { + // Output RH and Tdew + scalarField& bRH = + thicknessField + ( + "RH", + refCast(mesh) + ).boundaryFieldRef()[patch().index()]; + bRH = RH; - scalarField& bTdew = - thicknessField("Tdew", refCast(mesh)); - bTdew = Tdew; + scalarField& bTdew = + thicknessField + ( + "Tdew", + refCast(mesh) + ).boundaryFieldRef()[patch().index()]; + bTdew = Tdew; + } } else {