From 49e441e2189749fc1659561447f5e9a6d7942356 Mon Sep 17 00:00:00 2001 From: Yalin Date: Wed, 27 Dec 2023 17:18:42 -0500 Subject: [PATCH] update friction headloss multiplication factor as in #119 --- qsdsan/sanunits/_pumping.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/qsdsan/sanunits/_pumping.py b/qsdsan/sanunits/_pumping.py index 083d3280..9d5e74dd 100644 --- a/qsdsan/sanunits/_pumping.py +++ b/qsdsan/sanunits/_pumping.py @@ -266,6 +266,7 @@ class WWTpump(SanUnit): _H_df = 0. # discharge friction _v = 3 # fluid velocity, [ft/s] _C = 110 # Hazen-Williams coefficient for stainless steel (SS) + _headloss_multiplication_factor = 1 # Pump SS (for pumps within 300-1000 gpm) # https://www.godwinpumps.com/images/uploads/ProductCatalog_Nov_2011_spread2.pdf @@ -423,6 +424,7 @@ def _design_generic(self, Q_mgd, N_pump=None, L_s=0., L_d=0., H_ts=0., H_p=0.): # Suction friction head, [ft] self._H_sf = 3.02 * L_s * (v**1.85) * (C**(-1.85)) * ((ID_s/12)**(-1.17)) + self._H_sf *= self.headloss_multiplication_factor ### Discharge side ### # Discharge pipe (permeate collector) dimensions @@ -430,6 +432,7 @@ def _design_generic(self, Q_mgd, N_pump=None, L_s=0., L_d=0., H_ts=0., H_p=0.): # Discharge friction head, [ft] self._H_df = 3.02 * L_d * (v**1.85) * (C**(-1.85)) * ((ID_d/12)**(-1.17)) + self._H_df *= self.headloss_multiplication_factor ### Material usage ### # Pipe SS, assume stainless steel, density = 0.29 lbs/in3 @@ -860,6 +863,23 @@ def C(self): @C.setter def C(self, i): self._C = i + + @property + def headloss_multiplication_factor(self): + ''' + [float] + Factor to consider additional friction headloss (e.g., for sludge), + default to be 1 and should be no less than 1. + + See also https://github.com/QSD-Group/QSDsan/issues/119. + ''' + return self._headloss_multiplication_factor + @headloss_multiplication_factor.setter + def headloss_multiplication_factor(self, i): + if i < 1: + raise ValueError('`headloss_multiplication_factor` should be no less than 1, ' + f'the provided value of {i} is not valid.') + self._headloss_multiplication_factor = i @property def SS_per_pump(self):