Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions resources/default_plotsettings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ xax: "T_i_av" # x-axis variable; T_i_av for average ion temperature,
# T_e_av for average electron temperature,
# T_e_ax for maximum electron temperature
figsize: [8, 6] # figure size in inches
fill_invalid: True # fill invalid values with gray

#----------------------
# Options per output
Expand Down Expand Up @@ -79,6 +80,32 @@ plotoptions:
# min : 0.0 # only used if scale is specified
# max : 1.0 # only used if scale is specified
levels: 10 # number of contour levels
Pbrems:
plot: False # do not plot this output
color: k # line color
linewidth: 2 # line width
label: $P_{brems}$ # label for the line
fontsize: 12 # font size for labels
fmt: '%.2f' # format for the on-contour labels
spacing: lin # lin, log, or manual spacing for the contour levels
manuallevels: [] # only used if manual spacing
scale: minmax # minmax or specified; below not used if manual spacing
# min : 0.0 # only used if scale is specified
# max : 1.0 # only used if scale is specified
levels: 10 # number of contour levels
Pimprad:
plot: False # do not plot this output
color: k # line color
linewidth: 2 # line width
label: $P_{imprad}$ # label for the line
fontsize: 12 # font size for labels
fmt: '%.2f' # format for the on-contour labels
spacing: lin # lin, log, or manual spacing for the contour levels
manuallevels: [] # only used if manual spacing
scale: minmax # minmax or specified; below not used if manual spacing
# min : 0.0 # only used if scale is specified
# max : 1.0 # only used if scale is specified
levels: 10 # number of contour levels
Prad:
plot: True # do not plot this output
color: purple # line color
Expand Down
21 changes: 10 additions & 11 deletions resources/examples/MANTA/POPCON_input_example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ B_0: 11.0 # on-axis magnetic field in Tesla
#----------------------

#----------------------
M_i: 2.5 # average ion mass in amu
tipeak_over_tepeak: 1.1 # ratio of ion to electron temperature at peak
tipeak_over_tepeak: 0.9894 # ratio of ion to electron temperature at peak
fuel: 2 # 1 for D-D, 2 for D-T, 3 for D-He3
#----------------------

Expand All @@ -40,14 +39,14 @@ fuel: 2 # 1 for D-D, 2 for D-T, 3 for D-He3
# 5 W
# Impfracs and Z_eff can be calculated from each other. If you specify
# Z_eff, the impurity fraction for the specified impurity will be overwritten.
impurityfractions: [0.02, 0., 0., 0.00075, 0., 0.]
Zeff_target: 2.1 # average effective charge of plasma
impurityfractions: [0.025, 0., 0., 0.00075, 0., 0.]
Zeff_target: 2.26 # average effective charge of plasma
impurity: 3 # 0 for He, 1 for Ne, 2 for Ar, 3 for Kr, 4 for Xe, 5 for W
#----------------------

#----------------------
scalinglaw: "H_NT23" # Name of tau_E scaling law as defined in scaling_laws.yaml
H_fac: 1.0 # Factor by which to multiply the scaling law
scalinglaw: "H98y2" # Name of tau_E scaling law as defined in scaling_laws.yaml
H_fac: 0.79 # Factor by which to multiply the scaling law
nr: 100 # number of radial grid points
#----------------------

Expand All @@ -57,8 +56,8 @@ nr: 100 # number of radial grid points
# Otherwise, the normalized profiles will be parabolic of the form
# f(r) = (1 - offset)*(1 - r**alpha1)**alpha2 + offset
# j profile comes from the equilibrium, the others come from the profs file.
gfilename: "./resources/examples/MANTA/gMANTA"
profsfilename: "./resources/examples/MANTA/profsMANTA.csv"
gfilename: "gMANTA"
profsfilename: "profsMANTA.csv"

