XGCa
Functions/Subroutines | Variables
neu_module Module Reference

Module containing the global data and variables for the neutral particle recycling model. More...

Functions/Subroutines

subroutine set_neutral_pointers (nnode, nwall, nebin, neu_weight_wall_lost_in, neu_weight_sum_lost_in, neu_weight_lost_ebins_in, neu_node_dens_in, neu_node_temp_in)
 

Variables

integer neu_num =10000
 Number of neutral particles per thread per wall segment. If neu_degas2=.true., this is the number of neutral particles per thread. More...
 
integer neu_istep_max =20000
 Maximum number of neutral push time steps. More...
 
integer neu_accum_time =0
 Integer number of timesteps over which the total number of recycling ions have been building up on the wall as neu_weight_sum_lost. More...
 
integer neu_tot_accum_time =0
 Integer number of timesteps over which the recycling profile has been building over neu_background_period timesteps. More...
 
logical neu_enforce_no_neutral =.false.
 Forced off-switch for the neutral recycling routine (needed for radiation cooling!) More...
 
logical neu_adjust_n0 =.true.
 whether to update the base neutral density. If true, a provisional ionization rate (everywhere proportional to the local neutral density) is rescaled to match the global particle sink from the sheath module times neu_recycle_rate. .false. fixed n0, .true. varying n0 - neu_recycle_rate should be specified. More...
 
real(kind=8) neu_n0 =5.0D17
 m^-3 -> nomalized unit, Realistic initial value for neu_base_den (=base neutral density). For cases where neu_adjust_n0=false, this provides a baseline density to use. When neu_adjust_n0=true, neu_base_den is still calculated and reported in the stdout log, but has no effect on the physics. More...
 
real(kind=8) neu_temp0 =3D0
 Neutral temperature boundary condition. More...
 
real(kind=8) neu_dt
 Timestep size for the neutral Monte Carlo steps. If not provided, a default value of 2e-3*sml_dt/sqrt(neu_temp0*1e-3) is used. More...
 
real(kind=8) neu_base_den
 Base multiplier for the neutral density. Uses neu_n0. More...
 
logical neu_degas2 =.false.
 Use DEGAS2 for the neutral Monte Carlo calculation. More...
 
integer neu_ebin_num =10
 Number of energy bins to use for neutral source. More...
 
real(kind=8) neu_ebin_min =3.0
 Lower bound of the smallest energy bin (in eV) More...
 
real(kind=8) neu_ebin_max =13.0
 Lower bound of the smallest energy bin (in eV) More...
 
logical neu_ebin_log = .false.
 Whether recycling energy bins are logarithmcially spaced. More...
 
real(kind=8) neu_ebin_delta
 Number of energy bins to use for neutral source. More...
 
integer neu_d2_ran_k =100
 The ran_k parameter from DEGAS2's random.hweb. Unlikely to change. More...
 
integer neu_d2_nsp_plas = 2
 Number of plasma species in the DEGAS2 problem file. Unlikely to change without more data. More...
 
integer neu_d2_nsp_neut = 1
 Number of neutral species in the DEGAS2 problem file, including the geometric dummy species '0'. The first nontrivial species is the one whose density and temperature will be calculated. More...
 
integer, dimension(:), allocatable neu_d2_sp_map
 Mapping of species indexing between XGC and DEGAS2. More...
 
integer neu_d2_first_wall_idx
 Index of wall_nodes_ordered that the DEGAS2 setup uses as the first one. More...
 
real(kind=8) neu_gas_puff_source = -1.0
 Source of additional neutrals in particles/s. Disables neu_adjust_n0. Also, puffed neutrals enter at the lowest energy bin. More...
 
integer neu_gas_puff_segment = -1
 Index of wall_nodes_ordered from which neu_gas_puff_source is produced. More...
 
real(kind=8), dimension(:), pointer neu_weight_sum_lost
 Global number of ions lost to the wall. More...
 
real(kind=8) neu_weight_lost_max = 5D23
 upper cutoff on the number of lost particles More...
 
