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

Public Member Functions

subroutine f0_mem_allocation
 
subroutine f0_initialize (grid, inode1, inode2, imu1, imu2)
 
subroutine f0_redistribute (grid, imu1, imu2)
 
subroutine f0_init_rest (grid)
 
subroutine prep_move_f0g_to_ptl ()
 
subroutine zero_out_f0_f0g (isp)
 
subroutine deallocate_df0g_n ()
 
subroutine f0_get_f0g (grid, isp, itr, p, phi, mu_n_in, vp_n, f0g, err)
 Interpolates the grid distribution function to real space, velocity space location given by node, mu_n,vp_n. In poloidal plane it uses nearest neighbor, in toroidal direction (if F0_TOR_LINEAR is defined) and velocity space linear interpolation. More...
 
subroutine reset_f0_f
 
subroutine f0_update_analytic_f0_init (nnode, isp, nsp)
 Initialize memory for updating the analytic distribution function of the total-f method. More...
 
subroutine f0_update_analytic_f0_finalize
 Deallocate memory for updating the analytic distritution function of the total-f method. More...
 
subroutine f0_update_analytic_f0 (grid, sp, psn)
 Updates the analytic part of the total-f distribution function by filtering the density, flow and temperature moments from the particle set. This is achieved by computing the density, temperature, and flow moments of the particle set, \(\delta n\), \(\delta T\) and \(\delta u\). This defines two Maxwellians \(f_M(n_0,u_0,T_0)\) and \(f_M(n_0+\delta n,u_0+\delta u,T_0+\delta T)\), the difference of which is subtracted from the particle weights and subsequently added to the analytic distribution function. More...
 

Public Attributes

integer f0_nmu
 
integer f0_nvp
 
real(8), dimension(:,:,:,:),
allocatable, target 
f0_f0g
 Stores the slow varying grid part of the distribution function. More...
 
real(8), dimension(:,:,:,:),
allocatable, target 
f0_f
 Stores the full distribution function. More...
 
real(8), dimension(:,:,:,:),
allocatable 
f0_df0g
 Stores the result of the source routines (e.g. collision operator) More...
 
real(8), dimension(:,:,:,:),
allocatable, target 
f0_df0g_tmp
 Temporarily stores collision operator results (cpp version) More...
 
real(8), dimension(:,:,:,:),
allocatable 
df0g_tmp
 
real(8), dimension(:,:,:,:),
allocatable, target 
f0_n
 Normalization for mesh –> particle interpolation (n=0 mode) More...
 
real(8) f0_smu_max
 
real(8) f0_vp_max
 
real(8) f0_dsmu
 
real(8) f0_dvp
 
integer f0_imu1
 
integer f0_imu2
 
real(8), dimension(:,:),
allocatable, target 
f0_inv_grid_vol
 
real(8), dimension(:,:),
allocatable, target 
f0_grid_vol
 
real(8), dimension(:,:),
allocatable, target 
f0_grid_vol_vonly
 
real(8), dimension(:),
allocatable, target 
f0_b_b0
 
real(8), dimension(:,:),
allocatable, target 
f0_n_ta
 
real(8), dimension(:,:),
allocatable, target 
f0_den
 
real(8), dimension(:,:),
allocatable, target 
f0_t_ev
 
real(8), dimension(:,:),
allocatable, target 
f0_flow
 
real(8), dimension(:,:),
allocatable 
f0_den_global
 
real(8), dimension(:,:),
allocatable 
f0_temp_global
 
real(8), dimension(:,:),
allocatable 
f0_den0_ptl
 
real(8), dimension(:,:),
allocatable 
f0_density_n0_add
 
logical f0_update_analytic =.false.
 Switch on/off the update of the analytic part of the distribution function. More...
 
logical f0_update_analytic_local =.false.
 If .false. –> flux-surface average update, .true. –> local. More...
 
