Skip to content

Commit

Permalink
Split option of halo vs ISM gradual stripping
Browse files Browse the repository at this point in the history
Now two boolean parameters are accepted to control the gradual stripping
of the halo and ISM gas.
  • Loading branch information
cdplagos committed Jan 25, 2022
1 parent 7665cc0 commit ffdcfda
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion include/environment.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ class EnvironmentParameters{
public:
explicit EnvironmentParameters(const Options &options);

bool gradual_stripping = false;
bool gradual_stripping_halo = false;
bool gradual_stripping_ism = false;
bool stripping = true;
bool tidal_stripping = false;
float minimum_halo_mass_fraction = 0.01;
Expand Down
5 changes: 3 additions & 2 deletions src/environment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ struct galaxy_properties_for_root_solver {
EnvironmentParameters::EnvironmentParameters(const Options &options)
{
options.load("environment.stripping", stripping, true);
options.load("environment.gradual_stripping", gradual_stripping);
options.load("environment.gradual_stripping_halo", gradual_stripping_halo);
options.load("environment.gradual_stripping_ism", gradual_stripping_ism);
options.load("environment.tidal_stripping", tidal_stripping);
options.load("environment.minimum_halo_mass_fraction", minimum_halo_mass_fraction);
}
Expand Down Expand Up @@ -85,7 +86,7 @@ void Environment::process_satellite_subhalo_environment(Subhalo &satellite_subha
if(parameters.stripping){

if(satellite_subhalo.hot_halo_gas.mass > 0 || satellite_subhalo.cold_halo_gas.mass > 0){
if(parameters.gradual_stripping){
if(parameters.gradual_stripping_halo){
//first check whether the function is positive at Rvir_infall. In that case, the satellite subhalo experiences no stripping:
//second, check whether function is negative at Rvir_infall/100. In that case assume all hot gas is stripped.
double mhot_removed = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/gas_cooling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ double GasCooling::cooling_rate(Subhalo &subhalo, Galaxy &galaxy, double z, doub
double Rvir = 0;

if(subhalo.subhalo_type == Subhalo::CENTRAL){
Rvir = cosmology->comoving_to_physical_size(darkmatterhalos->halo_virial_radius(halo, z), z);//physical Mpc
Rvir = cosmology->comoving_to_physical_size(darkmatterhalos->halo_virial_radius(halo, z), z);//physical Mpc
}
else {
//If subhalo is a satellite, then adopt virial radius at infall.
Expand Down

0 comments on commit ffdcfda

Please sign in to comment.