The Open FUSION Toolkit 1.0.0-beta5
Modeling tools for plasma and fusion research and engineering
Loading...
Searching...
No Matches
Data Types | Functions/Subroutines | Variables
oft_gs_util Module Reference

Detailed Description

Grad-Shafranov utility subroutines for TokaMaker.

Authors
Chris Hansen
Date
September 2017

Data Types

type  sauter_interp
 Need docs. More...
 

Functions/Subroutines

subroutine cond_fit (self, tmpin)
 Needs docs.
 
subroutine cond_fit_error (m, n, cofs, err, iflag)
 Needs docs.
 
subroutine fit_ff (self, tmpin)
 Needs Docs.
 
subroutine fit_ff_error (m, n, cofs, err, iflag)
 Needs docs.
 
subroutine gs_analyze (self)
 Needs Docs.
 
subroutine gs_calc_vloop (self, vloop)
 Compute plasma loop voltage.
 
subroutine gs_comp_globals (self, itor, centroid, vol, pvol, dflux, tflux, bp_vol)
 Compute toroidal current for Grad-Shafranov equilibrium.
 
subroutine gs_load (self, filename)
 Needs Docs.
 
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 (self, filename, mpsi_sample)
 Needs Docs.
 
subroutine gs_save_decon (gseq, npsi, ntheta, error_str)
 Needs docs.
 
subroutine gs_save_eqdsk (gseq, filename, nr, nz, rbounds, zbounds, run_info, limiter_file, psi_pad, rcentr_in, trunc_eq, error_str)
 Save equilibrium to General Atomics gEQDSK file.
 
subroutine sauter_apply (self, cell, f, gop, val)
 Needs Docs.
 
subroutine sauter_fc (gseq, nr, psi_q, fc, r_avgs, modb_avgs)
 Needs docs.
 

Variables

class(flux_func), pointer ff_fit => NULL()
 
class(gs_eq), pointer gs_fit => NULL()
 
real(8), dimension(:,:), pointer tmpprof => NULL()
 

Function/Subroutine Documentation

◆ cond_fit()

subroutine cond_fit ( class(gs_eq), intent(inout), target  self,
real(8), dimension(:,:), intent(in), target  tmpin 
)

Needs docs.

Parameters
[in,out]selfNeeds docs
[in,out]tmpinNeeds docs

◆ cond_fit_error()

subroutine cond_fit_error ( integer(4), intent(in)  m,
integer(4), intent(in)  n,
real(8), dimension(n), intent(in)  cofs,
real(8), dimension(m), intent(out)  err,
integer(4), intent(inout)  iflag 
)

Needs docs.

Parameters
[in,out]mNeeds docs
[in,out]nNeeds docs
[in,out]cofsNeeds docs [n]
[in,out]errNeeds docs [m]
[in,out]iflagNeeds docs

◆ fit_ff()

subroutine fit_ff ( class(flux_func), intent(inout), target  self,
real(8), dimension(:,:), intent(in), target  tmpin 
)

Needs Docs.

Parameters
[in,out]selfNeeds docs
[in,out]tmpinNeeds docs

◆ fit_ff_error()

subroutine fit_ff_error ( integer(4), intent(in)  m,
integer(4), intent(in)  n,
real(8), dimension(n), intent(in)  cofs,
real(8), dimension(m), intent(out)  err,
integer(4), intent(inout)  iflag 
)

Needs docs.

Parameters
[in,out]mNeeds docs
[in,out]nNeeds docs
[in,out]cofsNeeds docs [n]
[in,out]errNeeds docs [m]
[in,out]iflagNeeds docs

◆ gs_analyze()

subroutine gs_analyze ( class(gs_eq), intent(inout)  self)

Needs Docs.

◆ gs_calc_vloop()

subroutine gs_calc_vloop ( class(gs_eq), intent(inout)  self,
real(8), intent(out)  vloop 
)

Compute plasma loop voltage.

Parameters
[in,out]selfG-S object
[out]vlooploop voltage

◆ gs_comp_globals()

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 toroidal current for Grad-Shafranov equilibrium.

Parameters
[in,out]selfG-S object
[out]itorToroidal current
[out]centroidCurrent centroid (optional) [2]

◆ gs_load()

subroutine gs_load ( class(gs_eq), intent(inout), target  self,
character(len=*), intent(in)  filename 
)

Needs Docs.

Parameters
[in,out]selfG-S object
[in]filenameFilename for restart file

◆ gs_profile_load()

subroutine gs_profile_load ( character(len=*), intent(in)  filename,
class(flux_func), intent(out), pointer  f 
)

Create flux function object from definition file.

Parameters
[in]filenameFile storing function definition
[out]fFlux function object

◆ gs_profile_save()

subroutine gs_profile_save ( character(len=*), intent(in)  filename,
class(flux_func), intent(in), pointer  f 
)

Save flux function object to definition file.

Parameters
[in]filenameFile to store function definition
[in]fFlux function object

◆ gs_save()

subroutine gs_save ( class(gs_eq), intent(inout), target  self,
character(len=*), intent(in)  filename,
integer(4), intent(in), optional  mpsi_sample 
)

Needs Docs.

Parameters
[in,out]selfG-S object
[in]filenameFilename for restart file
[in]mpsi_sampleNumber of flux (radial) sampling points (optional)

◆ gs_save_decon()

subroutine gs_save_decon ( class(gs_eq), intent(inout)  gseq,
integer(4), intent(in)  npsi,
integer(4), intent(in)  ntheta,
character(len=80), intent(out), optional  error_str 
)

Needs docs.

◆ gs_save_eqdsk()

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,
character(len=80), intent(out), optional  error_str 
)

Save equilibrium to General Atomics gEQDSK file.

Parameters
[in,out]gseqEquilibrium to save
[in]nrNumber of radial points for flux/psi grid
[in]nzNumber of vertical points for flux grid
[in]rboundsRadial extents for flux grid
[in]zboundsRadial extents for flux grid
[in]run_infoRun information string [40]
[in]limiter_filePath to limiter file
[in]psi_padPadding at LCFS in normalized units
[in]rcentr_inValue to use for RCENTR (otherwise geometric center is used)
[in]trunc_eqTruncate equilibrium at psi_pad

◆ sauter_apply()

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 
)

Needs Docs.

◆ sauter_fc()

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 
)

Needs docs.

Variable Documentation

◆ ff_fit

class(flux_func), pointer ff_fit => NULL()

◆ gs_fit

class(gs_eq), pointer gs_fit => NULL()

◆ tmpprof

real(8), dimension(:,:), pointer tmpprof => NULL()