bluemira.codes.plasmod.equilibrium_2d_coupling

Couple PLASMOD to a 2-D asymmetric fixed boundary equilibrium solve

NOTE: This procedure is known to be sensitive to inputs, exercise caution.

Functions

solve_transport_fixed_boundary(...)

Solve the plasma fixed boundary problem using delta95 and kappa95 as target

Module Contents

bluemira.codes.plasmod.equilibrium_2d_coupling.solve_transport_fixed_boundary(parameterisation: bluemira.geometry.parameterisations.GeometryParameterisation, transport_solver: bluemira.codes.typing.TransportSolver, gs_solver: bluemira.equilibria.fem_fixed_boundary.fem_magnetostatic_2D.FemGradShafranovFixedBoundary, kappa95_t: float, delta95_t: float, lcar_mesh: float = 0.15, maxiter: int = 30, iter_err_max: float = 1e-05, max_inner_iter: int = 20, inner_iter_err_max: float = 0.0001, relaxation: float = 0.2, transport_run_mode: str | bluemira.codes.interface.BaseRunMode = 'run', mesh_filename: str = 'FixedBoundaryEquilibriumMesh', *, plot: bool = False, debug: bool = False, gif: bool = False, refine: bool = False, num_levels: int = 2, distance: float = 1.0, ny_fs_min: int = 40, directory: str = '') bluemira.equilibria.fem_fixed_boundary.fem_magnetostatic_2D.FixedBoundaryEquilibrium

Solve the plasma fixed boundary problem using delta95 and kappa95 as target values and iterating on a transport solver to have consistency with pprime and ffprime.

Parameters:
  • parameterisation (bluemira.geometry.parameterisations.GeometryParameterisation) – Geometry parameterisation class for the plasma

  • transport_solver (bluemira.codes.typing.TransportSolver) – Transport Solver to call

  • gs_solver (bluemira.equilibria.fem_fixed_boundary.fem_magnetostatic_2D.FemGradShafranovFixedBoundary) – Grad-Shafranov Solver instance

  • kappa95_t (float) – Target value for kappa at 95%

  • delta95_t (float) – Target value for delta at 95%

  • lcar_mesh (float) – Value of the characteristic length used to generate the mesh to solve the Grad-Shafranov problem

  • maxiter (int) – Maximum number of iteration between Grad-Shafranov and the transport solver

  • iter_err_max (float) – Convergence maximum error to stop the iteration

  • max_inner_iter (int) – Maximum number of inner iterations on the flux functions

  • inner_iter_err_max (float) – Inner convergence error on when iterating flux functions

  • relaxation (float) – Iteration relaxing factor

  • transport_run_mode (str | bluemira.codes.interface.BaseRunMode) – Run mode for transport solver

  • mesh_filename (str) – filename for mesh output file

  • plot (bool) – Whether or not to plot

  • refine (bool) – Whether or not the mesh should be refined around the magnetic axis

  • num_levels (int) – Number of refinement levels

  • distance (float) – Maximum distance from the magnetic axis to which the refinement will be applied

  • ny_fs_min (int) – Minimum number of points in a flux surface extracted from the mesh.

  • debug (bool)

  • gif (bool)

  • directory (str)

Returns:

equilibrium – Final fixed boundary equilibrium result from the transport <-> fixed boundary equilibrium solve

Return type:

FixedBoundaryEquilibrium