Mercurial > hg > cfcfd3
changeset 2589:c478daf16dcb
app/pitot: fixed old pitot_condition_builder.py bug
it related to the use of the store_electron_concentration flag,
as normally I use store_mole_fractions now, but needed the other
one as I was using co2 and not air, for once
it tried to normalise tehse values when they should have been ignored
fixed now
author | Chris James (c.james4@uq.edu.au) |
---|---|
date | Sat, 29 Jun 2019 18:12:22 +1000 |
parents | 23f78eeddb57 |
children | 2dbf253cd13f |
files | app/pitot/pitot_condition_builder.py |
diffstat | 1 files changed, 22 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/app/pitot/pitot_condition_builder.py Sat Jun 29 15:40:09 2019 +1000 +++ b/app/pitot/pitot_condition_builder.py Sat Jun 29 18:12:22 2019 +1000 @@ -276,7 +276,12 @@ shock_over_model_list = ['p10f','T10f','rho10f','V10f','p10e','T10e','rho10e','V10e'] full_list += shock_over_model_list if cfg['store_electron_concentration']: - store_electron_concentration_list = ['s2ec','s7ec','s8ec','s10ec'] + store_electron_concentration_list = ['s2ec','s7ec'] + if cfg['nozzle']: + store_electron_concentration_list += ['s8ec'] + if cfg['shock_over_model']: + store_electron_concentration_list += ['s10ec'] + full_list += store_electron_concentration_list if cfg['calculate_scaling_information']: @@ -775,7 +780,16 @@ normalise_exceptions += state8_list if cfg['shock_over_model']: normalise_exceptions += state10e_list - + + if 'store_electron_concentration' in cfg and cfg['store_electron_concentration']: + store_electron_concentration_list = ['s2ec', 's7ec'] + if cfg['nozzle']: + store_electron_concentration_list += ['s8ec'] + if cfg['shock_over_model']: + store_electron_concentration_list += ['s10ec'] + + normalise_exceptions += store_electron_concentration_list + if extra_normalise_exceptions: normalise_exceptions += extra_normalise_exceptions @@ -1300,12 +1314,15 @@ .format(variable, min_value, max_value) elif 'Re' in variable: summary_line = "Variable {0} varies from {1:.2f} - {2:.2f}."\ - .format(variable, min_value, max_value) + .format(variable, min_value, max_value) elif variable == 'basic_test_time': summary_line = "Variable {0} varies from {1:.2f} - {2:.2f} microseconds."\ - .format(variable, min_value, max_value) + .format(variable, min_value, max_value) + elif '%' in variable: + summary_line = "Variable {0} varies from {1:.6f} - {2:.6f} K." \ + .format(variable, min_value, max_value) else: - summary_line = "Variable {0} varies from {1:.1f} - {2:.1f}."\ + summary_line = "Variable {0} varies from {1:.3f} - {2:.3f}."\ .format(variable, min_value, max_value) print summary_line condition_builder_summary_file.write(summary_line + '\n')