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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 150 - (hide annotations)
Thu Sep 15 03:44:45 2005 UTC (17 years, 6 months ago) by jgs
Original Path: trunk/esys2/modellib/test/python/flow_test.py
File MIME type: text/x-python
File size: 1154 byte(s)
Merge of development branch dev-02 back to main trunk on 2005-09-15

1 jgs 147 # $Id$
2    
3     #
4     # small test problem fro temperture advection:
5     #
6     # p=(x0+x1)*t
7     #
8 jgs 150 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 jgs 147
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 jgs 148 s=Simulation([dom,sqe,Simulation([flow],debug=True),ptest],debug=True)
47 jgs 147 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