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

Detailed Description

Module for thin-wall modeling on 3D triangular meshes.

Authors
Chris Hansen
Date
May 2017

Data Types

type  floop_sensor
 Structure containing definition of a flux loop sensor. More...
 
type  hole_mesh
 Structure containing definition of "hole" elements for multiply connected surfaces. More...
 
type  jumper_sensor
 Structure containing definition of a current jumper sensor. More...
 
type  tw_coil_set
 Structure containing a coil sets composed of one or more individual filament coils. More...
 
type  tw_gen_coil
 Structure containing filament coil definition. More...
 
type  tw_plasma_boozer
 Class for thin-wall simulation. More...
 
type  tw_sensors
 Structure containing sensor sets. More...
 
type  tw_type
 Class for thin-wall simulation. More...
 

Functions/Subroutines

subroutine tw_build_boozer (self, s, alpha)
 Needs Docs.
 
subroutine tw_compute_ael2dr (tw_obj, save_file)
 Compute element to driver (Icoils) coupling matrix.
 
subroutine tw_compute_bops (self, save_file)
 Needs Docs.
 
subroutine tw_compute_lmat_coils (tw_obj)
 Compute coupling from thin-wall model elements to flux loop sensors.
 
subroutine tw_compute_lmat_mf (row_obj, col_obj, nrhs, a, b)
 Compute mutual inductance matrix between two thin-wall models.
 
subroutine tw_compute_lmatdirect (row_model, lmat, col_model, save_file)
 Compute mutual inductance matrix between two thin-wall models.
 
subroutine tw_compute_mutuals (tw_obj, nsensors, sensors, save_file)
 Compute coupling from thin-wall model elements to flux loop sensors.
 
