From 2431c5c60ea66c3aac325c8915db34e9d7737f7c Mon Sep 17 00:00:00 2001 From: vaishnavi-vinodh <63830657+vaishnavi-vinodh@users.noreply.github.com> Date: Fri, 7 May 2021 23:33:00 -0400 Subject: [PATCH] Update cdc.py Updated cdc.py Deleting deprecated methods in cdc.py(_alum_nu, _pacl_nu, _coag_nu, coag_q_max_est) --- aguaclara/design/cdc.py | 64 ++--------------------------------------- 1 file changed, 3 insertions(+), 61 deletions(-) diff --git a/aguaclara/design/cdc.py b/aguaclara/design/cdc.py index a8c60638..c4888837 100644 --- a/aguaclara/design/cdc.py +++ b/aguaclara/design/cdc.py @@ -1,7 +1,6 @@ """The chemical dose controller (CDC) of an AguaClara plant uses the linear relation between flow rate and entrance tank water level (set by the LFOM) to dose the correct amount of coagulant and chlorine into the entrance tank. - Example: >>> from aguaclara.design.cdc import * >>> cdc = CDC(q = 20 * u.L/u.s, coag_type = 'pacl') @@ -18,7 +17,6 @@ class CDC(Component): """Design an AguaClara plant's chemical dose controller. - Design Inputs: - ``q (float * u.L / u.s)``: Flow rate (required) """ @@ -30,7 +28,6 @@ def __init__(self, **kwargs): self.coag_dose_conc_max=100 * u.mg / u.L self.coag_stock_conc=150 * u.g / u.L - self.coag_stock_conc_est=150 * u.g / u.L # Deprecated since January 2021 self.coag_stock_min_est_time=1 * u.day self.chem_tank_vol_supplier=[208.198, 450, 600, 750, 1100, 2500] * u.L self.chem_tank_dimensions_supplier=[ @@ -52,7 +49,6 @@ def __init__(self, **kwargs): def alum_nu(self, coag_conc): """ Return the dynamic viscosity of water at a given temperature. - If given units, the function will automatically convert to Kelvin. If not given units, the function will assume Kelvin. This function assumes that the temperature dependence can be explained @@ -63,25 +59,13 @@ def alum_nu(self, coag_conc): (1 + (4.255 * 10 ** -6) * coag_conc.magnitude ** 2.289) * \ pc.viscosity_kinematic_water(self.temp) return alum_nu - - def _alum_nu(self, coag_conc): - """ - .. deprecated:: - `_alum_nu` is deprecated; use `alum_nu` instead. - """ - # Deprecated since January 2021 - warnings.warn('_alum_nu is deprecated; use alum_nu instead.', - UserWarning) - - return self.alum_nu(coag_conc) - + def pacl_nu(self, coag_conc): """Return the dynamic viscosity of water at a given temperature. - If given units, the function will automatically convert to Kelvin. If not given units, the function will assume Kelvin. This function assumes that the temperature dependence can be explained - based on the effect on water and that there is no confounding effect + based on the effect on water and that there is no confounding effect from the coagulant. """ pacl_nu = \ @@ -89,31 +73,8 @@ def pacl_nu(self, coag_conc): pc.viscosity_kinematic_water(self.temp) return pacl_nu - def _pacl_nu(self, coag_conc): - """ - .. deprecated:: - `_pacl_nu` is deprecated; use `pacl_nu` instead. - """ - # Deprecated since January 2021 - warnings.warn('_pacl_nu is deprecated; use pacl_nu instead.', - UserWarning) - - return self.pacl_nu(coag_conc) - - def _coag_nu(self, coag_conc, coag_type): - """ - .. deprecated:: - `_coag_nu` is deprecated; use `coag_nu` instead. - """ - # Deprecated since January 2021 - warnings.warn('_coag_nu is deprecated; use coag_nu instead.', - UserWarning) - - return self.coag_nu(coag_conc, coag_type) - def coag_nu(self, coag_conc, coag_type): """Return the dynamic viscosity of water at a given temperature. - If given units, the function will automatically convert to Kelvin. If not given units, the function will assume Kelvin. """ @@ -123,25 +84,6 @@ def coag_nu(self, coag_conc, coag_type): coag_nu = self.pacl_nu(coag_conc) return coag_nu - @property - def coag_q_max_est(self): - """The estimated maximum permissible flow rate of the coagulant stock, - based on a whole number of sacks of coagulant used. - - .. deprecated:: - `coag_q_max_est` is deprecated; use `coag_q_max` instead, which is - based on the exact user-defined coagulant stock concentration, - `coag_stock_conc`. - """ - # Deprecated since January 2021 - warnings.warn('coag_q_max_est is deprecated; use coag_q_max instead,\ - which is based on the exact user-defined coagulant stock \ - concentration, coag_stock_conc.', UserWarning) - - coag_q_max_est = self.q * self.coag_dose_conc_max / \ - self.coag_stock_conc_est - return coag_q_max_est - @property def coag_q_max(self): """The maximum permissible flow rate of the coagulant stock.""" @@ -207,7 +149,7 @@ def coag_tubes_active_n(self): @property def coag_tubes_n(self): - """The number of coagulant tubes in use, plus a spare tube for + """The number of coagulant tubes in use, plus a spare tube for maintenance. """ coag_tubes_n = self.coag_tubes_active_n + 1