def test_time(res, off, t, signal):
"""Time domain analytical half-space solution.
- Source at x = y = z = 0 m
- Receiver at y = z = 0 m; x = off
- Resistivity of halfspace res
- Times t, t > 0 s
- Impulse response if signal = 0
- Switch-on response if signal = 1
"""
tau = np.sqrt(mu_0*off**2/(res*t))
fact1 = res/(2*np.pi*off**3)
fact2 = tau/np.sqrt(np.pi)
if signal == 0:
return fact1*tau**3/(4*t*np.sqrt(np.pi))*np.exp(-tau**2/4)
else:
resp = fact1*(2 - special.erf(tau/2) + fact2*np.exp(-tau**2/4))
if signal < 0:
DC = test_time(res, off, 1000000, 1)
resp = DC-resp
return resp
# Time-domain solution
评论列表
文章目录