Skip to content

Commit

Permalink
update friction headloss multiplication factor as in #119
Browse files Browse the repository at this point in the history
  • Loading branch information
yalinli2 committed Dec 27, 2023
1 parent aa2d28c commit 49e441e
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions qsdsan/sanunits/_pumping.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -423,13 +424,15 @@ 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
OD_d, t_d, ID_d = select_pipe(Q_cfs, v)

# 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
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 49e441e

Please sign in to comment.