Mercurial > hg > cfcfd3
changeset 2573:93f16274b1e9
app/pitot: fixed bug stopping eq wedge calculation working
I had to do some funny business in the past to get everything working
when we'd done a frozen unsteady expansion or nozzle expansion, but it
turns out that I'd broken the eq wedge calc in the process, for normal cases
fixed now
author | Chris James <c.james4@uq.edu.au> |
---|---|
date | Tue, 05 Jun 2018 11:12:57 +1000 |
parents | 416c9080bfb5 |
children | 776854027e66 |
files | app/pitot/pitot.py app/pitot/pitot_flow_functions.py |
diffstat | 2 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/app/pitot/pitot.py Fri May 11 19:10:13 2018 +1000 +++ b/app/pitot/pitot.py Tue Jun 05 11:12:57 2018 +1000 @@ -314,7 +314,7 @@ from pitot_output_utils import * from pitot_area_ratio_check import * -VERSION_STRING = "24-Apr-2018" +VERSION_STRING = "5-Jun-2018" DEBUG_PITOT = False
--- a/app/pitot/pitot_flow_functions.py Fri May 11 19:10:13 2018 +1000 +++ b/app/pitot/pitot_flow_functions.py Tue Jun 05 11:12:57 2018 +1000 @@ -2107,7 +2107,11 @@ try: if isinstance(states[cfg['test_section_state']], Gas): # if it is an eq gas object, just do what we would normally do... - states['s10we'] = states[cfg['test_section_state']].clone() + # make a separate test section state here as we need that for other cases, such as when we have + # done calculations with some frozen states + test_section_state = states[cfg['test_section_state']].clone() + test_section_state.set_pT(states[cfg['test_section_state']].p, states[cfg['test_section_state']].T) + states['s10we'] = test_section_state.clone() states['s10we'].with_ions = True states['s10we'].set_pT(states[cfg['test_section_state']].p, states[cfg['test_section_state']].T) else: @@ -2129,9 +2133,12 @@ print "Failed to clone test section gas state." print "Trying again with ions turned off." states[cfg['test_section_state']].with_ions = False + test_section_state = states[cfg['test_section_state']].clone() + test_section_state.set_pT(states[cfg['test_section_state']].p, states[cfg['test_section_state']].T) try: - states['s10we'] = states[cfg['test_section_state']].clone() + states['s10we'] = test_section_state.clone() states[cfg['test_section_state']].with_ions = True + test_section_state.with_ions = True states['s10we'].with_ions = True print "Managed to clone test section state with ions turned off." except Exception as e: