|
subroutine | ptb_3db_module::read_3db_test (As_vac, explicit_em_int) |
| Sets up an analytical magnetic field perturbation with fixed toroidal mode number and (currently) 2 poloidal mode numbers. The number of poloidal mode numbers can be adjusted with few code changes. The most important parameters are the value of the poloidal mode numbers, the centers of the Gaussian envelopes of each mode number, the width of the Gaussian, and the amplitude. More...
|
|
subroutine | ptb_3db_module::read_3db_m3dc1_mesh () |
| Allocates memory for and reads perturbed field data from M3D-C1 file. For M3D-C1 input, the fusion-io library by N. Ferraro is used. The interpolation used in the fusion-io library keeps the field divergence free. More...
|
|
subroutine | ptb_3db_module::read_3db_m3dc1_rz () |
| Allocates memory for and reads perturbed field data from M3D-C1 file. This version of the routine reads the vector potential A on an (R,Z) grid. The perturbed field on the XGC mesh can be evaluated in a separate subroutine. Eventually, the perturbed magnetic field is to be calculated directy from A using spline interpolation. For M3D-C1 input, the fusion-io library by N. Ferraro is used. More...
|
|
subroutine | ptb_3db_module::extract_resonant_vector_potential_from_m3dc1 (itor, As_vac) |
| Extension of RZ reader for EM Use RZ reader to read the full vector potential from M3D-C1. For EM, proeceed to extract the (near) resonant components of \(A_\parallel\) (A_parallel) on the XGC mesh. Interpolate those back to the RZ grid and subtract from the raw vector potential from M3D-C1. Then re-initialize the spline interpolation for A. This enables pushing particles with the full M3D-C1 field while still calculating the plasma response to the near resonant modes. As a stop-gap measure, the such filtered vector potential is used to calculate the perturbed field on the XGC mesh because the spline interpolation of the vector potential on the RZ grid is not available in C++ yet. This currently works only for single toroidal mode number input. Extending it to multiple mode numbers seems straightforward. More...
|
|
subroutine | ptb_3db_module::extract_resonant_vector_potential_from_m3dc1_p2 (itor, As_vac, As_vac_full) |
|
subroutine | ptb_3db_module::read_3db_m3dc1_eem (As_vac) |
| Allocates memory for and reads perturbed field data from M3D-C1 file for use with the explicit EM method. This reader reads only the parallel component of the perturbed vacuum vector potential for a single toroidal mode number. More...
|
|
real(kind=8) function | ptb_3db_module::ptb_3db_screening_factor (r, z, psi) |
| Evaluates the screening factor for artificial exponential damping of the vacuum perturbed field towards the magnetic axis. The screening shape function is simply exp((psi-psi0)/w). Since psi decreases towards the magnetic axis, psi-psi0 becomes negative at some point. More...
|
|
subroutine | ptb_3db_module::ptb_3db_calc_db (grid, dA_phi, dB_re, dB_im) |
| Evaluates the perturbed field from the perturbed vector potential on the XGC grid. More...
|
|
subroutine | ptb_3db_module::update_3db (rampup_fac, gstep, time) |
| Updates the ramp-up factor of the vacuum RMP field. The external (or vacuum) RMP field can be ramped up linearly instead of a hard switch from off to on. The ramp-up factor ptb_3db_rampup_fac determines the amplitude of the external RMP field throughout XGC. This routine is used only in electrostatic simulations. In electromagnetic simulations, push_As updates the ramp-up factor. More...
|
|
subroutine | ptb_3db_module::ptb_3db_damping_factor_em (Apar, dApar, rampup_fac, time) |
| Calculates an adaptive damping factor to limit the time rate of change of the perturbed vector potential The routine calculates the poloidal Fourier spectrum of the current increment of the vector potential (dApar --> effectively the Hamiltonian vector potential Ah) and the vector potential itself (Apar). Then it compares the amplitude of the increment and the current value and computes a damping factor for each poloidal mode number such that the increment is limited to be a fraction of the current value. Using this damping factor, the increment is transformed back to real space and returned to the calling routine. More...
|
|
|
integer | ptb_3db_module::ptb_3db_mode =0 |
| Mode 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) More...
|
|
character(len=250) | ptb_3db_module::ptb_3db_filename ='C1.h5' |
| File containing the perturbed field data. More...
|
|
logical | ptb_3db_module::ptb_3db_single_mode_input =.true. |
| For M3D-C1 input; If .true., M3D-C1 file contains only one toroidal mode number. More...
|
|
integer | ptb_3db_module::ptb_3db_single_mode_ntor =3 |
| The mode number in the M3D-C1 file in case of single mode input. More...
|
|
real(kind=8) | ptb_3db_module::ptb_3db_mult_factor =1D0 |
| Factor for scaling the perturbed field. More...
|
|
integer | ptb_3db_module::ptb_3db_m3dc1_timeslice =1 |
| Time slice that is to be read from M3D-C1 file. More...
|
|
integer | ptb_3db_module::ptb_3db_mstep_es =0 |
| Number of ES time steps in RMP penetration calculation with ptb_3db_mode==2. More...
|
|
integer | ptb_3db_module::ptb_3db_mstep_em =1 |
| Number of EM time steps in RMP penetration calculation with ptb_3db_mode==2. More...
|
|
integer | ptb_3db_module::ptb_3db_es_to_em_dt_ratio =1 |
| Ratio 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) More...
|
|
real(kind=8) | ptb_3db_module::ptb_3db_update_alpha =1.0D0 |
| Damping factor for update of the perturbed field. More...
|
|
integer | ptb_3db_module::ptb_3db_start_time =1 |
| Time step in which perturbed field is switched on. More...
|
|
logical | ptb_3db_module::ptb_3db_rampup_vac =.true. |
| (.true.) Ramp up perturbed field slowly, (.false.) turn on perturbed field abruptly More...
|
|
integer | ptb_3db_module::ptb_3db_rampup_time =1000 |
| Number of time steps over which the perturbed field is ramped up. More...
|
|
logical | ptb_3db_module::ptb_3db_screening_on =.false. |
| Artificial screening for static RMP field: (.false.) no screening, (.true.) exponential damping towards the axis. More...
|
|
real(kind=8) | ptb_3db_module::ptb_3db_screening_width1 =0.02D0 |
| Decay length of the exponential damping function in units of normalized poloidal flux. More...
|
|
real(kind=8) | ptb_3db_module::ptb_3db_screening_width2 =0.02D0 |
| Width of tanh for damping in the core in units of normalized poloidal flux. More...
|
|
real(kind=8) | ptb_3db_module::ptb_3db_screening_psi1 =0.975D0 |
| Center of the tanh function for screening in the core (<1) More...
|
|
real(kind=8) | ptb_3db_module::ptb_3db_screening_fac1 =0.9D0 |
| Reduction of deltaB at the separatrix (<=1) More...
|
|
real(kind=8) | ptb_3db_module::ptb_3db_screening_fac2 =0.8D0 |
| Fraction of vacuum RMP in the core (<=1) More...
|
|
integer | ptb_3db_module::ptb_3db_num_ntor =1 |
| Number of toroidal mode numbers (<= sml_nphi_total) More...
|
|
integer, dimension(:), allocatable, target | ptb_3db_module::ptb_3db_ntor |
| Array to store the toroidal mode numbers. More...
|
|
integer | ptb_3db_module::ptb_3db_ntor_min =3 |
| smallest toroidal mode number More...
|
|
integer | ptb_3db_module::ptb_3db_num_mpol =30 |
| Number of poloidal mode numbers. More...
|
|
integer, dimension(:), allocatable | ptb_3db_module::ptb_3db_mpol |
| Array to store the poloidal mode numbers. More...
|
|
integer | ptb_3db_module::ptb_3db_nr =1000 |
| (R,Z) grid size in R-direction More...
|
|
integer | ptb_3db_module::ptb_3db_nz =1000 |
| (R,Z) grid size in Z-direction More...
|
|
real(kind=8) | ptb_3db_module::ptb_3db_r_min |
|
real(kind=8) | ptb_3db_module::ptb_3db_r_max |
| Range of R in (R,Z) grid. More...
|
|
real(kind=8) | ptb_3db_module::ptb_3db_z_min |
|
real(kind=8) | ptb_3db_module::ptb_3db_z_max |
| Range of Z in (R,Z) grid. More...
|
|
real(kind=8) | ptb_3db_module::ptb_3db_dr |
|
real(kind=8) | ptb_3db_module::ptb_3db_dz |
| grid spacing of (R,Z) grid More...
|
|
real(kind=8), dimension(:,:,:), allocatable, target | ptb_3db_module::ptb_3db_bfield_re_vac |
| perturbed vacuum field on XGC mesh, real part, dimensions: (grid vertex, R-Z-phi components, tor. mode number) More...
|
|
real(kind=8), dimension(:,:,:), allocatable, target | ptb_3db_module::ptb_3db_bfield_im_vac |
| perturbed vacuum field on XGC mesh, imaginary part More...
|
|
real(kind=8), dimension(:,:,:,:), allocatable | ptb_3db_module::ptb_3db_vecpot_re_vac_rz |
| perturbed vacuum vector potential on (R,Z) mesh, real part More...
|
|
real(kind=8), dimension(:,:,:,:), allocatable | ptb_3db_module::ptb_3db_vecpot_im_vac_rz |
| perturbed vacuum vector potential on (R,Z) mesh, imaginary part More...
|
|
real(kind=8), dimension(:), allocatable | ptb_3db_module::ptb_3db_rgrid |
|
real(kind=8), dimension(:), allocatable | ptb_3db_module::ptb_3db_zgrid |
| R and Z grid in case of (R,Z) input data. More...
|
|
type(ezspline2_r8), dimension(:,:), allocatable | ptb_3db_module::ptb_3db_vecpot_spl_rz_re |
| Spline for interpolation of the real part of (R,Z) data to XGC mesh. More...
|
|
type(ezspline2_r8), dimension(:,:), allocatable | ptb_3db_module::ptb_3db_vecpot_spl_rz_im |
| Spline for interpolation of the imaginary part of (R,Z) data to XGC mesh. More...
|
|
type(ezspline2_r8) | ptb_3db_module::ptb_3db_spl_tmp |
| Dummy 2D spline used for setting up the 2D interpolations with bicub_mod. More...
|
|
type(bicub_type), dimension(:,:,:), allocatable | ptb_3db_module::ptb_3db_bicub_da |
| Spline for interpolation of the perturbed vector potential with bicub_mod. More...
|
|