Skip to content

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 ​

TypeDescription
'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 ​

TypeDescription
'effluent'Final effluent discharge point
'sludgeDisposal'Sludge disposal/removal point
'productOutput'Product output (biogas, recovered nutrients)

Dividers ​

TypeDescription
'splitter'Generic flow splitter
'sideDivider'Side stream divider
'tDivider'T-junction divider

Combiners ​

TypeDescription
'combiner'Generic flow combiner
'sideCombiner'Side stream combiner
'tCombiner'T-junction combiner
'multiCombiner'Multi-inlet combiner

Storage ​

TypeDescription
'equalizationBasin'Flow equalization basin
'storageTank'Generic storage tank
'sludgeHoldingTank'Sludge storage tank
'sludgeHolding'Alias for sludge holding

Preliminary Treatment ​

TypeDescription
'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 ​

TypeDescription
'primaryClarifier'Circular primary clarifier
'primaryClarifierRectangular'Rectangular primary clarifier
'primaryClarifierLamella'Lamella plate settler

Bioreactors - Suspended Growth ​

TypeDescription
'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 ​

TypeDescription
'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 ​

TypeDescription
'uasb'Upflow anaerobic sludge blanket
'pond'Anaerobic/facultative pond

Bioreactors - Zones & RAS ​

TypeDescription
'ras'Return activated sludge system
'anoxicZone'Anoxic zone for denitrification
'anaerobicZone'Anaerobic zone for P-release
'aerobicZone'Aerobic zone for nitrification/oxidation

Secondary Clarifiers ​

TypeDescription
'clarifier'Generic secondary clarifier
'secondaryClarifier'Circular secondary clarifier
'secondaryClarifierRectangular'Rectangular secondary clarifier
'secondaryClarifierLamella'Lamella settler for secondary treatment

Tertiary Treatment ​

TypeDescription
'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 ​

TypeDescription
'membraneUF'Ultrafiltration membrane
'membraneMF'Microfiltration membrane
'membraneNF'Nanofiltration membrane
'membraneRO'Reverse osmosis membrane

Disinfection ​

TypeDescription
'uvDisinfection'UV disinfection system
'ozoneDisinfection'Ozone disinfection
'chlorineDisinfection'Chlorine/hypochlorite disinfection
'chlorineDioxide'Chlorine dioxide disinfection
'peracetic'Peracetic acid disinfection

Advanced Separation ​

TypeDescription
'daf'Dissolved air flotation
'flotation'Generic flotation unit
'cyclone'Hydrocyclone separator
'pointSeparator'Point-source separator

Thickening ​

TypeDescription
'thickener'Generic gravity thickener
'gravityThickener'Gravity belt thickener
'flotationThickener'Dissolved air flotation thickener
'rotaryDrumThickener'Rotary drum thickener
'gravitybeltThickener'Gravity belt thickener

Digesters ​

TypeDescription
'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 ​

TypeDescription
'dewateringBeltPress'Belt filter press
'dewateringCentrifuge'Decanter centrifuge
'dewateringFilterPress'Filter press/plate press
'dewateringScrewPress'Screw press
'dewateringRotaryPress'Rotary press
'sludgeDryingBed'Sand drying bed

Sludge Processing ​

TypeDescription
'sludgeDryer'Thermal sludge dryer
'sludgePasteurization'Pasteurization unit
'sludgeComposting'Composting facility
'sludgeIncineration'Incineration/combustion

Nutrient Recovery ​

TypeDescription
'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 ​

TypeDescription
'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 ​

TypeDescription
'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 ​

TypeDescription
'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 ​

TypeDescription
'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 ​

TypeDescription
'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 ​

TypeDescription
'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 ​

TypeDescription
'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) ​

TypeDescription
'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 ​

TypeDescription
'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 ​

PropertyTypeDescription
calculationModeCalculationModeundefined
volumenumberundefined
areanumberundefined
depthnumberundefined
temperaturenumberundefined

Flow Control Parameters ​

PropertyTypeDescription
splitRationumberundefined
outletCountnumberundefined
inletCountnumberundefined
splitRatiosnumber[]undefined
flowWeightsnumber[]undefined

Bioreactor Parameters ​

PropertyTypeDescription
doSetpointnumberundefined
rasRationumberundefined
wasFlownumberundefined

Chemical Dosing Parameters ​

PropertyTypeDescription
doseRatenumberundefined
chemicalFlowRatenumberundefined
targetParameterstringundefined

Preliminary Treatment Parameters ​

PropertyTypeDescription
screenOpeningnumberundefined
removalEfficiencynumberundefined

DAF Parameters ​

PropertyTypeDescription
airToSolidsRationumberundefined
recycleRationumberundefined

Dewatering Parameters ​

PropertyTypeDescription
cakeSolidsPercentnumberundefined
polymerDosenumberundefined

Thickening Parameters ​

PropertyTypeDescription
surfaceOverflowRatenumberundefined
solidsLoadingRatenumberundefined

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: {} };
  }
}