Stellarator-Tools
|
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 | |
interface | vacuum_class |
Base class representing a vacuum_equilibrium. More... | |
Functions/Subroutines | |
type(vacuum_class) function, pointer | vacuum_construct (file_name, iou, force_solve) |
Construct a vacuum_class object. More... | |
subroutine | vacuum_destruct (this) |
Deconstruct a vacuum_class object. More... | |
subroutine | vacuum_set_param (this, id, i_index, j_index, value, eq_comm, state_flags) |
Sets the value of a reconstruction equilibrium parameter. More... | |
character(len=data_name_length) function | vacuum_get_type (this) |
Gets a discription of the equilibrium type. 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, j_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, s, theta) |
Gets the loop integrated magnetic field at a position. More... | |
real(rprec) function, dimension(:), pointer | vacuum_get_ext_currents (this, num_currents, 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 = 14 |
1D Array of external currents. | |
Defines the base class of the type vacuum_class. This module contains all the code necessary to interface V3FIT with a vacuum equilibrium.
type (vacuum_class) function, pointer vacuum_equilibrium::vacuum_construct | ( | character (len=*), intent(in) | file_name, |
integer, intent(in) | iou, | ||
logical, intent(in) | force_solve | ||
) |
Construct a vacuum_class object.
Allocates memory and initializes a vacuum_class object.
[in] | file_name | Filename of the vacuum namelist input file. |
[in] | iou | Input/output unit to log messages to. |
[in] | force_solve | If true, forces the equilbirum to resolve every time. |
subroutine vacuum_equilibrium::vacuum_destruct | ( | type (vacuum_class), intent(inout) | this | ) |
Deconstruct a vacuum_class object.
Deallocates memory and uninitializes a vacuum_class object.
[in,out] | this | A vacuum_class instance. |
real (rprec) function, dimension(3) vacuum_equilibrium::vacuum_get_b_vec | ( | class (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.
[in] | this | A vacuum_class instance. |
[in] | x_cart | Cartesian position to get the magnetic field vector at. |
[in] | cyl | Flag that specifies if the bfield should be returned in cartesian or cylindical coordinates. |
real (rprec) function, dimension(:), pointer vacuum_equilibrium::vacuum_get_ext_currents | ( | class (vacuum_class), intent(in) | this, |
integer, intent(in) | num_currents, | ||
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.
[in] | this | A vacuum_class instance. |
[in] | num_currents | Forces the number of currents to return if greater than zero. |
[out] | scale_currents | Informs the caller that currents need to be scaled. |
real (rprec) function vacuum_equilibrium::vacuum_get_int_b_dphi | ( | class (vacuum_class), intent(in) | this, |
real (rprec), intent(in) | s, | ||
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]
[in] | this | A vacuum_class instance. |
[in] | s | Radial position to integrate about. |
[in] | theta | Theta angle to integrate about. |
integer function vacuum_equilibrium::vacuum_get_param_id | ( | class (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.
[in] | this | A vacuum_class instance. |
[in] | param_name | Name of a reconstruction parameter. |
character(len=data_name_length) function vacuum_equilibrium::vacuum_get_param_name | ( | class (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.
[in] | this | A vacuum_class instance. |
[in] | id | ID of the parameter. |
real (rprec) function vacuum_equilibrium::vacuum_get_param_value | ( | class (vacuum_class), intent(in) | this, |
integer, intent(in) | id, | ||
integer, intent(in) | i_index, | ||
integer, intent(in) | j_index | ||
) |
Get the value of a reconstruction vacuum parameter.
This method overrides equilibrium::equilibrium_get_param_value.
[in] | this | A vacuum_class instance. |
[in] | id | ID of the parameter. |
[in] | i_index | The ith index of the parameter. |
[in] | j_index | The jth index of the parameter. |
character (len=data_name_length) function vacuum_equilibrium::vacuum_get_type | ( | class (vacuum_class), intent(in) | this | ) |
Gets a discription of the equilibrium type.
[in] | this | A vacuum_class instance. |
logical function vacuum_equilibrium::vacuum_is_1d_array | ( | class (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.
[in] | this | A vacuum_class instance. |
[in] | id | ID of the parameter. |
logical function vacuum_equilibrium::vacuum_is_recon_param | ( | class (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.
[in] | this | A vacuum_class instance. |
[in] | id | ID of the parameter. |
subroutine vacuum_equilibrium::vacuum_set_param | ( | class (vacuum_class), intent(inout) | this, |
integer, intent(in) | id, | ||
integer, intent(in) | i_index, | ||
integer, intent(in) | j_index, | ||
real (rprec), intent(in) | value, | ||
integer, intent(in) | eq_comm, | ||
integer, intent(inout) | state_flags | ||
) |
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.
[in,out] | this | A vaccum_class instance. |
[in] | id | ID of the parameter. |
[in] | i_index | The ith index of the parameter. |
[in] | j_index | The jth index of the parameter. |
[in] | value | The value of the parameter. |
[in] | eq_comm | MPI communicator for the child equilibrium processes. |
[in,out] | state_flags | Bitwise flags to indicate which parts of the model changed. |
subroutine vacuum_equilibrium::vacuum_write | ( | class (vacuum_class), intent(in) | this, |
integer, intent(in) | iou | ||
) |
Write out the equilibrium to an output file.
This method overrides equilibrium::equilibrium_write.
[in] | this | A vacuum_class instance. |
[in] | iou | Input/output unit of the output file. |
subroutine vacuum_equilibrium::vacuum_write_input | ( | class (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.
[in] | this | A vacuum_class instance. |
[in] | current_step | Step number to append to input filename. |