bluemira.radiation_transport.neutronics.radial_wall

Defining (and changing) the radial (side) walls of PreCell in PreCellArrays.

Classes

Vert

Vertices index for cells

CellWalls

A list of start- and end-location vectors of all of the walls dividing neighbouring

Module Contents

class bluemira.radiation_transport.neutronics.radial_wall.Vert

Bases: enum.IntEnum

Inheritance diagram of bluemira.radiation_transport.neutronics.radial_wall.Vert

Vertices index for cells

exterior_end = 0
interior_start = 1
interior_end = 2
exterior_start = 3
class bluemira.radiation_transport.neutronics.radial_wall.CellWalls(cell_walls: numpy.typing.ArrayLike)

A list of start- and end-location vectors of all of the walls dividing neighbouring pre-cells.

Parameters:

cell_walls (numpy.typing.ArrayLike)

cell_walls
_starts
_init_ends
original_lengths
directions
num_cells: int = 0
__len__() int

Number of cell wall panels

Return type:

int

__getitem__(index_or_slice) numpy.typing.NDArray | float

Get cell wall panel

Return type:

numpy.typing.NDArray | float

__setitem__(index_or_slice, new_coordinates: numpy.typing.NDArray | float)

self[:, :, :] = … can completely reset some coordinates. However, a full-reset should be avoided because we don’t want to mess with the start rz coordinates.

Parameters:

new_coordinates (numpy.typing.NDArray | float)

__repr__() str

String representation

Return type:

str

copy() CellWalls

Copy cell wall

Return type:

CellWalls

classmethod from_pre_cell_array(pre_cell_array: bluemira.radiation_transport.neutronics.make_pre_cell.PreCellArray) CellWalls

Use the corner vertices in an array of pre-cells to make a CellWalls.

Returns:

A list of cell walls from from a pre-cell array, specifically made from the walls dividing adjacent pre-cells from each other.

Parameters:

pre_cell_array (bluemira.radiation_transport.neutronics.make_pre_cell.PreCellArray)

Return type:

CellWalls

classmethod from_pre_cell_array_vv(pre_cell_array: bluemira.radiation_transport.neutronics.make_pre_cell.PreCellArray) CellWalls

Use the corner vertices and the vacuum vessel vertices of the pre-cell array to make a CellWall.

Returns:

A list of cell walls extracted from a divertor pre-cell array, specifically made from the walls dividing adjacent divertor pre-cells from each other.

Parameters:

pre_cell_array (bluemira.radiation_transport.neutronics.make_pre_cell.PreCellArray)

Return type:

CellWalls

property starts: numpy.typing.NDArray

The start points of each cell wall. shape = (N+1, 2)

Return type:

numpy.typing.NDArray

property ends: numpy.typing.NDArray

The end point changes value depending on the user-set length.

Return type:

numpy.typing.NDArray

calculate_new_end_points(lengths: float | numpy.typing.NDArray[numpy.float64]) numpy.typing.NDArray

Get the end points of each cell wall if they were changed to have the specified lengths. This is different to set_length in that the new end points are returned, and the object itself is not modified by the test length(s).

Parameters:

lengths (float | numpy.typing.NDArray[numpy.float64]) – np.ndarray of shape = (N+1,) where N+1 == number of cell walls. It can also be a scalar, which would then be broadcasted into (N+1,).

Returns:

an array of the same shape as self.starts

Return type:

new end points

get_length(i: int) float

Get the length of the i-th cell-wall

Returns:

length

Return type:

float

Parameters:

i (int)

set_length(i, new_length)

Set the length of the i-th cell-wall

property lengths

Current lengths of the cell walls.

get_volume(i)

Get the volume of the i-ith cell

Returns:

volume

Return type:

float

property volumes

Current volumes of the (simplified) cells created by joining straight lines between neighbouring cell walls.

check_volumes_and_lengths()

Ensure all cells have positive volumes, to minimise the risk of self-intersecting lines and negative lengths

Raises:

GeometryError – Cell has non positive volume

volume_of_cells_neighbouring(i, test_length)

Get the volume of cell[i-1] and cell[i] when cell_wall[i] is set to the test_length.

Returns:

volume

Return type:

float

volume_derivative_of_cells_neighbouring(i, test_length)

Measure the derivative on the volume of cell[i-1] and cell[i] w.r.t. to length of cell_wall[i], at cell_wall[i] length = test_length.

Returns:

dV/dl

Return type:

float

optimise_to_match_individual_volumes(volume_list: collections.abc.Iterable[float], *, maxiter=1000)

Allow the lengths of each wall to increase, so that the overall volumes are preserved as much as possible. Assuming the entire exterior curve is convex, then our linear approximation is only going to under-approximate. Therefore to achieve better approximation, we only need to increase the lengths.

Parameters:

volume_list (collections.abc.Iterable[float])