Commit 5702fa34 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Implement the correction to the temperature in cases where the internal energy...

Implement the correction to the temperature in cases where the internal energy is below the first element of the table in the EAGLE model. Thanks to @jborrow for spotting the problem in some adiabatic runs.
parent f1235181
......@@ -260,6 +260,14 @@ __attribute__((always_inline)) INLINE double eagle_convert_u_to_temp(
(exp(M_LN10 * log_10_T_high) - exp(M_LN10 * log_10_T_low)) / delta_u;
}
/* Special case for temperatures below the start of the table */
if (u_index == 0 && d_u == 0.f) {
/* The temperature is multiplied by u / 10^T[0]
* where T[0] is the first entry in the table */
log_10_T += log10_u_cgs - cooling->Temp[0];
}
return log_10_T;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment