Skip to content
brooksalyson edited this page Oct 11, 2020 · 8 revisions

Gasoline/ChaNGa and associated analysis tools expect input to be in units where G = 1. See Code Units for details. Also see NChilada file format.

Tipsy

This format was first created for the Tipsy X11-based visualization system. It consists of binary write()s of the C structures used in Tipsy. At the beginning of the file is a header defined by the C structure:

struct {
        double time ;
        int nbodies ;
        int ndim ;
        int nsph ;
        int ndark ;
        int nstar ;
        int pad;
    } ;

Where time is either the time in simulation units, or for cosmological simulations, the expansion factor of this snapshot, nbodies is the total number of particles, ndim is the dimension (always 3) nsph is the number of SPH particles, ndark is the number of dark matter particles, and nstar is the number of star particles. pad makes the structure 64 bit aligned, and was added to the format after 64 bit machines became common. Note that nbodies = nsph + ndark + nstar.

Following the header is an array of nsph gas particle structures defined by:

struct gas_particle {
        float mass;
        float pos[3];
        float vel[3];
        float rho;
        float temp;
        float eps;
        float metals ;
        float phi ;
    } ;

where mass, pos and vel are obvious, rho is the gas density, temp is the gas temperature, eps is the gravitational softening, metals is the metalicity and phi is the gravitational potential. Note that some codes stored SPH smoothing length in place of eps. Gasoline and CHANGA do not do this.

Following the gas particles (or the header if nsph = 0) is an array of ndark dark matter particle structures defined by:

struct dark_particle {
    float mass;
    float pos[3];
    float vel[3];
    float eps;
    float phi ;
} ;

where mass, pos and vel are obvious, eps is the gravitational softening, and phi is the gravitational potential.

Following the dark matter particles is an array of nstar star particle structures defined by:

struct star_particle {
    float mass;
    float pos[3];
    float vel[3];
    float metals ;
    float tform ;
    float eps;
    float phi ;
} ;

where mass, pos and vel are obvious, metals is the stellar metalicity, tform is the formation time, eps is the gravitational softening, and phi is the gravitational potential.

Standard Tipsy

Different systems can have different binary representations of the above structures. In order to ease portability of the tipsy files between systems, a standard tipsy format was introduced based on the XDR format. This standard differs from the binary format of most Intel based processors in that it is big-endian (most significant byte stored first).

Auxiliary Files

These files can be written in either binary or ascii format (selected as an input parameter). Although some of these quantities are not relevant for every type of particle, they are written anyway, in the order gas, dm, star. They contain the following information:

coolontime: For gas experiencing blastwave feedback, the time at which cooling is re-enabled, in simulation units.

ESNRate: For gas, this is the rate at which the gas is heated due to nearby supernovae. For stars, this is the rate at which the star particle is producing energy from supernovae. These are in simulation units.

FeMassFrac: The fraction of the particle mass in iron for each particle

H2: The fraction of the particle mass in molecular hydrogen

HeI: The fraction of the particle mass in neutral He

HeII: The fraction of the particle mass in singly ionized He

HI: The fraction of the particle mass in neutral H

igasorder: For star particles, the iord value of the parent gas particle

iord: The order of the particle in the list. Gas particles are listed first, from 1 to N_gas. DM are listed next, from N_gas+1 to N_gas+N_DM. Stars are listed next, from N_gas+N_DM+1 to N. Note that gas particles can be deleted, and their iord values disappear from the list when they are deleted.

lw: For gas particles, the base 10 logarithm of the Lyman-Werner flux. For stars, the base 10 logarithm of the Lyman Werner luminosity.

OxMassFrac: The fraction of the particle mass in oxygen