~abenson/galacticus/v0.9.0

« back to all changes in this revision

Viewing changes to source/dark_matter_profiles.structure.concentration.Gao2008.F90

  • Committer: Andrew Benson
  • Date: 2010-05-27 14:18:28 UTC
  • Revision ID: abesnson@its.caltech.edu-20100527141828-dzvnjovtiq02impa
* Importing full Galacticus code as developed to date.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
!% Contains a module which implements a isothermal halo spin distribution.
 
2
 
 
3
module Dark_Matter_Profiles_Concentrations_Gao20008
 
4
  !% Implements a isothermal halo spin distribution.
 
5
  use Tree_Nodes
 
6
  private
 
7
  public :: Dark_Matter_Concentrations_Gao20008_Initialize
 
8
 
 
9
contains
 
10
 
 
11
  !# <darkMatterConcentrationMethod>
 
12
  !#  <unitName>Dark_Matter_Concentrations_Gao20008_Initialize</unitName>
 
13
  !# </darkMatterConcentrationMethod>
 
14
  subroutine Dark_Matter_Concentrations_Gao20008_Initialize(darkMatterConcentrationMethod,Dark_Matter_Profile_Concentration_Get)
 
15
    !% Initializes the ``Gao 2008'' halo concentration module.
 
16
    use ISO_Varying_String
 
17
    implicit none
 
18
    type(varying_string),          intent(in)    :: darkMatterConcentrationMethod
 
19
    procedure(),          pointer, intent(inout) :: Dark_Matter_Profile_Concentration_Get
 
20
    
 
21
    if (darkMatterConcentrationMethod == 'Gao 2008') Dark_Matter_Profile_Concentration_Get => Dark_Matter_Profile_Concentration_Gao2008
 
22
  
 
23
    return
 
24
  end subroutine Dark_Matter_Concentrations_Gao20008_Initialize
 
25
 
 
26
  double precision function Dark_Matter_Profile_Concentration_Gao2008(thisNode)
 
27
    !% Returns the concentration of the dark matter profile of {\tt thisNode} using the method of \cite{gao_redshift_2008}. More
 
28
    !% specifically, we fit the redshift dependence of the parameters $A$ and $B$ in the fitting formula of
 
29
    !% \cite{gao_redshift_2008} and use these fits to find $A$ and $B$ at any given redshift, from which we then compute the
 
30
    !% concentration. Note that the fits of \cite{gao_redshift_2008} were computed using Einasto profile fits and utilizing
 
31
    !% $M_{200}$ and $c_{200}$.
 
32
    use Tree_Nodes
 
33
    use Tree_Node_Methods
 
34
    use Cosmology_Functions
 
35
    implicit none
 
36
    type(treeNode),   intent(inout), pointer :: thisNode
 
37
    double precision, parameter              :: littleHubbleConstantGao2008=0.73d0
 
38
    double precision                         :: logarithmHaloMass,logarithmExpansionFactor,parameterA,parameterB
 
39
  
 
40
    logarithmHaloMass                        =dlog10(littleHubbleConstantGao2008*Tree_Node_Mass(thisNode) )
 
41
    logarithmExpansionFactor                 =dlog10(Expansion_Factor(           Tree_Node_Time(thisNode)))
 
42
    parameterA                               =-0.140d0*dexp(-((logarithmExpansionFactor+0.05d0)/0.35d0)**2)
 
43
    parameterB                               = 2.646d0*dexp(-((logarithmExpansionFactor+0.00d0)/0.50d0)**2)
 
44
    Dark_Matter_Profile_Concentration_Gao2008=10.0d0**(parameterA*logarithmHaloMass+parameterB)
 
45
    return
 
46
  end function Dark_Matter_Profile_Concentration_Gao2008
 
47
  
 
48
end module Dark_Matter_Profiles_Concentrations_Gao20008