changeset 2603:4f05e8b9b7bd

app/pitot: added new driver condition to PITOT for NUS project
author Chris James <c.james4@uq.edu.au>
date Sun, 22 Nov 2020 23:17:38 +1000
parents a639cb9fc338
children 644d78b7b8a5
files app/pitot/pitot.py app/pitot/pitot_input_utils.py
diffstat 2 files changed, 24 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/app/pitot/pitot.py	Sun Nov 22 09:27:34 2020 +1000
+++ b/app/pitot/pitot.py	Sun Nov 22 23:17:38 2020 +1000
@@ -315,7 +315,7 @@
 from pitot_output_utils import *
 from pitot_area_ratio_check import *
 
-VERSION_STRING = "20-Nov-2020"
+VERSION_STRING = "22-Nov-2020"
 
 DEBUG_PITOT = False
 
--- a/app/pitot/pitot_input_utils.py	Sun Nov 22 09:27:34 2020 +1000
+++ b/app/pitot/pitot_input_utils.py	Sun Nov 22 23:17:38 2020 +1000
@@ -1020,6 +1020,8 @@
     # 1 as if one tried it with the piston it would still be very close to the normal
     # 80%He value, and the cold driver forces these values to 1 anyway...
     #31/05/19 - CMJ
+    # I did the same as above when I added an N2 driver for NUS too
+    # 22/11/20 - CMJ
 
     primary_driver_x2 = {'He:1.0':[Gas({'He':1.0},inputUnits='moles', outputUnits='moles', with_ions = True),2.15],
                         'He:0.98,Ar:0.02-off-design':[Gas({'He':0.98,'Ar':0.02},inputUnits='moles',
@@ -1036,6 +1038,9 @@
                                                  outputUnits='moles'),1.845],
                         'He:0.78,Ar:0.22': [Gas({'He': 0.78, 'Ar': 0.22}, inputUnits='moles',
                                                  outputUnits='moles'), 1],
+                        'N2:1.0': [Gas({'N2':1.0}, inputUnits='moles',
+                                                   outputUnits='moles'), 1],
+
                         }
                         
     primary_driver_x3 = {'He:1.0':[Gas({'He':1.0},inputUnits='moles', outputUnits='moles'),2.23],
@@ -1242,7 +1247,7 @@
             M['s3s']=1.0
             cfg['M_throat'] = M['s3s']
             print "NOTE: This driver selection ('{0}') is a perfect gas driver.".format(cfg['piston'])
-        elif cfg['piston'] in ['cold-driver-6.5MPa','cold-driver-6.5MPa']:
+        elif cfg['piston'] in ['cold-driver-6.5MPa']:
             # This is based on Matt Thompson's NUS driver 80%He/20%Ar
             # we need to keep this as a perfect gas driver to make the expansion work,
             # CEA won't go down that low in temperature
@@ -1258,6 +1263,23 @@
             M['s3s']=1.0
             cfg['M_throat'] = M['s3s']
             print "NOTE: This driver selection ('{0}') is a perfect gas driver.".format(cfg['piston'])
+        elif cfg['piston'] in ['cold-driver-4.4MPa']:
+            # This is based on Matt Thompson's N2 NUS driver
+            # we need to keep this as a perfect gas driver to make the expansion work,
+            # probably, so I kept it that way...
+            # CEA won't go down that low in temperature
+            states['s4']=primary_driver_x2[cfg['driver_gas']][0].clone()
+            cfg['p4'] = 4.4e6; cfg['T4'] = 298.0 # Pa, K
+            states['s4'].set_pT(cfg['p4'],cfg['T4'])
+            states['s4'].no_ions = True
+            states['s4']=pg.Gas(Mmass=states['s4'].Mmass,
+                                gamma=states['s4'].gam, name='s4')
+            states['s4'].set_pT(cfg['p4'],cfg['T4'])
+            V['s4']=0.0
+            M['s4']=0.0
+            M['s3s']=1.0
+            cfg['M_throat'] = M['s3s']
+            print "NOTE: This driver selection ('{0}') is a perfect gas driver.".format(cfg['piston'])
 
     elif cfg['facility'] in ['x3','x3r']:
         states['s4']=primary_driver_x3[cfg['driver_gas']][0].clone()