/[escript]/branches/symbolic_from_3470/doc/examples/usersguide/lid_driven_cavity.py
ViewVC logotype

Contents of /branches/symbolic_from_3470/doc/examples/usersguide/lid_driven_cavity.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3789 - (show annotations)
Tue Jan 31 04:55:05 2012 UTC (7 years, 2 months ago) by caltinay
File MIME type: text/x-python
File size: 1345 byte(s)
Fast forward to latest trunk revision 3788.

1 ########################################################
2 #
3 # Copyright (c) 2003-2010 by University of Queensland
4 # Earth Systems Science Computational Center (ESSCC)
5 # http://www.uq.edu.au/esscc
6 #
7 # Primary Business: Queensland, Australia
8 # Licensed under the Open Software License version 3.0
9 # http://www.opensource.org/licenses/osl-3.0.php
10 #
11 ########################################################
12
13 __copyright__="""Copyright (c) 2003-2010 by University of Queensland
14 Earth Systems Science Computational Center (ESSCC)
15 http://www.uq.edu.au/esscc
16 Primary Business: Queensland, Australia"""
17 __license__="""Licensed under the Open Software License version 3.0
18 http://www.opensource.org/licenses/osl-3.0.php"""
19 __url__="https://launchpad.net/escript-finley"
20
21 # $Id:$
22
23 from esys.escript import *
24 from esys.finley import Rectangle
25 from esys.weipa import saveVTK
26 from esys.escript.models import StokesProblemCartesian
27 NE=25
28 dom = Rectangle(NE,NE,order=-1) # use macro elements for pressure
29 x = dom.getX()
30 sc=StokesProblemCartesian(dom)
31 mask= (whereZero(x[0])*[1.,0]+whereZero(x[0]-1))*[1.,0] + (whereZero(x[1])*[0.,1.]+whereZero(x[1]-1))*[1.,1]
32 sc.initialize(eta=.01, fixed_u_mask= mask)
33 v=Vector(0.,Solution(dom))
34 v[0]+=whereZero(x[1]-1.)
35 p=Scalar(0.,ReducedSolution(dom))
36 v,p=sc.solve(v,p, verbose=True)
37 saveVTK("u.vtu",velocity=v,pressure=p)
38

Properties

Name Value
svn:mergeinfo /branches/lapack2681/doc/examples/usersguide/lit_driven_cavity.py:2682-2741 /branches/pasowrap/doc/examples/usersguide/lid_driven_cavity.py:3661-3674 /branches/restext/doc/examples/usersguide/lit_driven_cavity.py:2610-2624 /trunk/doc/examples/usersguide/lid_driven_cavity.py:3471-3788

  ViewVC Help
Powered by ViewVC 1.1.26