from ipywidgets import interact, interactive, FloatSlider, IntSlider, ToggleButtons
from geoscilabs.em.TDEMGroundedSource import choose_model, load_or_run_results, PlotTDEM
We explore time-domain electromagnetic (EM) simulation results from a grounded source. Both electric currents and magnetic flux will be visualized to undertand physics of grounded source EM. Both charge buildup (galvanic) and EM induction (inductive) will occur at different times.
Three models are considered here.
Using below widget, you can choose a model that you want to explore.
Q = interact(choose_model,
model=ToggleButtons(
options=["halfspace", "conductor", "resistor"], value="halfspace"
)
)
Then here we are going to load results. If you want to rerun, you can set re_run
as True
.
With that option, you can change conductivity value of the block and halfspace you can alter values for sigma_halfspace
and sigma_block
.
import matplotlib
matplotlib.rcParams['font.size']=16
options = load_or_run_results(
re_run=False,
fname=choose_model(Q.widget.kwargs['model']),
sigma_block=0.01,
sigma_halfspace=0.01
)
tdem = PlotTDEM(**options)
interact(
tdem.show_3d_survey_geometry,
elev=FloatSlider(min=-180, max=180, step=10, value=30),
azim=FloatSlider(min=-180, max=180, step=10, value=-45),
);
interact(
tdem.plot_input_currents,
itime=IntSlider(min=15, max=50, step=1, value=15, continuous_update=False),
scale=ToggleButtons(
options=["linear", "log"], value="linear"
),
);
interact(
tdem.plot_electric_currents,
itime=IntSlider(min=15, max=50, step=1, value=15, continuous_update=False)
);
interact(
tdem.plot_magnetic_flux,
itime=IntSlider(min=15, max=50, step=1, value=15, continuous_update=False)
);