mirror of
https://github.com/wassname/simpeg.git
synced 2026-07-15 11:26:09 +08:00
6.0 KiB
6.0 KiB
In [1]:
# Notebook to test 1D codeIn [2]:
import SimPEG as simpeg
import simpegMT as simpegmtIn [3]:
ct = 10
m1d = simpeg.Mesh.TensorMesh([[(ct,20,-1.5),(ct,100),(ct,20,1.5)]], x0=['C'])
sigma = np.zeros(m1d.nC) + 2e-3
sigma[m1d.gridCC[:]>200] = 1e-8In [4]:
# Make the rx and src
freqs = np.logspace(3,-3,31)
rxList = []
for rxType in ['zxyr','zxyi']:
rxList.append(simpegmt.SurveyMT.RxMT(simpeg.mkvc(np.array([405]),2).T,rxType))
# Source list
srcList =[]
for freq in freqs:
srcList.append(simpegmt.SurveyMT.srcMT(freq,rxList))
survey = simpegmt.SurveyMT.SurveyMT(srcList)
problem = simpegmt.ProblemMT1D.eForm_TotalField(m1d)
problem.pair(survey)In [5]:
fields = problem.fields(sigma)In [7]:
fields[:,'e_1d']Out [7]:
array([[ 1.52442595e-125 -7.20764170e-126j,
7.74672164e-101 +1.76864736e-100j,
-2.07557099e-080 -3.74608600e-081j, ...,
3.10393307e-001 -2.86962945e-001j,
4.10341179e-001 -2.87349774e-001j,
5.05105758e-001 -2.74745005e-001j],
[ 8.67440346e-030 +6.35706181e-030j,
-1.53155881e-027 +3.75444030e-027j,
-1.08396611e-024 -4.98500246e-026j, ...,
-4.05147339e-001 +2.76576534e-001j,
-4.96380502e-001 +2.67133906e-001j,
-5.80363237e-001 +2.48768467e-001j],
[ -6.16527128e-026 +8.41573172e-026j,
-2.29821697e-023 -9.36787887e-024j,
1.90707675e-022 -4.18621866e-021j, ...,
-4.75055964e-001 +2.59780137e-001j,
-5.57847068e-001 +2.46025119e-001j,
-6.32948088e-001 +2.25820916e-001j],
...,
[ -4.42815267e-001 +4.54129730e-002j,
-4.45450945e-001 +2.94352343e-002j,
-4.46746292e-001 +1.94083017e-002j, ...,
-7.96037136e-001 +1.08182287e-001j,
-8.29064328e-001 +1.00291076e-001j,
-8.58609530e-001 +9.06236881e-002j],
[ -6.64333571e-001 +4.65810415e-002j,
-6.66721482e-001 +2.99034482e-002j,
-6.67823222e-001 +1.93821193e-002j, ...,
-8.77622277e-001 +6.49094362e-002j,
-8.97438594e-001 +6.01746869e-002j,
-9.15165716e-001 +5.43742395e-002j],
[ 1.00000000e+000 +0.00000000e+000j,
1.00000000e+000 +0.00000000e+000j,
1.00000000e+000 +0.00000000e+000j, ...,
1.00000000e+000 +0.00000000e+000j,
1.00000000e+000 +0.00000000e+000j,
1.00000000e+000 +0.00000000e+000j]])In [ ]:
In [ ]:
m1d.nNIn [ ]:
self = problem
Mmui = self.MfMui
Msig = self.mesh.getFaceInnerProduct(self.curModel)
C = self.mesh.nodalGradIn [ ]:
selfIn [ ]:
MmuiIn [ ]:
self.Me[1,1]In [ ]:
self.mesh.volIn [ ]:
m1d.hIn [ ]:
m1d.gridCCIn [ ]: