XGCa
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Attributes | List of all members
sml_module Module Reference

Public Attributes

integer sml_comm
 Global MPI communicator within an XGC instance. More...
 
integer sml_comm_world
 Global communicator between separate XGC instances (or XGC-GENE, XGC-GEM –> code-coupling) after MPI_COMM_WORLD split. More...
 
integer sml_comm_null
 MPI_COMM_NULL communicator for adios posix method. More...
 
integer sml_comm_self
 MPI_COMM_SELF communicator for single-process adios2 outputs. More...
 
integer sml_comm_color
 Communicator color (used for mpi split/code-coupling). Set by my_mpi_init call. More...
 
integer sml_mype
 Processor index, 0 - (# of MPI ranks -1) More...
 
integer sml_totalpe
 Total number of processors (must be > (2*sml_grid_nrho)*sml_nphi_total) More...
 
integer sml_nthreads
 Total number of OpenMP threads per process. More...
 
integer sml_mstep = 10
 Total number of time steps for simulation. More...
 
integer sml_istep = 0
 Current time step number (counting only the current simulation) More...
 
integer sml_gstep
 Global time step (counting the current + all previous runs in case of restarts) More...
 
integer sml_ipc
 2nd order Runge-Kutta index, or predictor-corrector index More...
 
integer sml_epc
 (Obsolete) 2nd order Runge-Kutta index, or predictor-corrector index for electrons More...
 
real(8) sml_time
 Simulation time in seconds. More...
 
real(8) sml_time0
 Initial time for PETSc TS solver in seconds. More...
 
real(8) sml_dt = 2D-3
 Time step size in units of the toroidal ion transit time \(\tau_T = 2\pi R_{ax} / \sqrt{2 E_{norm}/m_i}\), where \(E_{norm}\) is a reference energy set with sml_en_order_keV (in keV) \(\Rightarrow\,E_{norm} = \text{sml_en_order_keV}\, 10^{3} e\). The default value of sml_en_order is 0.2 keV. More...
 
logical sml_plane_major =.false.
 MPI task ordering to use when mapping to 2D virtual processor grid. .true. for consecutive within plane; .false. for consecutive between planes. More...
 
logical sml_deltaf = .true.
 delta-f switch: .false. for off, .true. for on. Total-f mode uses delta-f particles –> default is .true. More...
 
logical sml_deltaf_elec = .true.
 delta-f switch: .false. for off, .true. for on. Total-f mode uses delta-f particles –> default is .true. More...
 
logical sml_drift_on =.true.
 Whether drifts are active in the equations of motion. Set .false. for tracing field lines or Poincare plots. More...
 
logical sml_debug_flag = .false.
 Switch for some debugging statements. More...
 
logical sml_dwdt_exb_only = .true.
 Switch for classical delta-f weight evolution equation (i.e. not for total-f mode, must compile with DELTAF_CONV=ON): .false. to include all drifts (grad(B), curl(b),and ExB), .true. for ExB only. More...
 
logical sml_dwdt_fix_bg = .false.
 Switch for classical delta-f weight evolution equation (i.e. not for total-f mode, must compile with DELTAF_CONV=ON): .false. for (1-w) pre-factor, .true. for (1) pre-factor. default is .false. More...
 
real(8) sml_marker_temp_factor = 1D0
 Initial loading with Maxwellian marker distribution with virtual temperature \(T_{marker} = \alpha*T_{plasma}\) (only if sml_flat_marker=.false.). More...
 
real(8) sml_marker_min_temp = 1D1
 minimum temperature of markers (only if sml_flat_marker=.false.) More...
 
real(8) sml_marker_temp_factor2 =1D0
 perp temperature factor (only if sml_flat_marker=.false.) More...
 
real(8) sml_marker_temp_factor3 =1D0
 low mu fill temperature (only if sml_flat_marker=.false.) More...
 
real(8) sml_low_mu_fill_population = 0D0
 Used for filling the low-mu range of velocity space if sml_marker_temp_factor3>1 0.0 –> all markers in low-mu range, 1.0 –> no low-mu filling (only if sml_flat_marker=.false.) More...
 
logical sml_flat_marker = .true.
 Use flat marker distribution function when set to .true. Marker distribution g is constant up to v<= sml_flat_marker_decay_start[1/2] and decays exponentially from there up to v<= sml_flat_marker_cutoff. The decay length is sml_flat_marker_width. More...
 
real(8) sml_flat_marker_decay_start1 =3.5D0
 Normalized (to \(v_{th}\)) velocity at which the marker distribution decays exponentially. More...
 
real(8) sml_flat_marker_cutoff1 =4D0
 Normalized (to \(v_{th}\)) parallel velocity cutoff of flat marker distribution. More...
 
real(8) sml_flat_marker_width1 =0.5D0
 Decay length of flat marker distribution in the normalized (to \(v_{th}\)) parallel velocity. More...
 
real(8) sml_flat_marker_decay_start2 =3.5D0
 Like sml_flat_marker_decay_start1 but for the perpendicular velocity. More...
 
real(8) sml_flat_marker_cutoff2 =4D0
 Like sml_flat_marker_cutoff1 but for the perpendicular velocity. More...
 
real(8) sml_flat_marker_width2 =0.5D0
 Like sml_flat_marker_width1 but for the perpendicular velocity. More...
 
logical sml_use_loading_factor =.false.
 Marker particle distribution taking into account the local (configuration space) node volume, i.e. aim for uniform number of ptl/mesh vertex. Set .true. when using a mesh with very non-uniform resolution. More...
 
real(kind=8) sml_min_loading_factor =1D-1
 Lower limit for loading factor (default is conservative, might need lower value; lower values increase time for loading) More...
 
real(kind=8) sml_max_loading_factor =1D1
 Upper limit for loading factor (default is conservative, might need higher value) More...
 
real(kind=8) sml_load_nptl
 Avg. number of ptl/vertex. More...
 
real(kind=8) sml_load_den_uni
 Marker density for uniform loading. More...
 
logical sml_limit_marker_den =.false.
 Switch for limiting the marker density in the private region to sml_limit_marker_den_fac of the target number of markers/vertex (mainly for RMP!) More...
 
real(kind=8) sml_limit_marker_den_fac =5D0
 Threshold for removing excess particles in multiples of the target # of ptl/vertex when sml_limit_marker_den=.true. More...
 
logical sml_initial_flow =.false.
 Set .true. for non-zero initial toroidal rotation flow (must set parameters eq_flowi_XXX and eq_flowe_XXX) More...
 
logical sml_concentric =.false.
 (Partially obsolete) Simulation for concentric circular geometry –> would only control behavior of bounce boundary condition in XGC_core/bounce.F90, but that part is commented out at this time More...
 
logical sml_read_eq =.true.
 Read B-field profile from an eqd-file. More...
 
logical sml_read_eq_m3dc1 =.false.
 Read B-field profile from M3D-C1 output file –> overrides sml_read_eq. More...
 
logical sml_field_aligned_initial =.false.
 Use field aligned initial condition. More...
 
real(8), parameter sml_2pi = 6.2831853071795862D0
 2 Pi More...
 
real(8), parameter sml_pi = 3.1415926535897931D0
 Pi. More...
 
real(8), parameter sml_sqrtpi = 1.7724538509055158D0
 Sqrt(Pi) More...
 
real(8), parameter sml_sqrt2pi = 2.5066282746310002D0
 Sqrt(2Pi) More...
 
real(8) sml_2pi_wedge_n
 Toroidal angle spanned by the wedge simulated by the code –> \(\text{sml_2pi_wedge_n}=2\pi/\text{sml_wedge_n}\). More...
 
real(8), parameter sml_e_charge =1.6022D-19
 elementary charge in C (MKS) More...
 
real(8), parameter sml_epsilon0 =8.8542D-12
 permittivity of free space in F/m (MKS) More...
 
real(8), parameter sml_prot_mass =1.6720D-27
 proton mass in kg (MKS) More...
 
real(8), parameter sml_elec_mass =9.1094D-31
 electron mass in kg (MKS) More...
 
real(8), parameter sml_mu0 =1.2566370614D-6
 Magnetic vacuum permeability in H/m (MKS) More...
 
real(8), parameter sml_ev2j =sml_e_charge
 Conversion factor from eV to J. More...
 
real(8), parameter sml_j2ev =1D0/sml_e_charge
 Conversion factor from J to eV. More...
 
integer, parameter sml_nrk = 2
 Order of Runge-Kutta time integration of particles + fields. More...
 
integer sml_veclen =32
 (Obsolete) Vectorization length, used in defunct AVX512 vectorized electron push kernel More...
 
integer sml_bounce =0
 Bounce routine switch 0 for off, 1 for inner boundary, 2 for both boundaries. More...
 
real(8) sml_bounce_buffer =0D0
 Buffer width between sml_outpsi and where the particle actually bounces (must be >=0) More...
 
logical sml_restart =.false.
 
logical restarting
 
logical simulation
 
logical switch
 
logical false
 
logical for
 
logical new
 
logical run
 
logical true
 
logical restart
 
integer sml_run_count
 Run count for continued simulations: 1 for fresh start and 2, 3, 4, ... for restarted simulations. More...
 
logical sml_invert_b =.false.
 Invert the direction of the equilibrium (see sml_co_cur_bt for more details) magnetic field. More...
 
logical sml_co_cur_bt =.true.
 Whether the toroidal magnetic field is in co-current direction (.true.) or counter-current direction (.false.). The default is that the plasma current is in counter-clockwise direction looking on the torus from above. The corresponding direction of the poloidal field is given by the right-hand rule. More...
 
real(8) sml_bp_sign
 (not an input) -1 for inverted B, +1 for normal B <– given by sml_invert_B More...
 
real(8) sml_bt_sign
 (not an input) -bp_sign for co-current B_t, bp_sign for couter-current B_t <- given by sml_co_curr_bt More...
 
integer sml_monte_num =10000
 Number of samples for Monte-Carlo volume calculation. It should be greater than particle number for correct simulation. More...
 
real(8) sml_bd_min_r =1D-4
 Simulation boundary in R-Z space (in m) More...
 
real(8) sml_bd_max_r =1D3
 Simulation boundary in R-Z space (in m) More...
 
real(8) sml_bd_min_z =-1D3
 Simulation boundary in R-Z space (in m) More...
 
real(8) sml_bd_max_z =1D3
 Simulation boundary in R-Z space (in m) More...
 
real(8) sml_marker_den
 Marker density. Used for (uniform) loading and initial weight calculation. More...
 
real(8), dimension(:,:),
allocatable 
sml_marker_den2
 Triangle based marker density. More...
 
real(8) sml_inpsi =0D0
 Inner boundary for initial loading and other routines (e.g. solvers, bounce, ...); normalized poloidal flux (0 on axis, 1 on separatrix) More...
 
real(8) sml_outpsi =1.05D0
 Outer boundary for initial loading and other routines (e.g. solvers, bounce, ...); normalized poloidal flux (0 on axis, 1 on separatrix) More...
 
real(8) sml_outpsi_priv1 =0.97D0
 Outer boundary (for Poisson solver), normalized poloidal flux. More...
 
real(8) sml_outpsi_priv2 =2.0D0
 Outer boundary (for Poisson solver, 2nd private region), normalized poloidal flux. More...
 
integer sml_restart_write_period
 Number of time steps between checkpoint dumps. More...
 
real(8) sml_en_order_kev =0.2D0
 Characteristic ion energy (keV) –> controls reference time (toroidal ion transit time) More...
 
real(8) sml_en_order
 (not an input) Characteristic ion energy in normalized unit More...
 
real(8) sml_tran
 Torodial transit time of an ion with the characteristic energy. More...
 
integer sml_machine
 Machine type (sets predefined values for sml_[min/max]_[r/z]) –> (1) DIII-D, (2) NSTX, (3) Alcator C-Mod, (4) ASDEX-Upgrade, all other values: set boundaries automatically from eqd-file. More...
 
integer sml_special =0
 Switch for special simulation: (0) normal, (1) single particle simulation, (4) Poincare plot. More...
 
real(8) sml_bp_mult
 Artificial multiplication of poloidal B-field. More...
 
real(8) sml_bt_mult
 Artificial multiplication of toroidal B-field. More...
 
integer, parameter sml_nlarmor =4
 Number of points used in gyroaverage. This is used only for calculating the electron background density in simulations with adiabatic electrons and in the direct evaluation of the (obsolete) flux-surface averaged ion gyrocenter and electron charge density. More...
 
integer sml_nphi_total
 Number of poloidal planes (= toroidal grid size) More...
 
integer sml_nphi_2pi
 In wedge simulations (sml_wegde_n>1): Number of poloidal planes in full torus. More...
 
integer sml_ff_step =2
 Number of steps for field-following search/mapping (default=2) (set to 0 to let XGC decide) More...
 
integer sml_ff_order =4
 Order of RK method used for field-following search/mapping (default=4) (set to 0 to let XGC decide) More...
 
integer, parameter sml_wedge_n =1
 XGCa simulations are always full torus simulations. More...
 
logical sml_no_turb =.false.
 Set all non-axisymmetric field perturbations to zero (electromagnetic version only) More...
 
logical sml_turb_efield =.true.
 E-field calculated only with \(<\phi>\) if .false. psndpot will still contain all (n=0,|m|>0) and (|n|>0,m) modes. More...
 
logical sml_turb_poisson =.true.
 Non-axisymmetric Poisson equation not solved if .false. More...
 
logical sml_turb_poisson_n0_only =.false.
 Keep only the axisymmetric potential (n=0,|m|>0) in psndpot. More...
 
logical sml_00_efield =.true.
 Flux-surface averaged potential not used for calculating the electric field if .false. More...
 
logical sml_00_poisson =.true.
 Flux-surface averaged Poisson equation not solved if .false. More...
 
real(8) sml_gradpsi_limit =1D-3
 If \(|\nabla\psi|\) is smaller than this threshold, \(\nabla\psi\) is computed \((R,Z)\) coordinates instead of \((\hat{\boldsymbol{\psi}}\cdot\nabla,\hat{\boldsymbol{\theta}}^\ast)\cdot\nabla\) even if sml_grad_psitheta is .true. More...
 
integer sml_grid_nrho =6
 Size of the gyroradius grid (should be such that the resolution is >= 0.5 rho_i) More...
 
real(8) sml_rhomax =1D-2
 Upper cutoff of the gyroradius grid (should be the gyroradius of the fastest ions of interest) More...
 
logical sml_tri_psi_weighting =.true.
 Use modified triangle shape functions (Useful for coarse meshes in XGCa when straight element edges do not represent the curved flux-surfaces well. More...
 
logical sml_grad_psitheta
 If .true., gradiant operator is calculated as \((\hat{\boldsymbol{\psi}}\cdot\nabla,\hat{\boldsymbol{\theta}}^\ast)\cdot\nabla\) instead of \((R,Z)\) coordinates. More...
 
logical sml_node_vol_monte
 Calculate node volume using Monte-Carlo method (true), or analytic method (false) More...
 
integer, parameter sml_nhybrid =2
 Number of iterations in electrostatic electron weight evolution scheme This used to be an input variable but is now a parameter (sml_nhybrid=2) because a value of 2 was the only workable value. It implies a two-step Poisson solve (adiabatic electron solve -> electron weight update -> kinetic electron solve) More...
 
integer sml_ncycle_half =30
 Half the number of electron substeps per ion time step. Should be larger than \(\sqrt{m_i/m_e}/2\). For electrostatic simulation this should be divisible by 5. More...
 
logical sml_f0_grid =.true.
 Switch for total-f simulation (roughly: include \(\boldsymbol{v}_D\cdot(\partial f_0/\partial \boldsymbol{x})\) in the weight evolution equation. Enables use of 5D phase space grid for particle noise control (use sml_f0_grid_alpha>0). More...
 
integer sml_f0_grid_lbal_period =0
 Force periodic update of the domain decomposition every sml_f0_grid_lbal_period time steps. When set to zero, the domain decomposition is adjusted only when the load imbalance exceeds its thresholds. More...
 
real(8) sml_f0_grid_max_ptl_imbal =2D0
 Upper threshold for the particle load imbalance (typically ~1.3). More...
 
real(8) sml_f0_grid_min_ptl_imbal =1D0
 Lower threshold for the particle load imbalance. More...
 
real(8) sml_f0_grid_init_ptl_imbal =1D0
 Initial particle load imbalance. More...
 
integer sml_f0_nmu_decomp =1
 (Not operational!) Parameter to control the decomposition of the velocity space grid in the \(v_\perp\) direction. 1 means no decomposition. More...
 
real(8) sml_f0_grid_alpha =0D0
 Fraction of the particle weight that is transferred to the background distribution function (particle noise control) every sml_f_source_period time steps. As a rule of thumb, sml_f0_grid_alpha=sml_dt*sml_f_source_period can be used. More...
 
integer sml_f0_grid_alpha_start =1
 For delayed onset of total-f particle noise control. (must be >=1) Values >1 cause a linear ramp-up of sml_f0_grid_alpha from 0 to its input value from time step 1 to sml_f0_grid_alpha_start. More...
 
integer sml_deltaf_f0_mode =-1
 For classical delta-f: Use fixed gradient scale lengths (-1), use actual profiles (-2) More...
 
real(8) sml_f0_1_ln =2.22D0
 Normalized density gradient scale length \(R_{ax}/L_n\). More...
 
real(8) sml_f0_1_lt =6.92D0
 Normalized ion temperature gradient scale length \(R_{ax}/L_{Ti}\). More...
 
real(8) sml_f0_1_lt_e =6.92D0
 Normalized electron temperature gradient scale length \(R_{ax}/L_{Te}\). More...
 
logical sml_symmetric_f0g =.false.
 Enforce axisymmetry only in f0g (used only in XGC1 fluid-kinetic hybrid method; -DHYB_EM=ON) More...
 
logical sml_symmetric_f =.true.
 Enforce axisymmetry of the total distribution function on the grid. More...
 
integer sml_f_source_period =1
 Run source routines (collisions, neutral recycling, etc.) every sml_f_source_period time steps. More...
 
real(8) sml_inv_f_source_period
 (Not an input) Inverse of sml_f_source_period More...
 
logical sml_no_fp_in_f =.false.
 If .true. the distribution function used for the source routines will not include particle information (only for testing) More...
 
character(len=65) sml_node_file ="neo10.1.node"
 Unstructured mesh data: node-file. More...
 
character(len=65) sml_ele_file ="neo10.1.node"
 Unstructured mesh data: ele-file. More...
 
character(len=65) sml_surf_file ="dummy"
 Unstructured mesh data: flx-file. More...
 
integer sml_sep_surf_index =99999
 Index of the inner separatrix surface in the flux-surface data (from sml_surf_file if compiled with -DNEW_FLX_AIF=ON) More...
 
integer sml_sep2_surf_index =99999
 Index of the outer separatrix surface in the flux-surface data (from sml_surf_file if compiled with -DNEW_FLX_AIF=ON) More...
 
integer sml_nsurf3 =0
 Number of flux-surfaces in the private flux region (from sml_surf_file if compiled with -DNEW_FLX_AIF=ON) More...
 
integer sml_nsurf3_2 =0
 Number of flux-surfaces in the second private flux region (from sml_surf_file if compiled with -DNEW_FLX_AIF=ON) More...
 
integer sml_plane_per_pe
 Number of poloidal planes per MPI rank (typically 1) More...
 
integer sml_pe_per_plane
 Number of MPI ranks per poloidal plane (>=2*sml_grid_nrho) More...
 
integer sml_adios_group
 Adios MPI group. More...
 
integer sml_adios_comm
 Adios communicator. More...
 
logical adios_stage_restart = .FALSE.
 Enable/disable Adios stage mode for xgc.restart. More...
 
logical adios_stage_restartf0 = .FALSE.
 Enable/disable Adios stage mode for xgc.restartf0. More...
 
logical adios_stage_f0 = .TRUE.
 Enable/disable Adios stage mode for xgc.f0. More...
 
logical adios_stage_particle = .FALSE.
 Enable/disable Adios stage mode for xgc.particle. More...
 
logical adios_stage_3d = .FALSE.
 Enable/disable Adios stage mode for xgc.3d. More...
 
integer adios_stage_f0_max = 10
 Maximum numbrer of steps for Adios xgc.f0 stage write. More...
 
integer sml_plane_group
 MPI group for all MPI ranks assigned to the same poloidal plane. More...
 
integer sml_plane_comm
 Communicator for all MPI ranks assigned to the same poloidal plane. More...
 
integer sml_plane_totalpe
 Total number of MPI ranks assigned to a poloidal plane. More...
 
integer sml_plane_mype
 MPI rank index within sml_plane_comm. More...
 
integer sml_plane_index
 Index of the poloidal plane to which an MPI rank is assigned (0...sml_nphi_total-1) More...
 
integer sml_intpl_group
 MPI group for all MPI ranks assigned to the same (R,Z) patch. More...
 
integer sml_intpl_comm
 Communicator for all MPI ranks assigned to the same (R,Z) patch (toroidal communication) More...
 
integer sml_intpl_totalpe
 Total number of MPI ranks within sml_intpl_comm. More...
 
integer sml_intpl_mype
 MPI rank index within sml_intpl_comm. More...
 
logical sml_electron_on =.false.
 Whether to run with adiabatic (.false.) or kinetic (.true.) electrons. More...
 
logical sml_flat_electron_density =.false.
 In case of adiabatic electrons, whether to use a uniform electron background density. More...
 
integer sml_guess_table_size =500
 Size of the hash table used to narrow down the number of triangles in which to search a particle. More...
 
real(8) sml_initial_deltaf_noise =1D-3
 Delta-f particle weights are initialized with this level of noise. More...
 
logical sml_zero_inner_bd =.false.
 If .true., use Dirichlet boundary condition \(\phi=0\) for axisymmetric Poisson solver. More...
 
integer sml_mode_select_mode = 0
 Fourier filter mode: 0) No filter, 1) single-n, 2) single-n, resonant m (+/- mres) 3) single-n, m-range (-mmax..mmin) and (mmin..mmax) 4) m_range (mmin..mmax) 5) n range + resonant m 6) n range + m range. More...
 
integer sml_mode_select_n = 1
 Toroidal mode number for Fourier filter. More...
 
integer sml_mode_select_mmin = 0
 Lowest pol. mode number for Fourier filter. More...
 
integer sml_mode_select_mmax = 25
 Highest pol. mode number for Fourier filter. More...
 
integer sml_mode_select_nmin = 1
 Lowest numerical tor. mode number for Fourier filter (0,1,...,sml_nphi_total-1) More...
 
integer sml_mode_select_nmax = 1
 Highest numerical tor. mode number for Fourier filter (0,1,...,sml_nphi_total-1) More...
 
integer sml_mode_select_nmin_real = 0
 Lowest real toroidal mode number for FFT filter (n_real = (n_num+(i-1)*sml_nphi_total)*sml_wedge_n), max. i depending on mesh resolution. More...
 
integer sml_mode_select_nmax_real = 999
 Highest real toroidal mode number for FFT filter (n_real = (n_num+(i-1)*sml_nphi_total)*sml_wedge_n), max. i depending on mesh resolution. More...
 
integer sml_mode_select_mres = 5
 number of pol. mode numbers around the resonant mode; mres=3 –> m = nq-1, nq, nq+1, etc. More...
 
integer sml_mode_select_cutoff = 2
 Factor for cutoff in Fourier space, determines gridm_max_surf(i) The default is the Nyquist limit sml_mode_select_cutoff=2. More...
 
integer sml_mode_select_period = 1
 Implicit solver: number of time steps after which to leave the PETSc solver and apply the mode filter; sml_mstep should be a multiple of this parameter. More...
 
real(kind=8) sml_mode_select_inpsi = -0.1D0
 inner boundary for mode selection More...
 
real(kind=8) sml_mode_select_outpsi = 10.0D0
 outer boundary for mode selection More...
 
real(kind=8) sml_mode_select_bd_width = 0.01D0
 width of boundary envelope More...
 
real(kind=8) sml_mode_select_psitol = 5D-5
 psi tolerance (in SI-units –> Wb) for the identification of flux-surfaces More...
 
real(kind=8) sml_mode_select_max_kth_rho = 1.0D0
 Max. k_theta*rhoi retained in poloidal Fourier filter. More...
 
logical sml_mode_select_bands_on = .false.
 Determine the number of side bands to include by using gridm_max_surf(i) More...
 
logical sml_mode_select_div_mix = .true.
 Whether to blend filtered and unfiltered data near the divertor plates (set .false. for increasing stability in EM simulations) More...
 
logical sml_mode_select_no_m0 = .true.
 filter out m=0 mode while field-following FFT filtering. (fourier_filter_n_m_range_parallel) More...
 
integer sml_mode_select_sol_mode = 0
 0: Retain sine and cosine modes in SOL but use a window function 1: Retain only sine modes in SOL and don't use a window function (Applies only to filter modes sml_mode_select_mode={5,6}!) More...
 
real(8) sml_bd_ext_delta1 =0.01
 Outward shift of the inner boundary of the axisymmetric Poisson solver relative to sml_inpsi (in norm. pol. flux) More...
 
real(8) sml_bd_ext_delta2 =0.02
 Outward shift of the inner boundary of the RHS of the axisymmetric Poisson solver relative to sml_inpsi (in norm. pol. flux) More...
 
real(8) sml_bd_ext_delta3 =0.01
 Inward shift of the outer boundary of the axisymmetric Poisson solver relative to sml_outpsi (in norm. pol. flux) More...
 
real(8) sml_bd_ext_delta4 =0.02
 Inward shift of the outer boundary of the RHS of the axisymmetric Poisson solver relative to sml_outpsi (in norm. pol. flux) More...
 
real(8) sml_bd_ext_delta1h =0.01
 Outward shift of the inner boundary of the non-axisymmetric Poisson solver relative to sml_inpsi (in norm. pol. flux) More...
 
real(8) sml_bd_ext_delta2h =0.02
 Outward shift of the inner boundary of the RHS of the non-axisymmetric Poisson solver relative to sml_inpsi (in norm. pol. flux) More...
 
real(8) sml_bd_ext_delta3h =0.01
 Inward shift of the outer boundary of the non-axisymmetric Poisson solver relative to sml_outpsi (in norm. pol. flux) More...
 
real(8) sml_bd_ext_delta4h =0.02
 Inward shift of the outer boundary of the RHS of the non-axisymmetric Poisson solver relative to sml_outpsi (in norm. pol. flux) More...
 
real(8) sml_dpot_bd_width = 0.02D0
 Decay length (normalized flux) for (n=0,m>0) potential towards the magnetic axis. More...
 
logical sml_dpot_bd_apply = .false.
 Damp (n=0,m>0) potential towards the magnetic axis. More...
 
real(8), parameter sml_bd_ext_near_wall =0D0
 To move the outer boundary of the Poisson solver away from the inner wall (in m) More...
 
character(len=65) sml_input_file_dir
 Path to the magnetic equilibrium, mesh and profile files (max. 65 characters) More...
 
integer sml_bounce_zero_weight
 If ==1, set particle weights to zero after bouncing from the outer boundary if the bounce boundary condition is active (sml_bounce>0) More...
 
logical sml_update_poisson_solver =.false.
 If .true. density and temperature in the Poisson solver operators will be updated every sml_update_poisson_solver_nstep time steps. More...
 
integer sml_update_poisson_solver_nstep =1
 Number of time steps between subsequent updates of the Poisson solver operators. More...
 
logical sml_update_ampere_solver =.false.
 If .true. density and temperature in the Ampere's law solver operators will be updated every sml_update_ampere_solver_nstep time steps. More...
 
integer sml_update_ampere_solver_nstep =1
 Number of time steps between subsequent updates of the Ampere's law solver operators. More...
 
logical sml_poisson00_diag_mass
 False: use normal mass matrix, true: use diagonal (lumped) mass matrix in 00-mode Poisson solver. More...
 
logical sml_poisson_use_bc
 False: 00-bc is phi=0 everywhere; true: 00-boundary is the wall with bc phi_bd=phi_sheath. More...
 
logical sml_poisson_cylindrical_jac =.false.
 Whether to use the cylindrical Jacobian in the Poisson solver or not. More...
 
logical sml_poisson_bias =.false.
 Whether to use a (0,0) bias potential on top of phi_00. More...
 
real(8) sml_poisson_bias_psic = 0.50D0
 Center position of bias potential phi_bia ~ exp(-(psi-psi0)^2), psi_normalized. More...
 
real(8) sml_poisson_bias_psiw = 0.02D0
 Decay length of the radial envelope of the bias potential. More...
 
real(8) sml_poisson_bias_freq = 1D4
 Frequency in Hz of the bias potential. More...
 
real(8) sml_poisson_bias_amp = 10D0
 Ampltude of the bias potential in Volt. More...
 
integer sml_poisson_bias_start = 1
 Time step in which the bias potential is started. More...
 
logical sml_use_pade =.false.
 Use Pade approximation for short wavelengths. More...
 
real(8) sml_dpot_te_limit = 64D0
 Limits the magnitude of the Boltzmann term to exp(dphi/T_e) =. More...
 
logical sml_use_simple00 =.false.
 Use simple 1D solver for the flux-surface averaged potential instead of PETSc. More...
 
logical sml_iter_solver =.true.
 For sml_poisson_solver_type=0: Split Poisson equation into axisymmetric and non-axisymmetric parts. The axisymmetric part has the flux-surface averaged potential on the RHS. Solve iteratively by lagging the RHS potential by one iteration. Stop after sml_iter_solver_niter iterations. If .false., split Poisson equation into flux-surface averaged part and rest (assuming that the polarization term commutes with the flux-surface average) and the rest; solve in two steps. More...
 
