Skip to content
Snippets Groups Projects
Commit f2f970c4 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Added documentation of the function returning temperatures in the EAGLE model.

parent 46ea4e84
No related branches found
No related tags found
1 merge request!697Add functions to calculate temperature of particles.
......@@ -37,6 +37,7 @@
#include "cooling_struct.h"
#include "cooling_tables.h"
#include "error.h"
#include "exp10.h"
#include "hydro.h"
#include "interpolate.h"
#include "io_properties.h"
......@@ -631,6 +632,22 @@ __attribute__((always_inline)) INLINE void cooling_first_init_part(
xp->cooling_data.radiated_energy = 0.f;
}
/**
* @brief Compute the temperature of a #part based on the cooling function.
*
* We use the Temperature table of the Wiersma+08 set. This computes the
* equilibirum temperature of a gas for a given redshift, Hydrogen density,
* internal energy per unit mass and Helium fraction.
*
* The temperature returned is consistent with the cooling rates.
*
* @param phys_const #phys_const data structure.
* @param us The internal system of units.
* @param cosmo #cosmology data structure.
* @param cooling #cooling_function_data struct.
* @param p #part data.
* @param xp Pointer to the #xpart data.
*/
float cooling_get_temperature(
const struct phys_const *restrict phys_const,
const struct unit_system *restrict us,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment