-
Notifications
You must be signed in to change notification settings - Fork 0
/
runspec.cfg
134 lines (94 loc) · 7.45 KB
/
runspec.cfg
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
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
[grid]
nt = integer(default=100) # number of timesteps
nx = integer(default=128) # number of spatial grid points
nv = integer(default=256) # number of velocity grid points
ht = float(default=0.1) # length of timestep
L = float(default=0.0) # spatial domain
vmin = float(default=None) # velocity domain
vmax = float(default=5.0) # velocity domain
[solver]
method = option('direct', 'iterative', 'matrixfree', 'explicit', default='iterative')
# use direct LU solver, matrix-based iterative GMRES solver,
# matrix-free iterative GMRES solver, or explicit solver
type = option('linear', 'nonlinear', 'newton', default='nonlinear')
# use linear or nonlinear solver
mode = option('full', 'split', default='split') # solve the full system at once or iterate between
# Vlasov and Poisson equation
timestepping = option('mp', 'rk2', 'rk4', default='mp')
# timetepping method to use in implicit solvers
# mp: midpoint
# rk2: symplectic Runge-Kutta of 2nd order (equivalent to midpoint)
# rk4: symplectic Runge-Kutta of 4th order
poisson_bracket = option('ArakawaJ1', 'ArakawaJ2', 'ArakawaJ4', 'Simpson', default='ArakawaJ4')
# numerical scheme to use in Vlasov solvers
# should also be used to select scheme in explicit solvers
laplace_operator = option('CFD2', 'CFD4', 'Simpson', default='CFD4')
# selects scheme for Poisson equation
averaging_operator = option('midpoint', 'Simpson', 'ArakawaJ1', 'ArakawaJ2', 'ArakawaJ4', default=None)
# averaging in time derivative and charge density
dissipation_type = option('collisions', 'double_bracket', default=None)
# dissipation
collision_operator = option('collT', 'collE', default=None)
# collision operator
bracket_operator = option('ffh', 'fhh', default=None)
# double bracket operator
preconditioner_type = option('lu', 'tensor', default=None)
# preconditioner scheme to use in iterative solvers
preconditioner_scheme = option('tensor_kinetic_scipy', 'tensor_kinetic', 'tensor_potential_scipy', 'tensor_potential', 'tensor_diagonal', default=None)
# preconditioner scheme to use in iterative solvers
initial_guess = option('rk4_16', 'rk4_18', 'gear2', 'gear3', 'gear4', 'leapfrog', 'symplectic2', 'symplectic4', default=None)
# compute initial guess via RK4, Gear or symplectic method
# also used to select explicit solver
lu_package = option('mumps', 'pastix', 'superlu_dist', default='mumps')
# direct solver package for LU decomposition
initial_iter = integer(default=1) # number of iterations for initial guess
petsc_ksp_rtol = float(default=1E-4) # PETSc linear solver relative convergence tolerance
# (relative decrease in the residual norm)
petsc_ksp_atol = float(default=1E-50) # PETSc linear solver absolute convergence tolerance
# (absolute size of the residual norm)
petsc_ksp_max_iter = integer(default=1000) # PETSc linear solver maximum number of iterations
petsc_snes_atol = float(default=1E-10) # PETSC nonlinear solver relative convergence tolerance
petsc_snes_rtol = float(default=1E-14) # PETSC nonlinear solver absolute convergence tolerance
petsc_snes_stol = float(default=1E-16) # PETSC nonlinear solver convergence tolerance in terms
# of the norm of the change in the solution between steps
petsc_snes_max_iter = integer(default=20) # PETSC nonlinear solver maximum number of iterations
coll_freq = float(default=0.0) # collision frequency
coll_diff = float(default=1.0) # weight of diffusion term
coll_drag = float(default=1.0) # weight of drag term
regularisation = float(default=0.0) # regularisation factor
[initial_data]
mass = float(default=1.0) # particle mass, not yet implemented consistently
charge = float(default=1.0) # particle charge
density = float(default=1.0) # constant density
temperature = float(default=1.0) # constant temperature
distribution_file = string(default=None) # load distribution profile from file, not implemented yet
density_file = string(default=None) # load density profile from file, not implemented yet
temperature_file = string(default=None) # load temperature profile from file, not implemented yet
potential_file = string(default=None) # load potential profile from file, not implemented yet
# Here, you can specify Python modules that contain functions are called by
# distribution(grid), density(grid), temperature(grid), potential(grid)
# which return a NumPy array of size (grid.nx, grid.nv) or (grid.nx).
# Just give the module name (without the trailing .py).
distribution_python = string(default=None) # calculate distribution profile
density_python = string(default=None) # calculate density profile
temperature_python = string(default=None) # calculate temperature profile
potential_python = string(default=None) # calculate potential profile
external_python = string(default=None) # external potential profile
#
# The code is proceeding as follows
#
# check if distribution_python is given
# if so use that to compute f
# else
# check if density_python is given, else use constant density
# check if temperature_python is given, else use constant temperature
# compute a Maxwellian distribution function according to the above
# normalise f such that the average density equals one
# compute moments and potential
#
nfourier = integer(default=0) # Fourier filter in velocity direction
[io]
output_dir = string(default=".") # output directory
nsave = integer(default=1) # save every nsave'th timestep
hdf5_input = string(default=None) # restart run from hdf5 file, not implemented yet
hdf5_output = string(default=None) # write data to hdf5 file, not implemented yet