2018-08-19 20:27 BST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0003025OpenFOAM[All Projects] Bugpublic2018-08-05 12:31
Reporterschuylerhinman 
Assigned Tohenry 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformLinuxOSUbuntuOS Version16.04
Product Version6 
Target VersionFixed in Version6 
Summary0003025: wallHeatFlux Utility - Error in new versions - internalEnergy/Enthalpy mismatch for sonicFoam and rhoCentralFoam
DescriptionOur lab uses rhoCentralFoam and sonicFoam extensively along with the wallHeatFlux utility. We recently upgraded from 2.3 to the newest version. We have stuck with 2.3 this long as we had tested it extensively and made a few small local modifications. In doing some of our routine benchmarking, we have found that the new wallHeatFlux utility gives the wrong answer as it calls whatever form of energy is used in the solver - and perhaps the incorrect formulation of alpha. If we change the dictionary to sensibleEnthalpy, the wallHeatFlux calculation is corrected back to the answer provided by OF2.3 - which is the correct answer.

We benchmark rhoCentralFoam against our own in-house boundary layer solver. OF 2.3 post-processing matches closely to our in-house solver prediction which is an exact numerical solution of the compressible boundary layer equations.

The difference is substantial ~30% for this test case between OF 2.3 and 5/6 postprocessing. This error is nearly constant (corresponding to roughly the % difference between Cv and Cp). Most likely, the utility should be modified to always use alpha_h and wall-normal gradient in enthalpy, or simply Fourier's law.

We have tested this rigorously, including with:
-OF2.3,
-OF5,
-OF6,
-constant Cp,
-Constant viscosity,
-Sutherland's law,
-JANAF implementations.

The error occurs in both 5 and 6 in any of these thermophysical configurations. Please advise if we have overlooked something simple.

Regards,

Dr. W. Schuyler Hinman and Henry Stoldt (MSc. Research Student)
Steps To ReproduceRun post-processing in the older version (2.3) on final time step. Run post-processing again in 5 or 6. The results do not match. If you change to sensibleEnthalpy in the thermophysical properties dictionary and post-process again in 6, you recover the original (correct) answer.

Here is a link to a google drive containing the test case:

https://drive.google.com/open?id=1YSyrF9y2GIGmdfycc0V93rBG24a2tj_X
Additional InformationWe have also found a discrepancy in the solution itself between 2.3 and 6, likely a result of a similar mismatch between alpha and gradient in energy/enthalpy. A separate bug report is to follow.
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0009895

henry (manager)

Are your tests laminar or turbulent? If turbulent with which model?

~0009896

schuylerhinman (reporter)

These are all laminar. This is to ensure the most basic benchmarking. We use a different case for testing turbulent BL.

~0009897

henry (manager)

I see the problem and there are a couple of ways to fix it, will work on it over the weekend.

~0009898

schuylerhinman (reporter)

Thank you very much Henry. We are heavy users of OpenFOAM and greatly appreciate all your hard work. This was our first chance to try to contribute to the project.

Keep up the great work!

Please see the next bug I am about to file. It may or may not be related.

~0009902

henry (manager)

Resolved in OpenFOAM-6 by commit 1a0c91b3baa88265a11ad9dbf76c15375daf8087
Resolved in OpenFOAM-dev by commit f7100178e4c2d916da550071aa96447eefaff45c
+Notes

-Issue History
Date Modified Username Field Change
2018-08-03 19:24 schuylerhinman New Issue
2018-08-03 19:24 schuylerhinman File Added: wallHeatFluxBug_rhoCentralFOam.ods
2018-08-03 20:07 henry Note Added: 0009895
2018-08-03 20:18 schuylerhinman Note Added: 0009896
2018-08-03 20:32 henry Note Added: 0009897
2018-08-03 20:36 schuylerhinman Note Added: 0009898
2018-08-05 12:31 henry Assigned To => henry
2018-08-05 12:31 henry Status new => resolved
2018-08-05 12:31 henry Resolution open => fixed
2018-08-05 12:31 henry Fixed in Version => 6
2018-08-05 12:31 henry Note Added: 0009902
+Issue History