-
Notifications
You must be signed in to change notification settings - Fork 0
/
VES1D_example.py
64 lines (49 loc) · 1.66 KB
/
VES1D_example.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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
VES 1D Modeling
===============
Example file for VES1D modeling.
Mainly adapted from:
Ekinci, Y. L., Demirci, A., 2008. A Damped Least-Squares Inversion Program
for the Interpretation of Schlumberger Sounding Curves, Journal of Applied Sciences, 8, 4070-4078.
"""
# Import
import numpy as np
import VES1D
import matplotlib.pyplot as plt
###############################################################################
# Input
# -----
#
# Electrical conductivity of n layers (S/m), last layer n is assumed to be infinite
con = np.array([.1, .02, .1]) # S/m
# Thickness of n-1 layers (m), last layer n is assumed to be infinite and does not require a thickness
thick = np.array([2, 1]) # m
# Half the current (AB/2) electrode spacing (m)
ab2s = np.linspace(0, 5, 100)
###############################################################################
# Forward model
# -------------
#
# Calculate forward apparent electrical conductivities (ECa)
app_con = []
for ab2 in ab2s:
app_con.append(VES1D.forward(con, thick, ab2))
# Calculate apparent resistivity (Ohm.m)
app_res = 1 / np.array(app_con)
###############################################################################
# Visualize
# ---------
#
# Figure
plt.figure()
plt.xlabel('AB/2 (m)')
ax1 = plt.gca()
plt.plot(ab2s, app_con, color='tab:blue')
ax1.set_ylabel('$\sigma_a$ (S/m)', color='tab:blue')
ax1.tick_params(axis='y', labelcolor='tab:blue')
ax2 = ax1.twinx()
ax2.plot(ab2s, app_res, color='tab:red')
ax2.set_ylabel('$\\rho_a$ ($\Omega$m)', color='tab:red')
ax2.tick_params(axis='y', labelcolor='tab:red')