1 |
""" |
""" |
2 |
seismic wave propagation domain |
block with some fualts |
3 |
|
|
4 |
@var __author__: name of author |
@var __author__: name of author |
5 |
@var __licence__: licence agreement |
@var __licence__: licence agreement |
20 |
__date__="$Date$" |
__date__="$Date$" |
21 |
|
|
22 |
from esys.pycad import * |
from esys.pycad import * |
23 |
from esys.pycad.shapes import Brick |
from esys.pycad.gmsh import Design |
24 |
|
from esys.finley import MakeDomain |
25 |
|
|
26 |
l=100000. # width and length m (without obsorber) |
l=100000. # width and length m (without obsorber) |
27 |
h=30000. # width and length m (without obsorber) |
h=30000. # width and length m (without obsorber) |
28 |
d_absorber=l*0.10 # thickness of absorbing layer |
d_absorber=l*0.10 # thickness of absorbing layer |
29 |
|
|
30 |
b=Brick(Point(0.,0.,-h),Point(l,l,0.)) |
b=Brick(Point(0.,0.,-h),Point(l,l,0.)) |
31 |
p1=Point(l/5,l/5,-2*h/3,local_scale=0.3) |
p1=Point(l/5,l/5,-2*h/3) |
32 |
p2=p1+[l/5,l/5,0.] |
p2=p1+[l/5,l/5,0.] |
33 |
p3=p2+[0,0.,h/5] |
p3=p2+[0,0.,h/5] |
34 |
p4=p3+[-l/5,-l/5,0.] |
p4=p3+[-l/5,-l/5,0.] |
37 |
l3=Line(p3,p4) |
l3=Line(p3,p4) |
38 |
l4=Line(p4,p1) |
l4=Line(p4,p1) |
39 |
c1=CurveLoop(l1,l2,l3,l4) |
c1=CurveLoop(l1,l2,l3,l4) |
40 |
|
c1.setLocalScale(0.1) |
41 |
q1=Point(2*l/3,2*l/3,-2*h/3,local_scale=0.3) |
q1=Point(2*l/3,2*l/3,-2*h/3,local_scale=0.3) |
42 |
q2=q1+[-l/4,l/4,0.] |
q2=q1+[-l/4,l/4,0.] |
43 |
q3=q2+[0,0.,h/3] |
q3=q2+[0,0.,h/3] |
47 |
m3=Line(q3,q4) |
m3=Line(q3,q4) |
48 |
m4=Line(q4,q1) |
m4=Line(q4,q1) |
49 |
c2=CurveLoop(m1,m2,m3,m4) |
c2=CurveLoop(m1,m2,m3,m4) |
50 |
b.addSurface(Surface(c1),Surface(c2)) |
c2.setLocalScale(0.1) |
51 |
dsgn=Design(scale=10000.) |
dsgn=Design(element_size=h/5) |
52 |
dsgn.addPrimitives(Volume(b)) |
dsgn.addItems(Volume(SurfaceLoop(*tuple(b.getSurfaces()+[PlaneSurface(c1),PlaneSurface(c2)])))) |
53 |
f=dsgn.writeFinleyMesh("l.fly") |
dsgn.setScriptFileName("faults.geo") |
54 |
print f |
dsgn.setMeshFileName("faults.msh") |
55 |
|
dom=MakeDomain(dsgn,integrationOrder=-1, reducedIntegrationOrder=-1, optimizeLabeling=True) |
56 |
|
dom.write("faults.fly") |