added prager table and J.Han table

This commit is contained in:
Yeongdo Park 2019-02-19 15:25:46 -05:00
parent 776aaddaf1
commit 8b886df5df
5 changed files with 1886 additions and 11 deletions

106
GRI30-Prager/Alltest2.py Executable file
View file

@ -0,0 +1,106 @@
#!/usr/bin/python
#
import os, sys
import shutil
import csv
import subprocess as sp
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("transport_file", help="directory where dummy OpenFOAM cases for test are created")
args = parser.parse_args()
transport_file = args.transport_file
charged_file = "./charged-Prager.txt"
neutral_file = "./neutral-Prager.txt"
alpha_file = "./alpha-Han.txt"
FNULL = open(os.devnull, 'w')
def paramEntry (name, param):
return "{}.transport.{}".format(name, param)
with open(charged_file, 'r') as cfile:
entries = "rotationalRelaxation dipolePolarizability".split()
for row in cfile:
name, n, alpha, c6, zrot = row.split()
# print "\t".join([name, n, alpha, c6, zrot ])
call_state = sp.call(("foamDictionary -entry ").split() + [name, transport_file] , stdout=FNULL, stderr=FNULL)
val = [zrot, alpha]
if call_state == 0:
print "touching ", name, "..."
for k, v in zip(entries, val):
# print name, k, v
sp.check_call(["foamDictionary", "-entry", paramEntry(name,k), "-set", v, transport_file], stdout=FNULL, stderr=FNULL)
with open(neutral_file, 'r') as cfile:
entries = "rotationalRelaxation wellDepth diameter dipoleMoment dipolePolarizability".split()
for row in cfile:
name, ek, sigma, q, alpha, c6, zrot, alphaQ = row.split()
# print "\t".join([name, ek, sigma, q, alpha, c6, zrot, alphaQ])
call_state = sp.call(("foamDictionary -entry ").split() + [name, transport_file] , stdout=FNULL, stderr=FNULL)
val = [zrot, ek, sigma, q, alpha]
if call_state == 0:
print "touching ", name, "..."
for k, v in zip(entries, val):
# print name, k, v
sp.check_call(["foamDictionary", "-entry", paramEntry(name,k), "-set", v, transport_file], stdout=FNULL, stderr=FNULL)
else:
print "passing nonexistent ", name, "..."
with open(alpha_file, 'r') as cfile:
for row in cfile:
name, a, c, h, o, n, i, hap, ha = row.split()
# print "\t".join((name, a, c, h, o, n, i, hap, ha))
call_state = sp.call(("foamDictionary -entry ").split() + [name, transport_file] , stdout=FNULL, stderr=FNULL)
if call_state == 0:
print "touching ", name, "..."
sp.check_call(["foamDictionary", "-entry", paramEntry(name,"dipolePolarizability"), "-set", a, transport_file], stdout=FNULL, stderr=FNULL)
else:
print "passing nonexistent ", name, "..."
'''
record = { k.split()[0]:v for k, v in zip(header, row)}
case = os.path.join(cases_dir, record['z'])
case_ic = os.path.join(case, "constant/initialConditions")
shutil.copytree("onedim", case)
# sp.check_call(("echo foamDictionary -entry fractions -set '{}' cases2/"+record['z']+"/constant/initialConditions").split())
sp.check_call(("foamDictionary -entry Tl -set ").split() + [record["T"] , case_ic], stdout=FNULL)
for s in species:
sp.check_call(("foamDictionary -entry fractions." + s + " -set ").split() + [record[s] , case_ic], stdout=FNULL)
error = sp.call(("./canteraTest -relTol 0.06 -case " + case).split())
error_cases.append(error)
print "Errorneous cases"
print error_cases
sys.exit(sum(error_cases))
'''

View file

