Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
f2f970c4
Commit
f2f970c4
authored
6 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Added documentation of the function returning temperatures in the EAGLE model.
parent
46ea4e84
No related branches found
No related tags found
1 merge request
!697
Add functions to calculate temperature of particles.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/cooling/EAGLE/cooling.c
+17
-0
17 additions, 0 deletions
src/cooling/EAGLE/cooling.c
with
17 additions
and
0 deletions
src/cooling/EAGLE/cooling.c
+
17
−
0
View file @
f2f970c4
...
...
@@ -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
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment