Skip to content

Commit

Permalink
[Thermo] Make continuity check for enthalpy dimensionally consistent
Browse files Browse the repository at this point in the history
All quantities here are nondimensional, so taking h+cp*T makes no sense, and
caused the test to pass even for suspicously discontinuous thermo data (although
the bad data would generally get flagged by the tests for cp and/or s).
  • Loading branch information
speth committed Dec 15, 2015
1 parent 4887775 commit 1c09f7f
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/thermo/NasaPoly2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ void NasaPoly2::validate(const std::string& name)

// enthalpy
delta = h_low - h_high;
if (fabs(delta/(fabs(h_low)+cp_low*m_midT)) > 0.001) {
if (fabs(delta/cp_low) > 0.001) {
writelog("\n\n**** WARNING ****\nFor species {}, discontinuity"
" in h/RT detected at Tmid = {}\n", name, m_midT);
writelog("\tValue computed using low-temperature polynomial: {}\n", h_low);
Expand Down
30 changes: 24 additions & 6 deletions test_problems/VPsilane_test/output_blessed.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,39 @@


**** WARNING ****
For species SI2H6, discontinuity in h/RT detected at Tmid = 1000
Value computed using low-temperature polynomial: 19.8328
Value computed using high-temperature polynomial: 19.9055


**** WARNING ****
For species SI2H6, discontinuity in s/R detected at Tmid = 1000
Value computed using low-temperature polynomial: 49.5493.
Value computed using high-temperature polynomial: 49.7214.
Value computed using low-temperature polynomial: 49.5493
Value computed using high-temperature polynomial: 49.7214


**** WARNING ****
For species SI3H8, discontinuity in h/RT detected at Tmid = 1000
Value computed using low-temperature polynomial: 29.3028
Value computed using high-temperature polynomial: 29.4297


**** WARNING ****
For species SI3H8, discontinuity in s/R detected at Tmid = 1000
Value computed using low-temperature polynomial: 65.9731.
Value computed using high-temperature polynomial: 66.2781.
Value computed using low-temperature polynomial: 65.9731
Value computed using high-temperature polynomial: 66.2781


**** WARNING ****
For species SI2, discontinuity in h/RT detected at Tmid = 1000
Value computed using low-temperature polynomial: 74.0115
Value computed using high-temperature polynomial: 74.0387


**** WARNING ****
For species SI2, discontinuity in s/R detected at Tmid = 1000
Value computed using low-temperature polynomial: 32.8813.
Value computed using high-temperature polynomial: 32.9489.
Value computed using low-temperature polynomial: 32.8813
Value computed using high-temperature polynomial: 32.9489

silane:

Expand Down
30 changes: 24 additions & 6 deletions test_problems/cxx_ex/output_blessed.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,40 @@ Chemical equilibrium.
Equilibrium composition and pressure for a range of temperatures at constant density.


**** WARNING ****
For species SI2H6, discontinuity in h/RT detected at Tmid = 1000
Value computed using low-temperature polynomial: 19.8328
Value computed using high-temperature polynomial: 19.9055


**** WARNING ****
For species SI2H6, discontinuity in s/R detected at Tmid = 1000
Value computed using low-temperature polynomial: 49.5493.
Value computed using high-temperature polynomial: 49.7214.
Value computed using low-temperature polynomial: 49.5493
Value computed using high-temperature polynomial: 49.7214


**** WARNING ****
For species SI3H8, discontinuity in h/RT detected at Tmid = 1000
Value computed using low-temperature polynomial: 29.3028
Value computed using high-temperature polynomial: 29.4297


**** WARNING ****
For species SI3H8, discontinuity in s/R detected at Tmid = 1000
Value computed using low-temperature polynomial: 65.9731.
Value computed using high-temperature polynomial: 66.2781.
Value computed using low-temperature polynomial: 65.9731
Value computed using high-temperature polynomial: 66.2781


**** WARNING ****
For species SI2, discontinuity in h/RT detected at Tmid = 1000
Value computed using low-temperature polynomial: 74.0115
Value computed using high-temperature polynomial: 74.0387


**** WARNING ****
For species SI2, discontinuity in s/R detected at Tmid = 1000
Value computed using low-temperature polynomial: 32.8813.
Value computed using high-temperature polynomial: 32.9489.
Value computed using low-temperature polynomial: 32.8813
Value computed using high-temperature polynomial: 32.9489
Output files:
eq1.csv (Excel CSV file)
eq1.dat (Tecplot data file)
Expand Down
30 changes: 24 additions & 6 deletions test_problems/silane_equil/output_blessed.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,36 @@


**** WARNING ****
For species SI2H6, discontinuity in h/RT detected at Tmid = 1000
Value computed using low-temperature polynomial: 19.8328
Value computed using high-temperature polynomial: 19.9055


**** WARNING ****
For species SI2H6, discontinuity in s/R detected at Tmid = 1000
Value computed using low-temperature polynomial: 49.5493.
Value computed using high-temperature polynomial: 49.7214.
Value computed using low-temperature polynomial: 49.5493
Value computed using high-temperature polynomial: 49.7214


**** WARNING ****
For species SI3H8, discontinuity in h/RT detected at Tmid = 1000
Value computed using low-temperature polynomial: 29.3028
Value computed using high-temperature polynomial: 29.4297


**** WARNING ****
For species SI3H8, discontinuity in s/R detected at Tmid = 1000
Value computed using low-temperature polynomial: 65.9731.
Value computed using high-temperature polynomial: 66.2781.
Value computed using low-temperature polynomial: 65.9731
Value computed using high-temperature polynomial: 66.2781


**** WARNING ****
For species SI2, discontinuity in h/RT detected at Tmid = 1000
Value computed using low-temperature polynomial: 74.0115
Value computed using high-temperature polynomial: 74.0387


**** WARNING ****
For species SI2, discontinuity in s/R detected at Tmid = 1000
Value computed using low-temperature polynomial: 32.8813.
Value computed using high-temperature polynomial: 32.9489.
Value computed using low-temperature polynomial: 32.8813
Value computed using high-temperature polynomial: 32.9489

0 comments on commit 1c09f7f

Please sign in to comment.