-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup.py
More file actions
105 lines (81 loc) · 3.03 KB
/
Copy pathsetup.py
File metadata and controls
105 lines (81 loc) · 3.03 KB
1
2
3
4
5
6
7
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
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
76
77
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
def set_parameters():
'''
Constructs dictionary of input parameters.
'''
# WARNING: RHO CAN MEAN DIFFERENT THINGS:
# For Miller equilibria: rho = normalised minor radius = a / a_sep
# For numerical equilibria: rho = normalised poloidal flux
params = {
# Read numerical profiles from JSON file
'read_profiles' : False,
'profile_filename' : 'profiles.json',
# Density Profile [m**-3]
'ni_ped' : 5.0e19,
'ni_sep' : 0.0,
'ni_0' : 1.025e20,
'alpha_n' : 1.21,
'beta_n' : 6.48,
# Temperature Profile [keV]
'Ti_ped' : 4.4,
'Ti_sep' : 0.0,
'Ti_0' : 18.0,
'alpha_t' : 0.976,
'beta_t' : 1.76,
# Pedestal rho
'rho_ped' : 0.95,
# Geometry settings - GEQDSK file
'use_geqdsk' : False,
'geqdsk_filename' : 'jetto.eqdsk_out',
'sample_sqrt_psi' : True,
'radial_steps' : 100,
'rho_low' : 0.1,
'step_low' : 1.0e-3,
'step_high' : 1.0e-2,
'npsi_map' : 100,
'nalpha_map' : 100,
'nalpha_downsample' : 100,
# Geometry settings - Miller Parameterisation
'R0' : 3.945,
'delta' : 0.456,
'kappa' : 1.96,
'shift' : 0.383,
'a_sep' : 2.643,
# Sampling grid resolution
'nrho' : 100,
'nalpha' : 100,
# Number of Samples
'nsamples' : 1000000,
# Set RNG Seed
'seed' : 0,
# Reactivity:, True = Bosch-Hale, False = Sadler-Van-Belle
'bosch-hale' : True,
# Interpolation type for CDFs - Cubic seems to throw bounds errors
'cdf_interp_kind' : 'linear',
# Species to sample - sets which energy to use
'species' : 0, # 0 = neutron, 1 = alpha
# Output directory location to store files
'output_dir' : './outputs/',
# Write out json file containing cdf information for use in OpenMP. Will exit after writing.
'write_cdfs' : False,
# Output file name for json file containing CDF information if being written
'cdf_filename' : 'cdfs.json',
# Output pickle file name for list of particles
'pickle_filename' : 'particles.pickle',
# Show test plots while running
'show-plots' : False,
# ----------------------------------------------------------
# Debugging flags
'DEBUG_CDFS' : False,
'DEBUG_JACOBIAN' : False,
'DEBUG_GEOMETRY' : False,
'DEBUG_REACTIVITY' : False,
'DEBUG_PROFILES' : False,
'DEBUG_TOTAL_RATE' : True,
# Constants
'e' : 1.60217663e-19, # Electron charge
'mHe' : 4.001506179129, # Helium nucleus mass in amu
'mn' : 1.00866491606, # Neutron mass in amu
'EHe' : 3.5, # Alpha particle energy in MeV
'En' : 14.1, # Neutron energy in MeV
}
return params