Upload
donhan
View
225
Download
5
Embed Size (px)
Citation preview
CFD for WRRFFundamentals
Randal W. Samstag, MS, PE, BCEE
Civil and Sanitary Engineer
Bainbridge Island, WA US
“If we know what is happening within the vessel, then we are able topredict the behavior of the vessel as a reactor. Though fine in principle,the attendant complexities make it impractical to use this approach.” –Octave Levenspiel (1972)
Computational fluid dynamics (CFD) changes this picture. UsingCFD, we can compute three-dimensional velocity fields and followinteractions of reactants and products through a tank. We can usethis information to optimize tank geometry.
Types of Models
Black Box Models Grey Box Models
Glass Box Models
Black Box Models
Principle:
• Output = f (Input, Volume)
Examples:
• RTD Theory
• Box and Jenkins ARIMA
These can give approximate results because outputs usually are related to inputs and volume,but can’t tell us anything about the influence of the shape of the reactor on the outputs.
Grey Box Models
Principle:
• Use knowledge about the reactorplus inputs and volume to predictoutputs.
Examples:
• Tanks in Series Models
• Axial Dispersion Models
Grey box models use macroscopic analogs of diffusion over the tank to predict outputs. TheIWA ASM models are often used in this type of model.
Glass Box Models
Principle:
• Use three dimensional velocityfield model as base for predictionof outputs.
Examples:
• CFD Models
Glass box models predict the impact of geometry on process outputs based on the three-dimensional velocity field. This realizes Levenspiel’s “impractical” goal.
CFD: What is it?
• Continuity Equation: Law of MassConservation
• Momentum Equations: Newton’sSecond Law (Incompressible Flow )
0
i
i
x
u
t
ii
t
ij
ij
i Fx
u
x
p
x
uu
t
u
j
2
21
CFD Solves the Reynolds Averaged Navier-Stokes (RANS)Equations by Numerical Schemes
Breakdown of the Momentum Equation
ii
t
ij
ij
i Fx
u
x
p
x
uu
t
u
j
2
21
Unsteady Term
Advective TermPressure Term
Diffusion TermSource Term
The Momentum Equations are a Special Case ofthe Generalized Transport Equation
Sxx
uxt jj
j
j
)()()(
Advection Diffusion
Unsteady
Source
Discretization Techniques
• Finite difference
• Method of weighted residuals (finite element)
• Finite volume formulation
• Grid-less methods
All of these have been used in CFD for wastewater. Finite difference was the firsttechnique used. Finite element has been used for clarifier modeling. Finite volumeformulation is the most common commercial CFD software approach. Grid-lessmethods have not been much used, but may be promising.
How to eliminate pressure?
• Transform the governing equations:• Vorticity / stream function method
• Use iteration and convergence• SIMPLE
Both of these methods have been used in CFD for wastewater.
Vorticity / Stream Function: Roache, P. J. (1982) Computational Fluid Dynamics
The Vorticity / Stream Function Method
x
v
y
u
Definition of Vorticity
yu
xv
Vorticity Transport Eqn.
Definition of Stream Function
2
2
2
2
yxPoisson Eqn. for Stream Function
Roache, P. J. (1982) Computational Fluid Dynamics
0Re
1)()(2
2
2
2
yxy
v
x
v
t
SIMPLE: Semi-Implicit Pressure Linked Equations
• Guess the pressure field
• Solve the momentum equations
• Solve pressure correction
• Calculate velocities
• Solve for other properties(temperature, solids)
• Update the pressure field anditerate to convergence
Patankar (1981) Numerical Heat Transfer andFluid Flow, Hemisphere,
Turbulence Modeling• Simplest model: Prandtl’s Mixing Length Hypothesis (Plane mixing layer,
width δ)
• Two Equation Models: k – epsilon
y
ul mt
2
kMbk
jk
t
j
i
i
SYPPX
k
XkU
Xk
t
)()(
S
kCPCP
kC
XXU
Xtbk
jk
t
j
i
i
2
231 )()()(
2kCt
Rodi, W. (1980) Turbulence models and their application in hydraulics: A state-of-the art review.
07.0
ml
3D transport models can be coupled to the velocitycalculations to simulate sedimentation and mixing.
• Solids Transport
• Vesilind settling
• Density couple
kCos eVV
s
ww c
1
k
s
is
t
ii
i
x
CV
x
C
xx
Cu
t
C
Samstag, et al. (1992) Prospects for Transport Modelling for Process Tanks, WST, Vol. 26. No. 5-6. pp. 1401-1410.
3D transport models can be implemented for wastewaterquality parameters as well.
Biokinetic Models• ASM Models
• Advanced oxidation Models
• Disinfection models
Sobremisana, Ducoste, de los Reyes III (2011)
Multi-phase models can simulate motion ofwater and air.
0)(
id
d vtt
0)(
ic
c vtt
idiiV
i
djid
j
id Tvux
pvv
xv
t,)()()(
iciiV
i
cjic
j
ic Tvux
pvv
xv
t,)()()(
Crowe, Sommerfield, and Tusji (1998) Multiphase Flows with Droplets and Particles.
Drift Flux Method after Ishii (1977)Mixture Continuity Equation:� � �
� �+ � � � � �⃗ = 0
Continuity Equation for Dispersed Phase:� � � � �
� �+ � � � � � � �⃗ = −Γ� − �
� � � � � �
� �� �⃗ �
Mixture Momentum Equation:� � � � �
� �+ � � � � �⃗ � �⃗ =
− � P� − � � ̿ + � ̿ � −� �
� � � �
� � � �
� �� �⃗ � � �⃗ � + � � � ⃗
Here � is the divergence operator where
div � ⃗ = � � ⃗ = � � ,� =� � �
� � �+
� � �
� � �+
� � �
� � �
Ishii, M. (1977) One-Dimensional Drift Flux Model, ANL – 77-47, Argone National Laboratory, Argonne, IL.
(2D) Volume of Fluid (VOF) MethodHirt and Nichols (1981)
Continuity Equation:
Fluid Marker Equation:
Momentum Equations:
2
2
2
2
2
2
2
2
1
1
y
v
x
v
y
p
y
vv
x
vu
t
v
y
u
x
u
x
p
y
uv
x
uu
t
u
0y
Fv
x
Fu
t
F
F=1 if fluid is presentF=0 if fluid is not present
Hirt and Nichols (1981) , Volume of Fluid Method, Los Alamos Scientific Laboratory, Los Alamos, NM.
0y
v
x
u
t
u
How to Do CFD?Good Modelling Practice
Wicklein et al. (in press)
How to do CFD?Software
• Hand Coded• Fortran• C++
• Commercial platforms (Examples)• ANSYS (Fluent and CFX)• Cd-adapco• Flow-3D• Comsol• PHOENICS
• Open source platforms• OpenFOAM
Hand Coded InterfaceTANKXZ
Fluent Interface
Standard OpenFOAM Interface
Visual CFD Interface for OpenFOAM
2015 OpenFOAM WorkshopSurfers Paradise• Presentations by IWA WG members
• Teaching by Nelson Marques on OpenFOAM• Modeling
• Meshing
• Simulation
• Post-Processing
• Example cases• Parshall Flume
• Flow Splitter
• Clarifier
• UV Channel
Case Study: Splitter Box (VOF)
Case Study: Activated Sludge Clarifier (Drift Flux)
Who is Doing CFD in the Water Industry?
• IWA CFD Working Group“The WG intends to solve shortcomings arising from lack of knowledge of CFDin the water and wastewater community in the short term by producing papersand books as well as hands-on training for the IWA MIA members (and beyond).Furthermore, a book dedicated for training new people in thewater/wastewater field will be produced.”
• CFD for Wastewater LinkedIn Group
IWA CFD Working GroupManagement Team
IWA CFD Working GroupWork Products• Published Papers
• Good Modelling Practice in Applying Computational Fluid Dynamics for WWTP Modelling, WEFTEC 2012• A protocol for the use of computational fluid dynamics as a supportive tool for wastewater treatment plant
modelling, WST• Computational Fluid Dynamics: an important modelling tool for the water sector, IWC Conference• Good Modelling Practice in Applying Computational Fluid Dynamics for WWTP Modelling, WST
• Submitted Papers• CFD for Wastewater: An Overview, WST
• Workshops• WEFTEC 2012• WWTMod 2012• Watermatex 2015• WEFTEC 2016
• Book Projects• IWA Scientific and Technical Report• CFD for Water Book for Students and Practitioners
There is also a LinkedIn GroupCFD for Wastewater
What can be done with CFD?WRRF Examples