integer sml_iter_solver_niter =10
 Number of iterations for the iterative axisymmetric Poisson solver. More...
 
integer sml_poisson_solver_type =0
 (0) Simple axisymmetric Poisson solver (single equation) (–> see sml_iter_solver) (1) Linear Poisson equation for the axisymmetric potential (as in sml_iter_solver=.true.) but with constraint equation for the flux-surface averaged potential on the RHS. Solved with Schur complement solver. Much faster and accurate than the iterative solver, but causes instability in simulations with open field-lines. More...
 
integer sml_add_pot0 =0
 Additional electrostatic potential: (0) for off, (1) for reading data from file (2) for simple neoclassical axisymmetric field (not operational) More...
 
logical sml_replace_pot0 =.false.
 If .true., replace Poisson solution with external data, if .false., add external potential to Poisson solution. More...
 
integer sml_add_pot0_mixing_time = 1
 With sml_replace_pot0=.true. this option allows mixing the consistent solution with the imposed potential. At t=0 only the imposed field is used, over sml_add_pot0_mixing_time times steps the mixing factor is ramped down linearly to zero (only consistent field is used) More...
 
character(len=256) sml_add_pot0_file ='pot0.dat'
 Name of the file containing the potential data to replace the consistent solution of the Poisson equation. More...
 
logical sml_exclude_private =.false.
 If .true. the private-flux region is excluded from several aspects of the simulation (e.g., Poisson solver, collisions,...) More...
 
logical sml_exclude_private_turb = .true.
 If .true. the private-flux region has no turbulence. More...
 
integer sml_sheath_mode =0
 Mode of operation of the logical sheath boundary condition (0) off (1) The value of the logical sheath potential is adjusted locally reactively based on the number of ions and electrons that hit the wall in the previous time step. Can use sml_sheath_adjust_factor<1 to reduce noise. (2) Actual logical sheath mode: the number of ions and electrons hitting the wall is recorded, then the sheath potential required to balance ion and electron losses is determined, and only then is decided which electrons actually hit the wall and which were reflected by the sheath potential. The algorithm also tries to achieve a global balance if local balance cannot be achieved. (might need some debugging) More...
 
real(8) sml_sheath_init_pot_factor =2D0
 Initial value of the sheath potential relative to the electron temperature. (for sml_sheath_mode=1) More...
 
logical sml_sheath_init_pot_auto =.false.
 Set initial sheath potential to eq. based on Ti,Te, Maxwellian assumption. More...
 
logical sml_sheath_adjust =.false.
 Constant (.false.) or dynamic (.true.) sheath potential (for sml_sheath_mode=1) More...
 
real(8) sml_sheath_adjust_factor =0.25D0
 Damping factor for slower adjustment of the sheath potential if sml_sheath_mode=1. More...
 
logical sml_rgn1_pot0_only =.false.
 If .true., the axisymmetric Poisson equation is solved only inside the separatrix. More...
 
