bluemira.equilibria.diagnostics
Diagnostic options for use in the equilibria module.
Classes
Whether to plot grid lines, grid edge or both. |
|
Type of plot axes. |
|
For use with psi comparison plotter. |
|
Which divertor legs to create plots for. |
|
For LCFS masking in plots. |
|
Specify how the interpolated grid is sized. |
|
For the coilset comparison tables. |
|
For use in select_eq - to create an appropriate |
|
The parameter to plot for an equilibria xz plot. |
|
For flux surface comparison plotting. |
|
Diagnostic plotting options for Equilibrium. |
|
Type of plot to view during optimisation. |
|
Descriptor for Picard diagnostics |
|
Diagnostic plotting options for the Picard Iterator |
Module Contents
- class bluemira.equilibria.diagnostics.GridPlotType(*args, **kwds)
Bases:
enum.FlagWhether to plot grid lines, grid edge or both.
- GRID
- EDGE
- GRID_WITH_EDGE
- class bluemira.equilibria.diagnostics.EqSubplots(*args, **kwds)
Bases:
enum.EnumType of plot axes. Determines number of subplots, axes label, etc.
- XZ
Plot x vs z
- VS_PSI_NORM
Plot vs normalised psi.
- XZ_COMPONENT_PSI
PLot x vs z for different psi components.
- VS_PSI_NORM_STACK
Plot parameters (numbers of which can vary) against the normalised psi.
- VS_X
Plot parameters (numbers of which can vary) against x.
- class bluemira.equilibria.diagnostics.PsiPlotType(*args, **kwds)
Bases:
enum.FlagFor use with psi comparison plotter.
- PSI
Plot equilibrium psi.
- PSI_DIFF
Plot the difference between a reference equilibrium psi and the equilibrium psi.
- PSI_ABS_DIFF
Plot the absolute difference between a reference equilibrium psi and the equilibrium psi.
- PSI_REL_DIFF
Plot the relative difference between a reference equilibrium psi and the equilibrium psi.
- DIFF
- class bluemira.equilibria.diagnostics.DivLegsToPlot(*args, **kwds)
Bases:
enum.FlagWhich divertor legs to create plots for.
- UP
Upper pair of legs.
- LW
Lower pair of legs.
- ALL
All available legs.
- PAIR
- class bluemira.equilibria.diagnostics.EqPlotMask(*args, **kwds)
Bases:
enum.FlagFor LCFS masking in plots. Block the area within or outside of the reference LCFS.
- NONE
No mask.
- IN_LCFS
Mask out values inside chosen LCFS.
- OUT_LCFS
Mask out values outside chosen LCFS.
- IN_REF_LCFS
Mask out values inside reference LCFS.
- OUT_REF_LCFS
Mask out values outside reference LCFS.
- IN_COMBO_LCFS
Mask out values inside chosen and reference LCFS.
- OUT_COMBO_LCFS
Mask out values outside chosen and reference LCFS.
- DIV_AREA
Mask out the values outside divertor area.
- POLYGON
Mask out the values outside a chosen polygon area.
- INPUT
- REF
- COMBO
- LCFS
- IN
- OUT
- class bluemira.equilibria.diagnostics.InterpGrid(*args, **kwds)
Bases:
enum.EnumSpecify how the interpolated grid is sized.
- OVERLAP
Make a new grid for interpolation using the overlapping areas of the old grids.
- BOTH
Make a new grid for interpolation using an area which includes both of the old grids.
- class bluemira.equilibria.diagnostics.CSData(*args, **kwds)
Bases:
enum.EnumFor the coilset comparison tables. Value to be compared: current, x-position, z-position, field, and force.
- CURRENT = 'I [MA]'
- XLOC = 'x [m]'
- ZLOC = 'z [m]'
- B = 'B [T]'
- F = 'F [GN]'
- class bluemira.equilibria.diagnostics.FixedOrFree(*args, **kwds)
Bases:
enum.EnumFor use in select_eq - to create an appropriate Equilibrium or FixedPlasmaEquilibrium object. Fixed or free boundary equilibrium.
- FIXED
- FREE
- class bluemira.equilibria.diagnostics.EqBPlotParam(*args, **kwds)
Bases:
enum.FlagThe parameter to plot for an equilibria xz plot.
- PSI
Poloidal Magnetic Flux
- BP
Poloidal Field
- BT
Toroidal Field
- FIELD
- class bluemira.equilibria.diagnostics.FluxSurfaceType(*args, **kwds)
Bases:
enum.EnumFor flux surface comparison plotting. Compare LCFSs, separatricies or flux surfaces with a given normalised psi.
- LCFS
- SEPARATRIX
- PSI_NORM
- class bluemira.equilibria.diagnostics.EqDiagnosticOptions
Diagnostic plotting options for Equilibrium.
- psi_diff: PsiPlotType
- split_psi_plots: EqSubplots
- plot_mask: EqPlotMask
- interpolation_grid: InterpGrid
- plot_name: str = 'default_0'
- folder: str | os.PathLike | None = None
- save: bool = False
- __post_init__()
Post init folder definition
- class bluemira.equilibria.diagnostics.PicardDiagnostic(*args, **kwds)
Bases:
enum.FlagType of plot to view during optimisation.
- EQ
Plot the equilibrium
- CONVERGENCE
Plot the convergence
- EQ_AND_CONVERGENCE
Plot both equilibrium and convergence
- NO_PLOT
- class bluemira.equilibria.diagnostics._PicardDiagnosticDescriptor
Descriptor for Picard diagnostics
- _default
- __set_name__(_, name: str)
Set the attribute name from a dataclass
- Parameters:
name (str)
- __get__(obj: Any, _) PicardDiagnostic
Get the Diagnostic type
- Returns:
The diagnostic
- Parameters:
obj (Any)
- Return type:
- __set__(obj: Any, value: bool | str | int | list[str | int] | PicardDiagnostic)
Set the diagnostic
- Parameters:
obj (Any)
value (bool | str | int | list[str | int] | PicardDiagnostic)
- class bluemira.equilibria.diagnostics.PicardDiagnosticOptions
Diagnostic plotting options for the Picard Iterator
- plot:
What type of plot to produce. None for no plotting.
- gif:
Whether or not to make a GIF
- plot_name:
GIF plot file base-name
- figure_folder:
The path where figures will be saved. If the input value is None (e.g. default) then this will be reinterpreted as the path data/plots/equilibria under the bluemira root folder, if that path is available.
- plot: PicardDiagnostic
- gif: bool = False
- plot_name: str = 'default_0'
- figure_folder: str | os.PathLike | None = None
- file_format: str = 'svg'
- __post_init__()
Post init folder definition
- static finalise_plots()
Finalise plotting showing
- make_gif()
Make gif of iterator plot
- update_figure(eq: bluemira.equilibria.equilibrium.Equilibrium, convergence: bluemira.equilibria.solve.ConvergenceCriterion, i: int)
Updates the figure if plotting is used
- Parameters:
convergence (bluemira.equilibria.solve.ConvergenceCriterion)
i (int)