SpringerLink
Forum Springer Astron. Astrophys.
Forum Whats New Search Orders


Astron. Astrophys. 359, 1042-1058 (2000)

Previous Section Next Section Title Page Table of Contents

3. Numerical method

In this section we describe the complete numerical method. It is more stable and more accurate than the one used in Paper I and allows to take into account H, He, C, N and O simultaneously in all calculations. The stability of the methods used requires that the Courant condition is fulfilled. If [FORMULA] is the geometrical distance between two grid points, v the velocity and [FORMULA] the time step-width, then the relation [FORMULA] must be valid. Therefore we use a primary grid (described in Sect. 3.1) for the construction of the [FORMULA] stratification and for each element a variable secondary grid (Sect. 3.2) for the diffusion and mass loss calculations. The spacing of the secondary grids are such that the Courant condition holds.

At each point of the fixed gas pressure scale we would like to calculate the time-derivative of the mass fraction of an element l. The mass-fraction is defined as

[EQUATION]

[FORMULA] is the atomic weight, [FORMULA] the proton mass and [FORMULA] the density. The mass fraction may change because of the effects of diffusion and wind. The corresponding variation of the particle density will be denoted as [FORMULA]. Mass loss and diffusion do not change [FORMULA], because the wind velocity is derived from the equation of continuity (see Sect. 2) and diffusion does not lead to a net mass flow. However, the stellar structure changes with time. For example, if the gravity increases the mass-depth at a given gas pressure decreases. So mass elements move to larger values on the [FORMULA] scale. In the presence of concentration gradients, this leads to variations of the composition at the various points on the [FORMULA] scale. We denote the corresponding time-variation of the mass-fraction with [FORMULA]. Alltogether we then have

[EQUATION]

For the particle density and the total velocity v of an element, in the following we omit the indices l:

[EQUATION]

[EQUATION]

[FORMULA] is obtained from the equation of continuity for radial symmetry:

[EQUATION]

This equation has to be evaluated numerically for each element. Under certain conditions, which are fulfilled preferably in the outer regions, we use a modified upwind scheme described in Sect. 3.3. Otherwise the monotonic transport scheme described in Sect. 3.4 is used.

The variation of the mass fraction due to the stellar evolution is written as

[EQUATION]

m is the mass depth, [FORMULA] is the time variation of the mass depth at a given point on the [FORMULA] scale. The numerical evaluation of Eq. (9) is described in Sect. 3.5. The boundary conditions and the time integration are described in Sects. 3.6 and 3.7. Then we will briefly comment on the stability of the method.

In the following subsections some conventions are used. The indices i and j, which denote the points of the primary and the secondary grid, respectively, are defined such that they are 1 at the outer boundary and increase to the stellar interior. The geometrical depth variable r, however, is the distance from the stellar center and thus increases in opposite direction. The velocities and flows have a positive sign if they are directed to the stellar surface.

3.1. The primary grid

For the calculation of the [FORMULA] stratification a grid is constructed as described in Unglaub & Bues (1997). For the gas pressure at the outer and inner boundaries we chose [FORMULA] and [FORMULA], respectively. The grid spacing is

[EQUATION]

The points denoted as [FORMULA] in Unglaub & Bues (1997) define the primary grid of the present calculations. At each grid point the diffusion and wind velocities are calculated.

3.2. The secondary grid

Let [FORMULA] and [FORMULA] be the diffusion and wind velocities for a given element at the points of the primary grid and [FORMULA] the distance of point i from the stellar center. With [FORMULA] we denote the chosen time step-width. It is not necessarily identical with the actual time step-width which may be smaller (see Sect. 3.7). These points of the primary grid which are simultaneously points of the secondary grid are found from the following condition:

[EQUATION]

