/[escript]/trunk/modellib/test/python/flow_test.py
ViewVC logotype

Contents of /trunk/modellib/test/python/flow_test.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 155 - (show annotations)
Wed Nov 9 02:02:19 2005 UTC (14 years, 11 months ago) by jgs
File MIME type: text/x-python
File size: 1154 byte(s)
move all directories from trunk/esys2 into trunk and remove esys2

1 # $Id$
2
3 #
4 # small test problem fro temperture advection:
5 #
6 # p=(x0+x1)*t
7 #
8 from esys.escript.modelframe import Link,Simulation
9 from esys.modellib.geometry import RectangularDomain,VectorConstrainer
10 from esys.modellib.input import Sequencer
11 from esys.modellib.probe import Probe,EvaluateExpression
12 from esys.modellib.flow import SteadyIncompressibleFlow
13
14 dom=RectangularDomain()
15 dom.order=2
16
17 constraints=VectorConstrainer()
18 constraints.domain=Link(dom)
19 constraints.left=[1,0,0]
20 constraints.right=[1,0,0]
21 constraints.top=[0,1,0]
22 constraints.bottom=[0,1,0]
23 constraints.front=[0,0,1]
24 constraints.back=[0,0,1]
25
26 sqe=Sequencer()
27 sqe.dt_max=0.3
28 sqe.t_end=1.
29
30 source=EvaluateExpression()
31 source.domain=Link(dom)
32 source.t=Link(sqe)
33 source.expression=["t","t"]
34
35 flow=SteadyIncompressibleFlow()
36 flow.domain=Link(dom)
37 flow.internal_force=Link(source,"out")
38 flow.location_prescribed_velocity=Link(constraints,"location_of_constraint")
39 flow.prescribed_velocity=[0.,0.]
40
41 ptest=Probe()
42 ptest.expression="(x[0]+x[1]-1.)*t"
43 ptest.t=Link(sqe)
44 ptest.value=Link(flow,"pressure")
45
46 s=Simulation([dom,sqe,Simulation([flow],debug=True),ptest],debug=True)
47 s.writeXML()
48 s.run()

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26