The Open FUSION Toolkit 1.0.0-8905cc5
Modeling tools for plasma and fusion research and engineering
|
General utility and supporting functions for TokaMaker.
Functions | |
compute_forces_components (tMaker_obj, psi, cell_centered=False) | |
Compute terms needed for evaluating forces in passively conducting regions. | |
create_isoflux (npts, r0, z0, a, kappa, delta, kappaL=None, deltaL=None) | |
Create isoflux points using simple analytic form. | |
create_power_flux_fun (npts, alpha, gamma) | |
Build power law flux function of the form \( (1-\hat{\psi}^{\alpha})^{\gamma} \). | |
create_spline_flux_fun (npts, x, y, axis_bc=[1, 0.0], edge_bc=[1, 0.0], normalize=True) | |
Build cubic spline flux function. | |
eval_green (x, xc) | |
Evaluate Green's function for a toroidal filament. | |
read_eqdsk (filename) | |
Read gEQDSK file. | |
read_ifile (filename) | |
Read i-file inverse equilibrium file. | |
read_kfile (path, machine_dict, e_coil_names=None, f_coil_names=None) | |
read_mhdin (path, e_coil_names=None, f_coil_names=None) | |
compute_forces_components | ( | tMaker_obj, | |
psi, | |||
cell_centered = False |
|||
) |
Compute terms needed for evaluating forces in passively conducting regions.
tMaker_obj | TokaMaker equilibrium object |
psi | \( \psi \) corresponding to desired currents |
cell_centered | Evaluate at cell centers instead of node points? |
create_isoflux | ( | npts, | |
r0, | |||
z0, | |||
a, | |||
kappa, | |||
delta, | |||
kappaL = None , |
|||
deltaL = None |
|||
) |
Create isoflux points using simple analytic form.
npts | Number of points to sample (evenly spaced in \(\theta\)) |
r0 | Major radial position for magnetic axis |
z0 | Vertical position for magnetic axis |
a | Minor radius |
kappa | Elongation (upper only if kappaL is set) |
delta | Triangularity (upper only if deltaL is set) |
kappaL | Lower elongation (default: kappa) |
deltaL | Lower triangularity (default: delta) |
create_power_flux_fun | ( | npts, | |
alpha, | |||
gamma | |||
) |
Build power law flux function of the form \( (1-\hat{\psi}^{\alpha})^{\gamma} \).
npts | Number of points for definition |
alpha | Inner exponent |
gamma | Outer exponent |
create_spline_flux_fun | ( | npts, | |
x, | |||
y, | |||
axis_bc = [1,0.0] , |
|||
edge_bc = [1,0.0] , |
|||
normalize = True |
|||
) |
Build cubic spline flux function.
npts | Number of points for definition |
x | Location of spline "knots" in normalized flux |
y | Value of flux function at spline "knots" |
axis_bc | SciPy BC specification on axis ( \( \hat{\psi} = 0 \)) |
edge_bc | SciPy BC specification on LCFS ( \( \hat{\psi} = 1 \)) |
eval_green | ( | x, | |
xc | |||
) |
Evaluate Green's function for a toroidal filament.
x | Observation point [2] |
xc | Coil location [:,2] |
read_eqdsk | ( | filename | ) |
Read gEQDSK file.
filename | Path to gEQDSK file |
read_ifile | ( | filename | ) |
Read i-file inverse equilibrium file.
filename | Path to file |
read_kfile | ( | path, | |
machine_dict, | |||
e_coil_names = None , |
|||
f_coil_names = None |
|||
) |
Read k-file. @param path Path to file @param e_coil_names Names of E coils (hardcoded, generates indexed names if None) @param f_coil_names Names of F coils (hardcoded, generates indexed names if None) @param machine_dict Result from read_mhdin (contents of mhdin.dat file) @result probes_dict Dictionary containing probe values and weights (0 if not selected). @result loops_dict Dictionary containing loop values and weights (0 if not selected). @result e_coil_dict Dictionary containing E copil values and weights (0 if not selected). @result f_coil_dict Dictionary containing F coil values and weights (0 if not selected). @result raw Dictionary containing all other data from k-file.
read_mhdin | ( | path, | |
e_coil_names = None , |
|||
f_coil_names = None |
|||
) |
Read mhdin.dat file. @param path Path to file @param e_coil_names Names of E coils (hardcoded, generates indexed names if None) @param f_coil_names Names of F coils (hardcoded, generates indexed names if None) @result machine_dict Dictionary containing coil coordinates and turns, loop names, and probe names and angles. @result raw Dictionary containing all other data from mhdin.dat