Beispiel #1
0
def _getCasingHertzMagDipole2Deriv_z_r(srcloc,
                                       obsloc,
                                       freq,
                                       sigma,
                                       a,
                                       b,
                                       mu=mu_0 * np.ones(3),
                                       eps=epsilon_0,
                                       moment=1.0):
    HertzZ = _getCasingHertzMagDipole(srcloc, obsloc, freq, sigma, a, b, mu,
                                      eps, moment)
    dHertzZdr = _getCasingHertzMagDipoleDeriv_r(srcloc, obsloc, freq, sigma, a,
                                                b, mu, eps, moment)

    nobs = obsloc.shape[0]
    dxyz = obsloc - np.c_[np.ones(nobs)] * np.r_[srcloc]

    r2 = _r2(dxyz[:, :2])
    r = np.sqrt(r2)
    z = dxyz[:, 2]
    sqrtr2z2 = np.sqrt(r2 + z**2)
    k2 = k(freq, sigma[2], mu[2], eps)

    return dHertzZdr * (-z /
                        sqrtr2z2) * (1j * k2 + 1.0 / sqrtr2z2) + HertzZ * (
                            z * r / sqrtr2z2**3) * (1j * k2 + 2.0 / sqrtr2z2)
Beispiel #2
0
def getCasingHzMagDipole(srcloc,
                         obsloc,
                         freq,
                         sigma,
                         a,
                         b,
                         mu=mu_0 * np.ones(3),
                         eps=epsilon_0,
                         moment=1.0):
    d2HertzZdz2 = _getCasingHertzMagDipole2Deriv_z_z(srcloc, obsloc, freq,
                                                     sigma, a, b, mu, eps,
                                                     moment)
    k2 = k(freq, sigma[2], mu[2], eps)
    HertzZ = _getCasingHertzMagDipole(srcloc, obsloc, freq, sigma, a, b, mu,
                                      eps, moment)
    return d2HertzZdz2 + k2**2 * HertzZ
Beispiel #3
0
def _Propagate(f, thickness, sig, chg, taux, c, mu_r, eps_r, n):

    if isinstance(eps_r, float):
        epsmodel = np.ones_like(sig) * eps_r
    else:
        epsmodel = eps_r

    if isinstance(mu_r, float):
        mumodel = np.ones_like(sig) * mu_r
    else:
        epsmodel = mu_r

    sigcm = np.zeros_like(sig, dtype="complex_")
    if chg == 0.0 or taux == 0.0 or c == 0.0:
        sigcm = sig
    else:
        for j in range(1, len(sigcm)):
            sigcm[j] = _PCC(sig[j], chg[j], taux[j], c[j], f)

    sigcm = np.append(np.r_[0.0], sigcm)
    mu = np.append(np.r_[1.0], mumodel) * mu_0
    eps = np.append(np.r_[1.0], epsmodel) * epsilon_0
    H = np.append(np.r_[1.2 * (1e5)], thickness)

    K = k(f, sigcm, mu, eps)
    Z = _ImpZ(f, mu, K)

    EH = np.matrix(np.zeros((2, n + 1), dtype="complex_"), dtype="complex_")
    UD = np.matrix(np.zeros((2, n + 1), dtype="complex_"), dtype="complex_")

    UD[1, -1] = 1.0

    for i in range(-2, -(n + 2), -1):

        UD[:, i] = _Tinv(H[i + 1], K[i]) * _Pinv(Z[i]) * _P(
            Z[i + 1]) * UD[:, i + 1]
        UD = UD / ((np.abs(UD[0, :] + UD[1, :])).max())

    for j in range(0, n + 1):
        EH[:, j] = np.matrix([[
            1.0,
            1,
        ], [-1.0 / Z[j], 1.0 / Z[j]]]) * UD[:, j]

    return UD, EH, Z, K
Beispiel #4
0
def _getCasingHertzMagDipoleDeriv_z(srcloc,
                                    obsloc,
                                    freq,
                                    sigma,
                                    a,
                                    b,
                                    mu=mu_0 * np.ones(3),
                                    eps=epsilon_0,
                                    moment=1.0):
    HertzZ = _getCasingHertzMagDipole(srcloc, obsloc, freq, sigma, a, b, mu,
                                      eps, moment)

    nobs = obsloc.shape[0]
    dxyz = obsloc - np.c_[np.ones(nobs)] * np.r_[srcloc]

    r2z2 = _r2(dxyz)
    sqrtr2z2 = np.sqrt(r2z2)
    k2 = k(freq, sigma[2], mu[2], eps)

    return -HertzZ * dxyz[:, 2] / sqrtr2z2 * (1j * k2 + 1.0 / sqrtr2z2)
Beispiel #5
0
def _getCasingHertzMagDipole(srcloc,
                             obsloc,
                             freq,
                             sigma,
                             a,
                             b,
                             mu=mu_0 * np.ones(3),
                             eps=epsilon_0,
                             moment=1.0):
    Kc1 = getKc(freq, sigma[1], a, b, mu[1], eps)

    nobs = obsloc.shape[0]
    dxyz = obsloc - np.c_[np.ones(nobs)] * np.r_[srcloc]

    r2 = _r2(dxyz[:, :2])
    sqrtr2z2 = np.sqrt(r2 + dxyz[:, 2]**2)
    k2 = k(freq, sigma[2], mu[2], eps)

    return Kc1 * moment / (4.0 * np.pi) * np.exp(
        -1j * k2 * sqrtr2z2) / sqrtr2z2
Beispiel #6
0
def getKc(freq, sigma, a, b, mu=mu_0, eps=epsilon_0):
    a = float(a)
    b = float(b)
    # return 1./(2*np.pi) * np.sqrt(b / a) * np.exp(-1j*k(freq,sigma,mu,eps)*(b-a))
    return np.sqrt(b / a) * np.exp(-1j * k(freq, sigma, mu, eps) * (b - a))