/[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 1312 - (show annotations)
Mon Sep 24 06:18:44 2007 UTC (12 years, 9 months ago) by ksteube
File MIME type: text/x-python
File size: 1904 byte(s)
The MPI branch is hereby closed. All future work should be in trunk.

Previously in revision 1295 I merged the latest changes to trunk into trunk-mpi-branch.
In this revision I copied all files from trunk-mpi-branch over the corresponding
trunk files. I did not use 'svn merge', it was a copy.

1 #
2 # $Id$
3 #
4 #######################################################
5 #
6 # Copyright 2003-2007 by ACceSS MNRF
7 # Copyright 2007 by University of Queensland
8 #
9 # http://esscc.uq.edu.au
10 # Primary Business: Queensland, Australia
11 # Licensed under the Open Software License version 3.0
12 # http://www.opensource.org/licenses/osl-3.0.php
13 #
14 #######################################################
15 #
16
17 #
18 # small test problem fro temperture advection:
19 #
20 # p=(x0+x1)*t
21 #
22 __copyright__=""" Copyright (c) 2006 by ACcESS MNRF
23 http://www.access.edu.au
24 Primary Business: Queensland, Australia"""
25 __license__="""Licensed under the Open Software License version 3.0
26 http://www.opensource.org/licenses/osl-3.0.php"""
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