diff --git a/doc/RTD/source/SubgridModels/AGNSpinJets/params.rst b/doc/RTD/source/SubgridModels/AGNSpinJets/params.rst index 821097f0f4302a1f00ba6ccf6a6f12ef951ad095..64c2774a1c1900f5a2b660258d6841c6987efdcd 100644 --- a/doc/RTD/source/SubgridModels/AGNSpinJets/params.rst +++ b/doc/RTD/source/SubgridModels/AGNSpinJets/params.rst @@ -65,8 +65,7 @@ Below we give an example of parameter choices applicable for e.g. a 50 Mpc box. fix_jet_efficiency: 0 # Global switch whether to fix jet efficiency to a particular value [1], or use a spin-dependant formula [0]. jet_efficiency: 0.1 # The constant jet efficiency used if 'fix_jet_efficiency' is set to 1. fix_jet_direction: 0 # Global switch whether to fix the jet direction to be along the z-axis, instead of along the spin vector. - accretion_efficiency_mode: Constant # How the accretion efficiencies are calculated for the thick accretion disc. If 'Constant', the value of 'accretion_efficiency_thick' will be used. If 'Vari - able', the accretion efficiency will scale with Eddington ratio. + accretion_efficiency_mode: Constant # How the accretion efficiencies are calculated for the thick accretion disc. If 'Constant', the value of 'accretion_efficiency_thick' will be used. If 'Variable', the accretion efficiency will scale with Eddington ratio. accretion_efficiency_thick: 0.01 # The accretion efficiency (suppression factor of the accretion rate) to use in the thick disc (ADAF), to represent the effects of subgrid ADIOS winds that take away most of the mass flowing through the accretion disc. accretion_efficiency_slim: 1 # The constant accretion efficiency to use in the slim disc, at super-Eddington rates. fix_radiative_efficiency: 0 # Global switch whether to fix the radiative efficiency to a particular value [1], or use a spin-dependant formula [0]. @@ -77,8 +76,7 @@ Below we give an example of parameter choices applicable for e.g. a 50 Mpc box. include_slim_disk: 1 # Global switch whether to include super-Eddington accretion, modeled as the slim disk. If set to 0, disks will be considered thin even at very large accretion rates. use_jets_in_thin_disc: 1 # Whether to use jets alongside radiation in the thin disc at moderate Eddington ratios. use_ADIOS_winds: 1 # Whether to include ADIOS winds in the thick disc as thermal isotropic feedback (same channel as thin disc quasar feedback, but with a different efficiency). - slim_disc_wind_factor: 1 # The relative efficiency of slim disc winds at super-Eddington rates. If '1', full winds will be used, while '0' will lead to no winds. Any value in between - those can also be used. The wind is implemented in the thermal isotropic feedback channel. + slim_disc_wind_factor: 1 # The relative efficiency of slim disc winds at super-Eddington rates. If '1', full winds will be used, while '0' will lead to no winds. Any value in between those can also be used. The wind is implemented in the thermal isotropic feedback channel. Most of these parameters should work well generally, and should not be changed except for tests. We will discuss only some of the more important ones. You can choose whether to have only the thick and thin disk (low and high BH accretion rates, respectively), or you can also include the slim disk at super-Eddington rates with ``include_slim_disk``. You can control what type of feedback you (do not) want with ``include_jets`` and ``turn_off_radiative_feedback``. If you choose to turn off jets, everything will be modeled as a thin disk (regardless of accretion rate), since jets go hand-in-hand with the thick and the slim disk. Similarly, if you turn off radiation, everything will be treated as a thick disk. diff --git a/examples/IdealisedCluster/IdealisedCluster_M13/idealised_cluster_M13.yml b/examples/IdealisedCluster/IdealisedCluster_M13/idealised_cluster_M13.yml index 1f487d9267f5b6eea8fb9979b7672759c89fe0aa..6c853b16f3806ae58df19460a10224411340b92e 100644 --- a/examples/IdealisedCluster/IdealisedCluster_M13/idealised_cluster_M13.yml +++ b/examples/IdealisedCluster/IdealisedCluster_M13/idealised_cluster_M13.yml @@ -297,8 +297,7 @@ SPINJETAGN: fix_jet_efficiency: 0 # Global switch whether to fix jet efficiency to a particular value [1], or use a spin-dependant formula [0]. jet_efficiency: 0.1 # The constant jet efficiency used if 'fix_jet_efficiency' is set to 1. fix_jet_direction: 0 # Global switch whether to fix the jet direction to be along the z-axis, instead of along the spin vector. - accretion_efficiency_mode: Constant # How the accretion efficiencies are calculated for the thick accretion disc. If 'Constant', the value of 'accretion_efficiency_thick' will be used. If 'Vari - able', the accretion efficiency will scale with Eddington ratio. + accretion_efficiency_mode: Constant # How the accretion efficiencies are calculated for the thick accretion disc. If 'Constant', the value of 'accretion_efficiency_thick' will be used. If 'Variable', the accretion efficiency will scale with Eddington ratio. accretion_efficiency_thick: 0.01 # The accretion efficiency (suppression factor of the accretion rate) to use in the thick disc (ADAF), to represent the effects of subgrid ADIOS winds that take away most of the mass flowing through the accretion disc. accretion_efficiency_slim: 1 # The constant accretion efficiency to use in the slim disc, at super-Eddington rates. fix_radiative_efficiency: 0 # Global switch whether to fix the radiative efficiency to a particular value [1], or use a spin-dependant formula [0]. @@ -309,5 +308,4 @@ SPINJETAGN: include_slim_disk: 0 # Global switch whether to include super-Eddington accretion, modeled as the slim disk. If set to 0, disks will be considered thin even at very large accretion rates. use_jets_in_thin_disc: 1 # Whether to use jets alongside radiation in the thin disc at moderate Eddington ratios. use_ADIOS_winds: 0 # Whether to include ADIOS winds in the thick disc as thermal isotropic feedback (same channel as thin disc quasar feedback, but with a different efficiency). - slim_disc_wind_factor: 0 # The relative efficiency of slim disc winds at super-Eddington rates. If '1', full winds will be used, while '0' will lead to no winds. Any value in between - those can also be used. The wind is implemented in the thermal isotropic feedback channel. + slim_disc_wind_factor: 0 # The relative efficiency of slim disc winds at super-Eddington rates. If '1', full winds will be used, while '0' will lead to no winds. Any value in between those can also be used. The wind is implemented in the thermal isotropic feedback channel. diff --git a/examples/IdealisedCluster/IdealisedCluster_M135/idealised_cluster_M135.yml b/examples/IdealisedCluster/IdealisedCluster_M135/idealised_cluster_M135.yml index 0fa12db35be874ca00b3adcedc3621b804824c0b..7a0771e0da226dfe9f226972f337c4015357bee7 100644 --- a/examples/IdealisedCluster/IdealisedCluster_M135/idealised_cluster_M135.yml +++ b/examples/IdealisedCluster/IdealisedCluster_M135/idealised_cluster_M135.yml @@ -297,8 +297,7 @@ SPINJETAGN: fix_jet_efficiency: 0 # Global switch whether to fix jet efficiency to a particular value [1], or use a spin-dependant formula [0]. jet_efficiency: 0.1 # The constant jet efficiency used if 'fix_jet_efficiency' is set to 1. fix_jet_direction: 0 # Global switch whether to fix the jet direction to be along the z-axis, instead of along the spin vector. - accretion_efficiency_mode: Constant # How the accretion efficiencies are calculated for the thick accretion disc. If 'Constant', the value of 'accretion_efficiency_thick' will be used. If 'Vari - able', the accretion efficiency will scale with Eddington ratio. + accretion_efficiency_mode: Constant # How the accretion efficiencies are calculated for the thick accretion disc. If 'Constant', the value of 'accretion_efficiency_thick' will be used. If 'Variable', the accretion efficiency will scale with Eddington ratio. accretion_efficiency_thick: 0.01 # The accretion efficiency (suppression factor of the accretion rate) to use in the thick disc (ADAF), to represent the effects of subgrid ADIOS winds that take away most of the mass flowing through the accretion disc. accretion_efficiency_slim: 1 # The constant accretion efficiency to use in the slim disc, at super-Eddington rates. fix_radiative_efficiency: 0 # Global switch whether to fix the radiative efficiency to a particular value [1], or use a spin-dependant formula [0]. @@ -309,5 +308,4 @@ SPINJETAGN: include_slim_disk: 0 # Global switch whether to include super-Eddington accretion, modeled as the slim disk. If set to 0, disks will be considered thin even at very large accretion rates. use_jets_in_thin_disc: 1 # Whether to use jets alongside radiation in the thin disc at moderate Eddington ratios. use_ADIOS_winds: 0 # Whether to include ADIOS winds in the thick disc as thermal isotropic feedback (same channel as thin disc quasar feedback, but with a different efficiency). - slim_disc_wind_factor: 0 # The relative efficiency of slim disc winds at super-Eddington rates. If '1', full winds will be used, while '0' will lead to no winds. Any value in between - those can also be used. The wind is implemented in the thermal isotropic feedback channel. + slim_disc_wind_factor: 0 # The relative efficiency of slim disc winds at super-Eddington rates. If '1', full winds will be used, while '0' will lead to no winds. Any value in between those can also be used. The wind is implemented in the thermal isotropic feedback channel. diff --git a/examples/IdealisedCluster/IdealisedCluster_M14/idealised_cluster_M14.yml b/examples/IdealisedCluster/IdealisedCluster_M14/idealised_cluster_M14.yml index 3cbd96e9e9dee77114fce299fc93843064c36794..f184bf45774f54dbdc483a0465363ed128d7bd51 100644 --- a/examples/IdealisedCluster/IdealisedCluster_M14/idealised_cluster_M14.yml +++ b/examples/IdealisedCluster/IdealisedCluster_M14/idealised_cluster_M14.yml @@ -297,8 +297,7 @@ SPINJETAGN: fix_jet_efficiency: 0 # Global switch whether to fix jet efficiency to a particular value [1], or use a spin-dependant formula [0]. jet_efficiency: 0.1 # The constant jet efficiency used if 'fix_jet_efficiency' is set to 1. fix_jet_direction: 0 # Global switch whether to fix the jet direction to be along the z-axis, instead of along the spin vector. - accretion_efficiency_mode: Constant # How the accretion efficiencies are calculated for the thick accretion disc. If 'Constant', the value of 'accretion_efficiency_thick' will be used. If 'Vari - able', the accretion efficiency will scale with Eddington ratio. + accretion_efficiency_mode: Constant # How the accretion efficiencies are calculated for the thick accretion disc. If 'Constant', the value of 'accretion_efficiency_thick' will be used. If 'Variable', the accretion efficiency will scale with Eddington ratio. accretion_efficiency_thick: 0.01 # The accretion efficiency (suppression factor of the accretion rate) to use in the thick disc (ADAF), to represent the effects of subgrid ADIOS winds that take away most of the mass flowing through the accretion disc. accretion_efficiency_slim: 1 # The constant accretion efficiency to use in the slim disc, at super-Eddington rates. fix_radiative_efficiency: 0 # Global switch whether to fix the radiative efficiency to a particular value [1], or use a spin-dependant formula [0]. @@ -309,5 +308,4 @@ SPINJETAGN: include_slim_disk: 0 # Global switch whether to include super-Eddington accretion, modeled as the slim disk. If set to 0, disks will be considered thin even at very large accretion rates. use_jets_in_thin_disc: 1 # Whether to use jets alongside radiation in the thin disc at moderate Eddington ratios. use_ADIOS_winds: 0 # Whether to include ADIOS winds in the thick disc as thermal isotropic feedback (same channel as thin disc quasar feedback, but with a different efficiency). - slim_disc_wind_factor: 0 # The relative efficiency of slim disc winds at super-Eddington rates. If '1', full winds will be used, while '0' will lead to no winds. Any value in between - those can also be used. The wind is implemented in the thermal isotropic feedback channel. \ No newline at end of file + slim_disc_wind_factor: 0 # The relative efficiency of slim disc winds at super-Eddington rates. If '1', full winds will be used, while '0' will lead to no winds. Any value in between those can also be used. The wind is implemented in the thermal isotropic feedback channel. \ No newline at end of file diff --git a/examples/IdealisedCluster/IdealisedCluster_M15/idealised_cluster_M15.yml b/examples/IdealisedCluster/IdealisedCluster_M15/idealised_cluster_M15.yml index d0367c9cdd330739da26780521d19b5e9e726262..dd55de086101b5bf9c7a208ec0d01cb5698163fc 100644 --- a/examples/IdealisedCluster/IdealisedCluster_M15/idealised_cluster_M15.yml +++ b/examples/IdealisedCluster/IdealisedCluster_M15/idealised_cluster_M15.yml @@ -297,8 +297,7 @@ SPINJETAGN: fix_jet_efficiency: 0 # Global switch whether to fix jet efficiency to a particular value [1], or use a spin-dependant formula [0]. jet_efficiency: 0.1 # The constant jet efficiency used if 'fix_jet_efficiency' is set to 1. fix_jet_direction: 0 # Global switch whether to fix the jet direction to be along the z-axis, instead of along the spin vector. - accretion_efficiency_mode: Constant # How the accretion efficiencies are calculated for the thick accretion disc. If 'Constant', the value of 'accretion_efficiency_thick' will be used. If 'Vari - able', the accretion efficiency will scale with Eddington ratio. + accretion_efficiency_mode: Constant # How the accretion efficiencies are calculated for the thick accretion disc. If 'Constant', the value of 'accretion_efficiency_thick' will be used. If 'Variable', the accretion efficiency will scale with Eddington ratio. accretion_efficiency_thick: 0.01 # The accretion efficiency (suppression factor of the accretion rate) to use in the thick disc (ADAF), to represent the effects of subgrid ADIOS winds that take away most of the mass flowing through the accretion disc. accretion_efficiency_slim: 1 # The constant accretion efficiency to use in the slim disc, at super-Eddington rates. fix_radiative_efficiency: 0 # Global switch whether to fix the radiative efficiency to a particular value [1], or use a spin-dependant formula [0]. @@ -309,5 +308,4 @@ SPINJETAGN: include_slim_disk: 0 # Global switch whether to include super-Eddington accretion, modeled as the slim disk. If set to 0, disks will be considered thin even at very large accretion rates. use_jets_in_thin_disc: 1 # Whether to use jets alongside radiation in the thin disc at moderate Eddington ratios. use_ADIOS_winds: 0 # Whether to include ADIOS winds in the thick disc as thermal isotropic feedback (same channel as thin disc quasar feedback, but with a different efficiency). - slim_disc_wind_factor: 0 # The relative efficiency of slim disc winds at super-Eddington rates. If '1', full winds will be used, while '0' will lead to no winds. Any value in between - those can also be used. The wind is implemented in the thermal isotropic feedback channel. \ No newline at end of file + slim_disc_wind_factor: 0 # The relative efficiency of slim disc winds at super-Eddington rates. If '1', full winds will be used, while '0' will lead to no winds. Any value in between those can also be used. The wind is implemented in the thermal isotropic feedback channel. \ No newline at end of file diff --git a/examples/parameter_example.yml b/examples/parameter_example.yml index 9b5074491c6e6b9401f11dce675570958aefb0ac..3347eb8712b9fa568b0abc100571113bd9d18e20 100644 --- a/examples/parameter_example.yml +++ b/examples/parameter_example.yml @@ -815,8 +815,7 @@ SPINJETAGN: fix_jet_efficiency: 0 # Global switch whether to fix jet efficiency to a particular value [1], or use a spin-dependant formula [0]. jet_efficiency: 0.1 # The constant jet efficiency used if 'fix_jet_efficiency' is set to 1. fix_jet_direction: 0 # Global switch whether to fix the jet direction to be along the z-axis, instead of along the spin vector. - accretion_efficiency_mode: Constant # How the accretion efficiencies are calculated for the thick accretion disc. If 'Constant', the value of 'accretion_efficiency_thick' will be used. If 'Vari -able', the accretion efficiency will scale with Eddington ratio. + accretion_efficiency_mode: Constant # How the accretion efficiencies are calculated for the thick accretion disc. If 'Constant', the value of 'accretion_efficiency_thick' will be used. If 'Variable', the accretion efficiency will scale with Eddington ratio. accretion_efficiency_thick: 0.01 # The accretion efficiency (suppression factor of the accretion rate) to use in the thick disc (ADAF), to represent the effects of subgrid ADIOS winds that take away most of the mass flowing through the accretion disc. accretion_efficiency_slim: 1 # The constant accretion efficiency to use in the slim disc, at super-Eddington rates. fix_radiative_efficiency: 0 # Global switch whether to fix the radiative efficiency to a particular value [1], or use a spin-dependant formula [0]. @@ -827,8 +826,7 @@ able', the accretion efficiency will scale with Eddington ratio. include_slim_disk: 1 # Global switch whether to include super-Eddington accretion, modeled as the slim disk. If set to 0, disks will be considered thin even at very large accretion rates. use_jets_in_thin_disc: 1 # Whether to use jets alongside radiation in the thin disc at moderate Eddington ratios. use_ADIOS_winds: 1 # Whether to include ADIOS winds in the thick disc as thermal isotropic feedback (same channel as thin disc quasar feedback, but with a different efficiency). - slim_disc_wind_factor: 1 # The relative efficiency of slim disc winds at super-Eddington rates. If '1', full winds will be used, while '0' will lead to no winds. Any value in between - those can also be used. The wind is implemented in the thermal isotropic feedback channel. + slim_disc_wind_factor: 1 # The relative efficiency of slim disc winds at super-Eddington rates. If '1', full winds will be used, while '0' will lead to no winds. Any value in between those can also be used. The wind is implemented in the thermal isotropic feedback channel. # Parameters related to the neutrinos -------------------------------------------- Neutrino: diff --git a/src/black_holes/SPIN_JET/black_holes.h b/src/black_holes/SPIN_JET/black_holes.h index 9ebe99a3dea025bd34bf038a2355e6991a7aae90..424fa218dead63c6b0d3bcbbb892b99d7c28f487 100644 --- a/src/black_holes/SPIN_JET/black_holes.h +++ b/src/black_holes/SPIN_JET/black_holes.h @@ -801,10 +801,19 @@ __attribute__((always_inline)) INLINE static void black_holes_prepare_feedback( const double gas_rho_phys = bp->rho_gas * cosmo->a3_inv; const double n_H = gas_rho_phys * 0.75 / proton_mass; const double boost_ratio = n_H / props->boost_n_h_star; - const double boost_factor = - max(pow(boost_ratio, props->boost_beta), props->boost_alpha); + double boost_factor; + if (boost_ratio > 1.0) { + boost_factor = props->boost_alpha * pow(boost_ratio, props->boost_beta); + } else { + boost_factor = props->boost_alpha; + } + accr_rate *= boost_factor; + bp->accretion_boost_factor = boost_factor; + } else { + bp->accretion_boost_factor = 1.; } + /* Compute the reduction factor from Rosas-Guevara et al. (2015) */ if (props->with_angmom_limiter) { const double Bondi_radius = G * BH_mass / gas_c_phys2; diff --git a/src/black_holes/SPIN_JET/black_holes_part.h b/src/black_holes/SPIN_JET/black_holes_part.h index f07aa031a565f329b0513e35ee2f5e15c42b4d6a..a31f22503e9d0c95b11548203fd2563b7d7db26f 100644 --- a/src/black_holes/SPIN_JET/black_holes_part.h +++ b/src/black_holes/SPIN_JET/black_holes_part.h @@ -199,6 +199,9 @@ struct bpart { /*! BH accretion-limited time-step */ float dt_heat; + + /*! Accretion boost factor */ + float accretion_boost_factor; /*! Eddington fraction */ float eddington_fraction;