changeset 2583:b7f1f24ee379

app/pitot: added x3r 280 kg driver condition to PITOT Also tightened up the RST output a bit.
author Chris James (c.james4@uq.edu.au)
date Wed, 05 Jun 2019 18:59:48 +1000
parents 101e2b77a77a
children 706906ee1d30
files app/pitot/pitot.py app/pitot/pitot_input_utils.py app/pitot/pitot_output_utils.py
diffstat 3 files changed, 61 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/app/pitot/pitot.py	Mon Jun 03 12:48:22 2019 +1000
+++ b/app/pitot/pitot.py	Wed Jun 05 18:59:48 2019 +1000
@@ -315,7 +315,7 @@
 from pitot_output_utils import *
 from pitot_area_ratio_check import *
 
-VERSION_STRING = "03-Jun-2019"
+VERSION_STRING = "05-Jun-2019"
 
 DEBUG_PITOT = False
 
--- a/app/pitot/pitot_input_utils.py	Mon Jun 03 12:48:22 2019 +1000
+++ b/app/pitot/pitot_input_utils.py	Wed Jun 05 18:59:48 2019 +1000
@@ -238,9 +238,9 @@
         print "No 'facility' specified. You need to specify a facility. Bailing out."
         print "Available facilities are 'x2','x3', and 'custom'."
         cfg['bad_input'] = True
-    if cfg['facility'] not in ['x2','x3','custom']:
+    if cfg['facility'] not in ['x2','x3','x3r','custom']:
         print "'facility' is not a valid facility. You need to specify a facility. Bailing out."
-        print "Valid facilities are 'x2','x3', and 'custom'."
+        print "Valid facilities are 'x2','x3','x3r', and 'custom'."
         cfg['bad_input'] = True
         
     if 'driver_gas' not in cfg and not cfg['facility'] == 'custom' and not condition_builder: # don't check this if we're doing a condition builder run:
@@ -259,6 +259,8 @@
             cfg['driver_gas'] = 'He:0.90,Ar:0.10'
         elif cfg['driver_gas'] == 'He:1':
             cfg['driver_gas'] = 'He:1.0'
+        elif cfg['driver_gas'] == 'He:0.7,Ar:0.3':
+            cfg['driver_gas'] = 'He:0.70,Ar:0.30'
         elif cfg['driver_gas'] == 'He:0.6,Ar:0.4':
             cfg['driver_gas'] = 'He:0.60,Ar:0.40'
     elif not cfg['facility'] == 'custom' and condition_builder:
@@ -273,6 +275,8 @@
                 driver_condition = 'He:0.90,Ar:0.10'
             elif driver_condition == 'He:1':
                 driver_condition = 'He:1.0'
+            elif driver_condition == 'He:0.7,Ar:0.3':
+                driver_condition = 'He:0.70,Ar:0.30'
             elif driver_condition == 'He:0.6,Ar:0.4':
                 driver_condition = 'He:0.60,Ar:0.40'
 
