From 993b93693496612d2acf57514ba60f80751f45c5 Mon Sep 17 00:00:00 2001 From: epanini Date: Wed, 18 Dec 2024 19:44:13 +0100 Subject: [PATCH] agn_triggering.hpp modified initialization for inflow rate --- src/pgen/cluster/agn_triggering.hpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/pgen/cluster/agn_triggering.hpp b/src/pgen/cluster/agn_triggering.hpp index 8236a291..4e6c711e 100644 --- a/src/pgen/cluster/agn_triggering.hpp +++ b/src/pgen/cluster/agn_triggering.hpp @@ -15,7 +15,7 @@ #include #include #include - +#include // AthenaPK headers #include "../../units.hpp" #include "jet_coords.hpp" @@ -34,9 +34,12 @@ class AGNTriggering { private: const parthenon::Real gamma_; parthenon::Real mean_molecular_mass_; - + public: const AGNTriggeringMode triggering_mode_; + + parthenon::Real inflow_cold_=0.0; // Cold mass inflow rate + parthenon::Real inflow_tot_=0.0; // Total gas mass inflow rate const parthenon::Real accretion_radius_; @@ -71,9 +74,9 @@ class AGNTriggering { // Compute Cold gas accretion rate within the accretion radius for cold gas triggering // and simultaneously remove cold gas (updating conserveds and primitives) template - void ReduceColdMass(parthenon::Real &cold_mass, + void ReduceColdMass(parthenon::Real &cold_mass,parthenon::Real &total_mass, parthenon::MeshData *md, const parthenon::Real dt, - const EOS eos) const; + const EOS eos) ; // Compute Mass-weighted total density, velocity, and sound speed and total mass // for Bondi accretion