Re: External kinetic energy

From: Antonio Bibiano <antbbn_at_gmail.com>
Date: Thu, 17 Mar 2016 12:47:14 +1100

Hi,
the velocity is updated in timestep.c at lines 281, 289 (for sph particles)
and 383 if you have PMGRID defined.
So if your delta_v is not particlarly complicated you could add you line
after any one of these depending on your needs.

Cheers,
Antonio


2016-03-17 9:04 GMT+11:00 Jesus M Salas <jesusms_at_astro.ucla.edu>:

>
>
> Hello,
> I'd like to add some external driving that changes the speed of the
> particles by some delta_v, something like:
> for (int i=0; i < Npart; i++)
> for (int j = 0; j<3; j++)
> P[i].Velocity[j] += delta_v ;
>
> However, where in the code I should add this, which file and in between
> which lines?
>
> Thank you for your help
>
> -Jesus
>
>
>
>
> -----------------------------------------------------------
>
> If you wish to unsubscribe from this mailing, send mail to
> minimalist_at_MPA-Garching.MPG.de with a subject of: unsubscribe gadget-list
> A web-archive of this mailing list is available here:
> http://www.mpa-garching.mpg.de/gadget/gadget-list
>
Received on 2016-03-17 02:47:17

This archive was generated by hypermail 2.3.0 : 2022-09-01 14:03:43 CEST