The Open FUSION Toolkit 1.0.0-beta5
Modeling tools for plasma and fusion research and engineering
Loading...
Searching...
No Matches
Functions
OpenFUSIONToolkit.TokaMaker.util Namespace Reference

Detailed Description

Python interface for TokaMaker Grad-Shafranov functionality.

Authors
Chris Hansen
Date
May 2023

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.
 

Function Documentation

◆ compute_forces_components()

compute_forces_components (   tMaker_obj,
  psi,
  cell_centered = False 
)

Compute terms needed for evaluating forces in passively conducting regions.

Parameters
tMaker_objTokaMaker equilibrium object
psi\( \psi \) corresponding to desired currents
cell_centeredEvaluate at cell centers instead of node points?
Returns
J_cond, B_cond, mask, R

◆ create_isoflux()

create_isoflux (   npts,
  r0,
  z0,
  a,
  kappa,
  delta,
  kappaL = None,
  deltaL = None 
)

Create isoflux points using simple analytic form.

Parameters
nptsNumber of points to sample (evenly spaced in \(\theta\))
r0Major radial position for magnetic axis
z0Vertical position for magnetic axis
aMinor radius
kappaElongation (upper only if kappaL is set)
deltaTriangularity (upper only if deltaL is set)
kappaLLower elongation (default: kappa)
deltaLLower triangularity (default: delta)
Returns
Point list [npts,2]

◆ create_power_flux_fun()

create_power_flux_fun (   npts,
  alpha,
  gamma 
)

Build power law flux function of the form \( (1-\hat{\psi}^{\alpha})^{\gamma} \).

Parameters
nptsNumber of points for definition
alphaInner exponent
gammaOuter exponent
Returns
Flux function definition dictionary

◆ create_spline_flux_fun()

create_spline_flux_fun (   npts,
  x,
  y,
  axis_bc = [1,0.0],
  edge_bc = [1,0.0],
  normalize = True 
)

Build cubic spline flux function.

Parameters
nptsNumber of points for definition
xLocation of spline "knots" in normalized flux
yValue of flux function at spline "knots"
axis_bcSciPy BC specification on axis ( \( \hat{\psi} = 0 \))
edge_bcSciPy BC specification on LCFS ( \( \hat{\psi} = 1 \))
Returns
Flux function definition dictionary

◆ eval_green()

eval_green (   x,
  xc 
)

Evaluate Green's function for a toroidal filament.

Parameters
xObservation point [2]
xcCoil location [:,2]
Returns
\(\psi(x)\) due to a coil with unit current [A] at xc

◆ read_eqdsk()

read_eqdsk (   filename)

Read gEQDSK file.

Parameters
filenamePath to gEQDSK file
Returns
Dictionary containing gEQDSK information