roxieapi.commons.types module¶
- class roxieapi.commons.types.Base3DGeometry(nr: int, geometry: Geometry)[source]¶
Bases:
object
Base geometry for 3D objects
- nr: int¶
- class roxieapi.commons.types.BlockGeometry(nr: int, inner_surface: roxieapi.commons.types.WedgeSurface, outer_surface: roxieapi.commons.types.WedgeSurface)[source]¶
Bases:
object
- inner_surface: WedgeSurface¶
- nr: int¶
- outer_surface: WedgeSurface¶
- class roxieapi.commons.types.BlockTopology(block_nr: int, block_orig: int, layer_nr: int, first_conductor: int, last_conductor: int, n_radial: int, n_azimuthal: int, first_strand: int, last_strand: int, ins_radial: float, ins_azimuthal: float)[source]¶
Bases:
object
Topology of blocks, conductors and strands
- block_nr: int¶
- block_orig: int¶
- first_conductor: int¶
- first_strand: int¶
- ins_azimuthal: float¶
- ins_radial: float¶
- last_conductor: int¶
- last_strand: int¶
- layer_nr: int¶
- n_azimuthal: int¶
- n_radial: int¶
- class roxieapi.commons.types.Brick3DGeometry(nr: int, geometry: Geometry)[source]¶
Bases:
Base3DGeometry
Geometry information for 3D bricks
- class roxieapi.commons.types.BrickData(current: float, n1: int, n2: int, ncut: int, nodes: ndarray)[source]¶
Bases:
object
Roxie Brick Data input
- current: float¶
- n1: int¶
- n2: int¶
- ncut: int¶
- nodes: ndarray¶
- class roxieapi.commons.types.Coil3DGeometry(nr: int, geometry: Geometry, block_id: int, layer_id: int)[source]¶
Bases:
Base3DGeometry
Geometry information for 3D coils
- block_id: int¶
- layer_id: int¶
- class roxieapi.commons.types.CoilGeometry(nr: int, block_id: int, layer_id: int, geometry: ndarray[Any, dtype[float64]], strands: Dict[int, ndarray[Any, dtype[float64]]])[source]¶
Bases:
object
Geometry information for 2D coils
- block_id: int¶
- geometry: ndarray[Any, dtype[float64]]¶
- layer_id: int¶
- nr: int¶
- strands: Dict[int, ndarray[Any, dtype[float64]]]¶
- class roxieapi.commons.types.DesignVariableResult(nr: int, value: float, name: str, act_on: int, blocks: list[int])[source]¶
Bases:
object
- act_on: int¶
- blocks: list[int]¶
- name: str¶
- nr: int¶
- value: float¶
- class roxieapi.commons.types.Geometry(nodes: ndarray[Any, dtype[float64]], elements: List[List[int]] | None, boundaries: Dict[int, ndarray[Any, dtype[float64]]] | None)[source]¶
Bases:
object
Geometry Information for 2D/3D geometries.
For 2D geometries, each point is a [x,y] coordinate. For 3D geometries, each point is a [x,y,z] coordinate.
nodes - List of points ([x,y,z]) making up the Geometry elements - List of connected points as faces or cells in the form of [<p1>..<pn>] boundaries - Dict of boundaries for a Geometry, in the form of {id: [[x,y,z]…[x,y,z]]}
- boundaries: Dict[int, ndarray[Any, dtype[float64]]] | None¶
- elements: List[List[int]] | None¶
- generate_elements_for_coil_nodes() None [source]¶
- Generate cells from points.
points are ordered in z direction, 4 points define one face. Once cell is between two sets of 4 points
7+—-+6 /| /|
- 3+—-+2|
0+—-+1
- nodes: ndarray[Any, dtype[float64]]¶
- class roxieapi.commons.types.GraphInfo(id: int, graph_type: int, xval: str, yval: str, logx: bool, logy: bool, weight: float, label: str | None)[source]¶
Bases:
object
GraphInfo object, containing all information for a xy graph
- graph_type: int¶
- id: int¶
- label: str | None¶
- logx: bool¶
- logy: bool¶
- weight: float¶
- xval: str¶
- yval: str¶
- class roxieapi.commons.types.GraphPlot(title: str, id: int, axes: Dict[str, PlotAxis], graphs: List[GraphInfo])[source]¶
Bases:
object
Graph plot information
- id: int¶
- title: str¶
- class roxieapi.commons.types.HarmonicCoil(id: int, _coil_type: int, _measurement_type: int, _main_harmonic: int, params: Dict[str, float] = <factory>, bn: Dict[int, float] = <factory>, an: Dict[int, float] = <factory>, strandData: pandas.core.frame.DataFrame = <factory>, iris: pandas.core.frame.DataFrame = <factory>)[source]¶
Bases:
object
- property absolute: bool¶
- an: Dict[int, float]¶
- bn: Dict[int, float]¶
- property bref: str¶
- property coil_type: str¶
- id: int¶
- iris: DataFrame¶
- property main_harmonic: str¶
- property order: int¶
- params: Dict[str, float]¶
- property skew: bool¶
- strandData: DataFrame¶
- class roxieapi.commons.types.IronYokeOptions(mesh_scale: int = 0, mir_inner_radius: float = 0, mir_rel_perm: float = 0, sym_yz: int = 0, sym_zx: int = 0, sym_xy: int = 0, rot_mode: int = 0, rot_div: int = 0, rot_sym: int = 0)[source]¶
Bases:
object
- mesh_scale: int = 0¶
- mir_inner_radius: float = 0¶
- mir_rel_perm: float = 0¶
- rot_div: int = 0¶
- rot_mode: int = 0¶
- rot_sym: int = 0¶
- sym_xy: int = 0¶
- sym_yz: int = 0¶
- sym_zx: int = 0¶
- class roxieapi.commons.types.ObjectiveResult(nr: int, value: float, raw_value: float, obj_name: str, obj_p1: int, obj_p2: int)[source]¶
Bases:
object
- nr: int¶
- obj_name: str¶
- obj_p1: int¶
- obj_p2: int¶
- raw_value: float¶
- value: float¶
- class roxieapi.commons.types.Plot(title: str, id: int, axes: Dict[str, PlotAxis], _plotInfos: List[PlotInfo])[source]¶
Bases:
object
Base Plot object, containing all information to create a crossection or 3D plot
- id: int¶
- title: str¶
- class roxieapi.commons.types.Plot2D(title: str, id: int, axes: Dict[str, PlotAxis], _plotInfos: List[PlotInfo])[source]¶
Bases:
Plot
Plot2D object, for crossection plots
- add_coilPlot(id: str, label: str = '', legend: PlotLegend | None = None, harm_coil: int | None = None) Plot2D [source]¶
Add a coil plot component to the plot.
- Parameters:
id (str) – The data id to be used.
label (str) – Label of the coil plot.
legend (Optional[PlotLegend]) – The legend of the component. Default is None.
harm_coil (Optional[int]) – The harmonic coil number if the plot depends on a harmonic coil. Default is None.
- add_meshPlot(id: str, label: str = '', legend: PlotLegend | None = None) Plot2D [source]¶
Add a mesh plot to the plot object
- Parameters:
id (str) – The data id to be used.
label (str, optional) – Label of the mesh plot, defaults to “”
legend (Optional[PlotLegend], optional) – The legend of the component. Default is None.
- Returns:
_description_
- Return type:
- static create(title='New Plot2D', xlim: Tuple[float, float] | None = None, ylim: Tuple[float, float] | None = None) Plot2D [source]¶
Creates a new Plot2D object.
- Parameters:
title (str) – The title of the plot. Default is “New Plot2D”.
xlim (Optional[Tuple[float, float]]) – The limits for the x-axis. Default is None.
ylim (Optional[Tuple[float, float]]) – The limits for the y-axis. Default is None.
- Returns:
A new Plot2D object.
- Return type:
- class roxieapi.commons.types.Plot3D(title: str, id: int, axes: Dict[str, roxieapi.commons.types.PlotAxis], _plotInfos: List[roxieapi.commons.types.PlotInfo])[source]¶
Bases:
Plot
- add_coilPlot(id: str, label: str = '', legend: PlotLegend | None = None) Plot3D [source]¶
Add a coil plot component to the plot.
- Parameters:
id (str) – The data id to be used.
label (str) – Label of the coil plot.
legend (Optional[PlotLegend]) – The legend of the component. Default is None.
harm_coil (Optional[int]) – The harmonic coil number if the plot depends on a harmonic coil. Default is None.
- add_meshPlot(id: str, label: str = '', legend: PlotLegend | None = None) Plot3D [source]¶
Add a mesh plot to the plot object
- Parameters:
id (str) – The data id to be used.
label (str, optional) – Label of the mesh plot, defaults to “”
legend (Optional[PlotLegend], optional) – The legend of the component. Default is None.
- Returns:
_description_
- Return type:
- static create(title='New Plot3D', xlim: Tuple[float, float] | None = None, ylim: Tuple[float, float] | None = None, zlim: Tuple[float, float] | None = None) Plot3D [source]¶
Creates a new Plot3D object
- Parameters:
title (str, optional) – The plot title, defaults to “New Plot3D”
xlim (Optional[Tuple[float, float]], optional) – Limits of x axis, defaults to None
ylim (Optional[Tuple[float, float]], optional) – Limits of y axis, defaults to None
zlim (Optional[Tuple[float, float]], optional) – Limits of z axis, defaults to None
- Returns:
The Plot3D description
- Return type:
- property showSpacers: bool¶
Flag if spacers are shown in the plot
- class roxieapi.commons.types.PlotAxis(label: str, bounds: Tuple[float, float] | None, log: bool)[source]¶
Bases:
object
Plot Axis information (for roxie plots)
- bounds: Tuple[float, float] | None¶
- label: str¶
- log: bool¶
- class roxieapi.commons.types.PlotInfo(id: str, type: str, dataType: str, label: str, plotLegend: PlotLegend | None, harmCoil: int | None, vector_mappings: Dict[str, int] | None)[source]¶
Bases:
object
Plot info object, containing all information to create a crossection or 3D plot
- dataType: str¶
- harmCoil: int | None¶
- id: str¶
- label: str¶
- plotLegend: PlotLegend | None¶
- type: str¶
- vector_mappings: Dict[str, int] | None¶
- class roxieapi.commons.types.PlotLegend(pos: str | None, greyScale: bool | None, min_val: float | None, max_val: float | None)[source]¶
Bases:
object
Plot Legend information (for roxie plots)
- greyScale: bool | None¶
- max_val: float | None¶
- min_val: float | None¶
- pos: str | None¶
- class roxieapi.commons.types.WedgeGeometry(layer: int, nr: int, inner_surface: WedgeSurface | None, outer_surface: WedgeSurface | None, block_inner: int, block_outer: int)[source]¶
Bases:
object
Geometry to store wedge information
- block_inner: int¶
- block_outer: int¶
- inner_surface: WedgeSurface | None¶
- layer: int¶
- nr: int¶
- outer_surface: WedgeSurface | None¶