Beispiel #1
0
    def test_new_propellants(self):
        card_str = """
        oxid N2O4(L)   N 2 O 4   wt%=96.5
        h,cal=-4676.0     t(k)=298.15
        oxid SIO2  SI 1 O 2    wt%=3,5
        h,cal=-216000.0     t(k)=298.15  rho.g/cc=1.48
        """
        add_new_oxidizer('GelN2O4', card_str)

        # ==========
        card_str = """
        fuel CH6N2(L)  C 1     H 6     N 2     wt%=60.00
        h,cal=12900.0     t(k)=298.15   rho=.874
        fuel   AL 1   wt%=40.00
        h,cal=0.0     t(k)=298.15   rho=.1
        """
        add_new_fuel('MMH_AL', card_str)

        C = CEA_Obj(oxName="GelN2O4", fuelName="MMH_AL", fac_CR=None)
        IspODE = C.get_Isp(Pc=1850.0, MR=0.7, eps=40.0)
        self.assertAlmostEqual(IspODE, 380.83236183365057, places=3)

        # ==========
        card_str = """
        name H2O2(L) H 2 O 2  wt%=100.00
        h,cal=-44880.0     t(k)=298.15  rho.g/cc=1.407
        """
        add_new_propellant('MyProp', card_str)
        C = CEA_Obj(propName="MyProp", fac_CR=None)
        IspODE = C.get_Isp(Pc=1850.0, eps=40.0)
        self.assertAlmostEqual(IspODE, 189.9709005711723, places=3)
def createPropellant(wt1, wt2, wt3):
    card_str = """
	name H2O   H 2 O 1   wt%={:.1f}
	h,kj/mol=-285.8       t(k)=293.15
	name Methanol   C 1 H 4 O 1   wt%={:.1f}
	h,kj/mol=-239.2       t(k)=293.15
	name ADN   H 4 N 4 O 4   wt%={:.1f}
	h,kj/mol=-134.6       t(k)=293.15
	""".format(wt1, wt2, wt3)
    add_new_propellant("WaterMethanolADN_Mix", card_str)
        p1 = round((p / 20) * 19, 1)
        p2 = round((p / 20), 1)
        WT0 = j
        WT1 = k
        WT2 = p1
        WT3 = p2

        # same name runs affoul of memoized cache.
        prop_name = "Propellant"  # "prop_{0}_{1}_{2}_{3}".format(WT0, WT1, WT2, WT3)

        card_str = """
        name pbt C 37.33 H 66.73 N 24.89 O 8.48 wt%={0}
        h,cal= 36728.486 t(k)=298.15 rho=1.3
        name a3 C 2.4 H 4.1 O 3.1 N 1.3 wt%={1}
        h,cal= -46358.545 t(k)=298.15 rho=1.38
        name an N 1.0 H 4.0 N 1.0 O 3.0 wt%={2}
        h,cal= -87332.284 t(k)=298.15 rho=1.725
        name kn K 1.0 N 1.0 O 3.0 wt%={3}
        h,cal= -118167.824 t(k)=298.15 rho=2.109
        """.format(WT0, WT1, WT2, WT3)
        add_new_propellant(prop_name, card_str)

        C = CEA_Obj(propName=prop_name,
                    pressure_units='bar',
                    cstar_units='m/s',
                    temperature_units='K',
                    isp_units='N-s/kg')
        tem = C.get_Tcomb(Pc=200)

        print(prop_name, tem)
Beispiel #4
0
from rocketcea.cea_obj import CEA_Obj, add_new_fuel, add_new_oxidizer, add_new_propellant

# ==========
card_str = """
name H2O2(L) H 2 O 2  wt%=100.00
h,cal=-44880.0     t(k)=298.15  rho.g/cc=1.407
"""
add_new_propellant('MyProp', card_str)
C = CEA_Obj(propName="MyProp")

s = C.get_full_cea_output(Pc=250.0, eps=40.0, short_output=1)

print(s)
def bar2psi(bar):
    return bar * 14.504


""" define LMP-103S propellant """
card_str = """
name H2O   H 2 O 1   wt%=14.0
h,kj/mol=-285.8     t(k)=293.15
name Ammonia   N 1 H 3   wt%=4.6
h,kj/mol=-78.46      t(k)=293.15
name Methanol   C 1 H 4 O 1   wt%=18.4
h,kj/mol=-239.2      t(k)=293.15
name ADN   H 4 N 4 O 4   wt%=63.0
h,kj/mol=-134.6       t(k)=293.15
"""
add_new_propellant("LMP103S", card_str)
""" define AF-M315E propellant """
card_str = """
name H2O   H 2 O 1   wt%=11.0
h,kj/mol=-285.8     t(k)=293.15
name HAN   H 4 N 2 O 4   wt%=44.5
h,kj/mol=-366.52      t(k)=293.15
name HEHN   C 2 H 9 N 3 O 4   wt%=44.5
h,kj/mol=-486.00      t(k)=293.15
"""
add_new_propellant("AFM315E", card_str)
""" define PeroxideWater98 propellant """
card_str = """
name H2O   H 2 O 1   wt%=2.0
h,kj/mol=-285.5     t(k)=293.15
name H2O2   H 2 O 2   wt%=98.0