Skip to content

Commit bdc8d0e

Browse files
authored
Merge pull request #5 from cuspaceflight/dev-DYER
Dev dyer
2 parents f1f69f1 + d28eabf commit bdc8d0e

File tree

11 files changed

+1063
-13
lines changed

11 files changed

+1063
-13
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/venv/
2-
/.idea/
2+
/.idea/
3+
*.pyc

README.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,27 @@
1-
# white-giant-injector
2-
A repository for m5 injector design engineers to collate code performing analysis on injector flow and efficacy.
1+
# ***OCTOPUS***
2+
3+
<img src="img/logo.png" alt="logo" width="600"/>
4+
5+
## A repository for m5 injector design engineers to collate code performing analysis on injector flow and efficacy.
6+
7+
### Eventual planned features:
8+
* Choice of SPI, HEM and Dyer (with Solomon correction) models
9+
* Compressibility corrections
10+
* Orifice types - Waxman cavitating, basic
11+
* Estimation of orifice discharge coefficients (from empirical data) (?)
12+
* Estimation of atomisation performance (from empirical data) (?)
13+
* Determine pressure drop, orifice mass flow, element O/F, overall O/F, etc with the above
14+
* Determine film cooling mass flow proportion (~20% is said to be sufficient to ignore the core O/F for temperature calculations, need to find the source for this - possibly NASA SP-8089)
15+
* Warnings for combustion stability criteria (from empirical data)
16+
* Document everything - kill two birds with one stone here and write up all the injector notes in preparation for the new wiki?
17+
18+
### Currently in progress:
19+
* Finding specific enthalpy and any other important chemical properties, transport properties
20+
* Possibly with multiple source data options / averaging / sense checks
21+
* Decisions on classes / where everything should live
22+
* Current intended structure: Injector plate --> Manifolds --> Injector elements --> Orifices
23+
24+
### Things that need fixing:
25+
* Sure this won't stay empty long...
26+
27+
SI base units used everywhere, except for possibly some final output and graphing.

dev.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
from matplotlib import pyplot as plt
2+
from numpy import linspace
3+
4+
from octopus import Fluid, Orifice, STRAIGHT
5+
6+
7+
def main():
8+
fluid = Fluid('N2O', T=250, P=18e5)
9+
orifice = Orifice(fluid, 0, 15e5, STRAIGHT, 1e-2, 1e-3)
10+
11+
P_cc = linspace(0, 19e5, 100)
12+
SPI = []
13+
HEM = []
14+
DYER = []
15+
for Pcc in P_cc:
16+
orifice.P_cc = Pcc
17+
SPI.append(orifice.m_dot_SPI())
18+
HEM.append(orifice.m_dot_HEM())
19+
DYER.append(orifice.m_dot_dyer())
20+
21+
plt.plot(P_cc, SPI, label='SPI')
22+
plt.plot(P_cc, HEM, label='HEM')
23+
plt.plot(P_cc, DYER, label='DYER')
24+
plt.xlabel('Downstream pressure (Pa)')
25+
plt.ylabel('Mass Flow Rate (kg/s)')
26+
plt.show()
27+
28+
29+
if __name__ == "__main__":
30+
main()

img/logo.png

393 KB
Loading

injector_mass_flow.py

Lines changed: 41 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,57 @@
22
import numpy as np
33

44

5-
def fuel_mass_flow():
6-
N = 1000
5+
def mdot_spi(Cd, A, n, rho, p_chamber):
6+
# Calculates and plots a single phase incompressible (SPI) approximation of the mass flow.
77

8-
Cd = 0.77 # sensible discharge coefficient
9-
A = np.pi * 0.5e-3 ** 2 # area of a 0.5mm radius orifice
10-
n = 95 # number of orifices
11-
rho = 1000 # kg/m3
12-
p_chamber = 1500000 # 1.5MPa, 15bar
8+
N = 1000
139
dp = np.linspace(0.15 * p_chamber, 0.2 * p_chamber, N) # 25-20% of chamber pressure
1410

15-
mdot = n * Cd * A * np.sqrt(2 * rho * dp) # aiming for 1.3 kg/s for fuel
11+
mdot = n * Cd * A * np.sqrt(2 * rho * dp) # aiming for 1.3 kg/s for fuel
1612

1713
ax = plt.subplot(1, 1, 1)
1814
ax.plot(dp, mdot)
1915
ax.set_xlabel("Pressure Drop [Pa]")
2016
ax.set_ylabel("Mass Flow Rate [kgs$^{-1}$]")
21-
ax.set_title("Fuel Flow Rate (Standard Model)")
17+
ax.set_title("Fuel Flow Rate (SPI)")
2218

2319
plt.show()
2420

2521

22+
def mdot_hem(A):
23+
# produces mass flow given a total area, assuming choked flow in HEM
24+
25+
h_fgo = 1000 * ((-69.8) - (-355)) # J/kg
26+
v_fgo = (1 / 40.11) - (1 / 1014.8) # m3/kg
27+
C_fo = 1915 # J/Kg.K
28+
T_o = 273 - 25 # K
29+
return (h_fgo / v_fgo) * np.power(C_fo * T_o, -0.5) * A
30+
31+
32+
def req_A(mdot):
33+
# produces the required total area for a given mass flow using HEM
34+
35+
h_fgo = 1000 * ((-69.3) - (-345)) # J/kg
36+
v_fgo = (1 / 46.82) - (1 / 995.4) # m3/kg
37+
C_fo = 1957 # J/Kg.K
38+
T_o = 273 - 20 # K
39+
return (v_fgo / h_fgo) * np.power(C_fo * T_o, 0.5) * mdot
40+
41+
42+
def delta_p(mdot, A, n, Cd, rho):
43+
return np.power(mdot / (A * n * Cd), 2) / (2 * rho)
44+
45+
2646
if __name__ == "__main__":
27-
fuel_mass_flow()
47+
Cd = 0.7 # sensible discharge coefficient
48+
A = np.pi * 0.5e-3 ** 2 # area of a 0.5mm radius orifice
49+
rho = 995.4 # kg/m3
50+
mdot = 4.1
51+
p_chamber = 1500000 # 1.5MPa, 15bar
52+
53+
# mdot_spi(Cd, A, n, rho, p_chamber)
54+
calc_A = req_A(mdot)
55+
n = int(calc_A / A)
56+
dp = delta_p(mdot, A, n, Cd, rho)
57+
print(f'required area for {mdot}kg/s: {round(calc_A, 7)}m^2. Assuming 1mm diameter, {n} orifices required')
58+
print(f'required pressure drop for {mdot}kg/s over {n} {round(A, 7)}m^2 orifices: {round(dp, 4)}Pa')

0 commit comments

Comments
 (0)