Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
5f47ab0
Added some calculations for injector sizing and pressure drops etc.
astro-zilla Mar 22, 2021
c7d2baa
First classes
Mar 23, 2021
8c14aeb
__init__ for future modules
Mar 23, 2021
5742c1f
Test of module structure / thermo
Mar 23, 2021
18a8791
Iconic logo
Mar 23, 2021
0b8960a
Chemical property source implemented as thermo
Mar 23, 2021
04fc416
FluidMixture as container for thermo mixtures
Mar 23, 2021
7670919
Document FluidMixture
Mar 23, 2021
e8defe4
Add support for single fluids to manifold class
Mar 23, 2021
352c8a5
Add support for mixtures to manifold class
Mar 23, 2021
f98c2a0
Update readme with future work, tweak Manifold rho
Mar 23, 2021
c9b3db2
Merge pull request #1 from cuspaceflight/dev-injector_mass_flow
astro-zilla Mar 23, 2021
82fbd9e
Merge pull request #2 from cuspaceflight/master
astro-zilla Mar 23, 2021
5801c5c
added basic pytest implementation
astro-zilla Mar 23, 2021
7438802
Update python-app.yml
astro-zilla Mar 23, 2021
065833c
added requirements.txt
astro-zilla Mar 23, 2021
2920b9d
Merge remote-tracking branch 'origin/dev-octopus' into dev-octopus
astro-zilla Mar 23, 2021
ab840f1
Unified fluids class, add heat capacity
Mar 23, 2021
b92c720
Merge branch 'dev-octopus' of https://github.com/cuspaceflight/white-…
Mar 23, 2021
c8dfac8
Fix test broken with fluid class changes
Mar 23, 2021
5adfb18
formatting changes in octopus.main and dev, added "if main name" stru…
astro-zilla Mar 24, 2021
40aec89
added a chemical module, and a method to calculate the enthalpy of a …
astro-zilla Mar 25, 2021
5615e23
Orifice class now uses thermo.chemical.Chemical as input and as a get…
astro-zilla Mar 25, 2021
eea64d8
weird behaviour in the first few lines of dev with previous calculati…
astro-zilla Mar 26, 2021
404b779
Made Fluid inherit Chemical, and added an override of Cpl that avoids…
astro-zilla Mar 26, 2021
ed4bacd
Fixed Tests
astro-zilla Mar 26, 2021
21548e3
Merge pull request #4 from cuspaceflight/dev-Fluid-inheritance
astro-zilla Mar 26, 2021
20a4944
Improved Cpl implementation
astro-zilla Mar 27, 2021
f946cc6
Trying to create a working HEM
astro-zilla Mar 28, 2021
7cbc0e7
fixed pytest but didn't add anything
astro-zilla Mar 28, 2021
00cf7ab
Helmholz implementation - NOT FUNCTIONAL
astro-zilla Apr 2, 2021
bdc5cca
jacobian fixed
astro-zilla Apr 2, 2021
91efbf9
jacobian fixed, confirms polynomials are correct so should use them
astro-zilla Apr 2, 2021
d264d3d
Think i might have a working Helmholz EOS HEM model
astro-zilla Apr 2, 2021
d28eabf
Finished Dyer Model
astro-zilla Apr 3, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@

name: Python application

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
on: [push, pull_request]

jobs:
build:
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/venv/
/.idea/
/.idea/
*.pyc
29 changes: 27 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,27 @@
# white-giant-injector
A repository for m5 injector design engineers to collate code performing analysis on injector flow and efficacy.
# ***OCTOPUS***

<img src="img/logo.png" alt="logo" width="600"/>

## A repository for m5 injector design engineers to collate code performing analysis on injector flow and efficacy.

### Eventual planned features:
* Choice of SPI, HEM and Dyer (with Solomon correction) models
* Compressibility corrections
* Orifice types - Waxman cavitating, basic
* Estimation of orifice discharge coefficients (from empirical data) (?)
* Estimation of atomisation performance (from empirical data) (?)
* Determine pressure drop, orifice mass flow, element O/F, overall O/F, etc with the above
* 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)
* Warnings for combustion stability criteria (from empirical data)
* Document everything - kill two birds with one stone here and write up all the injector notes in preparation for the new wiki?

### Currently in progress:
* Finding specific enthalpy and any other important chemical properties, transport properties
* Possibly with multiple source data options / averaging / sense checks
* Decisions on classes / where everything should live
* Current intended structure: Injector plate --> Manifolds --> Injector elements --> Orifices

### Things that need fixing:
* Sure this won't stay empty long...

SI base units used everywhere, except for possibly some final output and graphing.
30 changes: 30 additions & 0 deletions dev.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
from matplotlib import pyplot as plt
from numpy import linspace

from octopus import Fluid, Orifice, STRAIGHT


def main():
fluid = Fluid('N2O', T=250, P=18e5)
orifice = Orifice(fluid, 0, 15e5, STRAIGHT, 1e-2, 1e-3)

P_cc = linspace(0, 19e5, 100)
SPI = []
HEM = []
DYER = []
for Pcc in P_cc:
orifice.P_cc = Pcc
SPI.append(orifice.m_dot_SPI())
HEM.append(orifice.m_dot_HEM())
DYER.append(orifice.m_dot_dyer())

plt.plot(P_cc, SPI, label='SPI')
plt.plot(P_cc, HEM, label='HEM')
plt.plot(P_cc, DYER, label='DYER')
plt.xlabel('Downstream pressure (Pa)')
plt.ylabel('Mass Flow Rate (kg/s)')
plt.show()


if __name__ == "__main__":
main()
Binary file added img/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 41 additions & 10 deletions injector_mass_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,57 @@
import numpy as np


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

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

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

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

plt.show()


def mdot_hem(A):
# produces mass flow given a total area, assuming choked flow in HEM

h_fgo = 1000 * ((-69.8) - (-355)) # J/kg
v_fgo = (1 / 40.11) - (1 / 1014.8) # m3/kg
C_fo = 1915 # J/Kg.K
T_o = 273 - 25 # K
return (h_fgo / v_fgo) * np.power(C_fo * T_o, -0.5) * A


def req_A(mdot):
# produces the required total area for a given mass flow using HEM

h_fgo = 1000 * ((-69.3) - (-345)) # J/kg
v_fgo = (1 / 46.82) - (1 / 995.4) # m3/kg
C_fo = 1957 # J/Kg.K
T_o = 273 - 20 # K
return (v_fgo / h_fgo) * np.power(C_fo * T_o, 0.5) * mdot


def delta_p(mdot, A, n, Cd, rho):
return np.power(mdot / (A * n * Cd), 2) / (2 * rho)


if __name__ == "__main__":
fuel_mass_flow()
Cd = 0.7 # sensible discharge coefficient
A = np.pi * 0.5e-3 ** 2 # area of a 0.5mm radius orifice
rho = 995.4 # kg/m3
mdot = 4.1
p_chamber = 1500000 # 1.5MPa, 15bar

# mdot_spi(Cd, A, n, rho, p_chamber)
calc_A = req_A(mdot)
n = int(calc_A / A)
dp = delta_p(mdot, A, n, Cd, rho)
print(f'required area for {mdot}kg/s: {round(calc_A, 7)}m^2. Assuming 1mm diameter, {n} orifices required')
print(f'required pressure drop for {mdot}kg/s over {n} {round(A, 7)}m^2 orifices: {round(dp, 4)}Pa')
Loading