Skip to content

Adding A New Bipropellant Mixture (WIP)

ferram4 edited this page Aug 1, 2017 · 8 revisions

Getting Started

First, get Rocket Propulsion Analysis Lite; you can use the standard version trial or purchase a full license, but the Lite version is sufficient. This program will allow you to calculate the properties that need to go in the configs for ProcEngines to function.

There is a wishlist of mixtures that we'd love to have, and even if you're dead-set on creating configs for a specific propellant combo, please check there first. Creating these configs is a fair bit of work, and if someone has already done it (or is in the process of doing it) it's better to combine efforts rather than waste time. If you're starting work on a propellant combo, please go there and make a comment so no one does unnecessary work.

Note that these instructions might seem overly specific, but it is for the purpose of getting consistent data. Please follow them exactly.

RPA Setup

Create a new engine definition and set a chamber pressure for it. Picking 4-6 MPa as a default is a good starting point, but ultimately it doesn't matter.

Under Propellant Specification select "Bipropellant" at the top and add the fuel and oxidizer species for the propellant mixture that you want. Remember to use the search tool to find the species that you want; the program can search for some common names (UDMH, RP-1) but for species with simple chemical formulas you may need to enter those (N2O4 rather than NTO).

At this point, if you know the typical O/F ratio range for this mixture enter it and jump down to Final RPA Setup, otherwise pick something around 2 as a starting point and continue to Finding Ideal O/F Range.

Finding Ideal O/F Range

Under Nozzle Flow Model and Nozzle Exit Condition set expansion area ratio to a moderate number, somewhere around 10. Check Frozen Equilibrium Flow and then set freezing at the area ratio to a small number, somewhere between 1.3 and 3.

Click Run->Start Analysis or click the Start Analysis button. Ignore the Chamber Performance tab and move to Nested Analysis. Check Component Ratio and set a start value around 0.25, an end value around 10, and a step of 0.25. Make sure to use O/F as your unit. Click Start at the bottom and allow the analysis to complete; once it has, plot the results for Component Ratio. The graph should be a plot of Isp against O/F ratio; write down the range of O/Fs with the highest Isps, and take a relatively broad range.

Once that is completed, switch back to Nozzle Flow Model and change the expansion area ratio to a large number, around 100 or even up to 250. Redo the Nested Analysis and record the new optimum O/F range. Your true ideal range will include both of these ranges.

Final RPA Engine Setup

ProcEngines can calculate out the nozzle conditions under frozen equilibrium, so now we will adjust RPA so that its nozzle exit is actually the conditions when it switches to frozen equilibrium. Under Nozzle Flow Model and Nozzle Exit Condition set expansion area ratio to whatever value you selected above for freezing at the area ratio in Finding Ideal O/F Range if you followed those steps, or select one from 1.3-3. Uncheck Frozen Equilibrium Flow.

RPA Thermo Setup for Extreme Fuel Rich Mixtures

As noted by Kauffmann et al, in "Systems Analysis of a High Thrust, Low-Cost Rocket Engine" the default thermodynamic data used by RPA is inaccurate under extreme fuel rich conditions due to excessive cracking of carbon chains into methane, ethane, their derivatives, and a lot of solid graphite. We have a tutorial on how to generate this modified database and how to swap between them.

Config Setup

We will use the (currently incomplete) kerolox config as an example config for this:

