-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconstants.py
More file actions
200 lines (133 loc) · 6.59 KB
/
constants.py
File metadata and controls
200 lines (133 loc) · 6.59 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
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
import numpy as np
from CoolProp.CoolProp import PropsSI
# Main function
CONVERGE_TOLERANCE = 0.01 # [kg] Allowable difference between masses for Structures and Propulsion to converge
OUTPUT_PRECISION = 3 # [1] Number of digits to round outputs to
# Conversion Factors
## Pressure
PSI2PA = 6894.76 # [Pa/psi] Conversion factor from psi to Pa
PA2PSI = 1 / PSI2PA # [psi/Pa] Conversion factor from Pa to psi
ATM2PA = 101325 # [Pa/atm] Conversion factor from atm to Pa
PA2ATM = 1 / ATM2PA # [atm/Pa] Conversion factor from Pa to atm
PA2BAR = 1e-5 # [bar/Pa] Conversion factor from Pa to bar
BAR2PA = 1 / PA2BAR # [Pa/bar] Conversion factor from bar to Pa
## Temperature
RANK2KELVIN = 5 / 9 # [K/R] Conversion factor from R to K
KELVIN2RANK = 1 / RANK2KELVIN # [R/K] Conversion factor from K to R
T_AMBIENT = 290 # [K] Ambient temperature (62 F)
## Mass
LB2KG = 0.453592 # [kg/lbm] Conversion factor from lbm to kg
KG2LB = 1 / LB2KG # [lbm/kg] Conversion factor from kg to lbm
G2KG = 0.001 # [kg/g] Conversion factor from g to kg
KG2G = 1 / G2KG # [g/kg] Conversion factor from kg to g
## Length
IN2M = 0.0254 # [m/in] Conversion factor from in to m
M2IN = 1 / IN2M # [in/m] Conversion factor from m to in
M2FT = 3.28084 # [ft/m] Conversion factor from m to ft
FT2M = 1 / M2FT # [m/ft] Conversion factor from ft to m
## Area
IN22M2 = 0.0064516 # [m^2/in^2] Conversion factor from in^2 to m^2
M22IN2 = 1 / IN22M2 # [in^2/m^2] Conversion factor from m^2 to in^2
## Volume
L2M3 = 0.001 # [m^3/l] Conversion factor from L to m^3
M32L = 1 / L2M3 # [1/m^3] Conversion factor from m^3 to L
M32IN3 = 61023.7 # [in^3/m^3] Conversion factor from m^3 to in^3
IN32M3 = 1 / M32IN3 # [m^3/in^3] Conversion factor from in^3 to m^3
M32FT3 = 35.3147 # [ft^3/m^3] Conversion factor from m^3 to ft^3
FT32M3 = 1 / M32FT3 # [m^3/ft^3] Conversion factor from ft^3 to m^3
## Force
N2LBF = 0.224809 # [lbf/N] Conversion factor from N to lbf
LBF2N = 1 / N2LBF # [N/lbf] Conversion factor from lbf to N
# Speed
RPM2RADS = (2 * np.pi) / 60
# Material Properties
## 6000-Series Aluminum (https://asm.matweb.com/search/specificmaterial.asp?bassnum=ma6061t6)
DENSITY_AL = 2700 # [kg/m^3] Density
YIELD_STRENGTH_AL = 276 * 10**6 # [Pa] Yield strength
ULTIMATE_STRENGTH_AL = 310 * 10**6 # [Pa] Ultimate tensile strength
YOUNGS_MODULUS = 68.9 * 10**9 # [Pa] Modulus of elasticity
POISSON_RATIO_AL = 0.33 # [1] Poisson's ratio
## Inconel 718 (https://asm.matweb.com/search/specificmaterial.asp?bassnum=ninc34)
DENSITY_INCO = 8190 # [kg/m^3] Density
## Carbon Fiber
DENSITY_CF = 1790 # [kg/m^3] HexTow AS4 Carbon Fiber Density
## 316 Stainless Steel
DENSITY_SS316 = 7980 # [kg/m^3] Density
# Fluids Constants
VENTURI_DP_RATIO = (
1 / 1.2
) # [1] venturi outlet pressure / tank pressure, based on NASA venturi documentation & testing
MISC_DP_RATIO = (
1 / 1.15
) # [1] outlet pressure / inlet pressure from misc components, based on CMS numbers
FILM_PERCENT = 10 # [%] Percent of fuel mass flow dedicated to film cooling [WAITING ON ANDREW FOR SOURCE]
RESIDUAL_PERCENT = (
7 # [%] Percent of propellant mass dedicated to residuals, based on CMS values
)
ULLAGE_PERCENT = (
10 # [%] Percent of tank volume dedicated to ullage, based on CMS values
)
R_PROP = (
1 - ULLAGE_PERCENT / 100
) # [1] Ratio of total tank volume to total propellant volume
BURNOUT_PRESSURE_RATIO = (
2 # [1] COPV burnout pressure / tank pressure to ensure choked flow
)
K_PRESSURIZATION = 0.64 # [1] Ratio of ideal tank volume to actual tank volume, calculated based on average from past rocket designs
HE_GAS_CONSTANT = 2077.1 # [J/kgK] Helium gas constant
FILL_PRESSURE = 60 # [psi] Tank pressure during fill, based on CMS fill ops
# Prop Constants
CHAMBER_WALL_THICKNESS = 0.125 * IN2M # [in] chamber wall thickness
CHAMBER_FLANGE_WIDTH = 1 * IN2M # [m] chamber flange thickness
INJECTOR_DP_CHAMBER = (
0.2 # [1] pressure drop / chamber pressure, based on past rockets & RPE
)
REGEN_DP_CHAMBER = (
0.5 # [1] pressure drop / chamber pressure, conservatively based on RPE
)
RUNLINE_OD = 0.75 * IN2M
RUNLINE_WALL_THICKNESS = 0.065 * IN2M
# Propellant Properties
WATER_PERCENTAGE = 0 # [1] Percentage of water in the ethanol & IPA mixtures
DENSITY_ETHANOL = 785 # [kg/m^3] Ethanol density at STP (https://www.engineeringtoolbox.com/ethanol-ethyl-alcohol-properties-C2H6O-d_2027.html)
DENSITY_JET_A = 807 # [kg/m^3] Jet-A density at STP (https://www.code7700.com/pdfs/bd700_fuel_density.pdf)
DENSITY_IPA = 785 # [kg/m^3] Isopropyl alcohol density at STP (https://macro.lsu.edu/HowTo/solvents/IPA.htm)
DENSITY_METHANOL = 792 # [kg/m^3] Methanol density at STP (https://www.engineeringtoolbox.com/methanol-d_937.html)
DENSITY_WATER = 1000 # [kg/m^3] Water density at STP (https://www.engineeringtoolbox.com/water-density-specific-weight-d_595.html)
DENSITY_GASOLINE = 703 # [kg/m^3] Gasoline density at STP (https://www.engineeringtoolbox.com/gasoline-d_1592.html)
DENSITY_E98 = 794
DENSIY_ETHANOL = PropsSI("D", "T", 290, "P", 101325, "ethanol")
# Pump Constants
AVAILABLE_NPSH = (
80 * PSI2PA
) # [Pa] Pfleiderer correlation for min NPSH for LOX with 100% margin
PUMP_CHAMBER_PRESSURE = (
365 * PSI2PA
) # [Pa] Chamber pressure with pumps [BASED ON UPPER LIMIT OF TEST STAND, SHOULD ITERATE TO CONFIRM]
PUMPFED_TANK_PRESSURE = 270 * PSI2PA # [Pa] Tank pressure with pumps
MAX_POWER = 12000 # max pump power [W]
# FAR Constants
FAR_ALTITUDE = 615.09 # [m] altitude of FAR launch site
RAIL_HEIGHT = 18.29 # [m] height of the rail
# Components
BZB_COPV_VOLUME = 9 * L2M3 # [m^3] Volume of the BZB COPV (Luxfer T90A)
BZB_COPV_PRESSURE = 4950 * PSI2PA # [Pa] Maximum pressure of the BZB COPV
BZB_COPV_MASS = 5.7 # [kg] Mass of BZB COPV
BZ1_COPV_VOLUME = 4.7 * L2M3 # [m^3] Volume of the BZ1 COPV (Luxfer L45M)
BZ1_COPV_PRESSURE = 4500 * PSI2PA # [Pa] Maximum pressure of the BZ1 COPV
BZ1_COPV_MASS = 3 # [kg] Mass of BZ1 COPV
# Motor Constants (based on the Neumotors 2020 Series motor)
MOTOR_RPM = 30000 # [1/min] max RPM of pump based on neumotors 2020
MOTOR_WEIGHT = 0.660 # [kg] weight of a single motor
MOTOR_LENGTH = 0.093 # [m] length of a single motor
MOTOR_DIAMETER = 3.1 * IN2M
# LIPO Battery Constants
LIPO_CELL_MASS = 0.400 # [kg] mass of a LiPo cell
LIPO_CELL_VOLTAGE = 22.2 # [V] nominal voltage of a LiPo cell
LIPO_CELL_DISCHARGE_CURRENT = 80 # [A] maximum discharge current of a LiPo cell
# Misc
GRAVITY = 9.81 # [m/s^2] acceleration due to gravity
# Assumptions
MASS_GROWTH_FACTOR = 1 # [1] iteration growth factor [NEED TO DISCUSS]
# Fins
FIN_THICKNESS = 0.16 * IN2M # not sure if this is valid, should discuss further [m]