Astron. Astrophys. 317, 793-814 (1997)

## 2. Numerical procedure and initial conditions

Since the numerical procedures and initial conditions are mostly identical to what has already been described and used in previous papers (e.g. Ruffert, 1996; Ruffert & Anzer, 1994) I will refrain from repeating every detail, but only give a brief summary.

### 2.1. Numerical procedure

The distribution of matter is discretised on multiply nested equidistant Cartesian grids (e.g. Berger & Colella, 1989) with zone size and is evolved using the "Piecewise Parabolic Method" (PPM) of Colella & Woodward (1984). The equation of state is that of a perfect gas with a specific heat ratio of or (see Table 1). The model of the maximally accreting, vacuum sphere in a softened gravitational potential is summarized in Ruffert & Arnett (1994) and Ruffert & Anzer (1995).

Table 1. Parameters and some computed quantities for all models. is the Mach number of the unperturbed flow, the parameter specifying the strength of the gradient, the ratio of specific heats, the radius of the accretor, g the number of grid nesting depth levels, the size of one zone on the finest grid, the softening parameter (zones) for the potential of the accretor (see Ruffert, 1994), the total time of the run (units: ), the integral average of the mass accretion rate, S one standard deviation around the mean of the mass accretion rate fluctuations, the maximum mass accretion rate, is defined in Eq. (3) of Ruffert & Arnett (1994), , , , are the averages of specific angular momentum components together with their respective standard deviations , , , s is the entropy (Eq. (4) in Ruffert & Arnett 1994), the number N of zones per grid dimension is 32, and the size of the largest grid is (except for model RL for which it is ).

A gravitating, totally absorbing "sphere" moves relative to a medium that far upstream has a distribution of density and velocity given by

In this paper I only investigate models with gradients of the velocity distribution; the values of can be found in Table 1. Thus for all models I set . Additionally, if only a density gradient is introduced without varying some other thermodynamic variable (e.g. temperature, entropy, etc.) at the same rate, pressure will not be in equilibrium (cf. e.g. Ho et al. 1989), so an additional thermodynamic variable should be varied, which complicates matters.

The function " " is introduced in Eq. (4) to serve as a cutoff at large distances y for large gradients : In some models I imposed a gradient of which at distances beyond 5 would produce negative velocities if a linear distribution were used. In the limit of small , Eq. (4) transforms to a shape very similar to Eq. (3) with replaced by v (as in Ruffert & Anzer 1995, Eq. (2)). The relative velocity is varied in different models: I perform simulations with Mach numbers of 3.0 and 10. In the reference frame of the accretor the surrounding matter flows in +x-direction. Our units are (1) the sound speed as velocity unit; (2) the accretion radius (Eq. (5)) as unit of length, and (3) as density unit. Thus the unit of time is .

When using the density and velocity distributions (Eqs. (3) and (4)) to calculate the mass accretion rate, assuming that all mass within the accretion cylinder is accreted, one obtains to lowest order in

an equation very similar to Eq. (2). Further assuming that all angular momentum within the deformed accretion cylinder is accreted too, the specific angular momentum of the accreted matter follows to be (Ruffert & Anzer 1994; Shapiro & Lightman 1976; again to lowest order in )

Note the different signs with which the two enter this equation. The density gradient acts in the "expected" direction: if the density is higher on the positive side of the y -axis, then the vortex formed around the accretor is in the counter-clockwise direction, i.e. the angular momentum is negative. Contrary to this, if the velocity is larger on the positive y -side, then the shortened accretion radius on this side reduces the cross-section for the higher specific angular momentum to such an extent that the rotational direction of the vortex is reversed: the angular momentum is positive.

The values obtained from the numerical simulations of the specific angular momentum should be compared to the values that follow from this Eq. (7) to conclude which of the above mentioned views - low or high specific angular momentum of the accreted material - is most probably correct. Ruffert & Anzer (1995) find that the numerical value is 0.72 times 1 the analytical estimate, which would indicate a large value for the accreted specific angular momentum. Although the simulations yield the values of all three components of the angular momentum, the interesting component is the one pointing in z -direction. Thus I will implicitely assume when discussing properties like fluctuations, magnitudes, etc. that the simulations produce. From the symmetry of the boundary conditions the average of the x and y components of the angular momentum should be zero, although their fluctuations can be quite large. Numerically I obtain the mass and angular momentum accretion rates as a function of time, and . From these functions I calculate the instantaneous specific angular momentum as function of time, which I will plot and from which I calculate the temporal mean l listed in Table 1.

