Skip to content

Commit

Permalink
Modified tidal stripping model
Browse files Browse the repository at this point in the history
Tidal stripping is slightly modified to first strip the disk and then
the bulge.

I'm also now keeping track of the mass lost to tidal stripping when
galaxies merge onto centrals.
  • Loading branch information
cdplagos committed Mar 26, 2020
1 parent 778e825 commit a76734e
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 14 deletions.
47 changes: 33 additions & 14 deletions src/environment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,12 @@ void Environment::process_satellite_subhalo_environment(Subhalo &satellite_subha
// 2. A satellite subhalo that does not have a central. In this case we have to check the type II satellites
// in the halo of the central to see if they have been stripped accordingly.
if(parameters.tidal_stripping){
float ratio_mass_thresh = 0.01;
if(satellite_subhalo.central_galaxy()){
// Apply here model of Errani et al. (2015).
float ratio_mass = satellite_subhalo.Mvir / satellite_subhalo.Mvir_infall;
// Apply a maximum stripping of 99% in halo mass.
if(ratio_mass < ratio_mass_thresh){
ratio_mass = ratio_mass_thresh;
if(ratio_mass < parameters.minimum_halo_mass_fraction){
ratio_mass = parameters.minimum_halo_mass_fraction;
}

// compute how much has been lost since galaxy infall
Expand All @@ -102,14 +101,14 @@ void Environment::process_satellite_subhalo_environment(Subhalo &satellite_subha
central_subhalo.stellar_halo.mass_metals += lost_stellar_mass_metals;
}
}
// check all type 2 galaxies in the central subhalo.
// check all type 2 galaxies in the central subhalo and strip only those that haven't been stripped yet.
if(central_subhalo.type2_galaxies_count() > 0){
float ratio_sm = std::pow(2, 3.43) * std::pow(ratio_mass_thresh, 1.86) / std::pow( 1 + ratio_mass_thresh, 3.43);
float ratio_sm = std::pow(2.0, 3.43) * std::pow(parameters.minimum_halo_mass_fraction, 1.86) / std::pow( 1 + parameters.minimum_halo_mass_fraction, 3.43);
// in this case loop over type II satellites and if they have not been stripped
// then strip a fraction of the satellite mass.
for (auto &satellite: central_subhalo.type2_galaxies() ){
// If no stripping has occured in this type II then assume 99% loss of DM.
// is stars_tidal_stripped.mass>0 is because stripping should have occured already.
// If no stripping has occurred in this type II then assume 99% loss of DM.
// is stars_tidal_stripped.mass>0 is because stripping should have occurred already.
if(satellite.stars_tidal_stripped.mass == 0){
// compute how much has been lost since galaxy infall
float lost_stellar_mass = (1 - ratio_sm) * satellite.stellar_mass();
Expand Down Expand Up @@ -138,13 +137,33 @@ void Environment::remove_tidal_stripped_stars(Galaxy &galaxy, float lost_stellar
galaxy.bulge_stars.restore_baryon();
}
else{
// define bulge-to-total ratio.
float bulge_disk_gal = galaxy.bulge_stars.mass / galaxy.stellar_mass();
// remove stellar mass and metals in proportion to the disk and bulge stellar mass contributions.
galaxy.disk_stars.mass -= (1 - bulge_disk_gal) * lost_stellar_mass;
galaxy.disk_stars.mass_metals -= (1 - bulge_disk_gal) * lost_stellar_mass_metals;
galaxy.bulge_stars.mass -= bulge_disk_gal * lost_stellar_mass;
galaxy.bulge_stars.mass_metals -= bulge_disk_gal * lost_stellar_mass_metals;

// strip first the disk of the galaxy and then the bulge:
if(lost_stellar_mass < galaxy.disk_stars.mass){
// in this case we strip material from the disk but not the bulge
float frac_lost = lost_stellar_mass / galaxy.disk_stars.mass;
lost_stellar_mass_metals = (1 - frac_lost) * galaxy.disk_stars.mass_metals;
galaxy.disk_stars.mass -= lost_stellar_mass;
galaxy.disk_stars.mass_metals -= lost_stellar_mass_metals;
}
else{
// in this case we strip all the disk and remove a fraction of the bulge.
float lost_bulge_mass = lost_stellar_mass - galaxy.disk_stars.mass;
float lost_bulge_metals = (1 - lost_bulge_mass / galaxy.bulge_stars.mass) * galaxy.bulge_stars.mass_metals;
lost_stellar_mass_metals = galaxy.disk_stars.mass_metals + lost_bulge_metals;
galaxy.disk_stars.restore_baryon();

galaxy.bulge_stars.mass -= lost_bulge_mass;
galaxy.bulge_stars.mass_metals -= lost_bulge_metals;
}

// sanity checks
if(galaxy.disk_stars.mass < 0){
galaxy.disk_stars.restore_baryon();
}
if(galaxy.bulge_stars.mass < 0){
galaxy.bulge_stars.restore_baryon();
}
}
// accummulate what has been lost to tidal stripping in this galaxy.
galaxy.stars_tidal_stripped.mass += lost_stellar_mass;
Expand Down
4 changes: 4 additions & 0 deletions src/galaxy_mergers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,10 @@ void GalaxyMergers::create_merger(Galaxy &central, const Galaxy &satellite, Halo
//satellite stellar mass is always transferred to the bulge.
transfer_history_satellite_to_bulge(central, satellite, snapshot);

//transfer memory of mass lost to tidal stripping.
central.stars_tidal_stripped += satellite.stars_tidal_stripped;


/**
* Depending on the mass ratio, the baryonic components of the satellite and the disk of the major galaxy are going to be transferred differently.
*/
Expand Down

0 comments on commit a76734e

Please sign in to comment.