diff --git a/doc/RTD/source/SubgridModels/AGNSpinJets/params.rst b/doc/RTD/source/SubgridModels/AGNSpinJets/params.rst index e23fd8d0bb154ad412bbd21dffd8dff780d97500..5e541c79317079a136976059fcdcf760fee5bde7 100644 --- a/doc/RTD/source/SubgridModels/AGNSpinJets/params.rst +++ b/doc/RTD/source/SubgridModels/AGNSpinJets/params.rst @@ -65,9 +65,11 @@ 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 'Variable', the accretion efficiency will scale with Eddington ratio. + accretion_efficiency_mode: Variable # 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. + ADIOS_s: 0.5 # The exponent of the scaling between accretion efficiency and transition radius of the accretion disc, used if 'accretion_efficiency_mode' is 'Variable'. + ADIOS_R_in: 1e4 # The normalisation (the value) of the transition radius of the accretion disc at the critical Eddington ratio (0.01), used if 'accretion_efficiency_mode' is 'Variable'. fix_radiative_efficiency: 0 # Global switch whether to fix the radiative efficiency to a particular value [1], or use a spin-dependant formula [0]. radiative_efficiency: 0.1 # The constant jet efficiency used if 'fix_radiative_efficiency' is set to 1. Otherwise, this value is used to define the Eddington accretion rate. TD_region: B # How to treat the subgrid accretion disk if it is thin, according to the Shakura & Sunyaev (1973) model. If set to B, region b will be used. If set to C, region c will be used. diff --git a/examples/parameter_example.yml b/examples/parameter_example.yml index ca19366a3e80cd336409a099da89ccb92e374e80..a722150666e0973f19ca3ee720f5eb5a7ae55626 100644 --- a/examples/parameter_example.yml +++ b/examples/parameter_example.yml @@ -828,9 +828,11 @@ 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 'Variable', the accretion efficiency will scale with Eddington ratio. + accretion_efficiency_mode: Variable # 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. + ADIOS_s: 0.5 # The exponent of the scaling between accretion efficiency and transition radius of the accretion disc, used if 'accretion_efficiency_mode' is 'Variable'. + ADIOS_R_in: 1e4 # The normalisation (the value) of the transition radius of the accretion disc at the critical Eddington ratio (0.01), used if 'accretion_efficiency_mode' is 'Variable'. fix_radiative_efficiency: 0 # Global switch whether to fix the radiative efficiency to a particular value [1], or use a spin-dependant formula [0]. radiative_efficiency: 0.1 # The constant jet efficiency used if 'fix_radiative_efficiency' is set to 1. Otherwise, this value is used to define the Eddington accretion rate. TD_region: B # How to treat the subgrid accretion disk if it is thin, according to the Shakura & Sunyaev (1973) model. If set to B, region b will be used. If set to C, region c will be used. diff --git a/src/black_holes/SPIN_JET/black_holes_properties.h b/src/black_holes/SPIN_JET/black_holes_properties.h index fe661a90a84846cbc9f291c819b7e79752fe4507..c0c7099f617a995d5d901cdba44187484e072ad8 100644 --- a/src/black_holes/SPIN_JET/black_holes_properties.h +++ b/src/black_holes/SPIN_JET/black_holes_properties.h @@ -417,10 +417,14 @@ struct black_holes_props { * the slim disc regime (at super-Eddington ratios). */ float accretion_efficiency_slim; - /*! Expontent to use for scaling of accretion efficiency with transition + /*! Exponent to use for scaling of accretion efficiency with transition * radius in the thick disc. */ float ADIOS_s; + /*! The radius of the thick inner ADIOS disc at the critical transition + * Eddington ratio, in gravitational units */ + float ADIOS_R_in; + /* Whether or not we want to use wind feedback in the ADAF/ADIOS regime (at low Eddington ratios). */ int use_ADIOS_winds; @@ -1095,12 +1099,19 @@ INLINE static void black_holes_props_init(struct black_holes_props *bp, bp->accretion_efficiency_mode = BH_accretion_efficiency_variable; bp->ADIOS_s = parser_get_param_float(params, "SPINJETAGN:ADIOS_s"); - if ((bp->ADIOS_s < 0) || (bp->ADIOS_s > 1)) { + if ((bp->ADIOS_s < 0.f) || (bp->ADIOS_s > 1.f)) { error( "The ADIOS_s parameter must be between 0 and 1, " "(inclusive), not %f", bp->ADIOS_s); } + + bp->ADIOS_R_in = parser_get_param_float(params, "SPINJETAGN:ADIOS_R_in"); + + if (bp->ADIOS_R_in <= 1.f) { + error("The ADIOS_R_in parameter must be larger than 1, not %f", + bp->ADIOS_s); + } } else { error("The accretion efficiency model must be Constant or Variable, not %s", temp7); diff --git a/src/black_holes/SPIN_JET/black_holes_spin.h b/src/black_holes/SPIN_JET/black_holes_spin.h index 247c66c53d1c31446bfef1b4c979277ca7de701a..72139e17f292fd5690f4a3ee813f4f95e37f51ac 100644 --- a/src/black_holes/SPIN_JET/black_holes_spin.h +++ b/src/black_holes/SPIN_JET/black_holes_spin.h @@ -606,8 +606,9 @@ black_hole_accretion_efficiency(struct bpart* bp, * we also need to use the raw (unsuppressed) Eddington ratio here, * hence the multiplication by accretion efficiencies. Note that the * units of the transition radius here are in R_G. */ - float R_tr = 10.f * props->mdot_crit_ADAF * props->mdot_crit_ADAF * - bp->accretion_efficiency * bp->accretion_efficiency / + float R_tr = props->ADIOS_R_in * props->mdot_crit_ADAF * + props->mdot_crit_ADAF * bp->accretion_efficiency * + bp->accretion_efficiency / (bp->eddington_fraction * bp->eddington_fraction); /* We need to also compute the Bondi radius (in units of R_G), which @@ -796,8 +797,9 @@ black_hole_radiative_efficiency(struct bpart* bp, /* Add contribution of truncated thin disc from larger radii */ if (props->accretion_efficiency_mode == BH_accretion_efficiency_variable) { - float R_tr = 10.f * props->mdot_crit_ADAF * props->mdot_crit_ADAF * - bp->accretion_efficiency * bp->accretion_efficiency / + float R_tr = props->ADIOS_R_in * props->mdot_crit_ADAF * + props->mdot_crit_ADAF * bp->accretion_efficiency * + bp->accretion_efficiency / (bp->eddington_fraction * bp->eddington_fraction); R_tr = fmaxf(10.f, R_tr); rad_eff += 1.f - sqrtf(1. - 2.f / (3.f * R_tr));