bluemira.equilibria.coils._tools
Tools for Coilgroups
Functions
|
Calculate the mutual inductance matrix of a coilset. |
|
Coilset symmetry utility |
|
Check whether or not a CoilSet is purely symmetric about z=0. |
|
Get the maximum current in a rectangular coil cross-sectional area |
|
Rename the coils. |
Module Contents
- bluemira.equilibria.coils._tools.make_mutual_inductance_matrix(coilset: bluemira.equilibria.coils.CoilSet, *, square_coil: bool = False) numpy.ndarray
Calculate the mutual inductance matrix of a coilset.
- Parameters:
coilset (bluemira.equilibria.coils.CoilSet) – Coilset for which to calculate the mutual inductance matrix
square_coil (bool) – Whether or not to use a square coil approximation for the self-inductance diagonal terms. Defaults to a elliptical integral of a circular cross-section coil.
- Returns:
The symmetric mutual inductance matrix [H]
- Return type:
numpy.ndarray
Notes
Multi-filament coil formulation. The mutual inductance between two coils is calculated based on the number of filaments in each coil (numerical discretisation, which is then normalised). The number of turns in each coil determine the actual multiplier of the mutual inductance.
Off-diagonal terms (\(i \neq j\)):
\[M_{ij} = n_i n_j \sum_{k=0, m=0}^{n_k, n_m} G(x_{i,n}, z_{i,n}, x_{j,m}, z_{j,m})\]where \(G\) is the Green’s function for mutual inductance.
Diagonal terms (\(i = j\)):
\[M_{ii} = n_i^2 L_i\]with \(L_i\) as the self-inductance using elliptic integrals.
- bluemira.equilibria.coils._tools._get_symmetric_coils(coilset: bluemira.equilibria.coils.CoilSet, rtol: float = 1e-05) tuple[list[numpy.typing.NDArray], numpy.typing.NDArray, list[list[int]]]
Coilset symmetry utility
- Parameters:
coilset (bluemira.equilibria.coils.CoilSet) – CoilSet to get symmetric coils from
rtol (float) – Relative tolerance used when comparing coil values, rtol = 1.e-5 is the default value for np.allclose. The values for the secondary coil in the pair will be set to be equal to the primary coil values if they are within rtol.
- Returns:
Symmetric coilset data
Counts of number of coils in group
indexes from original coilset
- Return type:
tuple[list[numpy.typing.NDArray], numpy.typing.NDArray, list[list[int]]]
- bluemira.equilibria.coils._tools.check_coilset_symmetric(coilset: bluemira.equilibria.coils.CoilSet, rtol: float | None = None) bool
Check whether or not a CoilSet is purely symmetric about z=0.
- Parameters:
coilset (bluemira.equilibria.coils.CoilSet) – CoilSet to check for symmetry
rtol (float | None)
- Return type:
Whether or not the CoilSet is symmetric about z=0
- bluemira.equilibria.coils._tools.get_max_current(dx: float | numpy.ndarray, dz: float | numpy.ndarray, j_max: float | numpy.ndarray) numpy.float64 | numpy.ndarray
Get the maximum current in a rectangular coil cross-sectional area
- Parameters:
dx (float | numpy.ndarray) – Coil half-width [m]
dz (float | numpy.ndarray) – Coil half-height [m]
j_max (float | numpy.ndarray) – Coil current density [A/m^2]
- Return type:
Maximum current [A]
Notes
\[I_{\text{max}} = j_{\text{max}} \cdot (4 \cdot dx \cdot dz)\]
- bluemira.equilibria.coils._tools.rename_coilset(coilset: bluemira.equilibria.coils.CoilSet)
Rename the coils.
- Returns:
The coilset containing the renamed coils
- Return type:
Coilset
- Parameters:
coilset (bluemira.equilibria.coils.CoilSet)