Notes on frequency and k units ****************************** (updated 2009.10.07 with info from J. Baumgaertel) (Based on email from Dorland to Hammett, 25 Aug 1999) There are various units options available in GS2, and changing units can sometimes be a bit confusing. The test case runs/miller/miller20.in (or now gs2_template02.in) uses a set of standard units for GS2 that many of us are most used to: aky = k_theta * rho_ref = k_theta * sqrt(T_ref/m_ref) frequency reported in units of v_t/a = sqrt(T_ref/m_ref)/a time step used in code is time_step = delt*a/(v_t*sqrt(2)) This is obtained with the settings in miller20.in of: print_old_units=.f. norm_option='t_over_m' wstar_units=.false. aky_min=aky_max=0.3 delt=0.05 It is pretty straightforward to transform such a run, at a given aky=aky_NL (NL = nonlinearly useful units) and delt=delt_NL, to the older units used and defined in the KRT paper, by setting: print_old_units=.t. norm_option='default' wstar_units=.true. aky_min=aky_max= aky_NL*sqrt(2) = 0.424264068711929 delt= delt_NL*aky_NL/sqrt(2) = 1.06066017177982E-02 (Also, you many need to change omegatol to get the same # of time steps, see below.) In these older KRT units: aky = k_theta * rho_ref * sqrt(2) = k_theta * sqrt(2*T_ref/m_ref) frequency reported in units of omega_*e (which varies with k_theta) time step used in code is time_step = delt*a/(v_t*sqrt(2))/aky (using the value of aky in these KRT units). It is possible to get equivalent results (to 12 digits of accuracy) in either set of units. miller20_krt.in uses these older units, and gets the same results as for miller20.in above. Note that one gets 12 digits of accuracy comparing after the same number of time steps. If omega_tol isn't scaled as the above, the two runs might converge at different times. Also, the convergence criterion in gs2_diagnostics is delta_omega < min(abs(omegaavg),1.0)*omegatol so if omegaavg in the internal units is on opposites side of 1 in the two runs then convergence might occur at different times. So if the internal omegaavg>1, you should leave omegatol fixed as a relative omega convergence criterion, but if the internal omegaavg<1, you should scale omega_tol = omega_tol_NL/aky_NL*sqrt(2) ******************************************** In runs/miller/miller20* and miller50*, I tried changing the reference mass from deuterium to hydrogen (with and without collisions). The resulting frequencies (after correction for the units change) agreed well, to 5 significant digits. ******************************************** The older KRT units uses a k-dependent time step. By taking longer time steps for lower aky modes that typically grow slower, linear runs reach convergence in frequency at all k after about the same number of time steps. However, a change of units was necesary for nonlinear runs and for RH tests (which have aky=0.0), and was done about the time that Peter Liu left. Consequently, all of the various possible combinations of units options haven't been as well-tested as the rest of the code. But the above two sets of input parameters clearly work okay. ******************************************** omega_* is a flux function (independent of theta). In the NL units, omega_* = aky * fprim * v_t/a where fprim is a/Ln for electrons. See Dorland's typeset notes on general geometry for more details. ******************************************** Some additional tests that Bill says can be done: The change of units was necessary for nonlinear runs and for RH tests (which have aky = 0.0), and was done around the time that Peter left. Consequently, it is not as well-tested as the rest of the code. It isn't hard to compare the results. For reference, here is the procedure used. To check the units, I always go back to the oldest set of options, which are: print_old_units = .true. wstar_units = .true. norm_option = 'default' and multiply the input aky by sqrt(2), and divide the time step by the KRT aky (or divide by aky_NL*sqrt(2)). With these options, the code has been pretty steady for several years. The small changes that have occured include things like making more negrids available, making the collision operator conserve momentum better, etc. Given a run with this set of inputs, I then check whether the problem is in norm_option = 't_over_m' by re-running the case with this option, while switching the value of aky back to the NL (Gryffin/nonlinear) value, i.e., by dividing by sqrt(2). The frequencies should be the same, although they are reported at different values of aky. Then, I change wstar_units and print_old_units. The time step should be adjusted by a factor of the present value of aky, and that pesky sqrt(2). The results then should be in the units of the KRT paper. ******************