bluemira.equilibria.optimisation.harmonics.harmonics_constraint_functions

Harmonics constraint classes

Classes

SphericalHarmonicConstraintFunction

Constraint function to constrain spherical harmonics starting from initial

ToroidalHarmonicConstraintFunction

Constraint function to constrain harmonics starting from initial

Module Contents

class bluemira.equilibria.optimisation.harmonics.harmonics_constraint_functions.SphericalHarmonicConstraintFunction(a_mat: numpy.ndarray, b_vec: numpy.ndarray, value: float, scale: float, name: str | None = None)

Bases: bluemira.equilibria.optimisation.constraints.ConstraintFunction

Inheritance diagram of bluemira.equilibria.optimisation.harmonics.harmonics_constraint_functions.SphericalHarmonicConstraintFunction

Constraint function to constrain spherical harmonics starting from initial coil currents and associated core plasma.

Parameters:
  • a_mat (numpy.ndarray) – Response matrix

  • b_vec (numpy.ndarray) – Target value vector

  • value (float) – Target constraint value

  • scale (float) – Current scale with which to calculate the constraints

  • name (str | None)

a_mat
b_vec
value
scale
name = None

The name of the constraint

f_constraint(vector: numpy.typing.NDArray) numpy.typing.NDArray

Constraint function

Parameters:

vector (numpy.typing.NDArray)

Return type:

numpy.typing.NDArray

df_constraint(_vector: numpy.typing.NDArray[numpy.float64]) numpy.typing.NDArray[numpy.float64]

Constraint derivative

Parameters:

_vector (numpy.typing.NDArray[numpy.float64])

Return type:

numpy.typing.NDArray[numpy.float64]

class bluemira.equilibria.optimisation.harmonics.harmonics_constraint_functions.ToroidalHarmonicConstraintFunction(a_mat: numpy.ndarray, b_vec: numpy.ndarray, value: float, scale: float, name: str | None = None)

Bases: bluemira.equilibria.optimisation.constraints.ConstraintFunction

Inheritance diagram of bluemira.equilibria.optimisation.harmonics.harmonics_constraint_functions.ToroidalHarmonicConstraintFunction

Constraint function to constrain harmonics starting from initial coil currents and associated core plasma. Used for toroidal harmonics.

Parameters:
  • a_mat (numpy.ndarray) – Response matrix

  • b_vec (numpy.ndarray) – Target value vector

  • value (float) – Target constraint value

  • scale (float) – Current scale with which to calculate the constraints

  • name (str | None)

a_mat
b_vec
value
scale
name = None

The name of the constraint

f_constraint(vector: numpy.typing.NDArray) numpy.typing.NDArray

Constraint function

Parameters:

vector (numpy.typing.NDArray)

Return type:

numpy.typing.NDArray

df_constraint(vector: numpy.typing.NDArray) numpy.typing.NDArray

Constraint derivative

Parameters:

vector (numpy.typing.NDArray)

Return type:

numpy.typing.NDArray