bluemira.magnetostatics.semianalytic_2d ======================================= .. py:module:: bluemira.magnetostatics.semianalytic_2d .. autoapi-nested-parse:: Semi-analytic methods for Bx, Bz, and psi for circular coils of rectangular cross-section. Functions --------- .. autoapisummary:: bluemira.magnetostatics.semianalytic_2d.semianalytic_Bx bluemira.magnetostatics.semianalytic_2d.semianalytic_Bz bluemira.magnetostatics.semianalytic_2d.semianalytic_psi Module Contents --------------- .. py:function:: semianalytic_Bx(xc: float, zc: float, x: float | numpy.ndarray, z: float | numpy.ndarray, d_xc: float, d_zc: float) -> float | numpy.ndarray Calculate the Bx and Bz fields from a rectangular cross-section circular coil with a unit current using a semi-analytic reduction of the Biot-Savart law. :param xc: Coil x coordinate [m] :param zc: Coil z coordinate [m] :param x: Calculation x location :param z: Calculation z location :param d_xc: The half-width of the coil :param d_zc: The half-height of the coil :returns: Radial magnetic field response (x, z) .. rubric:: Notes :math:`B_{x}=\dfrac{\mu_{0}Jx}{2\pi}\sum^{2}_{i=1}(-1)^{i+j}` :math:`P_x(R_{i},Z_{j})` .. rubric:: References .. doi:: 10.1109/TMAG.2011.2167981 .. py:function:: semianalytic_Bz(xc: float, zc: float, x: float | numpy.ndarray, z: float | numpy.ndarray, d_xc: float, d_zc: float) -> float | numpy.ndarray Calculate the Bx and Bz fields from a rectangular cross-section circular coil with a unit current using a semi-analytic reduction of the Biot-Savart law. :param xc: Coil x coordinate [m] :param zc: Coil z coordinate [m] :param x: Calculation x location :param z: Calculation z location :param d_xc: The half-width of the coil :param d_zc: The half-height of the coil :returns: Vertical magnetic field response at (x, z) .. rubric:: Notes :math:`B_{z}=\dfrac{\mu_{0}Jx}{2\pi}\sum^{2}_{i=1}(-1)^{i+j}` :math:`P_z(R_{i},Z_{j})` .. rubric:: References .. doi:: 10.1109/TMAG.2011.2167981 .. py:function:: semianalytic_psi(xc: float, zc: float, x: float | numpy.ndarray, z: float | numpy.ndarray, d_xc: float, d_zc: float) -> float | numpy.ndarray Calculate the poloidal magnetic flux from a rectangular cross-section circular coil with a unit current using a semi-analytic reduction of the Biot-Savart law. :param xc: Coil x coordinate [m] :param zc: Coil z coordinate [m] :param x: Calculation x location :param z: Calculation z location :param d_xc: The half-width of the coil :param d_zc: The half-height of the coil :returns: Poloidal magnetic flux response at (x, z) .. rubric:: Notes The function returns .. math:: 2 \times 10^{-7} {\frac{1}{4 d_{xc} d_{zc}}} \psi The function integrates :math:`x B_z` to resolve psi. More analytical approaches are possible and will no doubt be faster.