In [ ]:
from geoscilabs.dcip.sphereElectrostatic_example import (
interact_conductiveSphere, interactive_two_configurations_comparison
)
from ipywidgets import *


# Conductive or Resistive Sphere in a wholespace with a constant, uniform electric field $E_0$¶

Parameters:

• Log_sig0 : log10 of the conductivity of the background (for example, a value of -5 means a conductivity of $10^{-5}$ S/m)

• Log_sig1 : log10 conductivity of the sphere

• $R$: radius of the sphere

The following example allows the user to plot any of the following physical values:

• Electric Potential (Total or Secondary)

• Electric Field (Total or Secondary)

• Current Density (Total or Secondary)

• Charges density

To visualise configuration and primary potential, clic on "Configuration" (Note that others buttons are then deactivated)

Buttons FigureXa allow to choose to plot either Total or Secondary Field.

Buttons FigureXb allow to choose the physical value to plot.

Please visit http://em.geosci.xyz/content/maxwell2_static/fields_from_grounded_sources_dcr/electrostatic_sphere.html for more information

In [ ]:
#Function to visualise and compare any two plots for the same configuration

interact(interact_conductiveSphere,
R=FloatSlider(min=0., max =50., step=10., value=50.),
log_sig0=FloatSlider(min=-5., max =0., step=0.5,value=-3.),
log_sig1=FloatSlider(min=-5., max =0., step=0.5,value=-1.),
Figure1a=ToggleButtons(options=['Configuration','Total','Secondary'],value = 'Total'),
Figure1b=ToggleButtons(options=['Potential','ElectricField','CurrentDensity','ChargesDensity'],value = 'ElectricField'),
Figure2a=ToggleButtons(options=['Total','Secondary'],value = 'Secondary'),
Figure2b=ToggleButtons(options=['Potential','ElectricField','CurrentDensity','ChargesDensity'],value = 'ElectricField'));


## Building some intuition for DC problem¶

In real life, we do not know the underground configuration. We only see the data (in DCIP survey, Potentials difference between two electrodes) and we are trying to model the underground based from them.

There are several set of parameters that can fit perfectly a given data set. Even in the simple case presented here, where we know it is a sphere, and whose response can be calculated analytically, we can find several configuration that can produce the same data along the same profile.

This code allows us to plot and compare two different configuration responses to the same survey.

• Log_sig0: background log10 conductivity for both configurations

• Log_sig1: sphere log10 conductivity in configuration 0

• Log_sig2: sphere log10 conductivity in configuration 1

• R0: Sphere's radius in configuration 0

• R1: Sphere's radius in configuration 1

• E0: uniform E field value

• start: start point for the profile start.shape = (2,)

• end: end point for the profile end.shape = (2,)

• dipole_number: number of dipoles

• electrode_spacing: Space between the M and N electrodes

### Are you able to find two spheres whose outside potentials are the same?¶

(one solution with "matching_spheres_example")

In [ ]:
#Visualisation of the responses of two configurations to a (pseudo) DC resistivity survey
interact(interactive_two_configurations_comparison,
R0=FloatSlider(min=0., max =50., step=10., value=50.),
R1=FloatSlider(min=0., max =50., step=10., value=50.),
log_sig0=FloatSlider(min=-5., max =0., step=0.5,value=-3.),
log_sig1=FloatSlider(min=-5., max =0., step=0.5,value=-5.),
log_sig2=FloatSlider(min=-5., max =0., step=0.5,value=-1.),
xstart = FloatSlider(min=-200., max =200., step=10.,value=-200.),
ystart = FloatSlider(min=-200., max =200., step=10.,value=100.),
xend = FloatSlider(min=-200., max =200., step=10.,value=200.),
yend = FloatSlider(min=-200., max =200., step=10.,value=100.),
dipole_number = IntSlider(min=1, max=40, step=10,value=22),
electrode_spacing = FloatSlider(min=0., max =100., step=5.,value=20.),
matching_spheres_example = ToggleButton());

In [ ]: