This documentation is not for the latest stable Salvus version.
%matplotlib inline
%config Completer.use_jedi = False
from salvus.mesh.simple_mesh import SmoothieSEM
from salvus import namespace as sn
period_global = 100.0
# a quake in Turkey that we will use in this tutorial, original data from IRIS spud:
# http://service.iris.edu/fdsnws/event/1/query?eventid=2847365
# http://ds.iris.edu/spudservice/momenttensor/gcmtid/C201003241411A/quakeml#momenttensor
source = sn.simple_config.source.seismology.SideSetMomentTensorPoint3D(
latitude=38.82,
longitude=40.14,
depth_in_m=4500,
side_set_name="r1",
mrr=5.47e15,
mtt=-4.11e16,
mpp=3.56e16,
mrt=2.26e16,
mrp=-2.25e16,
mtp=1.92e16,
)
nlat
allows to vary the number of elements in the lateral direction that is used throughout the whole mesh. Compare Figure 9 in [1] to choose values appropriate for your application.sm = SmoothieSEM()
sm.basic.model = "prem_iso_one_crust"
sm.basic.min_period_in_seconds = period_global
sm.basic.elements_per_wavelength = 2.0
sm.advanced.tensor_order = 2
sm.basic.number_of_lateral_elements = 4
sm.source.latitude = source._initial_arguments["latitude"]
sm.source.longitude = source._initial_arguments["longitude"]
sm.create_mesh()