bluemira.equilibria.vertical_stability

Vertical stability calculations

Classes

RZIp

RZIp model

Functions

calculate_rzip_stability_criterion(→ float)

Calculate the rzip stability criterion for a given equilibrium and coilset

stab_destab(→ float)

Calculate the stabilising / destabilising effect of the equilibria and structures

_length_step(→ float)

Calculates the tangent angle for two points and uses this to determine

_get_coil_points_along_wire(→ numpy.ndarray)

Discretises input wire in such a way that squares centred on

make_coils_along_wire(...)

Function to create a coilset from a wire, where the coils making up the coilset

Module Contents

bluemira.equilibria.vertical_stability.calculate_rzip_stability_criterion(eq: bluemira.equilibria.equilibrium.Equilibrium) float

Calculate the rzip stability criterion for a given equilibrium and coilset

Parameters:

eq (bluemira.equilibria.equilibrium.Equilibrium) – The equilibrium object

Returns:

Stability criterion

Return type:

float

Notes

See ~:class:~bluemira.equilibria.vertical_stability.RZIp for details

class bluemira.equilibria.vertical_stability.RZIp(coilset)

RZIp model

Parameters:

coilset – The full coilset

Notes

A value ~ 1.5 considered optimal and controllable. See https://doi.org/10.13182/FST89-A39747 for further explanation

< 1 plasma mass becomes a factor = 1 massless plasma solution not valid (said to represent MHD effects) > 1 displacement growth dominated by L/R of passive system

\[f = -\frac{F_s}{F_d} = \frac{I_p^T M^{\prime}_p|_s [M_s|_s]^{-1} M^{\prime}_s|_p I_p} {I_p^T M^{\prime\prime}_p|_c I_c}\]
property coilset

Coilset used for calculation

__call__(eq: bluemira.equilibria.equilibrium.Equilibrium) float
Parameters:

eq (bluemira.equilibria.equilibrium.Equilibrium) – The equilibrium object to analyse

Returns:

The stability criterion

Return type:

float

bluemira.equilibria.vertical_stability.stab_destab(cc_current: numpy.typing.NDArray, ind_mat: numpy.typing.NDArray, control_ind: list[int], uncontrolled_ind: list[int], r_struct: numpy.typing.NDArray, i_plasma: numpy.typing.NDArray, br_struct_grid: numpy.typing.NDArray, dbrdz_struct_grid: numpy.typing.NDArray) float

Calculate the stabilising / destabilising effect of the equilibria and structures

Parameters:
  • cc_current (numpy.typing.NDArray) – array of control coil currents

  • ind_mat (numpy.typing.NDArray) – Inductance matrix of passive and active structures

  • control_ind (list[int]) – indicies of active structures

  • uncontrolled_ind (list[int]) – indicies of passive structures

  • r_struct (numpy.typing.NDArray) – flattened array of eq R points duplicated by number of coils

  • i_plasma (numpy.typing.NDArray) – the plasma jtor x grid step

  • br_struct_grid (numpy.typing.NDArray) – Bx field

  • dbrdz_struct_grid (numpy.typing.NDArray) – dBxdz field

Returns:

The stability criterion

Return type:

float

bluemira.equilibria.vertical_stability._length_step(p1, p2, delta) float

Calculates the tangent angle for two points and uses this to determine the wire length to use as the difference for a square with thickness delta.

Returns:

Length value for a wire discretisation step.

Return type:

float

bluemira.equilibria.vertical_stability._get_coil_points_along_wire(wire: bluemira.geometry.wire.BluemiraWire, thickness: float) numpy.ndarray

Discretises input wire in such a way that squares centred on those points will not overlap whilst minimising gaps.

Achieves by calculating tangent angle at given point and using this to determine how far along the wire to put the next point.

Paramters

wire:

The wire that the coilset will be centred on.

thickness:

The thickness of the coils, will also impact the number of coils.

returns:

An array containing the discretised points of the input wire in 3D.

rtype:

np.ndarray

Parameters:
Return type:

numpy.ndarray

bluemira.equilibria.vertical_stability.make_coils_along_wire(wire: bluemira.geometry.wire.BluemiraWire, thickness: float, simple: bool = True, name_prefix: str = 'Passive', ctype: bluemira.base.constants.CoilType = CoilType.DUM, resistivity: float = 0.0) bluemira.equilibria.coils._grouping.CoilGroup

Function to create a coilset from a wire, where the coils making up the coilset will have a dx and dz equal to half the given thickness, with coils separated by the full thickness value. Additionally the coils will be make of the provided material.

The created coils will follow the wire by treating it as a centreline with coils centred on the line.

Parameters:
  • wire (bluemira.geometry.wire.BluemiraWire) – The wire that the coilset will be centred on.

  • thickness (float) – The thickness of the coils, will also impact the number of coils.

  • simple (bool) – Method of discretising the input wire.

  • name_prefix (str) – Coil name prefix

  • ctype (bluemira.base.constants.CoilType) – Coil type

  • resistivity (float) – Resistivity of the coil material [Ohm . m]

Returns:

A group of coils following the input wire.

Return type:

CoilGroup