WasteWater.ASM3.SecClar.Takacs

Secondary settling tank modelling by Takacs

WasteWater.ASM3.SecClar.Takacs.Interfaces WasteWater.ASM3.SecClar.Takacs.SecClarModTakacs WasteWater.ASM3.SecClar.Takacs.bottom_layer WasteWater.ASM3.SecClar.Takacs.lower_layer WasteWater.ASM3.SecClar.Takacs.feed_layer WasteWater.ASM3.SecClar.Takacs.upper_layer WasteWater.ASM3.SecClar.Takacs.top_layer

Information

This package contains classes (layer models) to built ASM3 secondary clarifier models,
an Interfaces sub-library and provides an ASM3 10-layer secondary clarifier model all 
bases on Takac`s [1] double exponential sedimentation velocity function.

A secondary clarifier layer model needs at least a top_layer, a feed_layer and a bottom_layer
and may have several upper_layer in between above the feed_layer and several lower_layer in
between below the feed_layer.
Main Author:
 
          Gerald Reichl
          Technische Universitaet Ilmenau
          Faculty of Informatics and Automation
          Department Dynamics and Simulation of ecological Systems
          P.O. Box 10 05 65
          98684 Ilmenau
          Germany
          email: gerald.reichl@tu-ilmenau.de

References:

[1]  I. Takacs and G.G. Patry and D. Nolasco: A dynamic model of the clarification-thickening
      process. Water Research. 25 (1991) 10, pp 1263-1271.
Copyright (C) 2002 - 2003, Gerald Reichl

The Modelica package is free software; it can be redistributed and/or modified under the terms of the Modelica license, see the license conditions and the accompanying disclaimer in the documentation of package Modelica in file "Modelica/package.mo".


WasteWater.ASM3.SecClar.Takacs.bottom_layer WasteWater.ASM3.SecClar.Takacs.bottom_layer

Bottom layer of Takac`s SC model

WasteWater.ASM3.SecClar.Takacs.bottom_layer

Information

This class models the lowest layer of an ASM3 secondary clarifier based on Takacs.

No sedimentation flux (mass exchange) with underneath but hydraulic and sedimentation 
flux (same direction) with above layer. From here return and waste sludge is removed.

Parameters

NameDefaultDescription
zm height of m-th secondary clarifier layer [m]
Asc area of secondary clarifier [m2]

Modelica definition

model bottom_layer "Bottom layer of Takac`s SC model" 
  
  package WWSC = WasteWater.ASM3.SecClar.Takacs.Interfaces;
  extends WWSC.SCParam;
  extends WWSC.SCVar;
  extends WWSC.ratios;
  
  ASM3.Interfaces.WWFlowAsm3out PQr;
  ASM3.Interfaces.WWFlowAsm3out PQw;
  WWSC.LowerLayerPin Up;
equation 
  
  // sink velocity
  vS = WWSC.vSfun(X, Xf);
  Jsm = 0.0;
  
  // ODE of solid component
  der(X) = ((Up.Qr + Up.Qw)/Asc*(Up.X - X) + Up.SedFlux)/zm;
  
  // ODEs of soluble components
  der(So) = (Up.Qr + Up.Qw)*(Up.So - So)/(Asc*zm);
  der(Si) = (Up.Qr + Up.Qw)*(Up.Si - Si)/(Asc*zm);
  der(Ss) = (Up.Qr + Up.Qw)*(Up.Ss - Ss)/(Asc*zm);
  der(Snh) = (Up.Qr + Up.Qw)*(Up.Snh - Snh)/(Asc*zm);
  der(Sn2) = (Up.Qr + Up.Qw)*(Up.Sn2 - Sn2)/(Asc*zm);
  der(Snox) = (Up.Qr + Up.Qw)*(Up.Snox - Snox)/(Asc*zm);
  der(Salk) = (Up.Qr + Up.Qw)*(Up.Salk - Salk)/(Asc*zm);
  
  // upward connection
  Up.vS_dn = vS;
  Up.X_dn = X;
  
  // return and waste sludge volume flow rates
  PQr.Q + Up.Qr = 0;
  PQw.Q + Up.Qw = 0;
  
  // return sludge flow, solid and soluble components (ASM3)
  PQr.So = So;
  PQr.Si = Si;
  PQr.Ss = Ss;
  PQr.Snh = Snh;
  PQr.Sn2 = Sn2;
  PQr.Snox = Snox;
  PQr.Salk = Salk;
  PQr.Xi = rXi*X;
  PQr.Xs = rXs*X;
  PQr.Xh = rXh*X;
  PQr.Xsto = rXsto*X;
  PQr.Xa = rXa*X;
  PQr.Xss = X;
  
  // waste sludge flow, solid and soluble components (ASM3)
  PQw.So = So;
  PQw.Si = Si;
  PQw.Ss = Ss;
  PQw.Snh = Snh;
  PQw.Sn2 = Sn2;
  PQw.Snox = Snox;
  PQw.Salk = Salk;
  PQw.Xi = rXi*X;
  PQw.Xs = rXs*X;
  PQw.Xh = rXh*X;
  PQw.Xsto = rXsto*X;
  PQw.Xa = rXa*X;
  PQw.Xss = X;
  
end bottom_layer;

WasteWater.ASM3.SecClar.Takacs.lower_layer WasteWater.ASM3.SecClar.Takacs.lower_layer

Layer below influent of Takac`s SC model

WasteWater.ASM3.SecClar.Takacs.lower_layer

Information

This class models the layers between the influent layer (feed_layer) and the lowest layer 
(bottom_layer) of an ASM3 secondary clarifier based on Takacs.

Hydraulic and sedimentation flux (mass exchange in same direction) with above
and underneath layer.

Sedimentation flux is calculated based on the double-exponential sedimentation velocity
function by Takacs.

Parameters

NameDefaultDescription
zm height of m-th secondary clarifier layer [m]
Asc area of secondary clarifier [m2]

Modelica definition

model lower_layer "Layer below influent of Takac`s SC model" 
  
  package WWSC = WasteWater.ASM3.SecClar.Takacs.Interfaces;
  extends WWSC.SCParam;
  extends WWSC.SCVar;
  
  WWSC.LowerLayerPin Up;
  WWSC.LowerLayerPin Dn;
equation 
  
  // sink velocity
  vS = WWSC.vSfun(X, Xf);
  
  // sedimentation flux in m-th layer sinking to lower layer
  Jsm = min(vS*X, Dn.vS_dn*Dn.X_dn);
  
  // ODE of solid component
  der(X) = ((Up.Qr + Up.Qw)/Asc*(Up.X - X) + Up.SedFlux - Jsm)/zm;
  
  // ODEs of soluble components
  der(So) = (Up.Qr + Up.Qw)*(Up.So - So)/(Asc*zm);
  der(Si) = (Up.Qr + Up.Qw)*(Up.Si - Si)/(Asc*zm);
  der(Ss) = (Up.Qr + Up.Qw)*(Up.Ss - Ss)/(Asc*zm);
  der(Snh) = (Up.Qr + Up.Qw)*(Up.Snh - Snh)/(Asc*zm);
  der(Sn2) = (Up.Qr + Up.Qw)*(Up.Sn2 - Sn2)/(Asc*zm);
  der(Snox) = (Up.Qr + Up.Qw)*(Up.Snox - Snox)/(Asc*zm);
  der(Salk) = (Up.Qr + Up.Qw)*(Up.Salk - Salk)/(Asc*zm);
  
  // downward connections
  Dn.Qr + Up.Qr = 0;
  Dn.Qw + Up.Qw = 0;
  
  Dn.X = X;
  Dn.SedFlux = -Jsm;
  
  Dn.So = So;
  Dn.Si = Si;
  Dn.Ss = Ss;
  Dn.Snh = Snh;
  Dn.Sn2 = Sn2;
  Dn.Snox = Snox;
  Dn.Salk = Salk;
  
  // upward connections
  Up.vS_dn = vS;
  Up.X_dn = X;
  
end lower_layer;

WasteWater.ASM3.SecClar.Takacs.feed_layer WasteWater.ASM3.SecClar.Takacs.feed_layer

Influent layer of Takac`s SC model

WasteWater.ASM3.SecClar.Takacs.feed_layer

Information

This class models the influent layer of an ASM3 secondary clarifier based on Takacs.

It receives the wastewater stream from the biological part (feed).
Hydraulic and sedimentation flux (mass exchange in opposite directions) with above layer
and hydraulic and sedimentation flux (mass exchange in same direction) with underneath layer.

Sedimentation flux is calculated based on the double-exponential sedimentation velocity
function by Takacs.

Parameters

NameDefaultDescription
zm height of m-th secondary clarifier layer [m]
Asc area of secondary clarifier [m2]

Modelica definition

model feed_layer "Influent layer of Takac`s SC model" 
  
  package WWSC = WasteWater.ASM3.SecClar.Takacs.Interfaces;
  extends WWSC.SCParam;
  extends WWSC.SCVar;
  WWSC.LowerLayerPin Dn;
  WWSC.UpperLayerPin Up;
  ASM3.Interfaces.WWFlowAsm3in In;
