Civil and Sanitary Engineer Bainbridge Island, WA US · 6/1/2015 · Civil and Sanitary Engineer...
Transcript of Civil and Sanitary Engineer Bainbridge Island, WA US · 6/1/2015 · Civil and Sanitary Engineer...
11/11/2017
1
Randal W. Samstag, MS, PE, BCEE
Civil and Sanitary Engineer
Bainbridge Island, WA US
To gain some understanding ofhow computational fluiddynamics (CFD) can help us tobetter understand waterresource recovery facilitiesusing an open source tool.
11/11/2017
2
“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 and to improve designsand operation.
T IM E T O P IC IN S T R U CT O R A N D A FFIL IAT IO N
8:30 to9:15 W elcom eandIntroductiontoCFD forW R R F
R andalS am stag,CivilandS anitaryEngineer
9:15to10:00 GoodM odeling P racticeforCFD Edw ardW icklein,CarolloEngineers
10:00 to10:30 Break
10:30 to12:00 IntroductiontoCFD using O penFO A M N elsonM arques,blueCA P E
12:00 to1:30 L unch
1:30 to3:00 GettingS tartedw ithO penFO A M :Exam pleCase(P arshallflum e)-S etup,M eshing,P reP rocessing,S im ulationandP ostP rocessing
N elsonM arques,blueCA P E
3:00 to3:30 Break
3:30 to4:00 CFD forflow splitting Edw ardW icklein,CarolloEngineers
4:00 to5:00 O penFO A M case:Flow S plitting N elsonM arques,blueCA P E
11/11/2017
3
T IM E T O P IC IN S T R U CT O R A N D A FFIL IAT IO N8:30 to9:00 W elcom eandBriefIntroductiontoCFD for
W R R Fandinstallationofsoftw areforparticipantsw hocouldnotattendDay O ne
R andalS am stag,CivilandS anitary EngineerN elsonM arques,blueCA P E
9:00 to9:30 CFD form ixing Edw ardW icklein,CarolloEngineersS tephenS aunders,IBIS GroupCFD
9:30 to10:00 O penFO A M casestudy:M ixing N elsonM arques,blueCA P E
10:00 to10:30 Break10:30 to11:00 CFD forS edim entation:CalibrationM odeling
andVerificationA lonsoGriborio,HazenandS aw yer
11:00 to12:00 O penFO A M casestudy:S edim entation N elsonM arques,blueCA P E
12:00 to1:30 L unch
1:30 to2:00 CFD ofDisinfectionFacilities Edw ardW ickleinandS tephenS aunders2:00 to3:00 O penFO A M casestudy:U ltraviolet
DisinfectionN elsonM arques,blueCA P E
3:00 to3:30 Break3:30 to4:45 O penFO A M advancedtopics:M aking your
ow ncasesN elsonM arques,blueCA P E
4:45to5:00 W rap-upandA djourn R andalS am stag,CivilandS anitary Engineer
• 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.”
11/11/2017
4
• 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 (2016)• CFD for Wastewater: An Overview, WST (2016)
• Workshops• WEFTEC 2012 (Fluent)• WWTMod 2012• Watermatex 2015 (OpenFOAM)• WEFTEC 2016 (Flow-3D)• WEFTEC 2017 (OpenFOAM)
• Book Projects• IWA Scientific and Technical Report• CFD for Water Book for Students and Practitioners
11/11/2017
6
Randal W. Samstag, MS, PE, BCEE
Civil and Sanitary Engineer
Bainbridge Island, WA US
• What is CFD?
• How is it done?
• What is it good for?
• Conclusions
11/11/2017
7
What is CFD (computational fluid dynamics)?
“ . . . flows and related phenomena can be described by partialdifferential equations, which cannot be solved analytically except inspecial cases. To obtain an approximate solution numerically, we have touse a discretization method which approximates the differentialequations by a system of algebraic equations, which can then be solvedon the computer.” - Ferziger and Peric (2002) Com putationalT echniquesforFluidDynam ics, 3rd Edition, Springer.
“Computational fluid dynamics, then, is a separate discipline, distinctfrom and supplementing both experimental and theoretical fluiddynamics, with its own techniques, its own difficulties, and its ownrealm of utility, offering new perspectives in the study of physicalprocesses.” - Roach, P.J. (1982) Com putationalFluidDynam ics, HermosaPublishers.
CFD solves the Navier-Stokes Equations by numerical schemes.
• Continuity Equation: Law of MassConservation
• Momentum Equations: Newton’s SecondLaw (incompressible laminar flow)
0
i
i
x
U
t
ii
ij
ij
i Fx
U
x
P
x
UU
t
U
j
2
21
11/11/2017
8
r
ri
ij
i
irj
ij
i gxx
U
x
P
x
UU
t
U
)(1 2
Unsteady Term
Advective TermPressure Term
Diffusion TermSource Term(gravity force)
S
xxxU
t jii
i
2
Advection DiffusionUnsteady Source
11/11/2017
9
What about turbulence? One way to model it is to usethe Reynolds averaged Navier-Stokes equations (RANS).
• All flow in WRRF is turbulent.
• Turbulent flow is variable inspace and time
• Osborne Reynolds suggestedthat turbulent flow could beconsidered as a composite of anaverage part and a fluctuatingpart.
See Henze, J. O. (1975) Turbulence, 2nd Ed, McGraw-Hill.
r
riji
j
i
jij
ij
i guux
U
xx
P
x
UU
t
U
1
Suxxx
Ut
i
ijj
j
Rodi (1980) T urbulenceM odelsandT heirApplicationinHydraulics:A state-of-theartreview,IAHR /AIR H.
11/11/2017
10
Rodi (1980) T urbulenceM odelsandT heirApplicationinHydraulics:A state-of-theartreview,IAHR /AIR H.
• Simplest model: Prandtl’s Mixing Length Hypothesis (Plane mixing layer,width δ)
• Two Equation Models: k – epsilon
y
ul mt
2
G
it
ti
P
j
i
i
j
j
it
ik
t
ii
ix
gx
U
x
U
x
U
x
k
xx
kU
t
k
S
kCRcGP
kC
xxxU
tf
i
t
ii
i
2
231 1)(
2kCt
0 7.0
ml
Rodi (1980) T urbulenceM odelsandT heirApplicationinHydraulics:A state-of-theartreview,IAHR /AIR H.
11/11/2017
11
RANS Simulation (Steady State) LES Simulation (Transient)
• 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.
11/11/2017
12
xg
y
u
x
u
x
p
y
uv
x
u
t
u
2
2
2
22 )(
y
vuvu jijijiji
))(())(( 2/1,2/12/1,2/12/1,2/12/1,2/1
Horizontal Momentum Eqn.
t
uu nji
nji ,2/1
1,2/1
x
jijijijijjg
y
uuu
x
u
2
,2/11,2/11,2/1
2
,2/3,/21-1,/23-1 22uu
Finite Difference Equivalent
x
uu jiji2
,12,
x
pp jiji
,1,
Harlow, F.H. and Welch, J. E. (1965) Numerical Calculation of Time-Dependent ViscousIncompressible Flow of Fluid with Free Surface, P hysicsofFluids, V. 8 Number 12.
• Interpolate the velocity and pressure fields
• Substitute interpolations into the governing equations.• Continuity
• X/Y momentum
• Solve the system of equations iteratively
nuul
ull , nvv
l
vll , npp
l
pll ,
Fletcher, C.A.J (2006) Com putationalT echniquesforFluidDynam ics, Volum eII, 2nd Ed. Springer-Verlag.
11/11/2017
13
pj,k
uj,kuj-1,k
v,j,k-1
vj,k
Continuity Eqn.
pj,kuj-1,k
vj+1,k-1
x Momentum Eqn.
pj+1,k
uj+1,kuj,k
vj,k
vj,k-1
vi+1,k+1
pj,k+1
uj-1,k
vj+1,k
y Momentum Eqn.
pi,k
uj+1,k
vj,k
vj,k+1
Vj,k-1
uj,k
uj,k+1uj-1,k+1
Patankar, S. V. (1980) N um ericalHeatT ransferandFluidFlow , Hemisphere Publishing.
Vi-1,k
• Vortex Methods• Developed by Chorin
• Random walk of “vortex blobs”
• SPH• “Lagrangian” method developed
from astrophysics
PEREIRA, L. A. A.; HIRATA, M. H. and SILVEIRA NETO, A.. Vortex methodwith turbulence sub-grid scale modelling. J.Braz.S oc.M ech.S ci.& Eng.[online]. 2003, vol.25, n.2 [cited 2015-05-01], pp. 140-146 .
11/11/2017
14
• Transform the governing equations:• Vorticity / stream function method
• Use iteration and convergence• SIMPLE
Both of these methods have been used in CFD for wastewater.
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
Roach, P.J. (1982) Com putationalFluidDynam ics, Hermosa Publishers.
0Re
1)()(2
2
2
2
yxy
v
x
v
t
11/11/2017
15
• 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, S. V., (1980) N um ericalHeatT ransferandFluidFlow .
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)
11/11/2017
16
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
0
y
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.
0
y
v
x
u
t
u
• An elementary tutorial inOpenFOAM is based on VOFmethod using the interFoamsolver.
• The famous dam break problemwas simulated first using theMAC method by Harlow andWelsh.
• This simulation using a RANSturbulence approach.
11/11/2017
17
3D transport models can be implemented for wastewaterquality parameters as well.
Biokinetic Models• ASM Models
• Advanced oxidation Models
• Disinfection models
Sobremisana, Ducoste and de los Reyes III (2011)
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) M ultiphaseFlow sw ithDropletsandP articles.
11/11/2017
18
Mixture Continuity Equation
Drift Equation
Mixture Momentum Equation
Brennan, D. (2001) T heN um ericalS im ulationofT w o-P haseFlow sinS ettling T anks,PhD Dissertation,University of London.
Wicklein et al. (2016) Good modellingpractice in applying computational fluiddynamics for WWTP modelling,W S T , 73 (5) 969-982.
11/11/2017
19
• Hand Coded• Fortran• C++
• Commercial platforms (Examples)• ANSYS (Fluent and CFX)• Cd-adapco (STAR-CCM+ and STAR-CD)• FLOW Science (FLOW-3D)• COMSOL Multiphysics• CHAM (PHOENICS)
• Open source platforms• OpenFOAM
11/11/2017
21
What can be done with CFD?Wastewater Treatment Examples
Samstag et al. (2016) CFD for Wastewater: An Overview, Water Science and Technology, 74 (3), 549–563.
11/11/2017
22
• Parshall Flume (Day 1)
• Splitter Box (Day 1)
• Mixing Tank (Day 2)
• Clarifier (Day 2)
• UV Disinfection (Day 2)
11/11/2017
23
• Improve flow and solids splitting in distribution channels
• Optimize tank geometry• Evaluation of the impacts of reactor geometry on performance
• Evaluation of location for control sensors
• Evaluate the impacts of mixing on performance
• Verify simpler models
• Improve basic understanding of process behavior
11/11/2017
24
• Ferziger, J.H. and Peric, M. (2002) Com putationalT echniquesforFluidDynam ics, 3rd Edition, Springer.
• Roach, P.J. (1982) Com putationalFluidDynam ics, Hermosa Publishers. rt and Nichols (1981) , Volume of Fluid Method, Los Alamos Scientific Laboratory, LosAlamos, NM.
• Henze, J.O. (1975) T urbulence, 2nd Ed, McGraw-Hill
• Rodi (1980) T urbulenceM odelsandT heirApplicationinHydraulics:A state-of-theartreview , IAHR / AIRH.
• Harlow, F.H. and Welch, J.E. (1965) Numerical Calculation of Time-Dependent Viscous Incompressible Flow of Fluid with Free Surface, P hysicsofFluids, V. 8 Number12.
• Finlayson, B. (1980) N onlinearAnalysisinChem icalEngineering,M cGraw -Hill.
• Patankar, S. V. (1980) N um ericalHeatT ransferandFluidFlow , Hemisphere Publishing.
• Chorin, A.J. (1989) Com putationalFluidM echanics, Academic Press.
• Samstag, R.W., McCorquodale, J.A. and Zhou, S.P. (1992) Prospects for transport modeling of process tanks, W aterS cienceandT echnology. 26 (5/6), 1401-1410.
• Hirt and Nichols (1981) , Volume of Fluid Method, Los Alamos Scientific Laboratory, Los Alamos, NM.
• Sobremisana, Ducoste, and de los Reyes III 2011 Combining CFD, floc dynamics, and biological reaction kinetics to model carbon and nitrogen removal in anactivated sludge system. Water Environment Conference, WEFTEC Conference.
• Crowe, Sommerfield, and Tusji (1998) M ultiphaseFlow sw ithDropletsandP articles.
• Wicklein, E., Batstone, D.J., Ducoste, J., Laurent, J., Griborio, A., Wicks, J., Saunders, S., Samstag, R., Potier, O. and Nopens, I. 2016 Good modelling practice inapplying computational fluid dynamics for WWTP modelling. W aterS cienceandT echnology. 73 (5) 969-982.
• R. W. Samstag, J. J. Ducoste, A. Griborio, I. Nopens, D. J. Batstone, J. D. Wicks, S. Saunders, E. A. Wicklein, G. Kenny and J. Lauren (2016) CFD for Wastewater: AnOverview, W aterS cienceandT echnology,74 (3), 549–563.
Web: http://rsamstag.com/
Phone: +1 (206) 851-0094
Email: [email protected]