This documentation is not for the latest stable Salvus version.
%matplotlib inline
# This notebook will use this variable to determine which
# remote site to run on.
import os
import salvus.namespace as sn
SALVUS_FLOW_SITE_NAME = os.environ.get("SITE_NAME", "local")
p = sn.Project(path="project")
1500 m/s
and the density is 980 kg/m^3
.bm = sn.model.background.homogeneous.IsotropicAcoustic(vp=1500.0, rho=980.0)
mc = sn.ModelConfiguration(background_model=bm)
wsc = sn.WaveformSimulationConfiguration(end_time_in_seconds=0.00015)
p += sn.SimulationConfiguration(
name="initial_model",
#
# Settings that influence the mesh.
elements_per_wavelength=2,
tensor_order=2,
max_frequency_in_hertz=100000.0,
#
model_configuration=mc,
# Potentially event dependent settings.
event_configuration=sn.EventConfiguration(
waveform_simulation_configuration=wsc,
wavelet=sn.simple_config.stf.Ricker(center_frequency=50000.0),
),
)
p.simulations.launch(
simulation_configuration="initial_model",
events=p.events.list(),
site_name=SALVUS_FLOW_SITE_NAME,
ranks_per_job=4,
)
[2024-03-15 09:24:35,928] INFO: Creating mesh. Hang on. [2024-03-15 09:24:36,339] INFO: Submitting job array with 5 jobs ...
5
p.simulations.query(block=True)
True
synthetic_data = p.waveforms.get(
data_name="initial_model", events=p.events.list()
)
synthetic_data[0].plot(component="A", receiver_field="phi")
p.viz.nb.waveforms(
["true_model_100kHz", "initial_model"], receiver_field="phi"
)