equation 
  
  // sink velocity
  vS = WWSC.vSfun(X, Xf);
  
  // sedimentation flux in m-th layer sinking to lower layer
  Jsm = min(vS*X, Dn.vS_dn*Dn.X_dn);
  
  // ODE of solid component
  der(X) = (In.Q/Asc*Xf - (-Up.Qe)/Asc*X - (-(Dn.Qr + Dn.Qw))/Asc*X + Up.
    SedFlux - Jsm)/zm;
  
  // ODE of soluble components
  der(So) = (In.Q*In.So - (-Up.Qe)*So - (-(Dn.Qr + Dn.Qw))*So)/(Asc*zm);
  der(Si) = (In.Q*In.Si - (-Up.Qe)*Si - (-(Dn.Qr + Dn.Qw))*Si)/(Asc*zm);
  der(Ss) = (In.Q*In.Ss - (-Up.Qe)*Ss - (-(Dn.Qr + Dn.Qw))*Ss)/(Asc*zm);
  der(Snh) = (In.Q*In.Snh - (-Up.Qe)*Snh - (-(Dn.Qr + Dn.Qw))*Snh)/(Asc*zm);
  der(Sn2) = (In.Q*In.Sn2 - (-Up.Qe)*Sn2 - (-(Dn.Qr + Dn.Qw))*Sn2)/(Asc*zm);
  der(Snox) = (In.Q*In.Snox - (-Up.Qe)*Snox - (-(Dn.Qr + Dn.Qw))*Snox)/(Asc*zm);
  der(Salk) = (In.Q*In.Salk - (-Up.Qe)*Salk - (-(Dn.Qr + Dn.Qw))*Salk)/(Asc*zm);
  
  // volume flow rates
  In.Q + Up.Qe + Dn.Qr + Dn.Qw = 0;
  
  Dn.SedFlux = -Jsm;
  Dn.X = X;
  
  Dn.So = So;
  Dn.Si = Si;
  Dn.Ss = Ss;
  Dn.Snh = Snh;
  Dn.Sn2 = Sn2;
  Dn.Snox = Snox;
  Dn.Salk = Salk;
  
  Up.vS_dn = vS;
  Up.X_dn = X;
  
  Up.So = So;
  Up.Si = Si;
  Up.Ss = Ss;
  Up.Snh = Snh;
  Up.Sn2 = Sn2;
  Up.Snox = Snox;
  Up.Salk = Salk;
  
end feed_layer;

WasteWater.ASM3.SecClar.Takacs.upper_layer WasteWater.ASM3.SecClar.Takacs.upper_layer

Layer above influent of Takac`s SC

WasteWater.ASM3.SecClar.Takacs.upper_layer

Information

This class models the layers between the influent layer (feed_layer) and the 
effluent layer (top_layer) an ASM3 secondary clarifier based on Takacs.

Hydraulic and sedimentation flux (mass exchange in opposite directions) 
with above and underneath layer.

Sedimentation flux is calculated based on the double-exponential sedimentation velocity
function by Takacs.

Parameters

NameDefaultDescription
zm height of m-th secondary clarifier layer [m]
Asc area of secondary clarifier [m2]
Xt threshold value for Xtss [mg/l]

Modelica definition

model upper_layer "Layer above influent of Takac`s SC" 
  
  package WWSC = WasteWater.ASM3.SecClar.Takacs.Interfaces;
  extends WWSC.SCParam;
  extends WWSC.SCVar;
  parameter WWU.MassConcentration Xt;
  // Xt = Xthreshold
  WWSC.UpperLayerPin Dn;
  WWSC.UpperLayerPin Up;