@@ -1035,7 +1039,9 @@
                          'He:0.85,Ar:0.15':[Gas({'He':0.85,'Ar':0.15},inputUnits='moles',
                                                outputUnits='moles'),2.23],
                          'He:0.825,Ar:0.175':[Gas({'He':0.825,'Ar':2.23},inputUnits='moles',
-                                               outputUnits='moles'),2.23],    
+                                               outputUnits='moles'),2.23],
+                         'He:0.70,Ar:0.30': [Gas({'He': 0.70, 'Ar': 0.30}, inputUnits='moles',
+                                                 outputUnits='moles'), 2.23],
                          'He:0.60,Ar:0.40':[Gas({'He':0.60,'Ar':0.40},inputUnits='moles',
                                                 outputUnits='moles'),2.23],      
                          'Ar:1.0':[Gas({'Ar':1.0},inputUnits='moles',
@@ -1230,11 +1236,15 @@
             cfg['M_throat'] = M['s3s']
             print "NOTE: This driver selection ('{0}') is a perfect gas driver.".format(cfg['piston'])
 
-    elif cfg['facility'] == 'x3':
+    elif cfg['facility'] in ['x3','x3r']:
         states['s4']=primary_driver_x3[cfg['driver_gas']][0].clone()
         if cfg['piston'] == 'x3':
             cfg['p4'] = 2.79e7; cfg['T4'] = 2700.0 #Pa, K
+            # get these Mach numbers from the primary driver dictionary here
+            M['s3s'] = primary_driver_x3[cfg['driver_gas']][1]
+            cfg['M_throat'] = M['s3s']
         elif cfg['piston'] == 'lwp-2mm-andreas':
+
             # this is just isentropic for now...
             driver_p = 49.0e3 #driver fill pressure, Pa
             driver_T = 298.15 #driver temperature, K
@@ -1244,12 +1254,43 @@
             cfg['T4'] = states['s4i'].T*\
             (cfg['p4']/states['s4i'].p)**(1.0-(1.0/states['s4i'].gam)) #K
             states['s4'] = states['s4i'].clone()
+            #hard code it here...
+            if cfg['driver_gas'] == 'He:1.0':
+                M['s3s'] = 3.08
+                cfg['M_throat'] = M['s3s']
+
+        elif cfg['piston'] == 'lwp-3mm-andreas':
+            # this is just isentropic for now...
+            driver_p = 46.0e3 #driver fill pressure, Pa
+            driver_T = 298.15 #driver temperature, K
+            states['s4i'] = primary_driver_x3[cfg['driver_gas']][0].clone()
+            states['s4i'].set_pT(driver_p, driver_T)
+            cfg['p4'] = 28.0e6 #primary driver burst pressure rough nominal from Andreas, Pa
+            cfg['T4'] = states['s4i'].T*\
+            (cfg['p4']/states['s4i'].p)**(1.0-(1.0/states['s4i'].gam)) #K
+            states['s4'] = states['s4i'].clone()
+            #hard code it here...
+            if cfg['driver_gas'] == 'He:1.0':
+                M['s3s'] = 3.08
+                cfg['M_throat'] = M['s3s']
+
+        elif cfg['piston'] == '280kg-piston-2mm-x3r-half-pressure':
+            # this is just isentropic for now...
+            driver_p = 150.0e3  # driver fill pressure, Pa
+            driver_T = 298.15  # driver temperature, K
+            states['s4i'] = primary_driver_x3[cfg['driver_gas']][0].clone()
+            states['s4i'].set_pT(driver_p, driver_T)
+            cfg['p4'] = 4.5e6  # primary diaphragm nominal rupture pressure, Pa
+            cfg['T4'] = states['s4i'].T * \
+                        (cfg['p4'] / states['s4i'].p) ** (1.0 - (1.0 / states['s4i'].gam))  # K
+            states['s4'] = states['s4i'].clone()
+            if cfg['driver_gas'] == 'He:0.70,Ar:0.30':
+                M['s3s'] = 2.035
+                cfg['M_throat'] = M['s3s']
            
         states['s4'].set_pT(cfg['p4'],cfg['T4'])
         V['s4']=0.0
         M['s4']=0.0
-        M['s3s']=primary_driver_x3[cfg['driver_gas']][1]
-        cfg['M_throat'] = M['s3s']
         
     elif cfg['facility'] == 'custom':
         # set driver fill condition
--- a/app/pitot/pitot_output_utils.py	Mon Jun 03 12:48:22 2019 +1000
+++ b/app/pitot/pitot_output_utils.py	Wed Jun 05 18:59:48 2019 +1000
@@ -86,7 +86,7 @@
         print state5_description
         txt_output.write(state5_description + '\n')
         
-        state6_description = 'state 6 is the test gas condition at the throat (M = 1) of the de Lavel nozzle.'
+        state6_description = 'state 6 is the test gas condition at the throat (M = 1) of the de Laval nozzle.'
         print state6_description
         txt_output.write(state6_description + '\n')
     
@@ -193,18 +193,19 @@
         test_gas_pg_test_section_line = "Any eq test section post shock states (s10e, s10c, s10we) were found using an eq test section state also."
         print test_gas_pg_test_section_line
         txt_output.write(test_gas_pg_test_section_line + '\n')
-    
-    if cfg['custom_accelerator_gas']:
-        if cfg['solver'] == 'eq':
-            accelerator_gas_used = 'Custom Accelerator gas (state 5) was used (gamma = {0}, R = {1}, {2} by {3}).'.format(states['s5'].gam,states['s5'].R,
-                                                                                                                          states['s5'].reactants, states['s5'].outputUnits)
-        elif cfg['solver'] == 'pg' or cfg['solver'] == 'pg-eq':
-            accelerator_gas_used = 'Custom Accelerator gas (state 5) was used (gamma = {0}, R = {1}).'.format(states['s5'].gam,states['s5'].R)
-    else:
-        accelerator_gas_used = "Accelerator gas (state 5) is Air."
+
+    if cfg['tunnel_mode'] == 'expansion-tube':
+        if cfg['custom_accelerator_gas']:
+            if cfg['solver'] == 'eq':
+                accelerator_gas_used = 'Custom Accelerator gas (state 5) was used (gamma = {0}, R = {1}, {2} by {3}).'.format(states['s5'].gam,states['s5'].R,
+                                                                                                                              states['s5'].reactants, states['s5'].outputUnits)
+            elif cfg['solver'] == 'pg' or cfg['solver'] == 'pg-eq':
+                accelerator_gas_used = 'Custom Accelerator gas (state 5) was used (gamma = {0}, R = {1}).'.format(states['s5'].gam,states['s5'].R)
+        else:
+            accelerator_gas_used = "Accelerator gas (state 5) is Air."
         
-    print accelerator_gas_used
-    txt_output.write(accelerator_gas_used + '\n')
+        print accelerator_gas_used
+        txt_output.write(accelerator_gas_used + '\n')
             
     if cfg['shock_switch']:
         shock_warning_1 = "NOTE: a reflected shock was done into the shock tube."