aquakin.size_activated_sludge#
- aquakin.size_activated_sludge(*, SRT, Q, HRT=None, HRT_h=None, n_tanks=1, volume_fractions=None, wastage_from='mixed_liquor', thickening_ratio=1.0, internal_recycle_ratio=None, ras_ratio=None)[source]#
Size an activated-sludge basin from SRT / HRT design targets.
The two standard sizing relations:
Volume from HRT:
V = Q × HRT– the aeration volume is the design flow times the chosen hydraulic retention time.Wastage from SRT: the sludge age is the system solids mass over the rate solids are wasted. Two wasting strategies:
wastage_from="mixed_liquor"(default, “hydraulic”/Garrett SRT control): wasting mixed liquor straight from the aeration basin givesSRT = V·X / (Qw·X) = V/Qwindependent of the (unknown, time-varying) solids concentration, soQw = V/SRTexactly.wastage_from="underflow": wasting from the thickened RAS line givesSRT = V·X / (Qw·X_r), soQw = V / (SRT × thickening_ratio)withthickening_ratio = X_r/X(the underflow-to-reactor TSS ratio, > 1).
This is the nominal design; the realised SRT also depends on the effluent solids loss and (for underflow wasting) the actual thickening, so confirm it on a solved plant with
sludge_metrics().- Parameters:
SRT (float) – Target solids retention time (days). Must be > 0.
Q (float) – Design (average) influent flow (m³/d). Must be > 0.
HRT (float, optional) – Hydraulic retention time in days. Supply exactly one of
HRT/HRT_h.HRT_h (float, optional) – Hydraulic retention time in hours (the usual engineering unit).
n_tanks (int, optional) – Split the aeration volume into this many equal tanks (a CSTR cascade). Default 1. Ignored when
volume_fractionsis given.volume_fractions (list of float, optional) – Explicit per-tank volume fractions (must be positive and sum to 1); sets
tank_volumesand overridesn_tanks.wastage_from (str, optional) –
"mixed_liquor"(default) or"underflow"– see above.thickening_ratio (float, optional) – Underflow-to-reactor TSS ratio for
wastage_from="underflow"(must be > 0; ignored for mixed-liquor wasting). Default 1.internal_recycle_ratio (float, optional) – If given, also report the internal-recycle / RAS pump flows as
ratio × Q.ras_ratio (float, optional) – If given, also report the internal-recycle / RAS pump flows as
ratio × Q.
- Returns:
Volume, wastage flow, tank split and recycle flows.
- Return type:
- Raises:
ValueError – On non-positive SRT/Q/HRT, an ambiguous or missing HRT, a bad
wastage_from, a non-positivethickening_ratio, orvolume_fractionsthat are non-positive / wrong length / do not sum to 1.
Examples
>>> s = size_activated_sludge(SRT=10.0, HRT_h=8.0, Q=18446.0, n_tanks=5) >>> round(s.volume), round(s.wastage_flow) (6149, 615)