# j_alpha1: 2.
# j_alpha2: 3.
Expand Down Expand Up @@ -87,10 +86,10 @@ profsfilename: "./resources/examples/MANTA/profsMANTA.csv"
#----------------------
Nn: 20 # resolution of densities
NTi: 20 # resolution of ion temperatures
nmax_frac: 1.2 # maximum density as a fraction of the Greenwald density
nmin_frac: 0.3 # minimum density as a fraction of the Greenwald density
nmax_frac: 1.0 # maximum electron density as a fraction of the Greenwald density
nmin_frac: 0.3 # minimum electron density as a fraction of the Greenwald density
Tmax_keV: 11. # maximum volume-averaged temperature in keV
Tmin_keV: 3 # minimum volume-averaged temperature in keV
Tmin_keV: 6. # minimum volume-averaged temperature in keV
maxit: 100000 # maximum number of iterations
accel: 1.5 # acceleration factor
err: 1e-6 # error tolerance
Expand Down
260 changes: 260 additions & 0 deletions resources/examples/MANTA/manta_ex.ipynb

Large diffs are not rendered by default.

35 changes: 31 additions & 4 deletions resources/examples/MANTA/plotsettings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
# OpenPOPCON Plotting Settings
#-----------------------------------------------------------------------

yax: "nG" # y-axis variable; nG for greenwald fraction, n20 for density
yax: "n20_av" # y-axis variable; nG for greenwald fraction, n20 for density
xax: "T_i_av" # x-axis variable; T_i_av for average ion temperature,
# T_i_ax for maximum ion temperature,
# T_e_av for average electron temperature,
# T_e_ax for maximum electron temperature
figsize: [8, 6] # figure size in inches
fill_invalid: True # fill invalid values with gray

#----------------------
# Options per output
Expand All @@ -22,7 +23,7 @@ plotoptions:
fontsize: 12 # font size for labels
fmt: '%.2d' # format for the on-contour labels
spacing: manual # lin, log, or manual spacing for the contour levels
manuallevels: [0.1,1,10,50,100,500,2000] # only used if manual spacing
manuallevels: [0.1,1,10,25,50,100,500,2000] # only used if manual spacing
scale: minmax # minmax or specified; below not used if manual spacing
# min : 0.0 # only used if scale is specified
# max : 1.0 # only used if scale is specified
Expand Down Expand Up @@ -79,6 +80,32 @@ plotoptions:
# min : 0.0 # only used if scale is specified
# max : 1.0 # only used if scale is specified
levels: 10 # number of contour levels
Pbrems:
plot: False # do not plot this output
color: k # line color
linewidth: 2 # line width
label: $P_{brems}$ # label for the line
fontsize: 12 # font size for labels
fmt: '%.2f' # format for the on-contour labels
spacing: lin # lin, log, or manual spacing for the contour levels
manuallevels: [] # only used if manual spacing
scale: minmax # minmax or specified; below not used if manual spacing
# min : 0.0 # only used if scale is specified
# max : 1.0 # only used if scale is specified
levels: 10 # number of contour levels
Pimprad:
plot: False # do not plot this output
color: k # line color
linewidth: 2 # line width
label: $P_{imprad}$ # label for the line
fontsize: 12 # font size for labels
fmt: '%.2f' # format for the on-contour labels
spacing: lin # lin, log, or manual spacing for the contour levels
manuallevels: [] # only used if manual spacing
scale: minmax # minmax or specified; below not used if manual spacing
# min : 0.0 # only used if scale is specified
# max : 1.0 # only used if scale is specified
levels: 10 # number of contour levels
Prad:
plot: True # do not plot this output
color: purple # line color
Expand Down Expand Up @@ -184,7 +211,7 @@ plotoptions:
max : 2 # only used if scale is specified
levels: 4 # number of contour levels
H89:
plot: False # do not plot this output
plot: True # do not plot this output
color: blue # line color
linewidth: 2 # line width
label: $H_{89}$ # label for the line
Expand All @@ -197,7 +224,7 @@ plotoptions:
# max : 1.0 # only used if scale is specified
levels: 10 # number of contour levels
H98:
plot: True # do not plot this output
plot: False # do not plot this output
color: blue # line color
linewidth: 2 # line width
label: $H_{98y2}$ # label for the line
Expand Down
97 changes: 97 additions & 0 deletions resources/examples/NSF/NSF_POPCON.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# OpenPOPCON input file
#-----------------------------------------------------------------------
# Machine Paramters
#-----------------------------------------------------------------------

