-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathvpkt.h
More file actions
40 lines (30 loc) · 1.2 KB
/
vpkt.h
File metadata and controls
40 lines (30 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef VPKT_H
#define VPKT_H
#include "constants.h"
#include "packet.h"
namespace vpkt {
void read_vpktparameterfile();
void init(int nts, int my_rank, bool continued_from_saved);
void call_estimators(const Packet& pkt, enum packet_type type_before_rpkt);
void write_timestep(int nts, int my_rank, bool is_final);
void remove_temp_vpkt_file(int nts, int my_rank);
constexpr int VGRID_NY = 50;
constexpr int VGRID_NZ = 50;
// FREQUENCY
// dlognu = (log(numax) - log(numin)) / VMNUBINS ~ 3.9e-4 (10'000 over 1e14-5e15 Hz)
constexpr double VSPEC_NUMIN = CLIGHT / 10000 * 1e8;
constexpr double VSPEC_NUMAX = CLIGHT / 3500 * 1e8;
constexpr int VMNUBINS = 2500;
// TIME
// dlogt = (log(globals::tmin) - log(globals::tmax)) / VMTBINS ~ 3.69e-2 (111 over 2-120 d)
constexpr double VSPEC_TIMEMIN = 3 * DAY;
constexpr double VSPEC_TIMEMAX = 8 * DAY;
constexpr int VMTBINS = 5;
// number of virtual packets in a given timestep
inline int nvpkt_created{0};
inline int nvpkt_esc_from_rpkt{0}; // electron scattering event
inline int nvpkt_esc_from_kpkt{0}; // kpkt deactivation
inline int nvpkt_esc_from_macroatom{0}; // macroatom deactivation
inline double cell_is_optically_thick_vpkt;
} // namespace vpkt
#endif // VPKT_H