Testing the results that the geometry subroutine produces is not easy due to the 3-D nature of the problem. Nonetheless it is important to test the results for a few cases to ensure the correct results are being produced. In order to help convince others who may wish to use the program that these are the correct results an example for one line of sight is tested below. By considering only a small sized cloud it is possible to work through the calculations of certain lines of sight by hand. Confirmation that the program reproduces these results makes it almost certain that it also works correctly for much larger models. The only caveat to this is that there are sometimes special situations that arise (eg. a line of sight passing exactly through the corner of a ring) which may not have been programmed for which also do not occur in a small model cloud such as the one used for testing here.
-2 | -1 | -1 | -0.5 |
-3 | -2 | -2 | -1 |
-3 | -2 | -2 | -1 |
-2 | -1 | -1 | -0.5 |
2 | 1 | 1 | 0.5 |
3 | 2 | 2 | 1 |
3 | 2 | 2 | 1 |
2 | 1 | 1 | 0.5 |
2 | 1 | 1 | 0.5 |
3 | 2 | 2 | 1 |
-3 | -2 | -2 | -1 |
-2 | -1 | -1 | -0.5 |
The cylinders are located at 1, 2 & 3 pc (numbers that are just chosen to make calculations
easier) and the disks are located at 0, 1, 2 & 3 pc.
Line of sight intersections
Figure 5.2 shows the same line of sight as in figure 5.1 in a top view (the upper diagram) and a side view
(lower diagram). In the top view the dashed line is the projection of the line of sight. It starts
at point S, a distance of
0.5 pc from the origin (ie. the centre of the innermost ring) and is angled at 120
to the
line (the dotted line continuing the CS line). This projection (SE) has a length of 2.5 pc,
this is known as it starts
at a height of 2.5 pc above disk 0 (the base of the cloud) and is angled at 45
.
The angle
and the length of the remaining side can be calculated using the cosine rule and yield the
co-ordinates of the exit point (E) from the cloud, ie. (r,
,z)=(2.29, 109
,
0), or in
cartesians (x, y, z)=(-1.15, 1.984, 0). The side view is along the projection of the line of sight,
therefore the points A & B in both diagrams correspond to each other. The side view therefore
shows where the line of sight crosses the ring
boundaries. Since the starting position (marked by a
black circle) is 2.5 pc above the base of the cylinder and the projection along the base also has
length 2.5 pc the length of the line of sight is given by
.
It is now
relatively simple to work out the positions where the line of sight crosses the ring boundaries.
For the cylinder crossings simply use the top view diagram and for the first cylinder crossing
consider the triangle formed by C, S and the intersection of the line of sight with the first
cylinder (ie. point X). This has sides CS=0.5, CX=1 (the first cylinder has radius 1) and
CSX
as before. Now using the cosine rule the intersection is at 1.15 pc,
however, this is only the projection distance so the actual distance along the line of sight is this
divided by
yielding 1.63 pc, or 5.02
m. Similarly the
intersection with the second cylinder is at 3.11 pc = 9.59
m.
Finding where the line
of sight crosses the disks is similar. Using the lower diagram consider the triangle SHG.
Since SGH
both the other angles are 45
.
Length SG is 0.5 so length SH is
m. Similarly the intersections with disks 1 and 0 are
at 2.12 pc = 6.53
m and 3.53 pc = 10.89
m, respectively, this last value
being the
total length of the line of sight in the cloud as it exits the cloud when it passes through disk 0.
So in summary the segments and their lengths are:
Segment No. | Total length | Segment length | |
to end of segment (pc) | (pc) | (
![]() |
|
1 | 0.71 | 0.71 | 2.19 |
2 | 1.63 | 0.92 | 2.83 |
3 | 2.12 | 0.49 | 1.51 |
4 | 3.11 | 0.99 | 3.05 |
5 | 3.53 | 0.42 | 1.29 |
Angle between the line of sight and
Having now calculated all the intersection locations along the line of sight it is necessary to
locate their actual positions in the cloud in order to be able to determine the cloud's velocity
field at each intersection and thereby the component of the velocity field along the line of sight.
Start by considering the situation shown in figure 5.3. The diagram should be interpreted
as a pyramid from above with triangle BCD being the base and point A the apex (which is `above' the
base in this view). Point A represents the start of the line of sight (the same line of sight that has been
referred to in the previous paragraphs) with point D being
some point further along the line of sight. AC represents the unit vector of the radial component of
velocity in the cloud at point A (ie. continuing along this line in the direction CA would lead to the central
line of symmetry in the cloud). The aim here is to determine the angle
,
ie. the angle
between the radial component of velocity and the line of sight. To do this consider the projection
of the line of sight onto the plane containing the vector AC. This is line AB (this plane has constant
in the co-ordinate system, ie. is parallel to the disks in the cloud). Considering just the
first unit length of this line defines point B (this can be any length, 1 is chosen for
convenience). Line BD is perpendicular to the plane containing ABC and therefore intersects the
line of sight. This intersection point is labeled D. Line BC is perpendicular to BD and lies in the
plane ABC, this line intersects the radial velocity component at point C. With this setup it is
fairly easy to find
.
Using triangle ABC side BC is
and then using triangle
BCD side CD is 2. Using triangle ABD length AD is
.
Finally using triangle ACD it is
possible to determine
.
A similar method for the tangential component yields
(the diagram for this is the same as in figure 5.3 except
that
since the radial and tangential velocity components are perpendicular to
one another). The final component with the vertical is simply
(the line of sight
was defined as being angled downwards at
but the vertical velocity component is positive
in the upward direction). This last angle remains the same for all positions along the line of sight whereas
the other two angles may vary with position along the line of sight. Now
using equation 4.17 the total velocity component can be determined. As defined in the
tables above, the velocity components at position
are
,
and
.
Therefore the velocity component along the line of sight at its
starting point is
.
Angle between the line of sight projection and .
[r]
As it can be rather confusing considering the different signs
required for the velocities the basic principles are emphasised here. The
figures
represent the velocity field of the cloud at the point of interest. They are positive when the velocity
is in the direction of the
vectors (ie. outwards, clockwise (viewed from above) and
upwards, respectively).
and
are the components of the velocity field along the
line of sight and are therefore positive when the velocity is aligned along the line of sight. Thus the
vector in this example is negative because there is infall (ie. motion towards the cloud centre)
at the start of the line of sight,
however the contribution that
makes is positive as the line of sight is
pointed towards the cloud centre and therefore this contribution is travelling in that direction. Later
when the line of sight is on the other side of the cloud the velocity from the
contribution will
be negative as it will be travelling against the line of sight. Care is needed using the method used
here in the text that the correct sign is chosen depending on which side of the cloud the line of sight
is on but using the vector method in the program the signs take care of themselves (due to the
co-ordinate system chosen).
It is now necessary to calculate these velocity components at
the disk/cylinder intersections along the line of sight (ie. those positions determined above). Take
the first intersection (with disk 2). By considering figure 5.4 it can be seen that the
situation is much the same as at the start of the line of sight. The only difference is that the
angle BAC in figure 5.3 is now represented by
(as in
figure 5.4) and is no longer
120
.
Figure 5.4 is a top view of the cloud, the start of the line of sight is at
S, the centre line of the cloud is C and the intersection with the first disk is at X. Therefore
the length (in projection) of SX is
(0.71 was the length of the line of
sight to the first disk intersection). CS is known to also be 0.5 pc so it is easy to find
.
For the tangential velocity component it will be
.
In order
to calculate the velocity components the exact position in the cloud (in cylindrical
co-ordinates) of the intersection must be known. Using figure 5.4 the length CX is the
radial component (ie. CX=0.5 pc) and from figure 5.2 the length SG=0.5 pc - ie. the
vertical co-ordinate is 2.5-0.5=2 pc. So the
velocity components are
,
and
.
Now proceeding as before but
substituting the above values of
for the
used previously the
angles between the velocity components and the lines of sight can be calculated as
and
.
Therefore the velocity component
at this point on the line of sight is
.
This procedure can be repeated at the next disk intersection (ie. with disk 1). This time SX is
,
CS is of course still 0.5 pc and CX can be calculated as 1.323 pc, therefore
for the radial component and
for the tangential component. So using
figure 5.3 these give
and
.
The position
for the intersection is (r,
,
z)=(1.323,
,
1.5) so the velocity components are
,
and
.
Therefore the velocity component at this point on the line of sight
is
.
Finally, again for disk 0 (the exit point from the
cloud) we
have SX=2.50 pc, CS=0.5 pc, CX=2.29 pc. So
or
for the radial and
tangential components of velocity respectively. These yield
and
.
So since the velocities at this point are
,
and
we have
.
There are also two cylinder crossings, the first being with cylinder 1. Calculating the velocity
components at these two points involves much the same procedure as with the disks. For cylinder 1,
considering the triangle CSX in figure 5.2, the angle
by use
of
the sine rule. Therefore proceeding as before (ie. using figure 5.4) yields
.
Similarly the intersection with cylinder 2 yields
.
All these data are summarised in
table 5.1.
|
|
Note that the values in the above table are the actual values returned by the program (it can be seen that they are however very close to the values in the previous tables).
As a final test it is worthwhile considering a line of sight that travels in a direction that
takes it across the centre of the cloud. This is necessary to check that the program copes correctly
with the velocity reversal that occurs from one side of the cloud to the other (eg. due to rotation).
Line 21 is a good test for this. It has
,
ie. travels upward rather than downward and
has
,
ie. travels out of the cloud in the other direction to line 25. This time
use ring (1,1) as the starting ring (otherwise the line of sight immediately exits the cloud). It is
only necessary to test the velocity at the start of the line of sight and at one other point (say the
exit point from the cloud) to be certain that it is functioning correctly. At the start we have
.
At the exit point from the cloud (which due to symmetry with line 25 can be
calculated as (r,
,z)=(2.29, 251
,
3)) velocity is given by
.
These also agree with the values returned by the
program.
These rather laborious few pages have been included to hopefully convince users that the geometry routine works correctly for all normal situations and to provide a baseline against which future modifications can be checked. Note that the method used here for the check was deliberately chosen to be different from that used by the program which hopefully eliminates the possibility of an error in the method used causing a problem.