Input Parameters
The following is a complete list of input parameters available in XGC. This list is generated with the Python script utils/document_inputs.py. Please help us improve the documentation for completeness, consistency and clarity. In the meantime, parameters labeled ‘See Fortran description’ may have more useful documentation here.
adios_param
booladios_stage_3d =falseEnable/disable Adios stage mode for xgc.3d
booladios_stage_escaped_ptls =falseEnable/disable Adios stage mode for escape particle diagnostic
booladios_stage_f0 =falseEnable/disable Adios stage mode for xgc.f0
booladios_stage_f0_df =falseEnable/disable Adios stage mode for xgc.fsourcediag
booladios_stage_particle =falseEnable/disable Adios stage mode for xgc.particle
booladios_stage_restart =falseEnable/disable Adios stage mode for checkpoint file
booladios_stage_restartf0 =falseEnable/disable Adios stage mode for f0 checkpoint file
analytic_grid_param
doubleaxis_r =1.5The r coordinate of the axis of the circular analytic magnetic equilibrium
intnsurfaces =30Number of surfaces in the analytic circular grid.
std::stringsml_input_file_dir ="./"Directory containing the grid files
col_param
boolcol_accel =falseArtificial collision amplifying.
doublecol_accel_factor1 =10.0Acceleration factor of Range 1
doublecol_accel_factor2 =10.0Acceleration factor of Range 2
intcol_accel_n =2Number of psi regions to apply artifical accleration to. Maximum is 2.
doublecol_accel_pin1 =magnetic_field.inpsiInner psi value of acceleration Range 1
doublecol_accel_pin2 =magnetic_field.outpsi - 0.1*psi_rangeInner psi value of acceleration Range 2
doublecol_accel_pout1 =magnetic_field.inpsi + 0.1*psi_rangeOuter psi value of acceleration Range 1
doublecol_accel_pout2 =magnetic_field.outpsiOuter psi value of acceleration Range 2
intcol_en_col_on =1Switch for energy collision
intcol_mode =0Collision method. 0: No collisions. 1: uses the monte carlo non-conserving collisions. 4: uses the non-linear Fokker Planck Landau collision operator. 5: PETSc Landau AMR collisions.
doublecol_pin =magnetic_field.inpsiMinimum of psi range where collisions are performed.
doublecol_pout =magnetic_field.outpsiMaximum of psi range where collisions are performed.
intcol_max_n_subcycles =1Enables collision subcycling. Collision time step of an unconverged vertex will be reduced, increasing the number of cycles of that vertex up to a maximum of col_max_n_subcycles. If it still does not converge, the vertex will not be attempted again.
intcol_f_start =1The time step at which collisions begin
boolcol_moving_frame =trueSwitch for moving frame for collisions
intcol_period =3Frequency of collisions
intcol_varying_bg =0Switch for background plasma update
intcol_vb_m =50Resolution of varying background
intcol_vb_mtheta =8Resolution in theta direction of varying background
intcol_vb_period =1Frequency of background update for collisions
doublecol_vb_pin =magnetic_field.inpsiInner psi boundary for varying background
doublecol_vb_pout =std::min(magnetic_field.outpsi, 1.03Outer psi boundary for varying background
diag_param
booldiag_1d_on =trueWhether to write 1D diagnostics
intdiag_1d_period =10Number of time steps between diag_1d diagnostic write
booldiag_3d_more =falseWrite some additional moments in the diag_3d diagnostic
booldiag_3d_on =trueWhether to write 3D diagnostics
intdiag_3d_period =default_periodNumber of time steps between 3D diagnostic write
booldiag_col_convergence_stat_on =falseSwitches file-output of convergence status of the collision operator on/off [Used when col_param:col_mode=4]
booldiag_current_drive_on =falseSwitches the loop voltage diagnostic on if dynamic current drive is on
intdiag_current_drive_period =1Output frequency of loop_voltage_diagnostic
booldiag_diff_profiles_on =falseDescription needed
intdiag_diff_profiles_period =1Rate (multiples of sml_f_source_period) at which the profile data is sampled. (Must be compatible with diff_update_period!)
booldiag_f0_df_on =is_on_defaultSwitch for f0_df (grid-conservation) diagnostic
intdiag_f0_df_period =period_defaultOutput interval for f0_df diagnostic
booldiag_f0_g =falseWhether to additionally write f0_g in the f0 diagnostic
booldiag_f0_n =falseWhether to additionally write f0_n in the f0 diagnostic
booldiag_f0_on =trueWhether to write f0 diagnostic
intdiag_f0_period =default_periodNumber of time steps between f0 diagnostic write Make sure period is divisible by f_source_period
intdiag_f3d_period =default_periodNumber of time steps between f3d diagnostic write
intdiag_heat_mode =2Heat diagnostic mode - 1 for old mode (rectangle based), 2 for new mode (wall segment based)
intdiag_heat_nphi =64Number of phi bins for mode 2
intdiag_heat_npsi =1000Number of psi bins for mode 1
intdiag_heat_nr =100Number of radial bins in mode 1
intdiag_heat_nsection =1Number of rectangular sections for mode 1
intdiag_heat_nz =100Number of vertical bins in mode 1
booldiag_heat_on =falseWhether to write heat diagnostic.
doublediag_heat_rmax1 =magnetic_field.bounds.max_rMaximum r for the first section
doublediag_heat_rmax2 =magnetic_field.bounds.max_rMaximum r for the second section
doublediag_heat_rmax3 =magnetic_field.bounds.max_rMaximum r for the third section
doublediag_heat_rmin1 =magnetic_field.bounds.min_rMinimum r for the first section
doublediag_heat_rmin2 =magnetic_field.bounds.min_rMinimum r for the second section
doublediag_heat_rmin3 =magnetic_field.bounds.min_rMinimum r for the third section
doublediag_heat_spacing =5.0e-3target spacing for wall segments
doublediag_heat_zmax1 =magnetic_field.bounds.max_zMaximum z for the first section
doublediag_heat_zmax2 =magnetic_field.bounds.max_zMaximum z for the second section
doublediag_heat_zmax3 =magnetic_field.bounds.max_zMaximum z for the third section
doublediag_heat_zmin1 =magnetic_field.bounds.min_zMinimum z for the first section
doublediag_heat_zmin2 =magnetic_field.bounds.min_zMinimum z for the second section
doublediag_heat_zmin3 =magnetic_field.bounds.min_zMinimum z for the third section
intdiag_neutral_period =100The number of discrete timesteps between writing the neutral output files. Should generally be equal to neu_background_period.
intdiag_particle_mod =1Writes every Nth particle (based on GID)
booldiag_particle_on =falseWhether to write diag particles
intdiag_particle_period =1Number of time steps between particle diagnostic write
doublediag_ps_pin =0.80Psi range of selected particles
doublediag_ps_pout =0.81Psi range of selected particles
intdiag_ps_reset_period =10Number of time steps between particle stream diagnostic recording
booldiag_pseudo_inv_on =falseswitches pseudo-inverse diagnostics on and off, only used if f0_velocity_interp_use_pseudo_inv = .true.
booldiag_weight_stats =falseWrite some particle weight statistics in the diag_3d diagnostic
diff_param
doublediff_bd_in =magnetic_field.inpsiInner psi boundary for diffusion
doublediff_bd_out =magnetic_field.outpsiOuter psi boundary for diffusion
doublediff_bd_shift_in =See Fortran description.See Fortran description.
doublediff_bd_shift_out =See Fortran description.See Fortran description.
doublediff_bd_width_in =See Fortran description.See Fortran description.
doublediff_bd_width_out =See Fortran description.See Fortran description.
doublediff_bd_width_priv =See Fortran description.See Fortran description.
booldiff_nonlinear =See Fortran description.See Fortran description.
booldiff_on =falseSwitch for anomalous diffusion
booldiff_pol_peak =See Fortran description.See Fortran description.
doublediff_pol_peak_amp =See Fortran description.See Fortran description.
doublediff_pol_peak_angle =See Fortran description.See Fortran description.
doublediff_pol_peak_width =See Fortran description.See Fortran description.
intdiff_start_time =1Start time (in time steps) for anomalous diffusion
booldiff_update_on =0Switch for periodic updates of the diffusion coefficients
intdiff_update_period =500Period in time steps between subsequent updates of the diffusion coefficients
booldiff_use_smoothing =0Whether apply poloidal smoothing to the fluid moments before solving the diffusion equations.
eq_param
inteq_den_rsp_index =0Due to quasineutrality, the density of one species should be obtained from that of the others: specify its index here.
inteq_den_rsp_sample_num =1024density for the reduced spcies (rsp) is constructed from this number of samples
doubleeq_den_rsp_xmax =1.3normalized value of psi for domain setting psi_norm = [0, xmax], psi = psi_norm * eq_x_psi
std::stringeq_dens_diff_file =See Fortran description.See Fortran description.
inteq_dens_diff_shape =See Fortran description.See Fortran description.
doubleeq_dens_diff_v1 =See Fortran description.See Fortran description.
doubleeq_dens_diff_v2 =See Fortran description.See Fortran description.
doubleeq_dens_diff_v3 =See Fortran description.See Fortran description.
doubleeq_dens_diff_v4 =See Fortran description.See Fortran description.
doubleeq_dens_diff_x1 =See Fortran description.See Fortran description.
doubleeq_dens_diff_x2 =See Fortran description.See Fortran description.
doubleeq_dens_diff_x3 =See Fortran description.See Fortran description.
doubleeq_dens_diff_x4 =See Fortran description.See Fortran description.
doubleeq_dens_diff_x5 =See Fortran description.See Fortran description.
std::stringeq_dens_file ="example.dat", ... [per species] ...Filename for equilibrium density profile
inteq_dens_shape =0, ... [per species] ...Shape of equilibrium density profile
doubleeq_dens_v1 =1.0e20, MAIN_IONShape coefficients (m^-3)
doubleeq_dens_v2 =0.0, ... [per species] ...Shape coefficients (m^-3)
doubleeq_dens_v3 =0.0, ... [per species] ...Shape coefficients (m^-3)
doubleeq_dens_x1 =0.0, ... [per species] ...Shape coefficients
doubleeq_dens_x2 =0.0, ... [per species] ...Shape coefficients
doubleeq_dens_x3 =0.0, ... [per species] ...Shape coefficients
std::stringeq_fg_flow_file =See Fortran description.See Fortran description.
inteq_fg_flow_shape =See Fortran description.See Fortran description.
inteq_fg_flow_type =See Fortran description.See Fortran description.
doubleeq_fg_flow_v1 =See Fortran description.See Fortran description.
doubleeq_fg_flow_v2 =See Fortran description.See Fortran description.
doubleeq_fg_flow_v3 =See Fortran description.See Fortran description.
doubleeq_fg_flow_x1 =See Fortran description.See Fortran description.
doubleeq_fg_flow_x2 =See Fortran description.See Fortran description.
doubleeq_fg_flow_x3 =See Fortran description.See Fortran description.
std::stringeq_fg_temp_file =See Fortran description.See Fortran description.
inteq_fg_temp_shape =See Fortran description.See Fortran description.
doubleeq_fg_temp_v1 =See Fortran description.See Fortran description.
doubleeq_fg_temp_v2 =See Fortran description.See Fortran description.
doubleeq_fg_temp_v3 =See Fortran description.See Fortran description.
doubleeq_fg_temp_x1 =See Fortran description.See Fortran description.
doubleeq_fg_temp_x2 =See Fortran description.See Fortran description.
doubleeq_fg_temp_x3 =See Fortran description.See Fortran description.
std::stringeq_filename ="example_base.dat"eq_filename is the name of the equilibrium input
std::stringeq_flow_diff_file =See Fortran description.See Fortran description.
inteq_flow_diff_shape =See Fortran description.See Fortran description.
doubleeq_flow_diff_v1 =See Fortran description.See Fortran description.
doubleeq_flow_diff_v2 =See Fortran description.See Fortran description.
doubleeq_flow_diff_v3 =See Fortran description.See Fortran description.
doubleeq_flow_diff_v4 =See Fortran description.See Fortran description.
doubleeq_flow_diff_x1 =See Fortran description.See Fortran description.
doubleeq_flow_diff_x2 =See Fortran description.See Fortran description.
doubleeq_flow_diff_x3 =See Fortran description.See Fortran description.
doubleeq_flow_diff_x4 =See Fortran description.See Fortran description.
doubleeq_flow_diff_x5 =See Fortran description.See Fortran description.
std::stringeq_flow_file ="example.dat", ... [per species] ...Filename for equilibrium flow profile
inteq_flow_shape =0, ... [per species] ...Shape of equilibrium flow profile
inteq_flow_type =2, ... [per species] ...How the flow term is calculated from the equilibrium flow profile. 0: flow = value; 1: flow = value*R; 2: flow = value*R*Bphi/B
doubleeq_flow_v1 =0.0, ... [per species] ...Shape coefficients
doubleeq_flow_v2 =0.0, ... [per species] ...Shape coefficients
doubleeq_flow_v3 =0.0, ... [per species] ...Shape coefficients
doubleeq_flow_x1 =0.0, ... [per species] ...Shape coefficients
doubleeq_flow_x2 =0.0, ... [per species] ...Shape coefficients
doubleeq_flow_x3 =0.0, ... [per species] ...Shape coefficients
std::stringeq_g_filename =See Fortran description.See Fortran description.
std::stringeq_m3dc1_filename =See Fortran description.See Fortran description.
std::stringeq_mk_flow_file =See Fortran description.See Fortran description.
inteq_mk_flow_shape =See Fortran description.See Fortran description.
inteq_mk_flow_type =See Fortran description.See Fortran description.
doubleeq_mk_flow_v1 =See Fortran description.See Fortran description.
doubleeq_mk_flow_v2 =See Fortran description.See Fortran description.
doubleeq_mk_flow_v3 =See Fortran description.See Fortran description.
doubleeq_mk_flow_x1 =See Fortran description.See Fortran description.
doubleeq_mk_flow_x2 =See Fortran description.See Fortran description.
doubleeq_mk_flow_x3 =See Fortran description.See Fortran description.
std::stringeq_mk_temp_file =See Fortran description.See Fortran description.
inteq_mk_temp_shape =See Fortran description.See Fortran description.
doubleeq_mk_temp_v1 =See Fortran description.See Fortran description.
doubleeq_mk_temp_v2 =See Fortran description.See Fortran description.
doubleeq_mk_temp_v3 =See Fortran description.See Fortran description.
doubleeq_mk_temp_x1 =See Fortran description.See Fortran description.
doubleeq_mk_temp_x2 =See Fortran description.See Fortran description.
doubleeq_mk_temp_x3 =See Fortran description.See Fortran description.
doubleeq_out_decay_factor =0.1Profiles decay exponentially to f(sml_outpsi)/decay_factor for psi>sml_outpsi
doubleeq_out_decay_width =0.03Width for exponential decay for psi>sml_outpsi
std::stringeq_pinch_v_file =See Fortran description.See Fortran description.
inteq_pinch_v_shape =See Fortran description.See Fortran description.
doubleeq_pinch_v_v1 =See Fortran description.See Fortran description.
doubleeq_pinch_v_v2 =See Fortran description.See Fortran description.
doubleeq_pinch_v_v3 =See Fortran description.See Fortran description.
doubleeq_pinch_v_v4 =See Fortran description.See Fortran description.
doubleeq_pinch_v_x1 =See Fortran description.See Fortran description.
doubleeq_pinch_v_x2 =See Fortran description.See Fortran description.
doubleeq_pinch_v_x3 =See Fortran description.See Fortran description.
doubleeq_pinch_v_x4 =See Fortran description.See Fortran description.
doubleeq_pinch_v_x5 =See Fortran description.See Fortran description.
doubleeq_priv_flux_decay_factor =0.05Profiles decay exponentially to f(sml_outpsi)/decay_factor in priv. flux region
doubleeq_priv_flux_decay_width =0.015Width for exponential decay in private flux region
booleq_set_x2 =falseDetermine if there is second (upper) X-point to consider. It does not have to be set unless using the old flx.aif format.
std::stringeq_t_diff_file =See Fortran description.See Fortran description.
inteq_t_diff_shape =See Fortran description.See Fortran description.
doubleeq_t_diff_v1 =See Fortran description.See Fortran description.
doubleeq_t_diff_v2 =See Fortran description.See Fortran description.
doubleeq_t_diff_v3 =See Fortran description.See Fortran description.
doubleeq_t_diff_v4 =See Fortran description.See Fortran description.
doubleeq_t_diff_x1 =See Fortran description.See Fortran description.
doubleeq_t_diff_x2 =See Fortran description.See Fortran description.
doubleeq_t_diff_x3 =See Fortran description.See Fortran description.
doubleeq_t_diff_x4 =See Fortran description.See Fortran description.
doubleeq_t_diff_x5 =See Fortran description.See Fortran description.
std::stringeq_temp_file ="example.dat", ... [per species] ...Filename for equilibrium temperature profile
inteq_temp_shape =0, ... [per species] ...Shape of equilibrium temperature profile
doubleeq_temp_v1 =1.0e3, MAIN_IONShape coefficients (ev)
doubleeq_temp_v2 =0.0, ... [per species] ...Shape coefficients (ev)
doubleeq_temp_v3 =0.0, ... [per species] ...Shape coefficients (ev)
doubleeq_temp_x1 =0.0, ... [per species] ...Shape coefficients
doubleeq_temp_x2 =0.0, ... [per species] ...Shape coefficients
doubleeq_temp_x3 =0.0, ... [per species] ...Shape coefficients
doubleeq_x2_r =1.7R value of second (upper) X-point
doubleeq_x2_z =10.0Z value of second (upper) X-point
std::stringeq_zeff_file ="zeff.dat"Filename for Z-effective profile for radiation source
inteq_zeff_shape =0Shape of analytic Z-effective profile
doubleeq_zeff_v1 =1.0Shape coefficients for analytic Z-effective profile
doubleeq_zeff_v2 =1.0Shape coefficients for analytic Z-effective profile
doubleeq_zeff_v3 =1.0Shape coefficients for analytic Z-effective profile
doubleeq_zeff_x1 =1.0Shape coefficients for analytic Z-effective profile
doubleeq_zeff_x2 =0.1Shape coefficients for analytic Z-effective profile
doubleeq_zeff_x3 =0.0Shape coefficients for analytic Z-effective profile
f0_param
doublef0_coarse_graining_alpha =1.0e-3Description needed
boolf0_coarse_graining_on =falseDescription needed
intf0_nmu =31Resolution of velocity space in perpendicular direction. Total perpendicular grid points is f0_nmu+1
intf0_nvp =15Resolution of velocity space in parallel direcion. Total parallel grid points is 2*f0_nvp+1
doublef0_smu_max =3.0Maximum perpendicular velocity of velocity space grid, normalized to thermal velocity
boolf0_update_analytic =falseSwitch on/off the update of the analytic part of the distribution function
doublef0_update_analytic_alpha =f0_grid_alphaSeparate alpha from sml_f0_grid_alpha for Maxwellian contribution
boolf0_update_analytic_local =falseIf .false. –> flux-surface average update, .true. –> local
doublef0_update_analytic_damp_width =0.5For width of \(\exp^{-(x/w)^2}\) damping factor for updating density/temperature of the analytical f0
boolf0_upsample =See Fortran description.See Fortran description.
intf0_upsample_cell_target =See Fortran description.See Fortran description.
intf0_upsample_corner_cell_target =See Fortran description.See Fortran description.
intf0_upsample_rate =See Fortran description.See Fortran description.
boolf0_upsample_skip_full_bins =See Fortran description.See Fortran description.
intf0_upsample_tile_size =See Fortran description.See Fortran description.
boolf0_velocity_interp_force_pseudo_inv =See Fortran description.See Fortran description.
boolf0_velocity_interp_pseudo_inv_delta_grid =See Fortran description.See Fortran description.
intf0_velocity_interp_pseudo_inv_order =21 (linear) or 2 (quadratic) pseudo-inverse interpolation, only used if f0_velocity_interp_use_pseudo_inv = .true.
boolf0_velocity_interp_pseudo_inv_particles_to_grid_petsc =See Fortran description.See Fortran description.
boolf0_velocity_interp_use_pseudo_inv =falseWhether to use pseudo-inverse interpolation between particles and velocity grid
doublef0_vp_max =3.0Maximum parallel velocity of velocity space grid, normalized to thermal velocity
field_decomp_param
intn_ghost_planes =1Number of ghost planes on each side of a subdomain. Toroidal overlap is not required, but may be useful for performance since it reduces the need to shift particles between ranks.
intn_ghost_vertices =3000Number of ghost vertices on each side of the subdomain within the poloidal plane. It must be large enough to ensure that all neighboring vertices of the subdomain are present. However, this depends entirely on the grid since there is no guarantee on the order of vertices in an XGC grid.
intn_phi_domains =n_ranksNumber of subdomains in the toroidal direction. By default, there is no poloidal decomposition.
intn_ranks =6Number of ranks across which the fields are decomposed. The larger this number, the less memory is used per rank. However, for best performance, this number should be as small as possible.
booluse_near_field =falseFor better load balancing, have each rank retain the field near its global domain decomposition in addition to its secondary domain
init_cond
boolic_add_zonal =falseInclude a n=0 component
doubleic_amp =1.0e-4Amplitude of the n!=0 initial perturbation
doubleic_amp_0 =0.0Amplitude of the n=0 initial perturbation
intic_delta_n =wedge_nSpacing between toroidal modes
intic_n_modes =(intNumber of toroidal modes
doubleic_phi_sign =magnetic_field.bp_sign*magnetic_field.bt_signInvert the sign of toridal direction in the eikonal
boolic_poloidal_gaussian =falseApply a gaussian modulation to the poloidal profile
doubleic_psi_0 =0.0Center of radial gaussian modulation
doubleic_q_sign =magnetic_field.bp_signInvert the sign of q in the eikonal
boolic_radial_gaussian =falseApply a gaussian modulation to the radial profile
boolic_resonant_modes =trueuse field aligned resonant modes
intic_resonant_nmax_real =1Maximal (real, not wedge) toroidal mode number in initial density when using sml_field_aligned_initial=.true. and ic_resonant_modes=.true.
intic_resonant_nmin_real =1Minimal (real, not wedge) toroidal mode number in initial density when using sml_field_aligned_initial=.true. and ic_resonant_modes=.true.
doubleic_sigma_psi =0.5Width of radial gaussian modulation
doubleic_sigma_theta =0.784Width of poloidal gaussian
doubleic_theta_0 =0.0Center of poloidal gaussian
load_balance_param
doublemax_mem_redist_gb =10.0Sets the maximum amount of memory per rank that can be allocated to particles, in gigabytes.
boolshift_before_push =falseCalls a particle shift to evenly distribute particles on plane right before the particle push
doublethreshold_to_rebalance =0.02How much better the projected timing of a proposed load redistribution must be than the current distribution in order to adopt the new one. e.g. 0.02 sets a threshold of 2% better.
std::stringupdate_method ="NoHistory"Methods for updating internal model of load distribution. “NoHistory” uses only the most recent time step, while “ExpHistory” averages the existing model with the new step’s timing information. Does not apply when weighting_algorithm is “Fortran”.
boolverbose =falseVerbose output of the internal load distribution model and load balancing decisions.
std::stringweighting_algorithm ="Fortran"Load balancing method. “Fortran” is the default since the newer methods are experimental. “ParticleBalance” does not incorporate timing data, but only tries to equally distribute particles. “SingleRegionBalance” currently tries to balance the push.
mon_param
intmon_flush_count =12Number of timing files to write. Set to 0 to use mon_flush_freq
intmon_flush_freq =0Frequency of timing files, if mon_flush_count is set to 0
neu_param
boolneu_adjust_n0 =See Fortran description.See Fortran description.
intneu_background_period =See Fortran description.See Fortran description.
doubleneu_dt =See Fortran description.See Fortran description.
boolneu_ebin_log =trueDescription needed
doubleneu_ebin_max =100.0Description needed
doubleneu_ebin_min =0.1Description needed
intneu_ebin_num =1Description needed
boolneu_exclude_private =See Fortran description.See Fortran description.
doubleneu_inpsi =See Fortran description.See Fortran description.
intneu_istep_max =See Fortran description.See Fortran description.
doubleneu_lost_rate_max =See Fortran description.See Fortran description.
doubleneu_n0 =See Fortran description.See Fortran description.
intneu_num =See Fortran description.See Fortran description.
doubleneu_recycle_rate =See Fortran description.See Fortran description.
intneu_start_time =2Description needed
doubleneu_temp0 =See Fortran description.See Fortran description.
performance_param
boolbackup_particles_on_device =falseWhether to store backup of electrons in device memory. Saves on host-device communication, but uses significantly more device memory.
boolcalculate_phi_ff_on_device =falseWith this option, potential is communicated and the electric field is calculated on every MPI process. This means additional computation, but less communication. This tradeoff is probably beneficial on all current flagship platforms, but this has not been verified.
boolcol_async_reassign =falseAsynchronously transfer collision workload between MPI ranks [Used when col_param:col_mode=4]
std::stringcollisions_solver ="lapack"Which collisions solver to use. “lapack” is always used for CPU-only simulations “ginkgo” is available for GPU and improves performance [Used when col_param:col_mode=4]
doubleginkgo_residual_reduction =1.0e-16For the Ginkgo solver, the residual reduction
intginkgo_max_iterations =300For the Ginkgo solver, the maximum number of iterations
booldecompose_fields =falseExperimental. This option splits field quantities used for the electron push kernel so that not every MPI process contains the field information of the entire simulation domain.
std::stringgyro_comm_method ="PlaneComm"Different methods for storing gyroaverage matrices. “PlaneComm” assigns each gyromatrix to a separate MPI process on each plane “PackedPlaneComm” assigns each gyromatrix to multiple MPI process on each plane and communicates the results locally. This is not currently supported “SelfComm” stores every gyromatrix on each MPI process, reducing communication but increasing storage requirements and computation.
doubleinitial_ptl_res_margin =1.1The particles are allocated with this initial buffer factor to delay or avoid having to reallocate these large arrays later in the simulation
intmesh_batch_size =default_batch_sizeCollisions are batched (multiple vertices run in parallel) for better performance. The best value may vary by platform. Typically higher is better (for GPU simulations) but memory usage is linearly proportional to this value. [Used when col_param:col_mode=4]
boolparticles_resident_on_device =default_residence_option(Sets particle information to reside in device memory. This improves performance by reducing host-device communication. Particles are still sent back to host memory for some operations. This option can and should be used on platforms with sufficient device memory, which includes all flagship platforms as of 2024.
boolstream_particles =default_streaming_option(Streams particles in chunks to hide time spent on host-device communication while not increasing device memory usage. This probably isn’t currently very helpful for performance, and is not actively supported.
booluse_unfused_electron_push_kernel =falseUse unfused electron push kernel. This algorithm may be faster than the default push algorithm
ptb_3db_param
intptb_3db_dasdt_opt =1Selector for how to compute dAs/dt for RMP penetration
doubleptb_3db_em_bd_width =0.05Blending width between A_s and full A representation
boolptb_3db_em_full_spec =falseIf false, only modes |m/q-n|<=sml_mode_select_mres_q are retained, if true, the remaining modes are retained in toroidal Fourier representation but without RMP response (Always true for ES).
doubleptb_3db_em_inpsi =-1.0Inner boundary of RMP representation in A_s
doubleptb_3db_em_outpsi =1.1Outer boundary of RMP representation in A_s
intptb_3db_es_to_em_dt_ratio =1Ratio of ES to EM time step size in RMP penetration calculation with ptb_3db_mode==2 (also: the number of time steps over which the perturbed current is averaged)
intptb_3db_file_format =1Format of input file with perturbed field data: (0) toroidal Fourier coefficients in R,Z, (1) read from M3D-C1 file using fusion-io (2) Generic test data (no file)
std::stringptb_3db_filename =See Fortran description.See Fortran description.
intptb_3db_m3dc1_timeslice =See Fortran description.See Fortran description.
intptb_3db_mode =0Mode of operation: (0) static RMP field (ES), or fully self-consistent RMP field (EM version) (2) self-consistent RMP field with time-averaged field-equations (EM version)
intptb_3db_mstep_em =mstepNumber of EM time steps in RMP penetration calculation with ptb_3db_mode==2
intptb_3db_mstep_es =0Number of ES time steps in RMP penetration calculation with ptb_3db_mode==2
doubleptb_3db_mult_factor =See Fortran description.See Fortran description.
intptb_3db_nr =See Fortran description.See Fortran description.
intptb_3db_ntor_min =See Fortran description.See Fortran description.
intptb_3db_num_mpol =See Fortran description.See Fortran description.
intptb_3db_num_ntor =1Number of toroidal mode numbers (<= sml_nphi_total)
intptb_3db_nz =See Fortran description.See Fortran description.
intptb_3db_rampup_time =1000Number of time steps over which the perturbed field is ramped up
boolptb_3db_rampup_vac =true(.true.) Ramp up perturbed field slowly, (.false.) turn on perturbed field abruptly
doubleptb_3db_screening_fac1 =See Fortran description.See Fortran description.
doubleptb_3db_screening_fac2 =See Fortran description.See Fortran description.
boolptb_3db_screening_on =See Fortran description.See Fortran description.
doubleptb_3db_screening_psi1 =See Fortran description.See Fortran description.
doubleptb_3db_screening_width1 =See Fortran description.See Fortran description.
doubleptb_3db_screening_width2 =See Fortran description.See Fortran description.
boolptb_3db_single_mode_input =See Fortran description.See Fortran description.
intptb_3db_single_mode_ntor =See Fortran description.See Fortran description.
intptb_3db_start_time =1Time step in which perturbed field is switched on
doubleptb_3db_update_alpha =See Fortran description.See Fortran description.
ptl_param
doubleptl_charge_eu =-1.0, ... [per species] ...Particle charge in EU
intptl_collision_grid_index =nonadiabatic_idx, ... [per species] ...Which collision grid to use. This option can be used to assign species to share a collision grid, improving performance of the collision operator. By default, each species has its own collision grid. ptl_collision_grid_index = 0, 1, 2, 2 would mean the third and fourth species share a collision grid.
boolptl_dynamic_f0 =default_dynamic_f0, ... [per species] ...Whether f0 can evolve in time
std::stringptl_f_analytic_shape =default_f_analytic_shape, ... [per species] ...f_analytic_shape shape: Maxwellian, SlowingDown or None
std::stringptl_f_init_file ="i_initial_f.bp", ... [per species] ...Input file name for initial distribution
std::stringptl_input_file_dir ="./"Directory of input file for loading initial distribution
boolptl_is_gyrokinetic =!species_is_electron, ... [per species] ...Whether particles of this species are gyrokinetic or drift kinetic
std::stringptl_marker_type ="TotalF", ... [per species] ...Marker type: ‘ReducedDeltaF’, ‘TotalF’, ‘FullF’, or ‘None’ (placeholder for adiabatic species). excluding the neoclassical terms in the gyrokinetic equation
doubleptl_mass_au =2.0e-2, ... [per species] ...Particle mass in AU
boolptl_maxwellian_init =true, ... [per species] ...whether initial distribution is maxwellian
intptl_nsp =1Number of ion species in the simulation
intptl_num =0Initial number of particles per species per OpenMP thread per MPI rank. This method is an alternative to ptl_num_per_vertex. All species have the same value.
intptl_num_per_vertex =10000, MAIN_IONInitial number of particles of each species per vertex per plane. e.g. Doubling the number of planes will double the number of particles in the simulation. The value refers to the average number of particles per vertex. It does not imply that each vertex has this number of associated particles initialized; the spatial distribution is controlled by other parameters.
doubleptl_special_en_ev =7205.0Initial energy of particle if using sml_load_single_ptl
doubleptl_special_phi =0.0Initial phi coordinate of particle if using sml_load_single_ptl
doubleptl_special_pitch =0.276Initial pitch angle of particle if using sml_load_single_ptl
doubleptl_special_r =magnetic_field.equil.axis.rInitial r coordinate of particle if using sml_load_single_ptl
doubleptl_special_z =magnetic_field.equil.axis.zInitial z coordinate of particle if using sml_load_single_ptl
std::stringptl_weight_evo_eq =default_weight_evo_eq, ... [per species] ...Specifies the weight evolution equation method: Direct, PDE, or None. - Direct integration: Is used in the Total-F method, where the source term and particle contributions are evaluated separately. Refer to Section II C of Hager et al., Phys. Plasmas 29, 112308 (2022) for more details. - PDE: The PDE (Partial Differential Equation) method, where the source term and particle contributions are evaluated together (delta-f). - None: No weight evolution is applied.
rad_param
std::stringrad_filename ="mist_adas_xgc1.dat"Filename containing radiation information
doublerad_impurity_fraction =0.1simplest model : n_imp / n_e is constant
doublerad_inpsi =magnetic_field.inpsiInner boundary for impurity radiation
doublerad_outpsi =magnetic_field.outpsiOuter boundary for impurity radiation
intrad_species =-1Which species to use for density if not using a Z-effective profile
intrad_start_time =1Start time for impurity radiation in time steps
boolrad_use_fix_charge =trueUse fixed Z for impurity
boolrad_use_zeff_profile =falseUse a psi-dependent Z-effective for radiation.
doublerad_z =6.0! fixed Z for impurity - Z_Carbon –> 6, Z^2 –> 36
resamp_param
boolresamp_discard_var_bins =falseDiscard resampled bins that increase the variance by factor of resamp_var_limit
boolresamp_distribute_evenly_subbins =falseWhether to fill/remove evenly in 1x1 velocity cells in the bin when resamp_tile_size > 1 and upsampling/downsampling
std::stringresamp_down_choice ="weight"option arg for downsampled new particle selection: ‘random’,’weight’,’weight+replace’,’volume’ weight: keep particles with largest w0*w1 absolute weight, deterministic weight+replace: keep particles with largest w0*w1 absolute weight, allow multiple copies of same particle if split weight is still larger than next unsplit particle volume: keep particles with largest phase space volume, deterministic
boolresamp_fill_empty =falseWhether to fill empty bins
boolresamp_fullf_on =falseWhether to resample the full-f weights in addition to delta-f weights
boolresamp_grid_ineq_on =falseSwitch for using inequality constraints for the grid charge for resampling
doubleresamp_highv_max =10.0energy cutoff of the high velocity bins v_para>f0_vp_max and v_perp>f0_smu_max
doubleresamp_highv_max_ratio =4.0Downsampling threshold for high-velocity bins
doubleresamp_ineq_tol =1.0e-4Threshold for relative error in the inequality constraints in the QP optimization
doubleresamp_ineq_tol_max =1.0e-3Maximal threshold for relative error in inequality constraints for retried bins
boolresamp_keep_downsamples =falseRetain downsampling results with high variance, mainly for preventing buildup. Only relevant if resamp_discard_var_bins is .true.
boolresamp_keep_upsamples =falseRetain upsampling results with high variance, for filling for pseudoinverse. Only relevant if resamp_discard_var_bins is .true.
doubleresamp_max_ratio =1.5max ratio of (# of ptl)/(target # of ptl) in bin for auto-downsample
doubleresamp_max_shift =0.1maximum shift in local coordinates for ‘copy’, ‘weight+replace’
intresamp_max_target =4Overrides the number of constraints in determining the target # of ptl of a bin
doubleresamp_min_ratio =0.5min ratio of (# of ptl)/(target # of ptl) in bin for auto-upsample
std::stringresamp_node_file ="resample.node"File containing the vertex positions of the mesh for which to resample
intresamp_nphi_new =1Number of poloidal planes in simulation with new mesh
boolresamp_output_problem_bins =falseSwitch to output failed or high-variance bins as to .bp files
intresamp_rate =2timesteps between subsequent resamples, placedholder, in practice ~ sml_f_source_period
boolresamp_restart =falsePerform resampling before dumping the final restart file
boolresamp_restart_read =falseWhether to read a restart file written from a simulation with different grid
boolresamp_retry =falseRetry QP optimization for failed bins with relaxed inequality constraints
intresamp_tile_size =2Bin size on the velocity space grid in cells (not vertices) (input parameter)
std::stringresamp_up_choice ="random"option arg for upsampled new particle selection: ‘random’,’copy’,’poisson’ currently added random: random velocity coordinates for new particles in bin copy: add new particles as copies of old particles with largest absolute w0*w1 weight poision: add new particles as poisson disc samples generated from the old particle set.
doubleresamp_var =1.0e4threshold for relative standard deviation in bin for auto-resample
doubleresamp_var_limit =3.0Increase in relative bin variance for flagging for possible rejection
sml_param
boolf0_update_analytic =falseSwitch on/off the update of the analytic part of the distribution function
boolf0_update_analytic_local =falseIf .false. –> flux-surface average update, .true. –> local
boolsml_00_efield =trueFlux-surface averaged potential not used for calculating the electric field if .false.
intsml_00_npsi =150Size of the uniform 1D psi-grid
boolsml_0m_efield =trueThe axisymmetric potential variation \(\langle \phi-\langle\phi\rangle\rangle_T\) is set to zero if .false.
boolsml_3db_on =falseToggle for ptb_3db
intsml_add_pot0 =0Additional electrostatic potential: (0) for off, (1) for reading data from file (2) for simple neoclassical axisymmetric field (not operational)
std::stringsml_add_pot0_file ="pot0.dat"Name of the file containing the potential data. Two formats are supported: Text file: The first line is the number of points, which must equal grid.nnode. Each subsequent line is the value at a point. ADIOS2 file (.bp): The array should be called “pot” and be size grid.nnode.
intsml_add_pot0_mixing_time =1With 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)
boolsml_adiabatic_from_poisson =See Fortran description.See Fortran description.
boolsml_ampere_natural_boundary =falseAmpere counterpart of sml_poisson_natural_boundary. When using this option .true., should we force sml_poisson_natural_boundary to .true.?
doublesml_bd_ext_delta1 =0.01Outward shift of the inner boundary of the axisymmetric Poisson solver relative to sml_inpsi (in norm. pol. flux)
doublesml_bd_ext_delta1h =bd_ext_delta1Outward shift of the inner boundary of the non-axisymmetric Poisson solver relative to sml_inpsi (in norm. pol. flux)
doublesml_bd_ext_delta2 =0.02Outward shift of the inner boundary of the RHS of the axisymmetric Poisson solver relative to sml_inpsi (in norm. pol. flux)
doublesml_bd_ext_delta2h =bd_ext_delta2Outward shift of the inner boundary of the RHS of the non-axisymmetric Poisson solver relative to sml_inpsi (in norm. pol. flux)
doublesml_bd_ext_delta3 =bd_ext_innerInward shift of the outer boundary of the axisymmetric Poisson solver relative to sml_outpsi (in norm. pol. flux)
doublesml_bd_ext_delta3h =bd_ext_delta3Inward shift of the outer boundary of the non-axisymmetric Poisson solver relative to sml_outpsi (in norm. pol. flux)
doublesml_bd_ext_delta4 =bd_ext_rhs_innerInward shift of the outer boundary of the RHS of the axisymmetric Poisson solver relative to sml_outpsi (in norm. pol. flux)
doublesml_bd_ext_delta4h =bd_ext_delta4Inward shift of the outer boundary of the RHS of the non-axisymmetric Poisson solver relative to sml_outpsi (in norm. pol. flux)
doublesml_bd_ext_delta_ai =0.0Shift of inner boundary of n!=0 Ampere solver (LHS) outwards relative to sml_inpsi
doublesml_bd_ext_delta_ao =0.0Shift of outer boundary of n!=0 Ampere solver (LHS) inwards relative to sml_outpsi
boolsml_bd_ext_delta_in_simple00 =falseIf .true., the outer boundary of the simple 1D Poisson solver that provides the initial guess of the flux-surface averaged potential is determined as the minimum of [sml_outpsi-sml_bd_ext_delta3,psi_xpt-sml_bd_ext_delta4] instead of [sml_outpsi-sml_bd_ext_delta3,psi_xpt].
doublesml_bd_ext_delta_ji =0.0Shift of inner boundary of n!=0 Ampere solver (RHS=current density) outwards relative to sml_inpsi
doublesml_bd_ext_delta_jo =0.0Shift of outer boundary of n!=0 Ampere solver (RHS) inwards relative to sml_outpsi
doublesml_bd_ext_near_wall =0.0To move the outer boundary of the Poisson solver away from the inner wall (in m)
doublesml_bd_max_r =1.0e3Minimum R of simulation
doublesml_bd_max_z =1.0e3Maximum Z of simulation
doublesml_bd_min_r =1.0e-4Minimum R of simulation
doublesml_bd_min_z =-1.0e3Maximum Z of simulation
intsml_bounce =is_core_simulation ? 2 : 1Bounce routine switch 0 for off, 1 for inner boundary, 2 for both boundaries
doublesml_bounce_buffer =0.0Buffer width between sml_outpsi and where the particle actually bounces (must be >=0)
intsml_bounce_zero_weight =0If ==1 and bounce>0, set particle weights to zero after bouncing from the outer boundary
doublesml_bp_sign =1.0Option to flip sign of poloidal field
doublesml_bt_sign =-1.0Option to flip sign of toroidal field
doublesml_core_ptl_fac =See Fortran description.See Fortran description.
doublesml_core_ptl_psi =See Fortran description.See Fortran description.
boolsml_create_analytic_equil =falseCreates a simple analytic magnetic field instead of reading from a file
boolsml_create_analytic_grid =falseOption to use a generated grid instead of reading a grid from file. The grid is composed of concentric circles of vertices. analytic_grid_param can be used to control basic grid properties. Keep analytic grid options simple: number of surfaces, and axis_r
boolsml_current_drive_on =falseWhether to use dynamic current drive via adjustments of the loop voltage The controller output is implemented as \(V_{loop} = 2\pi R \eta_\parallel P \left[\Delta j_\parallel + I \int_0^t \Delta j_\parallel \mathrm{d}\tau + D \frac{\partial \Delta j_\parallel}{\partial t} \right] ` Time integral and derivative are with respect to the ion time step instead of time, so :math:`1/I\) is the integration time scale, and \(D\) is the derivative time scale
boolsml_dpot_bd_apply =falseDamp (n=0,m>0) potential towards the magnetic axis
doublesml_dpot_bd_width =0.02Decay length (normalized flux) for (n=0,m>0) potential towards the magnetic axis
doublesml_dpot_te_limit =64.0Max absolute value of dpot/temp in getf0
doublesml_dpot_te_limit_n0 =64.0Limits the magnitude of the normalized axisymmetric potential e*dphi_0/T_e
boolsml_drift_on =trueToggle for using drift
doublesml_dt =0.001Time step (s)
boolsml_dwdt_exb_only =falseexcluding grad-b drift in dwdt
boolsml_dwdt_fix_bg =false1-w factor in dwdt
std::stringsml_ele_file ="example_file.ele"The element file
boolsml_electron_on =falseUse kinetic electrons
boolsml_em_b_para_eff =falseEffective dB_|| via a modified grad-B drift (Joiner et al., PoP, 2010)
boolsml_em_control_variate =falseSwitch for use of control variate method
intsml_em_control_variate_niter =1Number of iterations for Ampere solve with control-variate method
boolsml_em_dasdt_filter_on =falseSwitch for applying Fourier filters on RHS of dAs/dt equation (pullback mode 4)
boolsml_em_dasdt_hypvis =falseUse radial hyperviscosity in dA_s/dt (push_As)
boolsml_em_exclude_private =trueMakes the private flux region electrostatic if .true.
boolsml_em_mixed_variable =trueSwitch for use of mixed-variable formulation
boolsml_em_n0 =falseInclude n=0 electromagnetic mode
doublesml_em_pullback_dampfac =1.0Damping term gamma on -b.grad(phi) in pullback mode 4
std::stringsml_em_pullback_method ="Electrostatic"“Electrostatic”: mixed-variable pullback with dA_s/dt=0, “IdealMHD”: pullback using Ohm’s law dA_s/dt + b.grad(phi) = 0
intsml_em_pullback_mode =3mixed-variable pullback with dA_s/dt=0,
pullback using Ohm’s law dA_s/dt + b.grad(phi) = 0
boolsml_em_use_dpot_te_limit =falseIn EM simulation: whether to force usage of the min-max limiter on the turbulent potential fluctuation
doublesml_en_order_kev =0.2Characteristic ion energy (keV) –> controls reference time (toroidal ion transit time)
boolsml_exclude_private =falseThis is already in Simulation class; should consolidate
boolsml_exclude_private_turb =trueIf .true. the private-flux region has no turbulence
doublesml_f0_grid_alpha =0.0Fraction 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.
intsml_f0_grid_alpha_start =1For 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
doublesml_f0_grid_init_ptl_imbal =See Fortran description.See Fortran description.
intsml_f0_grid_lbal_period =See Fortran description.See Fortran description.
doublesml_f0_grid_max_ptl_imbal =See Fortran description.See Fortran description.
doublesml_f0_grid_min_ptl_imbal =See Fortran description.See Fortran description.
intsml_f_source_period =1Period (in time steps) of when f_source is called
boolsml_ff_boundary_zero_p =falsezero out p for non-exist field following position.
intsml_ff_order =4Order of RK scheme used for field following. Can be 1, 2, or 4.
intsml_ff_step =2Number of steps taken when projecting the particle location onto the midplane
boolsml_field_aligned_initial =falseUse field aligned initial condition
boolsml_field_solver =trueWhether to solve for fields. Scatter and solve are skipped if set to false
boolsml_flat_electron_density =falseIn case of adiabatic electrons, whether to use a uniform electron background density
boolsml_flat_marker =trueUse 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. Does not applied to FullF
doublesml_flat_marker_cutoff1 =4.0Normalized (to \(v_{th}\)) parallel velocity cutoff of flat marker distribution
doublesml_flat_marker_cutoff2 =flat_marker_cutoff1Like sml_flat_marker_cutoff1 but for the perpendicular velocity
doublesml_flat_marker_decay_start1 =3.5Normalized (to \(v_{th}\)) velocity at which the marker distribution decays exponentially
doublesml_flat_marker_decay_start2 =flat_marker_decay_start1Like sml_flat_marker_decay_start1 but for the perpendicular velocity
doublesml_flat_marker_width1 =0.5Decay length of flat marker distribution in the normalized (to \(v_{th}\)) parallel velocity
doublesml_flat_marker_width2 =flat_marker_width1Like sml_flat_marker_width1 but for the perpendicular velocity
boolsml_grad_psitheta =falseThis is already in Simulation class; should consolidate
doublesml_gradpsi_limit =1.0e-3If \(|\nabla\psi|\) is smaller than this threshold, \(\nabla\psi\) is computed
intsml_grid_nrho =6Size of the gyroradius grid (should be such that the resolution is >= 0.5 rho_i)
intsml_guess_table_size =500Size of the hash table used to narrow down the number of triangles in which to search a particle
boolsml_helmholtz_spectral =falseWhether to solve Helmholtz-type equations with toroidally spectral solver
boolsml_heuristic_priv_pot =falseOverride the Poisson solver in the private region and replace the solution by the separatrix potential scaled with the initial electron temperature
boolsml_ignore_f0g =falseIgnore f0g in f0 calculation. When true, it skips the update of den_f0_h, instead using the initialized value (which is zero). This is helpful to density conservation of heating when f0g is noisy due to insufficient number of particles
intsml_increase_ptl_factor_int =1the factor to increase when sml_increase_ptl_tor
doublesml_increase_ptl_rand_mu =1.0e-4random noise to rho_parallel (v_parallel) - to avoid identical marker of sml_increase_ptl_factor_int
doublesml_increase_ptl_rand_phi =1.0e-1random noise to phi (applied to core only) to avoid identical marker of sml_increase_ptl_factor_int
doublesml_increase_ptl_rand_vp =1.0e-4random noise to mu - to avoid identical marker of sml_increase_ptl_factor_int
doublesml_increase_ptl_rand_w0 =1.0e-4random noise to w0 - to avoid identical marker of sml_increase_ptl_factor_int
doublesml_increase_ptl_rand_w1 =1.0e-4random noise to w1 - to avoid identical marker of sml_increase_ptl_factor_int
boolsml_increase_ptl_tor =falseincrease # of particle with different toroidal angle when reading restart file
doublesml_initial_deltaf_noise =1.0e-3Delta-f particle weights are initialized with this level of noise
doublesml_inpsi =0.0Inner psi boundary for the simulation
std::stringsml_input_file_dir ="./"Directory containing the grid files
boolsml_iter_solver =trueSplit 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.
doublesml_iter_solver_atol =See Fortran description.See Fortran description.
boolsml_iter_solver_converge =falseIf .true., keep taking iterations in PETSc until termination criteria is met, i.e. until a residual tolerance is reached or it is determined that the iterations have diverged or exceeded sml_iter_solver_max_it. If .false., take a fixed number of iterations set from sml_iter_solver_niter.
intsml_iter_solver_max_it =See Fortran description.See Fortran description.
intsml_iter_solver_niter =See Fortran description.See Fortran description.
intsml_iter_solver_precond_type =See Fortran description.See Fortran description.
doublesml_iter_solver_rtol =See Fortran description.See Fortran description.
boolsml_limit_marker_den =falseWhether to limit marker density
doublesml_limit_marker_den_fac =See Fortran description.See Fortran description.
boolsml_load_single_ptl =falseOption to run simulation with a single particle. The particle’s initial phase is determined by the inputs ptl_special_r etc. This option overrides ptl_num and ptl_num_per_vertex
boolsml_loop_voltage_fsa =trueMake loop voltage and current drive flux-functions if true (default: true)
boolsml_loop_voltage_on =falseInductive current drive: loop voltage (from Faraday’s law curl(E)=-dB/dt)
doublesml_low_mu_fill_population =0.0Used 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.)
doublesml_marker_min_temp =10.0minimum temperature of markers (only if sml_flat_marker=.false.)
doublesml_marker_temp_factor =1.0Initial loading with Maxwellian marker distribution with virtual temperature \(T_{marker} = \alpha*T_{plasma}\) (only if sml_flat_marker=.false.)
doublesml_marker_temp_factor2 =See Fortran description.See Fortran description.
doublesml_max_imbalance =See Fortran description.See Fortran description.
doublesml_max_loading_factor =10.0Upper limit for loading factor (default is conservative, might need higher value)
doublesml_min_loading_factor =0.1Lower limit for loading factor (default is conservative, might need lower value; lower values increase time for loading)
boolsml_mms =See Fortran description.See Fortran description.
doublesml_mms_alpha =See Fortran description.See Fortran description.
doublesml_mms_beta =See Fortran description.See Fortran description.
doublesml_mms_gamma =See Fortran description.See Fortran description.
boolsml_mod_adiabatic =See Fortran description.See Fortran description.
doublesml_mod_adiabatic_psi_in =See Fortran description.See Fortran description.
doublesml_mod_adiabatic_psi_out =See Fortran description.See Fortran description.
boolsml_mode_select_bands_on =falseDetermine the number of side bands to include by using grid%m_max_surf(i)
doublesml_mode_select_bd_width =0.01width of boundary envelope
intsml_mode_select_cutoff =2Factor for cutoff in Fourier space, determines grid%m_max_surf(i) The default is the Nyquist limit sml_mode_select_cutoff=2
intsml_mode_select_cutoff_mode =See Fortran description.See Fortran description.
doublesml_mode_select_damp_width =See Fortran description.See Fortran description.
boolsml_mode_select_div_mix =trueWhether to blend filtered and unfiltered data near the divertor plates (set .false. for increasing stability in EM simulations)
doublesml_mode_select_inpsi =-0.1inner boundary for mode selection
boolsml_mode_select_keep_axisym =See Fortran description.See Fortran description.
doublesml_mode_select_max_kth_rho =1.0Max. k_theta*rhoi retained in poloidal Fourier filter
intsml_mode_select_mmax =25Highest pol. mode number for Fourier filter
intsml_mode_select_mmin =0Lowest pol. mode number for Fourier filter
intsml_mode_select_mode =0Fourier filter mode: 0) No filter, 1) single-n, 4) m_range (mmin..mmax) 2 or 5) n range + resonant m 3 or 6) n range + m range
intsml_mode_select_mres_q =3number of pol. mode numbers around the resonant mode divided by q; –> |m/q - n| <= mres_q or |m -n*q| <= mres_q*q
intsml_mode_select_n =1Toroidal mode number for Fourier filter
intsml_mode_select_nmax =1Highest numerical tor. mode number for Fourier filter (0,1,…,sml_nphi_total-1)
intsml_mode_select_nmax_real =999Highest 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
intsml_mode_select_nmin =1Lowest numerical tor. mode number for Fourier filter (0,1,…,sml_nphi_total-1)
intsml_mode_select_nmin_real =0Lowest 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
boolsml_mode_select_no_m0 =See Fortran description.See Fortran description.
intsml_mode_select_num_m_damp =See Fortran description.See Fortran description.
doublesml_mode_select_outpsi =10.0outer boundary for mode selection
doublesml_mode_select_psitol =See Fortran description.See Fortran description.
intsml_mode_select_sol_mode =00: 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 2: Retain sine and cosine modes and DO NOT use a window function (Applies only to filter modes sml_mode_select_mode={5,6}!)
intsml_mode_select_use_minm =See Fortran description.See Fortran description.
long long intsml_monte_num =monte_num_minimumNumber of Monte Carlo points to use in calculating various simulation volumes. The actual number of points used may depend on number of MPI ranks, OpenMP threads, and particles.
intsml_mstep =3000Number of time steps to run
intsml_ncycle_half =30Number of subcycles in electron push RK step 1. Total number of subcycles is twice this value.
boolsml_neutral =falseSwitch for using the neutrals
boolsml_no_fp_in_f =falseIf .true. the distribution function used for the source routines will not include particle information (only for testing)
boolsml_no_turb =falseSet all non-axisymmetric field perturbations to zero (electromagnetic version only)
std::stringsml_node_file ="example_file"The grid file
intsml_node_file_spacing =1Option to take every nth grid file, starting from 0001
boolsml_node_vol_monte =node_vol_monte_defaultCalculate node volume using Monte-Carlo method (true), or analytic method (false)
intsml_nphi_total =16Number of planes in the simulation
intsml_nsurf3 =See Fortran description.See Fortran description.
intsml_nsurf3_2 =See Fortran description.See Fortran description.
doublesml_outpsi =1.05Outer psi boundary for the simulation
doublesml_outpsi_priv1 =0.97Outer boundary (for Poisson solver), normalized poloidal flux
doublesml_outpsi_priv2 =2.0Outer boundary (for Poisson solver, 2nd private region), normalized poloidal flux
boolsml_plane_major =See Fortran description.See Fortran description.
boolsml_poisson_0m_full_geo =falseWhether to use full toroidal geometry in the axisymmetric Poisson solver (w/o approximation B_R<<B, and B_Z<<B)
boolsml_poisson_adia_wall =falseEXPERIMENTAL! DON’T USE UNLESS ADVISED BY AN EXPERT If true, an adiabatic wall condition is used (no polarization, n_i=0, n_e!=0) in the axisymmetric solver; this is an experimental option and should be used together with sml_sheath_mode=1 and sml_sheath_init_pot_factor=0.
boolsml_poisson_bias =falseAdd bias potential
doublesml_poisson_bias_amp =10.0Ampltude of the bias potential in Volt
doublesml_poisson_bias_amp2 =10.0Additional Ampltude of the bias potential in Volt for the kick drive
intsml_poisson_bias_freq =10000Frequency in Hz of the bias potential
boolsml_poisson_bias_kick =falseIf true, a periodic kick drive instead of a continuous sinusoidal drive is used
doublesml_poisson_bias_psic =0.5Center position of bias potential phi_bia ~ exp(-(psi-psi0)^2), psi_normalized
doublesml_poisson_bias_psiw =0.02Decay length of the radial envelope of the bias potential
intsml_poisson_bias_start =1Time step in which the bias potential is started
boolsml_poisson_natural_boundary =falseSet the potential on the solver boundary equal to the flux-surface averaged potential (implies \(\delta\phi_wall=0\)). This is supposed to prevent a sheath-like potential drop at the mesh boundary and make sure that the logical sheath model takes care of the sheath physics. Also, it should prevent \(\delta\phi/\phi\sim1\).
boolsml_poisson_neutralize_net_charge =falseApply uniform SOL/private correction to neutralize net charge
boolsml_poisson_nonlinear =falseWhether to use approximately nonlinear Poisson solver (i.e., linearized around the the previous time step)
boolsml_poisson_use_bc =false(XGCa only) False: 00-bc is phi=0 everywhere; true: 00-boundary
boolsml_pol_decomp =trueSwitch to use poloidal domain decomposition
boolsml_positive_phi00_sol =falseIf .true., it is made sure that the flux-surface averaged potential in the scrape-off layer is positive by adding a global constant to the result of the field solver.
doublesml_ptl_imbal_ion =See Fortran description.See Fortran description.
boolsml_radiation =falseSwitch for a simple radiation module using part of the ADAS data base (must be configured with the rad_param namelist)
boolsml_read_eq =trueRead magnetic equilibrium from a .eqd file
boolsml_read_eq_m3dc1 =falseRead magnetic equilbrium from an m3dc1 result Ignore read_eqd if read_m3dc1 is true
boolsml_reduce_core_ptl =See Fortran description.See Fortran description.
boolsml_replace_pot0 =falseIf .true., replace Poisson solution with external data, if .false., add external potential to Poisson solution.
boolsml_resamp_on =falseSwitch to use particle resampling
boolsml_restart =falseWhether to restart if possible
boolsml_restart_write_after_last_timestep =trueWhether to write a checkpoint file after the final time step of the simulation.
intsml_restart_write_period =10000000Number of time steps between each simulation checkpoint.
boolsml_rgn1_pot0_only =falseIf .true., the axisymmetric Poisson equation is solved only inside the separatrix.
doublesml_rhomax =1.0e-2Upper cutoff of the gyroradius grid (should be the gyroradius of the fastest ions of interest)
intsml_sep2_surf_index =See Fortran description.See Fortran description.
intsml_sep_surf_index =See Fortran description.See Fortran description.
boolsml_separate_n0 =default_separate_n0Use separate n0 poisson solver. True by default if total-f, false if reduced-deltaf. Must be true for total-f.
doublesml_sheath_adjust_factor =0.25Damping factor for slower adjustment of the sheath potential if sml_sheath_mode=(1,3)
boolsml_sheath_global_balance =falseWhether to use the global loss balance functionality in sheath_mode=2
boolsml_sheath_init_pot_auto =See Fortran description.See Fortran description.
doublesml_sheath_init_pot_factor =See Fortran description.See Fortran description.
intsml_sheath_mode =0Type of sheath: (0) None, absorbing wall; !! (1) Insulating logical sheath; the sheath potential is adjusted similar to a PI-controller based on the local current to/from the wall to make the local current zero; !! (2) Insulating logical sheath; uses algorithm similar to S. E. Parker et al.’s original logical sheath: !! Electrons leaving the mesh are tracked and sorted by energy; then the cutoff energy that zeros out the local current is determined; !! (3) Conducting sheath; requires sml_poisson_natural_boundary=.true.; uses the value of the axisymmetric electrostatic potential on the wall as the sheath reflection cutoff for electrons.
boolsml_sheath_adjust =falseWhether to adjust the sheath
boolsml_source =falseSwitch for using the heat source
std::stringsml_surf_file ="example_file.flx.aif"The flux surface file
boolsml_symmetric_f =is_XGCa ? true : falseEnforce axisymmetry of the total distribution function on the grid
boolsml_symmetric_f0g =See Fortran description.See Fortran description.
boolsml_thermal_bath_on =falseSwitch for thermal bath
doublesml_tri_psi_weighting =See Fortran description.See Fortran description.
boolsml_turb_efield =trueE-field calculated only with \(<\phi>\) if .false. psn%dpot will still contain all (n=0,|m|>0) and (|n|>0,m) modes
boolsml_update_ampere_solver =falseIf .true. density and temperature in the Ampere’s law solver operators will be updated every sml_update_ampere_solver_nstep time steps
intsml_update_ampere_solver_nstep =1Number of time steps between subsequent updates of the Ampere’s law solver operators
doublesml_update_g_alpha =0.0Fraction of the numerical marker particle density that is transferred to the g2
boolsml_update_poisson_solver =falseWhether poisson solver is updated
intsml_update_poisson_solver_nstep =1Number of time steps between subsequent updates of the Poisson solver operators
boolsml_update_poisson_turb =falseUpdate the n != 0 Poisson solver, too (energy conservation?)
boolsml_use_loading_factor =falseMarker 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
boolsml_use_pade =falseUse Pade approximation for short wavelengths
intsml_wedge_n =1Simulate a wedge of 2pi/sml_wedge_n of the full torus
boolsml_write_wts_part_output =See Fortran description.Whether to write weight partition output in set_weights subroutine
boolsml_zero_inner_bd =falseIf .true., use Dirichlet boundary condition \(\phi=0\)
boolsml_zero_inner_bd_turb =trueIf .true., use Dirichlet boundary condition \(\delta\phi=0\), !! if .false., set the magnetic axis to the flux-surface average of the !! first flux-surface (provides continuity of the m=0 mode). !! (requires the inner boundaries be set to <0)
smooth_param
doublesmooth_fourier_filt_bd_width =0.02Boundary width (tanh) for Fourier filter
doublesmooth_fourier_filt_inpsi =-0.1Inner boundary for Fourier filter (outside of boundary will be zero!)
intsmooth_fourier_filt_maxm =30Maximal poloidal mode number for SOL Fourier filter
intsmooth_fourier_filt_minm =0Minimal poloidal mode number for SOL Fourier filter
boolsmooth_fourier_filt_on =falseSwitch for additional SOL Fourier filter
doublesmooth_fourier_filt_outpsi =10.0Outer boundary for Fourier filter (outside of boundary will be zero!)
boolsmooth_hyp_vis_parallel_on =falseSwitch for 2nd order accurate 4th derivative field-aligned hyperviscosity
doublesmooth_hyp_vis_parallel =1.0Strength of the parallel hyperviscosity; sml_dt/smooth_hyp_vis_parallel corresponds to the decay time of a mode with k_x=pi/dx, where dx is the local mesh size
boolsmooth_hyp_vis_rad_on =falseSwitch for 2nd order accurate 4th derivative radial (grad(psi)) hyperviscosity
doublesmooth_hyp_vis_rad =0.1Strength of the radial hyperviscosity; sml_dt/smooth_hyp_vis_rad corresponds to the decay time of a mode with k_x=pi/dx, where dx is the local mesh size [Also used when sml_param:sml_em_dasdt_hypvis=true]
doublesmooth_hyp_vis_rad_priv =1.0Strength of the radial hyperviscosity in the private region; sml_dt/smooth_hyp_vis_rad corresponds to the decay time of a mode with k_x=pi/dx, where dx is the local mesh size [Also used when sml_param:sml_em_dasdt_hypvis=true]
doublesmooth_pol_d0 =0.1Smoothing length for poloidal smoothing
boolsmooth_pol_efield =falseSmoothing of poloidal potential before computing the poloidal field
intsmooth_pol_width =3Width for poloidal smoothing
doublesmooth_sol_filt_lp0 =See Fortran description.See Fortran description.
doublesmooth_sol_filt_width =See Fortran description.See Fortran description.
src_param
doublesrc_current_drive_d =1.0Current drive PID controller: factor for derivative controller (\(D\))
doublesrc_current_drive_i =0.01Current drive PID controller: factor for integral controller (\(I\))
doublesrc_current_drive_p =0.4Current drive PID controller: factor for proportional controller (\(P\))
intsrc_current_drive_start_time =1Time step at which current drive turns on
doublesrc_decay_width1 =See Fortran description.See Fortran description.
doublesrc_decay_width2 =See Fortran description.See Fortran description.
doublesrc_decay_width3 =See Fortran description.See Fortran description.
doublesrc_decay_width4 =See Fortran description.See Fortran description.
doublesrc_heat_power1 =See Fortran description.See Fortran description.
doublesrc_heat_power2 =See Fortran description.See Fortran description.
doublesrc_heat_power3 =See Fortran description.See Fortran description.
doublesrc_heat_power4 =See Fortran description.See Fortran description.
intsrc_ishape1 =See Fortran description.See Fortran description.
intsrc_ishape2 =See Fortran description.See Fortran description.
intsrc_ishape3 =See Fortran description.See Fortran description.
intsrc_ishape4 =See Fortran description.See Fortran description.
doublesrc_loop_voltage =0.0Initial value for loop voltage Positive loop voltage corresponds to an electron torque opposite to the toroidal direction (clockwise looking down on the torus, i.e. in negative Z-direction)
doublesrc_loop_voltage_psimax =1.0Inductive current drive: outer boundary (in pol. flux) of the loop voltage
intsrc_narea =See Fortran description.See Fortran description.
intsrc_niter =See Fortran description.See Fortran description.
intsrc_nsubsection =See Fortran description.See Fortran description.
doublesrc_pellet_cloud_a =0.1Semi-major axis of the neutral gas cloud around the pellet in m
doublesrc_pellet_cloud_angle =0.0Angle of the semi-major axis wrt the horizontal plane
doublesrc_pellet_cloud_b =0.1Semi-minor axis of the neutral gas cloud around the pellet in m
doublesrc_pellet_etemp =5.0Electron temperature of the pellet cloud in eV
intsrc_pellet_ion_species =MAIN_IONIndex of the ion species in the pellet; default is a main ion pellet
doublesrc_pellet_itemp =5.0Ion temperature of the pellet cloud in eV
doublesrc_pellet_n_atoms =1.0e21Total number of atoms in the pellet; ablation stops after the pellet is spent
boolsrc_pellet_on =falseOn/off switch for pellet ablation
doublesrc_pellet_r =1.0Position of the pellet, R-coordinate in m
doublesrc_pellet_rad =1.0e-3Radius of the pellet in m
intsrc_pellet_start_time =1Start time step of the pellet ablation
intsrc_pellet_stop_time =-1End time step of the pellet ablation; if <0, no stop time
doublesrc_pellet_z =0.0Position of the pellet, Z-coordinate in m
intsrc_period =See Fortran description.See Fortran description.
doublesrc_pin1 =See Fortran description.See Fortran description.
doublesrc_pin2 =See Fortran description.See Fortran description.
doublesrc_pin3 =See Fortran description.See Fortran description.
doublesrc_pin4 =See Fortran description.See Fortran description.
doublesrc_pout1 =See Fortran description.See Fortran description.
doublesrc_pout2 =See Fortran description.See Fortran description.
doublesrc_pout3 =See Fortran description.See Fortran description.
doublesrc_pout4 =See Fortran description.See Fortran description.
doublesrc_r_begin1 =See Fortran description.See Fortran description.
doublesrc_r_begin2 =See Fortran description.See Fortran description.
doublesrc_r_begin3 =See Fortran description.See Fortran description.
doublesrc_r_begin4 =See Fortran description.See Fortran description.
doublesrc_radius1 =See Fortran description.See Fortran description.
doublesrc_radius2 =See Fortran description.See Fortran description.
doublesrc_radius3 =See Fortran description.See Fortran description.
doublesrc_radius4 =See Fortran description.See Fortran description.
intsrc_special_mode1 =See Fortran description.See Fortran description.
intsrc_special_mode2 =See Fortran description.See Fortran description.
intsrc_special_mode3 =See Fortran description.See Fortran description.
intsrc_special_mode4 =See Fortran description.See Fortran description.
intsrc_start_time =1Start time of source in ion time steps
doublesrc_torque1 =See Fortran description.See Fortran description.
doublesrc_torque2 =See Fortran description.See Fortran description.
doublesrc_torque3 =See Fortran description.See Fortran description.
doublesrc_torque4 =See Fortran description.See Fortran description.
doublesrc_z_begin1 =See Fortran description.See Fortran description.
doublesrc_z_begin2 =See Fortran description.See Fortran description.
doublesrc_z_begin3 =See Fortran description.See Fortran description.
doublesrc_z_begin4 =See Fortran description.See Fortran description.
thermal_bath_param
doublegamma =5000.0gamma_k
doublegamma_coarse_graining =5000.0Coarse-graining gamma_cg
doubleinpsi =1.05Overlap region inner boundary
doubleinpsi_priv1 =0.97Boundary for weight sink in the primary private region
doubleinpsi_priv2 =1.02Boundary for weight sink in the secondary private region Convert boundaries from normalized flux to SI units
intn_diag_bins =1Number of bins for diagnostic
intn_energy_bins =1Number of energy bins
doubleoutpsi =1.05Overlap region outer boundary
doublevmax =5.0Maximum velocity for energy bins (normalized to thermal velocity)