ProcEngBiPropMixture
{
    name = Kerosene_Lox        //Must have no spaces; used to allow ModuleManager to edit this if needed
    title = Kerosene + Lox     //Should be descriptive and human-readable; used for displaying to player

    fuel = Kerosene            //Must match a Resource defined in-game; config will not be loaded otherwise
    oxidizer = LqdOxygen       //Same as above

    //Main O/F ratios used by kerolox engines are for 2.0-2.8   //<- this is not required, but is a helpful reminder

    //area ratio in the nozzle where shifting equilibrium stops and isentropic flow begins
    frozenAreaRatio = 1.3      //This will be the frozen area ratio you selected earlier for the expansion ratio

    chamberOFLimitLean = 2.0   //These are the lower and upper ends of the ideal O/F range mentioned earlier
    chamberOFLimitRich = 2.8

Remember that all entries are case-sensitive.

The pressure and O/F ratio is kept in multiple MixtureRatioData blocks inside the ProcEngBiPropMixture block:

MixtureRatioData
{
    OFratio = 1.2
    PressureData
    {	//    Pc,   Tc,        Te,        Pe,     MW,      gamma,  Mach
        key = 0.25, 1736.7313, 1218.5982, 0.0574, 15.5797, 1.3216, 1.6375
        key = 1.00, 1737.6815, 1242.7578, 0.2331, 15.6702, 1.2917, 1.6473
        key = 2.00, 1739.7833, 1270.8181, 0.4739, 15.7825, 1.2820, 1.6441
        key = 4.00, 1746.7642, 1307.4224, 0.9622, 15.9462, 1.2814, 1.6371
        key = 6.00, 1755.7430, 1331.9921, 1.4532, 16.0662, 1.2842, 1.6331
        key = 8.00, 1765.3024, 1350.7030, 1.9452, 16.1623, 1.2873, 1.6306
        key = 10.0, 1774.7707, 1365.9304, 2.4377, 16.2430, 1.2900, 1.6290
        key = 15.0, 1796.6927, 1395.1354, 3.6695, 16.4037, 1.2958, 1.6266
        key = 20.0, 1815.8353, 1417.1328, 4.9032, 16.5286, 1.3002, 1.6251
        key = 25.0, 1832.6195, 1434.9029, 6.1377, 16.6318, 1.3037, 1.6241
        key = 30.0, 1847.5216, 1449.8813, 7.3729, 16.7203, 1.3067, 1.6223
        key = 40.0, 1873.0850, 1474.3015, 9.8425, 16.8678, 1.3113, 1.6223
        key = 50.0, 1894.5400, 1493.9944, 12.3158, 16.9886, 1.3147, 1.6215
    }
}

Each key must have 8 entries in it, chamber pressure, chamber temperature, nozzle exit temperature, nozzle exit pressure, nozzle exit molecular weight, nozzle exit gamma, and nozzle exit Mach. It must be organized in order of increasing chamber pressure to be loaded correctly. Each block must be organized in order of increasing O/F ratio to be loaded correctly. Each block must have the same number of keys, and they must have the same chamber pressures in each block.

Calculating Data

To generate data for the block, you will first select your desired O/F ratio in Propellant Specification. You will then select your chamber pressure in Engine Definition, and click Start Analysis. You will then go to the Chamber Performance tab, under Thermodynamic Properties and collect the necessary data for the key, as shown below:

NOTE: There are two molecular weight readouts, one labelled (MW) with numbers < 1, and one labelled (M) with numbers > 1. Take (M) since that has a greater number of significant figures.

It is also important to check the chemical products at the bottom of the Thermodynamic Properties tab to ensure there are no (or at least minimal) solids and liquids in the exhaust, since this indicates a situation that will require special handling. Solids and liquids are identified by an abbreviation in parentheses after the chemical formula (e.g. solid graphite carbon will be C(gr)). This will only occur with solid propellants or liquid propellants in the very fuel-rich or very ox-rich regions.

Recommended Procedure

Handling the Optimal O/F Range

Begin in the optimal O/F range, and leave the extreme rich and lean ratios for the end. Within the optimal O/F range calculate at intervals of 0.1-0.25 O/F (e.g. 2.0, 2.1, 2.2... / 4.0, 4.25, 4.5...). For pressures, you should take the intervals used in the example kerolox config. Anything above ~50 MPa should be taken in intervals of 25 MPa.

The above should generate sufficiently detailed information in the range where most behavior can be expected, but minimize the amount of work needed. That said, if anything in the data indicates that some behavior might be missed by this (sudden increases or decreases in MW or temp as a function of pressure) you can take more points as needed. Make a judgment call; that's why we need a person doing this rather than a computer.

This will get us data for the range of mixtures and pressures within the combustion chamber itself. The next data is needed to properly simulate the gas generator / pre-burner and gas generator exhaust properties.

Handling Extreme O/F Ratios

Begin by seeking the realistic upper end of the O/F ratio (ox-rich). Do this by selecting a representative chamber pressure in Engine Definition and then going to Propellant Specification and setting absurdly high O/F ratios while checking the Thermodynamic Properties for chamber temperatures below 600K (low enough for a cheap, uncooled turbine in a turbopump to function), for liquids in the reaction products, or a failure of the program to converge to a solution. Pick a round number that achieves this; don't go crazy finding the exact O/F ratio for either of those conditions. Collect the data as you did before for the optimal range, but with wider intervals between the O/F ratios.

Handling the low end of O/F ratios (fuel-rich) should be handled similarly, but can be more complicated due to the assumptions built into CEA (the chemical equilibrium program used by RPA). As noted above in RPA Thermo Setup for Extreme Fuel Rich Mixtures special handling is needed for this. Begin by seeking the lowest O/F ratio before the formation of solid carbon in the exhaust (O/F_carbon) and calculate data between that and the optimal range as before.

Below the ratio O/F_carbon the data will be a weighted average of the uncorrected thermo info and the corrected thermo info. Below 0.5 * O/F_carbon, the corrected thermo info should be used raw. Between 0.5 * O/F_carbon and O/F_carbon the data should be linearly interpolated between the corrected and uncorrected data. This should provide an approximate match to the real-life data.

Finishing

Once you have completed your config, make sure to tell us and make a PR so we can include it!