()
| 8 | |
| 9 | |
| 10 | def get_speed_data(): |
| 11 | |
| 12 | H_TP = 350e3 |
| 13 | P_TP = 400e3 |
| 14 | |
| 15 | H_SP = 250e3 |
| 16 | P_SP = 1000e3 |
| 17 | |
| 18 | P_PT = 101325 |
| 19 | T_PT = 300 |
| 20 | |
| 21 | fluid = 'R245fa' |
| 22 | number = 50000 |
| 23 | repeat = 3 |
| 24 | version = CoolProp.__version__ |
| 25 | |
| 26 | if int(CoolProp.__version__[0]) > 4: |
| 27 | loaded = 5 |
| 28 | print("Loaded CoolProp version 5") |
| 29 | from CoolProp.CoolProp import generate_update_pair, get_parameter_index, set_debug_level |
| 30 | TTSE = CoolProp.AbstractState('TTSE&HEOS', fluid) |
| 31 | BICUBIC = CoolProp.AbstractState('BICUBIC&HEOS', fluid) |
| 32 | HEOS = CoolProp.AbstractState('HEOS', fluid) |
| 33 | |
| 34 | def two_phase_TTSE(): |
| 35 | TTSE.update(CoolProp.HmassP_INPUTS, H_TP, P_TP) |
| 36 | TTSE.rhomolar() |
| 37 | |
| 38 | def single_phase_TTSE(): |
| 39 | TTSE.update(CoolProp.HmassP_INPUTS, H_SP, P_SP) |
| 40 | TTSE.rhomolar() |
| 41 | |
| 42 | def single_phase_pT_TTSE(): |
| 43 | TTSE.update(CoolProp.PT_INPUTS, P_PT, T_PT) |
| 44 | TTSE.rhomolar() |
| 45 | |
| 46 | def two_phase_BICUBIC(): |
| 47 | BICUBIC.update(CoolProp.HmassP_INPUTS, H_TP, P_TP) |
| 48 | BICUBIC.rhomolar() |
| 49 | |
| 50 | def single_phase_BICUBIC(): |
| 51 | BICUBIC.update(CoolProp.HmassP_INPUTS, H_SP, P_SP) |
| 52 | BICUBIC.rhomolar() |
| 53 | |
| 54 | def single_phase_pT_BICUBIC(): |
| 55 | BICUBIC.update(CoolProp.PT_INPUTS, P_PT, T_PT) |
| 56 | BICUBIC.rhomolar() |
| 57 | |
| 58 | def two_phase_HEOS(): |
| 59 | HEOS.update(CoolProp.HmassP_INPUTS, H_TP, P_TP) |
| 60 | HEOS.rhomolar() |
| 61 | |
| 62 | def single_phase_HEOS(): |
| 63 | HEOS.update(CoolProp.HmassP_INPUTS, H_SP, P_SP) |
| 64 | HEOS.rhomolar() |
| 65 | |
| 66 | def single_phase_pT_HEOS(): |
| 67 | HEOS.update(CoolProp.PT_INPUTS, P_PT, T_PT) |
no test coverage detected