# Contents of /trunk/modellib/test/python/run_flow.py

Revision 2344 - (show annotations)
Mon Mar 30 02:13:58 2009 UTC (10 years, 5 months ago) by jfenwick
File MIME type: text/x-python
File size: 1948 byte(s)
```Change __url__ to launchpad site

```
 1 2 ######################################################## 3 # 4 # Copyright (c) 2003-2008 by University of Queensland 5 # Earth Systems Science Computational Center (ESSCC) 6 7 # 8 # Primary Business: Queensland, Australia 9 # Licensed under the Open Software License version 3.0 10 11 # 12 ######################################################## 13 14 __copyright__="""Copyright (c) 2003-2008 by University of Queensland 15 Earth Systems Science Computational Center (ESSCC) 16 http://www.uq.edu.au/esscc 17 Primary Business: Queensland, Australia""" 18 __license__="""Licensed under the Open Software License version 3.0 19 20 __url__= 21 22 # 23 # small test problem fro temperture advection: 24 # 25 # p=(x0+x1)*t 26 # 27 28 import os 29 from esys.escript.modelframe import Link,Simulation 30 from esys.modellib.geometry import RectangularDomain,VectorConstrainerOverBox 31 from esys.modellib.input import Sequencer 32 from esys.modellib.probe import Probe,EvaluateExpression 33 from esys.modellib.flow import SteadyIncompressibleFlow 34 35 dom=RectangularDomain() 36 dom.order=2 37 38 constraints=VectorConstrainerOverBox() 39 constraints.domain=Link(dom) 40 constraints.left=[1,0,0] 41 constraints.right=[1,0,0] 42 constraints.top=[0,1,0] 43 constraints.bottom=[0,1,0] 44 constraints.front=[0,0,1] 45 constraints.back=[0,0,1] 46 47 sqe=Sequencer() 48 sqe.dt_max=0.5 49 sqe.t_end=1. 50 51 source=EvaluateExpression() 52 source.domain=Link(dom) 53 source.t=Link(sqe) 54 source.expression=["t","t"] 55 56 flow=SteadyIncompressibleFlow() 57 flow.domain=Link(dom,"domain") 58 flow.internal_force=Link(source,"out") 59 flow.location_prescribed_velocity=Link(constraints,"location_of_constraint") 60 flow.prescribed_velocity=[0.,0.] 61 62 ptest=Probe() 63 ptest.expression="(x[0]+x[1]-1.)*t" 64 ptest.t=Link(sqe) 65 ptest.value=Link(flow,"pressure") 66 67 s=Simulation([sqe,constraints,Simulation([flow],debug=True),ptest],debug=True) 68 s.writeXML() 69 s.run()

## Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

 ViewVC Help Powered by ViewVC 1.1.26