@@ -163,7 +163,7 @@ def evaluate_given_constraints(
163163 temperature_kelvin = self .stages [0 ].inlet_temperature_kelvin ,
164164 standard_rate_m3_per_day = constraints .rate ,
165165 )
166- if inlet_stream .mass_rate > 0 :
166+ if inlet_stream .mass_rate_kg_per_h > 0 :
167167 compressor_stages_result = []
168168 for stage in self .stages :
169169 compressor_stage_result = self .calculate_compressor_stage_work_given_outlet_pressure (
@@ -206,7 +206,7 @@ def calculate_compressor_stage_work_given_outlet_pressure(
206206 )
207207
208208 # To avoid passing empty arrays down to the enthalpy calculation.
209- if inlet_stream .mass_rate > 0 :
209+ if inlet_stream .mass_rate_kg_per_h > 0 :
210210 polytropic_enthalpy_change_joule_per_kg , polytropic_efficiency = calculate_enthalpy_change_head_iteration (
211211 inlet_streams = inlet_stream ,
212212 outlet_pressure = outlet_pressure ,
@@ -234,7 +234,7 @@ def calculate_compressor_stage_work_given_outlet_pressure(
234234 else :
235235 polytropic_enthalpy_change_to_use_joule_per_kg = polytropic_enthalpy_change_joule_per_kg
236236 asv_corrected_actual_rate_m3_per_hour = inlet_stream .volumetric_rate
237- mass_rate_to_use_kg_per_hour = inlet_stream .mass_rate
237+ mass_rate_to_use_kg_per_hour = inlet_stream .mass_rate_kg_per_h
238238 rate_has_recirc = False
239239 pressure_is_choked = False
240240 rate_exceeds_maximum = False
@@ -246,7 +246,7 @@ def calculate_compressor_stage_work_given_outlet_pressure(
246246 polytropic_enthalpy_change_joule_per_kg = 0.0
247247 polytropic_efficiency = np .nan
248248 asv_corrected_actual_rate_m3_per_hour = inlet_stream .volumetric_rate
249- mass_rate_to_use_kg_per_hour = inlet_stream .mass_rate
249+ mass_rate_to_use_kg_per_hour = inlet_stream .mass_rate_kg_per_h
250250 rate_has_recirc = False
251251 pressure_is_choked = False
252252 rate_exceeds_maximum = False
@@ -255,7 +255,7 @@ def calculate_compressor_stage_work_given_outlet_pressure(
255255
256256 outlet_stream = inlet_stream .create_stream_with_new_pressure_and_enthalpy_change (
257257 pressure_bara = outlet_pressure ,
258- enthalpy_change = polytropic_enthalpy_change_to_use_joule_per_kg , # type: ignore[arg-type]
258+ enthalpy_change_joule_per_kg = polytropic_enthalpy_change_to_use_joule_per_kg , # type: ignore[arg-type]
259259 )
260260
261261 power_mw = (
@@ -290,11 +290,11 @@ def calculate_compressor_stage_work_given_outlet_pressure(
290290 outlet_stream = outlet_stream ,
291291 inlet_stream_including_asv = FluidStream (
292292 thermo_system = inlet_stream .thermo_system ,
293- mass_rate = mass_rate_to_use_kg_per_hour ,
293+ mass_rate_kg_per_h = mass_rate_to_use_kg_per_hour ,
294294 ),
295295 outlet_stream_including_asv = FluidStream (
296296 thermo_system = outlet_stream .thermo_system ,
297- mass_rate = mass_rate_to_use_kg_per_hour ,
297+ mass_rate_kg_per_h = mass_rate_to_use_kg_per_hour ,
298298 ),
299299 power_megawatt = power_mw , # type: ignore[arg-type]
300300 chart_area_flag = chart_area_flag ,
@@ -460,7 +460,7 @@ def calculate_maximum_rate_for_stage(
460460 enthalpy_change_joule_per_kg = polytropic_head / polytropic_efficiency
461461
462462 outlet_stream = inlet_stream .create_stream_with_new_pressure_and_enthalpy_change (
463- pressure_bara = outlet_pressure , enthalpy_change = enthalpy_change_joule_per_kg
463+ pressure_bara = outlet_pressure , enthalpy_change_joule_per_kg = enthalpy_change_joule_per_kg
464464 )
465465
466466 # Set convergence criterion on actual volume rate
0 commit comments