@@ -140,7 +140,8 @@ def calculate_total_pressure_drop(self, **kwargs) -> float:
140140 self .calculate_pressure_drop_lateral (** kwargs ) + \
141141 self .calculate_pressure_drop_main (** kwargs )
142142
143- def create_pressure_drop_curve (self , range : float = 2 , datapoints : int = 30 , ** kwargs ):
143+ def create_pressure_drop_curve (self , range : float = 2 , datapoints : int = 30 , flow_rates : np .ndarray = None ,
144+ ** kwargs ):
144145 """
145146 This function calculates the total pressure drop for different flow rates.
146147
@@ -150,6 +151,8 @@ def create_pressure_drop_curve(self, range: float = 2, datapoints: int = 30, **k
150151 Multiplier of the flow rate for the range of the data.
151152 datapoints : int
152153 Number of datapoints.
154+ flow_rates : np.ndarray
155+ Give the flow range directly.
153156
154157 Returns
155158 -------
@@ -159,9 +162,11 @@ def create_pressure_drop_curve(self, range: float = 2, datapoints: int = 30, **k
159162 # backup
160163 flow_backup = copy .copy (self .flow_data )
161164
162- flow_rates = np .linspace (0 , range * self .flow_data .vfr_borehole (fluid_data = self .fluid_data ,
163- nb_of_boreholes = self .nb_of_boreholes , ** kwargs ),
164- datapoints )
165+ if flow_rates is None :
166+ flow_rates = np .linspace (0 , range * self .flow_data .vfr_borehole (
167+ fluid_data = self .fluid_data ,
168+ nb_of_boreholes = self .nb_of_boreholes ,
169+ ** kwargs ), datapoints )
165170 pressure_drops_pipe = np .zeros (flow_rates .shape )
166171 pressure_drops_lateral = np .zeros (flow_rates .shape )
167172 pressure_drops_main = np .zeros (flow_rates .shape )
0 commit comments