## 4. Reduction of velocity dataThe raw velocity data from the dynamical model is Lagrangian, with pairs of and being associated at each time with each gas `particle'. The dynamical simulation described in Sect. 3results in strong streaming and thus localization of the gas, and there are regions, especially at small radii, where gas velocity data are sparse or absent. Also there is a significant dispersion in these velocities (although less than for the `star' particles). These facts mean that some care is needed to produce an accurate and well-behaved representation of the velocities for incorporation into the dynamo codes. We do not use velocity data from the initial transient period of the dynamical calculations, when the bar is forming. We made considerable experimentation before choosing the procedure described immediately below as Method 1 for the main calculations described below. It certainly is not unique. However we feel that it is reasonably robust in that a rather different procedure, Method 2, gives a quite similar dataset. Also, the gross features of the derived velocity fields, such as mean rotation curves, seem to be satisfactorily reproduced. The accuracy of our interpolation is improved by storing data values with respect to the current position of the bar, and using the position angle of the bar as an additional datum when reconstructing the velocity field in the inertial frame. We also outline a rather less sophisticated treatment of the velocity data as Method 3, and discuss simulations using this algorithm briefly in Sect. 5. All the processes described here involve substantial smoothing of the data. This is not only necessary to produce velocity fields that are sufficiently smooth for the dynamo codes to operate satisfactorily, but is also consistent with the principles of mean field theory. ## 4.1. Method 1We choose the radius Typically there are a number of `holes', i.e. boxes with no data,
mainly in the inner part of the disc. We minimize the problem, and
also reduce the noise, by choosing relatively small values of
The next step is to Fourier analyse these values of and for each radial ring. This produces complex Fourier coefficients, , for , . Finally we perform a three-point radial smoothing on all the and . The Fourier analysis thus serves two purposes. It gives an effective azimuthal smoothing, and it reduces the quantity of data needed for input to the dynamo code to a manageable quantity. The data is stored at each time point (45 points cover 10 Gyr), and the dynamo code interpolates on the Fourier components in space and time and then reconstructs the two dimensional velocity field. ## 4.2. Method 2This used a relatively high spatial resolution (), in contrast to that described above. The effect of the holes was reduced by employing a weighted mean filtering procedure, in the radial direction. The velocity components at the mesh point were determined by the algorithm The weights , where is the number of data points present in the box , the maximum number of datapoints present in any box, is the raw mean velocity component at and are the first non-zero values of the raw mean after/before . In addition to reducing the effect of the holes, this also gives an effective radial smoothing. A standard FFT algorithm was then applied azimuthally, and proved to be quite effective in smoothing the noise in the data ## 4.3. Method 3Using with kpc, we calculated average values in the grid boxes, as for Method 1. The only further process was to apply the smoothing twice in succesion. There was thus no Fourier analysis, and the dynamo code performed spatial interpolation in two dimensions on the stored values. Our motivation for this procedure was to preserve more accurately the marked streaming evident in the dynamical calculations, especially by making the azimuthal smoothing rather more local. © European Southern Observatory (ESO) 1998 Online publication: December 16, 1997 |