View Issue Details

IDProjectCategoryView StatusLast Update
0003175OpenFOAMBugpublic2019-02-22 16:48
Reportermichael.mueller-wrd Assigned Tohenry  
PrioritynormalSeverityfeatureReproducibilityalways
Status resolvedResolutionfixed 
PlatformUnixOSOtherOS Version(please specify)
Fixed in Versiondev 
Summary0003175: externalWallHeatFluxTemperature (mode: coefficient) causes wrong results if relaxation != 1
DescriptionI am using chtMultiRegionFoam to analyze thermal conduction within solids (quite simple blockMesh case, OpenFOAM 6). At some boundaries I use externalWallHeatFluxTemperature in coefficient mode with given Ta and h (see attached sample case).

Issue:
If relaxation in externalWallHeatFluxTemperature is set to anything less than unity, strange results with regard to material temperatures occur.
Actually, I came across this issue because my original case (using relaxation 0.99) was extremely sensitive towards grid refinement in the solids. There happened to be some kind of linear dependency of material temperatures and cell sizes (at specific case most notably for y-direction).

Patch?
Looking at the sources, I would presume that in line 446 of...
OpenFOAM-6.0/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C
... there is sth missing when updating variable valueFraction().
Steps To ReproduceThe case attached includes relaxation 0.99 => run case as prepared, then remove relaxation line OR set relaxation to 1.00 OR use any 0<relaxation<1, re-run... (Note: I checked both serial and parallel run)
Additional Information> cat /proc/version
Linux version 3.0.101-0.47.71-default (geeko@buildhost) (gcc version 4.3.4 [gcc-4_3-branch revision 152973] (SUSE Linux) ) #1 SMP Thu Nov 12 12:22:22 UTC 2015 (b5b212e)
> lsb_release -a
LSB Version: core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64:desktop-4.0-amd64:desktop-4.0-noarch:graphics-2.0-amd64:graphics-2.0-noarch:graphics-3.2-amd64:graphics-3.2-noarch:graphics-4.0-amd64:graphics-4.0-noarch
Distributor ID: SUSE LINUX
Description: SUSE Linux Enterprise Server 11 (x86_64)
TagsNo tags attached.

Activities

henry

2019-02-21 17:10

manager   ~0010316

> ... there is sth missing when updating variable valueFraction().
What is "sth"?

Could you provide the case for testing?

michael.mueller-wrd

2019-02-22 07:33

reporter   ~0010318

Sorry, I had prepared the test but obviously uploading didn't work... hopefully it works now.

Regarding relaxation, in my understanding, you always want to update your variable with a blend of new value (times relFactor) and previous value (times 1-relFactor). Please correct me if I'm wrong...
    valueFraction() = relaxation_*valueFraction() + (1 - relaxation_);
    refValue() = relaxation_*refValue() + (1 - relaxation_)*Tp;
Given the above lines, it seems that for the upper line (valueFraction) the previous value is missing so that you 'artificially' increase the update by (1-relFactor) for every time step!?

henry

2019-02-22 08:19

manager   ~0010319

The valueFraction is between 0 and 1, and the valueFraction corresponding to (1 - relaxation_)*Tp is (1 - relaxation_)*1 which is (1 - relaxation_) and this "relaxes" towards the previous Tp value.

michael.mueller-wrd

2019-02-22 08:33

reporter  

OFcase.tgz (757,132 bytes)

michael.mueller-wrd

2019-02-22 08:34

reporter   ~0010320

Thank you for your explanation!
You may use the uploaded case to check the issue...

henry

2019-02-22 12:37

manager   ~0010321

This should now be resolved in OpenFOAM-dev by commit 190dd33576f30ed9df4956961d62d55e310c44b1
Could you please test and report back?

michael.mueller-wrd

2019-02-22 16:13

reporter   ~0010324

I can confirm your patch works for my test case. Results are fine for any given relaxation.
Appreciate your quick response, thanks...

henry

2019-02-22 16:48

manager   ~0010325

Thanks for testing the fix.

Issue History

Date Modified Username Field Change
2019-02-21 16:53 michael.mueller-wrd New Issue
2019-02-21 17:10 henry Note Added: 0010316
2019-02-22 07:33 michael.mueller-wrd Note Added: 0010318
2019-02-22 08:19 henry Note Added: 0010319
2019-02-22 08:33 michael.mueller-wrd File Added: OFcase.tgz
2019-02-22 08:34 michael.mueller-wrd Note Added: 0010320
2019-02-22 12:37 henry Note Added: 0010321
2019-02-22 16:13 michael.mueller-wrd Note Added: 0010324
2019-02-22 16:48 henry Assigned To => henry
2019-02-22 16:48 henry Status new => resolved
2019-02-22 16:48 henry Resolution open => fixed
2019-02-22 16:48 henry Fixed in Version => dev
2019-02-22 16:48 henry Note Added: 0010325