Skip to content

Commit 5d1d3a9

Browse files
authored
Merge pull request #24 from EdCaunt/elastic_4th_order
Examples: increased space order of 2nd-order elastic examples to 4th
2 parents d121e22 + 88d8836 commit 5d1d3a9

4 files changed

Lines changed: 127 additions & 34 deletions

File tree

examples/17_elastic_2nd_order_flat_surface.ipynb

Lines changed: 33 additions & 10 deletions
Large diffs are not rendered by default.

examples/18_elastic_2nd_order_diagonal_surface.ipynb

Lines changed: 38 additions & 11 deletions
Large diffs are not rendered by default.

examples/19_elastic_2nd_order_sinusoid.ipynb

Lines changed: 38 additions & 11 deletions
Large diffs are not rendered by default.

examples/elastic_2nd_order/2D_elastic_2nd_order.py

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,22 @@ def run(sdf, s_o, nsnaps):
4848
dv.Eq(nx*mu*ux.dy + nx*mu*uy.dx
4949
+ ny*(lam+2*mu)*uy.dy + ny*lam*ux.dx, 0)]
5050

51+
if s_o >= 4:
52+
bc_list.append(dv.Eq(lam*mu*nx*uy.dy3 + mu**2*ny*ux.dy3
53+
+ ux.dx2dy*ny*(lam**2 + 2*lam*mu + 2*mu**2)
54+
+ ux.dx3*nx*(lam**2 + 4*lam*mu + 4*mu**2)
55+
+ ux.dxdy2*nx*(2*lam*mu + 3*mu**2)
56+
+ uy.dx2dy*nx*(lam**2 + 3*lam*mu + mu**2)
57+
+ uy.dx3*ny*(lam*mu + 2*mu**2)
58+
+ uy.dxdy2*ny*(lam**2 + 3*lam*mu + 3*mu**2), 0))
59+
bc_list.append(dv.Eq(lam*mu*ny*ux.dx3 + mu**2*nx*uy.dx3
60+
+ ux.dx2dy*nx*(lam**2 + 3*lam*mu + 3*mu**2)
61+
+ ux.dxdy2*ny*(lam**2 + 3*lam*mu + mu**2)
62+
+ ux.dy3*nx*(lam*mu + 2*mu**2)
63+
+ uy.dx2dy*ny*(2*lam*mu + 3*mu**2)
64+
+ uy.dxdy2*nx*(lam**2 + 2*lam*mu + 2*mu**2)
65+
+ uy.dy3*ny*(lam**2 + 4*lam*mu + 4*mu**2), 0))
66+
5167
# TODO: add higher-order bcs
5268
bcs = BoundaryConditions(bc_list)
5369
boundary = Boundary(bcs, bg)
@@ -70,7 +86,7 @@ def run(sdf, s_o, nsnaps):
7086

7187
time_range = TimeAxis(start=t0, stop=tn, step=dt)
7288

73-
f0 = 0.005 # Source peak frequency is 5Hz (0.005 kHz)
89+
f0 = 0.0065 # Source peak frequency is 6.5Hz (0.0065 kHz)
7490
src = RickerSource(name='src', grid=grid, f0=f0,
7591
npoint=1, time_range=time_range)
7692

@@ -177,7 +193,7 @@ def append_path(file):
177193

178194
def main():
179195
shift = 50 # Number of grid increments to shift surface
180-
s_o = 2 # Space order
196+
s_o = 4 # Space order
181197
# Load the signed distance function data
182198
sdf_file = "/../infrasound/surface_files/mt_st_helens_2d.npy"
183199
sdf = load_sdf(sdf_file, s_o, shift)

0 commit comments

Comments
 (0)