Skip to content
Snippets Groups Projects
Commit f2356a91 authored by Folkert Nobels's avatar Folkert Nobels
Browse files

Add Eagle stars

parent 69dd7f83
No related branches found
No related tags found
1 merge request!705Star formation following Schaye08
/*******************************************************************************
* This file is part of SWIFT.
* Copyright (c) 2016 Matthieu Schaller (matthieu.schaller@durham.ac.uk)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
******************************************************************************/
#ifndef SWIFT_EAGLE_STAR_PART_H
#define SWIFT_EAGLE_STAR_PART_H
/* Some standard headers. */
#include <stdlib.h>
/**
* @brief Particle fields for the star particles.
*
* All quantities related to gravity are stored in the associate #gpart.
*/
struct spart {
/*! Particle ID. */
long long id;
/*! Pointer to corresponding gravity part. */
struct gpart* gpart;
/*! Particle position. */
double x[3];
/* Offset between current position and position at last tree rebuild. */
float x_diff[3];
/* Offset between current position and position at last tree rebuild. */
float x_diff_sort[3];
/*! Particle velocity. */
float v[3];
/*! Star mass */
float mass;
/* Initial star mass */
float mass_init;
/* Stellar age */
float age;
/* Particle cutoff radius. */
float h;
/*! Particle time bin */
timebin_t time_bin;
struct {
/* Number of neighbours. */
float wcount;
/* Number of neighbours spatial derivative. */
float wcount_dh;
} density;
/* structure with all metallicities */
struct metallicity {
/* Hydrogen abundance */
float X;
/* Helium abundance */
float Y;
/* Abundance all metals */
float Z;
/* Abundance Carbon */
float C;
/* Abundance Nitrogen */
float N;
/* Abundance Oxygen */
float O;
/* Abundance Neon */
float Ne;
/* Abundance Magnesium */
float Mg;
/* Abundance Silicon */
float Si;
/* Abundance Sulfur */
float S;
/* Abundance Calcium */
float Ca;
/* Abundance Iron */
float Fe;
}
#ifdef SWIFT_DEBUG_CHECKS
/* Time of the last drift */
integertime_t ti_drift;
/* Time of the last kick */
integertime_t ti_kick;
#endif
#ifdef DEBUG_INTERACTIONS_STARS
/*! List of interacting particles in the density SELF and PAIR */
long long ids_ngbs_density[MAX_NUM_OF_NEIGHBOURS_STARS];
/*! Number of interactions in the density SELF and PAIR */
int num_ngb_density;
#endif
} SWIFT_STRUCT_ALIGN;
/**
* @brief Contains all the constants and parameters of the stars scheme
*/
struct stars_props {
/*! Resolution parameter */
float eta_neighbours;
/*! Target weightd number of neighbours (for info only)*/
float target_neighbours;
/*! Smoothing length tolerance */
float h_tolerance;
/*! Tolerance on neighbour number (for info only)*/
float delta_neighbours;
/*! Maximal smoothing length */
float h_max;
/*! Maximal number of iterations to converge h */
int max_smoothing_iterations;
/*! Maximal change of h over one time-step */
float log_max_h_change;
};
#endif /* SWIFT_EAGLE_STAR_PART_H */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment