# Diff of /trunk/doc/user/stokesflow.tex

revision 3378 by caltinay, Fri Nov 12 05:55:50 2010 UTC revision 3379 by gross, Wed Nov 24 04:48:49 2010 UTC
# Line 73  The Stokes equation is a saddle point pr Line 73  The Stokes equation is a saddle point pr
73  A class called \class{StokesProblemCartesian} in \escript can be used to solve  A class called \class{StokesProblemCartesian} in \escript can be used to solve
74  for velocity and pressure. A more detailed discussion of the class can be  for velocity and pressure. A more detailed discussion of the class can be
75  found in Chapter \ref{MODELS CHAPTER}.  found in Chapter \ref{MODELS CHAPTER}.
76  In order to keep numerical stability and satisfy the Courant condition, the  In order to keep numerical stability and satisfy the Courant–Friedrichs–Lewy condition (CFL condition)  \index{Courant number}\index{CFL condition}, the
77  time-step size needs to be kept below a certain value.  time-step size needs to be kept below a certain value.
78  The Courant number is defined as:  The Courant number \index{Courant number} is defined as:
79  %  %
80
81  C = \frac{v \delta t}{h}  C = \frac{v \delta t}{h}
# Line 122  given computational mesh, and the solver Line 122  given computational mesh, and the solver
122  Inside the \code{while} loop, the boundary conditions, viscosity and body  Inside the \code{while} loop, the boundary conditions, viscosity and body
123  force are initialized.  force are initialized.
124  The Stokes equation is then solved for velocity and pressure.  The Stokes equation is then solved for velocity and pressure.
125  The time-step size is calculated based on the Courant condition, to ensure stable solutions.  The time-step size is calculated based on the Courant–Friedrichs–Lewy condition (CFL condition)  \index{Courant number}\index{CFL condition}, to ensure stable solutions.
126  The nodes in the mesh are then displaced based on the current velocity and  The nodes in the mesh are then displaced based on the current velocity and
127  time-step size, to move the body of fluid.  time-step size, to move the body of fluid.
128  The output for the simulation of velocity and pressure is then saved to a file  The output for the simulation of velocity and pressure is then saved to a file
# Line 183  for visualization. Line 183  for visualization.
183
184      print("Max velocity =", Lsup(velocity), "m/s")      print("Max velocity =", Lsup(velocity), "m/s")
185
186      # Courant condition      # CFL condition
187      dt=0.4*h/(Lsup(velocity))      dt=0.4*h/(Lsup(velocity))
188      print("dt =", dt)      print("dt =", dt)
189

Legend:
 Removed from v.3378 changed lines Added in v.3379