[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).
This commit is contained in:
Ray Speth 2015-12-08 11:38:07 -05:00
parent 4887775109
commit 1c09f7f14b
4 changed files with 73 additions and 19 deletions

View file

@ -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);

View file

@ -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:

View file

@ -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)

View file

@ -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