XGC1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Types | Public Member Functions | Public Attributes | List of all members
eq_module Module Reference

Plasma EQuilibrium module (prefix EQ) (1) Magnetic equilibrium information (from eqd file usually) (2) Density and temperature (+flow) profiles (from .prf file) More...

Collaboration diagram for eq_module:
Collaboration graph
[legend]

Data Types

type  eq_ftn_type
 
type  lin_interp
 

Public Member Functions

logical function is_rgn12 (r, z, psi)
 
logical function is_rgn1 (r, z, psi)
 
subroutine eq_ftn_setup (ftn)
 setup eq_ftn functions ftnshape determines analytic function shape. (-1 is for file input). shape 0: constant. return v1 shape 1: hyperbolic tanh. x1 - center of hyperbolic tanh, x2 - width of tanh v1 - pedestal top (left), v2 - pedestal bottom (right) shape 2: linear function line which passes (x1,v1), (x1+x2,v2). x2 is delta shape 3: exponential tanh. A * exp(B * w tanh( (r0-r)/w)) x1 = r0, x2 = w, x3=w/B, v1 = A, v2 = B shape 4: modified hyperbolic tanh : sqrt linear + tanh More...
 
recursive real(8) function eq_ftn (p, r, z, ftn)
 
real(8) function eq_dftn (p, r, z, ftn)
 
subroutine init_ftn_spline (ftn)
 
subroutine ftn_evaluation (spl, psi, val)
 
subroutine ftn_derivative (spl, psi, der, val)
 
subroutine init_ftn_lin (ftn)
 
subroutine ftn_evaluation_lin (lin, psi, val)
 
subroutine ftn_derivative_lin (lin, psi, val)
 

Public Attributes

character(len=80) eq_header
 
character(len=80) eq_filename
 eq_filename is the name of the eqd input (output for M3D-C1 input) file More...
 
character(len=80) eq_m3dc1_filename ='C1.h5'
 Name of the M3D-C1 data file. More...
 
character(len=100) eq_g_filename
 gqdsk file generated from M3D-C1 data (needed for wall shape and consistency) More...
 
real(8) eq_min_r
 
real(8) eq_max_r
 
real(8) eq_min_z
 
real(8) eq_max_z
 Not needed anymore – can be removed. More...
 
real(8) eq_axis_r
 
real(8) eq_axis_z
 
real(8) eq_axis_b
 R, Z, B of magnetic axis. More...
 
real(8) eq_x_psi
 
real(8) eq_x_z
 
real(8) eq_x_r
 
real(8) eq_x_slope
 psi, R, Z of (first) X-point. eq_x_slope = dZ/dR – slope from axis More...
 
logical eq_set_x2
 determine if there is second (upper) X-point to consider. It does not have to be set when using -DCONVERT_GRID2=ON -DNEW_FLX_AIF=ON. This will be overriden by flx.aif. More...
 
real(8) eq_x2_z
 Z value of second (upper) X-point. More...
 
real(8) eq_x2_r
 R value of second (upper) X-point. More...
 
real(8) eq_x2_slope
 slope of second X-point. More...
 
real(8) eq_x2_psi
 psi of second X_point More...
 
integer eq_mr
 
integer eq_mz
 
integer eq_mpsi
 
integer eq_sep
 size of R,Z rect grid from .eqd file More...
 
real(8), dimension(:), allocatable eq_i
 
real(8), dimension(:), allocatable eq_psi_grid
 
real(8), dimension(:), allocatable eq_rgrid
 
real(8), dimension(:), allocatable eq_zgrid
 
real(8), dimension(:,:),
allocatable 
eq_psi_rz
 
integer eq_den_shape
 shape number of density profile. -1 for file input More...
 
integer eq_tempi_shape
 shape number of ion temperature profile. -1 for file input More...
 
integer eq_tempe_shape
 shape number of electron temperature profile. -1 for file input More...
 
integer eq_flowi_shape
 shape number of ion flow profile. -1 for file input More...
 
integer eq_flowe_shape
 shape number of electron flow profile. -1 for file input More...
 
real(8) eq_out_decay_factor
 profiles decay exponentially to f(sml_outpsi)/decay_factor for psi>sml_outpsi More...
 
real(8) eq_priv_flux_decay_factor
 profiles decay exponentially to f(sml_outpsi)/decay_factor in priv. flux region More...
 
real(8) eq_out_decay_width
 width for exponential decay for psi>sml_outpsi More...
 
real(8) eq_priv_flux_decay_width
 width for exponential decay in private flux region More...
 
