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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.26