Mercurial > hg > cfcfd3
changeset 1572:0493fcf854fb
app/pitot: made a few small changes to get rst mode working again
(I probably broke it doing something else.)
author | Chris James <c.james4@uq.edu.au> |
---|---|
date | Wed, 30 Apr 2014 17:07:50 +1000 |
parents | 94b98108abe7 |
children | 0c87690f939f |
files | app/pitot/pitot.py app/pitot/pitot_flow_functions.py app/pitot/pitot_input_utils.py |
diffstat | 3 files changed, 14 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/app/pitot/pitot.py Wed Apr 30 17:05:52 2014 +1000 +++ b/app/pitot/pitot.py Wed Apr 30 17:07:50 2014 +1000 @@ -170,6 +170,8 @@ 07-Apr-2014: I added pitot_multiple.py that makes it easy to run a series of similar pitot test cases in one go. Saves me doing so much stuff manually. + 30-Apr-2014: Fixed up some issues with the reflected shock mode. + Also made pitot work with no throad by setting M_throat = 0.0. """ #--------------------- intro stuff -------------------------------------- @@ -197,7 +199,7 @@ from pitot_area_ratio_check import * -VERSION_STRING = "07-Apr-2014" +VERSION_STRING = "30-Apr-2014" DEBUG_PITOT = False
--- a/app/pitot/pitot_flow_functions.py Wed Apr 30 17:05:52 2014 +1000 +++ b/app/pitot/pitot_flow_functions.py Wed Apr 30 17:07:50 2014 +1000 @@ -380,6 +380,12 @@ else: cfg['Vs1_guess_1'] = 6000.0; cfg['Vs1_guess_2'] = 8000.0 cfg['Vs1'] = secant(error_in_velocity_shock_tube_expansion_shock_speed_iterator, cfg['Vs1_guess_1'], cfg['Vs1_guess_2'], tol=1.0e-3,limits=[1000.0,1000000.0]) + elif cfg['tunnel_mode'] == 'reflected-shock-tunnel': #start with a much lower speed guess in nr-shock-tunnel mode + if cfg['secondary']: + cfg['Vs1_guess_1'] = cfg['Vsd']+2000.0; cfg['Vs1_guess_2'] = cfg['Vsd']+3000.0 + else: + cfg['Vs1_guess_1'] = 1000.0; cfg['Vs1_guess_2'] = 2000.0 + cfg['Vs1'] = secant(error_in_velocity_shock_tube_expansion_shock_speed_iterator, cfg['Vs1_guess_1'], cfg['Vs1_guess_2'], tol=1.0e-3,limits=[1000.0,1000000.0]) if PRINT_STATUS: print "From secant solve: Vs1 = {0} m/s".format(cfg['Vs1']) #start using Vs1 now, compute states 1,2 and 3 using the correct Vs1 if PRINT_STATUS: print "Now that Vs1 is known, finding conditions at states 2 and 3."
--- a/app/pitot/pitot_input_utils.py Wed Apr 30 17:05:52 2014 +1000 +++ b/app/pitot/pitot_input_utils.py Wed Apr 30 17:07:50 2014 +1000 @@ -527,7 +527,11 @@ #state3s is driver gas after steady expansion at the throat between #the primary driver and the next section - (states['s3s'], V['s3s']) = expand_from_stagnation(1.0/(p0_p(M['s3s'],states['s4'].gam)),states['s4']) + if cfg['M_throat'] > 0.0: + (states['s3s'], V['s3s']) = expand_from_stagnation(1.0/(p0_p(M['s3s'],states['s4'].gam)),states['s4']) + else: + states['s3s'] = states['s4'].clone() + V['s3s'] = 0.0 #build the gas objects for all the other sections based on knowledge of what is what