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

Implements motional stark effect diagnostic. Defines the base class of the type mse_class. More...

Data Types

interface  mse_class
 Base class representing a mse signal. More...
 

Functions/Subroutines

class(mse_class) function, pointer mse_construct_vec (point, view_start, view_end, beam_start, beam_end, in_degrees, is_ratio)
 Construct a mse_class object representing a motional stark effect diagnostic. More...
 
class(mse_class) function, pointer mse_construct_rad (point, alpha, omega, delta, theta, in_degrees, is_ratio)
 Construct a mse_class object representing a motional stark effect diagnostic. More...
 
subroutine mse_destruct (this)
 Deconstruct a mse_class object. More...
 
real(rprec) function, dimension(4) mse_get_modeled_signal (this, a_model, sigma, last_value)
 Calculates the modeled signal. More...
 
character(len=data_name_length) function mse_get_type (this)
 Gets a discription of the mse type. More...
 
subroutine mse_get_header (this, header)
 Gets a discription of the model and model sigma array indices. More...
 
real(rprec) function, private mse_angle_to_bt_proj (this, vec)
 Computes the angle with respect to toroidal field. More...
 
real(rprec) function, private mse_angle_to_horizontal (vec)
 Computes the angle with respect to horizontal. More...
 

Variables

integer, parameter mse_degrees_flag = 1
 Bit position for the use coil response flag.
 
integer, parameter mse_ratio_flag = 2
 Bit position for the force coil response flag.
 

Detailed Description

Implements motional stark effect diagnostic. Defines the base class of the type mse_class.

Super Class:
diagnostic

Function/Subroutine Documentation

◆ mse_angle_to_bt_proj()

real (rprec) function, private mse::mse_angle_to_bt_proj ( class (mse_class), intent(in)  this,
real (rprec), dimension(3)  vec 
)
private

Computes the angle with respect to toroidal field.

Returns the angle projected to the horizontal between an arbitray vector and and the toroidal field. This angle is computed by.

angle = acos(n_t.vxy/|vxy|) (1)

where n_t is the unit vector in the toroidal direction at the measurement point.

n_t = (-p_y, p_x)/|p| (2)

Parameters
[in]thisA mse_class instance.
[in]vecAn arbitray vector.
[in]bvecThe magnetic filed vector.
Returns
The projected angle between the vector and the toroidal

Definition at line 447 of file mse.f.

◆ mse_angle_to_horizontal()

real (rprec) function, private mse::mse_angle_to_horizontal ( real (rprec), dimension(3)  vec)
private

Computes the angle with respect to horizontal.

Returns the angle to the horizontal for an arbitray vector. This angle is computed by.

angle = asin(vecz/|vecz|)

Parameters
[in]vecAn arbitray vector.
Returns
The projected angle between the vector and horizontal

Definition at line 487 of file mse.f.

◆ mse_construct_rad()

class (mse_class) function, pointer mse::mse_construct_rad ( real (rprec), dimension(3), intent(in)  point,
real (rprec), intent(in)  alpha,
real (rprec), intent(in)  omega,
real (rprec), intent(in)  delta,
real (rprec), intent(in)  theta,
logical, intent(in)  in_degrees,
logical, intent(in)  is_ratio 
)

Construct a mse_class object representing a motional stark effect diagnostic.

Allocates memory and initializes a mse_class object. Uses angle representation.

Parameters
[in]pointMeasurement point of the mse diagnostic.
[in]omegaAngle between the neutral beam and the toroidal in the horizontal.
[in]alphaAngle between the view chord and the toroidal in the horizontal.
[in]deltaPitch angle to the horizontal and the neutral beam.
[in]thetaPitch angle to the horizontal and the view chord.
[in]in_degreesChannel measures degrees.
[in]is_ratioChannel measures ratio.
Returns
A pointer to a constructed mse_class object.

Definition at line 179 of file mse.f.

◆ mse_construct_vec()

