Skip to content

Commit f512ca5

Browse files
committed
Use the Tmin,Tmax,Pmin,Pmax if specified in an Arkane job.
For the Chebyshev fitting it used to ignore the specified limits and just use the lowest and highest points from the grid. Chebyshev grid points aren't on the boundaries of the valid range, so you'd end up with not the range you specified. One consequence is network.py files created during an RMG job would not reproduce the fits if you later ran them in Arkane. Without this change, an RMG job would create TCHEB/ 300.000 2500.000 / PCHEB/ 0.010 98.692 / but then when you run the network1_1.py file through Arkane you would get TCHEB/ 302.558 2335.460 / PCHEB/ 0.012 78.776 /
1 parent a008448 commit f512ca5

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

arkane/pdep.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,11 @@ def __init__(self, network,
132132

133133
if Tlist is not None:
134134
self.Tlist = Tlist
135-
self.Tmin = (np.min(self.Tlist.value_si), "K")
136-
self.Tmax = (np.max(self.Tlist.value_si), "K")
137135
self.Tcount = len(self.Tlist.value_si)
136+
if self.Tmin is None:
137+
self.Tmin = (np.min(self.Tlist.value_si), "K")
138+
if self.Tmax is None:
139+
self.Tmax = (np.max(self.Tlist.value_si), "K")
138140
else:
139141
self.Tlist = None
140142

@@ -143,9 +145,11 @@ def __init__(self, network,
143145
self.Pcount = Pcount
144146
if Plist is not None:
145147
self.Plist = Plist
146-
self.Pmin = (np.min(self.Plist.value_si) * 1e-5, "bar")
147-
self.Pmax = (np.max(self.Plist.value_si) * 1e-5, "bar")
148148
self.Pcount = len(self.Plist.value_si)
149+
if self.Pmin is None:
150+
self.Pmin = (np.min(self.Plist.value_si) * 1e-5, "bar")
151+
if self.Pmax is None:
152+
self.Pmax = (np.max(self.Plist.value_si) * 1e-5, "bar")
149153
else:
150154
self.Plist = None
151155

0 commit comments

Comments
 (0)