Пример #1
0
def Flux_dencity(rx, ry, rz, tuple):

    (Axis, Axis2) = tuple

    dl = 2 * radiusT * np.tan(pi / n)

    Axis_hat = Axis / np.linalg.norm(Axis)
    Transmitter_position = [0, 0, 0]

    g = [0, radiusT, 0]

    j = [rx, ry, rz]  # focus point

    sum = [0, 0, 0]
    for i in range(n):
        v = np.dot(rotation_matrix(Axis, i * (2 * np.pi / n)), g)

        dl_point = np.add(Transmitter_position, v)

        v_hat = v / np.linalg.norm(v)
        dl_hat = np.cross(v_hat, Axis_hat)

        dl_v = np.dot(dl, dl_hat)

        b = small_flux_dencity(dl_point, dl_v, j)

        sum = np.add(sum, b)

    if Axis2 != None:

        Axis_hat2 = Axis2 / np.linalg.norm(Axis2)
        Transmitter_position2 = [2, 0, 0]

        for i in range(n):
            v = np.dot(rotation_matrix(Axis2, i * (2 * np.pi / n)), g)

            dl_point = np.add(Transmitter_position2, v)

            v_hat = v / np.linalg.norm(v)
            dl_hat = np.cross(v_hat, Axis_hat2)

            dl_v = np.dot(dl, dl_hat)

            b = small_flux_dencity(dl_point, dl_v, j)

            sum = np.add(sum, b)

    return sum
Пример #2
0
def Flux_dencity(Tx1, Tx2, RTx, r):
    (Axis1, Tx_position1) = Tx1

    dl = 2 * RTx * np.tan(np.pi / n)

    Axis_hat = Axis1 / np.linalg.norm(Axis1)

    c = np.cross(Axis1, [1, 0, 0])

    g = (c / np.linalg.norm(c)) * RTx

    sum = [0, 0, 0]
    for i in range(n):
        v = np.dot(rotation_matrix(Axis1, i * (2 * np.pi / n)), g)

        dl_point = np.add(Tx_position1, v)

        v_hat = v / np.linalg.norm(v)
        dl_hat = np.cross(v_hat, Axis_hat)

        dl_v = np.dot(dl, dl_hat)

        b = small_flux(dl_point, dl_v, r)

        sum = np.add(sum, b)

    if Tx2 != None:
        (Axis2, Tx_position2) = Tx2
        Axis_hat2 = Axis2 / np.linalg.norm(Axis2)

        for i in range(n):
            v = np.dot(rotation_matrix(Axis2, i * (2 * np.pi / n)), g)

            dl_point = np.add(Tx_position2, v)

            v_hat = v / np.linalg.norm(v)
            dl_hat = np.cross(v_hat, Axis_hat2)

            dl_v = np.dot(dl, dl_hat)

            b = small_flux(dl_point, dl_v, r)

            sum = np.add(sum, b)

    return sum
Пример #3
0
    def Flux_Dencity(self, flux_location):

        small_length = 2 * self.winding_radius * np.tan(
            np.pi / self._winding_sides)

        #Create an class that inherits numpy and includes a methof that creates the unit vector for any vector in 3D
        unit_coil_axis = self.coil_axis / np.linalg.norm(self.coil_axis)

        c = np.cross(self.coil_axis, [1, 0, 0])

        start_radius_vector = (c / np.linalg.norm(c)) * self.winding_radius

        total_flux = [0, 0, 0]
        for i in range(self._winding_sides):
            new_radius_vector = np.dot(
                rotation_matrix(self.coil_axis,
                                i * (2 * np.pi / self._winding_sides)),
                start_radius_vector)

            small_length_location = np.add(self.coil_position,
                                           new_radius_vector)

            unit_new_radius_vector = new_radius_vector / np.linalg.norm(
                new_radius_vector)
            unit_small_length_vector = np.cross(unit_new_radius_vector,
                                                unit_coil_axis)

            small_length_vector = np.dot(small_length,
                                         unit_small_length_vector)

            small_flux = self.Small_Flux_Density(small_length_location,
                                                 small_length_vector,
                                                 flux_location)

            total_flux = np.add(total_flux, small_flux)

        return total_flux
Пример #4
0
def Flux_dencity_ground(rx, ry, rz, tuple):
    # Inputs the position vector at where the reading is being focused
    receiver_position = [1, 0, 0]  # focus point

    Flux = [0, 0, 0]

    Axis = Transmitter.Flux_dencity(rx, ry, rz, tuple)

    Axis_hat = Axis / np.linalg.norm(Axis)

    ground_position = [rx, ry, rz]

    g = start_radius_vector(Axis, r)  # Start vector

    dl = 2 * r * np.tan(np.pi / n)

    Emf = np.linalg.norm(Axis) * (np.pi * r**2
                                  )  # 90 degrees offset!!!!! (in time)

    I = Emf / 0.1  # current in Amps (A)

    for i in range(n):

        v = np.dot(rotation_matrix(Axis, i * (2 * np.pi / n)), g)

        dl_point = np.add(ground_position, v)

        v_hat = v / np.linalg.norm(v)
        dl_hat = np.cross(v_hat, Axis_hat)

        dl_v = np.dot(dl, dl_hat)

        b = small_flux_dencity(dl_point, dl_v, receiver_position, I)

        Flux = np.add(Flux, b)
    return Flux