real(8) f0_update_analytic_alpha =2D-3
 Separate alpha from sml_f0_grid_alpha for Maxwellian contribution. More...
 
real(8) f0_update_analytic_damp_width = 0.5D0
 For width of \(\exp^{-(x/w)^2}\) damping factor for updating density/temperature of the analytical f0. More...
 
real(8), dimension(:,:),
allocatable, target 
f0_delta_n
 Flux-surface averaged change of density. More...
 
real(8), dimension(:,:),
allocatable, target 
f0_delta_u
 Flux-surface averaged change of parallel flow. More...
 
real(8), dimension(:,:),
allocatable, target 
f0_delta_t
 Flux-surface averaged change of temperature. More...
 
real(kind=8), parameter f0_mu0_factor =3D0
 Set value of lowest mu in grid –> 1/f0_mu0_factor. More...
 
type(eq_ftn_type) f0_edge_envelope
 

Private Member Functions

subroutine, private partition_intersect (l1, r1, l2, r2, nnodes, psize, partition, index, count, counts, ierror)
 
integer function, private ceil2 (n)
 
integer function, private pair (np, p, k)
 

Member Function/Subroutine Documentation

integer function, private f0_module::ceil2 ( integer  n)
private

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine f0_module::deallocate_df0g_n ( )
subroutine f0_module::f0_get_f0g ( type(grid_type)  grid,
integer, intent(in)  isp,
integer, intent(in)  itr,
real (8), dimension(3), intent(in)  p,
real (8), intent(in)  phi,
real (8), intent(in)  mu_n_in,
real (8), intent(in)  vp_n,
real (8), intent(out)  f0g,
logical, intent(out)  err 
)

Interpolates the grid distribution function to real space, velocity space location given by node, mu_n,vp_n. In poloidal plane it uses nearest neighbor, in toroidal direction (if F0_TOR_LINEAR is defined) and velocity space linear interpolation.

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine f0_module::f0_init_rest ( type(grid_type)  grid)

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine f0_module::f0_initialize ( type(grid_type)  grid,
integer, intent(in)  inode1,
integer, intent(in)  inode2,
integer, intent(in)  imu1,
integer, intent(in)  imu2 
)

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine f0_module::f0_mem_allocation ( )

Here is the caller graph for this function:

subroutine f0_module::f0_redistribute ( type(grid_type)  grid,
integer, intent(in)  imu1,
integer, intent(in)  imu2 
)

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine f0_module::f0_update_analytic_f0 ( type(grid_type), intent(in)  grid,
type(species_type)  sp,
type(psn_type), intent(in)  psn 
)

Updates the analytic part of the total-f distribution function by filtering the density, flow and temperature moments from the particle set. This is achieved by computing the density, temperature, and flow moments of the particle set, \(\delta n\), \(\delta T\) and \(\delta u\). This defines two Maxwellians \(f_M(n_0,u_0,T_0)\) and \(f_M(n_0+\delta n,u_0+\delta u,T_0+\delta T)\), the difference of which is subtracted from the particle weights and subsequently added to the analytic distribution function.

Parameters
[in]gridXGC grid data structure, type(grid_type)
[in]spParticle data object, type(species_type)
[in]psnXGC field data object, type(psn_type)

Here is the call graph for this function:

subroutine f0_module::f0_update_analytic_f0_finalize ( )

Deallocate memory for updating the analytic distritution function of the total-f method.

Here is the caller graph for this function:

subroutine f0_module::f0_update_analytic_f0_init ( integer, intent(in)  nnode,
integer, intent(in)  isp,
integer, intent(in)  nsp 
)

Initialize memory for updating the analytic distribution function of the total-f method.

Parameters
[in]nnodeNumber of mesh vertices, integer
[in]ispIndex of first particle species, integer
[in]nspIndex of last particle species, integer

Here is the caller graph for this function:

integer function, private f0_module::pair ( integer  np,
integer  p,
integer  k 
)
private

