-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathb2d.template
More file actions
117 lines (78 loc) · 2.41 KB
/
b2d.template
File metadata and controls
117 lines (78 loc) · 2.41 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
106
107
108
109
110
111
112
113
114
115
116
117
# settings file for BOUT++
#
# Blob simulation in a 2D slab
#
# This case has blob size
#
# delta = 0.3*256 ~ 10 * delta_*
# settings used by the core code
nout = 100 # number of time-steps
timestep = 100.0 # time between outputs [1/wci]
MXG = 2 # Number of X guard cells
MYG = 0 # No y derivatives, so no guard cells needed in y
[mesh]
nx = 260 # Note: 4 guard cells
ny = 1
nz = 256
dx = 1 # Grid spacing [rho_s]
dz = 1
##################################################
# derivative methods
[mesh:ddx]
first = C2
second = C2
upwind = W3
[mesh:ddy]
first = C2
second = C2
upwind = W3
[mesh:ddz]
first = FFT
second = FFT
upwind = W3
###################################################
# Time-integration solver
[solver]
atol = 1e-10 # absolute tolerance
rtol = 1e-05 # relative tolerance
mxstep = 5000 # Maximum internal steps per output
###################################################
# Electrostatic potential solver
# These options are used if boussinesq = false
[phiSolver]
type = petsc # Needed if Boussinesq = false
pctype = user # Preconditioning type
fourth_order = true # 4th order or 2nd order
# 0 = Zero value
# 10 = Zero gradient AC inner & outer
# 15 = Zero gradient AC and DC
# 768 = Zero laplace inner & outer
[phiSolver:precon] # Preconditioner (if pctype=user)
filter = 0.0 # Must not filter solution
flags = 49152 # set_rhs i.e. identity matrix in boundaries
###################################################
# Electrostatic potential solver (Boussinesq)
[phiBoussinesq]
# By default type is tri (serial) or spt (parallel)
##################################################
# general settings for the model
[model]
Te0 = $Te0 # Electron Temperature (eV)
n0 = $n0 # Background plasma density (m^-3)
compressible = false # Compressibility?
boussinesq = true # Boussinesq approximation (no perturbed n in vorticity)
D_vort = $D_vort # Viscosity
D_n = $D_n # Diffusion
R_c = 1.5 # Radius of curvature (m)
# settings for individual variables
# The section "All" defines default settings for all variables
# These can be overridden for individual variables in
# a section of that name.
[all]
scale = 0.0 # default size of initial perturbations
bndry_all = neumann # Zero-gradient on all boundaries
[n] # Density
scale = 1.0 # size of perturbation
height = $height
width = $width
function = 1 + height * exp(-((x-0.25)/width)^2 - ((z/(2*pi) - 0.5)/width)^2)