changeset 2592:d8e716a6fdaa

app/pitot: fixed small bug which I added yesterday...
author Chris James <c.james4@uq.edu.au>
date Thu, 18 Jul 2019 19:44:13 +1000
parents c5fedadd4bf6
children 7c8b83c0fb26
files app/pitot/pitot.py app/pitot/pitot_flow_functions.py app/pitot/pitot_input_utils.py
diffstat 3 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/app/pitot/pitot.py	Tue Jul 16 17:29:34 2019 +1000
+++ b/app/pitot/pitot.py	Thu Jul 18 19:44:13 2019 +1000
@@ -315,7 +315,7 @@
 from pitot_output_utils import *
 from pitot_area_ratio_check import *
 
-VERSION_STRING = "16-Jul-2019"
+VERSION_STRING = "18-Jul-2019"
 
 DEBUG_PITOT = False
 
--- a/app/pitot/pitot_flow_functions.py	Tue Jul 16 17:29:34 2019 +1000
+++ b/app/pitot/pitot_flow_functions.py	Thu Jul 18 19:44:13 2019 +1000
@@ -1135,14 +1135,15 @@
         print "Acceleration tube fill state is p5 = {0} Pa, T5 = {1} K.".format(state5.p, state5.T)
         
         # do a clone of state 5 here so we don't get a lot of floating point jumping around...
-        if 'CO2' not in state5.reactants:
-            state5 = state5.clone()
-        else:
+        # special case here for custom CO2 accelerator gas...
+        if hasattr(state5, 'reactants') and 'CO2' in state5.reactants:
             state5.onlyList = state5.reactants
             state5.with_ions = False
             state5 = state5.clone()
             state5.onlyList = []
             state5.with_ions = True
+        else:
+            state5 = state5.clone()
                 
         # some extra code to try and get conditions above 19 km/s working with Pitot
         if cfg['custom_accelerator_gas']:
--- a/app/pitot/pitot_input_utils.py	Tue Jul 16 17:29:34 2019 +1000
+++ b/app/pitot/pitot_input_utils.py	Thu Jul 18 19:44:13 2019 +1000
@@ -1627,7 +1627,7 @@
             states['s7'].onlyList = []
             states['s7'].with_ions = True
 
-    if 'CO2' in cfg['accelerator_gas_composition']:
+    if 'accelerator_gas_composition' in cfg and 'CO2' in cfg['accelerator_gas_composition']:
         states['s5'].onlyList = []
         states['s5'].with_ions = False