equation 
  
  // sink velocity
  vS = WWSC.vSfun(X, Xf);
  
  // sedimentation flux in m-th layer sinking to lower layer
  Jsm = if Dn.X_dn <= Xt then vS*X else min(vS*X, Dn.vS_dn*Dn.X_dn);
  
  // ODE of solid component        
  der(X) = (Dn.Qe/Asc*(Dn.X_dn - X) + Up.SedFlux - Jsm)/zm;
  
  // ODEs of soluble components
  der(So) = Dn.Qe*(Dn.So - So)/(Asc*zm);
  der(Si) = Dn.Qe*(Dn.Si - Si)/(Asc*zm);
  der(Ss) = Dn.Qe*(Dn.Ss - Ss)/(Asc*zm);
  der(Snh) = Dn.Qe*(Dn.Snh - Snh)/(Asc*zm);
  der(Sn2) = Dn.Qe*(Dn.Sn2 - Sn2)/(Asc*zm);
  der(Snox) = Dn.Qe*(Dn.Snox - Snox)/(Asc*zm);
  der(Salk) = Dn.Qe*(Dn.Salk - Salk)/(Asc*zm);
  
  // downward connection
  Dn.SedFlux = -Jsm;
  
  // upward connections
  Up.Qe + Dn.Qe = 0;
  
  Up.vS_dn = vS;
  Up.X_dn = X;
  
  Up.So = So;
  Up.Si = Si;
  Up.Ss = Ss;
  Up.Snh = Snh;
  Up.Sn2 = Sn2;
  Up.Snox = Snox;
  Up.Salk = Salk;
  
end upper_layer;

WasteWater.ASM3.SecClar.Takacs.top_layer WasteWater.ASM3.SecClar.Takacs.top_layer

Effluent layer of Takac`s SC model

WasteWater.ASM3.SecClar.Takacs.top_layer

Information

This class models the top layer of an ASM3 secondary clarifier based on Takacs.

No sedimentation flux (mass exchange) with above but hydraulic and sedimentation flux
(opposite directions) underneath. From here effluent goes to the receiving water.

Sedimentation flux is calculated based on the double-exponential sedimentation velocity
function by Takacs.

Parameters

NameDefaultDescription
zm height of m-th secondary clarifier layer [m]
Asc area of secondary clarifier [m2]
Xt threshold value for Xtss [mg/l]

Modelica definition

model top_layer "Effluent layer of Takac`s SC model" 
  
  package WWSC = WasteWater.ASM3.SecClar.Takacs.Interfaces;
  extends WWSC.SCParam;
  extends WWSC.SCVar;
  extends WWSC.ratios;
  
  parameter WWU.MassConcentration Xt;
  // Xt = Xthreshold
  
  WWSC.UpperLayerPin Dn;
  ASM3.Interfaces.WWFlowAsm3out Out;
equation 
  
  // sink velocity
  vS = WWSC.vSfun(X, Xf);
  
  // sedimentation flux in m-th layer sinking to lower layer
  Jsm = if Dn.X_dn <= Xt then vS*X else min(vS*X, Dn.vS_dn*Dn.X_dn);
  
  // ODE of solid component
  der(X) = (Dn.Qe/Asc*(Dn.X_dn - X) - Jsm)/zm;
  
  // ODEs of soluble components
  der(So) = Dn.Qe*(Dn.So - So)/(Asc*zm);
  der(Si) = Dn.Qe*(Dn.Si - Si)/(Asc*zm);
  der(Ss) = Dn.Qe*(Dn.Ss - Ss)/(Asc*zm);
  der(Snh) = Dn.Qe*(Dn.Snh - Snh)/(Asc*zm);
  der(Sn2) = Dn.Qe*(Dn.Sn2 - Sn2)/(Asc*zm);
  der(Snox) = Dn.Qe*(Dn.Snox - Snox)/(Asc*zm);
  der(Salk) = Dn.Qe*(Dn.Salk - Salk)/(Asc*zm);
  
  // downward connection
  Dn.SedFlux = -Jsm;
  
  // effluent volume flow rate
  Out.Q + Dn.Qe = 0;
  
  // effluent, solid and soluble components (ASM3)
  Out.So = So;
  Out.Si = Si;
  Out.Ss = Ss;
  Out.Snh = Snh;
  Out.Sn2 = Sn2;
  Out.Snox = Snox;
  Out.Salk = Salk;
  
  Out.Xi = rXi*X;
  Out.Xs = rXs*X;
  Out.Xh = rXh*X;
  Out.Xsto = rXsto*X;
  Out.Xa = rXa*X;
  Out.Xss = X;
  
end top_layer;

