Structure¶
This module contains implementations for defining structures in terms of a collection of areas and view factors.
-
class
machball.ballistic.structure.Structure(areas, qij, regions=None)¶ Implement a geometrical feature as an array of areas and view factors.
A Structure is just an array of areas and view factors. It optionally allows to define regions as either individual indices or as slices.
Parameters: - areas (numpy.array) – 1D array with the areas of each element in the structure
- qij (numpy.array) – 2D array with the view factors for all the elements
- regions (dict) – a dictionary partitioning the structure into a series of regions
-
class
machball.ballistic.structure.Trench(AR, Nz)¶ Implement a rectangular trench
A trench is composed of Nz + 2 elements, with the first and last elements corresponding to the opening and the base, respectively.
The view factors are calculated assuming a cosine law distribution, which corresponds to the behavior expected both from diffuse reemision and a non-directional flux of incident species.
Parameters: - AR (float) – Aspect ratio, defined as the depth to width ratio
- Nz (int) – Number of vertical sections in the discretized wall
-
class
machball.ballistic.structure.Via(AR, Nz)¶ Implement a circular via
A Via is composed of Nz + 2 elements, with the first and last elements corresponding to the opening and the base, respectively.
The view factors are calculated assuming a cosine law distribution, which corresponds to the behavior expected both from diffuse reemision and a non-directional flux of incident species.
Parameters: - AR (float) – Aspect ratio, defined as the depth to diameter ratio
- Nz (int) – Number of vertical sections in the discretized wall
-
machball.ballistic.structure.create_trench(AR, Nz)¶ Return the areas and view factor of a rectangular trench, where the vertical wall is divided into identical sections.
Parameters: - AR (float) – Aspect ratio, defined as the width to diameter ratio
- Nz (int) – Number of vertical sections in the discretized wall
Returns: Tuple with the areas (1D array), and view factors (2D array)
Return type: (numpy.array, numpy.array)
-
machball.ballistic.structure.create_via(AR, Nz)¶ Return the areas and view factor of a circular via, where the vertical wall is divided into identical sections.
Parameters: - AR (float) – Aspect ratio, defined as the depth to diameter ratio
- Nz (int) – Number of vertical sections in the discretized wall
Returns: Tuple with the areas (1D array), and view factors (2D array)
Return type: (numpy.array, numpy.array)
-
machball.ballistic.structure.read_structure(filename, areafile=None)¶ Read a Structure from file
If areafile is not defined, it assumes that the first column contains the normalized areas, with the remaining columns the view factors.
Otherwise, it reads the first column of areafile and assumes that the data contained in filename are just the view factors.