-
Notifications
You must be signed in to change notification settings - Fork 1
/
defines.hpp
89 lines (69 loc) · 2.47 KB
/
defines.hpp
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/***************************************************************************/
/* CONFIGURATION OF THE OPERATING SYSTEM */
/* */
/* If Windows platform, put a "0" */
/* If Linux, Unix or Mac platform, put a "1" */
/* */
#define PLATFORM 1 /* */
/***************************************************************************/
#include <iostream>
#include <fstream>
#include <cmath>
// #include <iomanip>
// #include <cstring>
// #include <cctype>
#include <cstdlib>
// #include <ctime>
using namespace std;
double arrondi ( double x , int n );
#define ARRONDI 1 // arrondir ou pas
#define DEBUG 0 //choose the debug (1) or normal (0) mode
#define MUTE 0 //choose 1 to avoid all screen output, 0 to have the normal display
#define EPS 1e-10 //the software "0"
// Platform-dependant declarations
#define WIN 0 /* all versions */
#define OTHER 1 /* Unix, Linux, SunOS, MacIntosh */
#define MESSAGES "runtime/messages.r"
#define RUNTIME "runtime/"
#define DATA "data/"
//useful constants
#define R 0.0821 //ideal gas constant in atm.l/mol.K
#define MAX_TEMP 3000.0 //Maximal temperature in the process
#define pi 3.14159265358979323846 //the pi number
#define MAX_DIM 30
#define MAX_STREAM 30
#define MAX_UNIT 30
//For the chemical class
#define MAX_ERROR 0
#define MAX_WARNING 10
//For the secant solver
#define TOL_SECANT 1e-8
#define MAX_ITER_SECANT 250
//For the bissection solver
#define TOL_BISSECTION 1e-8
#define MAX_ITER_BISSECTION 250
//For the Newton solver
#define TOL_NEWTON 1e-6
#define MAX_ITER_NEWTON 250
#define STEP_NEWTON 1e-3
//For the Runge-Kutta solver
#define N_INTER 250
#define MAX_ITER_RK N_INTER+1
//For the Wegstein solver
#define MIN_THETA -3.0
#define MAX_THETA 1.0
#define TOL_WEGSTEIN 1e-3
#define MAX_ITER_WEGSTEIN 50
//For the stream flashing
#define TOL_BP 1e-3
#define TOL_DP 1e-3
//For the burner
#define TOL_BURN 1e-4
//For the column
#define MAX_PLATES 500
#define MIN_PLATES 1
//For the flash
#define TOL_FLASH 1e-2
//For the cost estimtiors
#define MS_2001 1094.0
#define MS_YEAR 1139.0