/[escript]/trunk/pycad/examples/faults.py
ViewVC logotype

Contents of /trunk/pycad/examples/faults.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 899 - (show annotations)
Mon Nov 13 08:02:24 2006 UTC (16 years, 4 months ago) by gross
Original Path: trunk/pycad/examples/structure.py
File MIME type: text/x-python
File size: 1422 byte(s)
a first very basic version of pycad
1 """
2 seismic wave propagation domain
3
4 @var __author__: name of author
5 @var __licence__: licence agreement
6 @var __url__: url entry point on documentation
7 @var __version__: version
8 @var __date__: date of the version
9 """
10
11
12 __copyright__=""" Copyright (c) 2006 by ACcESS MNRF
13 http://www.access.edu.au
14 Primary Business: Queensland, Australia"""
15 __license__="""Licensed under the Open Software License version 3.0
16 http://www.opensource.org/licenses/osl-3.0.php"""
17 __author__="Lutz Gross, l.gross@uq.edu.au"
18 __url__="http://www.iservo.edu.au/esys/escript"
19 __version__="$Revision$"
20 __date__="$Date$"
21
22 from esys.pycad import *
23 from esys.pycad.shapes import Brick
24
25 l=100000. # width and length m (without obsorber)
26 h=30000. # width and length m (without obsorber)
27 d_absorber=l*0.10 # thickness of absorbing layer
28
29 b=Brick(Point(0.,0.,-h),Point(l,l,0.))
30 p1=Point(l/5,l/5,-2*h/3,local_scale=0.3)
31 p2=p1+[l/5,l/5,0.]
32 p3=p2+[0,0.,h/5]
33 p4=p3+[-l/5,-l/5,0.]
34 l1=Line(p1,p2)
35 l2=Line(p2,p3)
36 l3=Line(p3,p4)
37 l4=Line(p4,p1)
38 c1=CurveLoop(l1,l2,l3,l4)
39 q1=Point(2*l/3,2*l/3,-2*h/3,local_scale=0.3)
40 q2=q1+[-l/4,l/4,0.]
41 q3=q2+[0,0.,h/3]
42 q4=q3+[l/4,-l/4,0.]
43 m1=Line(q1,q2)
44 m2=Line(q2,q3)
45 m3=Line(q3,q4)
46 m4=Line(q4,q1)
47 c2=CurveLoop(m1,m2,m3,m4)
48 b.addSurface(Surface(c1),Surface(c2))
49 dsgn=Design(scale=10000.)
50 dsgn.addPrimitives(Volume(b))
51 f=dsgn.writeFinleyMesh("l.fly")
52 print f

  ViewVC Help
Powered by ViewVC 1.1.26