changa 3.5
Loading...
Searching...
No Matches
supernova.h
1#ifndef SUPERNOVA_HINCLUDED
2#define SUPERNOVA_HINCLUDED
3
4#include "starlifetime.h"
5#include "imf.h"
6#include "rand.h"
7
8class SFEvent;
9class FBEffects;
10
12class SN
13{
14 friend class Fdbk;
15
16 double AGORAgasLossPerSN; /* Amount of gas (in Msun) to be ejected for one supernova */
17 double AGORAmetalLossPerSN; /* Amount of metals (in Msun) to be ejected for one supernova */
18 double AGORAmetalFracO; /* Metal fraction of oxygen to be ejected during the event */
19 double AGORAmetalFracFe; /* Metal fraction of iron to be ejected during the event */
20
21 double dMSNrem; /* mass of SN remnant in M_sun */
22 double dMSNIImin; /* Minimum core collapse SN mass */
23 double dMSNIImax; /* Maximum core collapse SN mass */
24 double dMBmin; /* Minimum Mass of binary that can do SNIa */
25 double dMBmax; /* Maximum mass of binary that an SNIa */
26 double dMEjexp; /* exponent of ejection mass power law */
27 double dMEjconst; /* normalization for ejection mass power law */
28 double dMFeexp; /* exponent of iron productions */
29 double dMFeconst; /* normalization of iron */
30 double dMOxexp; /* exponent of oxygen */
31 double dMOxconst; /* normalization of oxygen */
32 Padova pdva;
33 public:
34 double AGORAsnTime; /* Time (in yr) at which to set off the single SN */
35 double AGORAsnE; /* Energy (erg) to be released from a single SN */
36 double AGORAsnPerMass; /* Number of supernovae to set off per solar mass of star particle */
37 double dESN; /* how much energy comes from a supernova */
38 int bUseStoch; /* use stochastic IMF */
39 double dStochCut; /* Mass boundary (in Msun) between the low-mass continuous IMF and the high-mass individually tracked stars */
40 int iNSNIIQuantum; /* minimum amount of supernovae */
41 double dFracBinSNIa; /* fraction of binary systems in mass
42 range that go SNIa (van den Bergh
43 & McClure, ApJ 425, 205, 1994) */
44 IMF *imf;
45
46 SN() {
47 /* parameters for AGORA feedback
48 These are specified in paper 4, dataset 2 */
49 AGORAsnTime = 5.e6;
50 AGORAsnPerMass = 91.;
51 AGORAgasLossPerSN = 14.8;
52 AGORAmetalLossPerSN = 2.63;
53 AGORAmetalFracO = 0.098;
54 AGORAmetalFracFe = 0.43;
55 AGORAsnE = 1.0e51;
56
57 dMSNrem = 1.4; /* mass of supernova remnant in solar masses
58 * Also used for SNIa ejected mass */
59 dMSNIImin = 8.0; /* Mass above which stars supernova in solar
60 masses */
61 dMSNIImax = 40.; /* Mass below which stars supernova in
62 solar masses */
63 dMBmin = 3.0; /* Minimum mass of binary that can go SNIa */
64 dMBmax = 16.0; /* Maximum mass of binary that can go SNIa */
65 /* normalization constant and exponent in formulae for masses of
66 ejected Fe and O16 as a function of stellar mass taken from
67 Raiteri, Villata and Navarro, A&A 315, 105, 1996 */
68 dMEjexp = 1.056;
69 dMEjconst = 0.7682;
70 dMFeexp = 1.864;
71 dMFeconst = 2.802e-4;
72 dMOxexp = 2.721;
73 dMOxconst = 4.586e-4;
74 dESN = 0.1e51;
75 bUseStoch = 0; //Stochastically sample the IMF.
76 dStochCut= 8.0;
77 iNSNIIQuantum = 0;
78 dFracBinSNIa = 0.05; /* .05 is in line with chemical evolution
79 models of the Milky Way (Francois
80 et al 2004) */
81 }
82 void CalcAGORAFeedback(SFEvent *sfEvent, double dTime, double dDelta,
83 FBEffects *fbEffects) const;
84 void CalcSNIIFeedback(SFEvent *sfEvent,
85 double dTime, double dDelta,
86 FBEffects *fbEffects,
87 Rand& rndGen) const;
88 void CalcSNIaFeedback(SFEvent *sfEvent,double dTime,
89 double dDelta, FBEffects *fbEffects) const;
90 double NSNIa (double dMassT1, double dMassT2) const;
91 friend double dMSIMFSec(const SN *sn, double dMass2);
92 void pup(PUP::er& p) {
93 p|dESN;
94 p|bUseStoch;
95 p|dStochCut;
96 p|dMSNrem;
97 p|dMSNIImin;
98 p|dMSNIImax;
99 p|dMBmin;
100 p|dMBmax;
101 p|dMEjexp;
102 p|dMEjconst;
103 p|dMFeexp;
104 p|dMFeconst;
105 p|dMOxexp;
106 p|dMOxconst;
107 p|dFracBinSNIa;
108 p|iNSNIIQuantum;
109 p|pdva;
110 // p|*imf; Think about this
111 };
112
113};
114
115#endif
Class to return feedback effects.
Definition feedback.h:15
Interface class for initial mass function.
Definition imf.h:21
routines to calculate stellar lifetimes as a function of mass and metalicity.
Definition starlifetime.h:27
basic random number generator This is implemented as an object so that it can easily be used in threa...
Definition rand.h:9
Definition feedback.h:34
double NSNIa(double dMassT1, double dMassT2) const
Definition supernovaia.cpp:62
friend double dMSIMFSec(const SN *sn, double dMass2)
Definition supernovaia.cpp:36
void CalcAGORAFeedback(SFEvent *sfEvent, double dTime, double dDelta, FBEffects *fbEffects) const
Feedback algorithm to match the requirements of the AGORA project see paper 4, dataset 2 for details.
Definition supernova.cpp:33