logical sml_source =.false.
 Switch for heat and torque sources (sources must be configured separately with the parameters in the src_param namelist. More...
 
logical sml_radiation =.false.
 Switch for a simple radiation module using part of the ADAS data base (must be configured with the rad_param namelist) More...
 
logical sml_neutral =.false.
 Switch for neutral recycling module (must be configured with the neu_param namelist) More...
 
logical sml_neutral_use_ion_loss =.false.
 If .true., the charge loss used in the neutral recycling routine is computed from ion gyrocenters instead of electrons. More...
 
logical sml_pol_decomp =.true.
 Switch for the use of radial-poloidal domain decomposition. More...
 
real(8) sml_max_imbalance =1.1D0
 Threshold of the combined particle-mesh load imbalance that triggers an update of the domain decomposition. More...
 
real(8) sml_ptl_imbal_ion =3D0
 Maximal load ion particle imbalance. More...
 
logical sml_00_xz_up =.false.
 Use only \(Z>Z_{xp}\) for flux-surface average calculation (only for -DCONVERT_GRID2=OFF) More...
 
integer, parameter sml_n_vf_diag =9
 Number of diagnostic output quantities from the particle push routine. More...
 
integer sml_00_npsi
 Size of the uniform 1D psi-grid (relevant only for -DCONVERT_GRID2=OFF) More...
 
real(8), parameter sml_load_maxe = 12D0
 Maximum particle energy (wrt the thermal speed) in initial particle distribution (if sml_flat_marker=.true.) More...
 
integer sml_sort_ions =huge(1)
 Ion sorting frequency; the default is to sort only once in the beginning. More...
 
integer sml_elec_shift_max_nthreads =-1
 Particle shift: max_nthreads limits the amount of OpenMP parallelism to exploit. There are no computational reasons to limit the number of threads, but memory requirements increase with the number of threads. If memory is limited, max_nthreads provides a mechanism to control the memory usage. If max_nthreads <=0, then there is no limit. (Expert option; use default unless you know what you are doing) More...
 
logical sml_elec_use_alltoall =.false.
 Particle shift: The first step of the communication algorithm determines the communication pattern. Two options are provided: using mpi_alltoall to communicate this information, or using mpi_allreduce followed by targeted point-to-point messages For this second option, a barrier can also be used to guarantee that all receive requests are posted before the sends commence. This is meant to improve robustness when there are concerns. (Expert option; use default unless you know what you are doing) More...
 
logical sml_elec_use_hs_barrier0 =.false.
 See sml_elec_use_alltoall (Expert option; use default unless you know what you are doing) More...
 
integer sml_elec_large_limit =2048
 Particle shift: The communication algorithm preposts up to 'large_limit' mpi_irecv requests. Performance is generally improved by making large_limit as large as possible (<= 0 implies no limit), but too many outstanding requests can also hurt performance in some circumstances. Note that if the mpi_allreduce option in (b) indicates more than large_limit number of messages being received in the point-to-point phase, then mpi_alltoall is used instead (Expert option; use default unless you know what you are doing) More...
 
logical sml_elec_handshake =.false.
 Particle shift: Due to the irregular communication pattern, some processes can receive many more messages than others. The handshake option forces the sending process to wait to send the information until the receiving process has indicated that it is ready to receive it. This can be important for robustness. By preposting receive requests, the overhead of these extra communications can be controlled. When large_limit <= 0, an alternative is to simply separate the receive and send requests with a barrier request. This can be used in other situations as well, though the motivation is missing (Expert option; use default unless you know what you are doing) More...
 
logical sml_elec_use_hs_barrier1 =.false.
 See sml_elec_handshake (Expert option; use default unless you know what you are doing) More...
 
logical sml_elec_use_sendrecv =.false.
 Particle shift: A complementary way to control the number of messages a single process receives unexpectedly is to use the XOR ordering and a 'logical' sendrecv, i.e. two processes swap messages even if only one them has any data to send. (Expert option; use default unless you know what you are doing) More...
 
logical sml_elec_all_sendrecv =.false.
 Particle shift: An even more extreme option is to force all processes to swap messages even if neither has any data to send to the other. This requires that both use_sendrecv and all_sendrecv be true. Without use_sendrecv, all_sendrecv does nothing of importance (Expert option; use default unless you know what you are doing) More...
 
logical sml_elec_use_isend =.false.
 Particle shift: The communication algorithm uses either mpi_irecv/mpi_send or mpi_irecv/mpi_isend. When using the handshake option, the ready send (mpi_rsend, mpi_irsend) is also an option (Expert option; use default unless you know what you are doing) More...
 
logical sml_elec_use_rsend =.true.
 See sml_elec_use_isend (Expert option; use default unless you know what you are doing) More...
 
integer sml_ion_shift_max_nthreads =-1
 See sml_elec_shift_max_nthreads. More...
 
logical sml_ion_use_alltoall =.false.
 See sml_elec_use_alltoall. More...
 
logical sml_ion_use_hs_barrier0 =.false.
 See sml_elec_use_hs_barrier0. More...
 
integer sml_ion_large_limit =2048
 See sml_elec_large_limit. More...
 
logical sml_ion_handshake =.false.
 See sml_elec_handshake. More...
 
logical sml_ion_use_hs_barrier1 =.false.
 See sml_elec_use_hs_barrier1. More...
 
logical sml_ion_use_sendrecv =.false.
 See sml_elec_use_sendrecv. More...
 
logical sml_ion_all_sendrecv =.false.
 See sml_elec_all_sendrecv. More...
 
logical sml_ion_use_isend =.false.
 See sml_elec_use_isend. More...
 
logical sml_ion_use_rsend =.true.
 sml_elec_use_rsend More...
 
logical, parameter sml_cylindrical =.false.
 Use straight cylinder geometry with periodic boundary conditions along the cylinder axis. More...
 
logical sml_resamp_on = .false.
 Switch for particle resampling (must be configured with resamp_param namelist. More...
 
logical sml_3db_on = .false.
 Switch RMP field on/off –> should replace ptb_3db_on at some point Must be configured with ptb_3db_param namelist. More...
 
logical sml_adjust_eden = .false.
 Switch for adjusting the electron density in the Poisson equation based on the radial particle flux instead of the weight evolution equation. (Experimental, don't use unless you know what you are doing) More...
 
real(8) sml_adj_eden_axis_decay_width = 0.01D0
 width for adjusting factor near axis More...
 
real(8) sml_adj_eden_sep_decay_width = 0.01D0
 width for adjusting factor near separatrix More...
 
real(8) sml_adj_eden_vd_max =1D0
 maximum bulk radial drift of electron (m/s) – you can overestimate x10. More...
 
logical sml_adj_eden_zero_axis =.true.
 Set zero electron density change near axis. More...
 
real(8) sml_adj_eden_obd_psi =1D0
 ??? More...
 
logical sml_adj_eden_include_sol =.true.
 Whether to include the SOL when (sml_adjust_eden=.true.) More...
 
logical sml_info_only = .false.
 If .true., print only information about the executable (git commit, etc.) More...
 
logical sml_verbose = .false.
 ??? More...
 

Member Data Documentation

logical sml_module::adios_stage_3d = .FALSE.

Enable/disable Adios stage mode for xgc.3d.

logical sml_module::adios_stage_f0 = .TRUE.

Enable/disable Adios stage mode for xgc.f0.

integer sml_module::adios_stage_f0_max = 10

Maximum numbrer of steps for Adios xgc.f0 stage write.

logical sml_module::adios_stage_particle = .FALSE.

Enable/disable Adios stage mode for xgc.particle.

logical sml_module::adios_stage_restart = .FALSE.

Enable/disable Adios stage mode for xgc.restart.

logical sml_module::adios_stage_restartf0 = .FALSE.

Enable/disable Adios stage mode for xgc.restartf0.

logical sml_module::false
logical sml_module::for
logical sml_module::new
logical sml_module::restart
logical sml_module::restarting
logical sml_module::run
logical sml_module::simulation
logical sml_module::sml_00_efield =.true.

Flux-surface averaged potential not used for calculating the electric field if .false.

integer sml_module::sml_00_npsi

Size of the uniform 1D psi-grid (relevant only for -DCONVERT_GRID2=OFF)

logical sml_module::sml_00_poisson =.true.

Flux-surface averaged Poisson equation not solved if .false.

logical sml_module::sml_00_xz_up =.false.

Use only \(Z>Z_{xp}\) for flux-surface average calculation (only for -DCONVERT_GRID2=OFF)

real (8), parameter sml_module::sml_2pi = 6.2831853071795862D0

2 Pi

real (8) sml_module::sml_2pi_wedge_n

Toroidal angle spanned by the wedge simulated by the code –> \(\text{sml_2pi_wedge_n}=2\pi/\text{sml_wedge_n}\).

logical sml_module::sml_3db_on = .false.

Switch RMP field on/off –> should replace ptb_3db_on at some point Must be configured with ptb_3db_param namelist.

integer sml_module::sml_add_pot0 =0

Additional electrostatic potential: (0) for off, (1) for reading data from file (2) for simple neoclassical axisymmetric field (not operational)

character (len=256) sml_module::sml_add_pot0_file ='pot0.dat'

Name of the file containing the potential data to replace the consistent solution of the Poisson equation.

integer sml_module::sml_add_pot0_mixing_time = 1

With sml_replace_pot0=.true. this option allows mixing the consistent solution with the imposed potential. At t=0 only the imposed field is used, over sml_add_pot0_mixing_time times steps the mixing factor is ramped down linearly to zero (only consistent field is used)

integer sml_module::sml_adios_comm

Adios communicator.

integer sml_module::sml_adios_group

Adios MPI group.

real (8) sml_module::sml_adj_eden_axis_decay_width = 0.01D0

width for adjusting factor near axis

logical sml_module::sml_adj_eden_include_sol =.true.

Whether to include the SOL when (sml_adjust_eden=.true.)

real (8) sml_module::sml_adj_eden_obd_psi =1D0

???

real (8) sml_module::sml_adj_eden_sep_decay_width = 0.01D0

width for adjusting factor near separatrix

real (8) sml_module::sml_adj_eden_vd_max =1D0

maximum bulk radial drift of electron (m/s) – you can overestimate x10.

logical sml_module::sml_adj_eden_zero_axis =.true.

Set zero electron density change near axis.

logical sml_module::sml_adjust_eden = .false.

Switch for adjusting the electron density in the Poisson equation based on the radial particle flux instead of the weight evolution equation. (Experimental, don't use unless you know what you are doing)

real (8) sml_module::sml_bd_ext_delta1 =0.01

Outward shift of the inner boundary of the axisymmetric Poisson solver relative to sml_inpsi (in norm. pol. flux)

real (8) sml_module::sml_bd_ext_delta1h =0.01

Outward shift of the inner boundary of the non-axisymmetric Poisson solver relative to sml_inpsi (in norm. pol. flux)

real (8) sml_module::sml_bd_ext_delta2 =0.02

Outward shift of the inner boundary of the RHS of the axisymmetric Poisson solver relative to sml_inpsi (in norm. pol. flux)

real (8) sml_module::sml_bd_ext_delta2h =0.02

Outward shift of the inner boundary of the RHS of the non-axisymmetric Poisson solver relative to sml_inpsi (in norm. pol. flux)

real (8) sml_module::sml_bd_ext_delta3 =0.01

Inward shift of the outer boundary of the axisymmetric Poisson solver relative to sml_outpsi (in norm. pol. flux)

real (8) sml_module::sml_bd_ext_delta3h =0.01

Inward shift of the outer boundary of the non-axisymmetric Poisson solver relative to sml_outpsi (in norm. pol. flux)

real (8) sml_module::sml_bd_ext_delta4 =0.02

Inward shift of the outer boundary of the RHS of the axisymmetric Poisson solver relative to sml_outpsi (in norm. pol. flux)

real (8) sml_module::sml_bd_ext_delta4h =0.02

Inward shift of the outer boundary of the RHS of the non-axisymmetric Poisson solver relative to sml_outpsi (in norm. pol. flux)

real (8), parameter sml_module::sml_bd_ext_near_wall =0D0

To move the outer boundary of the Poisson solver away from the inner wall (in m)

real (8) sml_module::sml_bd_max_r =1D3

Simulation boundary in R-Z space (in m)

real (8) sml_module::sml_bd_max_z =1D3

Simulation boundary in R-Z space (in m)

real (8) sml_module::sml_bd_min_r =1D-4

Simulation boundary in R-Z space (in m)

real (8) sml_module::sml_bd_min_z =-1D3

Simulation boundary in R-Z space (in m)

integer sml_module::sml_bounce =0

Bounce routine switch 0 for off, 1 for inner boundary, 2 for both boundaries.

real (8) sml_module::sml_bounce_buffer =0D0

Buffer width between sml_outpsi and where the particle actually bounces (must be >=0)

integer sml_module::sml_bounce_zero_weight

If ==1, set particle weights to zero after bouncing from the outer boundary if the bounce boundary condition is active (sml_bounce>0)

real (8) sml_module::sml_bp_mult

Artificial multiplication of poloidal B-field.

real (8) sml_module::sml_bp_sign

(not an input) -1 for inverted B, +1 for normal B <– given by sml_invert_B

real (8) sml_module::sml_bt_mult

Artificial multiplication of toroidal B-field.

real (8) sml_module::sml_bt_sign

(not an input) -bp_sign for co-current B_t, bp_sign for couter-current B_t <- given by sml_co_curr_bt

logical sml_module::sml_co_cur_bt =.true.

Whether the toroidal magnetic field is in co-current direction (.true.) or counter-current direction (.false.). The default is that the plasma current is in counter-clockwise direction looking on the torus from above. The corresponding direction of the poloidal field is given by the right-hand rule.

integer sml_module::sml_comm

Global MPI communicator within an XGC instance.

integer sml_module::sml_comm_color

Communicator color (used for mpi split/code-coupling). Set by my_mpi_init call.

integer sml_module::sml_comm_null

MPI_COMM_NULL communicator for adios posix method.

integer sml_module::sml_comm_self

MPI_COMM_SELF communicator for single-process adios2 outputs.

integer sml_module::sml_comm_world

Global communicator between separate XGC instances (or XGC-GENE, XGC-GEM –> code-coupling) after MPI_COMM_WORLD split.

logical sml_module::sml_concentric =.false.

(Partially obsolete) Simulation for concentric circular geometry –> would only control behavior of bounce boundary condition in XGC_core/bounce.F90, but that part is commented out at this time

logical, parameter sml_module::sml_cylindrical =.false.

Use straight cylinder geometry with periodic boundary conditions along the cylinder axis.

logical sml_module::sml_debug_flag = .false.

Switch for some debugging statements.

logical sml_module::sml_deltaf = .true.

delta-f switch: .false. for off, .true. for on. Total-f mode uses delta-f particles –> default is .true.

logical sml_module::sml_deltaf_elec = .true.

delta-f switch: .false. for off, .true. for on. Total-f mode uses delta-f particles –> default is .true.

integer sml_module::sml_deltaf_f0_mode =-1

For classical delta-f: Use fixed gradient scale lengths (-1), use actual profiles (-2)

logical sml_module::sml_dpot_bd_apply = .false.

Damp (n=0,m>0) potential towards the magnetic axis.

real (8) sml_module::sml_dpot_bd_width = 0.02D0

Decay length (normalized flux) for (n=0,m>0) potential towards the magnetic axis.

real (8) sml_module::sml_dpot_te_limit = 64D0

Limits the magnitude of the Boltzmann term to exp(dphi/T_e) =.

logical sml_module::sml_drift_on =.true.

Whether drifts are active in the equations of motion. Set .false. for tracing field lines or Poincare plots.

real (8) sml_module::sml_dt = 2D-3

Time step size in units of the toroidal ion transit time \(\tau_T = 2\pi R_{ax} / \sqrt{2 E_{norm}/m_i}\), where \(E_{norm}\) is a reference energy set with sml_en_order_keV (in keV) \(\Rightarrow\,E_{norm} = \text{sml_en_order_keV}\, 10^{3} e\). The default value of sml_en_order is 0.2 keV.

logical sml_module::sml_dwdt_exb_only = .true.

Switch for classical delta-f weight evolution equation (i.e. not for total-f mode, must compile with DELTAF_CONV=ON): .false. to include all drifts (grad(B), curl(b),and ExB), .true. for ExB only.

logical sml_module::sml_dwdt_fix_bg = .false.

Switch for classical delta-f weight evolution equation (i.e. not for total-f mode, must compile with DELTAF_CONV=ON): .false. for (1-w) pre-factor, .true. for (1) pre-factor. default is .false.

real (8), parameter sml_module::sml_e_charge =1.6022D-19

elementary charge in C (MKS)

character (len=65) sml_module::sml_ele_file ="neo10.1.node"

Unstructured mesh data: ele-file.

logical sml_module::sml_elec_all_sendrecv =.false.

Particle shift: An even more extreme option is to force all processes to swap messages even if neither has any data to send to the other. This requires that both use_sendrecv and all_sendrecv be true. Without use_sendrecv, all_sendrecv does nothing of importance (Expert option; use default unless you know what you are doing)

logical sml_module::sml_elec_handshake =.false.

Particle shift: Due to the irregular communication pattern, some processes can receive many more messages than others. The handshake option forces the sending process to wait to send the information until the receiving process has indicated that it is ready to receive it. This can be important for robustness. By preposting receive requests, the overhead of these extra communications can be controlled. When large_limit <= 0, an alternative is to simply separate the receive and send requests with a barrier request. This can be used in other situations as well, though the motivation is missing (Expert option; use default unless you know what you are doing)

integer sml_module::sml_elec_large_limit =2048

Particle shift: The communication algorithm preposts up to 'large_limit' mpi_irecv requests. Performance is generally improved by making large_limit as large as possible (<= 0 implies no limit), but too many outstanding requests can also hurt performance in some circumstances. Note that if the mpi_allreduce option in (b) indicates more than large_limit number of messages being received in the point-to-point phase, then mpi_alltoall is used instead (Expert option; use default unless you know what you are doing)

real (8), parameter sml_module::sml_elec_mass =9.1094D-31

electron mass in kg (MKS)

integer sml_module::sml_elec_shift_max_nthreads =-1

Particle shift: max_nthreads limits the amount of OpenMP parallelism to exploit. There are no computational reasons to limit the number of threads, but memory requirements increase with the number of threads. If memory is limited, max_nthreads provides a mechanism to control the memory usage. If max_nthreads <=0, then there is no limit. (Expert option; use default unless you know what you are doing)

logical sml_module::sml_elec_use_alltoall =.false.

Particle shift: The first step of the communication algorithm determines the communication pattern. Two options are provided: using mpi_alltoall to communicate this information, or using mpi_allreduce followed by targeted point-to-point messages For this second option, a barrier can also be used to guarantee that all receive requests are posted before the sends commence. This is meant to improve robustness when there are concerns. (Expert option; use default unless you know what you are doing)

logical sml_module::sml_elec_use_hs_barrier0 =.false.

See sml_elec_use_alltoall (Expert option; use default unless you know what you are doing)

logical sml_module::sml_elec_use_hs_barrier1 =.false.

See sml_elec_handshake (Expert option; use default unless you know what you are doing)

logical sml_module::sml_elec_use_isend =.false.

Particle shift: The communication algorithm uses either mpi_irecv/mpi_send or mpi_irecv/mpi_isend. When using the handshake option, the ready send (mpi_rsend, mpi_irsend) is also an option (Expert option; use default unless you know what you are doing)

logical sml_module::sml_elec_use_rsend =.true.

See sml_elec_use_isend (Expert option; use default unless you know what you are doing)

logical sml_module::sml_elec_use_sendrecv =.false.

Particle shift: A complementary way to control the number of messages a single process receives unexpectedly is to use the XOR ordering and a 'logical' sendrecv, i.e. two processes swap messages even if only one them has any data to send. (Expert option; use default unless you know what you are doing)

logical sml_module::sml_electron_on =.false.

Whether to run with adiabatic (.false.) or kinetic (.true.) electrons.

real (8) sml_module::sml_en_order

(not an input) Characteristic ion energy in normalized unit

real (8) sml_module::sml_en_order_kev =0.2D0

Characteristic ion energy (keV) –> controls reference time (toroidal ion transit time)

integer sml_module::sml_epc

(Obsolete) 2nd order Runge-Kutta index, or predictor-corrector index for electrons

real (8), parameter sml_module::sml_epsilon0 =8.8542D-12

permittivity of free space in F/m (MKS)

real (8), parameter sml_module::sml_ev2j =sml_e_charge

Conversion factor from eV to J.

logical sml_module::sml_exclude_private =.false.

If .true. the private-flux region is excluded from several aspects of the simulation (e.g., Poisson solver, collisions,...)

logical sml_module::sml_exclude_private_turb = .true.

If .true. the private-flux region has no turbulence.

real (8) sml_module::sml_f0_1_ln =2.22D0

Normalized density gradient scale length \(R_{ax}/L_n\).

real (8) sml_module::sml_f0_1_lt =6.92D0

Normalized ion temperature gradient scale length \(R_{ax}/L_{Ti}\).

real (8) sml_module::sml_f0_1_lt_e =6.92D0

Normalized electron temperature gradient scale length \(R_{ax}/L_{Te}\).

logical sml_module::sml_f0_grid =.true.

Switch for total-f simulation (roughly: include \(\boldsymbol{v}_D\cdot(\partial f_0/\partial \boldsymbol{x})\) in the weight evolution equation. Enables use of 5D phase space grid for particle noise control (use sml_f0_grid_alpha>0).

real (8) sml_module::sml_f0_grid_alpha =0D0

Fraction of the particle weight that is transferred to the background distribution function (particle noise control) every sml_f_source_period time steps. As a rule of thumb, sml_f0_grid_alpha=sml_dt*sml_f_source_period can be used.

integer sml_module::sml_f0_grid_alpha_start =1

For delayed onset of total-f particle noise control. (must be >=1) Values >1 cause a linear ramp-up of sml_f0_grid_alpha from 0 to its input value from time step 1 to sml_f0_grid_alpha_start.

real (8) sml_module::sml_f0_grid_init_ptl_imbal =1D0

Initial particle load imbalance.

integer sml_module::sml_f0_grid_lbal_period =0

Force periodic update of the domain decomposition every sml_f0_grid_lbal_period time steps. When set to zero, the domain decomposition is adjusted only when the load imbalance exceeds its thresholds.

real (8) sml_module::sml_f0_grid_max_ptl_imbal =2D0

Upper threshold for the particle load imbalance (typically ~1.3).

real (8) sml_module::sml_f0_grid_min_ptl_imbal =1D0

Lower threshold for the particle load imbalance.

integer sml_module::sml_f0_nmu_decomp =1

(Not operational!) Parameter to control the decomposition of the velocity space grid in the \(v_\perp\) direction. 1 means no decomposition.

integer sml_module::sml_f_source_period =1

Run source routines (collisions, neutral recycling, etc.) every sml_f_source_period time steps.

integer sml_module::sml_ff_order =4

Order of RK method used for field-following search/mapping (default=4) (set to 0 to let XGC decide)

integer sml_module::sml_ff_step =2

Number of steps for field-following search/mapping (default=2) (set to 0 to let XGC decide)

logical sml_module::sml_field_aligned_initial =.false.

Use field aligned initial condition.

logical sml_module::sml_flat_electron_density =.false.

In case of adiabatic electrons, whether to use a uniform electron background density.

logical sml_module::sml_flat_marker = .true.

Use flat marker distribution function when set to .true. Marker distribution g is constant up to v<= sml_flat_marker_decay_start[1/2] and decays exponentially from there up to v<= sml_flat_marker_cutoff. The decay length is sml_flat_marker_width.

real (8) sml_module::sml_flat_marker_cutoff1 =4D0

Normalized (to \(v_{th}\)) parallel velocity cutoff of flat marker distribution.

real (8) sml_module::sml_flat_marker_cutoff2 =4D0

Like sml_flat_marker_cutoff1 but for the perpendicular velocity.

real (8) sml_module::sml_flat_marker_decay_start1 =3.5D0

Normalized (to \(v_{th}\)) velocity at which the marker distribution decays exponentially.

real (8) sml_module::sml_flat_marker_decay_start2 =3.5D0

Like sml_flat_marker_decay_start1 but for the perpendicular velocity.

real (8) sml_module::sml_flat_marker_width1 =0.5D0

Decay length of flat marker distribution in the normalized (to \(v_{th}\)) parallel velocity.

real (8) sml_module::sml_flat_marker_width2 =0.5D0

Like sml_flat_marker_width1 but for the perpendicular velocity.

logical sml_module::sml_grad_psitheta

If .true., gradiant operator is calculated as \((\hat{\boldsymbol{\psi}}\cdot\nabla,\hat{\boldsymbol{\theta}}^\ast)\cdot\nabla\) instead of \((R,Z)\) coordinates.

real (8) sml_module::sml_gradpsi_limit =1D-3

If \(|\nabla\psi|\) is smaller than this threshold, \(\nabla\psi\) is computed \((R,Z)\) coordinates instead of \((\hat{\boldsymbol{\psi}}\cdot\nabla,\hat{\boldsymbol{\theta}}^\ast)\cdot\nabla\) even if sml_grad_psitheta is .true.

integer sml_module::sml_grid_nrho =6

Size of the gyroradius grid (should be such that the resolution is >= 0.5 rho_i)

integer sml_module::sml_gstep

Global time step (counting the current + all previous runs in case of restarts)

integer sml_module::sml_guess_table_size =500

Size of the hash table used to narrow down the number of triangles in which to search a particle.

logical sml_module::sml_info_only = .false.

If .true., print only information about the executable (git commit, etc.)

real (8) sml_module::sml_initial_deltaf_noise =1D-3

Delta-f particle weights are initialized with this level of noise.

logical sml_module::sml_initial_flow =.false.

Set .true. for non-zero initial toroidal rotation flow (must set parameters eq_flowi_XXX and eq_flowe_XXX)

real (8) sml_module::sml_inpsi =0D0

Inner boundary for initial loading and other routines (e.g. solvers, bounce, ...); normalized poloidal flux (0 on axis, 1 on separatrix)

character (len=65) sml_module::sml_input_file_dir

Path to the magnetic equilibrium, mesh and profile files (max. 65 characters)

integer sml_module::sml_intpl_comm

Communicator for all MPI ranks assigned to the same (R,Z) patch (toroidal communication)

integer sml_module::sml_intpl_group

MPI group for all MPI ranks assigned to the same (R,Z) patch.

integer sml_module::sml_intpl_mype

MPI rank index within sml_intpl_comm.

integer sml_module::sml_intpl_totalpe

Total number of MPI ranks within sml_intpl_comm.

real (8) sml_module::sml_inv_f_source_period

(Not an input) Inverse of sml_f_source_period

logical sml_module::sml_invert_b =.false.

Invert the direction of the equilibrium (see sml_co_cur_bt for more details) magnetic field.

logical sml_module::sml_ion_all_sendrecv =.false.

See sml_elec_all_sendrecv.

logical sml_module::sml_ion_handshake =.false.

See sml_elec_handshake.

integer sml_module::sml_ion_large_limit =2048

See sml_elec_large_limit.

integer sml_module::sml_ion_shift_max_nthreads =-1

See sml_elec_shift_max_nthreads.

logical sml_module::sml_ion_use_alltoall =.false.

See sml_elec_use_alltoall.

logical sml_module::sml_ion_use_hs_barrier0 =.false.

See sml_elec_use_hs_barrier0.

logical sml_module::sml_ion_use_hs_barrier1 =.false.

See sml_elec_use_hs_barrier1.

logical sml_module::sml_ion_use_isend =.false.

See sml_elec_use_isend.

logical sml_module::sml_ion_use_rsend =.true.

sml_elec_use_rsend

logical sml_module::sml_ion_use_sendrecv =.false.

See sml_elec_use_sendrecv.

integer sml_module::sml_ipc

2nd order Runge-Kutta index, or predictor-corrector index

integer sml_module::sml_istep = 0

Current time step number (counting only the current simulation)

logical sml_module::sml_iter_solver =.true.

For sml_poisson_solver_type=0: Split Poisson equation into axisymmetric and non-axisymmetric parts. The axisymmetric part has the flux-surface averaged potential on the RHS. Solve iteratively by lagging the RHS potential by one iteration. Stop after sml_iter_solver_niter iterations. If .false., split Poisson equation into flux-surface averaged part and rest (assuming that the polarization term commutes with the flux-surface average) and the rest; solve in two steps.

integer sml_module::sml_iter_solver_niter =10

Number of iterations for the iterative axisymmetric Poisson solver.

real (8), parameter sml_module::sml_j2ev =1D0/sml_e_charge

Conversion factor from J to eV.

logical sml_module::sml_limit_marker_den =.false.

Switch for limiting the marker density in the private region to sml_limit_marker_den_fac of the target number of markers/vertex (mainly for RMP!)

real (kind=8) sml_module::sml_limit_marker_den_fac =5D0

Threshold for removing excess particles in multiples of the target # of ptl/vertex when sml_limit_marker_den=.true.

real (kind=8) sml_module::sml_load_den_uni

Marker density for uniform loading.

real (8), parameter sml_module::sml_load_maxe = 12D0

Maximum particle energy (wrt the thermal speed) in initial particle distribution (if sml_flat_marker=.true.)

real (kind=8) sml_module::sml_load_nptl

Avg. number of ptl/vertex.

real (8) sml_module::sml_low_mu_fill_population = 0D0

Used for filling the low-mu range of velocity space if sml_marker_temp_factor3>1 0.0 –> all markers in low-mu range, 1.0 –> no low-mu filling (only if sml_flat_marker=.false.)

integer sml_module::sml_machine

Machine type (sets predefined values for sml_[min/max]_[r/z]) –> (1) DIII-D, (2) NSTX, (3) Alcator C-Mod, (4) ASDEX-Upgrade, all other values: set boundaries automatically from eqd-file.

real (8) sml_module::sml_marker_den

Marker density. Used for (uniform) loading and initial weight calculation.

real (8), dimension(:,:), allocatable sml_module::sml_marker_den2

Triangle based marker density.

real (8) sml_module::sml_marker_min_temp = 1D1

minimum temperature of markers (only if sml_flat_marker=.false.)

real (8) sml_module::sml_marker_temp_factor = 1D0

Initial loading with Maxwellian marker distribution with virtual temperature \(T_{marker} = \alpha*T_{plasma}\) (only if sml_flat_marker=.false.).

real (8) sml_module::sml_marker_temp_factor2 =1D0

perp temperature factor (only if sml_flat_marker=.false.)

real (8) sml_module::sml_marker_temp_factor3 =1D0

low mu fill temperature (only if sml_flat_marker=.false.)

real (8) sml_module::sml_max_imbalance =1.1D0

Threshold of the combined particle-mesh load imbalance that triggers an update of the domain decomposition.

real (kind=8) sml_module::sml_max_loading_factor =1D1

Upper limit for loading factor (default is conservative, might need higher value)

real (kind=8) sml_module::sml_min_loading_factor =1D-1

Lower limit for loading factor (default is conservative, might need lower value; lower values increase time for loading)

logical sml_module::sml_mode_select_bands_on = .false.

Determine the number of side bands to include by using gridm_max_surf(i)

real (kind=8) sml_module::sml_mode_select_bd_width = 0.01D0

width of boundary envelope

integer sml_module::sml_mode_select_cutoff = 2

Factor for cutoff in Fourier space, determines gridm_max_surf(i) The default is the Nyquist limit sml_mode_select_cutoff=2.

logical sml_module::sml_mode_select_div_mix = .true.

Whether to blend filtered and unfiltered data near the divertor plates (set .false. for increasing stability in EM simulations)

real (kind=8) sml_module::sml_mode_select_inpsi = -0.1D0

inner boundary for mode selection

real (kind=8) sml_module::sml_mode_select_max_kth_rho = 1.0D0

Max. k_theta*rhoi retained in poloidal Fourier filter.

integer sml_module::sml_mode_select_mmax = 25

Highest pol. mode number for Fourier filter.

integer sml_module::sml_mode_select_mmin = 0

Lowest pol. mode number for Fourier filter.

integer sml_module::sml_mode_select_mode = 0

Fourier filter mode: 0) No filter, 1) single-n, 2) single-n, resonant m (+/- mres) 3) single-n, m-range (-mmax..mmin) and (mmin..mmax) 4) m_range (mmin..mmax) 5) n range + resonant m 6) n range + m range.