R: 0.8 # major radius in meters
a: 0.266664 # minor radius in meters
kappa: 1.7 # elongation
delta: -0.5 # triangularity

#----------------------
# I_P and q* can be calculated from each other. Pick one to specify:
I_P: 1. # plasma current in MA
# or
# q_star: 2.5
#----------------------

#----------------------
# B_0 and B_coil can be calculated from each other. Pick one to specify:
B_0: 3 # on-axis magnetic field in Tesla
# or
# B_coil: 24.0 # magnetic field at the coil in Tesla
# wall_thickness: 1.5 # wall thickness between magnet and separatrix in meters
#----------------------

#----------------------
tipeak_over_tepeak: 1.0 # ratio of ion to electron temperature at peak
fuel: 1 # 1 for D-D, 2 for D-T, 3 for D-He3
#----------------------

#----------------------
# Impurity Fractions
# In order, the fractions of:
# 0 He ash
# 1 Ne
# 2 Ar
# 3 Kr
# 4 Xe
# 5 W
# Impfracs and Z_eff can be calculated from each other. If you specify
# Z_eff, the impurity fraction for the specified impurity will be overwritten.
impurityfractions: [0, 0., 0., 0, 0., 0.00000001]
# Z_eff: 2.1 # average effective charge of plasma
# impurity: 0 # 0 for He, 1 for Ne, 2 for Ar, 3 for Kr, 4 for Xe, 5 for W
#----------------------

#----------------------
scalinglaw: "H_NT23" # Name of tau_E scaling law as defined in scaling_laws.yaml
H_fac: 1.0 # Factor by which to multiply the scaling law
nr: 200 # number of radial grid points
#----------------------

#----------------------
# Profiles
# If you specify a filename, the profiles will be read from that file and normalized.
# Otherwise, the normalized profiles will be parabolic of the form
# f(r) = (1 - offset)*(1 - r**alpha1)**alpha2 + offset
# j profile comes from the equilibrium, the others come from the profs file.
gfilename: "./gNSF"
profsfilename: "./pNSF.csv"

# j_alpha1: 2.
# j_alpha2: 3.
# j_offset: 0.

# ne_alpha1: 2.
# ne_alpha2: 1.1
# ne_offset: 0.25

# ni_alpha1: 2.
# ni_alpha2: 1.1
# ni_offset: 0.25

# Ti_alpha1: 2.
# Ti_alpha2: 1.5
# Ti_offset: 0.005

# Te_alpha1: 2.
# Te_alpha2: 1.5
# Te_offset: 0.005
#----------------------


#----------------------
# Algorithm settings
#----------------------
Nn: 20 # resolution of densities
NTi: 20 # resolution of ion temperatures
nmax_frac: 1 # maximum density as a fraction of the Greenwald density
nmin_frac: 0.1 # minimum density as a fraction of the Greenwald density
Tmax_keV: 2. # maximum volume-averaged temperature in keV
Tmin_keV: 0.3 # minimum volume-averaged temperature in keV
maxit: 2000 # maximum number of iterations
accel: 1. # acceleration factor
err: 1e-6 # error tolerance
verbosity: 1 # 0 for no output, 1 for minimal output, 2 for verbose output
parallel: False
283 changes: 283 additions & 0 deletions resources/examples/NSF/NSF_run.ipynb

Large diffs are not rendered by default.

Loading