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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1809 - (hide annotations)
Thu Sep 25 06:43:44 2008 UTC (12 years, 10 months ago) by ksteube
File MIME type: text/x-python
File size: 2040 byte(s)
Copyright updated in all python files

1 ksteube 1809
2     ########################################################
3 ksteube 1312 #
4 ksteube 1809 # Copyright (c) 2003-2008 by University of Queensland
5     # Earth Systems Science Computational Center (ESSCC)
6     # http://www.uq.edu.au/esscc
7 ksteube 1312 #
8 ksteube 1809 # Primary Business: Queensland, Australia
9     # Licensed under the Open Software License version 3.0
10     # http://www.opensource.org/licenses/osl-3.0.php
11 ksteube 1312 #
12 ksteube 1809 ########################################################
13 ksteube 1312
14 ksteube 1809 __copyright__="""Copyright (c) 2003-2008 by University of Queensland
15     Earth Systems Science Computational Center (ESSCC)
16     http://www.uq.edu.au/esscc
17     Primary Business: Queensland, Australia"""
18     __license__="""Licensed under the Open Software License version 3.0
19     http://www.opensource.org/licenses/osl-3.0.php"""
20     __url__="http://www.uq.edu.au/esscc/escript-finley"
21    
22 gross 899 """
23 gross 955 block with some fualts
24 gross 899
25     @var __author__: name of author
26     @var __licence__: licence agreement
27     @var __url__: url entry point on documentation
28     @var __version__: version
29     @var __date__: date of the version
30     """
31    
32     __author__="Lutz Gross, l.gross@uq.edu.au"
33    
34     from esys.pycad import *
35 gross 932 from esys.pycad.gmsh import Design
36 gross 955 from esys.finley import MakeDomain
37 gross 899
38     l=100000. # width and length m (without obsorber)
39     h=30000. # width and length m (without obsorber)
40     d_absorber=l*0.10 # thickness of absorbing layer
41    
42     b=Brick(Point(0.,0.,-h),Point(l,l,0.))
43 gross 932 p1=Point(l/5,l/5,-2*h/3)
44 gross 899 p2=p1+[l/5,l/5,0.]
45     p3=p2+[0,0.,h/5]
46     p4=p3+[-l/5,-l/5,0.]
47     l1=Line(p1,p2)
48     l2=Line(p2,p3)
49     l3=Line(p3,p4)
50     l4=Line(p4,p1)
51     c1=CurveLoop(l1,l2,l3,l4)
52 gross 932 c1.setLocalScale(0.1)
53 gross 899 q1=Point(2*l/3,2*l/3,-2*h/3,local_scale=0.3)
54     q2=q1+[-l/4,l/4,0.]
55     q3=q2+[0,0.,h/3]
56     q4=q3+[l/4,-l/4,0.]
57     m1=Line(q1,q2)
58     m2=Line(q2,q3)
59     m3=Line(q3,q4)
60     m4=Line(q4,q1)
61     c2=CurveLoop(m1,m2,m3,m4)
62 gross 932 c2.setLocalScale(0.1)
63 gross 955 dsgn=Design(element_size=h/5)
64 gross 932 dsgn.addItems(Volume(SurfaceLoop(*tuple(b.getSurfaces()+[PlaneSurface(c1),PlaneSurface(c2)]))))
65 gross 955 dsgn.setScriptFileName("faults.geo")
66     dsgn.setMeshFileName("faults.msh")
67     dom=MakeDomain(dsgn,integrationOrder=-1, reducedIntegrationOrder=-1, optimizeLabeling=True)
68     dom.write("faults.fly")

  ViewVC Help
Powered by ViewVC 1.1.26