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


Astron. Astrophys. 334, 953-968 (1998)

Previous Section Next Section Title Page Table of Contents

9. Appendix: the ATON 2.0 code

9.1. Generalities

In this appendix, we provide a synthetic but exhaustive description of the numerical inputs of the code ATON 2.0, to complement the elucidation in Sects. 2 and 3 of the main macro/micro-physical inputs. The choice of fully document the code will also help us, in the future, to avoid useless debates about results obtained from codes having different and/or not fully documented inputs.

ATON 2.0 describes spherically symmetric structures in hydrostatic equilibrium. It has been conceived to follow the evolution of stellar objects from early pre-main sequence phases prior to D-ignition, down to final brown or white dwarf cooling (apart from dynamical phases like full degenerate He-ignition) or to the onset and early developement of [FORMULA] reactions. The ignition of [FORMULA] and the following (pre-supernova) phases are not accounted for. In future papers, we will always refer to an ATON N.M version of the code, where N will keep track of the major macro-physical updates (e.g. rotation, non grey atmospheres etc), and M of the micro-physical ones (thermodynamics, opacities etc). In the same spirit above discussed, any change of release will be fully documented.

9.2. The numerical structure

The internal structure is integrated via the usual Newton-Raphson relaxation (Henyey) method, from the center to the base of the optical atmosphere ([FORMULA]). The independent variable is the mass; the dependent ones are: 1) radius, 2) total luminosity, 3) total pressure and 4) temperature. To avoid numerical precision problems close to the surface, where [FORMULA] can be [FORMULA], the code rezones and performs numerical derivatives directly on the [FORMULA] vector, and the local value of mass at each grid point is obtained as a summation of [FORMULA] from the center. This procedure, as opposed to the traditional one of computing grids of subatmospheres - with pressure as independent variable - down to a given fraction of [FORMULA], allows straightforward evaluation of the gravothermal energy generation rate up to the stellar surface, especially when mass loss (e.g. in contact binaries) plays a dominant role on the structure.

Given the [FORMULA] grid point, and the [FORMULA] dependent variable [FORMULA], the corrections [FORMULA] can be found from the solution of the system (in Einstein notation):

[EQUATION]

where [FORMULA] are the four canonical differential equations, and [FORMULA] are the residuals. Since only two boundary conditions are known at the center, the values of [FORMULA] cannot be found until the surface is reached. We then compute at each grid point the matrix elements µ and [FORMULA], and the vector elements [FORMULA] such that

[EQUATION]

The only non-vanishing coefficients are:

[FORMULA] ; [FORMULA] ; [FORMULA] ; [FORMULA] ; [FORMULA] ; [FORMULA] ; [FORMULA] ; [FORMULA] ; [FORMULA]

Once reached the surface (base of the optical atmosphere) the system is closed by the integration of three optical atmospheres, with (L,R), (L+ [FORMULA] L,R), (L,R+ [FORMULA] R). Backward application of Eq. (A2) allows the evaluation of all the [FORMULA] 's. Note that, with the above choice, [FORMULA] and [FORMULA], and also all the other coefficients do not depart from unity for too many orders of magnitude, avoiding round-off and truncation errors. Also, during the iterations to convergency, the [FORMULA] values are updated as

[EQUATION]

and new values of [FORMULA] are differentially computed only after convergency.

9.3. Internal zoning, time steps and nuclear evolution

Internal zoning of the structure is reassessed at each physical timestep, with particular care in the central and surface regions, in the vicinities of convective boundaries and H or He-burning shells, and close to the superadiabaticity peak. Tipically, pre-main sequence and main sequence structures are resolved in [FORMULA] grid points; red giants in [FORMULA] grid points, [FORMULA] of which in the thin H-burning shell; horizontal branch structures contain [FORMULA] grid points and, during thermal pulses, up to [FORMULA] grid points are often reached.

The physical time step is evaluated according to experience, allowing maximum variations, both integral and local along the structure, of several physical and chemical quantities. Among the integral quantities, total, CNO, [FORMULA] and [FORMULA] luminosities are considered; among the local ones, the four structural quantities and the central chemical compositions. The final time step chosen is obviously the shortest one out of the [FORMULA] fifteen evaluated. For a solar-like star, evolution from pre-main sequence to turn-off takes [FORMULA] physical time steps; He-flash is reached after [FORMULA] time steps (no shell projection), in horizontal branch central He-exhaustion is reached in [FORMULA] time steps, and one fully developed thermal pulse cycle, from peak to peak takes [FORMULA] time steps.

So far we spoke of "physical" time steps. For the purposes of chemical evolution only, each physical time step is further divided into at least 10 "chemical" time steps. Any mechanism leading to a variation of chemical composition, such as nuclear evolution, gravitational settling and convective mixing, is repeatedly applied for the number of chemical time steps up to the reaching of the physical time step, projecting pressure and temperature to get also projected nuclear reaction rates. In this way, the evolution up to the He-flash can require up to [FORMULA] chemical time steps, and the advancement of an H-burning shell from step to step is only a tiny fraction of its thickness.