real(8) eq_den_v1
 one of function value of analytic profile shape of density - check eq_ftn_setup for details More...
 
real(8) eq_den_v2
 one of function value of analytic profile shape of density - check eq_ftn_setup for details More...
 
real(8) eq_den_v3
 one of function value of analytic profile shape of density - check eq_ftn_setup for details More...
 
real(8) eq_den_x1
 one of normalized psi value of analytic profile shape of density - check eq_ftn_setup for details More...
 
real(8) eq_den_x2
 one of normalized psi value of analytic profile shape of density - check eq_ftn_setup for details More...
 
real(8) eq_den_x3
 one of normalized psi value of analytic profile shape of density - check eq_ftn_setup for details More...
 
real(8) eq_tempi_v1
 one of function value of analytic profile shape of ion temperature - check eq_ftn_setup for details More...
 
real(8) eq_tempi_v2
 one of function value of analytic profile shape of ion temperature - check eq_ftn_setup for details More...
 
real(8) eq_tempi_v3
 one of function value of analytic profile shape of ion temperature - check eq_ftn_setup for details More...
 
real(8) eq_tempi_x1
 one of normalized psi value of analytic profile shape of ion temperature - check eq_ftn_setup for details More...
 
real(8) eq_tempi_x2
 one of normalized psi value of analytic profile shape of ion temperature - check eq_ftn_setup for details More...
 
real(8) eq_tempi_x3
 one of normalized psi value of analytic profile shape of ion temperature - check eq_ftn_setup for details More...
 
real(8) eq_tempe_v1
 one of function value of analytic profile shape of elec temperature - check eq_ftn_setup for details More...
 
real(8) eq_tempe_v2
 one of function value of analytic profile shape of elec temperature - check eq_ftn_setup for details More...
 
real(8) eq_tempe_v3
 one of function value of analytic profile shape of elec temperature - check eq_ftn_setup for details More...
 
real(8) eq_tempe_x1
 one of normalized psi value of analytic profile shape of elec temperature - check eq_ftn_setup for details More...
 
real(8) eq_tempe_x2
 one of normalized psi value of analytic profile shape of elec temperature - check eq_ftn_setup for details More...
 
real(8) eq_tempe_x3
 one of normalized psi value of analytic profile shape of elec temperature - check eq_ftn_setup for details More...
 
real(8) eq_flowi_v1
 one of function value of analytic profile shape of ion flow - check eq_ftn_setup for details More...
 
real(8) eq_flowi_v2
 one of function value of analytic profile shape of ion flow - check eq_ftn_setup for details More...
 
real(8) eq_flowi_v3
 one of function value of analytic profile shape of ion flow - check eq_ftn_setup for details More...
 
real(8) eq_flowi_x1
 one of normalized psi value of analytic profile shape of ion flow - check eq_ftn_setup for details More...
 
real(8) eq_flowi_x2
 one of normalized psi value of analytic profile shape of ion flow - check eq_ftn_setup for details More...
 
real(8) eq_flowi_x3
 one of normalized psi value of analytic profile shape of ion flow - check eq_ftn_setup for details More...
 
real(8) eq_flowe_v1
 one of function value of analytic profile shape of elec flow - check eq_ftn_setup for details More...
 
real(8) eq_flowe_v2
 one of function value of analytic profile shape of elec flow - check eq_ftn_setup for details More...
 
real(8) eq_flowe_v3
 one of function value of analytic profile shape of elec flow - check eq_ftn_setup for details More...
 
real(8) eq_flowe_x1
 one of normalized psi value of analytic profile shape of elec flow - check eq_ftn_setup for details More...
 
real(8) eq_flowe_x2
 one of normalized psi value of analytic profile shape of elec flow - check eq_ftn_setup for details More...
 
real(8) eq_flowe_x3
 one of normalized psi value of analytic profile shape of elec flow - check eq_ftn_setup for details More...
 
integer eq_zeff_shape
 shape number of Z_effective profile. -1 for file input More...
 
real(8) eq_zeff_v1
 one of function value of analytic profile shape of Z_effective - check eq_ftn_setup for details More...
 
real(8) eq_zeff_v2
 one of function value of analytic profile shape of Z_effective - check eq_ftn_setup for details More...
 
real(8) eq_zeff_v3
 one of function value of analytic profile shape of Z_effective - check eq_ftn_setup for details More...
 
real(8) eq_zeff_x1
 one of normalized psi value of analytic profile shape of Z_effective - check eq_ftn_setup for details More...
 
real(8) eq_zeff_x2
 one of normalized psi value of analytic profile shape of Z_effective - check eq_ftn_setup for details More...
 
