@@ -103,43 +103,6 @@ void ClusterSplitSrcTerm(MeshData<Real> *md, const parthenon::SimTime &tm,
103103 dust::DustUpdateDriver (md, dt, tm);
104104 }
105105
106- // Turbulence driving (existing logic)
107- const bool drive_turbulence = hydro_pkg->Param <bool >(" drive_turbulence" );
108- if (drive_turbulence) {
109- if (parthenon::Globals::my_rank == 0 ) {
110- printf (" Will drive turbulence\n " );
111- }
112- ClusterGenerateDriving (md, dt);
113- ClusterApplyDrivingForces (md, dt);
114- }
115-
116- // Calculate global accretion by calling the encapsulated AGN triggering method
117- const auto &agn_triggering = hydro_pkg->Param <AGNTriggering>(" agn_triggering" );
118- const auto global_sink_data = agn_triggering.CalculateGlobalAccretion (md, tm);
119-
120- // Update the black hole state using the returned accretion data
121- auto smbh_spin_sptr =
122- hydro_pkg->Param <std::shared_ptr<BlackHoleSpin>>(" smbh_spin_object" );
123- BlackHoleSpin *smbh_spin_obj = smbh_spin_sptr.get ();
124- smbh_spin_obj->UpdateBlackHoleStateFromGlobalAccretion (global_sink_data, tm,
125- hydro_pkg.get ());
126-
127- // Print accretion rate to file for fine analysis
128- double total_accretion_rate = hydro_pkg->Param <Real>(" total_accretion_rate" );
129- // Only rank 0 writes the accretion rate
130- int rank;
131- MPI_Comm_rank (MPI_COMM_WORLD, &rank);
132- if (rank == 0 ) {
133- std::ofstream file (" accretion.txt" , std::ios::app);
134- if (file.is_open ()) {
135- // file << std::setprecision(12) << std::fixed;
136- file << tm.time << " " << tm.dt << " " << total_accretion_rate << " "
137- << smbh_spin_obj->GetSMBHMass (hydro_pkg.get ()) << std::endl;
138- file.close ();
139- } else {
140- std::cerr << " Error: Unable to open file 'accretion.txt' for writing." << std::endl;
141- }
142- }
143106 ApplyClusterClips (md, tm, dt);
144107 const auto &DustObj = hydro_pkg->Param <dust::Dust>(" dust" );
145108 DustObj.MeasureAndRecordHistory (md, tm);
0 commit comments