/[escript]/trunk/doc/examples/usersguide/lit_driven_cavity.py
ViewVC logotype

Annotation of /trunk/doc/examples/usersguide/lit_driven_cavity.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2549 - (hide annotations)
Mon Jul 20 06:43:47 2009 UTC (12 years, 2 months ago) by jfenwick
File MIME type: text/x-python
File size: 1278 byte(s)
Remainder of copyright date fixes
1 gross 2100 ########################################################
2     #
3 jfenwick 2548 # Copyright (c) 2003-2009 by University of Queensland
4 gross 2100 # 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 jfenwick 2549 __copyright__="""Copyright (c) 2003-2009 by University of Queensland
14 gross 2100 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 jfenwick 2344 __url__="https://launchpad.net/escript-finley"
20 gross 2100
21     # $Id:$
22    
23     from esys.escript import *
24     from esys.finley import Rectangle
25     from esys.escript.models import StokesProblemCartesian
26     NE=25
27     dom = Rectangle(NE,NE,order=2)
28     x = dom.getX()
29     sc=StokesProblemCartesian(dom)
30     mask= (whereZero(x[0])*[1.,0]+whereZero(x[0]-1))*[1.,0] + (whereZero(x[1])*[0.,1.]+whereZero(x[1]-1))*[1.,1]
31     sc.initialize(eta=.01, fixed_u_mask= mask)
32     v=Vector(0.,Solution(dom))
33     v[0]+=whereZero(x[1]-1.)
34     p=Scalar(0.,ReducedSolution(dom))
35     v,p=sc.solve(v,p, verbose=True)
36 caltinay 2534 saveVTK("u.vtu",velocity=v,pressure=p)
37    

Properties

Name Value
svn:mergeinfo

  ViewVC Help
Powered by ViewVC 1.1.26