Here is the caller graph for this function:

subroutine, private f0_module::partition_intersect ( integer, intent(in)  l1,
integer, intent(in)  r1,
integer, intent(in)  l2,
integer, intent(in)  r2,
integer, intent(in)  nnodes,
integer, intent(in)  psize,
integer, dimension(psize+1), intent(in)  partition,
integer, dimension(psize), intent(out)  index,
integer, dimension(psize), intent(out)  count,
integer, intent(out)  counts,
integer, intent(out)  ierror 
)
private

Here is the caller graph for this function:

subroutine f0_module::prep_move_f0g_to_ptl ( )
subroutine f0_module::reset_f0_f ( )
subroutine f0_module::zero_out_f0_f0g ( integer  isp)

Member Data Documentation

real (8), dimension(:,:,:,:), allocatable f0_module::df0g_tmp
real (8), dimension(:), allocatable, target f0_module::f0_b_b0
real (8), dimension(:,:), allocatable, target f0_module::f0_delta_n

Flux-surface averaged change of density.

real (8), dimension(:,:), allocatable, target f0_module::f0_delta_t

Flux-surface averaged change of temperature.

real (8), dimension(:,:), allocatable, target f0_module::f0_delta_u

Flux-surface averaged change of parallel flow.

real (8), dimension(:,:), allocatable, target f0_module::f0_den
real (8), dimension(:,:), allocatable f0_module::f0_den0_ptl
real (8), dimension(:,:), allocatable f0_module::f0_den_global
real (8), dimension(:,:), allocatable f0_module::f0_density_n0_add
real (8), dimension(:,:,:,:), allocatable f0_module::f0_df0g

Stores the result of the source routines (e.g. collision operator)

real (8), dimension(:,:,:,:), allocatable, target f0_module::f0_df0g_tmp

Temporarily stores collision operator results (cpp version)

real (8) f0_module::f0_dsmu
real (8) f0_module::f0_dvp
type(eq_ftn_type) f0_module::f0_edge_envelope
real (8), dimension(:,:,:,:), allocatable, target f0_module::f0_f

Stores the full distribution function.

real (8), dimension(:,:,:,:), allocatable, target f0_module::f0_f0g

Stores the slow varying grid part of the distribution function.

real (8), dimension(:,:), allocatable, target f0_module::f0_flow
real (8), dimension(:,:), allocatable, target f0_module::f0_grid_vol
real (8), dimension(:,:), allocatable, target f0_module::f0_grid_vol_vonly
integer f0_module::f0_imu1
integer f0_module::f0_imu2
real (8), dimension(:,:), allocatable, target f0_module::f0_inv_grid_vol
real (kind=8), parameter f0_module::f0_mu0_factor =3D0

Set value of lowest mu in grid –> 1/f0_mu0_factor.

real (8), dimension(:,:,:,:), allocatable, target f0_module::f0_n

Normalization for mesh –> particle interpolation (n=0 mode)

real (8), dimension(:,:), allocatable, target f0_module::f0_n_ta
integer f0_module::f0_nmu
integer f0_module::f0_nvp
real (8) f0_module::f0_smu_max
real (8), dimension(:,:), allocatable, target f0_module::f0_t_ev
real (8), dimension(:,:), allocatable f0_module::f0_temp_global
logical f0_module::f0_update_analytic =.false.

Switch on/off the update of the analytic part of the distribution function.

real (8) f0_module::f0_update_analytic_alpha =2D-3

Separate alpha from sml_f0_grid_alpha for Maxwellian contribution.

real (8) f0_module::f0_update_analytic_damp_width = 0.5D0

For width of \(\exp^{-(x/w)^2}\) damping factor for updating density/temperature of the analytical f0.

logical f0_module::f0_update_analytic_local =.false.

If .false. –> flux-surface average update, .true. –> local.

real (8) f0_module::f0_vp_max

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