View Issue Details

IDProjectCategoryView StatusLast Update
0003026OpenFOAMBugpublic2018-08-08 22:54
Reporterschuylerhinman Assigned Tohenry  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformLinuxOSUbuntuOS Version16.04
Summary0003026: rhoCentralFoam, sonicFoam results in version 5 and 6 don't match previous version results which have been validated
DescriptionThis is a continuation of our previous bug report. The previous was on the wallHeatFlux utility. This bug is specifically about the answer obtained for rhoCentralFoam and sonicFoam for our oblique shock test case.

We have attached a .ods of the results. Note that we have included the results from our own local solver that we use to compare with the benchmark. To summarize:

W/ Sutherland's Law and JANAF
1) rhoCentralFoam 2.3 to rhoCentralFoam 5 or 6 - 21% average Error in wallHeatFlux
2) sonicFoam 2.3 to sonicFoam 5 or 6 - 15% average Error in wallHeatFlux

W/ Constant Properties
3) rhoCentralFoam 2.3 to rhoCentralFoam 5 or 6 - 0.93% error in wallHeatFlux
4) sonicFoam 2.3 to sonicFoam 5 or 6 0.23% error in wallHeatFlux

W/ Constant Cp, and Sutherland's Law
5) sonicFoam 2.3 to sonicFoam 5 or 6 15% error in wallHeatFlux

From our testing, we conclude that the error between versions stems from the implementation of Sutherland's law. Although we were not able to track down the specific error ourselves, we were able to track down the likely contributor to the problem as Sutherland's through the following testing:

Reasoning Results:
-The error is relatively the same between sonic 2.3 and sonic 5 as between rhoCentral 2.3 and rhoCentral 5 indicating it is the same problem.
-When constant Cp and constant viscosity and Pr are used the results match very closely between versions (<1%). This error is not concerning.
-When we do constant Cp but use Sutherland's law, the % error is almost the exact same as when both Janaf and Sutherland are implemented.


We have noticed the source code for the Sutherland implementation has changed significantly. Hopefully, this can be resolved.

Regards,

Dr. W. Schuyler Hinman and Henry Stoldt (MSc Research Student)
Steps To Reproduce Run this test case in older versions (OF 2.3) and then run again in either OF5 or OF6. The error is there in both.

I have attached the test case on this google drive (it is the same link as the previous bug report):

https://drive.google.com/open?id=1YSyrF9y2GIGmdfycc0V93rBG24a2tj_X

We have included the results so you may not have to re-run everything yourself.
TagsNo tags attached.

Activities

schuylerhinman

2018-08-03 20:45

reporter  

henry

2018-08-05 12:37

manager   ~0009903

Could you clarify why you believe the error to be in the recent OpenFOAM releases rather than in 2.3? Do you have independent data against which you can confirm this?

henry

2018-08-05 12:42

manager   ~0009904

I see in the OpenFOAM-5.0 tests your are running with

energy sensibleInternalEnergy

what do you get when running with sensibleEnthalpy?

Could you re-run these tests with the fix to the handling of sensibleInternalEnergy in the laminar case I have just pushed into OpenFOAM-6 or OpenFOAM-dev?

schuylerhinman

2018-08-07 18:30

reporter   ~0009914

Hi Henry,

We will run again with the new fixes you made and see if the issue is resolved. We didn't run with sensibleEnthalpy because the energy transport equations in these solvers are written for internal energy. Do you want us to see if there is a difference anyway?

If the problem persists we will do some more tests to further test if the problem is in the older version or the newer versions. Our faith in the older version comes from extensive testing and comparison of simple bench mark cases to some of our own in house solvers and also experiments. Also, the old and new versions matched very closely for constant properties, and also janaf. We didn't have any indication there was a problem with sutherland in the old version - and the code in the older version is somewhat easier to follow. So we made the assumption that the error is in the new version. However, we could definitely be wrong.

Will run more tests and get back.

schuylerhinman

2018-08-08 17:57

reporter   ~0009927

Henry,

Great news! Your changes from the last bug fixed this issue. The error is now 0.1% between OF 2.3 and 6 and both match our local solver closely.

However, the previous bug report still has the same problem. The wallHeatFlux utility requires sensible enthalpy to be selected to give the right answer.

henry

2018-08-08 18:18

manager   ~0009928

I tested the wallHeatFlux functionObject on your case and it now gives more or less the same results with sensible enthalpy and internal energy.

Are you sure you have recompiled everything?

schuylerhinman

2018-08-08 18:35

reporter   ~0009929

I will double check and get back to you shortly.

Schuyler

henry

2018-08-08 18:41

manager   ~0009930

This is what I get with sensibleInternalEnergy
    min/max/integ(bottom) = -55438.282, -1693.9086, -1.7188468

This with sensibleEnthalpy
    min/max/integ(bottom) = -55374.774, -1693.8674, -1.7185747

schuylerhinman

2018-08-08 18:49

reporter   ~0009931

I have pointed your response to the MSc student I am helping. He advised me that the problem between 2.3 and 6 was fixed but the heat flux problem remained.

I will let you know when he responds. I am sure that you are right and it is fixed.

schuylerhinman

2018-08-08 20:38

reporter   ~0009932

Henry,

Thank you very much. Your changes fixed both bugs.

Regards

Dr. W. Schuyler Hinman

henry

2018-08-08 22:54

manager   ~0009935

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

Issue History

Date Modified Username Field Change
2018-08-03 20:45 schuylerhinman New Issue
2018-08-03 20:45 schuylerhinman File Added: BugrhoCentralandSonicFoamResults.ods
2018-08-05 12:37 henry Note Added: 0009903
2018-08-05 12:42 henry Note Added: 0009904
2018-08-07 18:30 schuylerhinman Note Added: 0009914
2018-08-08 17:57 schuylerhinman Note Added: 0009927
2018-08-08 18:18 henry Note Added: 0009928
2018-08-08 18:35 schuylerhinman Note Added: 0009929
2018-08-08 18:41 henry Note Added: 0009930
2018-08-08 18:49 schuylerhinman Note Added: 0009931
2018-08-08 20:38 schuylerhinman Note Added: 0009932
2018-08-08 22:54 henry Assigned To => henry
2018-08-08 22:54 henry Status new => resolved
2018-08-08 22:54 henry Resolution open => fixed
2018-08-08 22:54 henry Fixed in Version => 6
2018-08-08 22:54 henry Note Added: 0009935