Mercurial > hg > cfcfd3
changeset 2580:0088711aecbf
app/pitot: added Matt's cold driver conditions to PITOT
finally got around to hardcoding Matt's 4.2 MPa and 6 MPa cold driver
conditions into PITOT. Also added richard's 22% argon driver gas condition
to PITOT for use with the cold driver too.
author | Chris James <c.james4@uq.edu.au> |
---|---|
date | Fri, 31 May 2019 12:21:10 +1000 |
parents | e962723600a6 |
children | 97dba0f60c6d |
files | app/pitot/pitot.py app/pitot/pitot_input_utils.py |
diffstat | 2 files changed, 50 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/app/pitot/pitot.py Sun May 26 14:43:23 2019 +1000 +++ b/app/pitot/pitot.py Fri May 31 12:21:10 2019 +1000 @@ -315,7 +315,7 @@ from pitot_output_utils import * from pitot_area_ratio_check import * -VERSION_STRING = "26-May-2019" +VERSION_STRING = "31-May-2019" DEBUG_PITOT = False
--- a/app/pitot/pitot_input_utils.py Sun May 26 14:43:23 2019 +1000 +++ b/app/pitot/pitot_input_utils.py Fri May 31 12:21:10 2019 +1000 @@ -1004,6 +1004,11 @@ #unsteady expansion, this was based on calcs done by RGM # added 'He:0.95,Ar:0.05' for X2 on the 13/08/16 - CMJ + # when I added the 78% He condition below (which is mainly for the cold driver + # condition which Richard wanted for NUS, I kept the orifice contraction value to + # 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 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', @@ -1017,7 +1022,9 @@ 'He:0.825,Ar:0.175':[Gas({'He':0.825,'Ar':0.175},inputUnits='moles', outputUnits='moles'),1.256], 'He:0.95,Ar:0.05':[Gas({'He':0.95,'Ar':0.05},inputUnits='moles', - outputUnits='moles'),1.845] + outputUnits='moles'),1.845], + 'He:0.78,Ar:0.22': [Gas({'He': 0.78, 'Ar': 0.22}, inputUnits='moles', + outputUnits='moles'), 1], } primary_driver_x3 = {'He:1.0':[Gas({'He':1.0},inputUnits='moles', outputUnits='moles'),2.23], @@ -1154,7 +1161,7 @@ M['s4']=0.0 M['s3s']=primary_driver_x2[cfg['driver_gas']][1] cfg['M_throat'] = M['s3s'] - elif cfg['piston'] == 'Sangdi-1.8MPa' or cfg['piston'] == 'sangdi-1.8MPa': + elif cfg['piston'] in ['Sangdi-1.8MPa', 'sangdi-1.8MPa', 'cold-driver-1.8MPa']: # This is Sangdi's cold driver with a burst pressure of roughly # 1.8 MPa absolute. # we need to keep this as a perfect gas driver to make the expansion work, @@ -1162,6 +1169,40 @@ states['s4']=primary_driver_x2[cfg['driver_gas']][0].clone() cfg['p4'] = 1.8e6; cfg['T4'] = 169.0 # Pa, K states['s4'].set_pT(cfg['p4'],cfg['T4']) + states['s4'].with_ions = False + 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['piston'] in ['Sangdi-2.2MPa', 'sangdi-2.2MPa', 'cold-driver-2.2MPa']: + # This is Sangdi's cold driver with a burst pressure of roughly + # 2.2 MPa absolute. + # we need to keep this as a perfect gas driver to make the expansion work, + # CEA won't go down that low in temperature + states['s4']=primary_driver_x2[cfg['driver_gas']][0].clone() + cfg['p4'] = 2.2e6; cfg['T4'] = 169.0 # Pa, K + states['s4'].set_pT(cfg['p4'],cfg['T4']) + states['s4'].with_ions = False + 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['piston'] in ['cold-driver-4.2MPa']: + # This is Matt Thompson's first iteration cold driver + # with a diaphragm rupture pressure of 4.2 MPa + # we need to keep this as a perfect gas driver to make the expansion work, + # CEA won't go down that low in temperature + states['s4']=primary_driver_x2[cfg['driver_gas']][0].clone() + cfg['p4'] = 4.2e6; 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') @@ -1170,14 +1211,14 @@ M['s4']=0.0 M['s3s']=1.0 cfg['M_throat'] = M['s3s'] - print "NOTE: This driver selection ('Sangdi-1.8MPa') is a perfect gas driver." - elif cfg['piston'] == 'Sangdi-2.2MPa' or cfg['piston'] == 'sangdi-2.2MPa': - # This is Sangdi's cold driver with a burst pressure of roughly - # 1.8 MPa absolute. + print "NOTE: This driver selection ('{0}') is a perfect gas driver.".format(cfg['piston']) + elif cfg['piston'] in ['cold-driver-6MPa','cold-driver-6.0MPa']: + # This is Matt Thompson's planned cold driver + # with a diaphragm rupture pressure of 6.0 MPa # we need to keep this as a perfect gas driver to make the expansion work, # CEA won't go down that low in temperature states['s4']=primary_driver_x2[cfg['driver_gas']][0].clone() - cfg['p4'] = 2.2e6; cfg['T4'] = 169.0 # Pa, K + cfg['p4'] = 6.0e6; 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, @@ -1187,7 +1228,7 @@ M['s4']=0.0 M['s3s']=1.0 cfg['M_throat'] = M['s3s'] - print "NOTE: This driver selection ('Sangdi-2.2MPa') is a perfect gas driver." + print "NOTE: This driver selection ('{0}') is a perfect gas driver.".format(cfg['piston']) elif cfg['facility'] == 'x3': states['s4']=primary_driver_x3[cfg['driver_gas']][0].clone()