Re: Cooling. Where to edit?

From: Gilberto C. Gomez <g.gomez_at_crya.unam.mx>
Date: Mon, 07 Mar 2016 09:50:15 -0600

> 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
>

Hi!

When we implemented this, we added the call to the cooling procedure
to the "advance_and_find_timesteps" function in the "timestep.c"
file, based on the cooling procedures added by other authors.

The timestep used was "dt_entr", which is calculated inside that
same routine.

Cheers,

Gilberto

-- 
What can be asserted without evidence,
can be dismissed without evidence.
Received on 2016-03-07 16:51:28

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