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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 821 - (hide annotations)
Mon Aug 28 08:36:30 2006 UTC (14 years ago) by gross
File MIME type: text/x-python
File size: 1621 byte(s)
and some more work on drucker-prager
1 gross 821 # $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
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     dom.displacement=Link(m,"displacement")
55    
56     s=Simulation([sq,dom,cv,m],debug=True)
57     s.run()

  ViewVC Help
Powered by ViewVC 1.1.26