updating a few other tests
This commit is contained in:
parent
312e5b742a
commit
4e33e37478
4 changed files with 116 additions and 26 deletions
45
test_problems/cathermo/HMW_graph_GvT/runtest
Executable file
45
test_problems/cathermo/HMW_graph_GvT/runtest
Executable file
|
|
@ -0,0 +1,45 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
#
|
||||
temp_success="1"
|
||||
/bin/rm -f output.txt outputa.txt
|
||||
|
||||
##########################################################################
|
||||
prog=HMW_graph_GvT
|
||||
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 0
|
||||
fi
|
||||
|
||||
|
|
@ -225,8 +225,8 @@ int main(int argc, char** argv)
|
|||
}
|
||||
|
||||
if (i != TTable.NPoints+1) {
|
||||
printf("%13g, %13g, %13g, %13g, %13g, %13g, "
|
||||
"%13.5g, %13g, %13g, %13g\n",
|
||||
printf("%13.4g, %13.4g, %13.4g, %13.4g, %13.4g, %13.4g, "
|
||||
"%13.5g, %13.4g, %13.4g, %13.4g\n",
|
||||
T, pres*1.0E-5, Aphi, Av, Delta_V0s*1.0E3, Delta_Vs*1.0E3,
|
||||
Vex*1.0E3, phiV*1.0E3, molarV*1.0E3 , molarV0*1.0E3);
|
||||
#ifdef DEBUG_HKM
|
||||
|
|
@ -242,13 +242,13 @@ int main(int argc, char** argv)
|
|||
printf(" Species MoleFrac Molal V0 "
|
||||
" partV (partV - V0)\n");
|
||||
printf(" H2O(L)");
|
||||
printf("%13g %13g %13g %13g %13g\n", Xmol[0], moll[0], V0_H2O*1.E3, V_H2O*1.E3,
|
||||
printf("%13.4g %13.4g %13.4g %13.4g %13.4g\n", Xmol[0], moll[0], V0_H2O*1.E3, V_H2O*1.E3,
|
||||
(V_H2O-V0_H2O)*1.E3);
|
||||
printf(" Na+ ");
|
||||
printf("%13g %13g %13g %13g %13g\n", Xmol[i1], moll[i1],
|
||||
printf("%13.4g %13.4g %13.4g %13.4g %13.4g\n", Xmol[i1], moll[i1],
|
||||
V0_Naplus*1.E3 , V_Naplus*1.E3, (V_Naplus -V0_Naplus)*1.E3);
|
||||
printf(" Cl- ");
|
||||
printf("%13g %13g %13g %13g %13g\n", Xmol[i2], moll[i2],
|
||||
printf("%13.4g %13.4g %13.4g %13.4g %13.4g\n", Xmol[i2], moll[i2],
|
||||
V0_Clminus*1.E3, V_Clminus*1.E3, (V_Clminus - V0_Clminus)*1.E3);
|
||||
|
||||
printf(" NaCl(s)");
|
||||
|
|
@ -256,7 +256,7 @@ int main(int argc, char** argv)
|
|||
if (fabs(dd) < 1.0E-12) {
|
||||
dd = 0.0;
|
||||
}
|
||||
printf("%13g %13g %13g %13g\n", 1.0,
|
||||
printf("%13.4g %13.4g %13.4g %13.4g\n", 1.0,
|
||||
V0_NaCl*1.E3 , V_NaCl*1.E3, dd);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -15,25 +15,25 @@ phiV: phiV, calculated from the program, is checked
|
|||
|
||||
T, Pres, Aphi, A_V, Delta_V0, Delta_Vs, Vex, phiV, MolarV, MolarV0
|
||||
Kelvin, bar, sqrt(kg/gmol),sqrt(kg/gmol)cm3/gmol,cm**3/gmolSalt,cm**3/gmolSalt,cm**3/gmolSoln,cm**3/gmolSalt,cm**3/gmol, cm**3/gmol
|
||||
273.15, 1.01325, 0.376717, 1.50615, -10.3142, -8.58213, 0.15701, 1.73208, 16.4205, 16.2635
|
||||
298.15, 1.01325, 0.391447, 1.87431, -10.3142, -8.15874, 0.19539, 2.15547, 16.5002, 16.3049
|
||||
323.15, 1.01325, 0.410293, 2.37345, -10.3142, -7.58473, 0.24742, 2.72949, 16.6872, 16.4398
|
||||
348.15, 1.01325, 0.433273, 3.06975, -10.3142, -6.78398, 0.32001, 3.53023, 16.9618, 16.6418
|
||||
373.15, 1.01418, 0.460559, 4.05157, -10.3142, -5.65488, 0.42236, 4.65934, 17.3246, 16.9022
|
||||
398.15, 2.32238, 0.492454, 5.45118, -10.3142, -4.04532, 0.56826, 6.26889, 17.7872, 17.2189
|
||||
423.15, 4.76165, 0.529514, 7.4808, -10.3142, -1.71124, 0.77985, 8.60297, 18.3759, 17.596
|
||||
448.15, 8.92602, 0.572549, 10.4889, -10.3142, 1.74814, 1.0934, 12.0624, 19.1352, 18.0417
|
||||
473.15, 15.5493, 0.622769, 15.0761, -10.3142, 7.02345, 1.5716, 17.3377, 20.1414, 18.5698
|
||||
498.15, 25.4972, 0.682036, 22.3385, -10.3142, 15.3752, 2.3287, 25.6894, 21.5309, 19.2022
|
||||
523.15, 39.7617, 0.753389, 34.431, -10.3142, 29.2817, 3.5893, 39.5959, 23.5633, 19.974
|
||||
548.15, 59.4639, 0.842213, 56.0329, -10.3142, 54.124, 5.8412, 64.4382, 26.7855, 20.9443
|
||||
573.15, 85.879, 0.959258, 98.8122, -10.3142, 103.321, 10.301, 113.635, 32.524, 22.2232
|
||||
598.15, 120.51, 1.13023, 198.465, -10.3142, 217.922, 20.689, 228.237, 44.7422, 24.053
|
||||
623.15, 165.294, 1.43872, 494.917, -10.3142, 558.844, 51.593, 569.158, 78.7691, 27.1758
|
||||
323.15, 1.01325, 0.410293, 2.37345, -10.3142, -7.58473, 0.24742, 2.72949, 16.6872, 16.4398
|
||||
273.1, 1.013, 0.3767, 1.506, -10.31, -8.582, 0.15701, 1.732, 16.42, 16.26
|
||||
298.1, 1.013, 0.3914, 1.874, -10.31, -8.159, 0.19539, 2.155, 16.5, 16.3
|
||||
323.1, 1.013, 0.4103, 2.373, -10.31, -7.585, 0.24742, 2.729, 16.69, 16.44
|
||||
348.1, 1.013, 0.4333, 3.07, -10.31, -6.784, 0.32001, 3.53, 16.96, 16.64
|
||||
373.1, 1.014, 0.4606, 4.052, -10.31, -5.655, 0.42236, 4.659, 17.32, 16.9
|
||||
398.1, 2.322, 0.4925, 5.451, -10.31, -4.045, 0.56827, 6.269, 17.79, 17.22
|
||||
423.1, 4.762, 0.5295, 7.481, -10.31, -1.711, 0.77985, 8.603, 18.38, 17.6
|
||||
448.1, 8.926, 0.5726, 10.49, -10.31, 1.748, 1.0934, 12.06, 19.14, 18.04
|
||||
473.1, 15.55, 0.6228, 15.08, -10.31, 7.023, 1.5716, 17.34, 20.14, 18.57
|
||||
498.1, 25.5, 0.682, 22.34, -10.31, 15.38, 2.3287, 25.69, 21.53, 19.2
|
||||
523.1, 39.76, 0.7534, 34.43, -10.31, 29.28, 3.5893, 39.6, 23.56, 19.97
|
||||
548.1, 59.46, 0.8422, 56.03, -10.31, 54.12, 5.8412, 64.44, 26.79, 20.94
|
||||
573.1, 85.88, 0.9593, 98.81, -10.31, 103.3, 10.301, 113.6, 32.52, 22.22
|
||||
598.1, 120.5, 1.13, 198.5, -10.31, 217.9, 20.689, 228.2, 44.74, 24.05
|
||||
623.1, 165.3, 1.439, 494.9, -10.31, 558.8, 51.593, 569.2, 78.77, 27.18
|
||||
323.1, 1.013, 0.4103, 2.373, -10.31, -7.585, 0.24742, 2.729, 16.69, 16.44
|
||||
Breakdown of Volume Calculation at 323.15 K, 1atm:
|
||||
Species MoleFrac Molal V0 partV (partV - V0)
|
||||
H2O(L) 0.818703 0 18.2334 18.1515 -0.0819503
|
||||
Na+ 0.0906484 6.146 8.34 10.0748 1.73482
|
||||
Cl- 0.0906484 6.146 8.34 10.0748 1.73482
|
||||
NaCl(s) 1 26.9942 26.9942 0
|
||||
H2O(L) 0.8187 0 18.23 18.15 -0.08195
|
||||
Na+ 0.09065 6.146 8.34 10.07 1.735
|
||||
Cl- 0.09065 6.146 8.34 10.07 1.735
|
||||
NaCl(s) 1 26.99 26.99 0
|
||||
|
|
|
|||
45
test_problems/cathermo/HMW_graph_VvT/runtest
Executable file
45
test_problems/cathermo/HMW_graph_VvT/runtest
Executable file
|
|
@ -0,0 +1,45 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
#
|
||||
temp_success="1"
|
||||
/bin/rm -f output.txt outputa.txt
|
||||
|
||||
##########################################################################
|
||||
prog=HMW_graph_VvT
|
||||
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