bluemira.radiation_transport.neutronics.radial_wall =================================================== .. py:module:: bluemira.radiation_transport.neutronics.radial_wall .. autoapi-nested-parse:: Defining (and changing) the radial (side) walls of PreCell in PreCellArrays. Classes ------- .. autoapisummary:: bluemira.radiation_transport.neutronics.radial_wall.Vert bluemira.radiation_transport.neutronics.radial_wall.CellWalls Module Contents --------------- .. py:class:: Vert Bases: :py:obj:`enum.IntEnum` .. autoapi-inheritance-diagram:: bluemira.radiation_transport.neutronics.radial_wall.Vert :parts: 1 :private-bases: Vertices index for cells .. py:attribute:: exterior_end :value: 0 .. py:attribute:: interior_start :value: 1 .. py:attribute:: interior_end :value: 2 .. py:attribute:: exterior_start :value: 3 .. py:class:: CellWalls(cell_walls: numpy.typing.ArrayLike) A list of start- and end-location vectors of all of the walls dividing neighbouring pre-cells. .. py:attribute:: cell_walls .. py:attribute:: _starts .. py:attribute:: _init_ends .. py:attribute:: original_lengths .. py:attribute:: directions .. py:attribute:: num_cells :type: int :value: 0 .. py:method:: __len__() -> int Number of cell wall panels .. py:method:: __getitem__(index_or_slice) -> numpy.typing.NDArray | float Get cell wall panel .. py:method:: __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. .. py:method:: __repr__() -> str String representation .. py:method:: copy() -> CellWalls Copy cell wall .. py:method:: from_pre_cell_array(pre_cell_array: bluemira.radiation_transport.neutronics.make_pre_cell.PreCellArray) -> CellWalls :classmethod: 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. .. py:method:: from_pre_cell_array_vv(pre_cell_array: bluemira.radiation_transport.neutronics.make_pre_cell.PreCellArray) -> CellWalls :classmethod: 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. .. py:property:: starts :type: numpy.typing.NDArray The start points of each cell wall. shape = (N+1, 2) .. py:property:: ends :type: numpy.typing.NDArray The end point changes value depending on the user-set length. .. py:method:: 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). :param lengths: 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 :rtype: new end points .. py:method:: get_length(i: int) -> float Get the length of the i-th cell-wall :returns: **length** :rtype: float .. py:method:: set_length(i, new_length) Set the length of the i-th cell-wall .. py:property:: lengths Current lengths of the cell walls. .. py:method:: get_volume(i) Get the volume of the i-ith cell :returns: **volume** :rtype: float .. py:property:: volumes Current volumes of the (simplified) cells created by joining straight lines between neighbouring cell walls. .. py:method:: 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 .. py:method:: 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** :rtype: float .. py:method:: 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** :rtype: float .. py:method:: 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.