@ -7,7 +7,6 @@ H2O 1.053 0 2 1 0 12.62 981.806 -241.826
O2 1.131 0 0 2 0 12.07 1171.828 0.
HO2 1.489 0 1 2 0 11.35 1113.774 12.296
H2O2 1.773 0 2 2 0 10.58 895.122 -135.88
N 1.081 0 0 0 1 14.53 1872.924 470.818
N2 1.760 0 0 0 2 15.58 1509.509 0.
NO 1.285 0 0 1 1 9.26 990.807 91.137
@ -31,7 +30,6 @@ CO2 2.650 1 0 2 0 13.78 943.137 -393.51
OCHO 2.787 1 1 2 0 8.20 604.166 -181.32
HOCHO 2.859 1 2 2 0 11.33 0. 0.
CH2O2 2.800 1 2 2 0 0.00 0. 0.
HO2CHO 3.324 1 2 3 0 0.00 0. 0.
HOCH2O 3.511 1 3 2 0 0.00 0. 0.
CH3O2 3.334 1 3 2 0 0.00 0. 0.
@ -55,7 +53,6 @@ CH3CO 3.970 2 3 1 0 7.00 665.789 -10.3
CH2CO 3.631 2 2 1 0 9.62 885.29 -48.579
HCCOH 3.596 2 2 1 0 0.00 1067. 93.3
CH3CHO 4.130 2 4 1 0 10.23 828.315 -166.19
C2H3OH 4.218 2 4 1 0 9.33 0. 0.
C2H4O 3.873 2 4 1 0 10.56 828.315 -124.683
CH3CH2O 4.480 2 5 1 0 9.11 981.63 -11.47
@ -79,7 +76,6 @@ C3O2 5.845 3 0 2 0 10.61 935.95 -95.59
C3H3 4.943 3 3 0 0 8.67 1201.645 348.427
C3H4P 4.829 3 4 0 0 10.36 0. 0.
C3H4A 5.368 3 4 0 0 9.69 0. 0.
CC3H4 4.729 3 4 0 0 8.16 0. 0.
C3H5?A 5.499 3 5 0 0 8.18 0. 0.
C3H5?S 5.323 3 5 0 0 0.00 0. 0.
@ -103,7 +99,6 @@ AC3H5OOH 6.304 3 6 2 0 0.00 0. 0.
NC3H7O2H 6.915 3 8 2 0 0.00 0. 0.
IC3H7O2H 6.854 3 8 2 0 0.00 0. 0.
C3H2O2 5.638 3 2 2 0 0.00 0. 0.
C3H4O2 5.647 3 4 2 0 9.70 0. 0.
HOCHCCHOH 6.950 3 4 2 0 0.00 0. 0.
CH3COOCH3 6.347 3 6 2 0 10.25 0. 0.
@ -127,7 +122,6 @@ C4H71?4 7.617 4 7 0 0 0.00 0. 0.
C4H72?2 7.617 4 7 0 0 0.00 0. 0.
C4H8?1 7.351 4 8 0 0 9.55 0. 0.
C4H8?2 7.367 4 8 0 0 9.10 0. 0.
IC4H8 7.347 4 8 0 0 9.22 0. 0.
IC4H9 7.485 4 9 0 0 7.25 0. 0.
TC4H9 7.369 4 9 0 0 7.93 0. 0.
@ -151,7 +145,6 @@ C5H5 7.635 5 5 0 0 0.00 0. 0.
C5H6 8.607 5 6 0 0 9.25 0. 0.
C5H7 9.458 5 7 0 0 7.25 0. 0.
C5H8 9.288 5 8 0 0 8.86 0. 0.
C5H6O 8.733 5 6 1 0 8.38 0. 0.
C5H4O2 9.172 5 4 2 0 9.22 0. 0.
C6H2 9.561 6 2 0 0 9.50 0. 0.
@ -175,7 +168,6 @@ N2H4 2.793 0 4 0 2 8.10 879.85 95.18
ONNO 3.922 0 0 2 2 0.00 0. 0.
N2O3 4.627 0 0 3 2 0.00 0. 0.
ONONO 4.412 0 0 3 2 0.00 0. 0.
N2O4 5.316 0 0 4 2 10.80 0. 0.
N3 2.778 0 0 0 3 11.06 1523.1 449.924
HN3 3.164 0 1 0 3 10.72 1334.177 291.826
@ -199,7 +191,6 @@ CH3NO3 5.043 1 3 3 1 11.53 0. 0.
NCN 3.170 1 0 0 2 0.00 0. 0.
CN2 2.801 1 0 0 2 0.00 0. 0.
HNCNH 3.721 1 2 0 2 0.00 0. 0.
CH2NN 3.966 1 2 0 2 10.30 0. 0.
NH2CN 3.390 1 2 0 2 10.40 0. 0.
NH2CH2NH2 4.638 1 6 0 2 0.00 0. 0.
@ -223,7 +214,6 @@ C2H5NO3 6.930 2 5 3 1 11.22 0. 0.
C2H3NO3 5.725 2 3 3 1 10.51 0. 0.
C2N2 4.393 2 0 0 2 13.37 1606.684 309.28
C2H8N2 6.386 2 8 0 2 8.60 0. 0.
CH3NHNHCH3 6.450 2 8 0 2 0.00 0. 0.
C2H6N2O 6.382 2 6 1 2 9.66 0. 0.
C2H4N2O2 6.363 2 4 2 2 9.41 0. 0.
@ -247,7 +237,6 @@ C4H4N 6.801 4 4 0 1 0.00 0. 0.
C4H5N 7.141 4 5 0 1 8.21 1083.0 306.085
CH3CH(CH3)CN 7.508 4 7 0 1 11.30 0. 0.
CH3CH2CH2CN 7.566 4 7 0 1 11.20 0. 0.
C4H5NO 7.776 4 5 1 1 9.61 0. 0.
C4N2 8.720 4 0 0 2 11.81 0. 0.
C4H2N2 8.409 4 2 0 2 11.16 0. 0.

