space
Space sampling
ClosedFluxSurface
Closed poloidal magnetic flux surface.
Source code in tokamak_neutron_source/flux.py
area
cached
property
Enclosed area of the ClosedFluxSurface.
Returns:
| Name | Type | Description |
|---|---|---|
area |
float
|
ClosedFluxSurface enclosed poloidal area |
center_of_mass
cached
property
Centre of mass of the ClosedFluxSurface.
Returns:
| Name | Type | Description |
|---|---|---|
com |
tuple[float, float]
|
ClosedFluxSurface center of mass |
volume
cached
property
Volume of the ClosedFluxSurface.
Returns:
| Name | Type | Description |
|---|---|---|
volume |
float
|
ClosedFluxSurface enclosed volume. |
FluxPoint
sample_space_2d(lcfs, o_point, cell_side_length)
Sample the 2-D poloidal plane within the LCFS.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lcfs
|
ClosedFluxSurface
|
Last closed flux surface |
required |
o_point
|
FluxPoint
|
O-point location |
required |
cell_side_length
|
float
|
Side length of square cells [m] |
required |
Returns:
| Name | Type | Description |
|---|---|---|
x |
ndarray[tuple[Any, ...], dtype[~_ScalarT]]
|
Radial coordinates of sampled points [m] |
z |
ndarray[tuple[Any, ...], dtype[~_ScalarT]]
|
Vertical coordinates of sampled points [m] |
d_volume |
ndarray[tuple[Any, ...], dtype[~_ScalarT]]
|
Volumes of cells centred at points [m^3] |
Notes
Creates points at the centres of square cells of fixed size (cell_side_length by cell_side_length). Only cells whose centres fall inside the LCFS polygon are kept. Cells are positioned such that the centre of one cell lies on the O-point.