The expression [FORMULA] represents the relation between the indices j of the secondary grid and the indices i of the primary grid. The outer boundary of the primary grid is per definition a point of the secondary grid, so that [FORMULA]. The left inequality is our numerical representation of the Courant condition. The time which the flow needs to proceed from point j to [FORMULA] must be smaller than [FORMULA]. In other words, the distance the flow proceeds during a time step must be smaller than the distance between two grid points. In addition we demand that at least in the outer regions [FORMULA] is of the same order of magnitude as [FORMULA]. This is the meaning of the second inequality. This additional condition improves the accuracy in the regions where the modified upwind scheme is used.

The points j represent zone centers. At these points the time derivations of the number densities [FORMULA] will be evaluated. The inner and outer boundaries of the zone j will be denoted with [FORMULA] and [FORMULA], respectively. To evaluate the various quantities like velocity or radius at the zone boundaries, let us consider the following expression:

[EQUATION]

If [FORMULA] is an integer, then the quantities at this point of the primary grid are taken. Let, however, [FORMULA] be [FORMULA], where k is an integer. In this case the mean values of the quantities at the points k and [FORMULA] of the primary grid are used. So the point [FORMULA] is exactly at the geometrical center of the points j and [FORMULA] only if the primary and secondary grids are identical.

3.3. The modified upwind scheme

At a grid point j the modified upwind scheme is used if the following two conditions are fulfilled. [FORMULA] denotes the flow of the considered species of particles.

[EQUATION]

The first condition means, that the flows at point j as well as at the two neighbouring points must have a positive sign: they are directed to the stellar surface. The second condition means that near point j the primary and secondary grid are not identical. Both conditions are fulfilled preferably in the outer regions, where the wind velocity is large in comparison to the diffusion velocities and where during one time step the flow covers a distance which is larger than the distance between two points of the primary grid.

Now we denote with [FORMULA] the number of particles per unit time which cross a surface [FORMULA]. Then [FORMULA] is the number of particles per unit time, which enter the zone j via its inner boundary and [FORMULA] is the corresponding number which leave the zone via the outer boundary. We use the numerical representations

[EQUATION]

The obvious method would be to evaluate the values n, v and r at the zone boundary. This is numerically unstable, however. In the usual upwind scheme only the particle density n is evaluated upstream, whereas the velocities are evaluated at the zone boundaries. This would be very unconvenient for our purposes, because in the outer regions n and v may vary by order of magnitudes between the grid points. The particle flows, however, are similar at the various grid points, at least if the composition gradient is not too large. For this reason we evaluate all quantities upstream. The time derivative of the particle density of an element at point j is obtained from

[EQUATION]

The expression in the denominator on the right would be the volume of the zone j, if [FORMULA] were used. However, we use

[EQUATION]

This is more consistent with our upwind evaluation of r in Eqs. (15) and (16).

3.4. The monotonic transport scheme

The monotonic tranport scheme (abbreviated mono scheme) is used, if the conditions (13) and (14) are not fulfilled. This is the case especially in the inner regions, where the primary and the secondary grid tend to be identical. The basic ideas from which the mono scheme is derived are described in Hawley et al. (1984). It is an improved upwind scheme, which combines stability with accuracy. In deep regions, during one time step the flow covers a distance which is small in comparison to the distance between two points of the primary grid, so that [FORMULA]. Especially in such cases the mono scheme is more accurate than the upwind scheme.

According to the mono scheme the flow at the zone boundary [FORMULA], for example, is evaluated as follows:

[EQUATION]

[EQUATION]

[FORMULA] is the geometrical distance between the points j and [FORMULA] as defined in Eq. (18). In a similar way the flow [FORMULA] at the outer zone boundary is obtained. The mono scheme requires the knowledge of the time step. However, we fix [FORMULA] after the time derivatives [FORMULA] for the various elements have been calculated. Therefore we must use the [FORMULA], which is equal or larger than [FORMULA] (see Sect. 3.7). The spatial derivative [FORMULA] at a point j is evaluated similar as in Hawley et al. (1984):

[EQUATION]

[EQUATION]

[EQUATION]

For [FORMULA] the mono scheme is identical with the upwind scheme. With the flows [FORMULA] and [FORMULA] at the inner and outer zone boundaries, respectively, the number of particles crossing the boundaries per unit time are obtained according to:

