profiles
Profile
Bases: ABC
Abstract base class used to create and hold profiles (temperature, density)
Source code in process/models/physics/profiles.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 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 | |
profile_size = profile_size
instance-attribute
profile_x = np.arange(self.profile_size)
instance-attribute
profile_y = np.zeros(self.profile_size)
instance-attribute
profile_integ = 0
instance-attribute
profile_dx = 0
instance-attribute
normalise_profile_x()
Normalizes the x-dimension of the profile.
This method divides the values in the profile_x attribute by the maximum value
in the profile_x array, resulting in a normalized version of the x-dimension.
Example:
If profile_x is [1, 2, 3, 4, 5], after normalization it will become
[0.2, 0.4, 0.6, 0.8, 1.0].
Note:
This method modifies the profile_x attribute in-place.
Source code in process/models/physics/profiles.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | |
calculate_profile_dx()
Calculates the differential between points in the profile.
This method calculates the differential between points in the profile by dividing the maximum x value in the profile
by the difference in size between the points. The result is stored in the profile_dx attribute.
Source code in process/models/physics/profiles.py
52 53 54 55 56 57 58 | |
calculate_profile_y()
abstractmethod
Use a profile function to act on self.profile_x to calculate and set the values of self.profile_y.
Source code in process/models/physics/profiles.py
60 61 62 63 64 | |
integrate_profile_y()
Integrate profile_y values using scipy.integrate.simpson() function.
This method calculates the integral of the profile_y values using the Simpson's rule provided by the scipy.integrate.simpson() function. The integral is stored in the self.profile_integ attribute.
Source code in process/models/physics/profiles.py
66 67 68 69 70 71 72 73 74 75 | |
NeProfile
Bases: Profile
Electron density profile class. Contains a function to calculate the electron density profile and store the data.
Source code in process/models/physics/profiles.py
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 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 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 | |
run()
Subroutine which calls profile functions and stores neprofile data.
Source code in process/models/physics/profiles.py
83 84 85 86 87 88 89 90 91 92 93 94 95 96 | |
calculate_profile_y(rho, radius_plasma_pedestal_density_norm, n0, nped, nsep, alphan)
This routine calculates the density at each normalised minor radius position rho for a HELIOS-type density pedestal profile (neprofile).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rho
|
array
|
Normalised minor radius vector. |
required |
radius_plasma_pedestal_density_norm
|
float
|
Normalised minor radius pedestal position. |
required |
n0
|
float
|
Central density (/m3). |
required |
nped
|
float
|
Pedestal density (/m3). |
required |
nsep
|
float
|
Separatrix density (/m3) |
required |
alphan
|
float
|
Density peaking parameter. |
required |
Source code in process/models/physics/profiles.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 | |
ncore(radius_plasma_pedestal_density_norm, nped, nsep, nav, alphan)
staticmethod
This routine calculates the core density of a pedestalised profile. The solution comes from integrating and summing the two separate density profiles for the core and pedestal region within their bounds. This has to be multiplied by the torus volume element before integration which leads to an added rho term in each part of the profile. When dividing by the volume of integration to get the average density the simplification leads to a factor of 2 having to be multiplied on to each of the integration results. This function for the average density can then be re-arranged to calculate the central plasma density n_0 / ncore.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
radius_plasma_pedestal_density_norm
|
float
|
The normalised minor radius pedestal position. |
required |
nped
|
float
|
The pedestal density (/m3). |
required |
nsep
|
float
|
The separatrix density (/m3). |
required |
nav
|
float
|
The electron density (/m3). |
required |
alphan
|
float
|
The density peaking parameter |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float
|
The core density. |
|
References |
float
|
Jean, J. (2011). HELIOS: A Zero-Dimensional Tool for Next Step and Reactor Studies. Fusion Science and Technology, 59(2), 308-349. https://doi.org/10.13182/FST11-A11650 |
Source code in process/models/physics/profiles.py
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 | |
set_physics_variables()
Calculates and sets physics variables required for the profile.
Source code in process/models/physics/profiles.py
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 | |
TeProfile
Bases: Profile
Electron temperature profile class. Contains a function to calculate the temperature profile and store the data.
Source code in process/models/physics/profiles.py
235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 | |
run()
Subroutine to initialise neprofile and execute calculations.
Source code in process/models/physics/profiles.py
238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 | |
calculate_profile_y(rho, radius_plasma_pedestal_temp_norm, t0, temp_plasma_pedestal_kev, temp_plasma_separatrix_kev, alphat, tbeta)
Calculates the temperature at a normalised minor radius position rho for a pedestalised profile (teprofile). If i_plasma_pedestal = 0 the original parabolic profile form is used instead.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rho
|
array
|
Normalised minor radius. |
required |
radius_plasma_pedestal_temp_norm
|
float
|
Normalised minor radius pedestal position. |
required |
t0
|
float
|
Central temperature (keV). |
required |
temp_plasma_pedestal_kev
|
float
|
Pedestal temperature (keV). |
required |
temp_plasma_separatrix_kev
|
float
|
Separatrix temperature (keV). |
required |
alphat
|
float
|
Temperature peaking parameter. |
required |
tbeta
|
float
|
Second temperature exponent. |
required |
References
|
Jean, J. (2011). HELIOS: A Zero-Dimensional Tool for Next Step and Reactor Studies. Fusion Science and Technology, 59(2), 308-349. https://doi.org/10.13182/FST11-A11650 |
required |
Source code in process/models/physics/profiles.py
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 | |
tcore(radius_plasma_pedestal_temp_norm, temp_plasma_pedestal_kev, temp_plasma_separatrix_kev, tav, alphat, tbeta)
staticmethod
This routine calculates the core temperature (keV) of a pedestalised profile. The solution comes from integrating and summing the two seprate temperature profiles for the core and pedestal region within their bounds. This has to be multiplied by the torus volume element before integration which leads to an added rho term in each part of the profile. When dividing by the volume of integration to get the average temperature the simplification leads to a factor of 2 having to be multiplied on to each of the integration results. This function for the average temperature can then be re-arranged to calculate the central plasma temeprature T_0 / tcore. References: Jean, J. (2011). HELIOS: A Zero-Dimensional Tool for Next Step and Reactor Studies. Fusion Science and Technology, 59(2), 308-349. https://doi.org/10.13182/FST11-A11650
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
radius_plasma_pedestal_temp_norm
|
float
|
Normalised minor radius pedestal position. |
required |
temp_plasma_pedestal_kev
|
float
|
Pedestal temperature (keV). |
required |
temp_plasma_separatrix_kev
|
float
|
Separatrix temperature (keV). |
required |
tav
|
float
|
Volume average temperature (keV). |
required |
alphat
|
float
|
Temperature peaking parameter. |
required |
tbeta
|
float
|
Second temperature exponent. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Core temperature. |
Source code in process/models/physics/profiles.py
309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 | |
set_physics_variables()
Calculates and sets physics variables required for the temperature profile.
Source code in process/models/physics/profiles.py
375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 | |