@@ -1554,14 +1554,19 @@ def Calculate(self, model: Model) -> None:
15541554 # negative pumping power values become zero (b/c we are not generating electricity)
15551555 self .PumpingPower .value = [0. if x < 0. else x for x in self .PumpingPower .value ]
15561556
1557- # Injection/production well casing ID have same value as inputs but exist as separate output parameters due to
1558- # having a different display name.
1559- self ._set_output_param_from_input_param (self .injwelldiam , self .injection_well_casing_inner_diameter )
1560- self ._set_output_param_from_input_param (self .prodwelldiam , self .production_well_casing_inner_diameter )
1557+ self ._sync_output_params_from_input_params ()
15611558
15621559 model .logger .info (f'complete { self .__class__ .__name__ } : { __name__ } ' )
15631560
1564- # noinspection PyMethodMayBeStatic
1565- def _set_output_param_from_input_param (self , input_param : Parameter , output_param : OutputParameter ) -> None :
1566- output_param .value = input_param .value
1567- output_param .CurrentUnits = input_param .CurrentUnits
1561+ def _sync_output_params_from_input_params (self ) -> None :
1562+ """
1563+ Handles setting output parameters whose values are based on 1:1 corresponding input parameters.
1564+ """
1565+
1566+ def _set_output_param_from_input_param (input_param : Parameter , output_param : OutputParameter ) -> None :
1567+ output_param .value = input_param .quantity ().to (output_param .CurrentUnits ).magnitude
1568+
1569+ # Injection/production well casing ID have same value as inputs but exist as separate output parameters due to
1570+ # having a different display name.
1571+ _set_output_param_from_input_param (self .injwelldiam , self .injection_well_casing_inner_diameter )
1572+ _set_output_param_from_input_param (self .prodwelldiam , self .production_well_casing_inner_diameter )
0 commit comments