A derived "pipe" class with its inlet being "None". More...
Public Member Functions | |
def | __init__ (self) |
Special initialization steps for "influent". More... | |
def | assign_initial_guess (self, init_guess_lst) |
Assign the intial guess to the unit before simulation. More... | |
def | is_converged (self, limit=1E-6) |
Return the convergence status of the unit. More... | |
def | add_upstream (self, discharger, branch) |
Add the discharger's branch to inlet. More... | |
def | totalize_inflow (self) |
Combine the individual flows specified in the self._inlet into one. More... | |
def | blend_inlet_comps (self) |
Calculate the flow weighted average model component concentrations. More... | |
def | remove_upstream (self, discharger) |
Remove an existing discharger from inlet. More... | |
def | set_mainstream_flow (self, flow=37800) |
Define the mainstream outlet flow. More... | |
def | set_mainstream_flow_by_upstream (self, f) |
Set whether the mainstream flow = (total inflow - side outflow). More... | |
def | get_main_outflow (self) |
Return the mainstream outlet flow. More... | |
def | set_flow (self, discharger, flow) |
Specify the flow from the discharger. More... | |
def | discharge (self) |
Pass the total flow and blended components to the downstreams. More... | |
def | set_fractions (self) |
Sets fractions for converting WW constituents into model components. More... | |
Public Member Functions inherited from PooPyLab.unit_procs.streams.pipe | |
def | set_downstream_side (self, receiver) |
Define the downstream side outlet's connection. More... | |
def | set_sidestream_flow (self, flow) |
Define the flow rate for the sidestream. More... | |
Public Member Functions inherited from PooPyLab.unit_procs.streams.splitter | |
def | set_flow_data_src (self, branch='Main', flow_ds=flow_data_src.TBD) |
Set the flow data source of the branch specified by the user. More... | |
def | get_flow_data_src (self) |
Return the flow data source tags of all three branches. | |
def | get_type (self) |
Return the type string of the process unit. More... | |
def | has_sidestream (self) |
Return whether the unit has a sidestream. More... | |
def | has_discharger (self) |
Return whether the unit's inlet has been connected. More... | |
def | get_upstream (self) |
Return the _inlet {} of the unit. More... | |
def | update_combined_input (self) |
Update both total inflow and blended concentrations (model components). | |
def | set_downstream_main (self, rcvr) |
Define the main outlet by specifying the receiving process unit. | |
def | main_outlet_connected (self) |
Return whether the mainstream outlet is connected. More... | |
def | get_downstream_main (self) |
Return the process unit connected at the mainstream outlet. More... | |
def | get_main_outlet_concs (self) |
Return a copy of the mainstream outlet concentrations. More... | |
def | side_outlet_connected (self) |
Return True if the main outlet is connected, False if not. More... | |
def | get_downstream_side (self) |
Return the process unit connected to the side outlet. More... | |
def | sidestream_flow_defined (self) |
Return whether the sidestream flow rate has been defined. More... | |
def | get_side_outflow (self) |
Return the sidestream outlet flow rate. More... | |
def | get_side_outlet_concs (self) |
Return a copy of the sidestream outlet concentrations. More... | |
def | get_TSS (self, br='Main') |
Return the Total Suspended Solids of the specified branch. | |
def | get_VSS (self, br='Main') |
Return the Volatile Suspended Solids of the specified branch. | |
def | get_COD (self, br='Main') |
Return the Chemical Oxygen Demand (total) of the specified branch. | |
def | get_sCOD (self, br='Main') |
Return the soluble COD of the specified branch. | |
def | get_pCOD (self, br='Main') |
Return the particultate COD of the specified branch. | |
def | get_TN (self, br='Main') |
Return the total nitrogen of the specified branch. More... | |
def | get_orgN (self, br='Main') |
Return the organic nitrogen of the specified branch. | |
def | get_inorgN (self, br='Main') |
Return the inorganic nitrogen of the specified branch. | |
def | get_pN (self, br='Main') |
Return the particulate nitrogen of the specified branch. | |
def | get_sN (self, br='Main') |
Return the soluble nitrogen of the specified branch. | |
def | set_as_SRT_controller (self, setting=False) |
Set the current splitter as an Solids Retention Time controller. More... | |
def | is_SRT_controller (self) |
Return whether a splitter is an SRT controller. | |
Private Member Functions | |
def | _branch_flow_helper (self) |
Calculate 1 of the 3 branches' flow based on the other 2. More... | |
def | _convert_to_model_comps (self) |
Fractions the wastewater constituents into model components. More... | |
Static Private Attributes | |
int | __id |
A derived "pipe" class with its inlet being "None".
def PooPyLab.unit_procs.streams.influent.__init__ | ( | self | ) |
Special initialization steps for "influent".
1) has no further inlet; 2) has no sidestream outlet; 3) has no further upstream; 4) convergence is irrelevant here; 5) is the source of flow/load to the WWTP.
Reimplemented from PooPyLab.unit_procs.streams.pipe.
|
private |
Calculate 1 of the 3 branches' flow based on the other 2.
For an "influent" unit, the mainstream outflow always equals to its design flow.
Reimplemented from PooPyLab.unit_procs.streams.pipe.
def PooPyLab.unit_procs.streams.influent.assign_initial_guess | ( | self, | |
init_guess_lst | |||
) |
Assign the intial guess to the unit before simulation.
There is no need for assigning any initial guesses to an "influent" unit. This function is by-passed for "influent".
Reimplemented from PooPyLab.unit_procs.streams.splitter.
def PooPyLab.unit_procs.streams.influent.is_converged | ( | self, | |
limit = 1E-6 |
|||
) |
Return the convergence status of the unit.
The "influent" unit gets flows and loads from the user. Convergence is irrelevant here. This function is by-passed for "influent" by setting the _converged to True.
Reimplemented from PooPyLab.unit_procs.streams.splitter.
def PooPyLab.unit_procs.streams.influent.add_upstream | ( | self, | |
discharger, | |||
branch | |||
) |
Add the discharger's branch to inlet.
The "influent" has no further upstream within the context of simulation. This function is by-passed with an ERROR message displayed.
Reimplemented from PooPyLab.unit_procs.streams.splitter.
def PooPyLab.unit_procs.streams.influent.totalize_inflow | ( | self | ) |
Combine the individual flows specified in the self._inlet into one.
For an "influent" unit, there is no further upstream. The total inflow is the design flow.
Reimplemented from PooPyLab.unit_procs.streams.splitter.
def PooPyLab.unit_procs.streams.influent.blend_inlet_comps | ( | self | ) |
Calculate the flow weighted average model component concentrations.
This function is re-implemented for the "influent" who doesn't have further upstream units discharging into it. Rather, this function becomes a wrapper for the _convert_to_model_comps() which fractions the wastewater constituents measured in BOD, TSS, VSS, TKN, NH3-N, etc. into the model components such as substrate COD, slowly biodegradable COD, inert suspended solids, etc.
Reimplemented from PooPyLab.unit_procs.streams.splitter.
def PooPyLab.unit_procs.streams.influent.remove_upstream | ( | self, | |
discharger | |||
) |
Remove an existing discharger from inlet.
This function is bypassed for the "influent" who has no further upstream. An error message displays when called.
Reimplemented from PooPyLab.unit_procs.streams.splitter.
def PooPyLab.unit_procs.streams.influent.set_mainstream_flow | ( | self, | |
flow = 37800 |
|||
) |
Define the mainstream outlet flow.
This function is re-implemented for the "influent" and essentially becomes a wrapper for setting the design flow (m3/d).
flow | design flow of the influent, m3/d |
Reimplemented from PooPyLab.unit_procs.streams.splitter.
def PooPyLab.unit_procs.streams.influent.set_mainstream_flow_by_upstream | ( | self, | |
f | |||
) |
Set whether the mainstream flow = (total inflow - side outflow).
This function is essentially bypassed for the "influent" since the design flow (influent mainstream outflow) is directly set by the user.
Reimplemented from PooPyLab.unit_procs.streams.splitter.
def PooPyLab.unit_procs.streams.influent.get_main_outflow | ( | self | ) |
Return the mainstream outlet flow.
For an "influent", this function will return the design flow.
Reimplemented from PooPyLab.unit_procs.streams.splitter.
def PooPyLab.unit_procs.streams.influent.set_flow | ( | self, | |
discharger, | |||
flow | |||
) |
Specify the flow from the discharger.
This function is bypassed for the "influent".
Reimplemented from PooPyLab.unit_procs.streams.splitter.
def PooPyLab.unit_procs.streams.influent.discharge | ( | self | ) |
Pass the total flow and blended components to the downstreams.
This function is re-implemented for the "influent". An "influent" does not care the changes from the previous round to the current since it is the source for the entire WWTP. Therefore, _prev_mo_comps, _prev_so_comps, _mo_comps, and _so_comps all equal to _in_comps.
Reimplemented from PooPyLab.unit_procs.streams.splitter.
def PooPyLab.unit_procs.streams.influent.set_fractions | ( | self | ) |
Sets fractions for converting WW constituents into model components.
PLACE HOLDER.
|
private |
Fractions the wastewater constituents into model components.
Wastewater constituents often are measured in units such as Biochemical Oxygen Demand (BOD), Total Suspended Solids (TSS), Volatile SS (VSS), etc. Many mathematical models including IWA ASMs, however, measured organic carbons in Chemical Oxygen Demand (COD). This applies to soluble and particulate constituents. As a result, conversions between the two are needed. Currently this fuction is mainly set up to convert municipal wastewater's constituents into IWA ASM1. Industrial wastewater can have very different conversions coefficients. Also, the fractions will need to be revised for models different from IWA ASM1.