real(8) function tw_compute_phipot (pt_cell, pt)
 Compute \( \int 1/(r-r') dA' \) for a triangle.
 
subroutine tw_compute_rmat (tw_obj, keep_closures)
 Compute resistivity matrix for thin-wall model.
 
subroutine tw_copy_coil (coil_in, coil_out)
 Create a copy (by reference) of a coil set.
 
subroutine tw_load_coils (group_node, ncoils, coils)
 Read coil sets for "oft_in.xml" file.
 
subroutine tw_load_eta (self)
 Load resistivity and sensor mask from "oft_in.xml" file.
 
subroutine tw_load_mode (filename, self, driver)
 Load forcing mesh and fields for an MHD-style mode.
 
subroutine tw_load_sensors (filename, self, sensors)
 Load sensors from "floops.loc" and build jumpers from nodesets.
 
subroutine tw_recon_curr (self, pot, curr)
 Save solution vector for thin-wall model for plotting in VisIt.
 
subroutine tw_rst_load (u, filename, path)
 Load Thin-wall solution vector from a restart file.
 
subroutine tw_rst_save (self, u, filename, path, append)
 Save Thin-wall solution vector to a restart file.
 
subroutine tw_save_debug (self)
 Save debug plotting information for thin-wall model.
 
subroutine tw_save_hole_debug (self)
 Needs Docs.
 
subroutine tw_save_pfield (self, a, tag)
 Save solution vector for thin-wall model for plotting in VisIt.
 
subroutine tw_setup (self, hole_ns)
 Needs Docs.
 
subroutine tw_setup_hole (bmesh, hmesh)
 Setup hole definition for ordered chain of vertices.
 

Variables

real(r8), parameter coil_min_rad = 1.d-6
 
integer(i4), dimension(3) quad_orders = [18, 10, 6]
 Quadrature order for each tolerance.
 
real(r8), dimension(3) quad_tols = [0.75d0, 0.95d0, 0.995d0]
 Distance tolerances for quadrature order selection.
 
real(r8), parameter target_err = 1.d-8
 
character(len=16), parameter, public tw_idx_path ="ThinCurr_Version"
 HDF5 field name.
 
integer(i4), parameter, public tw_idx_ver =1
 File version for array indexing.
 

Function/Subroutine Documentation

◆ tw_build_boozer()

subroutine tw_build_boozer ( class(tw_plasma_boozer), intent(inout)  self,
real(8), intent(in)  s,
real(8), intent(in)  alpha 
)

Needs Docs.

Parameters
[in,out]selfThin-wall model for structures

◆ tw_compute_ael2dr()

subroutine tw_compute_ael2dr ( type(tw_type), intent(inout)  tw_obj,
character(len=*), intent(in), optional  save_file 
)

Compute element to driver (Icoils) coupling matrix.

Parameters
[in,out]tw_objThin-wall model object

◆ tw_compute_bops()

subroutine tw_compute_bops ( type(tw_type), intent(inout)  self,
character(len=*), intent(in), optional  save_file 
)

Needs Docs.

◆ tw_compute_lmat_coils()

subroutine tw_compute_lmat_coils ( type(tw_type), intent(inout)  tw_obj)

Compute coupling from thin-wall model elements to flux loop sensors.

Note
The asymptotic form of self-inductance for thin circular coils derived by Hurwitz and Landreman [arXiv:2310.09313 (2023)] is used for all inductance calculations. Note that this is not strictly valid for mutual inductances, but is instead used to avoid integration challenges with very-closely-spaced coils.
Parameters
[in,out]tw_objThin-wall model object

◆ tw_compute_lmat_mf()

subroutine tw_compute_lmat_mf ( type(tw_type), intent(in)  row_obj,
type(tw_type), intent(in)  col_obj,
integer(4), intent(in)  nrhs,
real(8), dimension(:,:), intent(in), pointer, contiguous  a,
real(8), dimension(:,:), intent(inout), pointer, contiguous  b 
)

Compute mutual inductance matrix between two thin-wall models.

Parameters
[in]row_objThin-wall model object for rows
[in]col_objThin-wall model object for columns
[in]aMutual inductance matrix
[in,out]bMutual inductance matrix

◆ tw_compute_lmatdirect()

subroutine tw_compute_lmatdirect ( type(tw_type), intent(in), target  row_model,
real(8), dimension(:,:), intent(inout), pointer, contiguous  lmat,
type(tw_type), intent(in), optional, target  col_model,
character(len=*), intent(in), optional  save_file 
)

Compute mutual inductance matrix between two thin-wall models.

Parameters
[in]row_modelThin-wall model object for rows
[in,out]lmatMutual inductance matrix
[in]col_modelThin-wall model object for columns

◆ tw_compute_mutuals()

subroutine tw_compute_mutuals ( type(tw_type), intent(inout)  tw_obj,
integer(4), intent(in)  nsensors,
type(floop_sensor), dimension(:), intent(in), pointer  sensors,
character(len=*), intent(in), optional  save_file 
)

Compute coupling from thin-wall model elements to flux loop sensors.

Parameters
[in,out]tw_objThin-wall model object
[in]nsensorsNumber of flux loops
[in]sensorsList of flux loops

◆ tw_compute_phipot()

real(8) function tw_compute_phipot ( real(8), dimension(3,3), intent(in)  pt_cell,
real(8), dimension(3), intent(in)  pt 
)

Compute \( \int 1/(r-r') dA' \) for a triangle.

Parameters
[in]pt_cellVertices defining triangle
[in]ptObservation point (r)

◆ tw_compute_rmat()

subroutine tw_compute_rmat ( type(tw_type), intent(inout)  tw_obj,
logical, intent(in)  keep_closures 
)

Compute resistivity matrix for thin-wall model.

Parameters
[in,out]tw_objThin-wall model object
[in]keep_closuresKeep diagonal entries (1) for closure elements

◆ tw_copy_coil()

subroutine tw_copy_coil ( type(tw_coil_set), intent(in)  coil_in,
type(tw_coil_set), intent(inout)  coil_out 
)

Create a copy (by reference) of a coil set.

Parameters
[in]coil_inSource coil set
[in,out]coil_outCopy of source

◆ tw_load_coils()

subroutine tw_load_coils ( type(xml_node), intent(in), pointer  group_node,
integer(4), intent(out)  ncoils,
type(tw_coil_set), dimension(:), intent(out), pointer  coils 
)

Read coil sets for "oft_in.xml" file.

Parameters
[in]group_nodeXML node relative to base <thincurr> node
[out]ncoilsNumber of coil sets found
[out]coilsList of coil sets

◆ tw_load_eta()

subroutine tw_load_eta ( type(tw_type), intent(inout)  self)

Load resistivity and sensor mask from "oft_in.xml" file.

Parameters
[in,out]selfThin-wall model object

◆ tw_load_mode()

subroutine tw_load_mode ( character(len=*)  filename,
type(tw_type), intent(inout)  self,
real(8), dimension(:,:), intent(out), pointer  driver 
)

Load forcing mesh and fields for an MHD-style mode.

Parameters
filenameFilename containing mode definition
[in,out]selfThin-wall model of mode
[out]driverSin/Cos pair corresponding to mode

◆ tw_load_sensors()

subroutine tw_load_sensors ( character(len=*), intent(in)  filename,
class(tw_type), intent(inout)  self,
type(tw_sensors), intent(inout)  sensors 
)

Load sensors from "floops.loc" and build jumpers from nodesets.

Parameters
[in]filenameThin-wall model object
[in,out]selfThin-wall model object
[in,out]sensorsSensor container

◆ tw_recon_curr()

subroutine tw_recon_curr ( type(tw_type), intent(in)  self,
real(8), dimension(:), intent(in)  pot,
real(8), dimension(:,:), intent(out)  curr 
)

Save solution vector for thin-wall model for plotting in VisIt.

Parameters
[in]selfThin-wall model object
[in]potSolution values [selfnelems]
[out]currSolution values [3,selfmeshnelems]

◆ tw_rst_load()

subroutine tw_rst_load ( class(oft_vector), intent(inout), target  u,
character(len=*), intent(in)  filename,
character(len=*), intent(in)  path 
)

Load Thin-wall solution vector from a restart file.

Parameters
[in,out]uSolution to load
[in]filenameName of restart file
[in]pathPath to load solution vector in file

◆ tw_rst_save()

subroutine tw_rst_save ( class(tw_type), intent(in)  self,
class(oft_vector), intent(inout), pointer  u,
character(len=*), intent(in)  filename,
character(len=*), intent(in)  path,
logical, intent(in), optional  append 
)

Save Thin-wall solution vector to a restart file.

Parameters
[in]selfThin-wall model object
[in,out]uSolution to save
[in]filenameName of restart file
[in]pathPath to store solution vector in file
[in]appendAppend to file? (optional)

◆ tw_save_debug()

subroutine tw_save_debug ( class(tw_type), intent(inout)  self)

Save debug plotting information for thin-wall model.

Parameters
[in,out]selfThin-wall model object

◆ tw_save_hole_debug()

subroutine tw_save_hole_debug ( type(tw_type), intent(in)  self)

Needs Docs.

◆ tw_save_pfield()

subroutine tw_save_pfield ( type(tw_type), intent(in)  self,
real(8), dimension(:), intent(in)  a,
character(len=*), intent(in)  tag 
)

Save solution vector for thin-wall model for plotting in VisIt.

Parameters
[in]selfThin-wall model object
[in]aSolution values [selfnelems]
[in]tagPath to save vector in HDF5 plot files

◆ tw_setup()

subroutine tw_setup ( class(tw_type), intent(inout)  self,
type(oft_1d_int), dimension(:), intent(in), pointer  hole_ns 
)

Needs Docs.

Parameters
[in,out]selfThin-wall model object
[in]hole_nsHole nodesets

◆ tw_setup_hole()

subroutine tw_setup_hole ( class(oft_bmesh), intent(inout)  bmesh,
type(hole_mesh), intent(inout)  hmesh 
)

Setup hole definition for ordered chain of vertices.

Parameters
[in,out]bmeshSurface mesh containing hole
[in,out]hmeshHole definition

Variable Documentation

◆ coil_min_rad

real(r8), parameter coil_min_rad = 1.d-6

◆ quad_orders

integer(i4), dimension(3) quad_orders = [18, 10, 6]

Quadrature order for each tolerance.

◆ quad_tols

real(r8), dimension(3) quad_tols = [0.75d0, 0.95d0, 0.995d0]

Distance tolerances for quadrature order selection.

◆ target_err

real(r8), parameter target_err = 1.d-8

◆ tw_idx_path

character(len=16), parameter, public tw_idx_path ="ThinCurr_Version"

HDF5 field name.

◆ tw_idx_ver

integer(i4), parameter, public tw_idx_ver =1

File version for array indexing.