As for the chemical evolution, we adopt the implicit scheme by Arnett & Truran (1969). It can be assumed equivalent to a first order Runge-Kutta, since it accounts for both the initial and the final chemical composition in the evaluation of the reaction rates. The integration error is then proportional to [FORMULA]. The alternative approach to compute the rates for the initial abundances only can be instead assimilated to a zero order Runge-Kutta, and the integration error would be proportional to [FORMULA], being then much larger. To restore better integration precision in this latter case, it is customary to divide each physical timestep in a large number of chemical timesteps, decreasing in this way [FORMULA] for each step. Also in code ATON 2.0, however, the physical timestep is divided in several chemical ones, as above mentioned, leading to almost vanishing numerical errors in the nuclear evolution integration.

If instantaneous mixing of convective regions is adopted (not recommended, since diffusive mixing is more physically sound), the average chemistry and reaction rates over all the region are evaluated, and the linearization procedure applied to the whole region as a single grid point. The very small variations of chemistry with time obtained in this way ensure enormously better numerical precision of integration than the alternative procedure of locally evaluating the new chemistries and then mixing.

9.4. Diffusive mixing

In the case of diffusive mixing, we must solve Eq. (1) to get the new chemical abundances [FORMULA] at time [FORMULA] for each element a at each mesh point i. Nuclear evolution and mixing are strictly interwined, so that their simultaneous resolution is invoked. We adopted a network of 22 nuclear reactions for 14 elements (Sect. 3.3).

The equation describing the rate of change of abundance for the nucleus a, having number density [FORMULA], is:

[EQUATION]

where [FORMULA] ([FORMULA] = Avogadro's number).

Using a finite difference method based on a two-time level and three-point scheme, Eq. (A1) can be approximated by

[EQUATION]

[EQUATION]

[EQUATION]

where [FORMULA] is computed at half-integer grid points. The boundary conditions have the meaning of no convective flux at the boundaries of convective (plus overshooting - if any) region, since no mass exchange with the non turbulent regions of the star is allowed.

Equation (A2.a) can be rewritten as

[EQUATION]

where [FORMULA] ; [FORMULA] ; [FORMULA] where A(a,k) stands for the coefficients of the [FORMULA] terms and B(a) stands for terms relative to time step [FORMULA]. Note that the abundance of each element at a given grid point is coupled to the abundances of all the other elements at the same grid point, and to its own abundance at adjacent grid points. Since the two boundary conditions are met at the base and at the top of convection, the problem can not be explicitly solved until the whole convective region is addressed.

We now provide a description of the numerical method adopted to solve the system (A3, A2.a, A2.b).

For each convective region of Tot grid points, we should in principle compute, store and invert a [FORMULA] matrix. A careful analysis of Eq. (A3) shows however that the storage of a [FORMULA] matrix is sufficient, since only the matrix elements close to the diagonal are nonzero. Our problem has been reduced to solve a system [FORMULA], where [FORMULA], while [FORMULA].

Were A a square matrix, it would be possible to save computer time by applying the usual L-U (lower-upper) triangular decomposition (Crout's algorithm) such that [FORMULA]. Iteratively evaluating L and U, and recalling that

[FORMULA]

one would get the vector x such that [FORMULA], and finally the vector y so that [FORMULA].

We adapted Crout's algorithm to our matrix. Being a and j two generic chemical elements and i the spatial grid point (from the base of the convective region [FORMULA], to the top [FORMULA]) the algorithms used to determine L and U are as follows:

[EQUATION]

[EQUATION]

[EQUATION]

[EQUATION]

[EQUATION]

[EQUATION]

[EQUATION]

[EQUATION]

[EQUATION]

[EQUATION]

[EQUATION]

[EQUATION]

[EQUATION]

[EQUATION]

[EQUATION]

Since the terms of the L and U matrices do not occupy the same location, and since each element of matrix A is used just once to evaluate the corrisponding ones of matrices L and U, these new elements can be stored in matrice A.

The iterative procedure to evaluate the vector x is:

[EQUATION]

[EQUATION]

Finally the new abundances [FORMULA] for each element can be obtained from the following:

[EQUATION]

[EQUATION]

[EQUATION]

[EQUATION]

[EQUATION]

[EQUATION]

[EQUATION]

[EQUATION]

To further reduce storage allocation, it is again possible to store each new element Y(a,i) in the corrisponding location of X(a,i).

Previous Section Next Section Title Page Table of Contents

© European Southern Observatory (ESO) 1998

Online publication: June 2, 1998

helpdesk.link@springer.de