[EQUATION]

Then the time derivative of the particle density of an element at point j is

[EQUATION]

3.5. The evaluation of [FORMULA]

To evaluate the variation of the mass fraction of an element l, which is due to changes of the mass depth at a given point, according to Eq. (9) we need numerical representations of [FORMULA] and [FORMULA]. Here m is the mass depth and X is the mass fraction of an element (the index l is omitted). At a point j we use the obvious representation:

[EQUATION]

An exception is the point [FORMULA] which represents the inner boundary. Here is used:

[EQUATION]

The variation of the mass depth during the considered time step is obtained by linear extrapolation from the preceding time step with

[EQUATION]

[FORMULA] is the width of the preceding time step. The nominator on the right represents the difference between the actual mass depth at point j and the corresponding mass depth in the preceding model.

3.6. Boundary conditions

The outermost points of the primary and secondary grid are identical. The point [FORMULA] represents the center of the outermost zone. The outer boundary of this zone is beyond of our computation domain. The gas pressure at [FORMULA] is [FORMULA] for all our computations. Therefore the density will be low enough, so that for the considered mass loss rates the wind velocity is usually large in comparison to the diffusion velocities. As shown in Paper I this tends to smooth out concentration gradients. This justifies the assumption of homogeneous composition in the region between the two outermost grid points:

[EQUATION]

This choice avoids numerical problems at the outermost point. At the lower boundary ([FORMULA]) at [FORMULA], we assume that diffusion and mass loss do not change the mass fractions. Only if the mass depth at [FORMULA] decreases, the composition is allowed to vary. In this case mass elements located within our computation domain at [FORMULA] move to the lower boundary. So we obtain the inner boundary condition:

[EQUATION]

3.7. The time step

In Sect. 3.2 we have introduced the chosen time step width [FORMULA]. This value is used to define the secondary grids for the various elements and to obtain the time derivatives of the particle densities according to the monotonic transport scheme. For all calculations presented in this paper [FORMULA] is used. The drawback of the numerical method is, that during many time steps the composition fluctuates around some slowly changing mean value. To restrict these fluctuations, during one time step we do not allow the mass fractions to vary by more than [FORMULA]. For each element l at each grid point j we define

[EQUATION]

[FORMULA] is the time, for which the mass fraction would change by [FORMULA]. The actual time step width used in the computations is the minimum value of [FORMULA] and all [FORMULA]:

[EQUATION]

In most cases [FORMULA] and [FORMULA] are identical. Exceptions may occur, if one of the elements has an extremely low abundance or during the calculations for helium-rich white dwarfs with traces of hydrogen. Then [FORMULA] may be smaller than [FORMULA]. The new mass fractions of the element l at the points j of the secondary grid are obtained according to

[EQUATION]

The new mass fractions of these points i of the primary grid, which are not points of the secondary grid, are obtained from interpolation. Then a new model is constructed. The various velocities and particle densities and the secondary grids are updated after each time step. Other quantities like opacities, radiative accelerations per particle and mass loss rates are updated only if the mass fraction of at least one element has changed by at least [FORMULA] at one of the grid points.

3.8. The stability of the method

The method is by far more stable than the one used in Paper I. There the stable upwind scheme has been used only for the part of the flow which is due to the wind, whereas the diffusion flows have been evaluated at the zone boundaries. Then unstabilities occurred in cases of very large diffusion velocities. This may happen for extremely low abundances, where the radiative acceleration may be much larger than the gravitational one. Therefore in the present method stable schemes are used for the total flow. If the velocities increase the grid is adapted by increasing the distances between the points. We use a separate grid for each element. So if one element requires a coarse grid (because of large velocities), the grids for the other elements can be kept more refined, which means a better accuracy. However, numerical instabilities may still occur under certain circumstances. This is for the case of helium-rich white dwarfs with small admixtures of hydrogen ([FORMULA] by number).

Previous Section Next Section Title Page Table of Contents

© European Southern Observatory (ESO) 2000

Online publication: July 13, 2000
helpdesk.link@springer.de