-
Notifications
You must be signed in to change notification settings - Fork 17
/
thomson.c
45 lines (29 loc) · 1.22 KB
/
thomson.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/* ------- file: -------------------------- thomson.c ---------------
Version: rh2.0
Author: Han Uitenbroek ([email protected])
Last modified: Fri Feb 9 12:55:36 2001 --
-------------------------- ----------RH-- */
/* --- Thomson scattering off free electrons (non-relativistic).
See: Mihalas (1978), p. 106
Wavelengths are given in nm, densities in m^-3, opacities in m^2,
and emissivities in J s^-1 Hz^-1 sr^-1.
-- -------------- */
#include <math.h>
#include "rh.h"
#include "atom.h"
#include "atmos.h"
#include "constant.h"
#include "background.h"
/* --- Function prototypes -- -------------- */
/* --- Global variables -- -------------- */
extern Atmosphere atmos;
/* ------- begin -------------------------- Thomson.c --------------- */
void Thomson(double *chi)
{
register int k;
double sigma = 8.0*PI/3.0 * pow(Q_ELECTRON/(sqrt(4.0*PI*EPSILON_0) *
(sqrt(M_ELECTRON)*CLIGHT)), 4);
for (k = 0; k < atmos.Nspace; k++)
chi[k] = atmos.ne[k] * sigma;
}
/* ------- end ---------------------------- Thomson.c --------------- */