utils
Module to hold plotting functions, used in plot_proc.py, which are common to multiple reactor components
dh_vertices(r0, a, triang, kap)
Returns the radial and vertical coordinates which, when plotted, plots half a thin D-section, centred on z = 0
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
r0
|
float
|
major radius of centre |
required |
a
|
float
|
horizontal radius |
required |
triang
|
float
|
plasma triangularity |
required |
kap
|
float
|
plasma elongation |
required |
Returns:
| Type | Description |
|---|---|
tuple[ndarray, ndarray]
|
tuple containing radial and vertical coordinates which, when plotted, plots a half thin D-section with a gap |
Source code in process/models/geometry/utils.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | |
dhgap_vertices(inpt, outpt, inthk, outthk, toppt, topthk, triang)
Returns the radial and vertical coordinates which, when plotted, plots a half thick D-section with a gap
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
inpt
|
float
|
inner point |
required |
outpt
|
float
|
outer point |
required |
inthk
|
float
|
inner thickness |
required |
outthk
|
float
|
outer thickness |
required |
toppt
|
float
|
top point |
required |
topthk
|
float
|
top thickness |
required |
triang
|
float
|
plasma triangularity |
required |
Returns:
| Type | Description |
|---|---|
tuple[ndarray, ndarray, ndarray, ndarray, ndarray, ndarray, ndarray, ndarray]
|
tuple containing radial and vertical coordinates which, when plotted, plots a half thick D-section with a gap |
Source code in process/models/geometry/utils.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | |
ellips_fill_vertices(a1=0, a2=0, b1=0, b2=0, x0=0, y0=0, ang1=0, ang2=np.pi / 2)
Returns the vertices of a shape which, when filled, fills the space between two concentric ellipse sectors
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a1
|
float
|
horizontal radius to be filled, defaults to 0 |
0
|
a2
|
float
|
horizontal radius to be filled, defaults to 0 |
0
|
b1
|
float
|
vertical radius to be filled, defaults to 0 |
0
|
b2
|
float
|
vertical radius to be filled, defaults to 0 |
0
|
x0
|
float
|
x coordinate of centre of ellipses, defaults to 0 |
0
|
y0
|
float
|
y coordinate of centre of ellipses, defaults to 0 |
0
|
ang1
|
float
|
polar angle at start, defaults to 0 |
0
|
ang2
|
float
|
polar angle at end, defaults to np.pi/2 |
pi / 2
|
Returns:
| Type | Description |
|---|---|
list[tuple[float, float]]
|
list containing (R,Z) coordinates which, when plotted, fill space between ellipses |
Source code in process/models/geometry/utils.py
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | |