MPI-AMRVAC 3.2
The MPI - Adaptive Mesh Refinement - Versatile Advection Code (development version)
Loading...
Searching...
No Matches
mod_radiative_cooling.t
Go to the documentation of this file.
1!> module radiative cooling -- add optically thin radiative cooling
2!>
3!> only uses the (Townsend) exact integration method, can be used in HD, ffhd, MHD, twofl
4!>
5!> Assumptions: full ionized plasma dominated by H and He, ionization equilibrium
6!> Formula: Q=-n_H*n_e*f(T), positive f(T) function is pre-computed and tabulated or a piecewise power law
7!> Uses the various cooling tables stored in mod_radloss_tables.t
8!>
10
11 use mod_global_parameters, only: std_len
12 use mod_physics
14 use mod_comm_lib, only: mpistop
15 implicit none
16
17 !> Helium abundance over Hydrogen
18 double precision, private :: He_abundance
19
20 !> The adiabatic index
21 double precision, private :: rc_gamma
22
23 !> The adiabatic index minus 1
24 double precision, private :: rc_gamma_1
25
26 !> inverse of the adiabatic index minus 1
27 double precision, private :: invgam
28
29 abstract interface
30 subroutine get_subr1(w,x,ixI^L,ixO^L,res)
32 integer, intent(in) :: ixI^L, ixO^L
33 double precision, intent(in) :: w(ixI^S,nw)
34 double precision, intent(in) :: x(ixI^S,1:ndim)
35 double precision, intent(out):: res(ixI^S)
36 end subroutine get_subr1
37 end interface
38
40
41 double precision :: rad_cut_hgt
42 double precision :: rad_cut_dey
43
44 ! these are set in init method
45 double precision, allocatable :: tcool(:), lcool(:), dldtcool(:)
46 double precision, allocatable :: yc(:)
47 double precision :: tref, lref, tcoolmin,tcoolmax
48 double precision :: lgtcoolmin, lgtcoolmax, lgstep
49
50 ! The piecewise powerlaw (PPL) tabels and variabels
51 ! x_* en t_* are given as log_10
52 double precision, allocatable :: y_ppl(:), t_ppl(:), l_ppl(:), a_ppl(:)
53
54 !> Lower limit of temperature
55 double precision :: tlow
56
57 !> Index of the energy density
58 integer :: e_
59 !> Index of cut off temperature for TRAC
60 integer :: tcoff_
61
62 ! these are set as parameters
63 !> Resolution of temperature in interpolated tables
64 integer :: ncool
65
66 integer :: n_ppl
67
68 !> Fixed temperature not lower than tlow
69 logical :: tfix
70
71 !> Add cooling source in a split way (.true.) or un-split way (.false.)
72 logical :: rc_split
73
74 logical :: isppl = .false.
75
76 !> cutoff radiative cooling below rad_cut_hgt
77 logical :: rad_cut
78 !> whether background equilibrium contribution is split off
79 logical :: has_equi = .false.
80 !> whether background equilibrium is compensated in thermal balance
81 logical :: subtract_equi = .false.
82
83 !> Name of cooling curve
84 character(len=std_len) :: coolcurve
85
86 procedure(get_subr1), pointer, nopass :: get_rho => null()
87 procedure(get_subr1), pointer, nopass :: get_rho_equi => null()
88 procedure(get_subr1), pointer, nopass :: get_pthermal => null()
89 procedure(get_subr1), pointer, nopass :: get_pthermal_equi => null()
90 procedure(get_subr1), pointer, nopass :: get_var_rfactor => null()
91 procedure(get_subr1), pointer, nopass :: get_temperature_equi => null()
92
93 end type rc_fluid
94
95 contains
96
97 !> Radiative cooling initialization
98 subroutine radiative_cooling_init_params(phys_gamma,He_abund)
100 double precision, intent(in) :: phys_gamma,He_abund
101
102 rc_gamma=phys_gamma
103 he_abundance=he_abund
104 end subroutine radiative_cooling_init_params
105
106 subroutine radiative_cooling_init(fl,read_params)
108 interface
109 subroutine read_params(fl)
111 import rc_fluid
112 type(rc_fluid), intent(inout) :: fl
113
114 end subroutine read_params
115 end interface
116
117 type(rc_fluid), intent(inout) :: fl
118
119 double precision, dimension(:), allocatable :: t_table
120 double precision, dimension(:), allocatable :: L_table
121 double precision :: ratt, fact1, fact2, fact3, dL1, dL2
122 double precision :: tstep, Lstep
123 integer :: ntable, i, j
124 logical :: jump
125 Character(len=65) :: PPL_curves(1:6)
126
127 fl%ncool=4000
128 fl%coolcurve='JCcorona'
129 fl%tlow=bigdouble
130 fl%Tfix=.false.
131 fl%rc_split=.false.
132 fl%rad_cut=.false.
133 fl%rad_cut_hgt=0.5d0
134 fl%rad_cut_dey=0.15d0
135 call read_params(fl)
136
137 if(fl%rc_split) any_source_split=.true.
138
139 ! Checks if coolcurve is a piecewise power law (PPL)
140 ppl_curves = [Character(len=65) :: 'Hildner','FM', 'Rosner', 'Klimchuk','SPEX_DM_rough','SPEX_DM_fine']
141 do i=1,size(ppl_curves)
142 if (ppl_curves(i)==fl%coolcurve) then
143 fl%isPPL = .true.
144 end if
145 end do
146
147 ! Init for PPL
148 if (fl%isPPL) then
149 ! Read in tables and create t_PPL, l_PPL, a_PPL
150 select case(fl%coolcurve)
151
152 case('Hildner')
153 if(mype ==0) &
154 print *,'Use Hildner (1974) piecewise power law'
155 fl%n_PPL = n_hildner
156 allocate(fl%t_PPL(1:fl%n_PPL+1), fl%l_PPL(1:fl%n_PPL+1))
157 allocate(fl%a_PPL(1:fl%n_PPL))
158 fl%t_PPL(1:fl%n_PPL+1) = t_hildner(1:n_hildner+1)
159 fl%a_PPL(1:fl%n_PPL) = a_hildner(1:n_hildner)
160 fl%l_PPL(1:fl%n_PPL) = 10.d0**x_hildner(1:n_hildner) * (10.d0**fl%t_PPL(1:fl%n_PPL))**fl%a_PPL(1:fl%n_PPL)
161
162 case('FM')
163 if(mype==0) &
164 print *,'Use Forbes and Malherbe (1991)-like piecewise power law'
165 fl%n_PPL = n_fm
166 allocate(fl%t_PPL(1:fl%n_PPL+1), fl%l_PPL(1:fl%n_PPL+1))
167 allocate(fl%a_PPL(1:fl%n_PPL))
168 fl%t_PPL(1:fl%n_PPL+1) = t_fm(1:n_fm+1)
169 fl%a_PPL(1:fl%n_PPL) = a_fm(1:n_fm)
170 fl%l_PPL(1:fl%n_PPL) = 10.d0**x_fm(1:n_fm) * (10.d0**fl%t_PPL(1:fl%n_PPL))**fl%a_PPL(1:fl%n_PPL)
171
172 case('Rosner')
173 if(mype==0) &
174 print *,'Use piecewise power law according to Rosner (1978)'
175 if(mype ==0) &
176 print *,'and extended by Priest (1982) from Van Der Linden (1991)'
177 fl%n_PPL = n_rosner
178 allocate(fl%t_PPL(1:fl%n_PPL+1), fl%l_PPL(1:fl%n_PPL+1))
179 allocate(fl%a_PPL(1:fl%n_PPL))
180 fl%t_PPL(1:fl%n_PPL+1) = t_rosner(1:n_rosner+1)
181 fl%a_PPL(1:fl%n_PPL) = a_rosner(1:n_rosner)
182 fl%l_PPL(1:fl%n_PPL) = 10.d0**x_rosner(1:n_rosner) * (10.d0**fl%t_PPL(1:fl%n_PPL))**fl%a_PPL(1:fl%n_PPL)
183
184 case('Klimchuk')
185 if(mype==0) &
186 print *,'Use Klimchuk (2008) piecewise power law'
187 fl%n_PPL = n_klimchuk
188 allocate(fl%t_PPL(1:fl%n_PPL+1), fl%l_PPL(1:fl%n_PPL+1))
189 allocate(fl%a_PPL(1:fl%n_PPL))
190 fl%t_PPL(1:fl%n_PPL+1) = t_klimchuk(1:n_klimchuk+1)
191 fl%a_PPL(1:fl%n_PPL) = a_klimchuk(1:n_klimchuk)
192 fl%l_PPL(1:fl%n_PPL) = 10.d0**x_klimchuk(1:n_klimchuk) * (10.d0**fl%t_PPL(1:fl%n_PPL))**fl%a_PPL(1:fl%n_PPL)
193
194 case('SPEX_DM_rough')
195 if(mype==0) &
196 print *,'Use the rough piece wise power law fit to the SPEX_DM curve (2009)'
197 fl%n_PPL = n_spex_dm_rough
198 allocate(fl%t_PPL(1:fl%n_PPL+1), fl%l_PPL(1:fl%n_PPL+1))
199 allocate(fl%a_PPL(1:fl%n_PPL))
200 fl%t_PPL(1:fl%n_PPL+1) = t_spex_dm_rough(1:n_spex_dm_rough+1)
201 fl%a_PPL(1:fl%n_PPL) = a_spex_dm_rough(1:n_spex_dm_rough)
202 fl%l_PPL(1:fl%n_PPL) = 10.d0**x_spex_dm_rough(1:n_spex_dm_rough) * (10.d0**fl%t_PPL(1:fl%n_PPL))**fl%a_PPL(1:fl%n_PPL)
203
204 case('SPEX_DM_fine')
205 if(mype==0) &
206 print *,'Use the fine, detailed piece wise power law fit to the SPEX_DM curve (2009)'
207 fl%n_PPL = n_spex_dm_fine
208 allocate(fl%t_PPL(1:fl%n_PPL+1), fl%l_PPL(1:fl%n_PPL+1))
209 allocate(fl%a_PPL(1:fl%n_PPL))
210 fl%t_PPL(1:fl%n_PPL+1) = t_spex_dm_fine(1:n_spex_dm_fine+1)
211 fl%a_PPL(1:fl%n_PPL) = a_spex_dm_fine(1:n_spex_dm_fine)
212 fl%l_PPL(1:fl%n_PPL) = 10.d0**x_spex_dm_fine(1:n_spex_dm_fine) * (10.d0**fl%t_PPL(1:fl%n_PPL))**fl%a_PPL(1:fl%n_PPL)
213
214 case default
215 call mpistop("This piecewise power law is unknown")
216 end select
217
218 ! Go from logarithmic to actual values.
219 fl%t_PPL(1:fl%n_PPL+1) = 10.d0**fl%t_PPL(1:fl%n_PPL+1)
220 ! Change unit of table if SI is used instead of cgs
221 if (si_unit) fl%l_PPL(1:fl%n_PPL) = fl%l_PPL(1:fl%n_PPL) * 10.0d0**(-13)
222
223 ! Make dimensionless
224 fl%t_PPL(1:fl%n_PPL+1) = fl%t_PPL(1:fl%n_PPL+1) / unit_temperature
225 fl%l_PPL(1:fl%n_PPL) = fl%l_PPL(1:fl%n_PPL) * unit_numberdensity**2 * unit_time / unit_pressure * (1.d0+2.d0*he_abundance)
226
227 ! Set tref en lref
228 fl%l_PPL(fl%n_PPL+1) = fl%l_PPL(fl%n_PPL) * ( fl%t_PPL(fl%n_PPL+1) / fl%t_PPL(fl%n_PPL) )**fl%a_PPL(fl%n_PPL)
229 fl%lref = fl%l_PPL(fl%n_PPL+1)
230 fl%tref = fl%t_PPL(fl%n_PPL+1)
231
232 ! Set tcoolmin and tcoolmax
233 fl%tcoolmin = fl%t_PPL(1)
234 fl%tcoolmax = fl%t_PPL(fl%n_PPL+1)
235 ! smaller value for lowest temperatures from cooling table and user's choice
236 if (fl%tlow==bigdouble) fl%tlow=fl%tcoolmin
237 !create y_PPL
238 call create_y_ppl(fl)
239
240 else
241
242 ! Init for interpolatable tables
243 allocate(fl%tcool(1:fl%ncool), fl%Lcool(1:fl%ncool), fl%dLdtcool(1:fl%ncool))
244 allocate(fl%Yc(1:fl%ncool))
245
246 fl%tcool(1:fl%ncool) = zero
247 fl%Lcool(1:fl%ncool) = zero
248 fl%dLdtcool(1:fl%ncool) = zero
249
250 ! Read in the selected cooling curve
251 select case(fl%coolcurve)
252
253 case('JCcorona')
254 if(mype ==0) &
255 print *,'Use Colgan & Feldman (2008) cooling curve'
256 if(mype ==0) &
257 print *,'This version only till 10000 K, beware for floor T treatment'
258 ntable = n_jccorona
259 allocate(t_table(1:ntable))
260 allocate(l_table(1:ntable))
261 t_table(1:ntable) = t_jccorona(1:n_jccorona)
262 l_table(1:ntable) = l_jccorona(1:n_jccorona)
263
264 case('DM')
265 if(mype ==0) &
266 print *,'Use Dalgarno & McCray (1972) cooling curve'
267 ntable = n_dm
268 allocate(t_table(1:ntable))
269 allocate(l_table(1:ntable))
270 t_table(1:ntable) = t_dm(1:n_dm)
271 l_table(1:ntable) = l_dm(1:n_dm)
272
273 case('MB')
274 if(mype ==0) &
275 write(*,'(3a)') 'Use MacDonald & Bailey (1981) cooling curve '&
276 ,'as implemented in ZEUS-3D, with the values '&
277 ,'from Dalgarno & McCRay (1972) for low temperatures.'
278 ntable = n_mb + 20
279 allocate(t_table(1:ntable))
280 allocate(l_table(1:ntable))
281 t_table(1:ntable) = t_dm(1:21)
282 l_table(1:ntable) = l_dm(1:21)
283 t_table(22:ntable) = t_mb(2:n_mb)
284 l_table(22:ntable) = l_mb(2:n_mb)
285
286 case('MLcosmol')
287 if(mype ==0) &
288 print *,'Use Mellema & Lundqvist (2002) cooling curve '&
289 ,'for zero metallicity '
290 ntable = n_mlcosmol
291 allocate(t_table(1:ntable))
292 allocate(l_table(1:ntable))
293 t_table(1:ntable) = t_mlcosmol(1:n_mlcosmol)
294 l_table(1:ntable) = l_mlcosmol(1:n_mlcosmol)
295
296 case('MLwc')
297 if(mype ==0) &
298 print *,'Use Mellema & Lundqvist (2002) cooling curve '&
299 ,'for WC-star metallicity '
300 ntable = n_mlwc
301 allocate(t_table(1:ntable))
302 allocate(l_table(1:ntable))
303 t_table(1:ntable) = t_mlwc(1:n_mlwc)
304 l_table(1:ntable) = l_mlwc(1:n_mlwc)
305
306 case('MLsolar1')
307 if(mype ==0) &
308 print *,'Use Mellema & Lundqvist (2002) cooling curve '&
309 ,'for solar metallicity '
310 ntable = n_mlsolar1
311 allocate(t_table(1:ntable))
312 allocate(l_table(1:ntable))
313 t_table(1:ntable) = t_mlsolar1(1:n_mlsolar1)
314 l_table(1:ntable) = l_mlsolar1(1:n_mlsolar1)
315
316 case('cloudy_ism')
317 if(mype ==0) &
318 print *,'Use Cloudy based cooling curve '&
319 ,'for ism metallicity '
320 ntable = n_cl_ism
321 allocate(t_table(1:ntable))
322 allocate(l_table(1:ntable))
323 t_table(1:ntable) = t_cl_ism(1:n_cl_ism)
324 l_table(1:ntable) = l_cl_ism(1:n_cl_ism)
325
326 case('cloudy_solar')
327 if(mype ==0) &
328 print *,'Use Cloudy based cooling curve '&
329 ,'for solar metallicity '
330 ntable = n_cl_solar
331 allocate(t_table(1:ntable))
332 allocate(l_table(1:ntable))
333 t_table(1:ntable) = t_cl_solar(1:n_cl_solar)
334 l_table(1:ntable) = l_cl_solar(1:n_cl_solar)
335
336 case('SPEX')
337 if(mype ==0) &
338 print *,'Use SPEX cooling curve (Schure et al. 2009) '&
339 ,'for solar metallicity '
340 ntable = n_spex
341 allocate(t_table(1:ntable))
342 allocate(l_table(1:ntable))
343 t_table(1:ntable) = t_spex(1:n_spex)
344 l_table(1:ntable) = l_spex(1:n_spex) + log10(nenh_spex(1:n_spex))
345
346 case('SPEX_DM')
347 if(mype ==0) then
348 print *, 'Use SPEX cooling curve for solar metallicity above 10^4 K. '
349 print *, 'At lower temperatures,use Dalgarno & McCray (1972), '
350 print *, 'with a pre-set ionization fraction of 10^-3. '
351 print *, 'as described by Schure et al. (2009). '
352 endif
353 ntable = n_spex + n_dm_2 - 6
354 allocate(t_table(1:ntable))
355 allocate(l_table(1:ntable))
356 t_table(1:n_dm_2-1) = t_dm_2(1:n_dm_2-1)
357 l_table(1:n_dm_2-1) = l_dm_2(1:n_dm_2-1)
358 t_table(n_dm_2:ntable) = t_spex(6:n_spex)
359 l_table(n_dm_2:ntable) = l_spex(6:n_spex) + log10(nenh_spex(6:n_spex))
360
361 case('Dere_corona')
362 if(mype ==0) &
363 print *,'Use Dere (2009) cooling curve for solar corona'
364 ntable = n_dere
365 allocate(t_table(1:ntable))
366 allocate(l_table(1:ntable))
367 t_table(1:ntable) = t_dere(1:n_dere)
368 l_table(1:ntable) = l_dere_corona(1:n_dere)
369
370 case('Dere_corona_DM')
371 if(mype==0)&
372 print *, 'Combination of Dere_corona (2009) for high temperatures and'
373 if(mype==0)&
374 print *, 'Dalgarno & McCray (1972), DM2, for low temperatures'
375 ntable = n_dere + n_dm_2 - 1
376 allocate(t_table(1:ntable))
377 allocate(l_table(1:ntable))
378 t_table(1:n_dm_2-1) = t_dm_2(1:n_dm_2-1)
379 l_table(1:n_dm_2-1) = l_dm_2(1:n_dm_2-1)
380 t_table(n_dm_2:ntable) = t_dere(1:n_dere)
381 l_table(n_dm_2:ntable) = l_dere_corona(1:n_dere)
382
383 case('Dere_photo')
384 if(mype ==0) &
385 print *,'Use Dere (2009) cooling curve for solar photophere'
386 ntable = n_dere
387 allocate(t_table(1:ntable))
388 allocate(l_table(1:ntable))
389 t_table(1:ntable) = t_dere(1:n_dere)
390 l_table(1:ntable) = l_dere_photo(1:n_dere)
391
392 case('Dere_photo_DM')
393 if(mype==0)&
394 print *, 'Combination of Dere_photo (2009) for high temperatures and'
395 if(mype==0)&
396 print *, 'Dalgarno & McCray (1972), DM2, for low temperatures'
397 ntable = n_dere + n_dm_2 - 1
398 allocate(t_table(1:ntable))
399 allocate(l_table(1:ntable))
400 t_table(1:n_dm_2-1) = t_dm_2(1:n_dm_2-1)
401 l_table(1:n_dm_2-1) = l_dm_2(1:n_dm_2-1)
402 t_table(n_dm_2:ntable) = t_dere(1:n_dere)
403 l_table(n_dm_2:ntable) = l_dere_photo(1:n_dere)
404
405 case('Colgan')
406 if(mype==0) &
407 print *, 'Use Colgan (2008) cooling curve'
408 ntable = n_colgan
409 allocate(t_table(1:ntable))
410 allocate(l_table(1:ntable))
411 t_table(1:ntable) = t_colgan(1:n_colgan)
412 l_table(1:ntable) = l_colgan(1:n_colgan)
413
414 case('Colgan_DM')
415 if(mype==0)&
416 print *, 'Combination of Colgan (2008) for high temperatures and'
417 if(mype==0)&
418 print *, 'Dalgarno & McCray (1972), DM2, for low temperatures'
419 ntable = n_colgan + n_dm_2
420 allocate(t_table(1:ntable))
421 allocate(l_table(1:ntable))
422 t_table(1:n_dm_2) = t_dm_2(1:n_dm_2)
423 l_table(1:n_dm_2) = l_dm_2(1:n_dm_2)
424 t_table(n_dm_2+1:ntable) = t_colgan(1:n_colgan)
425 l_table(n_dm_2+1:ntable) = l_colgan(1:n_colgan)
426
427 case default
428 call mpistop("This coolingcurve is unknown")
429 end select
430
431 ! create cooling table(s) for use in amrvac
432 fl%tcoolmax = t_table(ntable)
433 fl%tcoolmin = t_table(1)
434 ratt = (fl%tcoolmax-fl%tcoolmin)/( dble(fl%ncool-1) + smalldouble)
435
436 fl%tcool(1) = fl%tcoolmin
437 fl%Lcool(1) = l_table(1)
438
439 fl%tcool(fl%ncool) = fl%tcoolmax
440 fl%Lcool(fl%ncool) = l_table(ntable)
441
442 do i=2,fl%ncool ! loop to create one table
443 fl%tcool(i) = fl%tcool(i-1)+ratt
444 do j=1,ntable-1 ! loop to create one spot on a table
445 ! Second order polynomial interpolation, except at the outer edge,
446 ! or in case of a large jump.
447 if(fl%tcool(i) < t_table(j+1)) then
448 if(j.eq. ntable-1 )then
449 fact1 = (fl%tcool(i)-t_table(j+1)) &
450 /(t_table(j)-t_table(j+1))
451 fact2 = (fl%tcool(i)-t_table(j)) &
452 /(t_table(j+1)-t_table(j))
453 fl%Lcool(i) = l_table(j)*fact1 + l_table(j+1)*fact2
454 exit
455 else
456 dl1 = l_table(j+1)-l_table(j)
457 dl2 = l_table(j+2)-l_table(j+1)
458 jump =(max(dabs(dl1),dabs(dl2)) > 2*min(dabs(dl1),dabs(dl2)))
459 end if
460 if( jump ) then
461 fact1 = (fl%tcool(i)-t_table(j+1)) &
462 /(t_table(j)-t_table(j+1))
463 fact2 = (fl%tcool(i)-t_table(j)) &
464 /(t_table(j+1)-t_table(j))
465 fl%Lcool(i) = l_table(j)*fact1 + l_table(j+1)*fact2
466 exit
467 else
468 fact1 = ((fl%tcool(i)-t_table(j+1)) &
469 * (fl%tcool(i)-t_table(j+2))) &
470 / ((t_table(j)-t_table(j+1)) &
471 * (t_table(j)-t_table(j+2)))
472 fact2 = ((fl%tcool(i)-t_table(j)) &
473 * (fl%tcool(i)-t_table(j+2))) &
474 / ((t_table(j+1)-t_table(j)) &
475 * (t_table(j+1)-t_table(j+2)))
476 fact3 = ((fl%tcool(i)-t_table(j)) &
477 * (fl%tcool(i)-t_table(j+1))) &
478 / ((t_table(j+2)-t_table(j)) &
479 * (t_table(j+2)-t_table(j+1)))
480 fl%Lcool(i) = l_table(j)*fact1 + l_table(j+1)*fact2 &
481 + l_table(j+2)*fact3
482 exit
483 end if
484 end if
485 end do ! end loop to find create one spot on a table
486 end do ! end loop to create one table
487
488 ! Go from logarithmic to actual values.
489 fl%tcool(1:fl%ncool) = 10.0d0**fl%tcool(1:fl%ncool)
490 fl%Lcool(1:fl%ncool) = 10.0d0**fl%Lcool(1:fl%ncool)
491
492 ! Change unit of table if SI is used instead of cgs
493 if (si_unit) fl%Lcool(1:fl%ncool) = fl%Lcool(1:fl%ncool) * 10.0d0**(-13)
494
495 ! Scale both T and Lambda
496 fl%tcool(1:fl%ncool) = fl%tcool(1:fl%ncool) / unit_temperature
497 fl%Lcool(1:fl%ncool) = fl%Lcool(1:fl%ncool) * unit_numberdensity**2 * unit_time / unit_pressure * (1.d0+2.d0*he_abundance)
498
499 fl%tcoolmin = fl%tcool(1)+smalldouble ! avoid pointless interpolation
500 ! smaller value for lowest temperatures from cooling table and user's choice
501 if (fl%tlow==bigdouble) fl%tlow=fl%tcoolmin
502 fl%tcoolmax = fl%tcool(fl%ncool)
503 fl%lgtcoolmin = dlog10(fl%tcoolmin)
504 fl%lgtcoolmax = dlog10(fl%tcoolmax)
505 fl%lgstep = (fl%lgtcoolmax-fl%lgtcoolmin) * 1.d0 / (fl%ncool-1)
506 fl%dLdtcool(1) = (fl%Lcool(2)-fl%Lcool(1))/(fl%tcool(2)-fl%tcool(1))
507 fl%dLdtcool(fl%ncool) = (fl%Lcool(fl%ncool)-fl%Lcool(fl%ncool-1))/(fl%tcool(fl%ncool)-fl%tcool(fl%ncool-1))
508
509 do i=2,fl%ncool-1
510 fl%dLdtcool(i) = (fl%Lcool(i+1)-fl%Lcool(i-1))/(fl%tcool(i+1)-fl%tcool(i-1))
511 end do
512
513 deallocate(t_table)
514 deallocate(l_table)
515
516 fl%tref = fl%tcoolmax
517 fl%lref = fl%Lcool(fl%ncool)
518 fl%Yc(fl%ncool) = zero
519 do i=fl%ncool-1, 1, -1
520 fl%Yc(i) = fl%Yc(i+1)
521 do j=1,100
522 tstep = 1.0d-2*(fl%tcool(i+1)-fl%tcool(i))
523 call findl(fl%tcool(i+1)-j*tstep, lstep, fl)
524 fl%Yc(i) = fl%Yc(i) + fl%lref/fl%tref*tstep/lstep
525 end do
526 end do
527 end if
528
529 rc_gamma_1=rc_gamma-1.d0
530 invgam = 1.d0/rc_gamma_1
531
532 end subroutine radiative_cooling_init
533
534 subroutine create_y_ppl(fl)
535 ! creates the constants of integration needed for solving
536 ! the cooling law exact for a piecewise power law
537 ! In correspondence with eq. A6 of Townsend (2009)
539 type(rc_fluid) :: fl
540 double precision :: y_extra, factor
541 integer :: i
542
543 allocate(fl%y_PPL(1:fl%n_PPL+1))
544
545 fl%y_PPL(1:fl%n_PPL+1) = zero
546
547 do i=fl%n_PPL, 1, -1
548 factor = fl%l_PPL(fl%n_PPL+1) * fl%t_PPL(i) / (fl%l_PPL(i) * fl%t_PPL(fl%n_PPL+1))
549 if (fl%a_PPL(i) == 1.d0) then
550 y_extra = log( fl%t_PPL(i) / fl%t_PPL(i+1) )
551 else
552 y_extra = 1 / (1 - fl%a_PPL(i)) * (1 - ( fl%t_PPL(i) / fl%t_PPL(i+1) )**(fl%a_PPL(i)-1) )
553 end if
554 fl%y_PPL(i) = fl%y_PPL(i+1) - factor*y_extra
555 end do
556 end subroutine create_y_ppl
557
558 subroutine getvar_cooling(ixI^L,ixO^L,w,x,coolrate,fl)
559 ! Create extra variable to show cooling rate in the output
560 ! Uses a simple explicit scheme.
561 ! N.B. Since there is no knowledge of the timestep size,
562 ! there is no upper limit for the cooling rate.
564
565 integer, intent(in) :: ixI^L,ixO^L
566 double precision, intent(in) :: x(ixI^S,1:ndim)
567 double precision :: w(ixI^S,1:nw)
568 double precision, intent(out):: coolrate(ixI^S)
569 type(rc_fluid), intent(in) :: fl
570
571 double precision :: pth(ixI^S),rho(ixI^S)
572 double precision :: L1,Te(ixI^S),Rfactor(ixI^S)
573 integer :: ix^D
574
575 call fl%get_pthermal(w,x,ixi^l,ixo^l,pth)
576 call fl%get_rho(w,x,ixi^l,ixo^l,rho)
577 call fl%get_var_Rfactor(w,x,ixi^l,ixo^l,rfactor)
578 te(ixo^s) = pth(ixo^s) / (rho(ixo^s)*rfactor(ixo^s))
579
580 {do ix^db = ixo^lim^db\}
581 ! Determine explicit cooling
582 if(te(ix^d) <= fl%tcoolmin) then
583 l1 = zero
584 else if(te(ix^d) >= fl%tcoolmax)then
585 call calc_l_extended(te(ix^d),l1,fl)
586 l1 = l1*rho(ix^d)**2
587 else
588 call findl(te(ix^d),l1,fl)
589 l1 = l1*rho(ix^d)**2
590 end if
591 if(slab_uniform .and. fl%rad_cut .and. x(ix^d,ndim) .le. fl%rad_cut_hgt) then
592 l1 = l1*exp(-(x(ix^d,ndim)-fl%rad_cut_hgt)**2/fl%rad_cut_dey**2)
593 end if
594 coolrate(ix^d) = l1
595 {end do\}
596 end subroutine getvar_cooling
597
598 subroutine getvar_cooling_exact(qdt, ixI^L, ixO^L, wCT, w, x, coolrate, fl)
599 ! Calculates cooling rate using the exact cooling method,
601
602 integer, intent(in) :: ixI^L, ixO^L
603 double precision, intent(in) :: qdt, x(ixI^S, 1:ndim), wCT(ixI^S, 1:nw)
604 double precision :: w(ixI^S, 1:nw)
605 double precision, intent(out) :: coolrate(ixI^S)
606 type(rc_fluid), intent(in) :: fl
607 double precision :: y1, y2, l1, tlocal2
608 double precision :: Te(ixI^S), pnew(ixI^S), rho(ixI^S), rhonew(ixI^S)
609 double precision :: emin, Lmax, fact, Rfactor(ixI^S), pth(ixI^S)
610 integer :: ix^D
611
612 call fl%get_pthermal(wct, x, ixi^l, ixo^l, pth)
613 call fl%get_rho(wct, x, ixi^l, ixo^l, rho)
614 call fl%get_var_Rfactor(wct,x,ixi^l,ixo^l,rfactor)
615 te(ixo^s)=pth(ixo^s)/(rho(ixo^s)*rfactor(ixo^s))
616
617 call fl%get_pthermal(w, x, ixi^l, ixo^l, pnew)
618 call fl%get_rho(w, x, ixi^l, ixo^l, rhonew)
619
620 fact=fl%lref*qdt/fl%tref
621
622 {do ix^db = ixo^lim^db\}
623 emin = rhonew(ix^d) * fl%tlow * rfactor(ix^d) * invgam
624 lmax = max(zero, ( pnew(ix^d)*invgam - emin ) / qdt)
625
626 ! No cooling if temperature is below floor level.
627 ! Assuming Bremsstrahlung if temperature is higher than maximum.
628 if( te(ix^d)<= fl%tcoolmin) then
629 l1 = zero
630 else if( te(ix^d)>= fl%tcoolmax ) then
631 call calc_l_extended(te(ix^d), l1, fl)
632 l1 = l1 * rho(ix^d)**2
633 l1 = min(l1, lmax)
634 else
635 call findy(te(ix^d), y1, fl)
636 y2 = y1 + fact * rho(ix^d)*rc_gamma_1
637 call findt(tlocal2, y2, fl)
638 if( tlocal2 <= fl%tcoolmin ) then
639 l1 = lmax
640 else
641 l1 = (te(ix^d)- tlocal2)*rho(ix^d)*rfactor(ix^d)*invgam/qdt
642 end if
643 l1 = min(l1, lmax)
644 end if
645 if(slab_uniform .and. fl%rad_cut .and. x(ix^d,ndim) .le. fl%rad_cut_hgt) then
646 l1 = l1*exp(-(x(ix^d,ndim)-fl%rad_cut_hgt)**2/fl%rad_cut_dey**2)
647 end if
648 coolrate(ix^d) = l1
649 {end do\}
650 end subroutine getvar_cooling_exact
651
652 subroutine radiative_cooling_add_source(qdt,ixI^L,ixO^L,wCT,wCTprim,w,x,&
653 qsourcesplit,active,fl)
654 ! w[iw]=w[iw]+qdt*S[wCT,x] where S is the source based on wCT within ixO
656 integer, intent(in) :: ixI^L, ixO^L
657 double precision, intent(in) :: qdt, x(ixI^S,1:ndim), wCT(ixI^S,1:nw), wCTprim(ixI^S,1:nw)
658 double precision, intent(inout) :: w(ixI^S,1:nw)
659 logical, intent(in) :: qsourcesplit
660 logical, intent(inout) :: active
661 type(rc_fluid), intent(in) :: fl
662 double precision, allocatable, dimension(:^D&) :: Lequi
663
664 if(qsourcesplit .eqv.fl%rc_split) then
665 active = .true.
666 call cool_exact(qdt,ixi^l,ixo^l,wct,wctprim,w,x,fl)
667 if(fl%subtract_equi) then
668 allocate(lequi(ixi^s))
669 call get_cool_equi(qdt,ixi^l,ixo^l,wct,w,x,fl,lequi)
670 w(ixo^s,fl%e_) = w(ixo^s,fl%e_)+lequi(ixo^s)
671 deallocate(lequi)
672 endif
673 if( fl%Tfix ) call floortemperature(qdt,ixi^l,ixo^l,wct,w,x,fl)
674 end if
675 end subroutine radiative_cooling_add_source
676
677 subroutine floortemperature(qdt,ixI^L,ixO^L,wCT,w,x,fl)
678 ! Force minimum temperature to a fixed temperature
680 integer, intent(in) :: ixI^L, ixO^L
681 double precision, intent(in) :: qdt, x(ixI^S,1:ndim), wCT(ixI^S,1:nw)
682 double precision, intent(inout) :: w(ixI^S,1:nw)
683 type(rc_fluid), intent(in) :: fl
684 double precision :: etherm(ixI^S), rho(ixI^S), Rfactor(ixI^S),emin
685 integer :: ix^D
686
687 call fl%get_pthermal(w,x,ixi^l,ixo^l,etherm)
688 call fl%get_rho(w,x,ixi^l,ixo^l,rho)
689 call fl%get_var_Rfactor(wct,x,ixi^l,ixo^l,rfactor)
690 {do ix^db = ixo^lim^db\}
691 emin = rho(ix^d)*fl%tlow*rfactor(ix^d)
692 if(etherm(ix^d) < emin) then
693 w(ix^d,fl%e_)=w(ix^d,fl%e_)+(emin-etherm(ix^d))*invgam
694 end if
695 {end do\}
696 end subroutine floortemperature
697
698 subroutine get_cool_equi(qdt,ixI^L,ixO^L,wCT,w,x,fl,res)
700
701 integer, intent(in) :: ixI^L, ixO^L
702 double precision, intent(in) :: qdt, x(ixI^S,1:ndim), wCT(ixI^S,1:nw)
703 double precision, intent(inout) :: w(ixI^S,1:nw)
704 type(rc_fluid), intent(in) :: fl
705 double precision, intent(out) :: res(ixI^S)
706
707 double precision :: pth(ixI^S),rho(ixI^S),Rfactor(ixI^S),L1,Tlocal2
708 double precision :: Te(ixI^S)
709 double precision :: emin, Lmax
710 double precision :: Y1, Y2
711 double precision :: de, emax,fact
712 integer :: ix^D
713
714 call fl%get_pthermal_equi(wct,x,ixi^l,ixo^l,pth)
715 call fl%get_rho_equi(wct,x,ixi^l,ixo^l,rho)
716 call fl%get_temperature_equi(wct,x,ixi^l,ixo^l,te)
717 rfactor(ixo^s)=pth(ixo^s)/(rho(ixo^s)*te(ixo^s))
718
719 res=0d0
720
721 fact = fl%lref*qdt/fl%tref
722 {do ix^db = ixo^lim^db\}
723 emin = rho(ix^d)*fl%tlow*rfactor(ix^d)*invgam
724 lmax = max(zero,(pth(ix^d)*invgam-emin)/qdt)
725 emax = max(zero, pth(ix^d)*invgam-emin)
726 if( te(ix^d)<=fl%tcoolmin ) then
727 ! temperature is below floor level, no cooling.
728 l1 = zero
729 else if( te(ix^d)>=fl%tcoolmax )then
730 call calc_l_extended(te(ix^d), l1,fl)
731 l1 = l1*rho(ix^d)**2
732 if(phys_trac) then
733 if(te(ix^d)<block%wextra(ix^d,fl%Tcoff_)) then
734 l1=l1*sqrt((te(ix^d)/block%wextra(ix^d,fl%Tcoff_))**5)
735 end if
736 end if
737 l1 = min(l1,lmax)
738 res(ix^d) = l1*qdt
739 else
740 call findy(te(ix^d),y1,fl)
741 y2 = y1 + fact * rho(ix^d)*rc_gamma_1
742 call findt(tlocal2,y2,fl)
743 if(tlocal2<=fl%tcoolmin) then
744 de = emax
745 else
746 de = (te(ix^d)-tlocal2)*rho(ix^d)*rfactor(ix^d)*invgam
747 end if
748 if(phys_trac) then
749 if(te(ix^d)<block%wextra(ix^d,fl%Tcoff_)) then
750 de=de*sqrt((te(ix^d)/block%wextra(ix^d,fl%Tcoff_))**5)
751 end if
752 end if
753 de = min(de,emax)
754 res(ix^d) = de
755 end if
756 {end do\}
757 end subroutine get_cool_equi
758
759 subroutine cool_exact(qdt,ixI^L,ixO^L,wCT,wCTprim,w,x,fl)
760 ! Cooling routine using exact integration method from Townsend 2009
762 integer, intent(in) :: ixI^L, ixO^L
763 double precision, intent(in) :: qdt, x(ixI^S,1:ndim), wCT(ixI^S,1:nw), wCTprim(ixI^S,1:nw)
764 double precision, intent(inout) :: w(ixI^S,1:nw)
765 type(rc_fluid), intent(in) :: fl
766 double precision :: Y1, Y2
767 double precision :: L1, pth(ixI^S), Tlocal2, pnew(ixI^S)
768 double precision :: rho(ixI^S), Te(ixI^S), rhonew(ixI^S), Rfactor(ixI^S)
769 double precision :: emin, Lmax, fact
770 double precision :: de, emax
771 integer :: ix^D
772
773 call fl%get_rho(wct,x,ixi^l,ixo^l,rho)
774 call fl%get_var_Rfactor(wct,x,ixi^l,ixo^l,rfactor)
775 if(fl%has_equi) then
776 ! need pressure splitting for getting total pressure
777 call fl%get_pthermal(wct,x,ixi^l,ixo^l,te)
778 te(ixo^s)=te(ixo^s)/(rho(ixo^s)*rfactor(ixo^s))
779 else
780 te(ixo^s)=wctprim(ixo^s,iw_e)/(rho(ixo^s)*rfactor(ixo^s))
781 end if
782 call fl%get_pthermal(w,x,ixi^l,ixo^l,pnew)
783 call fl%get_rho(w,x,ixi^l,ixo^l,rhonew)
784
785 fact = fl%lref*qdt/fl%tref
786
787 {do ix^db = ixo^lim^db\}
788 emin = rhonew(ix^d)*fl%tlow*rfactor(ix^d)*invgam
789 lmax = max(zero,pnew(ix^d)*invgam-emin)/qdt
790 emax = max(zero,pnew(ix^d)*invgam-emin)
791 if( te(ix^d)<=fl%tcoolmin ) then
792 l1 = zero
793 else if( te(ix^d)>=fl%tcoolmax )then
794 call calc_l_extended(te(ix^d), l1,fl)
795 l1 = l1*rho(ix^d)**2
796 if(phys_trac) then
797 if(te(ix^d)<block%wextra(ix^d,fl%Tcoff_)) then
798 l1=l1*sqrt((te(ix^d)/block%wextra(ix^d,fl%Tcoff_))**5)
799 end if
800 end if
801 l1 = min(l1,lmax)
802 if(slab_uniform .and. fl%rad_cut .and. x(ix^d,ndim) .le. fl%rad_cut_hgt) then
803 l1 = l1*exp(-(x(ix^d,ndim)-fl%rad_cut_hgt)**2/fl%rad_cut_dey**2)
804 end if
805 w(ix^d,fl%e_) = w(ix^d,fl%e_)-l1*qdt
806 else
807 call findy(te(ix^d),y1,fl)
808 y2 = y1 + fact*rho(ix^d)*rc_gamma_1
809 call findt(tlocal2,y2,fl)
810 if(tlocal2<=fl%tcoolmin) then
811 de = emax
812 else
813 de = (te(ix^d)-tlocal2)*rho(ix^d)*rfactor(ix^d)*invgam
814 end if
815 if(phys_trac) then
816 if(te(ix^d)<block%wextra(ix^d,fl%Tcoff_)) then
817 de=de*sqrt((te(ix^d)/block%wextra(ix^d,fl%Tcoff_))**5)
818 end if
819 end if
820 de = min(de,emax)
821 if(slab_uniform .and. fl%rad_cut .and. x(ix^d,ndim) .le. fl%rad_cut_hgt) then
822 de = de*exp(-(x(ix^d,ndim)-fl%rad_cut_hgt)**2/fl%rad_cut_dey**2)
823 end if
824 w(ix^d,fl%e_) = w(ix^d,fl%e_)-de
825 end if
826 {end do\}
827 end subroutine cool_exact
828
829 subroutine calc_l_extended (tpoint, lpoint,fl)
830 ! Calculate l for t beyond tcoolmax
831 ! Assumes Bremsstrahlung for the interpolated tables
832 ! Uses the power law for piecewise power laws
833 double precision, intent(IN) :: tpoint
834 double precision, intent(OUT) :: lpoint
835 type(rc_fluid), intent(in) :: fl
836
837 if(fl%isPPL) then
838 lpoint =fl%l_PPL(fl%n_PPL) * ( tpoint / fl%t_PPL(fl%n_PPL) )**fl%a_PPL(fl%n_PPL)
839 else
840 lpoint = fl%Lcool(fl%ncool) * sqrt( tpoint / fl%tcoolmax)
841 end if
842 end subroutine calc_l_extended
843
844 subroutine findl (tpoint,Lpoint,fl)
845 ! Fast search option to find correct point
846 ! in cooling curve
848
849 double precision,intent(IN) :: tpoint
850 double precision, intent(OUT) :: Lpoint
851 type(rc_fluid), intent(in) :: fl
852
853 double precision :: lgtp
854 integer :: jl,i
855
856 if(fl%isPPL) then
857 i = maxloc(fl%t_PPL, dim=1, mask=fl%t_PPL<tpoint)
858 lpoint = fl%l_PPL(i) * (tpoint / fl%t_PPL(i))**fl%a_PPL(i)
859 else
860 lgtp = dlog10(tpoint)
861 jl = int((lgtp - fl%lgtcoolmin) /fl%lgstep) + 1
862 lpoint = fl%Lcool(jl)+ (tpoint-fl%tcool(jl)) &
863 * (fl%Lcool(jl+1)-fl%Lcool(jl)) &
864 / (fl%tcool(jl+1)-fl%tcool(jl))
865 end if
866
867 end subroutine findl
868
869 subroutine findy (tpoint,Ypoint,fl)
870 ! Fast search option to find correct point in cooling time
872
873 double precision,intent(IN) :: tpoint
874 double precision, intent(OUT) :: Ypoint
875 type(rc_fluid), intent(in) :: fl
876
877 double precision :: lgtp
878 double precision :: y_extra,factor
879 integer :: jl,i
880
881 if(fl%isPPL) then
882 i = maxloc(fl%t_PPL, dim=1, mask=fl%t_PPL<tpoint)
883 factor = fl%l_PPL(fl%n_PPL+1) * fl%t_PPL(i) / (fl%l_PPL(i) * fl%t_PPL(fl%n_PPL+1))
884 if(fl%a_PPL(i)==1.d0) then
885 y_extra = log( fl%t_PPL(i) / tpoint )
886 else
887 y_extra = 1 / (1 - fl%a_PPL(i)) * (1 - ( fl%t_PPL(i) / tpoint )**(fl%a_PPL(i)-1) )
888 end if
889 ypoint = fl%y_PPL(i) + factor*y_extra
890 else
891 lgtp = dlog10(tpoint)
892 jl = int((lgtp - fl%lgtcoolmin) / fl%lgstep) + 1
893 ypoint = fl%Yc(jl)+ (tpoint-fl%tcool(jl)) &
894 * (fl%Yc(jl+1)-fl%Yc(jl)) &
895 / (fl%tcool(jl+1)-fl%tcool(jl))
896 end if
897
898 end subroutine findy
899
900 subroutine findt (tpoint,Ypoint,fl)
901 ! Fast search option to find correct temperature
902 ! from temporal evolution function. Only possible this way because T is a monotonously
903 ! decreasing function for the interpolated tables
904 ! Uses eq. A7 from Townsend 2009 for piecewise power laws
906
907 double precision,intent(OUT) :: tpoint
908 double precision, intent(IN) :: Ypoint
909 type(rc_fluid), intent(in) :: fl
910
911 double precision :: factor
912 integer :: jl,jc,jh,i
913
914 if(fl%isPPL) then
915 i = minloc(fl%y_PPL, dim=1, mask=fl%y_PPL>ypoint)
916 factor = fl%l_PPL(i) * fl%t_PPL(fl%n_PPL+1) / (fl%l_PPL(fl%n_PPL+1) * fl%t_PPL(i))
917 if(fl%a_PPL(i)==1.d0) then
918 tpoint = fl%t_PPL(i) * exp( -1.d0 * factor * ( ypoint - fl%y_PPL(i)))
919 else
920 tpoint = fl%t_PPL(i) * (1 - (1 - fl%a_PPL(i)) * factor * (ypoint - fl%y_PPL(i)))**(1 / (1 - fl%a_PPL(i)))
921 end if
922 else
923 if(ypoint >= fl%Yc(1)) then
924 tpoint = fl%tcoolmin
925 else if (ypoint == fl%Yc(fl%ncool)) then
926 tpoint = fl%tcoolmax
927 else
928 jl=0
929 jh=fl%ncool+1
930 do
931 if(jh-jl <= 1) exit
932 jc=(jh+jl)/2
933 if(ypoint <= fl%Yc(jc)) then
934 jl=jc
935 else
936 jh=jc
937 end if
938 end do
939 ! Linear interpolation to obtain correct temperature
940 tpoint = fl%tcool(jl)+ (ypoint-fl%Yc(jl)) &
941 * (fl%tcool(jl+1)-fl%tcool(jl)) &
942 / (fl%Yc(jl+1)-fl%Yc(jl))
943 end if
944 end if
945 end subroutine findt
946
947end module mod_radiative_cooling
subroutine, public mpistop(message)
Exit MPI-AMRVAC with an error message.
This module contains definitions of global parameters and variables and some generic functions/subrou...
type(state), pointer block
Block pointer for using one block and its previous state.
integer, parameter unitpar
file handle for IO
character(len=std_len), dimension(:), allocatable par_files
Which par files are used as input.
logical phys_trac
Use TRAC for MHD or 1D HD.
logical slab_uniform
uniform Cartesian geometry or not (stretched Cartesian)
This module defines the procedures of a physics module. It contains function pointers for the various...
Definition mod_physics.t:4
module radiative cooling – add optically thin radiative cooling
subroutine getvar_cooling(ixil, ixol, w, x, coolrate, fl)
subroutine radiative_cooling_init_params(phys_gamma, he_abund)
Radiative cooling initialization.
subroutine findl(tpoint, lpoint, fl)
subroutine get_cool_equi(qdt, ixil, ixol, wct, w, x, fl, res)
subroutine radiative_cooling_init(fl, read_params)
subroutine radiative_cooling_add_source(qdt, ixil, ixol, wct, wctprim, w, x, qsourcesplit, active, fl)
subroutine calc_l_extended(tpoint, lpoint, fl)
subroutine cool_exact(qdt, ixil, ixol, wct, wctprim, w, x, fl)
subroutine findt(tpoint, ypoint, fl)
subroutine floortemperature(qdt, ixil, ixol, wct, w, x, fl)
subroutine getvar_cooling_exact(qdt, ixil, ixol, wct, w, x, coolrate, fl)
subroutine findy(tpoint, ypoint, fl)
module containing all optically thin radiative cooling tables
double precision, dimension(1:101) l_dere_corona
double precision, dimension(1:71) t_mlsolar1
double precision, dimension(1:151) l_cl_solar
double precision, dimension(1:5) t_fm
double precision, dimension(1:14) a_spex_dm_fine
double precision, dimension(1:9) a_rosner
double precision, dimension(1:110) l_spex
double precision, dimension(1:51) l_mb
double precision, dimension(1:10) t_rosner
double precision, dimension(1:5) a_hildner
double precision, dimension(1:9) x_rosner
double precision, dimension(1:7) x_klimchuk
double precision, dimension(1:151) l_cl_ism
double precision, dimension(1:8) t_spex_dm_rough
double precision, dimension(1:110) nenh_spex
double precision, dimension(1:110) t_spex
double precision, dimension(1:76) l_dm_2
double precision, dimension(1:15) t_spex_dm_fine
double precision, dimension(1:7) x_spex_dm_rough
double precision, dimension(1:14) x_spex_dm_fine
double precision, dimension(1:71) l_mlsolar1
double precision, dimension(1:45) t_jccorona
double precision, dimension(1:5) x_hildner
double precision, dimension(1:71) t_mlcosmol
double precision, dimension(1:151) t_cl_ism
double precision, dimension(1:151) t_cl_solar
double precision, dimension(1:51) t_mb
double precision, dimension(1:8) t_klimchuk
double precision, dimension(1:55) t_colgan
double precision, dimension(1:55) l_colgan
double precision, dimension(1:4) a_fm
double precision, dimension(1:101) l_dere_photo
double precision, dimension(1:45) l_jccorona
double precision, dimension(1:71) l_mlwc
double precision, dimension(1:71) l_dm
double precision, dimension(1:71) t_mlwc
double precision, dimension(1:7) a_spex_dm_rough
double precision, dimension(1:71) t_dm
double precision, dimension(1:7) a_klimchuk
double precision, dimension(1:71) l_mlcosmol
double precision, dimension(1:76) t_dm_2
double precision, dimension(1:6) t_hildner
double precision, dimension(1:4) x_fm
double precision, dimension(1:101) t_dere