integer sml_module::sml_mode_select_mres = 5

number of pol. mode numbers around the resonant mode; mres=3 –> m = nq-1, nq, nq+1, etc.

integer sml_module::sml_mode_select_n = 1

Toroidal mode number for Fourier filter.

integer sml_module::sml_mode_select_nmax = 1

Highest numerical tor. mode number for Fourier filter (0,1,...,sml_nphi_total-1)

integer sml_module::sml_mode_select_nmax_real = 999

Highest real toroidal mode number for FFT filter (n_real = (n_num+(i-1)*sml_nphi_total)*sml_wedge_n), max. i depending on mesh resolution.

integer sml_module::sml_mode_select_nmin = 1

Lowest numerical tor. mode number for Fourier filter (0,1,...,sml_nphi_total-1)

integer sml_module::sml_mode_select_nmin_real = 0

Lowest real toroidal mode number for FFT filter (n_real = (n_num+(i-1)*sml_nphi_total)*sml_wedge_n), max. i depending on mesh resolution.

logical sml_module::sml_mode_select_no_m0 = .true.

filter out m=0 mode while field-following FFT filtering. (fourier_filter_n_m_range_parallel)

real (kind=8) sml_module::sml_mode_select_outpsi = 10.0D0

outer boundary for mode selection

integer sml_module::sml_mode_select_period = 1

