forked from simpeg/simpeg
/
plot_effective_medium_theory.py
83 lines (64 loc) · 2.65 KB
/
plot_effective_medium_theory.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
"""
Effective Medium Theory Mapping
===============================
This example uses Self Consistent Effective Medium Theory to estimate the
electrical conductivity of a mixture of two phases of materials. Given
the electrical conductivity of each of the phases (:math:`\sigma_0`,
:math:`\sigma_1`), the :class:`SimPEG.Maps.SelfConsistentEffectiveMedium`
map takes the concentration of phase-1 (:math:`\phi_1`) and maps this to an
electrical conductivity.
This mapping is used in chapter 2 of:
Heagy, Lindsey J.(2018, in prep) *Electromagnetic methods for imaging
subsurface injections.* University of British Columbia
:author: `@lheagy <https://github.com/lheagy>`_
"""
import numpy as np
import matplotlib.pyplot as plt
from SimPEG import Maps
from matplotlib import rcParams
rcParams['font.size'] = 12
###############################################################################
# Conductivities
# ---------------
#
# Here we consider a mixture composed of fluid (3 S/m) and conductive
# particles which we will vary the conductivity of.
#
sigma_fluid = 3
sigma1 = np.logspace(1, 5, 5) # look at a range of particle conductivities
phi = np.linspace(0.0, 1, 1000) # vary the volume of particles
###############################################################################
# Construct the Mapping
# ---------------------
#
# We set the conductivity of the phase-0 material to the conductivity of the
# fluid. The mapping will then take a concentration (by volume), of phase-1
# material and compute the effective conductivity
#
scemt = Maps.SelfConsistentEffectiveMedium(sigma0=sigma_fluid, sigma1=1)
###############################################################################
# Loop over a range of particle conductivities
# --------------------------------------------
#
# We loop over the values defined as `sigma1` and compute the effective
# conductivity of the mixture for each concentration in the `phi` vector
#
sige = np.zeros([phi.size, sigma1.size])
for i, s in enumerate(sigma1):
scemt.sigma1 = s
sige[:, i] = scemt * phi
###############################################################################
# Plot the effective conductivity
# -------------------------------
#
# The plot shows the effective conductivity of 5 difference mixtures. In all
# cases, the conductivity of the fluid, :math:`\sigma_0`, is 3 S/m. The
# conductivity of the particles is indicated in the legend
#
fig, ax = plt.subplots(1, 1, figsize=(7, 4), dpi=350)
ax.semilogy(phi, sige)
ax.grid(which="both", alpha=0.4)
ax.legend(["{:1.0e} S/m".format(s) for s in sigma1])
ax.set_xlabel("Volume fraction of proppant $\phi$")
ax.set_ylabel("Effective conductivity (S/m)")
plt.tight_layout()