boxSize_Z in 2D hydro runs

From: Sander Valcke <>
Date: Mon, 28 Sep 2009 11:51:02 +0200

Dear gadget list,

I have a small question about 2D hydro simulations in GadgetII. In
hydra.c and density.c the following lines are used to get the inverse of
the 2nd or 3rd power (2D) of the smoothing length:

hinv3 = hinv * hinv / boxSize_Z;
hinv4 = hinv * hinv * hinv / boxSize_Z;

I do not understand why the boxSize_Z is there, why would the Z boxsize
have any influence at all in a 2D simulation? I ran some tests and when
commenting out the boxSize_Z the simulation results do differ, although
the initial differences are quite small and the long-term qualitative
evolution seems to remain the same.

So, I would like to understand why that term is there, and whether I can
safely remove it (the 2D particle densities written in the snapshots are
the real 2D densities divided by boxSize_Z, which is a bit confusing).



| Sander Valcke                                  |
| Sterrenkundig Observatorium, Universiteit Gent |
| Krijgslaan 281 S9, B-9000 Gent, Belgium        |
| phone +32-9-264-4796  |  fax +32-9-264-4989    |
|       |
Received on 2009-09-28 12:04:30

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