Implicit solver: number of time steps after which to leave the PETSc solver and apply the mode filter; sml_mstep should be a multiple of this parameter.

real (kind=8) sml_module::sml_mode_select_psitol = 5D-5

psi tolerance (in SI-units –> Wb) for the identification of flux-surfaces

integer sml_module::sml_mode_select_sol_mode = 0

0: Retain sine and cosine modes in SOL but use a window function 1: Retain only sine modes in SOL and don't use a window function (Applies only to filter modes sml_mode_select_mode={5,6}!)

integer sml_module::sml_monte_num =10000

Number of samples for Monte-Carlo volume calculation. It should be greater than particle number for correct simulation.

integer sml_module::sml_mstep = 10

Total number of time steps for simulation.

real (8), parameter sml_module::sml_mu0 =1.2566370614D-6

Magnetic vacuum permeability in H/m (MKS)

integer sml_module::sml_mype

Processor index, 0 - (# of MPI ranks -1)

integer, parameter sml_module::sml_n_vf_diag =9

Number of diagnostic output quantities from the particle push routine.

integer sml_module::sml_ncycle_half =30

Half the number of electron substeps per ion time step. Should be larger than \(\sqrt{m_i/m_e}/2\). For electrostatic simulation this should be divisible by 5.

logical sml_module::sml_neutral =.false.

Switch for neutral recycling module (must be configured with the neu_param namelist)

logical sml_module::sml_neutral_use_ion_loss =.false.

If .true., the charge loss used in the neutral recycling routine is computed from ion gyrocenters instead of electrons.

integer, parameter sml_module::sml_nhybrid =2

Number of iterations in electrostatic electron weight evolution scheme This used to be an input variable but is now a parameter (sml_nhybrid=2) because a value of 2 was the only workable value. It implies a two-step Poisson solve (adiabatic electron solve -> electron weight update -> kinetic electron solve)

integer, parameter sml_module::sml_nlarmor =4

Number of points used in gyroaverage. This is used only for calculating the electron background density in simulations with adiabatic electrons and in the direct evaluation of the (obsolete) flux-surface averaged ion gyrocenter and electron charge density.

logical sml_module::sml_no_fp_in_f =.false.

If .true. the distribution function used for the source routines will not include particle information (only for testing)

logical sml_module::sml_no_turb =.false.

Set all non-axisymmetric field perturbations to zero (electromagnetic version only)

character (len=65) sml_module::sml_node_file ="neo10.1.node"

Unstructured mesh data: node-file.

logical sml_module::sml_node_vol_monte

Calculate node volume using Monte-Carlo method (true), or analytic method (false)

integer sml_module::sml_nphi_2pi

In wedge simulations (sml_wegde_n>1): Number of poloidal planes in full torus.

integer sml_module::sml_nphi_total

Number of poloidal planes (= toroidal grid size)

integer, parameter sml_module::sml_nrk = 2

Order of Runge-Kutta time integration of particles + fields.

integer sml_module::sml_nsurf3 =0

Number of flux-surfaces in the private flux region (from sml_surf_file if compiled with -DNEW_FLX_AIF=ON)

integer sml_module::sml_nsurf3_2 =0

Number of flux-surfaces in the second private flux region (from sml_surf_file if compiled with -DNEW_FLX_AIF=ON)

integer sml_module::sml_nthreads

Total number of OpenMP threads per process.

real (8) sml_module::sml_outpsi =1.05D0

Outer boundary for initial loading and other routines (e.g. solvers, bounce, ...); normalized poloidal flux (0 on axis, 1 on separatrix)

real (8) sml_module::sml_outpsi_priv1 =0.97D0

Outer boundary (for Poisson solver), normalized poloidal flux.

real (8) sml_module::sml_outpsi_priv2 =2.0D0

Outer boundary (for Poisson solver, 2nd private region), normalized poloidal flux.

integer sml_module::sml_pe_per_plane

Number of MPI ranks per poloidal plane (>=2*sml_grid_nrho)

real (8), parameter sml_module::sml_pi = 3.1415926535897931D0

Pi.

integer sml_module::sml_plane_comm

Communicator for all MPI ranks assigned to the same poloidal plane.

integer sml_module::sml_plane_group

MPI group for all MPI ranks assigned to the same poloidal plane.

integer sml_module::sml_plane_index

Index of the poloidal plane to which an MPI rank is assigned (0...sml_nphi_total-1)

logical sml_module::sml_plane_major =.false.

MPI task ordering to use when mapping to 2D virtual processor grid. .true. for consecutive within plane; .false. for consecutive between planes.

integer sml_module::sml_plane_mype

MPI rank index within sml_plane_comm.

integer sml_module::sml_plane_per_pe

Number of poloidal planes per MPI rank (typically 1)

integer sml_module::sml_plane_totalpe

Total number of MPI ranks assigned to a poloidal plane.

logical sml_module::sml_poisson00_diag_mass

False: use normal mass matrix, true: use diagonal (lumped) mass matrix in 00-mode Poisson solver.

logical sml_module::sml_poisson_bias =.false.

Whether to use a (0,0) bias potential on top of phi_00.

real (8) sml_module::sml_poisson_bias_amp = 10D0

Ampltude of the bias potential in Volt.

real (8) sml_module::sml_poisson_bias_freq = 1D4

Frequency in Hz of the bias potential.

real (8) sml_module::sml_poisson_bias_psic = 0.50D0

Center position of bias potential phi_bia ~ exp(-(psi-psi0)^2), psi_normalized.

real (8) sml_module::sml_poisson_bias_psiw = 0.02D0

Decay length of the radial envelope of the bias potential.

integer sml_module::sml_poisson_bias_start = 1

Time step in which the bias potential is started.

logical sml_module::sml_poisson_cylindrical_jac =.false.

Whether to use the cylindrical Jacobian in the Poisson solver or not.

integer sml_module::sml_poisson_solver_type =0

(0) Simple axisymmetric Poisson solver (single equation) (–> see sml_iter_solver) (1) Linear Poisson equation for the axisymmetric potential (as in sml_iter_solver=.true.) but with constraint equation for the flux-surface averaged potential on the RHS. Solved with Schur complement solver. Much faster and accurate than the iterative solver, but causes instability in simulations with open field-lines.

logical sml_module::sml_poisson_use_bc

False: 00-bc is phi=0 everywhere; true: 00-boundary is the wall with bc phi_bd=phi_sheath.

logical sml_module::sml_pol_decomp =.true.

Switch for the use of radial-poloidal domain decomposition.

real (8), parameter sml_module::sml_prot_mass =1.6720D-27

proton mass in kg (MKS)

real (8) sml_module::sml_ptl_imbal_ion =3D0

Maximal load ion particle imbalance.

logical sml_module::sml_radiation =.false.

Switch for a simple radiation module using part of the ADAS data base (must be configured with the rad_param namelist)

logical sml_module::sml_read_eq =.true.

Read B-field profile from an eqd-file.

logical sml_module::sml_read_eq_m3dc1 =.false.

Read B-field profile from M3D-C1 output file –> overrides sml_read_eq.

logical sml_module::sml_replace_pot0 =.false.

If .true., replace Poisson solution with external data, if .false., add external potential to Poisson solution.

logical sml_module::sml_resamp_on = .false.

Switch for particle resampling (must be configured with resamp_param namelist.

logical sml_module::sml_restart =.false.
integer sml_module::sml_restart_write_period

Number of time steps between checkpoint dumps.

logical sml_module::sml_rgn1_pot0_only =.false.

If .true., the axisymmetric Poisson equation is solved only inside the separatrix.

real (8) sml_module::sml_rhomax =1D-2

Upper cutoff of the gyroradius grid (should be the gyroradius of the fastest ions of interest)

integer sml_module::sml_run_count

Run count for continued simulations: 1 for fresh start and 2, 3, 4, ... for restarted simulations.

integer sml_module::sml_sep2_surf_index =99999

Index of the outer separatrix surface in the flux-surface data (from sml_surf_file if compiled with -DNEW_FLX_AIF=ON)

integer sml_module::sml_sep_surf_index =99999

Index of the inner separatrix surface in the flux-surface data (from sml_surf_file if compiled with -DNEW_FLX_AIF=ON)

logical sml_module::sml_sheath_adjust =.false.

Constant (.false.) or dynamic (.true.) sheath potential (for sml_sheath_mode=1)

real (8) sml_module::sml_sheath_adjust_factor =0.25D0

Damping factor for slower adjustment of the sheath potential if sml_sheath_mode=1.

logical sml_module::sml_sheath_init_pot_auto =.false.

Set initial sheath potential to eq. based on Ti,Te, Maxwellian assumption.

real (8) sml_module::sml_sheath_init_pot_factor =2D0

Initial value of the sheath potential relative to the electron temperature. (for sml_sheath_mode=1)

integer sml_module::sml_sheath_mode =0

Mode of operation of the logical sheath boundary condition (0) off (1) The value of the logical sheath potential is adjusted locally reactively based on the number of ions and electrons that hit the wall in the previous time step. Can use sml_sheath_adjust_factor<1 to reduce noise. (2) Actual logical sheath mode: the number of ions and electrons hitting the wall is recorded, then the sheath potential required to balance ion and electron losses is determined, and only then is decided which electrons actually hit the wall and which were reflected by the sheath potential. The algorithm also tries to achieve a global balance if local balance cannot be achieved. (might need some debugging)

integer sml_module::sml_sort_ions =huge(1)

Ion sorting frequency; the default is to sort only once in the beginning.

logical sml_module::sml_source =.false.

Switch for heat and torque sources (sources must be configured separately with the parameters in the src_param namelist.

integer sml_module::sml_special =0

Switch for special simulation: (0) normal, (1) single particle simulation, (4) Poincare plot.

real (8), parameter sml_module::sml_sqrt2pi = 2.5066282746310002D0

Sqrt(2Pi)

real (8), parameter sml_module::sml_sqrtpi = 1.7724538509055158D0

Sqrt(Pi)

character (len=65) sml_module::sml_surf_file ="dummy"

Unstructured mesh data: flx-file.

logical sml_module::sml_symmetric_f =.true.

Enforce axisymmetry of the total distribution function on the grid.

logical sml_module::sml_symmetric_f0g =.false.

Enforce axisymmetry only in f0g (used only in XGC1 fluid-kinetic hybrid method; -DHYB_EM=ON)

real (8) sml_module::sml_time

Simulation time in seconds.

real (8) sml_module::sml_time0

Initial time for PETSc TS solver in seconds.

integer sml_module::sml_totalpe

Total number of processors (must be > (2*sml_grid_nrho)*sml_nphi_total)

real (8) sml_module::sml_tran

Torodial transit time of an ion with the characteristic energy.

logical sml_module::sml_tri_psi_weighting =.true.

Use modified triangle shape functions (Useful for coarse meshes in XGCa when straight element edges do not represent the curved flux-surfaces well.

logical sml_module::sml_turb_efield =.true.

E-field calculated only with \(<\phi>\) if .false. psndpot will still contain all (n=0,|m|>0) and (|n|>0,m) modes.

logical sml_module::sml_turb_poisson =.true.

Non-axisymmetric Poisson equation not solved if .false.

logical sml_module::sml_turb_poisson_n0_only =.false.

Keep only the axisymmetric potential (n=0,|m|>0) in psndpot.

logical sml_module::sml_update_ampere_solver =.false.

If .true. density and temperature in the Ampere's law solver operators will be updated every sml_update_ampere_solver_nstep time steps.

integer sml_module::sml_update_ampere_solver_nstep =1

Number of time steps between subsequent updates of the Ampere's law solver operators.

logical sml_module::sml_update_poisson_solver =.false.

If .true. density and temperature in the Poisson solver operators will be updated every sml_update_poisson_solver_nstep time steps.

integer sml_module::sml_update_poisson_solver_nstep =1

Number of time steps between subsequent updates of the Poisson solver operators.

logical sml_module::sml_use_loading_factor =.false.

Marker particle distribution taking into account the local (configuration space) node volume, i.e. aim for uniform number of ptl/mesh vertex. Set .true. when using a mesh with very non-uniform resolution.

logical sml_module::sml_use_pade =.false.

Use Pade approximation for short wavelengths.

logical sml_module::sml_use_simple00 =.false.

Use simple 1D solver for the flux-surface averaged potential instead of PETSc.

integer sml_module::sml_veclen =32

(Obsolete) Vectorization length, used in defunct AVX512 vectorized electron push kernel

logical sml_module::sml_verbose = .false.

???

integer, parameter sml_module::sml_wedge_n =1

XGCa simulations are always full torus simulations.

logical sml_module::sml_zero_inner_bd =.false.

If .true., use Dirichlet boundary condition \(\phi=0\) for axisymmetric Poisson solver.

logical sml_module::switch
logical sml_module::true

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