real(kind=8) neu_lost_rate_max =5D23
 upper cutoff on the particle loss rate (particles/sec) More...
 
real(kind=8) neu_recycle_rate =0.9D0
 Fraction of lost ions that are recycled as neutrals. The ions lost to the wall as calculated in the sheath module are used to determine the global particle sink. Neutrals are produced at a rate of neu_recycle_rate*neu_sum_weight_lost (in particles per second). Has no effect if neu_adjust_n0=false. More...
 
real(kind=8) neu_theta_x = -99D0
 
real(kind=8) neu_peak_theta =-99D0
 Poloidal angle at which the neutral source is peak for neu_source_match_flux=.false. More...
 
real(kind=8) neu_delta_n =10D0
 Multiple of base neutral density at the peak position. When neu_source_match_flux=.false., determines the shape of the poloidal neutral source distribution. At large neu_delta_n, it approaches a Gaussian. neu_delta_n=1.0 corresponds to a uniform neutral source. More...
 
real(kind=8) neu_delta_theta =0.5235987756
 Width of the peak of the neutral source for neu_source_match_flux=.false. - 30/180 * pi. More...
 
real(kind=8) neu_inpsi =0.7D0
 Inner boundary for neutral fueling calculation (normalized pol. flux) More...
 
integer neu_background_period =500
 Period between subsequent updates of the background neutral distribution function in ion time steps. In any case, the density renormalization and source rates are recalculated every timestep for a fixed normalized neutral profile. More...
 
logical neu_exclude_private =.false.
 Exclude the privat region from neutral recycling. More...
 
real(kind=8), dimension(:), allocatable neu_ebins
 
real(kind=8), dimension(:), allocatable neu_wall_source
 Source of neutrals around limiter. More...
 
real(kind=8), dimension(:,:), allocatable neu_wall_source_ebins
 Source of neutrals around limiter. More...
 
real(kind=8), dimension(:), pointer neu_weight_wall_lost
 Local number of ions lost to the wall. More...
 
real(kind=8), dimension(:,:), pointer neu_weight_lost_ebins
 Local number of ions lost to the wall. More...
 
real(kind=8), dimension(:,:), allocatable neu_norm_baseden_ebins
 Holds normalized neutral density from ion flux to wall, energy binned. More...
 
real(kind=8), dimension(:,:), allocatable neu_d2_n0
 DEGAS2-predicted neutral density. More...
 
real(kind=8), dimension(:,:,:), allocatable neu_d2_v0
 DEGAS2-predicted neutral velocity. More...
 
real(kind=8), dimension(:,:), allocatable neu_d2_t0
 DEGAS2-predicted neutral temperature. More...
 
real(kind=8), dimension(:,:,:), allocatable neu_d2_sources
 DEGAS2-predicted sources for each species from neutral interactions. More...
 
real(kind=8), dimension(:,:), allocatable neu_d2_sourcetot
 DEGAS2-predicted sources integrated over whole volume. More...
 
integer neu_d2_ran_idx
 
real(kind=8), dimension(:), allocatable neu_d2_rand_array
 An array for random numbers in DEGAS2. More...
 
integer neu_nnode
 Number of nodes in neutral solution volume. Currently gridnnode. More...
 
integer neu_nbirth
 Number of birth locations. Currently gridnwall. More...
 
logical neu_source_match_flux =.true.
 If true, the neutral source around the limiter is determined from the local ion sink. If false, the neutral source is given an analytic poloidal dependence. More...
 
real(kind=8), dimension(:), allocatable neu_rbirth
 
real(kind=8), dimension(:), allocatable neu_zbirth
 (R,Z) coordinates of the neutral birth surface More...
 
real(kind=8), dimension(:), pointer neu_node_dens
 Normalized neutral density. More...
 
real(kind=8), dimension(:), pointer neu_node_temp
 Neutral temperature. More...
 
