MP-Gadget  5.0.1.dev1-76bc7d4726-dirty
winds.h
Go to the documentation of this file.
1 #ifndef WINDS_H
2 #define WINDS_H
3 
4 #include "forcetree.h"
5 #include "utils/paramset.h"
6 
7 /*
8  * Enumeration of the supported wind models.
9  * Wind models may be combined.
10  * SH03, VS08 and OFJT10 are supported.
11  * */
12 enum WindModel {
13  WIND_SUBGRID = 1,/* If this is true, winds are spawned from the star forming gas.
14  * If false, they are spawned from neighbours of the star particle.*/
15  WIND_DECOUPLE_SPH = 2,/* Specifies that wind particles are created temporarily decoupled from the gas dynamics */
16  WIND_USE_HALO = 4,/* Wind speeds depend on the halo circular velocity*/
17  WIND_FIXED_EFFICIENCY = 8, /* Winds have a fixed efficiency and thus fixed wind speed*/
18  WIND_ISOTROPIC = 512, /* Has no effect: only isotropic winds are implemented*/
19 };
20 
21 /*Set the parameters of the wind model*/
23 
24 /*Initialize the wind model from the SFR module*/
25 void init_winds(double FactorSN, double EgySpecSN, double PhysDensThresh, double UnitTime_in_s);
26 
27 /*Evolve a wind particle, reducing its DelayTime*/
28 void winds_evolve(int i, double a3inv, double hubble);
29 
30 /*do the treewalk for the wind model*/
31 void winds_and_feedback(int * NewStars, int NumNewStars, const double Time, const double hubble, ForceTree * tree);
32 
33 /*Make a wind particle at the site of recent star formation.*/
34 int winds_make_after_sf(int i, double sm, double vdisp, double atime);
35 
36 /* Make winds for the subgrid model, after computing the velocity dispersion. */
37 void winds_subgrid(int * MaybeWind, int NumMaybeWind, const double Time, const double hubble, ForceTree * tree, MyFloat * StellarMasses);
38 
39 /* Tests whether winds spawn from gas or stars*/
40 int winds_are_subgrid(void);
41 
42 /*Tests whether a given particle has been made a wind particle and is hydrodynamically decoupled*/
44 
45 /* Set and evolve the hydro parameters for a decoupled wind particle.*/
46 void winds_decoupled_hydro(int i, double atime);
47 
48 /* Returns 1 if the winds ever decouple, 0 otherwise*/
49 int winds_ever_decouple(void);
50 #endif
LOW_PRECISION MyFloat
Definition: types.h:19
void winds_evolve(int i, double a3inv, double hubble)
Definition: winds.c:403
WindModel
Definition: winds.h:12
@ WIND_ISOTROPIC
Definition: winds.h:18
@ WIND_FIXED_EFFICIENCY
Definition: winds.h:17
@ WIND_USE_HALO
Definition: winds.h:16
@ WIND_DECOUPLE_SPH
Definition: winds.h:15
@ WIND_SUBGRID
Definition: winds.h:13
void winds_subgrid(int *MaybeWind, int NumMaybeWind, const double Time, const double hubble, ForceTree *tree, MyFloat *StellarMasses)
Definition: winds.c:306
int winds_ever_decouple(void)
Definition: winds.c:192
int winds_is_particle_decoupled(int i)
Definition: winds.c:124
int winds_are_subgrid(void)
Definition: winds.c:115
void set_winds_params(ParameterSet *ps)
Definition: winds.c:72
void winds_decoupled_hydro(int i, double atime)
Definition: winds.c:133
int winds_make_after_sf(int i, double sm, double vdisp, double atime)
Definition: winds.c:708
void winds_and_feedback(int *NewStars, int NumNewStars, const double Time, const double hubble, ForceTree *tree)
Definition: winds.c:333
void init_winds(double FactorSN, double EgySpecSN, double PhysDensThresh, double UnitTime_in_s)
Definition: winds.c:97