-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCoef.hpp
50 lines (39 loc) · 1.46 KB
/
Coef.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
#pragma once
#include <iostream>
#include <cmath>
enum prop_coef {BurnRateCoef, BurnRateExponent, Density, CombustionTemperature, SpecificHeatRatio, ExchaustMolarMass, GasConstant};
enum other_coef {NumberOfGrains, NumberOfGaps, Gap, InnerDiametre, OutDiametre, Length};
double pi = 2*acos(0);
// throat diametre
double d_t = 14e-3;
// throat cross section area
double A_t = 0.25*pi*pow(d_t,2);
// exit diametre
double d_e = 37e-3;
// throat cross section area
double A_e = 0.25*pi*pow(d_e,2);
double AmbientPressure = 1e5;
double KNDX_PROPELLANT[GasConstant+1] = {
11e-6, //BurnRateCoef
0.4437, //BurnRateExponent
1783.22563, //Density
1625, //CombustionTemperature
1.1308, //SpecificHeatRatio
42.39e-3, //ExchaustMolarMass
8.314463/KNDX_PROPELLANT[ExchaustMolarMass] //GasConstant
};
double LengthOfInsulator = 362e-3;
double GRAIN[Length+1] = {
4.0, //NumberOfGrains
5.0, //NumberOfGaps
5e-3, //Gap
20e-3, //InnerDiametre
53e-3, //OutDiametre
//88e-3, // length
(LengthOfInsulator - GRAIN[NumberOfGaps]*GRAIN[Gap])/GRAIN[NumberOfGrains] //Length
};
double M_prop = GRAIN[NumberOfGrains]*3.14*GRAIN[Length]*(0.25*(pow(GRAIN[OutDiametre],2) - pow(GRAIN[InnerDiametre],2)))*KNDX_PROPELLANT[Density];
double Sy = 200e6; // Yield strength of casing material
double BurningCaseCoef = 1; //1 -> great combustion
//0 -> bad combustion
double tc = 0.001;