DISPATCH
cooling_Dalgarno.f90
1 ! cooling_Dalgarno.f90 $Id: 96606cd7f07380a2be60ac88d2c80a5209c1785f $
2 !***********************************************************************
3 FUNCTION cooling_dalgarno (self, temp)
4 !
5 ! Fit to cooling profile, merged between Dalgarno & McCray(1972)
6 ! for low temp, and Raymond, Cox & Smith(1976) for high temp.
7 ! C4/H4 corrected relative to sncool.pro to make it smooth at T=1e5.
8 
9  implicit none
10  class(cooling_t):: self
11  real(kind=dp) cooling_dalgarno, temp, qq
12  real(kind=dp), parameter:: &
13  te1=10.0, &
14  te2=2000.0, &
15  te3=8000.0, &
16  te4=2.5e4, &
17  te5=1.0e5, &
18  te6=2.5e5, &
19  te7=4.0e5, &
20  te8=4.5e7, &
21  c1=2.0, &
22  c2=1.5, &
23  c3=5.0, &
24  c4=0.83, &
25  c5=0.0, &
26  c6=-2.54, &
27  c7=-0.49, &
28  c8=0.5, &
29  h1=8.00e15, &
30  h2=3.58e17, &
31  h3=7.79e03, &
32  h4=1.70e22, &
33  h5=2.38e26, &
34  h6=1.22e20, &
35  h7=4.00e28, &
36  h8=1.07e21
37 
38  if (temp .le. t_mc) then
39  qq=0.
40  else if (temp .le. te2) then
41  qq=h1*temp**c1
42  else if (temp .le. te3) then
43  qq=h2*temp**c2
44  else if (temp .le. te4) then
45  qq=h3*temp**c3
46  else if (temp .le. te5) then
47  qq=h4*temp**c4
48  else if (temp .le. te6) then
49  qq=h5*temp**c5
50  else if (temp .le. te7) then
51  qq=h6*temp**c6*1e20
52  else if (temp .le. te8) then
53  qq=h7*temp**c7
54  else
55  qq=h8*temp**c8
56  end if
57  cooling_dalgarno=qq*4e-28
58 END FUNCTION