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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 823 - (show annotations)
Tue Aug 29 02:05:59 2006 UTC (13 years, 10 months ago) by gross
File MIME type: text/x-python
File size: 1687 byte(s)
geometry.py is back to the way it was.
1 # $Id$
2
3 __copyright__=""" Copyright (c) 2006 by ACcESS MNRF
4 http://www.access.edu.au
5 Primary Business: Queensland, Australia"""
6 __license__="""Licensed under the Open Software License version 3.0
7 http://www.opensource.org/licenses/osl-3.0.php"""
8
9 # run by scons build/posix/modellib/test/python/drucker_prager.passed from check out cd.
10
11 from esys.modellib.mechanics import DruckerPrager
12 from esys.escript.modelframe import Link,Simulation
13 from esys.modellib.geometry import RectangularDomain, VectorConstrainer, UpdateGeometry
14 from esys.modellib.input import Sequencer, InterpolateOverBox
15
16 debug=True
17
18 dom=RectangularDomain(debug)
19 dom.order=1
20
21
22 sq=Sequencer(debug)
23 sq.t=0
24 sq.t_end=1.
25 sq.dt_max=0.1
26
27 iob=InterpolateOverBox(debug)
28 iob.domain=Link(dom,"domain")
29 iob.value_left_bottom_front=[1.,0.,0.]
30 iob.value_right_bottom_front=[0.,0.,0.]
31 iob.value_left_bottom_back=[1.,0.,0.]
32 iob.value_right_bottom_back=[0.,0.,0.]
33 iob.value_left_top_front=[1.,0.,0.]
34 iob.value_right_top_front=[0.,0.,0.]
35 iob.value_left_top_back=[1.,0.,0.]
36 iob.value_right_top_back=[0.,0.,0.]
37
38 m=DruckerPrager(debug)
39 m.domain=Link(dom,"domain")
40
41 cv=VectorConstrainer(debug)
42 cv.domain=Link(dom,"domain")
43 cv.value=Link(iob,"out")
44 cv.left=[True, False, False]
45 cv.top= [False, False, False]
46 cv.bottom= [False, False, False]
47 cv.front= [False, False, False]
48 cv.back= [False, False, False]
49 cv.right= [True, True, True]
50
51 m.prescribed_velocity=Link(cv,"value_of_constraint")
52 m.location_prescribed_velocity=Link(cv,"location_of_constraint")
53
54
55 ug=UpdateGeometry(debug)
56 ug.domain=Link(dom,"domain")
57 ug.displacement=Link(m,"displacement")
58
59 s=Simulation([sq,m,ug],debug=True)
60 s.run()

  ViewVC Help
Powered by ViewVC 1.1.26