The Open FUSION Toolkit 1.0.0-8905cc5
Modeling tools for plasma and fusion research and engineering
|
Grad-Shafranov utility subroutines for TokaMaker.
Data Types | |
type | sauter_interp |
Need docs. More... | |
Functions/Subroutines | |
subroutine | gs_calc_vloop (self, vloop) |
Compute plasma loop voltage. | |
subroutine | gs_comp_globals (self, itor, centroid, vol, pvol, dflux, tflux, bp_vol) |
Compute various global quantities for Grad-Shafranov equilibrium. | |
subroutine | gs_profile_load (filename, f) |
Create flux function object from definition file. | |
subroutine | gs_profile_save (filename, f) |
Save flux function object to definition file. | |
subroutine | gs_save_eqdsk (gseq, filename, nr, nz, rbounds, zbounds, run_info, limiter_file, psi_pad, rcentr_in, trunc_eq, lcfs_press, error_str) |
Save equilibrium to General Atomics gEQDSK file. | |
subroutine | gs_save_ifile (gseq, filename, npsi, ntheta, psi_pad, lcfs_press, pack_lcfs, single_prec, error_str) |
Needs docs. | |
subroutine | sauter_apply (self, cell, f, gop, val) |
Evaluate terms in augmented tracing ODE for computing Sauter factors (see sauter_fc) | |
subroutine | sauter_fc (gseq, nr, psi_q, fc, r_avgs, modb_avgs) |
Compute factors required for Sauter bootstrap formula. | |
Variables | |
class(flux_func), pointer | ff_fit => NULL() |
class(gs_eq), pointer | gs_fit => NULL() |
real(8), dimension(:,:), pointer | tmpprof => NULL() |
subroutine gs_calc_vloop | ( | class(gs_eq), intent(inout) | self, |
real(8), intent(out) | vloop | ||
) |
Compute plasma loop voltage.
[in,out] | self | G-S object |
[out] | vloop | loop voltage |
subroutine gs_comp_globals | ( | class(gs_eq), intent(inout) | self, |
real(8), intent(out) | itor, | ||
real(8), dimension(2), intent(out) | centroid, | ||
real(8), intent(out) | vol, | ||
real(8), intent(out) | pvol, | ||
real(8), intent(out) | dflux, | ||
real(8), intent(out) | tflux, | ||
real(8), intent(out) | bp_vol | ||
) |
Compute various global quantities for Grad-Shafranov equilibrium.
[in,out] | self | G-S object |
[out] | itor | Toroidal current |
[out] | centroid | Current centroid [2] |
[out] | vol | Plasma volume |
[out] | pvol | \( \int P dV \) |
[out] | dflux | Diamagnetic flux |
[out] | tflux | Contained toroidal flux |
[out] | bp_vol | \( \int B_p^2 dV \) |
subroutine gs_profile_load | ( | character(len=*), intent(in) | filename, |
class(flux_func), intent(out), pointer | f | ||
) |
Create flux function object from definition file.
[in] | filename | File storing function definition |
[out] | f | Flux function object |
subroutine gs_profile_save | ( | character(len=*), intent(in) | filename, |
class(flux_func), intent(in), pointer | f | ||
) |
Save flux function object to definition file.
[in] | filename | File to store function definition |
[in] | f | Flux function object |
subroutine gs_save_eqdsk | ( | class(gs_eq), intent(inout) | gseq, |
character(len=oft_path_slen), intent(in) | filename, | ||
integer(4), intent(in) | nr, | ||
integer(4), intent(in) | nz, | ||
real(8), dimension(2), intent(in) | rbounds, | ||
real(8), dimension(2), intent(in) | zbounds, | ||
character(len=40), intent(in) | run_info, | ||
character(len=oft_path_slen), intent(in) | limiter_file, | ||
real(8), intent(in) | psi_pad, | ||
real(8), intent(in), optional | rcentr_in, | ||
logical, intent(in), optional | trunc_eq, | ||
real(8), intent(in), optional | lcfs_press, | ||
character(len=oft_error_slen), intent(out), optional | error_str | ||
) |
Save equilibrium to General Atomics gEQDSK file.
[in,out] | gseq | Equilibrium to save |
[in] | filename | Outpute filename |
[in] | nr | Number of radial points for flux/psi grid |
[in] | nz | Number of vertical points for flux grid |
[in] | rbounds | Radial extents for flux grid |
[in] | zbounds | Radial extents for flux grid |
[in] | run_info | Run information string [40] |
[in] | limiter_file | Path to limiter file |
[in] | psi_pad | Padding at LCFS in normalized units |
[in] | rcentr_in | Value to use for RCENTR (otherwise geometric center is used) |
[in] | trunc_eq | Truncate equilibrium at psi_pad |
[in] | lcfs_press | LCFS pressure |
subroutine gs_save_ifile | ( | class(gs_eq), intent(inout) | gseq, |
character(len=oft_path_slen), intent(in) | filename, | ||
integer(4), intent(in) | npsi, | ||
integer(4), intent(in) | ntheta, | ||
real(8), intent(in) | psi_pad, | ||
real(8), intent(in), optional | lcfs_press, | ||
logical, intent(in), optional | pack_lcfs, | ||
logical, intent(in), optional | single_prec, | ||
character(len=oft_error_slen), intent(out), optional | error_str | ||
) |
Needs docs.
[in,out] | gseq | G-S object |
[in] | filename | Outpute filename |
[in] | npsi | Number of points in flux coordinate |
[in] | ntheta | Number of points in poloidal coordinate |
[in] | psi_pad | Padding at LCFS in normalized units |
[in] | lcfs_press | LCFS pressure |
[in] | pack_lcfs | Use quadratic packing toward LCFS? |
[in] | single_prec | Save file with single precision fields? |
subroutine sauter_apply | ( | class(sauter_interp), intent(inout) | self, |
integer(4), intent(in) | cell, | ||
real(8), dimension(:), intent(in) | f, | ||
real(8), dimension(3,3), intent(in) | gop, | ||
real(8), dimension(:), intent(out) | val | ||
) |
Evaluate terms in augmented tracing ODE for computing Sauter factors (see sauter_fc)
[in,out] | self | Interpolation object |
[in] | cell | Cell for interpolation |
[in] | f | Position in cell in logical coord [3] |
[in] | gop | Logical gradient vectors at f [3,3] |
[out] | val | Reconstructed field at f [8] |
subroutine sauter_fc | ( | class(gs_eq), intent(inout) | gseq, |
integer(4), intent(in) | nr, | ||
real(8), dimension(nr), intent(in) | psi_q, | ||
real(8), dimension(nr), intent(out) | fc, | ||
real(8), dimension(nr,3), intent(out) | r_avgs, | ||
real(8), dimension(nr,2), intent(out) | modb_avgs | ||
) |
Compute factors required for Sauter bootstrap formula.
[in,out] | gseq | G-S object |
[in] | nr | Number of flux sample points |
[in] | psi_q | Location of flux sample points |
[out] | fc | Trapped particle fraction \( f_c \) |
[out] | r_avgs | Flux surface averaged radial coordinates \(<R>\), \(<1/R>\), \(<a>\) |
[out] | modb_avgs | Flux surface averaged field strength \(<|B|>\), \(<|B|^2>\) |
class(flux_func), pointer ff_fit => NULL() |
class(gs_eq), pointer gs_fit => NULL() |
real(8), dimension(:,:), pointer tmpprof => NULL() |