Beispiel #1
0
def test_efield_2layer_2():
    # Cheng Ex. 3-16
    ri = 4e-3
    er1, t1 = 3.2, (6.16e-3 - ri)
    er2, t2 = 2.6, (8.32e-3 - 6.16e-3)
    cc = CoaxCapacitor(ri, (er1, er2), (t1, t2))
    R = np.array([ri, 0.999 * (ri + t1), 1.001 * (ri + t1), ri + t1 + t2])
    E = cc.efield(R, Va=20e3)
    assert E == approx(np.array([6.25e6, 4.06e6, 5.00e6, 3.71e6]), rel=0.01)
Beispiel #2
0
def test_efield_2layer():
    ri = 8e-3
    er1, t1 = 6.0, 2e-3
    er2, t2 = 3.0, 20e-3
    cc = CoaxCapacitor(ri, (er1, er2), (t1, t2))
    R = np.array([8e-3, 10e-3, 10.001e-3, 30e-3])
    E = cc.efield(R, Va=12500)
    assert E == approx(np.array([0.6456e6, 0.5165e6, 1.033e6, 0.3443e6]),
                       abs=1e3)
Beispiel #3
0
def test_efield():
    ri = 0.5e-3
    ro = 4.0e-3
    N = 5
    cc = CoaxCapacitor(ri, 5.2, ro - ri)
    X = np.linspace(ri, ro, N)
    Va = 10.0
    expected = -Va / X / np.log(ri / ro)
    efield = cc.efield(X, Va=Va)
    assert efield == approx(expected)