Appearance
Process Unit API Reference
Overview
ErgoPlanner supports a comprehensive library of 160+ wastewater treatment process unit types, organized into functional categories. Each process unit can be configured with specific parameters for hydraulic and process calculations.
ProcessUnitType Enumeration
The ProcessUnitType type is a union of string literals representing all supported process units.
Flow Elements
Sources
| Type | Description |
|---|---|
'influent' | Raw wastewater inlet |
'primaryEffluent' | Primary clarifier effluent source |
'sludgeFeed' | External sludge feed input |
'carbonDose' | External carbon source |
'metalDose' | Metal salt dosing source |
'waterSource' | Clean water source |
Sinks
| Type | Description |
|---|---|
'effluent' | Final effluent discharge point |
'sludgeDisposal' | Sludge disposal/removal point |
'productOutput' | Product output (biogas, recovered nutrients) |
Dividers
| Type | Description |
|---|---|
'splitter' | Generic flow splitter |
'sideDivider' | Side stream divider |
'tDivider' | T-junction divider |
Combiners
| Type | Description |
|---|---|
'combiner' | Generic flow combiner |
'sideCombiner' | Side stream combiner |
'tCombiner' | T-junction combiner |
'multiCombiner' | Multi-inlet combiner |
Storage
| Type | Description |
|---|---|
'equalizationBasin' | Flow equalization basin |
'storageTank' | Generic storage tank |
'sludgeHoldingTank' | Sludge storage tank |
'sludgeHolding' | Alias for sludge holding |
Preliminary Treatment
| Type | Description |
|---|---|
'screen' | Generic configurable screen |
'screenCoarse' | Coarse bar screen (>50mm) |
'screenFine' | Fine screen (3-6mm) |
'screenDrum' | Rotary drum screen |
'screenStep' | Step screen |
'gritChamber' | Horizontal flow grit chamber |
'gritVortex' | Vortex grit separator |
'gritAerated' | Aerated grit chamber |
'greaseTrap' | Grease and scum removal |
'comminutor' | Comminutor/macerator |
Primary Treatment
| Type | Description |
|---|---|
'primaryClarifier' | Circular primary clarifier |
'primaryClarifierRectangular' | Rectangular primary clarifier |
'primaryClarifierLamella' | Lamella plate settler |
Bioreactors - Suspended Growth
| Type | Description |
|---|---|
'cstr' | Completely stirred tank reactor |
'cstrSidestream' | CSTR for sidestream treatment |
'pfr' | Plug flow reactor |
'pfrSegment' | PFR segment/zone |
'sbr' | Sequencing batch reactor |
'sbrGranular' | Granular sludge SBR |
'sbrFlexible' | Flexible SBR configuration |
'hpo' | High purity oxygen system |
'oxidationDitch' | Oxidation ditch/carousel |
Bioreactors - Attached Growth
| Type | Description |
|---|---|
'mbbr' | Moving bed biofilm reactor |
'mbr' | Membrane bioreactor |
'mabr' | Membrane aerated biofilm reactor |
'ifas' | Integrated fixed-film activated sludge |
'baf' | Biological aerated filter |
'trickling' | Trickling filter |
'biofilter' | Generic biofilter |
'deniteFilter' | Denitrification filter |
Bioreactors - Anaerobic
| Type | Description |
|---|---|
'uasb' | Upflow anaerobic sludge blanket |
'pond' | Anaerobic/facultative pond |
Bioreactors - Zones & RAS
| Type | Description |
|---|---|
'ras' | Return activated sludge system |
'anoxicZone' | Anoxic zone for denitrification |
'anaerobicZone' | Anaerobic zone for P-release |
'aerobicZone' | Aerobic zone for nitrification/oxidation |
Secondary Clarifiers
| Type | Description |
|---|---|
'clarifier' | Generic secondary clarifier |
'secondaryClarifier' | Circular secondary clarifier |
'secondaryClarifierRectangular' | Rectangular secondary clarifier |
'secondaryClarifierLamella' | Lamella settler for secondary treatment |
Tertiary Treatment
| Type | Description |
|---|---|
'sandFilter' | Rapid sand filter |
'diskFilter' | Cloth disk filter |
'clothFilter' | Pile cloth filter |
'gacFilter' | Granular activated carbon filter |
'anthraciteFilter' | Anthracite media filter |
'dualMediaFilter' | Dual media (sand/anthracite) filter |
Membrane Systems
| Type | Description |
|---|---|
'membraneUF' | Ultrafiltration membrane |
'membraneMF' | Microfiltration membrane |
'membraneNF' | Nanofiltration membrane |
'membraneRO' | Reverse osmosis membrane |
Disinfection
| Type | Description |
|---|---|
'uvDisinfection' | UV disinfection system |
'ozoneDisinfection' | Ozone disinfection |
'chlorineDisinfection' | Chlorine/hypochlorite disinfection |
'chlorineDioxide' | Chlorine dioxide disinfection |
'peracetic' | Peracetic acid disinfection |
Advanced Separation
| Type | Description |
|---|---|
'daf' | Dissolved air flotation |
'flotation' | Generic flotation unit |
'cyclone' | Hydrocyclone separator |
'pointSeparator' | Point-source separator |
Thickening
| Type | Description |
|---|---|
'thickener' | Generic gravity thickener |
'gravityThickener' | Gravity belt thickener |
'flotationThickener' | Dissolved air flotation thickener |
'rotaryDrumThickener' | Rotary drum thickener |
'gravitybeltThickener' | Gravity belt thickener |
Digesters
| Type | Description |
|---|---|
'digester' | Generic anaerobic digester |
'digesterAnaerobic' | Mesophilic anaerobic digester |
'digesterAerobic' | Aerobic digester |
'digesterThermophilic' | Thermophilic digester |
'digesterAcidPhase' | Acid phase digester (2-stage) |
'digesterGasPhase' | Gas phase digester (2-stage) |
Dewatering
| Type | Description |
|---|---|
'dewateringBeltPress' | Belt filter press |
'dewateringCentrifuge' | Decanter centrifuge |
'dewateringFilterPress' | Filter press/plate press |
'dewateringScrewPress' | Screw press |
'dewateringRotaryPress' | Rotary press |
'sludgeDryingBed' | Sand drying bed |
Sludge Processing
| Type | Description |
|---|---|
'sludgeDryer' | Thermal sludge dryer |
'sludgePasteurization' | Pasteurization unit |
'sludgeComposting' | Composting facility |
'sludgeIncineration' | Incineration/combustion |
Nutrient Recovery
| Type | Description |
|---|---|
'struviteCrystallizer' | Struvite crystallization reactor |
'ammoniaStripper' | Ammonia stripping tower |
'phosphorusRecovery' | Generic P-recovery unit |
'pRecoveryMg' | Magnesium-based P recovery |
'pRecoveryCa' | Calcium-based P recovery |
Chemical Dosing
| Type | Description |
|---|---|
'dosingPoint' | Generic dosing injection point |
'chemicals' | SUMO-style chemicals PU |
'chemicalDosingFeCl3' | Ferric chloride dosing |
'chemicalDosingAlum' | Aluminum sulfate dosing |
'chemicalDosingPolymer' | Polymer dosing |
'chemicalDosingCarbon' | External carbon source dosing |
'chemicalDosingLime' | Lime dosing |
'chemicalDosingNaOH' | Sodium hydroxide dosing |
'chemicalDosingHCl' | Hydrochloric acid dosing |
'chemicalDosingH2SO4' | Sulfuric acid dosing |
'chemicalDosingMethanol' | Methanol dosing |
'chemicalDosingAcetate' | Acetate dosing |
'chemicalDosingMagnesium' | Magnesium dosing |
'chemicalDosingNH4HCO3' | Ammonium bicarbonate dosing |
'chemicalDosingCaCl2' | Calcium chloride dosing |
'chemicalDosingMgCl2' | Magnesium chloride dosing |
'chemicalDosingMgOH2' | Magnesium hydroxide dosing |
'chemicalDosingHNO3' | Nitric acid dosing |
'chemicalDosingH3PO4' | Phosphoric acid dosing |
'chemicalDosingKNO3' | Potassium nitrate dosing |
'chemicalDosingKNO2' | Potassium nitrite dosing |
'chemicalDosingNaHCO3' | Sodium bicarbonate dosing |
'chemicalDosingNa2CO3' | Sodium carbonate dosing |
Auxiliary Equipment
| Type | Description |
|---|---|
'pump' | Generic pump |
'blower' | Air blower |
'aerator' | Surface aerator |
'mixer' | Mechanical mixer |
'heatExchanger' | Heat exchanger |
'degasVessel' | Degassing vessel |
'auxiliary' | Generic auxiliary equipment |
'pumpingStation' | Multi-pump pumping station |
Flow Connectors
| Type | Description |
|---|---|
'tee2to1' | 2-to-1 tee junction |
'tee3to1' | 3-to-1 tee junction |
'tee4to1' | 4-to-1 tee junction |
'combiner3to1' | 3-to-1 combiner |
'combiner4to1' | 4-to-1 combiner |
'splitter3way' | 3-way splitter |
'splitter4way' | 4-way splitter |
'manifold' | Flow manifold |
Controllers
| Type | Description |
|---|---|
'pidController' | PID controller |
'continuousPController' | Continuous P-only controller |
'ratioController' | Flow ratio controller |
'onOffController' | On/off controller |
'switchController' | Switch controller with S-curve |
'cascadeController' | Cascade controller |
'deadbandController' | Deadband/hysteresis controller |
'timeBasedController' | Time-based cycling controller |
'setpointController' | Setpoint controller |
See Controllers API for controller interface documentation.
Sensors and Analyzers
| Type | Description |
|---|---|
'flowMeter' | Flow meter |
'levelSensor' | Level sensor |
'doSensor' | Dissolved oxygen sensor |
'phSensor' | pH sensor |
'tssSensor' | TSS/turbidity sensor |
'ammoniaAnalyzer' | Ammonia analyzer |
'nitrateAnalyzer' | Nitrate analyzer |
'phosphorusAnalyzer' | Phosphorus analyzer |
'codAnalyzer' | COD analyzer |
Statistical/Signal Processing
| Type | Description |
|---|---|
'movingAverage' | Moving average filter |
'monthlyAverage' | Monthly average calculator |
'flowTotalizer' | Flow totalizer |
'compositeSampler' | Composite sampler |
'dataLogger' | Data logger |
'alarmUnit' | Alarm/threshold checker |
'cycleTotalizer' | Cycle totalizer |
'minMaxUnit' | Min/max tracker |
'noiseUnit' | Noise generator |
'responseTimeUnit' | Response time simulator |
Gas Treatment
| Type | Description |
|---|---|
'biogasScrubber' | Biogas scrubber/upgrading |
'biogasFlare' | Biogas flare |
'chpEngine' | Combined heat and power engine |
'gasBalloon' | Gas storage balloon |
'gasTank' | Gas storage tank |
'airConnector' | Air supply connector |
'biogasCombiner' | Biogas combiner |
'biogasDivider' | Biogas divider |
'blowerEnergyCalc' | Blower energy calculator |
'blowerPD' | Positive displacement blower |
'blowerTurbo' | Turbo blower |
Catchments and Rivers (Integrated Modeling)
| Type | Description |
|---|---|
'urbanCatchment' | Urban catchment |
'riverCatchment' | River catchment |
'circularPipe' | Circular sewer pipe |
'pipeTank' | Pipe storage tank |
'offlineTank' | Offline storage tank |
'influentSewer' | Influent sewer |
'riverStretch' | River reach |
'sewerCombiner' | Sewer junction |
'riverCombiner' | River confluence |
'sewerWrrfConnector' | Sewer to WRRF connector |
'sewerRiverConnector' | Sewer to river connector |
'wrrfRiverConnector' | WRRF to river connector |
'influentGeneratorDynamic' | Dynamic influent generator |
'meteoBox' | Meteorological data source |
Special Units
| Type | Description |
|---|---|
'asDesign' | Activated sludge design unit |
'aop' | Advanced oxidation process |
'deflocculator' | Deflocculation unit |
'temperatureAdjustment' | Temperature adjustment unit |
'thp' | Thermal hydrolysis process |
'staticMixer' | In-line static mixer |
'mixingChamber' | Aerated mixing chamber |
'balancingTank' | Flow balancing tank |
ProcessUnitParameters Interface
Configuration parameters for process units.
Core Parameters
| Property | Type | Description |
|---|---|---|
| calculationMode | CalculationMode | undefined |
| volume | number | undefined |
| area | number | undefined |
| depth | number | undefined |
| temperature | number | undefined |
Flow Control Parameters
| Property | Type | Description |
|---|---|---|
| splitRatio | number | undefined |
| outletCount | number | undefined |
| inletCount | number | undefined |
| splitRatios | number[] | undefined |
| flowWeights | number[] | undefined |
Bioreactor Parameters
| Property | Type | Description |
|---|---|---|
| doSetpoint | number | undefined |
| rasRatio | number | undefined |
| wasFlow | number | undefined |
Chemical Dosing Parameters
| Property | Type | Description |
|---|---|---|
| doseRate | number | undefined |
| chemicalFlowRate | number | undefined |
| targetParameter | string | undefined |
Preliminary Treatment Parameters
| Property | Type | Description |
|---|---|---|
| screenOpening | number | undefined |
| removalEfficiency | number | undefined |
DAF Parameters
| Property | Type | Description |
|---|---|---|
| airToSolidsRatio | number | undefined |
| recycleRatio | number | undefined |
Dewatering Parameters
| Property | Type | Description |
|---|---|---|
| cakeSolidsPercent | number | undefined |
| polymerDose | number | undefined |
Thickening Parameters
| Property | Type | Description |
|---|---|---|
| surfaceOverflowRate | number | undefined |
| solidsLoadingRate | number | undefined |
See the complete interface definition in Simulation Engine API for all parameters including pumping station, controller, sensor, and statistical unit parameters.
Example Usage
Creating a Process Unit Node
typescript
import { ProcessUnitType, ProcessUnitParameters, CalculationNode } from './types';
// Aeration tank
const aerationTank: CalculationNode = {
id: 'aeration-1',
name: 'Aeration Tank 1',
unitType: 'aerobicZone',
parameters: {
calculationMode: 'advanced',
volume: 5000,
doSetpoint: 2.0,
temperature: 15
},
upstreamNodes: ['primary-1'],
downstreamNodes: ['clarifier-1'],
inlet: undefined,
outlets: [],
displayValues: []
};
// Primary clarifier
const primaryClarifier: CalculationNode = {
id: 'primary-1',
name: 'Primary Clarifier',
unitType: 'primaryClarifier',
parameters: {
area: 500,
depth: 4.0,
surfaceOverflowRate: 30,
removalEfficiency: 0.6 // 60% TSS removal
},
upstreamNodes: ['influent-1'],
downstreamNodes: ['aeration-1'],
inlet: undefined,
outlets: [],
displayValues: []
};
// Pumping station
const pumpStation: CalculationNode = {
id: 'pump-1',
name: 'RAS Pumps',
unitType: 'pumpingStation',
parameters: {
pumpCount: 3,
dutyPumps: 2,
standbyPumps: 1,
pumpCapacity: 1200, // m³/h
pumpHead: 8, // m
pumpEfficiency: 0.75,
vfdEnabled: true,
vfdMinSpeed: 30,
vfdMaxSpeed: 100
},
upstreamNodes: ['clarifier-1'],
downstreamNodes: ['aeration-1'],
inlet: undefined,
outlets: [],
displayValues: []
};Type-Safe Process Unit Selection
typescript
function createProcessUnit(type: ProcessUnitType): CalculationNode {
const baseNode = {
id: `${type}-${Date.now()}`,
name: type,
unitType: type,
upstreamNodes: [],
downstreamNodes: [],
inlet: undefined,
outlets: [],
displayValues: []
};
// Type-specific default parameters
switch (type) {
case 'aerobicZone':
return {
...baseNode,
parameters: { volume: 1000, doSetpoint: 2.0, temperature: 15 }
};
case 'primaryClarifier':
return {
...baseNode,
parameters: { area: 200, depth: 3.5, surfaceOverflowRate: 30 }
};
case 'pumpingStation':
return {
...baseNode,
parameters: {
pumpCount: 2,
dutyPumps: 1,
standbyPumps: 1,
pumpCapacity: 500
}
};
default:
return { ...baseNode, parameters: {} };
}
}Related Types
- StreamData - Stream flow and quality
- CalculationNode - Node structure
- ProcessUnitConfig - Equipment configuration