V3FIT
Data Types | Functions/Subroutines | Variables
vacuum_equilibrium Module Reference

Defines the base class of the type vacuum_class. This module contains all the code necessary to interface V3FIT with a vacuum equilibrium. More...

Data Types

type  vacuum_class
 Base class representing a vacuum_equilibrium. More...
 

Functions/Subroutines

type(vacuum_class) function, pointer vacuum_construct (file_name, iou)
 Construct a vacuum_class object. More...
 
subroutine vacuum_destruct (this)
 Deconstruct a vacuum_class object. More...
 
subroutine vacuum_set_param (this, id, i_index, value)
 Sets the value of a reconstruction equilibrium parameter. More...
 
integer function vacuum_get_param_id (this, param_name)
 Get the id for a reconstruction parameter. More...
 
real(rprec) function vacuum_get_param_value (this, id, i_index)
 Get the value of a reconstruction vacuum parameter. More...
 
character(len=data_name_length) function vacuum_get_param_name (this, id)
 Get the name of a reconstruction vacuum parameter. More...
 
real(rprec) function, dimension(3) vacuum_get_b_vec (this, x_cart, cyl)
 Gets the magnetic field vector at a position. More...
 
real(rprec) function vacuum_get_int_b_dphi (this, r, theta)
 Gets the loop integrated magnetic field at a position. More...
 
real(rprec) function, dimension(:), pointer vacuum_get_ext_currents (this, scale_currents)
 Get external current. More...
 
logical function vacuum_is_1d_array (this, id)
 Checks if a parameter id is a 1d array. More...
 
logical function vacuum_is_recon_param (this, id)
 Checks if a parameter id is a reconstruction parameter. More...
 
subroutine vacuum_write (this, iou)
 Write out the equilibrium to an output file. More...
 
subroutine vacuum_write_input (this, current_step)
 Write the current valid input. More...
 

Variables

integer, parameter vacuum_extcur_id = 15
 1D Array of external currents.
 

Detailed Description

Defines the base class of the type vacuum_class. This module contains all the code necessary to interface V3FIT with a vacuum equilibrium.

Super Class:
equilibrium

Function/Subroutine Documentation

◆ vacuum_construct()

type (vacuum_class) function, pointer vacuum_equilibrium::vacuum_construct ( character (len=*), intent(in)  file_name,
integer, intent(in)  iou 
)

Construct a vacuum_class object.

Allocates memory and initializes a vacuum_class object.

Parameters
[in]file_nameFilename of the vacuum namelist input file.
[in]iouInput/output unit to log messages to.
Returns
A pointer to a constructed vacuum_class object.

Definition at line 85 of file vacuum_equilibrium.f.

◆ vacuum_destruct()

subroutine vacuum_equilibrium::vacuum_destruct ( type (vacuum_class), pointer  this)

Deconstruct a vacuum_class object.

Deallocates memory and uninitializes a vacuum_class object.

Parameters
[in,out]thisA vacuum_class instance.

Definition at line 166 of file vacuum_equilibrium.f.

◆ vacuum_get_b_vec()

real (rprec) function, dimension(3) vacuum_equilibrium::vacuum_get_b_vec ( type (vacuum_class), intent(in)  this,
real (rprec), dimension(3), intent(in)  x_cart,
logical, intent(in)  cyl 
)

Gets the magnetic field vector at a position.

This method overrides equilibrium::equilibrium_get_B_vec.

Parameters
[in]thisA vacuum_class instance.
[in]x_cartCartesian position to get the magnetic field vector at.
[in]cylFlag that specifies if the bfield should be returned in cartesian or cylindical coordinates.
Returns
The magnetic field vector at x_cart.

Definition at line 358 of file vacuum_equilibrium.f.

◆ vacuum_get_ext_currents()

real (rprec) function, dimension(:), pointer vacuum_equilibrium::vacuum_get_ext_currents ( type (vacuum_class), intent(in)  this,
logical, intent(out)  scale_currents 
)

Get external current.

This method overrides equilibrium::equilibrium_get_ext_currents. The array memory containing the external currents is owned by the vacuum_class. Return a pointer to it.

Parameters
[in]thisA vacuum_class instance.
[out]scale_currentsInforms the caller that currents need to be scaled.
Returns
The external currents.

Definition at line 457 of file vacuum_equilibrium.f.

◆ vacuum_get_int_b_dphi()

real (rprec) function vacuum_equilibrium::vacuum_get_int_b_dphi ( type (vacuum_class), intent(in)  this,
real (rprec), intent(in)  r,
real (rprec), intent(in)  theta 
)

Gets the loop integrated magnetic field at a position.

