mirror of
https://github.com/wassname/simpeg.git
synced 2026-07-24 13:20:06 +08:00
working on DC problem CC and N
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
import numpy as np
|
||||
from scipy.constants import mu_0, pi
|
||||
|
||||
def DCAnalytic(txloc, rxlocs, sigma, flag="wholespace"):
|
||||
"""
|
||||
Analytic solution for electric potential from a postive pole
|
||||
|
||||
Input variables:
|
||||
|
||||
txloc = a xyz location of A (+) electrode (np.r_[xa, ya, za])
|
||||
|
||||
rxlocs = [M, N]
|
||||
M: xyz locations of M (+) electrode (np.c_[xmlocs, ymlocs, zmlocs])
|
||||
N: xyz locations of N (-) electrode (np.c_[xnlocs, ynlocs, znlocs])
|
||||
|
||||
sigma = conductivity (either float or complex)
|
||||
flag = "wholsespace" or "halfspace"
|
||||
|
||||
"""
|
||||
M = rxlocs[0]
|
||||
N = rxlocs[1]
|
||||
|
||||
rM = np.sqrt( (M[:,0]-txloc[0])**2 + (M[:,1]-txloc[1])**2 + (M[:,2]-txloc[1])**2 )
|
||||
rN = np.sqrt( (N[:,0]-txloc[0])**2 + (N[:,1]-txloc[1])**2 + (N[:,2]-txloc[1])**2 )
|
||||
|
||||
phiM = 1./(4*np.pi*rM*sigma)
|
||||
phiN = 1./(4*np.pi*rN*sigma)
|
||||
phi = phiM - phiN
|
||||
|
||||
if flag == "halfspace":
|
||||
phi *= 2
|
||||
|
||||
return phi
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
from TDEM import hzAnalyticDipoleT
|
||||
from FDEM import hzAnalyticDipoleF
|
||||
from FDEMcasing import *
|
||||
from DC import DCAnalytic
|
||||
|
||||
Reference in New Issue
Block a user