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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1809 - (show annotations)
Thu Sep 25 06:43:44 2008 UTC (11 years, 4 months ago) by ksteube
File MIME type: text/x-python
File size: 2241 byte(s)
Copyright updated in all python files

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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26