This method overrides equilibrium::equilibrium_get_Int_B_dphi. In this function, r and theta are spherical coordinates. The r is transformed into a cylindical radius at some z position. The magnetic field is integrated about a loop at that r-z position. This computes Int[B*dl]

Parameters
[in]thisA vacuum_class instance.
[in]rRadial position to integrate about.
[in]thetaTheta angle to integrate about.
Returns
The loop integrated magnetic field at x_cart.

Definition at line 404 of file vacuum_equilibrium.f.

◆ vacuum_get_param_id()

integer function vacuum_equilibrium::vacuum_get_param_id ( type (vacuum_class), intent(in)  this,
character (len=*), intent(in)  param_name 
)

Get the id for a reconstruction parameter.

This method overrides equilibrium::equilibrium_get_param_id.

Parameters
[in]thisA vacuum_class instance.
[in]param_nameName of a reconstruction parameter.
Returns
The id for a reconstruction parameter.

Definition at line 237 of file vacuum_equilibrium.f.

◆ vacuum_get_param_name()

character(len=data_name_length) function vacuum_equilibrium::vacuum_get_param_name ( type (vacuum_class), intent(in)  this,
integer, intent(in)  id 
)

Get the name of a reconstruction vacuum parameter.

This method overrides equilibrium::equilibrium_get_param_name.

Parameters
[in]thisA vacuum_class instance.
[in]idID of the parameter.
Returns
The name of the parameter.

Definition at line 318 of file vacuum_equilibrium.f.

◆ vacuum_get_param_value()

real (rprec) function vacuum_equilibrium::vacuum_get_param_value ( type (vacuum_class), intent(in)  this,
integer, intent(in)  id,
integer, intent(in)  i_index 
)

Get the value of a reconstruction vacuum parameter.

This method overrides equilibrium::equilibrium_get_param_value.

Parameters
[in]thisA vacuum_class instance.
[in]idID of the parameter.
[in]i_indexThe ith index of the parameter.
Returns
The value of the parameter.

Definition at line 279 of file vacuum_equilibrium.f.

◆ vacuum_is_1d_array()

logical function vacuum_equilibrium::vacuum_is_1d_array ( type (vacuum_class), intent(in)  this,
integer, intent(in)  id 
)

Checks if a parameter id is a 1d array.

This method overrides equilibrium::equilibrium_is_1d_array.

Parameters
[in]thisA vacuum_class instance.
[in]idID of the parameter.
Returns
True if the parameter is a 1d array and false if otherwise.

Definition at line 491 of file vacuum_equilibrium.f.

◆ vacuum_is_recon_param()

logical function vacuum_equilibrium::vacuum_is_recon_param ( type (vacuum_class), intent(in)  this,
integer, intent(in)  id 
)

Checks if a parameter id is a reconstruction parameter.

This method overrides equilibrium::equilibrium_is_recon_param.

Parameters
[in]thisA vacuum_class instance.
[in]idID of the parameter.
Returns
True if the parameter is a reconstruction parameter and false if otherwise.

Definition at line 530 of file vacuum_equilibrium.f.

◆ vacuum_set_param()

subroutine vacuum_equilibrium::vacuum_set_param ( type (vacuum_class), intent(inout)  this,
integer, intent(in)  id,
integer, intent(in)  i_index,
real (rprec), intent(in)  value 
)

Sets the value of a reconstruction equilibrium parameter.

This method overrides equilibrium::equilibrium_set_param. This function always returns false because a vacuum equilibrium never needs to be reconverged.

Parameters
[in,out]thisA vacuum_class instance.
[in]idID of the parameter.
[in]i_indexThe ith index of the parameter.
[in]valueThe value of the parameter.

Definition at line 198 of file vacuum_equilibrium.f.

◆ vacuum_write()

subroutine vacuum_equilibrium::vacuum_write ( type (vacuum_class), intent(in)  this,
integer, intent(in)  iou 
)

Write out the equilibrium to an output file.

This method overrides equilibrium::equilibrium_write.

Parameters
[in]thisA vacuum_class instance.
[in]iouInput/output unit of the output file.

Definition at line 570 of file vacuum_equilibrium.f.

◆ vacuum_write_input()

subroutine vacuum_equilibrium::vacuum_write_input ( type (vacuum_class), intent(in)  this,
integer, intent(in)  current_step 
)

Write the current valid input.

This method overrides equilibrium::equilibrium_write_input. The boundary and other fixed parameters do not get updated as the reconstruction progresses. Need to update them manually if in free boundary mode.

Parameters
[in]thisA vacuum_class instance.
[in]current_stepStep number to append to input filename.

Definition at line 601 of file vacuum_equilibrium.f.