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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4345 - (show annotations)
Fri Mar 29 07:09:41 2013 UTC (5 years, 5 months ago) by jfenwick
File MIME type: text/x-python
File size: 1428 byte(s)
Spelling fixes
1 ##############################################################################
2 #
3 # Copyright (c) 2003-2013 by University of Queensland
4 # http://www.uq.edu.au
5 #
6 # Primary Business: Queensland, Australia
7 # Licensed under the Open Software License version 3.0
8 # http://www.opensource.org/licenses/osl-3.0.php
9 #
10 # Development until 2012 by Earth Systems Science Computational Center (ESSCC)
11 # Development since 2012 by School of Earth Sciences
12 #
13 ##############################################################################
14
15 __copyright__="""Copyright (c) 2003-2013 by University of Queensland
16 http://www.uq.edu.au
17 Primary Business: Queensland, Australia"""
18 __license__="""Licensed under the Open Software License version 3.0
19 http://www.opensource.org/licenses/osl-3.0.php"""
20 __url__="https://launchpad.net/escript-finley"
21
22 # $Id:$
23
24 from esys.escript import *
25 from esys.finley import Rectangle
26 from esys.weipa import saveVTK
27 from esys.escript.models import StokesProblemCartesian
28 NE=25
29 dom = Rectangle(NE,NE,order=-1, useElementsOnFace=0) # use macro elements for pressure
30 x = dom.getX()
31 sc=StokesProblemCartesian(dom)
32 mask= (whereZero(x[0])*[1.,0]+whereZero(x[0]-1))*[1.,0] + (whereZero(x[1])*[0.,1.]+whereZero(x[1]-1))*[1.,1]
33 sc.initialize(eta=.01, fixed_u_mask= mask)
34 v=Vector(0.,Solution(dom))
35 v[0]+=whereZero(x[1]-1.)
36 p=Scalar(0.,ReducedSolution(dom))
37 v,p=sc.solve(v,p, verbose=True)
38 saveVTK("u.vtu",velocity=v,pressure=p)
39

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/py3_attempt2/doc/examples/usersguide/lid_driven_cavity.py:3871-3891 /branches/restext/doc/examples/usersguide/lit_driven_cavity.py:2610-2624 /branches/ripleygmg_from_3668/doc/examples/usersguide/lid_driven_cavity.py:3669-3791 /branches/symbolic_from_3470/doc/examples/usersguide/lid_driven_cavity.py:3471-3974 /branches/symbolic_from_3470/ripley/test/python/doc/examples/usersguide/lid_driven_cavity.py:3517-3974 /trunk/doc/examples/usersguide/lid_driven_cavity.py:4257-4344 /trunk/ripley/test/python/doc/examples/usersguide/lid_driven_cavity.py:3480-3515

  ViewVC Help
Powered by ViewVC 1.1.26