One can numerically approximate the integrals (U. Anzer, personal communication) of the mass flux and angular momentum over the deformed cross section of the accretion cylinder, to obtain the coefficients f in the relations Eq. (6) and Eq. (7):

Here, I will only consider the effect of a velocity gradient. The unitless functions f are a function of and the functional relation of , i.e. whether depends purely linearly on or as in Eq. (4) via the "tanh"-term. Fig. 1 shows the values of the functions f for the mass and specific angular momentum and for both the linear and "tanh" case. In the linear case there is no solution for (U. Anzer, personal communication) so the curves end at that point. Since and is practically constant for , the Eq. (6) is a good approximation in this range. If the prescription is correct that everything in the accretion cylinder is accreted, we expect to see an increase of the mass accretion rate by a factor of roughly 1.8 in the models with a fairly large gradient of (cf. Table 1). The same trends apply to the specific angular momentum: its coefficient remains relatively constant in the range , and becomes a factor of 2 larger for . In the case including "tanh", the coefficent decreases again for because the gradient is so steep that the "tanh"-cutoff acts at very short distances. So the short lever arm that enters into the angular momentum wins.

 Fig. 1. The coefficient for the mass accretion rate (dotted), defined by Eq. (8), and for the specific angular momentum (solid), defined by Eq. (9), as a function of . The two thin curves that end at around -0.8 show the values of f for a simple linear relation between and , while the bold curves apply to a relation including the "tanh"-term as given in Eq. (4). The two vertical straight lines indicate the gradients that were used in the numerical models (cf. Table 1), and .

### 2.2. Models

The combination of parameters that I varied, together with some results are summarised in Table 1. The first letter in the model designation indicates the Mach number and the strength of the gradient: I, J, and S have , while K, L, and R have . The second letter specifies the size of the accretor: M (medium) and S (small) stand for accretor radii of 0.1  , and 0.02  , respectively. I basically simulated models with all possible combinations of two relative wind flow speeds (Mach numbers of 3 and 10), two gradient strengths (3% and 20%) and two different accretor sizes (0.02 and 0.1 accretion radii), all with an adiabtic index of 5/3. The exeptional models are ST and SS - in which I used an adiabatic index of 4/3 - and model RL which has a very large accretor radius and a very slow relative flow velocity. The grids are nested to a depth g such that the radius of the accretor spans several zones on the finest grid and the softening parameter is then chosen to be a few zones less than the number of zones that the accretor spans. Model IT and ST are physically identical to models IS and SS, respectively. However, models IT and ST are numerically better resolved, because they are nested one grid level finer. Model IM is identical to the model presented in Ruffert & Anzer (1995), i.e. the velocity gradient is chosen as specified in Eq. (2) of Ruffert & Anzer (1995) without the "tanh"-term of Eq. (4). This term is included in model IM*, however, since the results were nearly indistinguishable between models IM and IM*, model IM* was evolved for only roughly one third of the time of model IM.

As far as computer resources permitted, I aimed at evolving the models for at least as long as it takes the flow to move from the boundary to the position of the accretor which is at the center (crossing time scale). This time is given by and ranges from about 1 to about 10 time units. The actual time that the model is run can be found in Table 1.

The velocity distribution following the "tanh"-prescription of Eq. (4) has an inflection point and thus is Kelvin-Helmholz unstable with an amplification time constant of roughly (Drazin & Reid 1981). During the time it takes matter to move from the boundary to the accretor, , random perturbations can grow by about which is smaller than unity even for the large gradients () used in the simulations and listed in Table 1.

The calculations are performed on a Cray-YMP 4/64 and a Cray J90 8/512. They need about 12-16 MWords of main memory and take approximately 40 CPU-hours per simulated time unit (for the models and Mach 10; the models take four times as long, etc.; is the size of a zone on the finest grid, see Table 1).

© European Southern Observatory (ESO) 1997

Online publication: July 8, 1998