Skip to content

Commit

Permalink
Merge pull request #724 from galacticusorg/massDistributions
Browse files Browse the repository at this point in the history
Refactor how mass distributions are handled
  • Loading branch information
abensonca authored Oct 20, 2024
2 parents a4ac3d9 + 4c49fb1 commit 9caa7c7
Show file tree
Hide file tree
Showing 454 changed files with 34,588 additions and 33,321 deletions.
3 changes: 3 additions & 0 deletions aux/words.dict
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ christoph
chunked
chunking
circum
circumgalactic
circumnuclear
cladistic
collisional
Expand Down Expand Up @@ -669,11 +670,13 @@ sanes
scalarize
scalarizes
scalelengths
scaler
scalings
sendmail
sersic
sexagesimal
shakura
sidm
sightline
sigmoid
sinusoid
Expand Down
18 changes: 18 additions & 0 deletions doc/Galacticus.bib
Original file line number Diff line number Diff line change
Expand Up @@ -3715,6 +3715,24 @@ @article{jiang_generating_2014
pages = {193--207}
}

@article{jiang_semi-analytic_2023,
title = {A semi-analytic study of self-interacting dark-matter haloes with baryons},
volume = {521},
issn = {0035-8711},
url = {https://ui.adsabs.harvard.edu/abs/2023MNRAS.521.4630J},
doi = {10.1093/mnras/stad705},
abstract = {We combine the isothermal Jeans model and the model of adiabatic halo contraction into a semi-analytic procedure for computing the density profile of self-interacting dark-matter (SIDM) haloes with the gravitational influence from the inhabitant galaxies. The model agrees well with cosmological SIDM simulations over the entire core-forming stage up to the onset of gravothermal core-collapse. Using this model, we show that the halo response to baryons is more diverse in SIDM than in CDM and depends sensitively on galaxy size, a desirable feature in the context of the structural diversity of bright dwarfs. The fast speed of the method facilitates analyses that would be challenging for numerical simulations - notably, we quantify the SIDM halo response as functions of the baryonic properties, on a fine mesh grid spanned by the baryon-to-total-mass ratio, Mb/Mvir, and galaxy compactness, r1/2/Rvir; we show with high statistical precision that for typical Milky-Way-like systems, the SIDM profiles are similar to their CDM counterparts; and we delineate the regime of core-collapse in the Mb/Mvir - r1/2/Rvir space, for a given cross section and concentration. Finally, we compare the isothermal Jeans model with the more sophisticated gravothermal fluid model, and show that the former yields faster core formation and agrees better with cosmological simulations. We attribute the difference to whether the target CDM halo is used as a boundary condition or as the initial condition for the gravothermal evolution, and thus comment on possible improvements of the fluid model. We have made our model publicly available at https://github.com/JiangFangzhou/SIDM.},
urldate = {2023-08-02},
journal = {Monthly Notices of the Royal Astronomical Society},
author = {Jiang, Fangzhou and Benson, Andrew and Hopkins, Philip F. and Slone, Oren and Lisanti, Mariangela and Kaplinghat, Manoj and Peter, Annika H. G. and Zeng, Zhichao Carton and Du, Xiaolong and Yang, Shengqi and Shen, Xuejian},
month = may,
year = {2023},
note = {ADS Bibcode: 2023MNRAS.521.4630J},
keywords = {Astrophysics - Cosmology and Nongalactic Astrophysics, Astrophysics - High Energy Astrophysical Phenomena, cosmology: dark matter, galaxies: dwarf, galaxies: evolution, galaxies: haloes, galaxies: structure},
pages = {4630--4644},
file = {Full Text PDF:/home/abensonca/.mozilla/firefox/f54gqgdx.default/zotero/storage/PJTZC47T/Jiang et al. - 2023 - A semi-analytic study of self-interacting dark-mat.pdf:application/pdf},
}

@article{johnson_random_2021,
title = {A {Random} {Walk} {Model} for {Dark} {Matter} {Halo} {Concentrations}},
volume = {908},
Expand Down
4 changes: 1 addition & 3 deletions parameters/reference/evolutionGalaxyFormation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,7 @@
<!-- Star formation rate options -->
<starFormationRateDisks value="intgrtdSurfaceDensity"/>
<starFormationRateSurfaceDensityDisks value="blitz2006" >
<assumeMonotonicSurfaceDensity value="true"/>
<assumeExponentialDisk value="true"/>
<useTabulation value="true"/>
<useTabulation value="true"/>
</starFormationRateSurfaceDensityDisks>
<starFormationRateSpheroids value="timescale">
<starFormationTimescale value="dynamicalTime">
Expand Down
4 changes: 1 addition & 3 deletions parameters/reference/evolutionGalaxyFormationNBody.xml
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,7 @@
<!-- Star formation rate options -->
<starFormationRateDisks value="intgrtdSurfaceDensity"/>
<starFormationRateSurfaceDensityDisks value="blitz2006" >
<assumeMonotonicSurfaceDensity value="true"/>
<assumeExponentialDisk value="true"/>
<useTabulation value="true"/>
<useTabulation value="true"/>
</starFormationRateSurfaceDensityDisks>
<starFormationRateSpheroids value="timescale">
<starFormationTimescale value="dynamicalTime">
Expand Down
4 changes: 3 additions & 1 deletion parameters/treeAugmentMonteCarlo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<!-- Component selection -->
<componentBasic value="standard"/>
<componentBlackHole value="null"/>
<componentDarkMatterProfile value="null"/>
<componentDarkMatterProfile value="scaleFree"/>
<componentDisk value="null"/>
<componentHotHalo value="null"/>
<componentSatellite value="standard"/>
Expand Down Expand Up @@ -204,6 +204,8 @@
<nodeOperator value="cosmicTime"/>
<!-- DMO evolution -->
<nodeOperator value="DMOInterpolate"/>
<!-- Dark matter profile -->
<nodeOperator value="darkMatterProfileInitialize"/>
<!-- Halo concentrations -->
<nodeOperator value="darkMatterProfileScaleSet" />
<nodeOperator value="darkMatterProfileScaleInterpolate"/>
Expand Down
7 changes: 3 additions & 4 deletions parameters/treeAugmentNBody.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<!-- Component selection -->
<componentBasic value="standard"/>
<componentBlackHole value="null"/>
<componentDarkMatterProfile value="null"/>
<componentDarkMatterProfile value="scaleFree"/>
<componentDisk value="null"/>
<componentHotHalo value="null"/>
<componentSatellite value="preset"/>
Expand Down Expand Up @@ -166,9 +166,8 @@
<nodeOperator value="cosmicTime"/>
<!-- DMO evolution -->
<nodeOperator value="DMOInterpolate"/>
<!-- Halo concentrations -->
<nodeOperator value="darkMatterProfileScaleSet" />
<nodeOperator value="darkMatterProfileScaleInterpolate"/>
<!-- Dark matter profile -->
<nodeOperator value="darkMatterProfileInitialize"/>
<!-- Halo spins -->
<nodeOperator value="haloAngularMomentumRandom">
<factorReset value="2.0"/>
Expand Down
7 changes: 5 additions & 2 deletions perl/Galacticus/Build/Components/Classes/Deferred.pm
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ sub Class_Deferred_Binding_Attachers {
my $function =
{
type => "void",
name => $code::classFunctionName."DeferredFunctionSet",
name => $code::classFunctionName."DfrrdFnctnSet",
description => "Set the function to be used for the {\\normalfont \\ttfamily ".$binding->{'method'}."} method of the {\\normalfont \\ttfamily ".$class->{'name'}."} component class.",
variables =>
[
Expand Down Expand Up @@ -158,6 +158,8 @@ sub Class_Deferred_Binding_Wrappers {
foreach $code::binding ( grep {$_->{'isDeferred'} && $_->{'bindsTo'} eq 'componentClass'} @{$member->{'bindings'}->{'binding'}} ) {
# Create the name of the function.
$code::classFunctionName = $class->{'name'}.ucfirst($code::binding->{'method'});
my $specificType = $code::binding->{'interface'}->{'type'} ne "void" && ! exists($intrinsicTypes{$code::binding->{'interface'}->{'type'}});
my $isPointer = $specificType && $code::binding->{'interface'}->{'type'} =~ m/,\s*pointer/;
# Create the function if necesasary.
next
if ( exists($classFunctions->{$code::classFunctionName}->{'wrapper'}) );
Expand Down Expand Up @@ -201,8 +203,9 @@ CODE
call {$classFunctionName}Deferred({join(",",@arguments)})
CODE
} else {
$code::assigner = $isPointer ? " => " : "=";
$function->{'content'} .= fill_in_string(<<'CODE', PACKAGE => 'code');
{$classFunctionName}={$classFunctionName}Deferred({join(",",@arguments)})
{$classFunctionName}{$assigner}{$classFunctionName}Deferred({join(",",@arguments)})
CODE
}
$function->{'content'} .= fill_in_string(<<'CODE', PACKAGE => 'code');
Expand Down
67 changes: 10 additions & 57 deletions perl/Galacticus/Build/Components/Components.pm
Original file line number Diff line number Diff line change
Expand Up @@ -158,39 +158,19 @@ sub Build_Node_Component_Class {
},
{
type => "procedure" ,
name => "enclosedMass" ,
function => "Node_Component_Enclosed_Mass_Null" ,
description => "Compute the mass enclosed within a radius." ,
mappable => "summation" ,
returnType => "\\doublezero" ,
arguments => "\\doublezero\\ radius\\argin, \\enumComponentType\\ [componentType]\\argin, \\enumMassType\\ [massType]\\argin, \\enumWeightBy\\ [weightBy]\\argin, \\intzero\\ [weightIndex]\\argin"
},
{
type => "procedure" ,
name => "acceleration" ,
function => "Node_Component_Acceleration_Null" ,
description => "Compute the gravitational acceleration at a point." ,
mappable => "summation" ,
returnType => "\\doubleone" ,
arguments => "\\doubleone\\ position\\argin, \\enumComponentType\\ [componentType]\\argin, \\enumMassType\\ [massType]\\argin"
name => "massDistribution" ,
function => "Node_Component_Mass_Distribution_Null" ,
description => "Return the mass distribution for this component." ,
returnType => "\\textcolor{red}{\\textless class(massDistribution)\\textgreater}" ,
arguments => "\\textcolor{red}{\\textless type(enumerationComponentTypeType)\\textgreater} [componentType]\\argin, \\textcolor{red}{\\textless type(enumeratioMassTypeType)\\textgreater} [massType]\\argin, \\textcolor{red}{\\textless type(enumeratioWeightByType)\\textgreater} [weightBy]\\argin, \\intzero\\ [weightIndex]\\argin"
},
{
type => "procedure" ,
name => "chandrasekharIntegral" ,
function => "Node_Component_Chandrasekhar_Integral_Null" ,
description => "Compute the Chandrasekhar integral for a given position and velocity." ,
mappable => "summation" ,
returnType => "\\doubleone" ,
arguments => "\\doubleone\\ position\\argin, \\doubleone\\ velocity\\argin, \\doublezero\\ radiusHalfMass\\argin, \\enumComponentType\\ [componentType]\\argin, \\enumMassType\\ [massType]\\argin"
},
{
type => "procedure" ,
name => "tidalTensor" ,
function => "Node_Component_Tidal_Tensor_Null" ,
description => "Compute the gravitational tidal tensor at a point." ,
mappable => "summation" ,
returnType => "\\textcolor{red}{\\textless type(tensorRank2Dimension3Symmetric)\\textgreater}" ,
arguments => "\\doubleone\\ position\\argin, \\enumComponentType\\ [componentType]\\argin, \\enumMassType\\ [massType]\\argin"
name => "massBaryonic" ,
function => "Node_Component_Mass_Baryonic_Null" ,
description => "Return the total baryonic mass for this component." ,
returnType => "\\doublezero" ,
arguments => ""
},
{
type => "procedure" ,
Expand Down Expand Up @@ -218,33 +198,6 @@ sub Build_Node_Component_Class {
mappable => "summation" ,
returnType => "\\doublezero" ,
arguments => "\\textcolor{red}{\\textless double(3)\\textgreater} positionCylindrical\\argin, \\enumComponentType\\ [componentType]\\argin, \\enumMassType\\ [massType]\\argin, \\enumWeightBy\\ [weightBy]\\argin, \\intzero\\ [weightIndex]\\argin"
},
{
type => "procedure" ,
name => "potential" ,
function => "Node_Component_Potential_Null" ,
description => "Compute the gravitational potential." ,
mappable => "summation" ,
returnType => "\\doublezero" ,
arguments => "\\doublezero\\ radius\\argin, \\enumComponentType\\ [componentType]\\argin, \\enumMassType\\ [massType]\\argin"
},
{
type => "procedure" ,
name => "rotationCurve" ,
function => "Node_Component_Rotation_Curve_Null" ,
description => "Compute the rotation curve." ,
mappable => "summation" ,
returnType => "\\doublezero" ,
arguments => "\\doublezero\\ radius\\argin, \\enumComponentType\\ [componentType]\\argin, \\enumMassType\\ [massType]\\argin"
},
{
type => "procedure" ,
name => "rotationCurveGradient" ,
function => "Node_Component_Rotation_Curve_Gradient_Null" ,
description => "Compute the rotation curve gradient." ,
mappable => "summation" ,
returnType => "\\doublezero" ,
arguments => "\\doublezero\\ radius\\argin, \\enumComponentType\\ [componentType]\\argin, \\enumMassType\\ [massType]\\argin"
}
);
# Add meta-property methods.
Expand Down
Loading

0 comments on commit 9caa7c7

Please sign in to comment.