Skip to content
Open
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
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@
.conda/*
__*
.vscode
outputs/*
outputs/*
.ipynb_checkpoints/
**/.ipynb_checkpoints/
.DS_Store
**/.DS_Store
3 changes: 2 additions & 1 deletion environment.yml
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you clean this up now that we don't need t3d?

Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ dependencies:
- scipy
- matplotlib
- numba
- pyyaml
- pyyaml
- netcdf4 # For VMEC file reading
2 changes: 2 additions & 0 deletions resources/examples/MANTA/POPCON_input_example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

name: "MANTA"

device_type: "tokamak"

R: 4.55 # major radius in meters
a: 1.2 # minor radius in meters
kappa: 1.4 # elongation
Expand Down
10,494 changes: 5,326 additions & 5,168 deletions resources/examples/MANTA/manta_ex.ipynb

Large diffs are not rendered by default.

10,593 changes: 10,593 additions & 0 deletions resources/examples/Stellarator/Stellarator_ex.ipynb

Large diffs are not rendered by default.

111 changes: 111 additions & 0 deletions resources/examples/Stellarator/Stellarator_example.yaml
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this file? I think we should remove the .ipynb_checkpoints files from the GitHub. If they are important to running we should find a way to merge with the main example.

Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# OpenPOPCON input file
#-----------------------------------------------------------------------
# Machine Paramters
#-----------------------------------------------------------------------

name: "Stellarator"

device_type: "stellarator"

vmecfile: /path/to/wout_stellarator.nc
# If vmecfile is given, iota_23 will be extracted automatically.

R: 4.55 # major radius in meters
a: 1.2 # minor radius in meters
kappa: 1.4 # elongation
delta: -0.5 # triangularity
Comment on lines +13 to +16
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure that these agree with the geometry in the vmec file



iota_23: 0.7 # iota 2/3 value (only for stellarators)
# should be defined as the value of the rotational transform at 2/3 of the minor radius (normalized radius)


#----------------------
# I_P and q* can be calculated from each other. Pick one to specify:
I_P: 10. # plasma current in MA
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plasma current for a stellarator should be 0

# or
# qstar: 2.5
#----------------------

#----------------------
# B_0 and B_coil can be calculated from each other. Pick one to specify:
B_0: 11.0 # on-axis magnetic field in Tesla
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure this agrees with the vmec file

# or
# B_coil: 24.0 # magnetic field at the coil in Tesla
# wall_thickness: 1.1 # wall thickness between magnet and separatrix in meters
#----------------------

#----------------------
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
#----------------------

#----------------------
# 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.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: "ISS04" # Name of tau_E scaling law as defined in scaling_laws.yaml
H_fac: 0.79 # Factor by which to multiply the scaling law
#----------------------

#----------------------
# 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: "gMANTA"
profsfilename: "profsMANTA.csv"
Comment on lines +70 to +71
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These shouldn't be point to MANTA... this example should call the vmec file.


# Stellarator-optimized profile parameters (uncomment to use)
j_alpha1: 2.0
j_alpha2: 2.5
j_offset: 0.0

ne_alpha1: 2.0
ne_alpha2: 1.8
ne_offset: 0.05

ni_alpha1: 2.0
ni_alpha2: 1.8
ni_offset: 0.05

Ti_alpha1: 2.0
Ti_alpha2: 2.0
Ti_offset: 0.1

Te_alpha1: 2.0
Te_alpha2: 2.0
Te_offset: 0.1
#----------------------


#----------------------
# Algorithm settings
#----------------------
Nn: 50 # resolution of densities
NTi: 50 # resolution of ion temperatures
nr: 200 # number of radial grid points
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: 6. # minimum volume-averaged temperature in keV
resistivity_model: "Jardin" # Jardin, Paz-Soldan or maximum (suggested: Jardin)
maxit: 1000 # maximum number of iterations
accel: 1.5 # acceleration factor
err: 1e-6 # error tolerance
verbosity: 2 # 0 for no output, 1 for minimal output, 2 for verbose output
parallel: True
3,547 changes: 3,547 additions & 0 deletions resources/examples/Stellarator/gMANTA
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gMANTA should not be in the Stellarator example folder

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ping

Large diffs are not rendered by default.

Loading