Cooling. Where to edit?

From: Jesus M Salas <jesusms_at_astro.ucla.edu>
Date: Mon, 7 Mar 2016 05:23:08 -0800 (PST)

Hello,
I have an equation for cooling that has the form:

u_new = u_eq + (u - u_eq)*exp( -dt / t_cooling) ,

where u_new is the new internal energy, u_eq is an equilibrium energy, u is the current internal energy, t_cooling is the cooling time, and dt is the timestep.
I believe I can convert between the entrophy (which is stored in SphP[i].Entropy) and internal energy u. All other values I can calculate from the stored values of density, etc.
My question are: where should I write this equation in Gadget2? I have trouble figuring out which is the correct place to edit.
Also, for the time step dt, what should I use? Is it int P[i].Ti_endstep - P[i].Ti_begstep, or is it All.TimeStep?

Thank you for your help


-Jesus
Received on 2016-03-07 14:23:12

This archive was generated by hypermail 2.3.0 : 2023-01-10 10:01:32 CET