View Issue Details

IDProjectCategoryView StatusLast Update
0003101OpenFOAMPatchpublic2018-11-07 12:13
ReporterJuho Assigned Tohenry  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformUnixOSOtherOS Version(please specify)
Product Versiondev 
Fixed in Versiondev 
Summary0003101: externalWallHeatFluxTemperature: Possibilty of a FPE
DescriptionWhen externalWallHeatFluxTemperature is used in fixed power or heat flux mode the refValue() = 0 is set for temperature.

Lines 360-372: https://github.com/OpenFOAM/OpenFOAM-dev/blob/8ca408bf6c83999c71db180f5b2f306472f20b5c/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C

In mixedEnergyFvPatchScalarField.C this value is used to set the he refValue() which means that he value at T = 0 is requested from thermo.
Line 117: refValue() = thermo.he(pw, Tw.refValue(), patchi)

https://github.com/OpenFOAM/OpenFOAM-dev/blob/8ca408bf6c83999c71db180f5b2f306472f20b5c/src/thermophysicalModels/basic/derivedFvPatchFields/mixedEnergy/mixedEnergyFvPatchScalarField.C

This leads to a FPE when thermo combinations that use the functions defined in HtoEthermo.H and EtoHthermo.H. For example with perfectGas equationOfState.

A simple fix is to set the temperature refValue() in externalWallHeatFluxTemperature to non-zero value, for example the patch temperature (diff attached). This doesn't affect the results because the valueFraction() is simultaneously set to 0.
TagsNo tags attached.

Activities

Juho

2018-11-07 08:54

reporter  

externalWallHeatFluxTemperature.diff (1,336 bytes)   
diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C
index 62e4b33..3e7368c 100644
--- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C
+++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C
@@ -360,7 +360,7 @@ void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs()
         case fixedPower:
         {
             refGrad() = (Q_/gSum(patch().magSf()) + qr)/kappa(Tp);
-            refValue() = 0;
+            refValue() = Tp;
             valueFraction() = 0;
 
             break;
@@ -368,7 +368,7 @@ void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs()
         case fixedHeatFlux:
         {
             refGrad() = (q_ + qr)/kappa(Tp);
-            refValue() = 0;
+            refValue() = Tp;
             valueFraction() = 0;
 
             break;

henry

2018-11-07 12:13

manager   ~0010152

Thanks Juho
Resolved by commit 8ee41932d68a505c9bed2c7b29285983096751e7

Issue History

Date Modified Username Field Change
2018-11-07 08:54 Juho New Issue
2018-11-07 08:54 Juho File Added: externalWallHeatFluxTemperature.diff
2018-11-07 12:13 henry Assigned To => henry
2018-11-07 12:13 henry Status new => resolved
2018-11-07 12:13 henry Resolution open => fixed
2018-11-07 12:13 henry Fixed in Version => dev
2018-11-07 12:13 henry Note Added: 0010152