From 1c09f7f14b2216bc427ec9bceb8139788156bf0f Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Tue, 8 Dec 2015 11:38:07 -0500 Subject: [PATCH] [Thermo] Make continuity check for enthalpy dimensionally consistent 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). --- src/thermo/NasaPoly2.cpp | 2 +- .../VPsilane_test/output_blessed.txt | 30 +++++++++++++++---- test_problems/cxx_ex/output_blessed.txt | 30 +++++++++++++++---- test_problems/silane_equil/output_blessed.txt | 30 +++++++++++++++---- 4 files changed, 73 insertions(+), 19 deletions(-) diff --git a/src/thermo/NasaPoly2.cpp b/src/thermo/NasaPoly2.cpp index 8222032b1f..e7eacb55b6 100644 --- a/src/thermo/NasaPoly2.cpp +++ b/src/thermo/NasaPoly2.cpp @@ -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); diff --git a/test_problems/VPsilane_test/output_blessed.txt b/test_problems/VPsilane_test/output_blessed.txt index 485cc48432..72c4b590b3 100644 --- a/test_problems/VPsilane_test/output_blessed.txt +++ b/test_problems/VPsilane_test/output_blessed.txt @@ -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: diff --git a/test_problems/cxx_ex/output_blessed.txt b/test_problems/cxx_ex/output_blessed.txt index b1314e884d..5d96978968 100644 --- a/test_problems/cxx_ex/output_blessed.txt +++ b/test_problems/cxx_ex/output_blessed.txt @@ -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) diff --git a/test_problems/silane_equil/output_blessed.txt b/test_problems/silane_equil/output_blessed.txt index d9caeacc28..1e6be20bff 100644 --- a/test_problems/silane_equil/output_blessed.txt +++ b/test_problems/silane_equil/output_blessed.txt @@ -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