WasteWater.ASM3.SecClar.Takacs.SecClarModTakacs WasteWater.ASM3.SecClar.Takacs.SecClarModTakacs

ASM3 Secondary Clarifier Model based on Takacs

WasteWater.ASM3.SecClar.Takacs.SecClarModTakacs

Information

This component models an ASM3 10 - layer secondary clarifier model with 4 layers 
above the feed_layer (including top_layer) and 5 layers below the feed_layer
(including bottom_layer) based on Takac`s theory.

Parameters

NameDefaultDescription
hsc4.0height of secondary clarifier [m]
n10number of layers of SC model
zmhsc/(1.0*n)height of m-th secondary clarifier layer [m]
Asc1500.0area of secondary clarifier [m2]
Xt3000.0threshold for X [mg/l]

Modelica definition

model SecClarModTakacs 
  "ASM3 Secondary Clarifier Model based on Takacs" 
  
  extends WasteWater.Icons.SecClar;
  extends ASM3.SecClar.Takacs.Interfaces.ratios;
  package SCP = ASM3.SecClar.Takacs;
  package SI = Modelica.SIunits;
  package WI = ASM3.Interfaces;
  package WWU = WasteWater.WasteWaterUnits;
  
  parameter SI.Length hsc=4.0 "height of secondary clarifier";
  parameter Integer n=10 "number of layers of SC model";
  parameter SI.Length zm=hsc/(1.0*n) "height of m-th secondary clarifier layer";
  parameter SI.Area Asc=1500.0 "area of secondary clarifier";
  parameter WWU.MassConcentration Xt=3000.0 "threshold for X";
  // total sludge concentration in clarifier feed
  WWU.MassConcentration Xf;
  
  WI.WWFlowAsm3in Feed;
  WI.WWFlowAsm3out Effluent;
  WI.WWFlowAsm3out Return;
  WI.WWFlowAsm3out Waste;
  
  // layers 1 to 10
  SCP.bottom_layer S1(
    zm=zm, 
    Asc=Asc, 
    Xf=Xf, 
    rXi=rXi, 
    rXs=rXs, 
    rXh=rXh, 
    rXsto=rXsto, 
    rXa=rXa);
  SCP.lower_layer S2(
    zm=zm, 
    Asc=Asc, 
    Xf=Xf);
  SCP.lower_layer S3(
    zm=zm, 
    Asc=Asc, 
    Xf=Xf);
  SCP.lower_layer S4(
    zm=zm, 
    Asc=Asc, 
    Xf=Xf);
  SCP.lower_layer S5(
    zm=zm, 
    Asc=Asc, 
    Xf=Xf);
  SCP.feed_layer S6(
    zm=zm, 
    Asc=Asc, 
    Xf=Xf);
  SCP.upper_layer S7(
    zm=zm, 
    Asc=Asc, 
    Xf=Xf, 
    Xt=Xt);
  SCP.upper_layer S8(
    zm=zm, 
    Asc=Asc, 
    Xt=Xt, 
    Xf=Xf);
  SCP.upper_layer S9(
    zm=zm, 
    Asc=Asc, 
    Xf=Xf, 
    Xt=Xt);
  SCP.top_layer S10(
    zm=zm, 
    Asc=Asc, 
    Xf=Xf, 
    Xt=Xt, 
    rXi=rXi, 
    rXs=rXs, 
    rXh=rXh, 
    rXsto=rXsto, 
    rXa=rXa);
equation 
  
  connect(S1.Up, S2.Dn);
  connect(S2.Up, S3.Dn);
  connect(S3.Up, S4.Dn);
  connect(S5.Up, S6.Dn);
  connect(S6.Up, S7.Dn);
  connect(S7.Up, S8.Dn);
  connect(S9.Up, S10.Dn);
  connect(S4.Up, S5.Dn);
  connect(S8.Up, S9.Dn);
  connect(Feed, S6.In);
  connect(S1.PQw, Waste);
  connect(S10.Out, Effluent);
  connect(S1.PQr, Return);
  
  // total sludge concentration in clarifier feed
  Xf = Feed.Xss;
  
  // ratios of solid components
  rXi = Feed.Xi/Xf;
  rXs = Feed.Xs/Xf;
  rXh = Feed.Xh/Xf;
  rXsto = Feed.Xsto/Xf;
  rXa = Feed.Xa/Xf;
  
end SecClarModTakacs;

HTML-documentation generated by Dymola Mon Aug 18 11:15:53 2003 .