Äîêóìåíò âçÿò èç êýøà ïîèñêîâîé ìàøèíû. Àäðåñ îðèãèíàëüíîãî äîêóìåíòà : http://star.arm.ac.uk/preprints/2010/571d_OnlineII.pdf
Äàòà èçìåíåíèÿ: Wed Sep 26 14:09:39 2012
Äàòà èíäåêñèðîâàíèÿ: Tue Oct 2 06:08:02 2012
Êîäèðîâêà:

Ïîèñêîâûå ñëîâà: ï ï ï ï ï ï ï ï ï ï ï ï ï ï ï ï ï ï ï
Online do cumentation. Part I I:
Gyrosynchrotron co de input, output, and calling conventions
The gyrosynchrotron codes are implemented as the Windows dynamic link libraries (DLLs) and Linux shared ob jects (SOs). The IDL users can call these codes by the CALL_EXTERNAL function with the following syntax: res=CALL_EXTERNAL(libname, 'GET_MW', ParmIn, s, /F_VALUE) Here libname is the name of the appropriate dynamic link library or shared ob ject. This file should be located in one of the directories where the operating system searches for executable modules, otherwise the full path should be specified, e.g. libname='Full_path_to_DLL/DLLname.dll' res=CALL_EXTERNAL(libname, 'GET_MW', ParmIn, s, /F_VALUE). Then, ParmIn is the 29-element single-precision floating-point array that contains the input parameters for the gyrosynchrotron code, and s is the two-dimensional single-precision floatingpoint array that contains the results of the computation. The input parameters are specified by the array ParmIn with the following elements: · ParmIn[0] is the visible source area S [cm2 ]. · ParmIn[1] is the source depth along the line-of-sight L [cm]. · ParmIn[2] is the background plasma temperature T0 [K]; is used to compute the free-free contribution in all cases and also GS contribution for thermal, thermal/nonthermal, and kappa distributions. · ParmIn[3] is a matching parameter in the thermal/nonthermal distributions. · ParmIn[4] is the parameter in the kappa-distribution. · ParmIn[5] specifies the integration method and accuracy in the continuous code. For the library libGS Std HomSrc CEH: if ParmIn[5] > 1 then the trapezoidal method with fixed number of nodes is used, and the number of nodes equals ParmIn[5]+1 (rounded downwards to the nearest integer); if ParmIn[5] 1 then the Romberg method is used (the default accuracy is 10-5 ). For the library libGS Std HomSrc C: absolute value of this parameter defines the number of nodes used in the extended midpoint method with logarithmic node placement. · ParmIn[6] is the low-energy cutoff of the accelerated electrons E law distributions.
min

[MeV] in the power[MeV] in the power-

· ParmIn[7] is the high-energy cutoff of the accelerated electrons E law, thermal/nonthermal, and kappa distributions.

max

· ParmIn[8] is the break energy Ebreak [MeV] in the double-power-law distribution, Emin < Ebreak < Emax . 1


· ParmIn[9] is the power-law index in the single-power-law distributions or the low-energy power-law index 1 in the double-power-law distribution. · ParmIn[10] is the high-energy power-law index 2 in the double-power-law distribution. · ParmIn[11] is the background plasma density n0 [cm-3 ]. · ParmIn[12] is the number density of fast electrons nb [cm-3 ]. · ParmIn[13] is the magnetic field B [G]. · ParmIn[14] is the viewing angle [degrees] relative to the magnetic field. · ParmIn[15] is the starting frequency to calculate the emission spectrum f0 [Hz]. · ParmIn[16] is the logarithmic step in frequency : the emission parameters are calculated at the logarithmically spaced frequency points, i.e. f1 = f0 10 , f2 = f1 10 , . . . · ParmIn[17] specifies the type of the electron distribution over energy (index of the model distribution function, see online documentation, Part I). · ParmIn[18] is the number of frequencies to calculate the emission spectrum Nf (noninteger parameters are rounded downwards to the nearest integer); the highest frequency equals fNf -1 = f0 10(Nf -1) . · ParmIn[19] specifies the type of the electron distribution over pitch-angle (index of the model distribution function, see online documentation, Part I). · ParmIn[20] is the loss-cone boundary c [degrees] in the loss-cone distributions. · ParmIn[21] is the beam direction 0 [degrees] in the beam-like distributions. · ParmIn[22] is the loss-cone boundary width or the beam angular width µ in the losscone or beam-like distributions, respectively. · ParmIn[23] is the coefficient a4 in the supergaussian (SGA, ParmIn[19]=5) pitch-angle distribution. · ParmIn[24] unused (reserved for future needs). Parameters ParmIn[25]­ParmIn[27] are used only in the library libGS Std HomSrc CEH.
C · ParmIn[25] is the parameter fcr /f quency) in the hybrid code. Be

(boundary frequency expressed in units of gyrofre-

C If fcr < f0 then the code becomes purely continuous (without exact or approximate discrete calculations). In this case, the sign of ParmIn[25] controls R-optimization (renorWH malization by the exact value at fcr , defined by ParmIn[26]):

if ParmIn[25] 0 then the code is continuous without R-optimization; if ParmIn[25] < 0 then R-optimization is applied to the continuous code.
WH · ParmIn[26] is the parameter fcr /fBe (boundary or renormalization frequency expressed in units of gyrofrequency) in the optimized hybrid (if ParmIn[26] < ParmIn[25]) or RWH optimized continuous (if ParmIn[25] < 0 and fcr > f0 ) code. It is not used otherwise.

2


· ParmIn[27] controls renormalization in the hybrid code: if ParmIn[27] = 0 then renormalization is not applied; if ParmIn[27] = 0 (default value) then the emission spectrum is renormalized to remove C WH matching residuals at the frequencies fcr and (if necessary) fcr . In the library libGS Std HomSrc C, containing fast and Q-optimized continuous codes only, three above parameters (ParmIn[25]­ParmIn[27]) are ignored as the hybrid code and Roptimization are not implemented. · ParmIn[28] controls Q-optimization: if ParmIn[28] = 0 then the terms (ln Q) and (ln Q) are neglected during calculations; if ParmIn[28] = 0 then the terms (ln Q) and (ln Q) are taken into account. In addition, in the library libGS Std HomSrc C, the value of ParmIn[28] = 1 means that the terms (ln Q) is only used to specify the correction µ by the perturbation formula: µ = -(ln Q(µ00 )) /h (µ00 ) and no further root accuracy improvement is performed. Full Q-optimization is performed if ParmIn[28] 2, which gives the most precise results. The results of calculation are stored in the two-dimensional array s with 5 â Nf elements (Nf is given by the parameter ParmIn[18]), designed to be applicable for both the uniform source case and as the input for numerical solutions of the radiation transfer equation. This array must be created before calling CALL_EXTERNAL. After completion of the calculations, the array s contains the following data: · s[0, *] is the Nf -element array of the emission frequencies f [GHz]. · s[1, *] is the Nf -element array of the observed (at the Earth) O-mode emission intensiO O ties If = (jf / O )[1 - exp(- O L)] [sfu] from the uniform source with the specified input parameters located at the Sun. · s[2, *] is the Nf -element array of the gyrosynchrotron damping factors for O-mode exp(- O L); this output is intended for numerical radiation transfer solution. · s[3, *] is the Nf -element array of the observed (at the Earth) X-mode emission intenX X sities If = (jf / X )[1 - exp(- X L)] [sfu]. · s[4, *] is the Nf -element array of the gyrosynchrotron damping factors for X-mode exp(- X L); this output is intended for numerical radiation transfer solution. The return value of the function CALL_EXTERNAL (stored in the variable res) is set to zero if no problems were detected. If either the energy distribution index (ParmIn[17]) or the pitch-angle distribution index (ParmIn[19]) is not in the list of pre-defined values (see online documentation, Part I) then the default distribution (PLW or ISO, respectively) is used, then res=1.

3


Additional options controlling the computation accuracy
In the library libGS Std HomSrc CEH, some default computation parameters can be changed using the additional function SetParams. For example, to change the default integration and summation accuracies (10-5 ) to respectively 10-3 and 10-4 , the IDL users can call it by the CALL_EXTERNAL function with the following syntax: eps_int=1e-3 eps_sum=1e-4 libname='Full_path_to_DLL/libGS_Std_HomSrc_CEH.dll' res=CALL_EXTERNAL(libname, 'SetParams', eps_int, eps_sum) res=CALL_EXTERNAL(libname, 'GET_MW', ParmIn, s, /F_VALUE) Here eps_int and eps_sum should be single-precision floating-point values. The parameter eps_int specifies the relative integration accuracy for the Romberg method. It is used when calculating the integral over energy in the continuous code, or the integrals over the resonance curves (for all cyclotron harmonics) in the exact and approximate discrete codes. Default value: 10-5 . The parameter eps_sum specifies the relative accuracy for the series summation in the exact and approximate discrete codes. Summation over the cyclotron harmonics is stopped when the ratio of a current term of the series to the accumulated sum becomes less (by absolute value) than eps_sum. Default value: 10-5 . The changed accuracy parameters are applied to all subsequent calls to the main gyrosynchrotron code. They remain active till the next call to the function SetParams or until the dynamic library (or shared ob ject) is unloaded.

4