class (mse_class) function, pointer mse::mse_construct_vec ( real (rprec), dimension(3), intent(in)  point,
real (rprec), dimension(3), intent(in)  view_start,
real (rprec), dimension(3), intent(in)  view_end,
real (rprec), dimension(3), intent(in)  beam_start,
real (rprec), dimension(3), intent(in)  beam_end,
logical, intent(in)  in_degrees,
logical, intent(in)  is_ratio 
)

Construct a mse_class object representing a motional stark effect diagnostic.

Allocates memory and initializes a mse_class object. Uses vector representation.

Parameters
[in]pointMeasurement point of the mse diagnostic.
[in]view_startStarting point of the view vector.
[in]view_endEnding point of the view vector.
[in]beam_startStarting point of the beam vector.
[in]beam_endEnding point of the beam vector.
[in]in_degreesChannel measures degrees.
[in]is_ratioChannel measures ratio.
Returns
A pointer to a constructed mse_class object.

Definition at line 105 of file mse.f.

◆ mse_destruct()

subroutine mse::mse_destruct ( type (mse_class), intent(inout)  this)

Deconstruct a mse_class object.

Deallocates memory and uninitializes a mse_class object.

Parameters
[in,out]thisA mse_class instance.

Definition at line 233 of file mse.f.

◆ mse_get_header()

subroutine mse::mse_get_header ( class (mse_class), intent(in)  this,
character (len=data_name_length), dimension(7), intent(inout)  header 
)

Gets a discription of the model and model sigma array indices.

Returns a description of the array indices for use when writting output files.

Parameters
[in]thisA mse_class instance.
[in,out]headerBuffer arrays to write header strings to.
Returns
A string describing the model and model sigma array indices.

Definition at line 397 of file mse.f.

◆ mse_get_modeled_signal()

real (rprec) function, dimension(4) mse::mse_get_modeled_signal ( class (mse_class), intent(inout)  this,
type (model_class), pointer  a_model,
real (rprec), dimension(4), intent(out)  sigma,
real (rprec), dimension(4), intent(in)  last_value 
)

Calculates the modeled signal.

Calculates the modeled signal by Equation 1 of Hawkes et. al. doi:10.1063/1.1149415. The polarization angle gamma_m is determined from.

tan(gamma_m) = E_h/E_v (1)

E_h = -[B_v*Cos(delta)*Cos(omega + alpha) + Sin(delta)*(B_r*Sin(omega) - B_t*Cos(omega)] (2)

E_v = -B_v*Sin(theta)*Cos(delta)*Sin(omega + alpha)

  • Sin(theta)*Sin(delta)*(B_t*Sin(omega) + B_r*Cos(omega))
  • Cos(theta)*Sin(delta)*(B_r*Cos(alpha) - B_t*Sin(alpha)) (3)

The magnetic field components are defined as

  • B_r Radial component of the magnetic field
  • B_t Toroidal component of the magnetic field
  • B_v Vertical component of the magnetic field

The angles are defined as

  • alpha: Projected angle between the neutral beam and B_t. Defined such that 0 is the negative toroidal direction. When 90, it is in the negative radial direction.
  • omega: Projected angle between the view and and B_t. Defined such that 0 is the positive toroidal direction. When 90, it is in the negative radial direction.
  • delta: Angle between the neutral beam and the horizontal. Defined such that 90 is in the negative z direction.
  • theta: Angle between the view and the horizontal. Defined such that 90 is in the positive z direction.
Parameters
[in,out]thisA mse_class instance.
[in]a_modelA model instance.
[out]sigmaThe modeled sigma.
[in]last_valueLast good value in case the signal did not change.
Returns
The model value.

Definition at line 291 of file mse.f.

◆ mse_get_type()

character (len=data_name_length) function mse::mse_get_type ( class (mse_class), intent(in)  this)

Gets a discription of the mse type.

Returns a description of the mse type for use when writting output files.

Parameters
[in]thisA mse_class instance.
Returns
A string describing the mse type.

Definition at line 366 of file mse.f.