# Diff of /trunk/doc/examples/usersguide/fluid.py

revision 2742 by jfenwick, Thu Nov 12 06:03:37 2009 UTC revision 2793 by gross, Tue Dec 1 06:10:10 2009 UTC
# Line 37  useUzawa='TRUE' Line 37  useUzawa='TRUE'
37  H=2.0  H=2.0
38  L=1.0  L=1.0
39  W=1.0  W=1.0
40  mesh = esys.finley.Rectangle(l0=L, l1=H, order=2, n0=20, n1=20)  mesh = esys.finley.Rectangle(l0=L, l1=H, order=-1, n0=20, n1=20) # use linear macro elements for pressure
41  coordinates = mesh.getX()  coordinates = mesh.getX()
42
43  #gravitational force  #gravitational force
# Line 48  Y[1]=-rho*g Line 48  Y[1]=-rho*g
48  h=Lsup(mesh.getSize())  h=Lsup(mesh.getSize())
49
50  #boundary conditions for slip at base  #boundary conditions for slip at base
51  boundary_cond=whereZero(coordinates[1])*[0.0,1.0]  boundary_cond=whereZero(coordinates[1])*[0.0,1.0]+whereZero(coordinates[0])*[1.0,0.0]
52
53  #velocity and pressure vectors  #velocity and pressure vectors
54  velocity=Vector(0.0, ContinuousFunction(mesh))  velocity=Vector(0.0, Solution(mesh))
55  pressure=Scalar(0.0, ContinuousFunction(mesh))  pressure=Scalar(0.0, ReducedSolution(mesh))
56
57  #Stokes Cartesian  #Stokes Cartesian
58  solution=StokesProblemCartesian(mesh)  solution=StokesProblemCartesian(mesh)

Legend:
 Removed from v.2742 changed lines Added in v.2793