/[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 825 - (show annotations)
Tue Aug 29 06:59:27 2006 UTC (14 years ago) by gross
File MIME type: text/x-python
File size: 1861 byte(s)
and more on Drucker Prager
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
45 cv.left=[True, False, False]
46 cv.right= [True, False, False]
47 cv.bottom= [False, True, False]
48 cv.top= [False, False, False]
49 cv.front= [False, False, True]
50 cv.back= [False, False, False]
51
52 m.prescribed_velocity=Link(cv,"value_of_constraint")
53 m.location_prescribed_velocity=Link(cv,"location_of_constraint")
54
55 m.expansion_coefficient= 0.
56 m.bulk_modulus=100.
57 m.shear_modulus=1.
58 m.plastic_stress=0.
59 m.friction_parameter=0.
60 m.dilatancy_parameter=0.
61 m.shear_length=m.shear_modulus*100.
62
63
64 ug=UpdateGeometry(debug)
65 ug.domain=Link(dom,"domain")
66 ug.displacement=Link(m,"displacement")
67
68 s=Simulation([sq,m,ug],debug=True)
69 s.run()

  ViewVC Help
Powered by ViewVC 1.1.26