Plasmaboundaries Model¶
-
plasmaboundaries.model.
compute_N_i
(params)¶ Computes N_1, N_2 and N_3 coefficients based on plasma parameters
Parameters: params (dict) – contains the plasma parameters (aspect_ratio, elongation, triangularity, A) Returns: (N_1, N_2, N_3) Return type: (float, float, float)
-
plasmaboundaries.model.
compute_psi
(params, config='non-null', return_coeffs=False)¶ Computes the magnetic flux fonction
Parameters: - params (dict) – contains the plasma parameters (aspect_ratio, elongation, triangularity, A)
- config (str, optional) – shape of the plasma “non-null”, “single-null”, “double-null”. Defaults to “non-null”.
- return_coeffs (bool, optional) – If True, will also return the coefficients c_i. Defaults to False.
Returns: - Magnetic flux fonction and
coefficients c_i (only if return_coeffs is True)
Return type: (callable) or (callable, list)
-
plasmaboundaries.model.
constraints
(p, params, config)¶ Creates set of constraints for parametric GS solution for any plasma configuration.
Parameters: - p (list) – c_i coefficients (floats)
- params (dict) – contains the plasma parameters (aspect_ratio, elongation, triangularity, A)
- config (str) – shape of the plasma ‘non-null’, ‘single-null’, ‘double-null’.
Returns: set of constraints
Return type: list
-
plasmaboundaries.model.
get_separatrix_coordinates
(params, config, step=0.01)¶ Creates a list of points describing the separatrix
Parameters: - params (dict) – contains the plasma parameters (aspect_ratio, elongation, triangularity, A)
- config (str) – shape of the plasma “non-null”, “single-null”, “double-null”.
- step (float, optional) – Resolution of the domain. Defaults to 0.01.
Raises: ValueError
– If no separatrix is found within the points of interestReturns: list of points coordinates
Return type: numpy.array
-
plasmaboundaries.model.
test_points
(aspect_ratio, elongation, triangularity)¶ Compute the coordinates of inner and outer equatorial points and high point based on plasma geometrical parameters.
Parameters: - aspect_ratio (float) – minor radius / major radius
- elongation (float) – plasma elongation
- triangularity (float) – plasma triangularity
Returns: - points (x, y)
coordinates
Return type: ((float, float), (float, float), (float, float))
-
plasmaboundaries.model.
val_from_sp
(expression)¶ Transforms a sympy expression to a callable function f(x, y)
Parameters: expression (sympy.Add) – sympy expression to be converted which has symbols ‘x’ and ‘y’ in it.