real(kind=8), dimension(:), allocatable neu_node_wsum
 Weight sum for neutral density calculation. More...
 
real(kind=8), dimension(:), allocatable neu_node_esum
 Weight sum for avg. neutral energy calculation. More...
 
real(kind=8), dimension(:), allocatable neu_node_varsum
 Weight sum for weight variance calculation. More...
 
real(kind=8), dimension(:), allocatable neu_node_numsum
 Weight sum for neutral number calculation. More...
 
real(kind=8), dimension(:), allocatable neu_node_vol
 Neutral cell volume. More...
 
real(kind=8), dimension(:), allocatable neu_node_flow
 Neutral bulk flow. More...
 
real(kind=8), dimension(:), allocatable neu_node_vsum
 Weight sum for neutral bulk flow calculation. More...
 
real(kind=8), dimension(:), allocatable neu_node_relstd
 Neutral weight standard deviation. More...
 

Detailed Description

Module containing the global data and variables for the neutral particle recycling model.

Function/Subroutine Documentation

◆ set_neutral_pointers()

subroutine neu_module::set_neutral_pointers ( integer, intent(in), value  nnode,
integer, intent(in), value  nwall,
integer, intent(in), value  nebin,
real (8), dimension(nwall), target  neu_weight_wall_lost_in,
real (8), dimension(1), target  neu_weight_sum_lost_in,
real (8), dimension(nwall,nebin), target  neu_weight_lost_ebins_in,
real (8), dimension(nnode), target  neu_node_dens_in,
real (8), dimension(nnode), target  neu_node_temp_in 
)

Variable Documentation

◆ neu_accum_time

integer neu_module::neu_accum_time =0

Integer number of timesteps over which the total number of recycling ions have been building up on the wall as neu_weight_sum_lost.

◆ neu_adjust_n0

logical neu_module::neu_adjust_n0 =.true.

whether to update the base neutral density. If true, a provisional ionization rate (everywhere proportional to the local neutral density) is rescaled to match the global particle sink from the sheath module times neu_recycle_rate. .false. fixed n0, .true. varying n0 - neu_recycle_rate should be specified.

◆ neu_background_period

integer neu_module::neu_background_period =500

Period between subsequent updates of the background neutral distribution function in ion time steps. In any case, the density renormalization and source rates are recalculated every timestep for a fixed normalized neutral profile.

◆ neu_base_den

real (kind=8) neu_module::neu_base_den

Base multiplier for the neutral density. Uses neu_n0.

◆ neu_d2_first_wall_idx

integer neu_module::neu_d2_first_wall_idx

Index of wall_nodes_ordered that the DEGAS2 setup uses as the first one.

◆ neu_d2_n0

real (kind=8), dimension(:,:), allocatable neu_module::neu_d2_n0

DEGAS2-predicted neutral density.

◆ neu_d2_nsp_neut

integer neu_module::neu_d2_nsp_neut = 1

Number of neutral species in the DEGAS2 problem file, including the geometric dummy species '0'. The first nontrivial species is the one whose density and temperature will be calculated.

◆ neu_d2_nsp_plas

integer neu_module::neu_d2_nsp_plas = 2

Number of plasma species in the DEGAS2 problem file. Unlikely to change without more data.

◆ neu_d2_ran_idx

integer neu_module::neu_d2_ran_idx

◆ neu_d2_ran_k

integer neu_module::neu_d2_ran_k =100

The ran_k parameter from DEGAS2's random.hweb. Unlikely to change.

◆ neu_d2_rand_array

real (kind=8), dimension(:), allocatable neu_module::neu_d2_rand_array

An array for random numbers in DEGAS2.

◆ neu_d2_sources

real (kind=8), dimension(:,:,:), allocatable neu_module::neu_d2_sources

DEGAS2-predicted sources for each species from neutral interactions.

◆ neu_d2_sourcetot

real (kind=8), dimension(:,:), allocatable neu_module::neu_d2_sourcetot

DEGAS2-predicted sources integrated over whole volume.

◆ neu_d2_sp_map

integer, dimension(:), allocatable neu_module::neu_d2_sp_map

Mapping of species indexing between XGC and DEGAS2.

◆ neu_d2_t0

real (kind=8), dimension(:,:), allocatable neu_module::neu_d2_t0

DEGAS2-predicted neutral temperature.

◆ neu_d2_v0

real (kind=8), dimension(:,:,:), allocatable neu_module::neu_d2_v0

DEGAS2-predicted neutral velocity.

◆ neu_degas2

logical neu_module::neu_degas2 =.false.

Use DEGAS2 for the neutral Monte Carlo calculation.

◆ neu_delta_n

real (kind=8) neu_module::neu_delta_n =10D0

Multiple of base neutral density at the peak position. When neu_source_match_flux=.false., determines the shape of the poloidal neutral source distribution. At large neu_delta_n, it approaches a Gaussian. neu_delta_n=1.0 corresponds to a uniform neutral source.

◆ neu_delta_theta

real (kind=8) neu_module::neu_delta_theta =0.5235987756

Width of the peak of the neutral source for neu_source_match_flux=.false. - 30/180 * pi.

◆ neu_dt

real (kind=8) neu_module::neu_dt

Timestep size for the neutral Monte Carlo steps. If not provided, a default value of 2e-3*sml_dt/sqrt(neu_temp0*1e-3) is used.

◆ neu_ebin_delta

real (kind=8) neu_module::neu_ebin_delta

Number of energy bins to use for neutral source.

◆ neu_ebin_log

logical neu_module::neu_ebin_log = .false.

Whether recycling energy bins are logarithmcially spaced.

◆ neu_ebin_max

real (kind=8) neu_module::neu_ebin_max =13.0

Lower bound of the smallest energy bin (in eV)

◆ neu_ebin_min

real (kind=8) neu_module::neu_ebin_min =3.0

Lower bound of the smallest energy bin (in eV)

◆ neu_ebin_num

integer neu_module::neu_ebin_num =10

Number of energy bins to use for neutral source.

◆ neu_ebins

real (kind=8), dimension(:), allocatable neu_module::neu_ebins

◆ neu_enforce_no_neutral

logical neu_module::neu_enforce_no_neutral =.false.

Forced off-switch for the neutral recycling routine (needed for radiation cooling!)

◆ neu_exclude_private

logical neu_module::neu_exclude_private =.false.

Exclude the privat region from neutral recycling.

◆ neu_gas_puff_segment

integer neu_module::neu_gas_puff_segment = -1

Index of wall_nodes_ordered from which neu_gas_puff_source is produced.

◆ neu_gas_puff_source

real (kind=8) neu_module::neu_gas_puff_source = -1.0

Source of additional neutrals in particles/s. Disables neu_adjust_n0. Also, puffed neutrals enter at the lowest energy bin.

◆ neu_inpsi

real (kind=8) neu_module::neu_inpsi =0.7D0

Inner boundary for neutral fueling calculation (normalized pol. flux)

◆ neu_istep_max

integer neu_module::neu_istep_max =20000

Maximum number of neutral push time steps.

◆ neu_lost_rate_max

real (kind=8) neu_module::neu_lost_rate_max =5D23

upper cutoff on the particle loss rate (particles/sec)

◆ neu_n0

real (kind=8) neu_module::neu_n0 =5.0D17

m^-3 -> nomalized unit, Realistic initial value for neu_base_den (=base neutral density). For cases where neu_adjust_n0=false, this provides a baseline density to use. When neu_adjust_n0=true, neu_base_den is still calculated and reported in the stdout log, but has no effect on the physics.

◆ neu_nbirth

integer neu_module::neu_nbirth

Number of birth locations. Currently gridnwall.

◆ neu_nnode

integer neu_module::neu_nnode

Number of nodes in neutral solution volume. Currently gridnnode.

◆ neu_node_dens

real (kind=8), dimension(:), pointer neu_module::neu_node_dens

Normalized neutral density.

◆ neu_node_esum

real (kind=8), dimension(:), allocatable neu_module::neu_node_esum

Weight sum for avg. neutral energy calculation.

◆ neu_node_flow

real (kind=8), dimension(:), allocatable neu_module::neu_node_flow

Neutral bulk flow.

◆ neu_node_numsum

real (kind=8), dimension(:), allocatable neu_module::neu_node_numsum

Weight sum for neutral number calculation.

◆ neu_node_relstd

real (kind=8), dimension(:), allocatable neu_module::neu_node_relstd

Neutral weight standard deviation.

◆ neu_node_temp

real (kind=8), dimension(:), pointer neu_module::neu_node_temp

Neutral temperature.

◆ neu_node_varsum

real (kind=8), dimension(:), allocatable neu_module::neu_node_varsum

Weight sum for weight variance calculation.

◆ neu_node_vol

real (kind=8), dimension(:), allocatable neu_module::neu_node_vol

Neutral cell volume.

◆ neu_node_vsum

real (kind=8), dimension(:), allocatable neu_module::neu_node_vsum

Weight sum for neutral bulk flow calculation.

◆ neu_node_wsum

real (kind=8), dimension(:), allocatable neu_module::neu_node_wsum

Weight sum for neutral density calculation.

◆ neu_norm_baseden_ebins

real (kind=8), dimension(:,:), allocatable neu_module::neu_norm_baseden_ebins

Holds normalized neutral density from ion flux to wall, energy binned.

◆ neu_num

integer neu_module::neu_num =10000

Number of neutral particles per thread per wall segment. If neu_degas2=.true., this is the number of neutral particles per thread.

◆ neu_peak_theta

real (kind=8) neu_module::neu_peak_theta =-99D0

Poloidal angle at which the neutral source is peak for neu_source_match_flux=.false.

◆ neu_rbirth

real (kind=8), dimension(:), allocatable neu_module::neu_rbirth

◆ neu_recycle_rate

real (kind=8) neu_module::neu_recycle_rate =0.9D0

Fraction of lost ions that are recycled as neutrals. The ions lost to the wall as calculated in the sheath module are used to determine the global particle sink. Neutrals are produced at a rate of neu_recycle_rate*neu_sum_weight_lost (in particles per second). Has no effect if neu_adjust_n0=false.

◆ neu_source_match_flux

logical neu_module::neu_source_match_flux =.true.

If true, the neutral source around the limiter is determined from the local ion sink. If false, the neutral source is given an analytic poloidal dependence.

◆ neu_temp0

real (kind=8) neu_module::neu_temp0 =3D0

Neutral temperature boundary condition.

◆ neu_theta_x

real (kind=8) neu_module::neu_theta_x = -99D0

◆ neu_tot_accum_time

integer neu_module::neu_tot_accum_time =0

Integer number of timesteps over which the recycling profile has been building over neu_background_period timesteps.

◆ neu_wall_source

real (kind=8), dimension(:), allocatable neu_module::neu_wall_source

Source of neutrals around limiter.

◆ neu_wall_source_ebins

real (kind=8), dimension(:,:), allocatable neu_module::neu_wall_source_ebins

Source of neutrals around limiter.

◆ neu_weight_lost_ebins

real (kind=8), dimension(:,:), pointer neu_module::neu_weight_lost_ebins

Local number of ions lost to the wall.

◆ neu_weight_lost_max

real (kind=8) neu_module::neu_weight_lost_max = 5D23

upper cutoff on the number of lost particles

◆ neu_weight_sum_lost

real (kind=8), dimension(:), pointer neu_module::neu_weight_sum_lost

Global number of ions lost to the wall.

◆ neu_weight_wall_lost

real (kind=8), dimension(:), pointer neu_module::neu_weight_wall_lost

Local number of ions lost to the wall.

◆ neu_zbirth

real (kind=8), dimension(:), allocatable neu_module::neu_zbirth

(R,Z) coordinates of the neutral birth surface