View file

@ -0,0 +1,10 @@
HCO+ 12.000 1.341 0.416 0.000
H3O+ 12.000 0.964 0.967 10.000
O2- 12.000 1.581 0.059 3.800
C2H3O+ 12.000 3.036 4.625 2.000
CH5O+ 12.000 2.126 4.308 2.000
OH- 12.000 6.400 3.904 0.000
CO3- 12.000 4.900 3.364 0.000
CHO2- 12.000 5.100 4.739 0.000
CHO3- 12.000 5.100 4.994 0.000
O- 12.000 3.200 0.779 0.000

View file

@ -0,0 +1,40 @@
N2 98.400 3.652 0.000 1.740 2.995 4.500 3.602
O2 121.100 3.407 0.000 1.581 2.555 6.000 3.136
O 80.000 2.750 0.000 0.802 0.733 0.000 0.798
CH* 80.000 2.750 1.500 2.000 2.217 0.000 4.433
H 145.000 2.050 0.000 0.667 0.315 0.000 0.630
HCCO 436.000 3.970 0.000 3.677 6.007 2.000 6.641
HO2 107.400 3.458 2.200 1.500 1.330 3.800 2.660
H2 38.000 2.920 0.000 0.790 0.501 280.000 1.003
H2O 572.400 2.605 1.844 1.500 1.479 2.100 2.958
H2O2 107.400 3.458 2.200 1.800 1.785 3.800 3.571
C 80.000 2.750 0.000 1.760 1.817 0.000 3.633
CH 80.000 2.750 1.500 2.000 2.217 0.000 4.433
HCO 498.000 3.590 2.000 2.500 2.643 0.000 5.287
CH2 141.400 3.746 0.600 2.000 2.166 13.000 4.332
CH2 141.400 3.746 0.600 2.000 2.166 13.000 4.332
CH2O 498.000 3.590 2.330 2.770 4.348 2.000 8.696
CH2OH 417.000 3.690 1.500 3.000 3.545 2.000 7.090
CH2CHO 436.000 3.970 0.000 4.049 6.852 2.000 7.622
CH2CH2OH 417.000 3.690 1.700 4.855 8.776 2.000 9.878
CH2CO 436.000 3.970 1.420 4.400 9.697 2.000 19.395
CH3 141.400 3.746 0.000 2.200 2.481 13.000 4.961
CH3O 417.000 3.690 2.000 2.900 4.696 2.000 9.391
CH3OH 417.000 3.690 1.700 3.081 1.740 2.000 10.719
CH3O2 244.000 3.763 0.000 2.650 3.842 2.100 4.158
CH3O2H 417.000 3.690 1.700 3.081 4.719 2.000 5.157
CH3CHO 436.000 3.970 2.690 4.278 9.751 2.000 19.501
CH3CHOH 417.000 3.690 1.700 4.976 9.076 2.000 10.232
CH3CO 436.000 3.970 2.800 4.000 5.834 2.000 11.667
CH4 141.400 3.746 0.000 2.448 3.936 13.000 7.872
CO 98.100 3.650 0.112 1.953 2.784 1.800 5.568
CO2 244.000 3.763 0.000 2.507 4.510 2.100 9.020
C2H 209.000 4.100 0.700 3.000 5.442 2.500 10.885
C2H2 209.000 4.100 0.000 3.487 7.220 2.500 14.439
C2H3 209.000 4.100 0.700 3.500 5.264 2.500 10.528
C2H4 243.000 4.050 0.000 4.188 9.605 2.000 19.209
C2H5 246.000 4.320 0.300 4.000 6.764 2.000 13.529
C2H5O 417.000 3.690 2.200 4.000 7.592 2.000 15.184
C2H5OH 417.000 3.690 1.690 5.110 14.253 2.000 28.506
C2H6 246.000 4.320 0.000 4.226 10.716 2.000 24.216
OH 80.000 2.750 1.660 1.000 0.678 0.000 1.356

1730
GRI30-Prager/transport.foam Normal file

File diff suppressed because it is too large Load diff