-
Notifications
You must be signed in to change notification settings - Fork 0
/
c2ray_parameters.f90
112 lines (91 loc) · 4.37 KB
/
c2ray_parameters.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
!>
!! \brief This module contains parameters specific for C2-Ray
!!
!! Module for Capreole / C2-Ray (f90)
!!
!! \b Author: Garrelt Mellema
!!
!! Note: this file contains parameters for different versions
!! of C2-Ray (dimensions, single/multiple sources), so
!! not all parameters will be used.
module c2ray_parameters
! This module collects parameters needed by C2-Ray
use precision, only: dp
use astroconstants, only: YEAR
use sizes, only: mesh
implicit none
!> Which fraction of the cells can be left unconverged in order
!! to improve performance (used in rad_evolve3d)
real(kind=dp),parameter :: convergence_fraction=2.5e-4
!> Set to true to let C2-Ray not change the temperature
! logical,parameter :: isothermal=.false.
!> A really small number
real(kind=dp),parameter :: epsilon=1.0e-12_dp
!> Convergence criterion for per source calculation (evolve0d)
real(kind=dp),parameter :: minimum_fractional_change = 1.0e-3
!> Convergence criterion for global calculation (evolve0d)
real(kind=dp),parameter :: convergence2 = 1.0e-2
real(kind=dp),parameter :: LTE_fractional_change = 1.0e-0
real(kind=dp),parameter :: minium_fraction_of_photons = 1.0e-3
!> Convergence criterion for neutral fraction (evolve4_periodic)
real(kind=dp),parameter :: minimum_fraction_of_atoms=1.0e-8
real(kind=dp),parameter :: convergence_frac2=1.0e-6
!> Size increase of subboxes around sources (evolve4_periodic)
!! If 10, we do 10^3, 20^3, 30^3 cubes around a source until
!! no photons escape or we reach the edge of the (possibly periodic)
!! grid
integer,parameter :: subboxsize=mesh
!> The maximum number of cells on EITHER side of the source for which
!! ray tracing is done. This is a very crude mean free path parameter
!! which sets up a photon wall at exactly this distance.
integer,parameter :: max_subbox=1150
! Add photon losses back into volume or not
logical,parameter :: add_photon_losses=.false. !.true.
! Parameters for nominal SED
real(kind=dp),parameter :: T_eff_nominal=0.0_dp
real(kind=dp),parameter :: S_star_nominal=1e48_dp
real(kind=dp),parameter :: EddLeff_nominal=1.0_dp
real(kind=dp),parameter :: pl_index_nominal=2.5_dp
real(kind=dp),parameter :: mass_nominal=1.0e6_dp
real(kind=dp),parameter :: EddLum=1.38e38*mass_nominal ! Eddington luminosity per 1e6 solar mass in erg/s
!> Subgrid clumping\n
!! 1: constant clumping (with clumping_factor)\n
!! 2: 3.5Mpc PM, WMAP1 clumping\n
!! 3: 3.5Mpc PM, WMAP3 clumping\n
!! 4: 1 Mpc P3M\n
!! 5: position dependent clumping
integer,parameter :: type_of_clumping=1
!> Clumping factor if constant
real,parameter :: clumping_factor=1.0
!> Include LLS?
logical,parameter :: use_LLS=.false.
!> Type of LLS approach
!! 0: no LLS
!! 1: homogeneous optical depth due to LLS
!! 2: position dependent optical depth due to LLS (requires LLS input
!! files)
integer,parameter :: type_of_LLS=1
!> Should we stop when photon conservation violation is detected?
logical,parameter :: stop_on_photon_violation = .false.
!> Cosmology (in C2Ray.F90 and mat_ini) and Cosmological cooling (in cosmology)
logical,parameter :: cosmological=.false.
!> Thermal: minimum temperature
real(kind=dp),parameter :: minitemp=1.0 ! minimum temperature
!> Thermal: fraction of the cooling time step below which no iteration is done
real(kind=dp),parameter :: relative_denergy=0.1
!> Source properties: Number of different sources
integer,parameter :: Number_Sourcetypes=3
!> Source properties: Photon per atom for different source types (high to low mass)
real,dimension(Number_Sourcetypes),parameter :: phot_per_atom= (/ 10.0, 150.0 , 0.0 /)
!> Source properties: Life time of sources (if set at compile time)
real,parameter :: lifetime=20e6*YEAR
!> Source properties: Smallest number of particles that makes a reliable halo
real,parameter :: MinParticleContent=20. ! in solar masses
!> Source properties: Upper limit for low mass sources (not used)
real,parameter :: LowMassLimit=1e9 ! in solar masses
!> Source properties: Lower limit neutral fraction for suppression criterion
real,parameter :: StillNeutral=0.1 ! lower limit of neutral criterium
!real,parameter :: StillNeutral=0.9 ! lower limit of neutral criterium
!real,parameter :: StillNeutral=1.1 ! NEVER suppress
!real,parameter :: StillNeutral=-0.1 ! ALWAYS suppress
end module c2ray_parameters