real(8) eq_zeff_x3
 one of normalized psi value of analytic profile shape of Z_effective - check eq_ftn_setup for details More...
 
character(len=500) eq_den_file
 File name of density profile. More...
 
character(len=500) eq_tempi_file
 File name of ion temperature profile. More...
 
character(len=500) eq_tempe_file
 File name of electron temperature profile. More...
 
character(len=500) eq_flowi_file
 File name of ion flow profile. More...
 
character(len=500) eq_flowe_file
 File name of electron flow profile. More...
 
character(len=500) eq_zeff_file
 File name of Z_effective profile. More...
 
integer, parameter eq_mid_r_npsi =50
 For poloidal flux -> midplane R function. Number of evaluation points. More...
 
real(8), dimension(eq_mid_r_npsieq_mid_r_psi
 For poloidal flux -> midplane R function. Function data. More...
 
real(8) eq_mid_r_dp
 
real(8), parameter epsil_psi = 1D-5
 
integer, parameter ftn_lin_n =1000
 
logical, parameter use_ftn_lin =.true.
 
type(eq_ftn_typeeq_zeff
 
type(eq_ftn_type), dimension(0:ptl_nsp_max),
target 
eq_den
 
type(eq_ftn_type), dimension(0:ptl_nsp_max),
target 
eq_temp
 
type(eq_ftn_type), dimension(0:ptl_nsp_max),
target 
eq_flow
 

Detailed Description

Plasma EQuilibrium module (prefix EQ) (1) Magnetic equilibrium information (from eqd file usually) (2) Density and temperature (+flow) profiles (from .prf file)

Member Function/Subroutine Documentation

real(8) function eq_module::eq_dftn ( real(8)  p,
real(8)  r,
real(8)  z,
type(eq_ftn_type ftn 
)

Here is the call graph for this function:

Here is the caller graph for this function:

recursive real(8) function eq_module::eq_ftn ( real(8)  p,
real(8)  r,
real(8)  z,
type(eq_ftn_type ftn 
)

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine eq_module::eq_ftn_setup ( type(eq_ftn_type ftn)

setup eq_ftn functions ftnshape determines analytic function shape. (-1 is for file input). shape 0: constant. return v1 shape 1: hyperbolic tanh. x1 - center of hyperbolic tanh, x2 - width of tanh v1 - pedestal top (left), v2 - pedestal bottom (right) shape 2: linear function line which passes (x1,v1), (x1+x2,v2). x2 is delta shape 3: exponential tanh. A * exp(B * w tanh( (r0-r)/w)) x1 = r0, x2 = w, x3=w/B, v1 = A, v2 = B shape 4: modified hyperbolic tanh : sqrt linear + tanh

     - derivative is not continuous. please use shape 5 instead. 

shape 5: modified hyperbolic tanh : sqrt linear + tanh A ( (1+z slope) e^z - e^-z) / (e^z + e^-z) + B z = 4 * (center - sqrt(center psi) )/width x1 - center of tanh, x2 - width, x3 - core psi (for sqrt linear part - line passes (x3,v3)) v1 - pedestal top value, v2 - pedestal bottom value, v3 - core value (for sqrt linear part) shape 6: Just like case(5) but with an additional tanh that increases with increasing psi Primarily for the diffusivity profiles. v4 - far SOL value (usually > iny(2)) x4 - center of second tanh, usually ~ eq_x_psi x5 - widht of second tanh Second tanh is from 0 to v4 with center x4 and width x5

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine eq_module::ftn_derivative ( type (ezspline1_r8)  spl,
real (8)  psi,
integer  der,
real (8)  val 
)

Here is the caller graph for this function:

subroutine eq_module::ftn_derivative_lin ( type (lin_interp lin,
real (8)  psi,
real (8)  val 
)

Here is the caller graph for this function:

subroutine eq_module::ftn_evaluation ( type (ezspline1_r8)  spl,
real (8)  psi,
real (8)  val 
)

Here is the caller graph for this function:

subroutine eq_module::ftn_evaluation_lin ( type (lin_interp lin,
real (8)  psi,
real (8)  val 
)

Here is the caller graph for this function:

subroutine eq_module::init_ftn_lin ( type(eq_ftn_type ftn)

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine eq_module::init_ftn_spline ( type(eq_ftn_type ftn)

Here is the caller graph for this function:

logical function eq_module::is_rgn1 ( real (8)  r,
real (8)  z,
real (8)  psi 
)

Here is the caller graph for this function:

logical function eq_module::is_rgn12 ( real (8)  r,
real (8)  z,
real (8)  psi 
)

Here is the caller graph for this function:

Member Data Documentation

real (8), parameter eq_module::epsil_psi = 1D-5
real (8) eq_module::eq_axis_b

R, Z, B of magnetic axis.

real (8) eq_module::eq_axis_r
real (8) eq_module::eq_axis_z
type(eq_ftn_type), dimension(0:ptl_nsp_max), target eq_module::eq_den
character (len=500) eq_module::eq_den_file

File name of density profile.

integer eq_module::eq_den_shape

shape number of density profile. -1 for file input

real (8) eq_module::eq_den_v1

one of function value of analytic profile shape of density - check eq_ftn_setup for details

real (8) eq_module::eq_den_v2

one of function value of analytic profile shape of density - check eq_ftn_setup for details

real (8) eq_module::eq_den_v3

one of function value of analytic profile shape of density - check eq_ftn_setup for details

real (8) eq_module::eq_den_x1

one of normalized psi value of analytic profile shape of density - check eq_ftn_setup for details

real (8) eq_module::eq_den_x2

one of normalized psi value of analytic profile shape of density - check eq_ftn_setup for details

real (8) eq_module::eq_den_x3

one of normalized psi value of analytic profile shape of density - check eq_ftn_setup for details

character (len=80) eq_module::eq_filename

eq_filename is the name of the eqd input (output for M3D-C1 input) file

type(eq_ftn_type), dimension(0:ptl_nsp_max), target eq_module::eq_flow
character (len=500) eq_module::eq_flowe_file

File name of electron flow profile.

integer eq_module::eq_flowe_shape

shape number of electron flow profile. -1 for file input

real (8) eq_module::eq_flowe_v1

one of function value of analytic profile shape of elec flow - check eq_ftn_setup for details

real (8) eq_module::eq_flowe_v2

one of function value of analytic profile shape of elec flow - check eq_ftn_setup for details

real (8) eq_module::eq_flowe_v3

one of function value of analytic profile shape of elec flow - check eq_ftn_setup for details

real (8) eq_module::eq_flowe_x1

one of normalized psi value of analytic profile shape of elec flow - check eq_ftn_setup for details

real (8) eq_module::eq_flowe_x2

one of normalized psi value of analytic profile shape of elec flow - check eq_ftn_setup for details

real (8) eq_module::eq_flowe_x3

one of normalized psi value of analytic profile shape of elec flow - check eq_ftn_setup for details

character (len=500) eq_module::eq_flowi_file

File name of ion flow profile.

integer eq_module::eq_flowi_shape

shape number of ion flow profile. -1 for file input

real (8) eq_module::eq_flowi_v1

one of function value of analytic profile shape of ion flow - check eq_ftn_setup for details

real (8) eq_module::eq_flowi_v2

one of function value of analytic profile shape of ion flow - check eq_ftn_setup for details

real (8) eq_module::eq_flowi_v3

one of function value of analytic profile shape of ion flow - check eq_ftn_setup for details

real (8) eq_module::eq_flowi_x1

one of normalized psi value of analytic profile shape of ion flow - check eq_ftn_setup for details

real (8) eq_module::eq_flowi_x2

one of normalized psi value of analytic profile shape of ion flow - check eq_ftn_setup for details

real (8) eq_module::eq_flowi_x3

one of normalized psi value of analytic profile shape of ion flow - check eq_ftn_setup for details

character (len=100) eq_module::eq_g_filename

gqdsk file generated from M3D-C1 data (needed for wall shape and consistency)

character (len=80) eq_module::eq_header
real (8), dimension(:), allocatable eq_module::eq_i
character (len=80) eq_module::eq_m3dc1_filename ='C1.h5'

Name of the M3D-C1 data file.

real (8) eq_module::eq_max_r
real (8) eq_module::eq_max_z

Not needed anymore – can be removed.

real (8) eq_module::eq_mid_r_dp
integer, parameter eq_module::eq_mid_r_npsi =50

For poloidal flux -> midplane R function. Number of evaluation points.

real (8), dimension(eq_mid_r_npsi) eq_module::eq_mid_r_psi

For poloidal flux -> midplane R function. Function data.

real (8) eq_module::eq_min_r
real (8) eq_module::eq_min_z
integer eq_module::eq_mpsi
integer eq_module::eq_mr
integer eq_module::eq_mz
real (8) eq_module::eq_out_decay_factor

profiles decay exponentially to f(sml_outpsi)/decay_factor for psi>sml_outpsi

real (8) eq_module::eq_out_decay_width

width for exponential decay for psi>sml_outpsi

real (8) eq_module::eq_priv_flux_decay_factor

profiles decay exponentially to f(sml_outpsi)/decay_factor in priv. flux region

real (8) eq_module::eq_priv_flux_decay_width

width for exponential decay in private flux region

real (8), dimension(:), allocatable eq_module::eq_psi_grid
real (8), dimension(:,:), allocatable eq_module::eq_psi_rz
real (8), dimension(:), allocatable eq_module::eq_rgrid
integer eq_module::eq_sep

size of R,Z rect grid from .eqd file

logical eq_module::eq_set_x2

determine if there is second (upper) X-point to consider. It does not have to be set when using -DCONVERT_GRID2=ON -DNEW_FLX_AIF=ON. This will be overriden by flx.aif.

type(eq_ftn_type), dimension(0:ptl_nsp_max), target eq_module::eq_temp
character (len=500) eq_module::eq_tempe_file

File name of electron temperature profile.

integer eq_module::eq_tempe_shape

shape number of electron temperature profile. -1 for file input

real (8) eq_module::eq_tempe_v1

one of function value of analytic profile shape of elec temperature - check eq_ftn_setup for details

real (8) eq_module::eq_tempe_v2

one of function value of analytic profile shape of elec temperature - check eq_ftn_setup for details

real (8) eq_module::eq_tempe_v3

one of function value of analytic profile shape of elec temperature - check eq_ftn_setup for details

real (8) eq_module::eq_tempe_x1

one of normalized psi value of analytic profile shape of elec temperature - check eq_ftn_setup for details

real (8) eq_module::eq_tempe_x2

one of normalized psi value of analytic profile shape of elec temperature - check eq_ftn_setup for details

real (8) eq_module::eq_tempe_x3

one of normalized psi value of analytic profile shape of elec temperature - check eq_ftn_setup for details

character (len=500) eq_module::eq_tempi_file

File name of ion temperature profile.

integer eq_module::eq_tempi_shape

shape number of ion temperature profile. -1 for file input

real (8) eq_module::eq_tempi_v1

one of function value of analytic profile shape of ion temperature - check eq_ftn_setup for details

real (8) eq_module::eq_tempi_v2

one of function value of analytic profile shape of ion temperature - check eq_ftn_setup for details

real (8) eq_module::eq_tempi_v3

one of function value of analytic profile shape of ion temperature - check eq_ftn_setup for details

real (8) eq_module::eq_tempi_x1

one of normalized psi value of analytic profile shape of ion temperature - check eq_ftn_setup for details

real (8) eq_module::eq_tempi_x2

one of normalized psi value of analytic profile shape of ion temperature - check eq_ftn_setup for details

real (8) eq_module::eq_tempi_x3

one of normalized psi value of analytic profile shape of ion temperature - check eq_ftn_setup for details

real (8) eq_module::eq_x2_psi

psi of second X_point

real (8) eq_module::eq_x2_r

R value of second (upper) X-point.

real (8) eq_module::eq_x2_slope

slope of second X-point.

real (8) eq_module::eq_x2_z

Z value of second (upper) X-point.

real (8) eq_module::eq_x_psi
real (8) eq_module::eq_x_r
real (8) eq_module::eq_x_slope

psi, R, Z of (first) X-point. eq_x_slope = dZ/dR – slope from axis

real (8) eq_module::eq_x_z
type(eq_ftn_type) eq_module::eq_zeff
character (len=500) eq_module::eq_zeff_file

File name of Z_effective profile.

integer eq_module::eq_zeff_shape

shape number of Z_effective profile. -1 for file input

real (8) eq_module::eq_zeff_v1

one of function value of analytic profile shape of Z_effective - check eq_ftn_setup for details

real (8) eq_module::eq_zeff_v2

one of function value of analytic profile shape of Z_effective - check eq_ftn_setup for details

real (8) eq_module::eq_zeff_v3

one of function value of analytic profile shape of Z_effective - check eq_ftn_setup for details

real (8) eq_module::eq_zeff_x1

one of normalized psi value of analytic profile shape of Z_effective - check eq_ftn_setup for details

real (8) eq_module::eq_zeff_x2

one of normalized psi value of analytic profile shape of Z_effective - check eq_ftn_setup for details

real (8) eq_module::eq_zeff_x3

one of normalized psi value of analytic profile shape of Z_effective - check eq_ftn_setup for details

real (8), dimension(:), allocatable eq_module::eq_zgrid
integer, parameter eq_module::ftn_lin_n =1000
logical, parameter eq_module::use_ftn_lin =.true.

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