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


Astron. Astrophys. 322, 943-961 (1997)

Previous Section Next Section Title Page Table of Contents

Appendix A: the details of the simulation methods

The cloud is divided into a number of cells and the radiation field is simulated with a number of photon packages. As a package goes through a cell the number of absorbed photons is calculated and registered by a counter in the cell. These counters are later used in the equilibrium equations to represent the number of induced transitions.

There are two methods for carrying out the simulation part of the calculations. The pseudocode for handling one photon packege is for the simulation method A (without the reference field):

  1. generate a photon package with random position and random direction inside the cloud (or at the cloud boundary); initialize the photon package assigning to it a number of photons which is the number of real photons emitted by the cell (or the background) in one second divided by the expected number of photon packages generated in the cell (at the cloud boundary) during one iteration
  2. repeat the following steps (a) to (c) until the package exits the cloud 1. move the package to the next cell boundary in the original direction 2. using the distance traveled within the cell calculate the optical depth along the trajectory 3. remove the number of absorbed photons from the package and add to a counter in the cell

The corresponding code for method B is:

  1. generate a random position and random direction for a photon package at the cloud boundary; initialize the photon package assigning to it a number of photons which is the number of real photons emitted by the background in one second divided by the total number of photon packages generated during one iteration
  2. repeat the following steps (a) to (d) until the package exits the cloud 1. move the package to the next cell boundary in the original direction 2. using the distance traveled in the cell calculate the optical depth along the trajectory 3. remove the number of absorbed photons from the package and add to a counter in the cell 4. calculate the number of photons emitted by the cell during one iteration, divided by the estimated number of photon packages going through the cell during one iteration and - calculate the fraction of these photons that is absorbed within this cell and add to counters in the cell - add the rest of these photons to the photon package

The level populations are assumed to be the same for all molecules within a cell. However, because of the turbulence and kinetic motions each cell contains molecules with different velocities and the excitation conditions may change with velocity. For example, in a collapsing cloud (if the local linewidth is large enough) each cell contains both molecules moving inwards and outwards and these should probably have different excitation temperatures. These effects are usually ignored and we do not consider them either. Since proper handling of such effects would increase the computational burden by at least one order of magnitude such calculations are currently not practical for three-dimensional models.

In the following sections we list the equations implemented in the simulation program. These will also highlight the difference between our two simulation methods. Some of the equations can also be found in Bernes (1979) but are given here for reference.

A.1. Basic equations

In the following the excitation levels are marked with indices i and j, and levels u and l are such that [FORMULA].

The number of photons emitted in transition [FORMULA], divided by the volume of the emitting cell is

[EQUATION]

and the number of photons coming from outside the cloud in one channel

[EQUATION]

where [FORMULA] is the channel width in velocity and A the surface area. The emission profile [FORMULA] depends on the local gas properties: thermal motions and the microturbulence [FORMULA]. The optical depth of transition u [FORMULA] over the distance s is

[EQUATION]

The absorption profile [FORMULA] is assumed to be the same as the emission profile and Gaussian in shape. The profiles of all transitions are also assumed to be separated from each other in frequency. As [FORMULA] photons with the frequency [FORMULA] travel a distance s, the number of induced upward transitions divided with the number of molecules on the lower level is

[EQUATION]

The total number of absorptions in one second per one molecule is marked [FORMULA] and the equilibrium equations become

[EQUATION]

There are m equations of which only [FORMULA] are linearly independent. One of the equations is replaced with [FORMULA], where n is the total number density of the molecule. The level populations can now be solved, since [FORMULA] and [FORMULA] are assumed to be known and [FORMULA] are a result of the simulation. The simulation is continued using these new population values.

A.2. The use of a reference field

The random fluctuations of the results can be reduced by letting the photon packages represent only the difference between the real radiation field and some reference field corresponding to a constant temperature. The use of a reference field requires changes to the calculations of interactions between photons and gas as well as the equilibrium equations (see also Bernes 1979).

The reference field corresponds a thermodynamic equilibrium at some temperature [FORMULA]. Let the number of real photons be [FORMULA] and the number of photons corresponding to the reference field [FORMULA]. The numbers of photons emitted from a cell with volume V in a transition [FORMULA] within a frequency [FORMULA] are

[EQUATION]

and photons from the background on an area of A,

[EQUATION]

As a photon package passes the distance s through a cell, we add to counters the number of absorption events

[EQUATION]

Actually the counters contain these values integrated over the frequency. In this equation t is the optical depth of the cell for the reference photons

[EQUATION]

During the simulation only the difference between the real absorptions and the absorptions due to the reference field is calculated. The reference field which was previously subtracted is now added back in the equilibrium equations

[EQUATION]

Since the absorption counters Sij depend on [FORMULA] and [FORMULA] calculated in the emitting cell the reference temperature that is used here must be the same, i.e. the reference temperature must be the same in all cells.

Instead of using a fixed reference temperature one can use as the reference the level populations from the previous iteration. The number of photons and the optical depth are calculated for the reference field in just the same way as for the true photons but using the level populations of the previous iteration (see Choi et al. 1995). In this way one does not have to specify reference temperatures and the reference field automatically gets close to its correct value as the iterations converge thereby minimizing the noise. On the other hand, one is forced to store the level populations of two iterations. The added memory requirement may be a problem with large three-dimensional models.

A.3. Photons absorbed in the emitting cell

The previous equations apply only to normal Monte Carlo- simulation (method A). In method B, however, photons are added to passing photon package only at the borders of the cells. If the optical depth of the cell is not very small the photons absorbed within the emitting cell must be treated explicitly and Eq.  A8must be modified. Firstly, by integrating over the photon path the number of new photons emitted from the cell is

[EQUATION]

for the exiting package. Similarly for the reference field

[EQUATION]

Since many rays pass the same cell during each iteration step, the numbers must also be weighted accordingly. When the photons that are both emitted and absorbed in the same cell are taken into account the correct formula for the counters [FORMULA] becomes

[EQUATION]

If the reference field is not used the terms containing t are of course omitted.

Previous Section Next Section Title Page Table of Contents

© European Southern Observatory (ESO) 1997

Online publication: June 5, 1998

helpdesk.link@springer.de