Skip to content

Commit

Permalink
Changes to environment and AGN quenching
Browse files Browse the repository at this point in the history
- In environment we are assuming that the ejected gas reservoir of
galaxies is lost once the halo becomes a subhalo (when galaxies become
satellites). This us supported by the work of Ruby Wright in EAGLE.

- In gas_cooling: Bravo19 model should also adopt the assumption of Croton16
that rheat can only increase.
  • Loading branch information
cdplagos committed Jan 17, 2022
1 parent 28b0906 commit 078ba18
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/environment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ void Environment::process_satellite_subhalo_environment(Subhalo &satellite_subha

// Ejected gas is moved to the budget of ejected gas of the central, as this gas escaped
// the subhalo of the satellite. This is always the case.
central_subhalo.ejected_galaxy_gas += satellite_subhalo.ejected_galaxy_gas;
central_subhalo.lost_galaxy_gas += satellite_subhalo.lost_galaxy_gas;
//central_subhalo.ejected_galaxy_gas += satellite_subhalo.ejected_galaxy_gas;
central_subhalo.lost_galaxy_gas += satellite_subhalo.lost_galaxy_gas + satellite_subhalo.ejected_galaxy_gas;
central_subhalo.stellar_halo += satellite_subhalo.stellar_halo;
central_subhalo.mean_galaxy_making_stellar_halo += satellite_subhalo.mean_galaxy_making_stellar_halo;

Expand Down
14 changes: 7 additions & 7 deletions src/gas_cooling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ double GasCooling::cooling_rate(Subhalo &subhalo, Galaxy &galaxy, double z, doub
/**
* This corresponds to the very simple model of Croton06, in which the cooling time is assumed to be equal to the
* dynamical timescale of the halo. With that assumption, and using an isothermal halo, the calculation of rcool and mcool
* is trivial.
* is trivial.
*/
if(parameters.model == GasCoolingParameters::CROTON06)
{
Expand Down Expand Up @@ -477,7 +477,7 @@ double GasCooling::cooling_rate(Subhalo &subhalo, Galaxy &galaxy, double z, doub
}// end if of AGN feedback model
}// end if of BOWER06 AGN feedback model.

else if(agnfeedback->parameters.model == AGNFeedbackParameters::BRAVO19 || agnfeedback->parameters.model == AGNFeedbackParameters::CROTON16){
else if(agnfeedback->parameters.model == AGNFeedbackParameters::CROTON16 || agnfeedback->parameters.model == AGNFeedbackParameters::BRAVO19){
//a pseudo cooling luminosity k*T/lambda(T,Z)
double Lpseudo_cool = constants::k_Boltzmann_erg * Tvir / std::pow(10.0,logl) / 1e40;
central_galaxy->smbh.macc_hh = agnfeedback->accretion_rate_hothalo_smbh(Lpseudo_cool, central_galaxy->smbh.mass);
Expand Down Expand Up @@ -506,14 +506,14 @@ double GasCooling::cooling_rate(Subhalo &subhalo, Galaxy &galaxy, double z, doub
double rheat = mheatrate/coolingrate * r_cool;

double r_ratio = rheat/r_cool;
if(agnfeedback->parameters.model == AGNFeedbackParameters::CROTON16){
if(subhalo.cooling_subhalo_tracking.rheat < rheat){
subhalo.cooling_subhalo_tracking.rheat = rheat;
}

r_ratio = subhalo.cooling_subhalo_tracking.rheat/r_cool;
// Track heating radius. Croton16 and Bravo19 assume that the heating radius only increases.
if(subhalo.cooling_subhalo_tracking.rheat < rheat){
subhalo.cooling_subhalo_tracking.rheat = rheat;
}

r_ratio = subhalo.cooling_subhalo_tracking.rheat/r_cool;

if(r_ratio > agnfeedback->parameters.alpha_cool){
r_ratio = 1;
//Redefine mheatrate and macc_h accordingly.
Expand Down

0 comments on commit 078ba18

Please sign in to comment.