change of particle type

From: Yves Revaz <yves.revaz_at_obs.unige.ch>
Date: Thu, 08 Sep 2005 10:13:36 +0200

Dear Gadget list,

One of my aim using Gadget is to simulate a multiphase interstellar medium.
Particles of gas could become non-collisional, like stars and then, come
back in
the collisional phase.

In a first step, I tried to move gas particles in halo type particles.
To my great surprise,
it seems to be much more easy than what I thought (Thanks to the
excellent implementation of Volker ;-) ).

Here is in summary what I have implemented:

1) The routine that changes particle types must be applied when the
system is synchronized (in run.c),
after find_next_sync_point_and_drift(); and every_timestep_stuff();,
before domain_Decomposition();.

2) Moving gas particles to a non collisional phase corresponds to moving
gas elements of P and SphP
(belonging to the first N_gas positions) after this first N_gas positions.
This operation can be achieved with the function "memmove".

3) Update N_gas (N_gas = N_gas - N_move)

4) Update All.TotN_gas

5) Ensures that a new tree will be constructed


That's it !

Some quick tests show a good conservation of the energy,
meaning that I'm probably on the right way.

I will be very interested if someone has comments or suggestions about the
procedure used here, especially if something seems to be wrong or may be
better implemented.

Cheers.







-- 
                                                (o o)
--------------------------------------------oOO--(_)--OOo-------
  Yves Revaz
  Geneva Observatory	       Tel : ++ 41 22 379 23 65
  51. Ch. des Maillettes       Fax : ++ 41 22 379 22 05
  1290 Sauverny 	           e-mail : Yves.Revaz_at_obs.unige.ch
  SWITZERLAND		          http://obswww.unige.ch/~revaz/
----------------------------------------------------------------
Received on 2005-09-08 10:13:44

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