The Open FUSION Toolkit 1.0.0-8905cc5
Modeling tools for plasma and fusion research and engineering
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Attributes | List of all members
reconstruction Class Reference

Detailed Description

TokaMaker equilibrium reconstruction class.

Public Member Functions

 __del__ (self)
 Destroy reconstruction object.
 
 __init__ (self, tMaker_obj, in_filename='fit.in', out_filename='fit.out')
 Create equilibrium reconstruction object.
 
 add_flux_loop (self, loc, val, err)
 Add full poloidal flux loop constraint.
 
 add_Mirnov (self, loc, norm, val, err)
 Add Mirnov sensor constraint.
 
 add_pressure (self, loc, val, err)
 Add plasma pressure constraint.
 
 add_saddle (self, p1, p2, width, val, err)
 Add saddle loop constraint.
 
 read_fit_in (self)
 Read constraints from existing input file.
 
 reconstruct (self, vacuum=False, linearized_fit=False, maxits=100, eps=1.E-3, ftol=1.E-3, xtol=1.E-3, gtol=1.E-3)
 Reconstruct G-S equation with specified fitting constraints, profiles, etc.
 
 reset_constraints (self)
 Remove all current constraints.
 
 set_DFlux (self, DFlux, err)
 Set diamagnetic flux constraint.
 
 set_Ip (self, Ip, err)
 Set plasma current constraint.
 
 write_fit_in (self)
 Create reconstruction input file for specified constraints.
 

Public Attributes

 con_file
 Name of constraint file (input for reconstruction)
 
 out_file
 Name of reconstruction output file.
 
 settings
 Reconstruction specific settings object.
 

Protected Attributes

 _Dflux_con
 Diamagnetic flux constraint.
 
 _flux_loops
 Flux loop constraints.
 
 _Ip_con
 Plasma current constraint.
 
 _mirnovs
 Mirnov sensor constraints.
 
 _pressure_cons
 Plasma pressure constraints.
 
 _saddles
 Saddle loop constraints.
 
 _tMaker_obj
 Grad-Shafranov object for reconstruction.
 

Constructor & Destructor Documentation

◆ __init__()

__init__ (   self,
  tMaker_obj,
  in_filename = 'fit.in',
  out_filename = 'fit.out' 
)

Create equilibrium reconstruction object.

Parameters
tMaker_objTokaMaker object used for computing G-S equilibria
in_filenameFilename to use for reconstruction input
out_filenameFilename to use for reconstruction outputs

◆ __del__()

__del__ (   self)

Destroy reconstruction object.

Member Function Documentation

◆ add_flux_loop()

add_flux_loop (   self,
  loc,
  val,
  err 
)

Add full poloidal flux loop constraint.

Parameters
locLocation of flux loop in R-Z plane [2]
valValue of flux loop constraint
errError in constraint

◆ add_Mirnov()

add_Mirnov (   self,
  loc,
  norm,
  val,
  err 
)

Add Mirnov sensor constraint.

Parameters
locLocation of Mirnov in R-Z plane [2]
normUnit normal in R-Z plane [2]
valValue of Mirnov constraint
errError in constraint

◆ add_pressure()

add_pressure (   self,
  loc,
  val,
  err 
)

Add plasma pressure constraint.

Parameters
locLocation of measurement in R-Z plane [2]
valValue of pressure constraint
errError in constraint

◆ add_saddle()

add_saddle (   self,
  p1,
  p2,
  width,
  val,
  err 
)

Add saddle loop constraint.

Parameters
p1Location of first toroidal saddle leg in R-Z plane [2]
p2Location of second toroidal saddle leg in R-Z plane [2]
widthToroidal extent in radians
valValue of saddle loop constraint
errError in constraint

◆ read_fit_in()

read_fit_in (   self)

Read constraints from existing input file.

◆ reconstruct()

reconstruct (   self,
  vacuum = False,
  linearized_fit = False,
  maxits = 100,
  eps = 1.E-3,
  ftol = 1.E-3,
  xtol = 1.E-3,
  gtol = 1.E-3 
)

Reconstruct G-S equation with specified fitting constraints, profiles, etc.

Parameters
vacuumPerform vacuum reconstruction
linearized_fitUse linearized solve for suitable terms
maxitsMaximum number of iterations
epsEpsilong factor for finite difference derivative calculations
ftolStopping condition: termination occurs when both the actual and predicted relative reductions in the sum of squares are at most ftol
xtolStopping condition: termination occurs when the relative error between two consecutive iterates is at most xtol
gtolStopping condition: termination occurs when the cosine of the angle between fvec and any column of the jacobian is at most gtol in absolute value
Returns
Error flag

◆ reset_constraints()

reset_constraints (   self)

Remove all current constraints.

◆ set_DFlux()

set_DFlux (   self,
  DFlux,
  err 
)

Set diamagnetic flux constraint.

Parameters
DFluxValue of diamagnetic flux constraint
errError in constraint

◆ set_Ip()

set_Ip (   self,
  Ip,
  err 
)

Set plasma current constraint.

Parameters
IpValue of plasma current constraint
errError in constraint

◆ write_fit_in()

write_fit_in (   self)

Create reconstruction input file for specified constraints.

Member Data Documentation

◆ _Dflux_con

_Dflux_con
protected

Diamagnetic flux constraint.

◆ _flux_loops

_flux_loops
protected

Flux loop constraints.

◆ _Ip_con

_Ip_con
protected

Plasma current constraint.

◆ _mirnovs

_mirnovs
protected

Mirnov sensor constraints.

◆ _pressure_cons

_pressure_cons
protected

Plasma pressure constraints.

◆ _saddles

_saddles
protected

Saddle loop constraints.

◆ _tMaker_obj

_tMaker_obj
protected

Grad-Shafranov object for reconstruction.

◆ con_file

con_file

Name of constraint file (input for reconstruction)

◆ out_file

out_file

Name of reconstruction output file.

◆ settings

settings

Reconstruction specific settings object.


The documentation for this class was generated from the following file: