Пример #1
0
# Boundaries Conditions
num_absorbing_layers = 10
absorbing_side_sets = ["x0", "x1", "y0", "y1"]

mesh = toolbox.mesh_from_xarray(model_order=4,
                                data=true_model,
                                slowest_velocity='vp',
                                maximum_frequency=f_max,
                                elements_per_wavelength=2,
                                absorbing_boundaries=(absorbing_side_sets,
                                                      num_absorbing_layers))

# %%
# salvus simulation object
sim = config.simulation.Waveform(mesh=mesh, sources=srcs, receivers=recs)
wsc = sn.WaveformSimulationConfiguration(end_time_in_seconds=9.5e-6)
wsc.physics.wave_equation.time_step_in_seconds = 1.0e-10

ec = sn.EventConfiguration(
    waveform_simulation_configuration=wsc,
    wavelet=sn.simple_config.stf.Ricker(center_frequency=20.0e6),
)

p += sn.SimulationConfiguration(
    name="true_model_new_EM",
    elements_per_wavelength=1.5,
    tensor_order=4,
    max_frequency_in_hertz=f_max,
    model_configuration=sn.ModelConfiguration(background_model=None,
                                              volume_models="true_model_EM"),
    # Potentially event dependent settings.
Пример #2
0
absorbing_par = sn.simple_mesh.basic_mesh.AbsorbingBoundaryParameters(
    reference_velocity=vp_min,
    number_of_wavelengths=6,
    reference_frequency=0.5 * max_frequency,
    free_surface=False)

# Add event collection to the project ------------------------
for _i, src in enumerate(sources):
    p += sn.EventCollection.from_sources(sources=[src],
                                         receivers=receivers,
                                         event_name_starting_index=_i)

# Waveform simulation configuration
dt, tmax, t_sam = 0.0005, 3.0, 30
wsc = sn.WaveformSimulationConfiguration(start_time_in_seconds=0.0,
                                         end_time_in_seconds=tmax,
                                         time_step_in_seconds=dt)
# wsc.physics.wave_equation.boundaries = [absorbing]

# Event configuration
ec = sn.EventConfiguration(waveform_simulation_configuration=wsc,
                           wavelet=sn.simple_config.stf.Ricker(
                               center_frequency=0.5 * max_frequency,
                               time_shift_in_seconds=0.1))
# Background model
bm = sn.model.background.homogeneous.IsotropicAcoustic(vp=vp[1], rho=2000.0)

# Simulation Configuration
p += sn.SimulationConfiguration(name="initial_model",
                                elements_per_wavelength=2,
                                tensor_order=2,
Пример #3
0
# %%
# salvus simulation object
sim = config.simulation.Waveform(mesh=mesh, sources=srcs, receivers=recs)
# # Save the volumetric wavefield for visualization purposes.
# sim.output.volume_data.format = "hdf5"
# sim.output.volume_data.filename = "output.h5"
# sim.output.volume_data.fields = ["phi"]
# sim.output.volume_data.sampling_interval_in_time_steps = 10
sim.validate()
mesh        # Visualize mesh


# %%
# Event Configuration
ec = sn.EventConfiguration(
    waveform_simulation_configuration=sn.WaveformSimulationConfiguration(
        end_time_in_seconds=6.0),
    wavelet=sn.simple_config.stf.Ricker(center_frequency=10.0),
)

# Simulation Configuration
p += sn.SimulationConfiguration(
    name="true_model_new",
    elements_per_wavelength=1.5,
    tensor_order=4,
    max_frequency_in_hertz=f_max,
    model_configuration=sn.ModelConfiguration(
        background_model=None, volume_models="true_model_2"
    ),
    # Potentially event dependent settings.
    event_configuration=ec,
)