converting to lower precision level for test
This commit is contained in:
parent
405c8bf8a9
commit
1147addeb8
3 changed files with 71 additions and 26 deletions
|
|
@ -226,8 +226,8 @@ int main(int argc, char** argv)
|
|||
}
|
||||
|
||||
if (i != TTable.NPoints+1) {
|
||||
printf("%13g, %13g, %13g, %13g, %13g, %13g, "
|
||||
"%13g, %13g, %13g, %13g\n",
|
||||
printf("%13.5g, %13.5g, %13.5g, %13.5g, %13.5g, %13.5g, "
|
||||
"%13.5g, %13.5g, %13.5g, %13.5g\n",
|
||||
T, pres*1.0E-5, Aphi, AJ/GasConstant, Delta_Cp0s, Delta_Cps,
|
||||
J, phiJ, molarCp , molarCp0);
|
||||
#ifdef DEBUG_HKM
|
||||
|
|
@ -243,16 +243,16 @@ int main(int argc, char** argv)
|
|||
printf(" Species MoleFrac Molal Cp0 "
|
||||
" partCp (partCp - Cp0)\n");
|
||||
printf(" H2O(L)");
|
||||
printf("%13g %13g %13g %13g %13g\n", Xmol[0], moll[0], Cp0_H2O , Cp_H2O, Cp_H2O-Cp0_H2O);
|
||||
printf("%13.5g %13.5g %13.5g %13.5g %13.5g\n", Xmol[0], moll[0], Cp0_H2O , Cp_H2O, Cp_H2O-Cp0_H2O);
|
||||
printf(" Na+ ");
|
||||
printf("%13g %13g %13g %13g %13g\n", Xmol[i1], moll[i1],
|
||||
printf("%13.5g %13.5g %13.5g %13.5g %13.5g\n", Xmol[i1], moll[i1],
|
||||
Cp0_Naplus , Cp_Naplus, Cp_Naplus -Cp0_Naplus);
|
||||
printf(" Cl- ");
|
||||
printf("%13g %13g %13g %13g %13g\n", Xmol[i2], moll[i2],
|
||||
printf("%13.5g %13.5g %13.5g %13.5g %13.5g\n", Xmol[i2], moll[i2],
|
||||
Cp0_Clminus , Cp_Clminus, Cp_Clminus - Cp0_Clminus);
|
||||
|
||||
printf(" NaCl(s)");
|
||||
printf("%13g %13g %13g %13g\n", 1.0,
|
||||
printf("%13.5g %13.5g %13.5g %13.5g\n", 1.0,
|
||||
Cp0_NaCl , Cp_NaCl, Cp_NaCl - Cp0_NaCl);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -15,25 +15,25 @@ phiJ: phiJ, calculated from the program, is checked
|
|||
|
||||
T, Pres, Aphi, A_J/R, Delta_Cp0, Delta_Cps, J, phiJ, MolarCp, MolarCp0
|
||||
Kelvin, bar, sqrt(kg/gmol), sqrt(kg/gmol), kJ/gmolSalt, kJ/gmolSalt, kJ/gmolSoln, kJ/gmolSalt, kJ/gmol, kJ/gmol
|
||||
273.15, 1.01325, 0.376717, 4.08571, -0.158977, -0.0364738, 0.0111047, 0.122503, 0.0634481, 0.0523434
|
||||
298.15, 1.01325, 0.391447, 4.61223, -0.130795, -0.019957, 0.0100473, 0.110838, 0.0644397, 0.0543924
|
||||
323.15, 1.01325, 0.410293, 5.50261, -0.115719, -0.0105891, 0.00952985, 0.10513, 0.0653379, 0.0558081
|
||||
348.15, 1.01325, 0.433273, 6.72551, -0.113771, -0.00869293, 0.0095252, 0.105079, 0.065728, 0.0562028
|
||||
373.15, 1.01418, 0.460559, 8.3544, -0.124962, -0.013575, 0.010097, 0.111387, 0.0656562, 0.0555592
|
||||
398.15, 2.32238, 0.492454, 10.5437, -0.14929, -0.0237592, 0.0113792, 0.125531, 0.0653077, 0.0539285
|
||||
423.15, 4.76165, 0.529514, 13.5811, -0.186752, -0.0364898, 0.013621, 0.150262, 0.0649994, 0.0513783
|
||||
448.15, 8.92602, 0.572549, 17.996, -0.237338, -0.0466964, 0.0172814, 0.190642, 0.0652691, 0.0479877
|
||||
473.15, 15.5493, 0.622769, 24.8259, -0.301036, -0.0444456, 0.0232595, 0.256591, 0.0671304, 0.0438709
|
||||
498.15, 25.4972, 0.682036, 36.2733, -0.377833, -0.0086642, 0.0334646, 0.369169, 0.0726785, 0.0392139
|
||||
523.15, 39.7617, 0.753389, 57.5194, -0.467713, 0.110203, 0.0523872, 0.577916, 0.0867375, 0.0343503
|
||||
548.15, 59.4639, 0.842213, 102.541, -0.570661, 0.445815, 0.0921419, 1.01648, 0.122088, 0.0299461
|
||||
573.15, 85.879, 0.959258, 217.128, -0.68666, 1.43602, 0.192417, 2.12268, 0.219974, 0.0275567
|
||||
598.15, 120.51, 1.13023, 604.228, -0.815692, 5.02135, 0.529119, 5.83704, 0.560936, 0.0318178
|
||||
623.15, 165.294, 1.43872, 2813.62, -0.957741, 26.0203, 2.44552, 26.9781, 2.51297, 0.0674475
|
||||
323.15, 1.01325, 0.410293, 5.50261, -0.115719, -0.0105891, 0.00952985, 0.10513, 0.0653379, 0.0558081
|
||||
273.15, 1.0132, 0.37672, 4.0857, -0.15898, -0.036474, 0.011105, 0.1225, 0.063448, 0.052343
|
||||
298.15, 1.0132, 0.39145, 4.6122, -0.1308, -0.019957, 0.010047, 0.11084, 0.06444, 0.054392
|
||||
323.15, 1.0132, 0.41029, 5.5026, -0.11572, -0.010589, 0.0095299, 0.10513, 0.065338, 0.055808
|
||||
348.15, 1.0132, 0.43327, 6.7255, -0.11377, -0.0086929, 0.0095252, 0.10508, 0.065728, 0.056203
|
||||
373.15, 1.0142, 0.46056, 8.3544, -0.12496, -0.013575, 0.010097, 0.11139, 0.065656, 0.055559
|
||||
398.15, 2.3224, 0.49245, 10.544, -0.14929, -0.023759, 0.011379, 0.12553, 0.065308, 0.053929
|
||||
423.15, 4.7616, 0.52952, 13.581, -0.18675, -0.03649, 0.013621, 0.15026, 0.064999, 0.051378
|
||||
448.15, 8.926, 0.57255, 17.996, -0.23734, -0.046696, 0.017281, 0.19064, 0.065269, 0.047988
|
||||
473.15, 15.549, 0.62277, 24.826, -0.30104, -0.044446, 0.02326, 0.25659, 0.06713, 0.043871
|
||||
498.15, 25.497, 0.68204, 36.273, -0.37783, -0.008664, 0.033465, 0.36917, 0.072679, 0.039214
|
||||
523.15, 39.762, 0.75339, 57.519, -0.46771, 0.1102, 0.052387, 0.57792, 0.086738, 0.03435
|
||||
548.15, 59.464, 0.84221, 102.54, -0.57066, 0.44582, 0.092142, 1.0165, 0.12209, 0.029946
|
||||
573.15, 85.879, 0.95926, 217.13, -0.68666, 1.436, 0.19242, 2.1227, 0.21997, 0.027557
|
||||
598.15, 120.51, 1.1302, 604.23, -0.81569, 5.0214, 0.52912, 5.837, 0.56094, 0.031818
|
||||
623.15, 165.29, 1.4387, 2813.6, -0.95774, 26.02, 2.4455, 26.978, 2.513, 0.067447
|
||||
323.15, 1.0132, 0.41029, 5.5026, -0.11572, -0.010589, 0.0095299, 0.10513, 0.065338, 0.055808
|
||||
Breakdown of Heat Capacity Calculation at 323.15 K, 1atm:
|
||||
Species MoleFrac Molal Cp0 partCp (partCp - Cp0)
|
||||
H2O(L) 0.818703 0 0.075328 0.0695928 -0.00573521
|
||||
Na+ 0.0906484 6.146 0.0284152 0.106879 0.0784641
|
||||
Cl- 0.0906484 6.146 -0.0930958 -0.0146317 0.0784641
|
||||
NaCl(s) 1 0.0510383 0.0510383 0
|
||||
H2O(L) 0.8187 0 0.075328 0.069593 -0.0057352
|
||||
Na+ 0.090648 6.146 0.028415 0.10688 0.078464
|
||||
Cl- 0.090648 6.146 -0.093096 -0.014632 0.078464
|
||||
NaCl(s) 1 0.051038 0.051038 0
|
||||
|
|
|
|||
45
test_problems/cathermo/HMW_graph_CpvT/runtest
Executable file
45
test_problems/cathermo/HMW_graph_CpvT/runtest
Executable file
|
|
@ -0,0 +1,45 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
#
|
||||
temp_success="1"
|
||||
/bin/rm -f output.txt outputa.txt
|
||||
|
||||
##########################################################################
|
||||
prog=HMW_graph_CpvT
|
||||
if test ! -x $prog ; then
|
||||
echo $prog ' does not exist'
|
||||
exit 1
|
||||
fi
|
||||
##########################################################################
|
||||
/bin/rm -f test.out test.diff output.txt
|
||||
|
||||
#################################################################
|
||||
#
|
||||
CANTERA_DATA=${CANTERA_DATA:=../../../data/inputs}; export CANTERA_DATA
|
||||
CANTERA_BIN=${CANTERA_BIN:=../../../bin}
|
||||
|
||||
#################################################################
|
||||
|
||||
./$prog HMW_NaCl_sp1977_alt.xml > output.txt
|
||||
retnStat=$?
|
||||
if [ $retnStat != "0" ]
|
||||
then
|
||||
temp_success="0"
|
||||
echo "$prog returned with bad status, $retnStat, check output"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
$CANTERA_BIN/exp3to2.sh output.txt > outputa.txt
|
||||
diff -w outputa.txt output_blessed.txt > diff_test.out
|
||||
retnStat=$?
|
||||
if [ $retnStat = "0" ]
|
||||
then
|
||||
echo "successful diff comparison on $prog test"
|
||||
exit 0
|
||||
else
|
||||
echo "unsuccessful diff comparison on $prog test"
|
||||
echo "FAILED" > csvCode.txt
|
||||
temp_success="0"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Loading…
Add table
Reference in a new issue