-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshort_photo_rate.f90
40 lines (31 loc) · 2 KB
/
short_photo_rate.f90
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
module short_photo_rate
use precision, only: dp
use input, only: level_py, use_which_source
use array, only: short_source_HI_density_array, short_source_HeI_density_array, short_source_HeII_density_array, &
short_source_HI_column_density_in, short_source_HeI_column_density_in, short_source_HeII_column_density_in, &
short_source_HI_column_density_out, short_source_HeI_column_density_out, short_source_HeII_column_density_out, &
short_source_HI_photoionization_rate_array, short_source_HeI_photoionization_rate_array, &
short_source_HeII_photoionization_rate_array, short_source_photoheating_rate_array, &
short_source_shell_volume
use radiation, only: photoion_shell, photrates
contains
subroutine short_photo_rate_calculation()
type(photrates) :: phi
integer :: i,j,k
do i = -level_py,level_py
do j = -level_py,level_py
do k = -level_py,level_py
call photoion_shell (phi, &
short_source_HI_column_density_in(i,j,k),short_source_HI_column_density_out(i,j,k),&
short_source_HeI_column_density_in(i,j,k),short_source_HeI_column_density_out(i,j,k),&
short_source_HeII_column_density_in(i,j,k),short_source_HeII_column_density_out(i,j,k),&
short_source_shell_volume(i,j,k),use_which_source)
short_source_HI_photoionization_rate_array(i,j,k) = phi%photo_cell_HI/short_source_HI_density_array(i,j,k)
short_source_HeI_photoionization_rate_array(i,j,k) = phi%photo_cell_HeI/short_source_HeI_density_array(i,j,k)
short_source_HeII_photoionization_rate_array(i,j,k) = phi%photo_cell_HeII/short_source_HeII_density_array(i,j,k)
short_source_photoheating_rate_array(i,j,k) = phi%heat
enddo
enddo
enddo
end subroutine short_photo_rate_calculation
end module short_photo_rate