├── Configs ├── 8D74.cfg ├── A-1.cfg ├── Aestus-II.cfg ├── Aestus.cfg ├── Cycle Analysis │ ├── 11D33.cfg │ ├── BE-4.cfg │ ├── Example_1.cfg │ ├── Example_2.cfg │ ├── FFSC.cfg │ ├── FFSC_25_MPa.cfg │ ├── FFSC_40_MPa.cfg │ ├── FFSC_50_MPa.cfg │ ├── Merlin-1D.cfg │ ├── RD-170.cfg │ ├── RD-170_2.cfg │ ├── RD-170_2GG.cfg │ ├── RD-275.cfg │ ├── Raptor.cfg │ ├── Raptor_SL.cfg │ ├── SSME.cfg │ ├── SSME_FFSC.cfg │ ├── SSME_single_preburner.cfg │ └── Vulcain-2.cfg ├── H2O2.cfg ├── H2O2_sintin.cfg ├── HM-7B.cfg ├── LOX_CH4.cfg ├── LOX_LH.cfg ├── NK-33.cfg ├── P80.cfg ├── Pentaborane + H.peroxide-water solution 98%_Example.cfg ├── RD-0146.cfg ├── RD-107MM.cfg ├── RD-161.cfg ├── RD-170.cfg ├── RD-170_altitude.cfg ├── RD-275.cfg ├── RL10 B2.cfg ├── RL10A3-3A.cfg ├── SSME.cfg ├── Thermal Analysis │ ├── Aestus.cfg │ ├── HeatTransfer.cfg │ ├── HeatTransfer_2.cfg │ ├── SSME_40k.cfg │ └── SSME_40k_c.cfg ├── Thermal Propulsion │ ├── H2O_1000K.cfg │ ├── H2O_2000K.cfg │ └── H2O_3000K.cfg ├── VIKING 4B.cfg ├── VIKING 4B_2.cfg ├── Validation │ ├── test_case_1.cfg │ ├── test_case_2.cfg │ ├── test_case_3.cfg │ ├── test_case_4.cfg │ └── test_case_5.cfg ├── Vinci.cfg ├── Vulcain-2.cfg ├── Vulcain.cfg └── peregrine.cfg ├── README.md ├── SDK ├── build │ ├── common.mk │ ├── cycle_analysis.mk │ ├── cycle_analysis_2.mk │ ├── example1.mk │ ├── example2.mk │ ├── example3.mk │ ├── example4.mk │ ├── example5.mk │ ├── example6.mk │ ├── example_chamber.mk │ ├── example_performance1.mk │ ├── example_performance2.mk │ ├── example_performance3.mk │ ├── example_performance4.mk │ ├── example_wrapper.mk │ ├── linux.mk │ ├── linux32.mk │ ├── linux64.mk │ ├── thermal_analysis.mk │ ├── win32.mk │ ├── win64.mk │ ├── windows.mk │ └── wrapper.dll.manifest.xml └── src │ ├── chamber.cpp │ ├── common.cpp │ ├── common.hpp │ ├── cycle_analysis.cpp │ ├── cycle_analysis_2.cpp │ ├── example1.cpp │ ├── example2.cpp │ ├── example3.cpp │ ├── example4.cpp │ ├── example5.cpp │ ├── example6.cpp │ ├── performance1.cpp │ ├── performance2.cpp │ ├── performance3.cpp │ ├── performance4.cpp │ ├── thermal_analysis.cpp │ ├── wrapper.cpp │ ├── wrapper.h │ ├── wrapper_client.cpp │ ├── wrapper_client_1.py │ ├── wrapper_client_2.py │ └── wrapper_client_3.py ├── Scripts ├── H2OL_thermo.js ├── RD-170-conf.js ├── RD-170-conf2.js ├── RD-170.js ├── RD-275-conf.js ├── RD-275-conf2.js ├── RD-275-conf3.js ├── RD-275.js ├── SSME-conf.js ├── SSME.js ├── Vulcain-2-conf.js ├── Vulcain-2-conf2.js ├── Vulcain-2.js ├── frozen.js ├── gg_cycle.js ├── mixture.js ├── nested_analysis1.js ├── nested_analysis2.js ├── nozzle.js ├── performance1.js ├── performance2.js ├── performance3.js ├── performance4.js ├── performance5.js ├── propellant.js ├── propellant_analysis.js ├── reaction.js ├── reaction_products.js └── utils.js └── Wrapper ├── lite ├── Makefile_gcc ├── Makefile_win ├── wrapper_client.cpp ├── wrapper_client_1.py ├── wrapper_client_2.py └── wrapper_client_3.py └── standard ├── Makefile_gcc ├── Makefile_win ├── Octave ├── rpa.cpp └── test-rpa.m ├── wrapper_client.cpp ├── wrapper_client_1.py ├── wrapper_client_2.py ├── wrapper_client_3.py ├── wrapper_client_4.py └── wrapper_client_5.py /Configs/8D74.cfg: -------------------------------------------------------------------------------- 1 | version = 1.2; 2 | name = "8D74"; 3 | info = "Test case for RD-107"; 4 | generalOptions : 5 | { 6 | multiphase = true; 7 | ions = true; 8 | flowSeparation = true; 9 | }; 10 | combustionChamberConditions : 11 | { 12 | pressure : 13 | { 14 | value = 5.85; 15 | unit = "MPa"; 16 | }; 17 | }; 18 | nozzleFlow : 19 | { 20 | calculateNozzleFlow = true; 21 | nozzleInletConditions : 22 | { 23 | contractionAreaRatio = 6.73; 24 | }; 25 | nozzleExitConditions : 26 | { 27 | areaRatio = 18.86; 28 | supersonic = true; 29 | }; 30 | nozzleStations = ( ); 31 | }; 32 | propellant : 33 | { 34 | components : 35 | { 36 | ratio : 37 | { 38 | value = 2.51; 39 | unit = "O/F"; 40 | }; 41 | oxidizer = ( 42 | { 43 | name = "O2(L)"; 44 | massFraction = 1.0; 45 | p : 46 | { 47 | value = 5.85; 48 | unit = "MPa"; 49 | }; 50 | } ); 51 | fuel = ( 52 | { 53 | name = "RG-1"; 54 | massFraction = 1.0; 55 | p : 56 | { 57 | value = 5.85; 58 | unit = "MPa"; 59 | }; 60 | } ); 61 | }; 62 | }; 63 | engineSize : 64 | { 65 | chambersNo = 1; 66 | }; 67 | propelantFeedSystem : 68 | { 69 | }; 70 | -------------------------------------------------------------------------------- /Configs/A-1.cfg: -------------------------------------------------------------------------------- 1 | version = 1.1; 2 | name = "A-1"; 3 | info = "A-1"; 4 | generalOptions : 5 | { 6 | multiphase = true; 7 | ions = true; 8 | flowSeparation = true; 9 | }; 10 | combustionChamberConditions : 11 | { 12 | pressure : 13 | { 14 | value = 1095.0; 15 | unit = "psi"; 16 | }; 17 | }; 18 | nozzleFlow : 19 | { 20 | calculateNozzleFlow = true; 21 | nozzleInletConditions : 22 | { 23 | contractionAreaRatio = 1.6; 24 | }; 25 | nozzleExitConditions : 26 | { 27 | areaRatio = 14.0; 28 | }; 29 | }; 30 | propellant : 31 | { 32 | components : 33 | { 34 | ratio : 35 | { 36 | value = 2.35; 37 | unit = "O/F"; 38 | }; 39 | oxidizer = ( 40 | { 41 | name = "O2(L)"; 42 | massFraction = 1.0; 43 | p : 44 | { 45 | value = 0.0; 46 | unit = "MPa"; 47 | }; 48 | } ); 49 | fuel = ( 50 | { 51 | name = "RP-1"; 52 | massFraction = 1.0; 53 | p : 54 | { 55 | value = 0.0; 56 | unit = "MPa"; 57 | }; 58 | } ); 59 | }; 60 | }; 61 | engineSize : 62 | { 63 | thrust : 64 | { 65 | value = 747000.0; 66 | unit = "lbf"; 67 | }; 68 | ambientConditions : 69 | { 70 | value = 1.0; 71 | unit = "atm"; 72 | }; 73 | chambersNo = 1; 74 | chamberGeometry : 75 | { 76 | length : 77 | { 78 | value = 45.0; 79 | unit = "in"; 80 | }; 81 | characteristicLength = true; 82 | contractionAngle = 20.0; 83 | R1_to_Rt_ratio = 0.75; 84 | Rn_to_Rt_ratio = 0.191; 85 | R2_to_R2max_ratio = 0.4; 86 | initialAngle = 27.4; 87 | exitAngle = 9.8; 88 | }; 89 | }; 90 | propelantFeedSystem : 91 | { 92 | }; 93 | -------------------------------------------------------------------------------- /Configs/Aestus-II.cfg: -------------------------------------------------------------------------------- 1 | version = 1.2; 2 | name = "Aestus II / RS 72"; 3 | info = "http://cs.astrium.eads.net/sp/launcher-propulsion/rocket-engines/aestus-rs72-rocket-engine.html"; 4 | generalOptions : 5 | { 6 | multiphase = true; 7 | ions = true; 8 | flowSeparation = true; 9 | }; 10 | combustionChamberConditions : 11 | { 12 | pressure : 13 | { 14 | value = 60.0; 15 | unit = "bar"; 16 | }; 17 | }; 18 | nozzleFlow : 19 | { 20 | calculateNozzleFlow = true; 21 | freezingConditions : 22 | { 23 | calculate = true; 24 | expansionRatio = 1.3; 25 | }; 26 | nozzleInletConditions : 27 | { 28 | contractionAreaRatio = 2.3843; 29 | }; 30 | nozzleExitConditions : 31 | { 32 | areaRatio = 300.0; 33 | supersonic = true; 34 | }; 35 | nozzleStations = ( ); 36 | }; 37 | propellant : 38 | { 39 | components : 40 | { 41 | ratio : 42 | { 43 | value = 2.0; 44 | unit = "O/F"; 45 | }; 46 | oxidizer = ( 47 | { 48 | name = "N2O4(L)"; 49 | massFraction = 1.0; 50 | p : 51 | { 52 | value = 0.0; 53 | unit = "MPa"; 54 | }; 55 | } ); 56 | fuel = ( 57 | { 58 | name = "CH6N2(L)"; 59 | massFraction = 1.0; 60 | p : 61 | { 62 | value = 0.0; 63 | unit = "MPa"; 64 | }; 65 | } ); 66 | }; 67 | }; 68 | engineSize : 69 | { 70 | thrust : 71 | { 72 | value = 55.4; 73 | unit = "kN"; 74 | }; 75 | ambientConditions : 76 | { 77 | value = 0.0; 78 | unit = "atm"; 79 | }; 80 | chambersNo = 1; 81 | chamberGeometry : 82 | { 83 | length : 84 | { 85 | value = 0.31; 86 | unit = "m"; 87 | }; 88 | characteristicLength = false; 89 | contractionAngle = 35.0; 90 | R1_to_Rt_ratio = 0.8; 91 | Rn_to_Rt_ratio = 0.382; 92 | R2_to_R2max_ratio = 1.0; 93 | TOC = true; 94 | Tw_to_T0 = 0.4; 95 | }; 96 | }; 97 | propelantFeedSystem : 98 | { 99 | }; 100 | -------------------------------------------------------------------------------- /Configs/Aestus.cfg: -------------------------------------------------------------------------------- 1 | version = 1.2; 2 | name = "Aestus"; 3 | info = "Test case"; 4 | generalOptions : 5 | { 6 | multiphase = true; 7 | ions = true; 8 | flowSeparation = true; 9 | }; 10 | combustionChamberConditions : 11 | { 12 | pressure : 13 | { 14 | value = 10.3; 15 | unit = "bar"; 16 | }; 17 | }; 18 | nozzleFlow : 19 | { 20 | calculateNozzleFlow = true; 21 | nozzleInletConditions : 22 | { 23 | contractionAreaRatio = 2.3843; 24 | }; 25 | nozzleExitConditions : 26 | { 27 | areaRatio = 84.0; 28 | supersonic = true; 29 | }; 30 | efficiencies : 31 | { 32 | nozzle = 0.98246; 33 | }; 34 | nozzleStations = ( ); 35 | }; 36 | propellant : 37 | { 38 | components : 39 | { 40 | ratio : 41 | { 42 | value = 2.05; 43 | unit = "O/F"; 44 | }; 45 | oxidizer = ( 46 | { 47 | name = "N2O4(L)"; 48 | massFraction = 1.0; 49 | p : 50 | { 51 | value = 0.0; 52 | unit = "MPa"; 53 | }; 54 | } ); 55 | fuel = ( 56 | { 57 | name = "CH6N2(L)"; 58 | massFraction = 1.0; 59 | p : 60 | { 61 | value = 0.0; 62 | unit = "MPa"; 63 | }; 64 | } ); 65 | }; 66 | }; 67 | engineSize : 68 | { 69 | throatDiameter : 70 | { 71 | value = 136.0; 72 | unit = "mm"; 73 | }; 74 | chambersNo = 1; 75 | chamberGeometry : 76 | { 77 | length : 78 | { 79 | value = 0.31; 80 | unit = "m"; 81 | }; 82 | characteristicLength = false; 83 | contractionAngle = 35.0; 84 | R1_to_Rt_ratio = 0.8; 85 | Rn_to_Rt_ratio = 0.382; 86 | R2_to_R2max_ratio = 1.0; 87 | TOC = true; 88 | }; 89 | }; 90 | chamberCooling : 91 | { 92 | heatTransfer : 93 | { 94 | relationsType = "Ievlev"; 95 | applyBLC = false; 96 | numberOfStations = 75; 97 | }; 98 | chamberCoolingSections = ( 99 | { 100 | channelJacketDesign : 101 | { 102 | location : 103 | { 104 | value = 0.0; 105 | unit = "mm"; 106 | }; 107 | length : 108 | { 109 | value = 0.0; 110 | unit = "m"; 111 | }; 112 | wallThickness : 113 | { 114 | value = 0.7; 115 | unit = "mm"; 116 | }; 117 | wallConductivity : 118 | { 119 | value = 300.0; 120 | unit = "W/(m K)"; 121 | }; 122 | coolant = ( 123 | { 124 | name = "CH6N2(L)"; 125 | massFraction = 1.0; 126 | T : 127 | { 128 | value = 298.0; 129 | unit = "K"; 130 | }; 131 | p : 132 | { 133 | value = 18.0; 134 | unit = "bar"; 135 | }; 136 | } ); 137 | flowrate = 0.328; 138 | oppositeFlow = true; 139 | height1 : 140 | { 141 | value = 3.0; 142 | unit = "mm"; 143 | }; 144 | height2 : 145 | { 146 | value = 2.0; 147 | unit = "mm"; 148 | }; 149 | gamma : 150 | { 151 | value = 0.0; 152 | unit = "degrees"; 153 | }; 154 | a1 : 155 | { 156 | value = 2.0; 157 | unit = "mm"; 158 | }; 159 | a2 : 160 | { 161 | value = 4.0; 162 | unit = "mm"; 163 | }; 164 | n = 120; 165 | }; 166 | }, 167 | { 168 | radiationCooling : 169 | { 170 | location : 171 | { 172 | value = 591.0; 173 | unit = "mm"; 174 | }; 175 | length : 176 | { 177 | value = 0.0; 178 | unit = "m"; 179 | }; 180 | wallThickness : 181 | { 182 | value = 1.5; 183 | unit = "mm"; 184 | }; 185 | wallConductivity : 186 | { 187 | value = 50.0; 188 | unit = "W/(m K)"; 189 | }; 190 | coldSideWallSurfaceEmissivity = 0.75; 191 | }; 192 | } ); 193 | filmSlots = ( ); 194 | }; 195 | propelantFeedSystem : 196 | { 197 | }; 198 | -------------------------------------------------------------------------------- /Configs/Cycle Analysis/11D33.cfg: -------------------------------------------------------------------------------- 1 | version = 1.2; 2 | name = "11D33"; 3 | info = "Test case for 11D33"; 4 | generalOptions : 5 | { 6 | multiphase = true; 7 | ions = true; 8 | flowSeparation = true; 9 | }; 10 | combustionChamberConditions : 11 | { 12 | pressure : 13 | { 14 | value = 5.37; 15 | unit = "MPa"; 16 | }; 17 | }; 18 | nozzleFlow : 19 | { 20 | calculateNozzleFlow = true; 21 | freezingConditions : 22 | { 23 | calculate = true; 24 | expansionRatio = 1.3; 25 | }; 26 | nozzleInletConditions : 27 | { 28 | contractionAreaRatio = 2.6; 29 | }; 30 | nozzleExitConditions : 31 | { 32 | pressure : 33 | { 34 | value = 0.0053; 35 | unit = "MPa"; 36 | }; 37 | }; 38 | nozzleStations = ( ); 39 | }; 40 | propellant : 41 | { 42 | components : 43 | { 44 | ratio : 45 | { 46 | value = 2.4; 47 | unit = "O/F"; 48 | }; 49 | oxidizer = ( 50 | { 51 | name = "O2(L)"; 52 | massFraction = 1.0; 53 | T : 54 | { 55 | value = 80.0; 56 | unit = "K"; 57 | }; 58 | p : 59 | { 60 | value = 1.0; 61 | unit = "kg/cm2"; 62 | }; 63 | } ); 64 | fuel = ( 65 | { 66 | name = "RP-1"; 67 | massFraction = 1.0; 68 | p : 69 | { 70 | value = 0.101325; 71 | unit = "MPa"; 72 | }; 73 | } ); 74 | }; 75 | }; 76 | engineSize : 77 | { 78 | thrust : 79 | { 80 | value = 66.7; 81 | unit = "kN"; 82 | }; 83 | ambientConditions : 84 | { 85 | value = 0.0; 86 | unit = "atm"; 87 | }; 88 | chambersNo = 1; 89 | chamberGeometry : 90 | { 91 | length : 92 | { 93 | value = 1079.6; 94 | unit = "mm"; 95 | }; 96 | characteristicLength = true; 97 | contractionAngle = 30.0; 98 | R1_to_Rt_ratio = 1.5; 99 | Rn_to_Rt_ratio = 0.382; 100 | R2_to_R2max_ratio = 0.5; 101 | TOC = true; 102 | }; 103 | }; 104 | propelantFeedSystem : 105 | { 106 | turbopumpFeedSystem : 107 | { 108 | cycle = "staged combustion"; 109 | oxidizerFeedSystem : 110 | { 111 | inletPressure : 112 | { 113 | value = 0.8; 114 | unit = "MPa"; 115 | }; 116 | inletVelocity : 117 | { 118 | value = 5.0; 119 | unit = "m/s"; 120 | }; 121 | pumpEfficiency = 0.74; 122 | valvePressureDrop : 123 | { 124 | value = 1.0; 125 | unit = "MPa"; 126 | }; 127 | injectorPressureDrop : 128 | { 129 | value = 0.7; 130 | unit = "MPa"; 131 | }; 132 | branches = ( ); 133 | }; 134 | fuelFeedSystem : 135 | { 136 | inletPressure : 137 | { 138 | value = 0.75; 139 | unit = "MPa"; 140 | }; 141 | inletVelocity : 142 | { 143 | value = 5.0; 144 | unit = "m/s"; 145 | }; 146 | pumpEfficiency = 0.74; 147 | valvePressureDrop : 148 | { 149 | value = 1.0; 150 | unit = "MPa"; 151 | }; 152 | coolingPressureDrop : 153 | { 154 | value = 3.0; 155 | unit = "MPa"; 156 | }; 157 | injectorPressureDrop : 158 | { 159 | value = 0.7; 160 | unit = "MPa"; 161 | }; 162 | branches = ( ); 163 | }; 164 | gasGenerators = ( 165 | { 166 | ggType = "oxidizer-rich"; 167 | pressure : 168 | { 169 | value = 0.0; 170 | unit = "MPa"; 171 | }; 172 | sigma = 0.95; 173 | maxTemperature : 174 | { 175 | value = 673.15; 176 | unit = "K"; 177 | }; 178 | fuelFeedSystem : 179 | { 180 | name = ""; 181 | areaRatio = 0.3; 182 | valvePressureDrop : 183 | { 184 | value = 1.0; 185 | unit = "MPa"; 186 | }; 187 | fixedPressureDrop : 188 | { 189 | value = 1.0; 190 | unit = "MPa"; 191 | }; 192 | injectorPressureDrop : 193 | { 194 | value = 0.7; 195 | unit = "MPa"; 196 | }; 197 | }; 198 | } ); 199 | turbines = ( 200 | { 201 | ggType = "serial"; 202 | turbinePressureRatio = 2.0; 203 | turbineEfficiency = 0.79; 204 | rotationalSpeed : 205 | { 206 | value = 24000.0; 207 | unit = "rpm"; 208 | }; 209 | } ); 210 | }; 211 | estimateDryMass = true; 212 | }; 213 | -------------------------------------------------------------------------------- /Configs/Cycle Analysis/BE-4.cfg: -------------------------------------------------------------------------------- 1 | version = 1.2; 2 | name = "BE-4"; 3 | info = "Blue Origin BE-4"; 4 | generalOptions : 5 | { 6 | multiphase = true; 7 | ions = true; 8 | flowSeparation = true; 9 | }; 10 | combustionChamberConditions : 11 | { 12 | pressure : 13 | { 14 | value = 13.4; 15 | unit = "MPa"; 16 | }; 17 | }; 18 | nozzleFlow : 19 | { 20 | calculateNozzleFlow = true; 21 | nozzleInletConditions : 22 | { 23 | contractionAreaRatio = 2.9; 24 | }; 25 | nozzleExitConditions : 26 | { 27 | areaRatio = 21.5; 28 | supersonic = true; 29 | }; 30 | nozzleStations = ( ); 31 | }; 32 | propellant : 33 | { 34 | components : 35 | { 36 | ratio : 37 | { 38 | value = 3.4; 39 | unit = "optimal"; 40 | }; 41 | oxidizer = ( 42 | { 43 | name = "O2(L)"; 44 | massFraction = 1.0; 45 | T : 46 | { 47 | value = 80.0; 48 | unit = "K"; 49 | }; 50 | p : 51 | { 52 | value = 0.8; 53 | unit = "MPa"; 54 | }; 55 | } ); 56 | fuel = ( 57 | { 58 | name = "CH4(L)"; 59 | massFraction = 1.0; 60 | T : 61 | { 62 | value = 110.0; 63 | unit = "K"; 64 | }; 65 | p : 66 | { 67 | value = 0.35; 68 | unit = "MPa"; 69 | }; 70 | } ); 71 | }; 72 | }; 73 | engineSize : 74 | { 75 | thrust : 76 | { 77 | value = 2447.0; 78 | unit = "kN"; 79 | }; 80 | ambientConditions : 81 | { 82 | value = 1.0; 83 | unit = "atm"; 84 | }; 85 | chambersNo = 1; 86 | chamberGeometry : 87 | { 88 | length : 89 | { 90 | value = 800.0; 91 | unit = "mm"; 92 | }; 93 | characteristicLength = true; 94 | contractionAngle = 40.0; 95 | R1_to_Rt_ratio = 0.5; 96 | Rn_to_Rt_ratio = 0.382; 97 | R2_to_R2max_ratio = 0.2; 98 | TOC = true; 99 | }; 100 | }; 101 | propelantFeedSystem : 102 | { 103 | turbopumpFeedSystem : 104 | { 105 | cycle = "staged combustion"; 106 | oxidizerFeedSystem : 107 | { 108 | inletPressure : 109 | { 110 | value = 0.8; 111 | unit = "MPa"; 112 | }; 113 | inletVelocity : 114 | { 115 | value = 5.0; 116 | unit = "m/s"; 117 | }; 118 | pumpEfficiency = 0.65; 119 | valvePressureDrop : 120 | { 121 | value = 2.5; 122 | unit = "MPa"; 123 | }; 124 | injectorPressureDrop : 125 | { 126 | value = 1.5; 127 | unit = "MPa"; 128 | }; 129 | branches = ( ); 130 | }; 131 | fuelFeedSystem : 132 | { 133 | inletPressure : 134 | { 135 | value = 0.35; 136 | unit = "MPa"; 137 | }; 138 | inletVelocity : 139 | { 140 | value = 5.0; 141 | unit = "m/s"; 142 | }; 143 | pumpEfficiency = 0.68; 144 | valvePressureDrop : 145 | { 146 | value = 2.5; 147 | unit = "MPa"; 148 | }; 149 | coolingPressureDrop : 150 | { 151 | value = 3.0; 152 | unit = "MPa"; 153 | }; 154 | injectorPressureDrop : 155 | { 156 | value = 1.5; 157 | unit = "MPa"; 158 | }; 159 | branches = ( ); 160 | }; 161 | gasGenerators = ( 162 | { 163 | ggType = "oxidizer-rich"; 164 | pressure : 165 | { 166 | value = 0.0; 167 | unit = "MPa"; 168 | }; 169 | sigma = 0.95; 170 | maxTemperature : 171 | { 172 | value = 700.0; 173 | unit = "K"; 174 | }; 175 | fuelFeedSystem : 176 | { 177 | name = ""; 178 | areaRatio = 0.3; 179 | pumpEfficiency = 0.55; 180 | valvePressureDrop : 181 | { 182 | value = 2.5; 183 | unit = "MPa"; 184 | }; 185 | fixedPressureDrop : 186 | { 187 | value = 2.0; 188 | unit = "MPa"; 189 | }; 190 | injectorPressureDrop : 191 | { 192 | value = 1.5; 193 | unit = "MPa"; 194 | }; 195 | }; 196 | } ); 197 | turbines = ( 198 | { 199 | ggType = "serial"; 200 | turbinePressureRatio = 2.0; 201 | turbineEfficiency = 0.68; 202 | rotationalSpeed : 203 | { 204 | value = 20000.0; 205 | unit = "rpm"; 206 | }; 207 | } ); 208 | }; 209 | estimateDryMass = true; 210 | }; 211 | -------------------------------------------------------------------------------- /Configs/Cycle Analysis/Example_1.cfg: -------------------------------------------------------------------------------- 1 | version = 1.2; 2 | name = "Example"; 3 | info = "Example prepared for http://www.propulsion-analysis.com/docs/howto/cycle_analysis_1.htm"; 4 | generalOptions : 5 | { 6 | multiphase = true; 7 | ions = true; 8 | flowSeparation = true; 9 | }; 10 | combustionChamberConditions : 11 | { 12 | pressure : 13 | { 14 | value = 20.0; 15 | unit = "MPa"; 16 | }; 17 | }; 18 | nozzleFlow : 19 | { 20 | calculateNozzleFlow = true; 21 | freezingConditions : 22 | { 23 | calculate = true; 24 | expansionRatio = 1.3; 25 | }; 26 | nozzleInletConditions : 27 | { 28 | contractionAreaRatio = 2.6; 29 | }; 30 | nozzleExitConditions : 31 | { 32 | pressure : 33 | { 34 | value = 0.05; 35 | unit = "MPa"; 36 | }; 37 | }; 38 | nozzleStations = ( ); 39 | }; 40 | propellant : 41 | { 42 | components : 43 | { 44 | ratio : 45 | { 46 | value = 2.63; 47 | unit = "O/F"; 48 | }; 49 | oxidizer = ( 50 | { 51 | name = "O2(L)"; 52 | massFraction = 1.0; 53 | T : 54 | { 55 | value = 80.0; 56 | unit = "K"; 57 | }; 58 | p : 59 | { 60 | value = 1.0; 61 | unit = "kg/cm2"; 62 | }; 63 | } ); 64 | fuel = ( 65 | { 66 | name = "RP-1"; 67 | massFraction = 1.0; 68 | p : 69 | { 70 | value = 0.101325; 71 | unit = "MPa"; 72 | }; 73 | } ); 74 | }; 75 | }; 76 | engineSize : 77 | { 78 | thrust : 79 | { 80 | value = 200.0; 81 | unit = "kN"; 82 | }; 83 | ambientConditions : 84 | { 85 | value = 0.0; 86 | unit = "atm"; 87 | }; 88 | chambersNo = 1; 89 | chamberGeometry : 90 | { 91 | length : 92 | { 93 | value = 1100.0; 94 | unit = "mm"; 95 | }; 96 | characteristicLength = true; 97 | contractionAngle = 30.0; 98 | R1_to_Rt_ratio = 1.5; 99 | Rn_to_Rt_ratio = 0.382; 100 | R2_to_R2max_ratio = 0.5; 101 | TOC = true; 102 | }; 103 | }; 104 | propelantFeedSystem : 105 | { 106 | turbopumpFeedSystem : 107 | { 108 | cycle = "staged combustion"; 109 | oxidizerFeedSystem : 110 | { 111 | inletPressure : 112 | { 113 | value = 0.8; 114 | unit = "MPa"; 115 | }; 116 | inletVelocity : 117 | { 118 | value = 5.0; 119 | unit = "m/s"; 120 | }; 121 | pumpEfficiency = 0.74; 122 | valvePressureDrop : 123 | { 124 | value = 5.0; 125 | unit = "MPa"; 126 | }; 127 | injectorPressureDrop : 128 | { 129 | value = 2.5; 130 | unit = "MPa"; 131 | }; 132 | branches = ( ); 133 | }; 134 | fuelFeedSystem : 135 | { 136 | inletPressure : 137 | { 138 | value = 0.75; 139 | unit = "MPa"; 140 | }; 141 | inletVelocity : 142 | { 143 | value = 5.0; 144 | unit = "m/s"; 145 | }; 146 | pumpEfficiency = 0.74; 147 | valvePressureDrop : 148 | { 149 | value = 3.0; 150 | unit = "MPa"; 151 | }; 152 | coolingPressureDrop : 153 | { 154 | value = 10.0; 155 | unit = "MPa"; 156 | }; 157 | injectorPressureDrop : 158 | { 159 | value = 2.5; 160 | unit = "MPa"; 161 | }; 162 | branches = ( ); 163 | }; 164 | gasGenerators = ( 165 | { 166 | ggType = "oxidizer-rich"; 167 | pressure : 168 | { 169 | value = 0.0; 170 | unit = "MPa"; 171 | }; 172 | sigma = 0.9; 173 | maxTemperature : 174 | { 175 | value = 772.0; 176 | unit = "K"; 177 | }; 178 | fuelFeedSystem : 179 | { 180 | name = ""; 181 | areaRatio = 0.3; 182 | pumpEfficiency = 0.7; 183 | valvePressureDrop : 184 | { 185 | value = 1.0; 186 | unit = "MPa"; 187 | }; 188 | injectorPressureDrop : 189 | { 190 | value = 2.5; 191 | unit = "MPa"; 192 | }; 193 | }; 194 | } ); 195 | turbines = ( 196 | { 197 | ggType = "serial"; 198 | turbinePressureRatio = 2.0; 199 | turbineEfficiency = 0.79; 200 | rotationalSpeed : 201 | { 202 | value = 0.0; 203 | unit = "rpm"; 204 | }; 205 | } ); 206 | }; 207 | estimateDryMass = false; 208 | }; 209 | -------------------------------------------------------------------------------- /Configs/Cycle Analysis/Example_2.cfg: -------------------------------------------------------------------------------- 1 | version = 1.2; 2 | name = "Example"; 3 | info = "Example prepared for http://www.propulsion-analysis.com/docs/howto/cycle_analysis_1.htm"; 4 | generalOptions : 5 | { 6 | multiphase = true; 7 | ions = true; 8 | flowSeparation = true; 9 | }; 10 | combustionChamberConditions : 11 | { 12 | pressure : 13 | { 14 | value = 20.0; 15 | unit = "MPa"; 16 | }; 17 | }; 18 | nozzleFlow : 19 | { 20 | calculateNozzleFlow = true; 21 | freezingConditions : 22 | { 23 | calculate = true; 24 | expansionRatio = 1.3; 25 | }; 26 | nozzleInletConditions : 27 | { 28 | contractionAreaRatio = 2.6; 29 | }; 30 | nozzleExitConditions : 31 | { 32 | pressure : 33 | { 34 | value = 0.05; 35 | unit = "MPa"; 36 | }; 37 | }; 38 | nozzleStations = ( ); 39 | }; 40 | propellant : 41 | { 42 | components : 43 | { 44 | ratio : 45 | { 46 | value = 2.63; 47 | unit = "O/F"; 48 | }; 49 | oxidizer = ( 50 | { 51 | name = "O2(L)"; 52 | massFraction = 1.0; 53 | T : 54 | { 55 | value = 80.0; 56 | unit = "K"; 57 | }; 58 | p : 59 | { 60 | value = 1.0; 61 | unit = "kg/cm2"; 62 | }; 63 | } ); 64 | fuel = ( 65 | { 66 | name = "RP-1"; 67 | massFraction = 1.0; 68 | p : 69 | { 70 | value = 0.101325; 71 | unit = "MPa"; 72 | }; 73 | } ); 74 | }; 75 | }; 76 | engineSize : 77 | { 78 | thrust : 79 | { 80 | value = 200.0; 81 | unit = "kN"; 82 | }; 83 | ambientConditions : 84 | { 85 | value = 0.0; 86 | unit = "atm"; 87 | }; 88 | chambersNo = 1; 89 | chamberGeometry : 90 | { 91 | length : 92 | { 93 | value = 1100.0; 94 | unit = "mm"; 95 | }; 96 | characteristicLength = true; 97 | contractionAngle = 30.0; 98 | R1_to_Rt_ratio = 1.5; 99 | Rn_to_Rt_ratio = 0.382; 100 | R2_to_R2max_ratio = 0.5; 101 | TOC = true; 102 | }; 103 | }; 104 | propelantFeedSystem : 105 | { 106 | turbopumpFeedSystem : 107 | { 108 | cycle = "staged combustion"; 109 | oxidizerFeedSystem : 110 | { 111 | inletPressure : 112 | { 113 | value = 0.8; 114 | unit = "MPa"; 115 | }; 116 | inletVelocity : 117 | { 118 | value = 5.0; 119 | unit = "m/s"; 120 | }; 121 | pumpEfficiency = 0.74; 122 | valvePressureDrop : 123 | { 124 | value = 3.5; 125 | unit = "MPa"; 126 | }; 127 | injectorPressureDrop : 128 | { 129 | value = 2.0; 130 | unit = "MPa"; 131 | }; 132 | branches = ( ); 133 | }; 134 | fuelFeedSystem : 135 | { 136 | inletPressure : 137 | { 138 | value = 0.75; 139 | unit = "MPa"; 140 | }; 141 | inletVelocity : 142 | { 143 | value = 5.0; 144 | unit = "m/s"; 145 | }; 146 | pumpEfficiency = 0.74; 147 | valvePressureDrop : 148 | { 149 | value = 3.0; 150 | unit = "MPa"; 151 | }; 152 | coolingPressureDrop : 153 | { 154 | value = 7.0; 155 | unit = "MPa"; 156 | }; 157 | injectorPressureDrop : 158 | { 159 | value = 2.0; 160 | unit = "MPa"; 161 | }; 162 | branches = ( ); 163 | }; 164 | gasGenerators = ( 165 | { 166 | ggType = "oxidizer-rich"; 167 | pressure : 168 | { 169 | value = 0.0; 170 | unit = "MPa"; 171 | }; 172 | sigma = 0.9; 173 | maxTemperature : 174 | { 175 | value = 770.0; 176 | unit = "K"; 177 | }; 178 | fuelFeedSystem : 179 | { 180 | name = ""; 181 | areaRatio = 0.3; 182 | pumpEfficiency = 0.7; 183 | valvePressureDrop : 184 | { 185 | value = 1.0; 186 | unit = "MPa"; 187 | }; 188 | injectorPressureDrop : 189 | { 190 | value = 2.0; 191 | unit = "MPa"; 192 | }; 193 | }; 194 | } ); 195 | turbines = ( 196 | { 197 | ggType = "serial"; 198 | turbinePressureRatio = 2.0; 199 | turbineEfficiency = 0.79; 200 | rotationalSpeed : 201 | { 202 | value = 0.0; 203 | unit = "rpm"; 204 | }; 205 | } ); 206 | }; 207 | estimateDryMass = false; 208 | }; 209 | -------------------------------------------------------------------------------- /Configs/Cycle Analysis/Merlin-1D.cfg: -------------------------------------------------------------------------------- 1 | version = 1.2; 2 | name = ""; 3 | info = ""; 4 | generalOptions : 5 | { 6 | multiphase = true; 7 | ions = true; 8 | flowSeparation = true; 9 | }; 10 | combustionChamberConditions : 11 | { 12 | pressure : 13 | { 14 | value = 98.9; 15 | unit = "kg/cm2"; 16 | }; 17 | }; 18 | nozzleFlow : 19 | { 20 | calculateNozzleFlow = true; 21 | freezingConditions : 22 | { 23 | calculate = true; 24 | expansionRatio = 1.3; 25 | }; 26 | nozzleExitConditions : 27 | { 28 | areaRatio = 14.8; 29 | supersonic = true; 30 | }; 31 | nozzleStations = ( ); 32 | }; 33 | propellant : 34 | { 35 | components : 36 | { 37 | ratio : 38 | { 39 | value = 2.4; 40 | unit = "O/F"; 41 | }; 42 | oxidizer = ( 43 | { 44 | name = "O2(L)"; 45 | massFraction = 1.0; 46 | p : 47 | { 48 | value = 0.0; 49 | unit = "MPa"; 50 | }; 51 | } ); 52 | fuel = ( 53 | { 54 | name = "RP-1"; 55 | massFraction = 1.0; 56 | p : 57 | { 58 | value = 0.0; 59 | unit = "MPa"; 60 | }; 61 | } ); 62 | }; 63 | }; 64 | engineSize : 65 | { 66 | thrust : 67 | { 68 | value = 66300.0; 69 | unit = "kg"; 70 | }; 71 | ambientConditions : 72 | { 73 | value = 1.0; 74 | unit = "atm"; 75 | }; 76 | chambersNo = 1; 77 | chamberGeometry : 78 | { 79 | length : 80 | { 81 | value = 1.0; 82 | unit = "m"; 83 | }; 84 | characteristicLength = true; 85 | contractionAngle = 30.0; 86 | R1_to_Rt_ratio = 1.5; 87 | Rn_to_Rt_ratio = 0.382; 88 | R2_to_R2max_ratio = 0.5; 89 | TOC = true; 90 | Tw_to_T0 = 0.4; 91 | }; 92 | }; 93 | propelantFeedSystem : 94 | { 95 | turbopumpFeedSystem : 96 | { 97 | cycle = "gas generator"; 98 | oxidizerFeedSystem : 99 | { 100 | inletPressure : 101 | { 102 | value = 5.0; 103 | unit = "kg/cm2"; 104 | }; 105 | inletVelocity : 106 | { 107 | value = 5.0; 108 | unit = "m/s"; 109 | }; 110 | pumpEfficiency = 0.8; 111 | valvePressureDrop : 112 | { 113 | value = 10.0; 114 | unit = "kg/cm2"; 115 | }; 116 | injectorPressureDrop : 117 | { 118 | value = 4.0; 119 | unit = "kg/cm2"; 120 | }; 121 | branches = ( ); 122 | }; 123 | fuelFeedSystem : 124 | { 125 | inletPressure : 126 | { 127 | value = 5.0; 128 | unit = "kg/cm2"; 129 | }; 130 | inletVelocity : 131 | { 132 | value = 5.0; 133 | unit = "m/s"; 134 | }; 135 | pumpEfficiency = 0.8; 136 | valvePressureDrop : 137 | { 138 | value = 10.0; 139 | unit = "kg/cm2"; 140 | }; 141 | coolingPressureDrop : 142 | { 143 | value = 25.0; 144 | unit = "kg/cm2"; 145 | }; 146 | injectorPressureDrop : 147 | { 148 | value = 4.0; 149 | unit = "kg/cm2"; 150 | }; 151 | branches = ( ); 152 | }; 153 | gasGenerators = ( 154 | { 155 | ggType = "fuel-rich"; 156 | pressure : 157 | { 158 | value = 84.0; 159 | unit = "kg/cm2"; 160 | }; 161 | sigma = 0.9; 162 | maxTemperature : 163 | { 164 | value = 1100.0; 165 | unit = "K"; 166 | }; 167 | oxidizerFeedSystem : 168 | { 169 | name = ""; 170 | }; 171 | fuelFeedSystem : 172 | { 173 | name = ""; 174 | }; 175 | } ); 176 | turbines = ( 177 | { 178 | ggType = "serial"; 179 | turbinePressureRatio = 20.0; 180 | turbineEfficiency = 0.8; 181 | rotationalSpeed : 182 | { 183 | value = 18000.0; 184 | unit = "rpm"; 185 | }; 186 | } ); 187 | }; 188 | estimateDryMass = true; 189 | }; 190 | -------------------------------------------------------------------------------- /Configs/Cycle Analysis/RD-275.cfg: -------------------------------------------------------------------------------- 1 | version = 1.2; 2 | name = "RD-275"; 3 | info = "Test case for RD-275"; 4 | generalOptions : 5 | { 6 | multiphase = true; 7 | ions = true; 8 | flowSeparation = true; 9 | }; 10 | combustionChamberConditions : 11 | { 12 | pressure : 13 | { 14 | value = 15.7; 15 | unit = "MPa"; 16 | }; 17 | }; 18 | nozzleFlow : 19 | { 20 | calculateNozzleFlow = true; 21 | freezingConditions : 22 | { 23 | calculate = true; 24 | expansionRatio = 1.3; 25 | }; 26 | nozzleInletConditions : 27 | { 28 | contractionAreaRatio = 1.54; 29 | }; 30 | nozzleExitConditions : 31 | { 32 | areaRatio = 26.2; 33 | supersonic = true; 34 | }; 35 | ambientConditions : 36 | { 37 | minPressure : 38 | { 39 | value = 1.0; 40 | unit = "atm"; 41 | }; 42 | maxPressure : 43 | { 44 | value = 0.05; 45 | unit = "atm"; 46 | }; 47 | calculateDeliveredPerformance = false; 48 | }; 49 | nozzleStations = ( 50 | { 51 | stationConditions : 52 | { 53 | areaRatio = 20.0; 54 | supersonic = true; 55 | }; 56 | } ); 57 | }; 58 | propellant : 59 | { 60 | components : 61 | { 62 | ratio : 63 | { 64 | value = 2.67; 65 | unit = "O/F"; 66 | }; 67 | oxidizer = ( 68 | { 69 | name = "N2O4(L)"; 70 | massFraction = 1.0; 71 | p : 72 | { 73 | value = 101325.0; 74 | unit = "Pa"; 75 | }; 76 | } ); 77 | fuel = ( 78 | { 79 | name = "C2H8N2(L),UDMH"; 80 | massFraction = 1.0; 81 | p : 82 | { 83 | value = 101325.0; 84 | unit = "Pa"; 85 | }; 86 | } ); 87 | }; 88 | }; 89 | engineSize : 90 | { 91 | thrust : 92 | { 93 | value = 1747.0; 94 | unit = "kN"; 95 | }; 96 | ambientConditions : 97 | { 98 | value = 0.0; 99 | unit = "atm"; 100 | }; 101 | chambersNo = 1; 102 | chamberGeometry : 103 | { 104 | length : 105 | { 106 | value = 1.0; 107 | unit = "m"; 108 | }; 109 | characteristicLength = true; 110 | contractionAngle = 30.0; 111 | R1_to_Rt_ratio = 1.5; 112 | Rn_to_Rt_ratio = 0.382; 113 | R2_to_R2max_ratio = 0.5; 114 | TOC = true; 115 | }; 116 | }; 117 | propelantFeedSystem : 118 | { 119 | turbopumpFeedSystem : 120 | { 121 | cycle = "staged combustion"; 122 | oxidizerFeedSystem : 123 | { 124 | inletPressure : 125 | { 126 | value = 0.3; 127 | unit = "MPa"; 128 | }; 129 | inletVelocity : 130 | { 131 | value = 5.0; 132 | unit = "m/s"; 133 | }; 134 | pumpEfficiency = 0.7; 135 | valvePressureDrop : 136 | { 137 | value = 2.0; 138 | unit = "MPa"; 139 | }; 140 | injectorPressureDrop : 141 | { 142 | value = 1.0; 143 | unit = "MPa"; 144 | }; 145 | branches = ( ); 146 | }; 147 | fuelFeedSystem : 148 | { 149 | inletPressure : 150 | { 151 | value = 0.3; 152 | unit = "MPa"; 153 | }; 154 | inletVelocity : 155 | { 156 | value = 5.0; 157 | unit = "m/s"; 158 | }; 159 | pumpEfficiency = 0.7; 160 | valvePressureDrop : 161 | { 162 | value = 2.0; 163 | unit = "MPa"; 164 | }; 165 | coolingPressureDrop : 166 | { 167 | value = 5.0; 168 | unit = "MPa"; 169 | }; 170 | injectorPressureDrop : 171 | { 172 | value = 1.0; 173 | unit = "MPa"; 174 | }; 175 | branches = ( ); 176 | }; 177 | gasGenerators = ( 178 | { 179 | ggType = "oxidizer-rich"; 180 | pressure : 181 | { 182 | value = 0.0; 183 | unit = "MPa"; 184 | }; 185 | sigma = 0.9; 186 | maxTemperature : 187 | { 188 | value = 800.0; 189 | unit = "K"; 190 | }; 191 | fuelFeedSystem : 192 | { 193 | name = ""; 194 | areaRatio = 0.3; 195 | pumpEfficiency = 0.7; 196 | valvePressureDrop : 197 | { 198 | value = 1.0; 199 | unit = "MPa"; 200 | }; 201 | injectorPressureDrop : 202 | { 203 | value = 0.5; 204 | unit = "MPa"; 205 | }; 206 | }; 207 | } ); 208 | turbines = ( 209 | { 210 | ggType = "serial"; 211 | turbinePressureRatio = 2.0; 212 | turbineEfficiency = 0.74; 213 | rotationalSpeed : 214 | { 215 | value = 13800.0; 216 | unit = "rpm"; 217 | }; 218 | } ); 219 | }; 220 | estimateDryMass = true; 221 | }; 222 | -------------------------------------------------------------------------------- /Configs/Cycle Analysis/Vulcain-2.cfg: -------------------------------------------------------------------------------- 1 | version = 1.2; 2 | name = "Vulcain-2"; 3 | info = "http://cs.astrium.eads.net/sp/launcher-propulsion/rocket-engines/vulcain-2-rocket-engine.html"; 4 | generalOptions : 5 | { 6 | multiphase = true; 7 | ions = true; 8 | flowSeparation = true; 9 | }; 10 | combustionChamberConditions : 11 | { 12 | pressure : 13 | { 14 | value = 117.3; 15 | unit = "bar"; 16 | }; 17 | }; 18 | nozzleFlow : 19 | { 20 | calculateNozzleFlow = true; 21 | freezingConditions : 22 | { 23 | calculate = true; 24 | expansionRatio = 1.3; 25 | }; 26 | nozzleInletConditions : 27 | { 28 | contractionAreaRatio = 2.3843; 29 | }; 30 | nozzleExitConditions : 31 | { 32 | areaRatio = 58.2; 33 | supersonic = true; 34 | }; 35 | nozzleStations = ( ); 36 | }; 37 | propellant : 38 | { 39 | components : 40 | { 41 | ratio : 42 | { 43 | value = 6.7; 44 | unit = "O/F"; 45 | }; 46 | oxidizer = ( 47 | { 48 | name = "O2(L)"; 49 | massFraction = 1.0; 50 | p : 51 | { 52 | value = 0.0; 53 | unit = "MPa"; 54 | }; 55 | } ); 56 | fuel = ( 57 | { 58 | name = "H2(L)"; 59 | massFraction = 1.0; 60 | p : 61 | { 62 | value = 0.0; 63 | unit = "MPa"; 64 | }; 65 | } ); 66 | }; 67 | }; 68 | engineSize : 69 | { 70 | thrust : 71 | { 72 | value = 1359.0; 73 | unit = "kN"; 74 | }; 75 | ambientConditions : 76 | { 77 | value = 0.0; 78 | unit = "atm"; 79 | }; 80 | chambersNo = 1; 81 | chamberGeometry : 82 | { 83 | length : 84 | { 85 | value = 0.31; 86 | unit = "m"; 87 | }; 88 | characteristicLength = false; 89 | contractionAngle = 35.0; 90 | R1_to_Rt_ratio = 0.8; 91 | Rn_to_Rt_ratio = 0.382; 92 | R2_to_R2max_ratio = 1.0; 93 | TOC = true; 94 | Tw_to_T0 = 0.4; 95 | }; 96 | }; 97 | propelantFeedSystem : 98 | { 99 | turbopumpFeedSystem : 100 | { 101 | cycle = "gas generator"; 102 | oxidizerFeedSystem : 103 | { 104 | inletPressure : 105 | { 106 | value = 0.7; 107 | unit = "MPa"; 108 | }; 109 | inletVelocity : 110 | { 111 | value = 5.0; 112 | unit = "m/s"; 113 | }; 114 | pumpEfficiency = 0.7; 115 | valvePressureDrop : 116 | { 117 | value = 0.5; 118 | unit = "MPa"; 119 | }; 120 | injectorPressureDrop : 121 | { 122 | value = 0.5; 123 | unit = "MPa"; 124 | }; 125 | branches = ( ); 126 | }; 127 | fuelFeedSystem : 128 | { 129 | inletPressure : 130 | { 131 | value = 0.3; 132 | unit = "MPa"; 133 | }; 134 | inletVelocity : 135 | { 136 | value = 5.0; 137 | unit = "m/s"; 138 | }; 139 | pumpEfficiency = 0.7; 140 | valvePressureDrop : 141 | { 142 | value = 0.5; 143 | unit = "MPa"; 144 | }; 145 | coolingPressureDrop : 146 | { 147 | value = 5.0; 148 | unit = "MPa"; 149 | }; 150 | injectorPressureDrop : 151 | { 152 | value = 0.5; 153 | unit = "MPa"; 154 | }; 155 | branches = ( ); 156 | }; 157 | gasGenerators = ( 158 | { 159 | ggType = "fuel-rich"; 160 | pressure : 161 | { 162 | value = 10.1; 163 | unit = "MPa"; 164 | }; 165 | sigma = 0.9; 166 | maxTemperature : 167 | { 168 | value = 875.0; 169 | unit = "K"; 170 | }; 171 | oxidizerFeedSystem : 172 | { 173 | name = ""; 174 | areaRatio = 0.3; 175 | valvePressureDrop : 176 | { 177 | value = 1.0; 178 | unit = "MPa"; 179 | }; 180 | injectorPressureDrop : 181 | { 182 | value = 0.5; 183 | unit = "MPa"; 184 | }; 185 | }; 186 | fuelFeedSystem : 187 | { 188 | name = ""; 189 | areaRatio = 0.3; 190 | valvePressureDrop : 191 | { 192 | value = 1.0; 193 | unit = "MPa"; 194 | }; 195 | injectorPressureDrop : 196 | { 197 | value = 0.5; 198 | unit = "MPa"; 199 | }; 200 | }; 201 | } ); 202 | turbines = ( 203 | { 204 | ggType = "serial"; 205 | turbinePressureRatio = 12.0; 206 | turbineEfficiency = 0.7; 207 | rotationalSpeed : 208 | { 209 | value = 12600.0; 210 | unit = "rpm"; 211 | }; 212 | }, 213 | { 214 | ggType = "parallel"; 215 | turbinePressureRatio = 18.0; 216 | turbineEfficiency = 0.7; 217 | rotationalSpeed : 218 | { 219 | value = 35500.0; 220 | unit = "rpm"; 221 | }; 222 | } ); 223 | }; 224 | estimateDryMass = true; 225 | }; 226 | -------------------------------------------------------------------------------- /Configs/H2O2.cfg: -------------------------------------------------------------------------------- 1 | version = 1.0; 2 | name = "H2O2"; 3 | info = "Test case for monopropellant rocket engine with conical nozzle"; 4 | generalOptions : 5 | { 6 | multiphase = true; 7 | ions = true; 8 | }; 9 | combustionChamberConditions : 10 | { 11 | pressure : 12 | { 13 | value = 4.0; 14 | unit = "MPa"; 15 | }; 16 | }; 17 | nozzleFlow : 18 | { 19 | calculateNozzleFlow = true; 20 | freezingConditions : 21 | { 22 | calculate = true; 23 | expansionRatio = 1.3; 24 | }; 25 | nozzleInletConditions : 26 | { 27 | contractionAreaRatio = 4.0; 28 | }; 29 | nozzleExitConditions : 30 | { 31 | pressure : 32 | { 33 | value = 0.8; 34 | unit = "atm"; 35 | }; 36 | }; 37 | efficiencies : 38 | { 39 | nozzleHalfAngle = 15.0; 40 | }; 41 | ambientConditions : 42 | { 43 | pressure : 44 | { 45 | value = 0.7; 46 | unit = "atm"; 47 | }; 48 | }; 49 | }; 50 | propellant : 51 | { 52 | mixture : 53 | { 54 | species = ( 55 | { 56 | name = "H2O2(L)"; 57 | massFraction = 1.0; 58 | } ); 59 | }; 60 | }; 61 | -------------------------------------------------------------------------------- /Configs/H2O2_sintin.cfg: -------------------------------------------------------------------------------- 1 | version = 1.1; 2 | name = ""; 3 | info = ""; 4 | generalOptions : 5 | { 6 | multiphase = true; 7 | ions = true; 8 | }; 9 | combustionChamberConditions : 10 | { 11 | pressure : 12 | { 13 | value = 1.0; 14 | unit = "MPa"; 15 | }; 16 | }; 17 | nozzleFlow : 18 | { 19 | calculateNozzleFlow = true; 20 | nozzleExitConditions : 21 | { 22 | pressure : 23 | { 24 | value = 0.01; 25 | unit = "atm"; 26 | }; 27 | }; 28 | }; 29 | propellant : 30 | { 31 | components : 32 | { 33 | ratio : 34 | { 35 | value = 8.0; 36 | unit = "km"; 37 | }; 38 | oxidizer = ( 39 | { 40 | name = "H2O2(L),85%"; 41 | massFraction = 1.0; 42 | } ); 43 | fuel = ( 44 | { 45 | name = "C10H16(L)"; 46 | massFraction = 1.0; 47 | } ); 48 | }; 49 | }; 50 | engineSize : 51 | { 52 | chambersNo = 1; 53 | }; 54 | -------------------------------------------------------------------------------- /Configs/HM-7B.cfg: -------------------------------------------------------------------------------- 1 | version = 1.2; 2 | name = "HM-7B"; 3 | info = "http://cs.astrium.eads.net/sp/launcher-propulsion/rocket-engines/hm7b-rocket-engine.html"; 4 | generalOptions : 5 | { 6 | multiphase = true; 7 | ions = true; 8 | flowSeparation = true; 9 | }; 10 | combustionChamberConditions : 11 | { 12 | pressure : 13 | { 14 | value = 37.0; 15 | unit = "bar"; 16 | }; 17 | }; 18 | nozzleFlow : 19 | { 20 | calculateNozzleFlow = true; 21 | freezingConditions : 22 | { 23 | calculate = true; 24 | expansionRatio = 1.3; 25 | }; 26 | nozzleInletConditions : 27 | { 28 | contractionAreaRatio = 2.3843; 29 | }; 30 | nozzleExitConditions : 31 | { 32 | areaRatio = 83.1; 33 | supersonic = true; 34 | }; 35 | nozzleStations = ( ); 36 | }; 37 | propellant : 38 | { 39 | components : 40 | { 41 | ratio : 42 | { 43 | value = 5.0; 44 | unit = "O/F"; 45 | }; 46 | oxidizer = ( 47 | { 48 | name = "O2(L)"; 49 | massFraction = 1.0; 50 | p : 51 | { 52 | value = 0.0; 53 | unit = "MPa"; 54 | }; 55 | } ); 56 | fuel = ( 57 | { 58 | name = "H2(L)"; 59 | massFraction = 1.0; 60 | p : 61 | { 62 | value = 0.0; 63 | unit = "MPa"; 64 | }; 65 | } ); 66 | }; 67 | }; 68 | engineSize : 69 | { 70 | thrust : 71 | { 72 | value = 64.8; 73 | unit = "kN"; 74 | }; 75 | ambientConditions : 76 | { 77 | value = 0.0; 78 | unit = "atm"; 79 | }; 80 | chambersNo = 1; 81 | chamberGeometry : 82 | { 83 | length : 84 | { 85 | value = 0.31; 86 | unit = "m"; 87 | }; 88 | characteristicLength = false; 89 | contractionAngle = 35.0; 90 | R1_to_Rt_ratio = 0.8; 91 | Rn_to_Rt_ratio = 0.382; 92 | R2_to_R2max_ratio = 1.0; 93 | TOC = true; 94 | Tw_to_T0 = 0.4; 95 | }; 96 | }; 97 | propelantFeedSystem : 98 | { 99 | }; 100 | -------------------------------------------------------------------------------- /Configs/LOX_CH4.cfg: -------------------------------------------------------------------------------- 1 | version = 1.1; 2 | name = "RD-170"; 3 | info = "Test case for RD-170"; 4 | generalOptions : 5 | { 6 | multiphase = true; 7 | ions = true; 8 | }; 9 | combustionChamberConditions : 10 | { 11 | pressure : 12 | { 13 | value = 1.5; 14 | unit = "MPa"; 15 | }; 16 | }; 17 | nozzleFlow : 18 | { 19 | calculateNozzleFlow = true; 20 | nozzleExitConditions : 21 | { 22 | areaRatio = 70.0; 23 | }; 24 | }; 25 | propellant : 26 | { 27 | components : 28 | { 29 | ratio : 30 | { 31 | value = 1.3; 32 | unit = "km"; 33 | }; 34 | oxidizer = ( 35 | { 36 | name = "O2(L)"; 37 | massFraction = 1.0; 38 | p : 39 | { 40 | value = 1.0; 41 | unit = "kg/cm2"; 42 | }; 43 | } ); 44 | fuel = ( 45 | { 46 | name = "CH4(L)"; 47 | massFraction = 1.0; 48 | p : 49 | { 50 | value = 0.0; 51 | unit = "MPa"; 52 | }; 53 | } ); 54 | }; 55 | }; 56 | engineSize : 57 | { 58 | thrust : 59 | { 60 | value = 10.0; 61 | unit = "kN"; 62 | }; 63 | ambientConditions : 64 | { 65 | value = 0.0; 66 | unit = "atm"; 67 | }; 68 | chambersNo = 1; 69 | chamberGeometry : 70 | { 71 | length : 72 | { 73 | value = 1.0; 74 | unit = "m"; 75 | }; 76 | contractionAngle = 30.0; 77 | R1_to_Rt_ratio = 1.5; 78 | Rn_to_Rt_ratio = 0.382; 79 | R2_to_R2max_ratio = 0.5; 80 | TOC = false; 81 | }; 82 | }; 83 | propelantFeedSystem : 84 | { 85 | }; 86 | -------------------------------------------------------------------------------- /Configs/LOX_LH.cfg: -------------------------------------------------------------------------------- 1 | version = 1.2; 2 | name = "LOX+LH"; 3 | info = "Test case"; 4 | generalOptions : 5 | { 6 | multiphase = true; 7 | ions = true; 8 | flowSeparation = true; 9 | }; 10 | combustionChamberConditions : 11 | { 12 | pressure : 13 | { 14 | value = 200.0; 15 | unit = "bar"; 16 | }; 17 | }; 18 | nozzleFlow : 19 | { 20 | calculateNozzleFlow = true; 21 | freezingConditions : 22 | { 23 | calculate = true; 24 | expansionRatio = 1.1; 25 | }; 26 | nozzleExitConditions : 27 | { 28 | areaRatio = 300.0; 29 | supersonic = true; 30 | }; 31 | nozzleStations = ( ); 32 | }; 33 | propellant : 34 | { 35 | components : 36 | { 37 | ratio : 38 | { 39 | value = 7.0; 40 | unit = "O/F"; 41 | }; 42 | oxidizer = ( 43 | { 44 | name = "O2(L)"; 45 | massFraction = 1.0; 46 | p : 47 | { 48 | value = 1.0; 49 | unit = "kg/cm2"; 50 | }; 51 | } ); 52 | fuel = ( 53 | { 54 | name = "H2(L)"; 55 | massFraction = 1.0; 56 | p : 57 | { 58 | value = 0.0; 59 | unit = "MPa"; 60 | }; 61 | } ); 62 | }; 63 | }; 64 | engineSize : 65 | { 66 | chambersNo = 1; 67 | }; 68 | propelantFeedSystem : 69 | { 70 | }; 71 | -------------------------------------------------------------------------------- /Configs/NK-33.cfg: -------------------------------------------------------------------------------- 1 | version = 1.2; 2 | name = "NK-33"; 3 | info = ""; 4 | generalOptions : 5 | { 6 | multiphase = true; 7 | ions = true; 8 | flowSeparation = true; 9 | }; 10 | combustionChamberConditions : 11 | { 12 | pressure : 13 | { 14 | value = 14.55; 15 | unit = "MPa"; 16 | }; 17 | }; 18 | nozzleFlow : 19 | { 20 | calculateNozzleFlow = true; 21 | freezingConditions : 22 | { 23 | calculate = true; 24 | expansionRatio = 1.3; 25 | }; 26 | nozzleInletConditions : 27 | { 28 | contractionAreaRatio = 2.3843; 29 | }; 30 | nozzleExitConditions : 31 | { 32 | pressure : 33 | { 34 | value = 0.049; 35 | unit = "MPa"; 36 | }; 37 | }; 38 | nozzleStations = ( ); 39 | }; 40 | propellant : 41 | { 42 | components : 43 | { 44 | ratio : 45 | { 46 | value = 2.57; 47 | unit = "O/F"; 48 | }; 49 | oxidizer = ( 50 | { 51 | name = "O2(L)"; 52 | massFraction = 1.0; 53 | p : 54 | { 55 | value = 0.0; 56 | unit = "MPa"; 57 | }; 58 | } ); 59 | fuel = ( 60 | { 61 | name = "RG-1"; 62 | massFraction = 1.0; 63 | p : 64 | { 65 | value = 0.0; 66 | unit = "MPa"; 67 | }; 68 | } ); 69 | }; 70 | }; 71 | engineSize : 72 | { 73 | thrust : 74 | { 75 | value = 1510.0; 76 | unit = "kN"; 77 | }; 78 | ambientConditions : 79 | { 80 | value = 1.0; 81 | unit = "atm"; 82 | }; 83 | chambersNo = 1; 84 | chamberGeometry : 85 | { 86 | length : 87 | { 88 | value = 0.31; 89 | unit = "m"; 90 | }; 91 | characteristicLength = false; 92 | contractionAngle = 35.0; 93 | R1_to_Rt_ratio = 0.8; 94 | Rn_to_Rt_ratio = 0.382; 95 | R2_to_R2max_ratio = 1.0; 96 | TOC = true; 97 | Tw_to_T0 = 0.4; 98 | }; 99 | }; 100 | propelantFeedSystem : 101 | { 102 | }; 103 | -------------------------------------------------------------------------------- /Configs/P80.cfg: -------------------------------------------------------------------------------- 1 | version = 1.1; 2 | name = "P80"; 3 | info = "VEGA 1st Stage Engine"; 4 | generalOptions : 5 | { 6 | multiphase = true; 7 | ions = false; 8 | flowSeparation = true; 9 | }; 10 | combustionChamberConditions : 11 | { 12 | pressure : 13 | { 14 | value = 9.5; 15 | unit = "MPa"; 16 | }; 17 | }; 18 | nozzleFlow : 19 | { 20 | calculateNozzleFlow = true; 21 | nozzleExitConditions : 22 | { 23 | areaRatio = 16.0; 24 | }; 25 | }; 26 | propellant : 27 | { 28 | components : 29 | { 30 | ratio : 31 | { 32 | value = 2.2258; 33 | unit = "O/F"; 34 | }; 35 | oxidizer = ( 36 | { 37 | name = "NH4CLO4(I)"; 38 | massFraction = 1.0; 39 | p : 40 | { 41 | value = 0.0; 42 | unit = "MPa"; 43 | }; 44 | } ); 45 | fuel = ( 46 | { 47 | name = "AL(cr)"; 48 | massFraction = 0.6129; 49 | p : 50 | { 51 | value = 0.0; 52 | unit = "MPa"; 53 | }; 54 | }, 55 | { 56 | name = "HTPB+Curative"; 57 | massFraction = 0.3871; 58 | p : 59 | { 60 | value = 0.0; 61 | unit = "MPa"; 62 | }; 63 | } ); 64 | }; 65 | }; 66 | engineSize : 67 | { 68 | throatDiameter : 69 | { 70 | value = 10.0; 71 | unit = "mm"; 72 | }; 73 | chambersNo = 1; 74 | chamberGeometry : 75 | { 76 | length : 77 | { 78 | value = 1.0; 79 | unit = "m"; 80 | }; 81 | characteristicLength = true; 82 | contractionAngle = 30.0; 83 | R1_to_Rt_ratio = 1.5; 84 | Rn_to_Rt_ratio = 0.382; 85 | R2_to_R2max_ratio = 0.5; 86 | initialAngle = 15.0; 87 | }; 88 | }; 89 | propelantFeedSystem : 90 | { 91 | }; 92 | -------------------------------------------------------------------------------- /Configs/Pentaborane + H.peroxide-water solution 98%_Example.cfg: -------------------------------------------------------------------------------- 1 | version = 1.2; 2 | name = "Pentaborane + H.peroxide-water solution 98%_Example"; 3 | info = ""; 4 | generalOptions : 5 | { 6 | multiphase = true; 7 | ions = true; 8 | flowSeparation = true; 9 | }; 10 | combustionChamberConditions : 11 | { 12 | pressure : 13 | { 14 | value = 10.0; 15 | unit = "MPa"; 16 | }; 17 | }; 18 | nozzleFlow : 19 | { 20 | calculateNozzleFlow = true; 21 | nozzleExitConditions : 22 | { 23 | pressure : 24 | { 25 | value = 0.06; 26 | unit = "MPa"; 27 | }; 28 | }; 29 | nozzleStations = ( ); 30 | }; 31 | propellant : 32 | { 33 | components : 34 | { 35 | ratio : 36 | { 37 | value = 5.7; 38 | unit = "optimal"; 39 | }; 40 | oxidizer = ( 41 | { 42 | name = "H2O2(L),98%"; 43 | massFraction = 1.0; 44 | p : 45 | { 46 | value = 0.0; 47 | unit = "MPa"; 48 | }; 49 | } ); 50 | fuel = ( 51 | { 52 | name = "B5H9(L)"; 53 | massFraction = 1.0; 54 | p : 55 | { 56 | value = 0.0; 57 | unit = "MPa"; 58 | }; 59 | } ); 60 | }; 61 | }; 62 | engineSize : 63 | { 64 | chambersNo = 1; 65 | }; 66 | propelantFeedSystem : 67 | { 68 | estimateDryMass = false; 69 | }; 70 | -------------------------------------------------------------------------------- /Configs/RD-0146.cfg: -------------------------------------------------------------------------------- 1 | version = 1.2; 2 | name = "RD-0146"; 3 | info = ""; 4 | generalOptions : 5 | { 6 | multiphase = true; 7 | ions = true; 8 | flowSeparation = true; 9 | }; 10 | combustionChamberConditions : 11 | { 12 | pressure : 13 | { 14 | value = 8.08; 15 | unit = "MPa"; 16 | }; 17 | }; 18 | nozzleFlow : 19 | { 20 | calculateNozzleFlow = true; 21 | freezingConditions : 22 | { 23 | calculate = true; 24 | expansionRatio = 3.0; 25 | }; 26 | nozzleInletConditions : 27 | { 28 | contractionAreaRatio = 3.0; 29 | }; 30 | nozzleExitConditions : 31 | { 32 | areaRatio = 210.0; 33 | supersonic = true; 34 | }; 35 | ambientConditions : 36 | { 37 | minPressure : 38 | { 39 | value = 1.0; 40 | unit = "atm"; 41 | }; 42 | maxPressure : 43 | { 44 | value = 0.05; 45 | unit = "atm"; 46 | }; 47 | calculateDeliveredPerformance = false; 48 | }; 49 | nozzleStations = ( ); 50 | }; 51 | propellant : 52 | { 53 | components : 54 | { 55 | ratio : 56 | { 57 | value = 5.9; 58 | unit = "O/F"; 59 | }; 60 | oxidizer = ( 61 | { 62 | name = "O2(L)"; 63 | massFraction = 1.0; 64 | p : 65 | { 66 | value = 101325.0; 67 | unit = "Pa"; 68 | }; 69 | } ); 70 | fuel = ( 71 | { 72 | name = "H2(L)"; 73 | massFraction = 1.0; 74 | p : 75 | { 76 | value = 101325.0; 77 | unit = "Pa"; 78 | }; 79 | } ); 80 | }; 81 | }; 82 | engineSize : 83 | { 84 | thrust : 85 | { 86 | value = 98.1; 87 | unit = "kN"; 88 | }; 89 | ambientConditions : 90 | { 91 | value = 0.0; 92 | unit = "atm"; 93 | }; 94 | chambersNo = 1; 95 | chamberGeometry : 96 | { 97 | length : 98 | { 99 | value = 1.3; 100 | unit = "m"; 101 | }; 102 | characteristicLength = true; 103 | contractionAngle = 30.0; 104 | R1_to_Rt_ratio = 1.5; 105 | Rn_to_Rt_ratio = 0.382; 106 | R2_to_R2max_ratio = 0.5; 107 | TOC = true; 108 | Tw_to_T0 = 0.4; 109 | }; 110 | }; 111 | propelantFeedSystem : 112 | { 113 | }; 114 | -------------------------------------------------------------------------------- /Configs/RD-107MM.cfg: -------------------------------------------------------------------------------- 1 | version = 1.2; 2 | name = "RD-107MM (8D728)"; 3 | info = "http://lpre.de/energomash/RD-107/index.htm"; 4 | generalOptions : 5 | { 6 | multiphase = true; 7 | ions = true; 8 | flowSeparation = true; 9 | }; 10 | combustionChamberConditions : 11 | { 12 | pressure : 13 | { 14 | value = 5.85; 15 | unit = "MPa"; 16 | }; 17 | }; 18 | nozzleFlow : 19 | { 20 | calculateNozzleFlow = true; 21 | freezingConditions : 22 | { 23 | calculate = true; 24 | expansionRatio = 1.3; 25 | }; 26 | nozzleInletConditions : 27 | { 28 | contractionAreaRatio = 6.73; 29 | }; 30 | nozzleExitConditions : 31 | { 32 | areaRatio = 18.86; 33 | supersonic = true; 34 | }; 35 | nozzleStations = ( ); 36 | }; 37 | propellant : 38 | { 39 | components : 40 | { 41 | ratio : 42 | { 43 | value = 2.47; 44 | unit = "O/F"; 45 | }; 46 | oxidizer = ( 47 | { 48 | name = "O2(L)"; 49 | massFraction = 1.0; 50 | p : 51 | { 52 | value = 0.0; 53 | unit = "MPa"; 54 | }; 55 | } ); 56 | fuel = ( 57 | { 58 | name = "RG-1"; 59 | massFraction = 1.0; 60 | p : 61 | { 62 | value = 0.0; 63 | unit = "MPa"; 64 | }; 65 | } ); 66 | }; 67 | }; 68 | engineSize : 69 | { 70 | thrust : 71 | { 72 | value = 83500.0; 73 | unit = "kg"; 74 | }; 75 | ambientConditions : 76 | { 77 | value = 1.0; 78 | unit = "atm"; 79 | }; 80 | chambersNo = 4; 81 | chamberGeometry : 82 | { 83 | length : 84 | { 85 | value = 1.0; 86 | unit = "m"; 87 | }; 88 | characteristicLength = true; 89 | contractionAngle = 35.0; 90 | R1_to_Rt_ratio = 1.5; 91 | Rn_to_Rt_ratio = 0.382; 92 | R2_to_R2max_ratio = 0.4; 93 | TOC = true; 94 | }; 95 | }; 96 | propelantFeedSystem : 97 | { 98 | }; 99 | -------------------------------------------------------------------------------- /Configs/RD-161.cfg: -------------------------------------------------------------------------------- 1 | version = 1.2; 2 | name = "RD-161"; 3 | info = "Test case"; 4 | generalOptions : 5 | { 6 | multiphase = true; 7 | ions = true; 8 | flowSeparation = true; 9 | }; 10 | combustionChamberConditions : 11 | { 12 | pressure : 13 | { 14 | value = 12.0; 15 | unit = "MPa"; 16 | }; 17 | }; 18 | nozzleFlow : 19 | { 20 | calculateNozzleFlow = true; 21 | freezingConditions : 22 | { 23 | calculate = true; 24 | expansionRatio = 1.3; 25 | }; 26 | nozzleInletConditions : 27 | { 28 | contractionAreaRatio = 6.0; 29 | }; 30 | nozzleExitConditions : 31 | { 32 | areaRatio = 625.0; 33 | supersonic = true; 34 | }; 35 | nozzleStations = ( ); 36 | }; 37 | propellant : 38 | { 39 | components : 40 | { 41 | ratio : 42 | { 43 | value = 2.6; 44 | unit = "O/F"; 45 | }; 46 | oxidizer = ( 47 | { 48 | name = "O2(L)"; 49 | massFraction = 1.0; 50 | p : 51 | { 52 | value = 0.0; 53 | unit = "MPa"; 54 | }; 55 | } ); 56 | fuel = ( 57 | { 58 | name = "RG-1"; 59 | massFraction = 1.0; 60 | p : 61 | { 62 | value = 0.0; 63 | unit = "MPa"; 64 | }; 65 | } ); 66 | }; 67 | }; 68 | engineSize : 69 | { 70 | thrust : 71 | { 72 | value = 19.0; 73 | unit = "kN"; 74 | }; 75 | ambientConditions : 76 | { 77 | value = 0.0; 78 | unit = "atm"; 79 | }; 80 | chambersNo = 1; 81 | chamberGeometry : 82 | { 83 | length : 84 | { 85 | value = 1.4; 86 | unit = "m"; 87 | }; 88 | characteristicLength = true; 89 | contractionAngle = 35.0; 90 | R1_to_Rt_ratio = 1.5; 91 | Rn_to_Rt_ratio = 0.382; 92 | R2_to_R2max_ratio = 0.4; 93 | TOC = true; 94 | Tw_to_T0 = 0.2; 95 | }; 96 | }; 97 | propelantFeedSystem : 98 | { 99 | }; 100 | -------------------------------------------------------------------------------- /Configs/RD-170.cfg: -------------------------------------------------------------------------------- 1 | version = 1.2; 2 | name = "RD-170"; 3 | info = "Test case for RD-170"; 4 | generalOptions : 5 | { 6 | multiphase = true; 7 | ions = true; 8 | flowSeparation = true; 9 | }; 10 | combustionChamberConditions : 11 | { 12 | pressure : 13 | { 14 | value = 24.5; 15 | unit = "MPa"; 16 | }; 17 | }; 18 | nozzleFlow : 19 | { 20 | calculateNozzleFlow = true; 21 | freezingConditions : 22 | { 23 | calculate = true; 24 | expansionRatio = 1.3; 25 | }; 26 | nozzleInletConditions : 27 | { 28 | contractionAreaRatio = 2.6; 29 | }; 30 | nozzleExitConditions : 31 | { 32 | areaRatio = 36.87; 33 | supersonic = true; 34 | }; 35 | nozzleStations = ( ); 36 | }; 37 | propellant : 38 | { 39 | components : 40 | { 41 | ratio : 42 | { 43 | value = 2.63; 44 | unit = "O/F"; 45 | }; 46 | oxidizer = ( 47 | { 48 | name = "O2(L)"; 49 | massFraction = 1.0; 50 | T : 51 | { 52 | value = 80.0; 53 | unit = "K"; 54 | }; 55 | p : 56 | { 57 | value = 1.0; 58 | unit = "kg/cm2"; 59 | }; 60 | } ); 61 | fuel = ( 62 | { 63 | name = "RP-1"; 64 | massFraction = 1.0; 65 | p : 66 | { 67 | value = 0.101325; 68 | unit = "MPa"; 69 | }; 70 | } ); 71 | }; 72 | }; 73 | engineSize : 74 | { 75 | thrust : 76 | { 77 | value = 7904.0; 78 | unit = "kN"; 79 | }; 80 | ambientConditions : 81 | { 82 | value = 0.0; 83 | unit = "atm"; 84 | }; 85 | chambersNo = 4; 86 | chamberGeometry : 87 | { 88 | length : 89 | { 90 | value = 1079.6; 91 | unit = "mm"; 92 | }; 93 | characteristicLength = true; 94 | contractionAngle = 30.0; 95 | R1_to_Rt_ratio = 1.5; 96 | Rn_to_Rt_ratio = 0.382; 97 | R2_to_R2max_ratio = 0.5; 98 | TOC = true; 99 | }; 100 | }; 101 | propelantFeedSystem : 102 | { 103 | turbopumpFeedSystem : 104 | { 105 | cycle = "staged combustion"; 106 | oxidizerFeedSystem : 107 | { 108 | inletPressure : 109 | { 110 | value = 0.3; 111 | unit = "MPa"; 112 | }; 113 | inletVelocity : 114 | { 115 | value = 5.0; 116 | unit = "m/s"; 117 | }; 118 | pumpEfficiency = 0.7; 119 | boosterPump : 120 | { 121 | inletPressure : 122 | { 123 | value = 300000.0; 124 | unit = "MPa"; 125 | }; 126 | dischargePressure : 127 | { 128 | value = 3.0; 129 | unit = "MPa"; 130 | }; 131 | pumpEfficiency = 0.7; 132 | hydraulicTurbine = true; 133 | turbinePressureRatio = 1.2; 134 | turbineEfficiency = 0.7; 135 | rotationalSpeed : 136 | { 137 | value = 5000.0; 138 | unit = "rad/s"; 139 | }; 140 | }; 141 | branches = ( ); 142 | }; 143 | fuelFeedSystem : 144 | { 145 | inletPressure : 146 | { 147 | value = 0.3; 148 | unit = "MPa"; 149 | }; 150 | inletVelocity : 151 | { 152 | value = 5.0; 153 | unit = "m/s"; 154 | }; 155 | pumpEfficiency = 0.7; 156 | valvePressureDrop : 157 | { 158 | value = 2.0; 159 | unit = "MPa"; 160 | }; 161 | coolingPressureDrop : 162 | { 163 | value = 7.0; 164 | unit = "MPa"; 165 | }; 166 | injectorPressureDrop : 167 | { 168 | value = 2.0; 169 | unit = "MPa"; 170 | }; 171 | branches = ( ); 172 | }; 173 | gasGenerators = ( 174 | { 175 | ggType = "oxidizer-rich"; 176 | pressure : 177 | { 178 | value = 0.0; 179 | unit = "MPa"; 180 | }; 181 | sigma = 0.9; 182 | maxTemperature : 183 | { 184 | value = 850.0; 185 | unit = "K"; 186 | }; 187 | fuelFeedSystem : 188 | { 189 | name = ""; 190 | areaRatio = 0.3; 191 | pumpEfficiency = 0.7; 192 | valvePressureDrop : 193 | { 194 | value = 0.5; 195 | unit = "MPa"; 196 | }; 197 | injectorPressureDrop : 198 | { 199 | value = 2.0; 200 | unit = "MPa"; 201 | }; 202 | }; 203 | } ); 204 | turbines = ( 205 | { 206 | ggType = "serial"; 207 | turbinePressureRatio = 2.0; 208 | turbineEfficiency = 0.7; 209 | rotationalSpeed : 210 | { 211 | value = 13000.0; 212 | unit = "rpm"; 213 | }; 214 | } ); 215 | }; 216 | estimateDryMass = true; 217 | }; 218 | -------------------------------------------------------------------------------- /Configs/RD-170_altitude.cfg: -------------------------------------------------------------------------------- 1 | version = 1.0; 2 | name = "RD-170"; 3 | info = "Test case for RD-170"; 4 | generalOptions : 5 | { 6 | multiphase = true; 7 | ions = true; 8 | }; 9 | combustionChamberConditions : 10 | { 11 | pressure : 12 | { 13 | value = 24.5; 14 | unit = "MPa"; 15 | }; 16 | }; 17 | nozzleFlow : 18 | { 19 | calculateNozzleFlow = true; 20 | freezingConditions : 21 | { 22 | calculate = true; 23 | expansionRatio = 1.3; 24 | }; 25 | nozzleInletConditions : 26 | { 27 | contractionAreaRatio = 2.6; 28 | }; 29 | nozzleExitConditions : 30 | { 31 | areaRatio = 36.87; 32 | }; 33 | ambientConditions : 34 | { 35 | minPressure : 36 | { 37 | value = 1.0; 38 | unit = "atm"; 39 | }; 40 | maxPressure : 41 | { 42 | value = 0.01; 43 | unit = "atm"; 44 | }; 45 | }; 46 | }; 47 | propellant : 48 | { 49 | components : 50 | { 51 | ratio : 52 | { 53 | value = 2.63; 54 | unit = "km"; 55 | }; 56 | oxidizer = ( 57 | { 58 | name = "O2(L)"; 59 | massFraction = 1.0; 60 | } ); 61 | fuel = ( 62 | { 63 | name = "RP-1"; 64 | massFraction = 1.0; 65 | } ); 66 | }; 67 | }; 68 | -------------------------------------------------------------------------------- /Configs/RD-275.cfg: -------------------------------------------------------------------------------- 1 | version = 1.2; 2 | name = "RD-275"; 3 | info = "Test case for RD-275"; 4 | generalOptions : 5 | { 6 | multiphase = true; 7 | ions = true; 8 | flowSeparation = true; 9 | }; 10 | combustionChamberConditions : 11 | { 12 | pressure : 13 | { 14 | value = 15.7; 15 | unit = "MPa"; 16 | }; 17 | }; 18 | nozzleFlow : 19 | { 20 | calculateNozzleFlow = true; 21 | freezingConditions : 22 | { 23 | calculate = true; 24 | expansionRatio = 1.3; 25 | }; 26 | nozzleInletConditions : 27 | { 28 | contractionAreaRatio = 1.54; 29 | }; 30 | nozzleExitConditions : 31 | { 32 | areaRatio = 26.2; 33 | supersonic = true; 34 | }; 35 | ambientConditions : 36 | { 37 | minPressure : 38 | { 39 | value = 1.0; 40 | unit = "atm"; 41 | }; 42 | maxPressure : 43 | { 44 | value = 0.05; 45 | unit = "atm"; 46 | }; 47 | calculateDeliveredPerformance = false; 48 | }; 49 | nozzleStations = ( 50 | { 51 | stationConditions : 52 | { 53 | areaRatio = 20.0; 54 | supersonic = true; 55 | }; 56 | } ); 57 | }; 58 | propellant : 59 | { 60 | components : 61 | { 62 | ratio : 63 | { 64 | value = 2.67; 65 | unit = "O/F"; 66 | }; 67 | oxidizer = ( 68 | { 69 | name = "N2O4(L)"; 70 | massFraction = 1.0; 71 | p : 72 | { 73 | value = 101325.0; 74 | unit = "Pa"; 75 | }; 76 | } ); 77 | fuel = ( 78 | { 79 | name = "C2H8N2(L),UDMH"; 80 | massFraction = 1.0; 81 | p : 82 | { 83 | value = 101325.0; 84 | unit = "Pa"; 85 | }; 86 | } ); 87 | }; 88 | }; 89 | engineSize : 90 | { 91 | thrust : 92 | { 93 | value = 1747.0; 94 | unit = "kN"; 95 | }; 96 | ambientConditions : 97 | { 98 | value = 0.0; 99 | unit = "atm"; 100 | }; 101 | chambersNo = 1; 102 | chamberGeometry : 103 | { 104 | length : 105 | { 106 | value = 1.0; 107 | unit = "m"; 108 | }; 109 | characteristicLength = true; 110 | contractionAngle = 30.0; 111 | R1_to_Rt_ratio = 1.5; 112 | Rn_to_Rt_ratio = 0.382; 113 | R2_to_R2max_ratio = 0.5; 114 | TOC = true; 115 | }; 116 | }; 117 | propelantFeedSystem : 118 | { 119 | }; 120 | -------------------------------------------------------------------------------- /Configs/RL10 B2.cfg: -------------------------------------------------------------------------------- 1 | version = 1.1; 2 | name = "RL10 B2"; 3 | info = "Engine of the DELTA 3 and DELTA IV second stage\nincludes an extendible exit cone "; 4 | generalOptions : 5 | { 6 | multiphase = true; 7 | ions = true; 8 | flowSeparation = true; 9 | }; 10 | combustionChamberConditions : 11 | { 12 | pressure : 13 | { 14 | value = 4.3644; 15 | unit = "MPa"; 16 | }; 17 | }; 18 | nozzleFlow : 19 | { 20 | calculateNozzleFlow = true; 21 | nozzleInletConditions : 22 | { 23 | contractionAreaRatio = 3.0; 24 | }; 25 | nozzleExitConditions : 26 | { 27 | areaRatio = 285.0; 28 | }; 29 | ambientConditions : 30 | { 31 | minPressure : 32 | { 33 | value = 1.0; 34 | unit = "atm"; 35 | }; 36 | maxPressure : 37 | { 38 | value = 1e-005; 39 | unit = "atm"; 40 | }; 41 | }; 42 | }; 43 | propellant : 44 | { 45 | components : 46 | { 47 | ratio : 48 | { 49 | value = 5.88; 50 | unit = "O/F"; 51 | }; 52 | oxidizer = ( 53 | { 54 | name = "O2(L)"; 55 | massFraction = 1.0; 56 | p : 57 | { 58 | value = 0.0; 59 | unit = "MPa"; 60 | }; 61 | } ); 62 | fuel = ( 63 | { 64 | name = "H2(L)"; 65 | massFraction = 1.0; 66 | p : 67 | { 68 | value = 0.0; 69 | unit = "MPa"; 70 | }; 71 | } ); 72 | }; 73 | }; 74 | engineSize : 75 | { 76 | throatDiameter : 77 | { 78 | value = 126.5; 79 | unit = "mm"; 80 | }; 81 | chambersNo = 1; 82 | chamberGeometry : 83 | { 84 | length : 85 | { 86 | value = 1.0; 87 | unit = "m"; 88 | }; 89 | contractionAngle = 30.0; 90 | R1_to_Rt_ratio = 1.5; 91 | Rn_to_Rt_ratio = 0.382; 92 | R2_to_R2max_ratio = 0.5; 93 | TOC = false; 94 | }; 95 | }; 96 | propelantFeedSystem : 97 | { 98 | }; 99 | -------------------------------------------------------------------------------- /Configs/RL10A3-3A.cfg: -------------------------------------------------------------------------------- 1 | version = 1.2; 2 | name = "RL10A3-3A"; 3 | info = ""; 4 | generalOptions : 5 | { 6 | multiphase = true; 7 | ions = true; 8 | flowSeparation = true; 9 | }; 10 | combustionChamberConditions : 11 | { 12 | pressure : 13 | { 14 | value = 475.0; 15 | unit = "psi"; 16 | }; 17 | }; 18 | nozzleFlow : 19 | { 20 | calculateNozzleFlow = true; 21 | freezingConditions : 22 | { 23 | calculate = true; 24 | expansionRatio = 3.0; 25 | }; 26 | nozzleInletConditions : 27 | { 28 | contractionAreaRatio = 4.6; 29 | }; 30 | nozzleExitConditions : 31 | { 32 | areaRatio = 61.0; 33 | supersonic = true; 34 | }; 35 | ambientConditions : 36 | { 37 | minPressure : 38 | { 39 | value = 1.0; 40 | unit = "atm"; 41 | }; 42 | maxPressure : 43 | { 44 | value = 0.05; 45 | unit = "atm"; 46 | }; 47 | calculateDeliveredPerformance = false; 48 | }; 49 | nozzleStations = ( ); 50 | }; 51 | propellant : 52 | { 53 | components : 54 | { 55 | ratio : 56 | { 57 | value = 5.5; 58 | unit = "O/F"; 59 | }; 60 | oxidizer = ( 61 | { 62 | name = "O2(L)"; 63 | massFraction = 1.0; 64 | p : 65 | { 66 | value = 101325.0; 67 | unit = "Pa"; 68 | }; 69 | } ); 70 | fuel = ( 71 | { 72 | name = "H2(L)"; 73 | massFraction = 1.0; 74 | p : 75 | { 76 | value = 101325.0; 77 | unit = "Pa"; 78 | }; 79 | } ); 80 | }; 81 | }; 82 | engineSize : 83 | { 84 | chambersNo = 1; 85 | }; 86 | propelantFeedSystem : 87 | { 88 | }; 89 | -------------------------------------------------------------------------------- /Configs/SSME.cfg: -------------------------------------------------------------------------------- 1 | version = 1.2; 2 | name = "SSME"; 3 | info = ""; 4 | generalOptions : 5 | { 6 | multiphase = true; 7 | ions = true; 8 | flowSeparation = true; 9 | }; 10 | combustionChamberConditions : 11 | { 12 | pressure : 13 | { 14 | value = 3280.0; 15 | unit = "psi"; 16 | }; 17 | }; 18 | nozzleFlow : 19 | { 20 | calculateNozzleFlow = true; 21 | freezingConditions : 22 | { 23 | calculate = true; 24 | expansionRatio = 3.0; 25 | }; 26 | nozzleInletConditions : 27 | { 28 | contractionAreaRatio = 3.4; 29 | }; 30 | nozzleExitConditions : 31 | { 32 | areaRatio = 77.5; 33 | supersonic = true; 34 | }; 35 | nozzleStations = ( 36 | { 37 | stationConditions : 38 | { 39 | areaRatio = 2.2; 40 | supersonic = false; 41 | }; 42 | }, 43 | { 44 | stationConditions : 45 | { 46 | areaRatio = 1.2; 47 | supersonic = false; 48 | }; 49 | }, 50 | { 51 | stationConditions : 52 | { 53 | areaRatio = 1.2; 54 | supersonic = true; 55 | }; 56 | }, 57 | { 58 | stationConditions : 59 | { 60 | areaRatio = 3.0; 61 | supersonic = true; 62 | }; 63 | }, 64 | { 65 | stationConditions : 66 | { 67 | areaRatio = 4.0; 68 | supersonic = true; 69 | }; 70 | } ); 71 | }; 72 | propellant : 73 | { 74 | components : 75 | { 76 | ratio : 77 | { 78 | value = 6.0; 79 | unit = "O/F"; 80 | }; 81 | oxidizer = ( 82 | { 83 | name = "O2(L)"; 84 | massFraction = 1.0; 85 | p : 86 | { 87 | value = 101325.0; 88 | unit = "Pa"; 89 | }; 90 | } ); 91 | fuel = ( 92 | { 93 | name = "H2(L)"; 94 | massFraction = 1.0; 95 | p : 96 | { 97 | value = 101325.0; 98 | unit = "Pa"; 99 | }; 100 | } ); 101 | }; 102 | }; 103 | engineSize : 104 | { 105 | thrust : 106 | { 107 | value = 2275.0; 108 | unit = "kN"; 109 | }; 110 | ambientConditions : 111 | { 112 | value = 0.0; 113 | unit = "atm"; 114 | }; 115 | chambersNo = 1; 116 | chamberGeometry : 117 | { 118 | length : 119 | { 120 | value = 1.0; 121 | unit = "m"; 122 | }; 123 | characteristicLength = true; 124 | contractionAngle = 30.0; 125 | R1_to_Rt_ratio = 1.5; 126 | Rn_to_Rt_ratio = 0.382; 127 | R2_to_R2max_ratio = 0.5; 128 | TOC = true; 129 | }; 130 | }; 131 | propelantFeedSystem : 132 | { 133 | }; 134 | -------------------------------------------------------------------------------- /Configs/Thermal Analysis/Aestus.cfg: -------------------------------------------------------------------------------- 1 | version = 1.2; 2 | name = "Aestus"; 3 | info = "Test case"; 4 | generalOptions : 5 | { 6 | multiphase = true; 7 | ions = true; 8 | flowSeparation = true; 9 | }; 10 | combustionChamberConditions : 11 | { 12 | pressure : 13 | { 14 | value = 10.3; 15 | unit = "bar"; 16 | }; 17 | }; 18 | nozzleFlow : 19 | { 20 | calculateNozzleFlow = true; 21 | nozzleInletConditions : 22 | { 23 | contractionAreaRatio = 2.3843; 24 | }; 25 | nozzleExitConditions : 26 | { 27 | areaRatio = 84.0; 28 | supersonic = true; 29 | }; 30 | efficiencies : 31 | { 32 | nozzle = 0.98246; 33 | }; 34 | nozzleStations = ( ); 35 | }; 36 | propellant : 37 | { 38 | components : 39 | { 40 | ratio : 41 | { 42 | value = 2.05; 43 | unit = "O/F"; 44 | }; 45 | oxidizer = ( 46 | { 47 | name = "N2O4(L)"; 48 | massFraction = 1.0; 49 | p : 50 | { 51 | value = 0.0; 52 | unit = "MPa"; 53 | }; 54 | } ); 55 | fuel = ( 56 | { 57 | name = "CH6N2(L)"; 58 | massFraction = 1.0; 59 | p : 60 | { 61 | value = 0.0; 62 | unit = "MPa"; 63 | }; 64 | } ); 65 | }; 66 | }; 67 | engineSize : 68 | { 69 | throatDiameter : 70 | { 71 | value = 136.0; 72 | unit = "mm"; 73 | }; 74 | chambersNo = 1; 75 | chamberGeometry : 76 | { 77 | length : 78 | { 79 | value = 0.31; 80 | unit = "m"; 81 | }; 82 | characteristicLength = false; 83 | contractionAngle = 35.0; 84 | R1_to_Rt_ratio = 0.8; 85 | Rn_to_Rt_ratio = 0.382; 86 | R2_to_R2max_ratio = 1.0; 87 | TOC = true; 88 | }; 89 | }; 90 | chamberCooling : 91 | { 92 | heatTransfer : 93 | { 94 | relationsType = "Ievlev"; 95 | applyBLC = false; 96 | numberOfStations = 75; 97 | radiationHeatTransfer : 98 | { 99 | hotSideWallSurfaceEmissivity = 0.8; 100 | }; 101 | wallLayerHeight = 0.05; 102 | }; 103 | chamberCoolingSections = ( 104 | { 105 | channelJacketDesign : 106 | { 107 | location : 108 | { 109 | value = 0.0; 110 | unit = "mm"; 111 | }; 112 | length : 113 | { 114 | value = 0.0; 115 | unit = "m"; 116 | }; 117 | wallThickness : 118 | { 119 | value = 0.7; 120 | unit = "mm"; 121 | }; 122 | wallConductivity : 123 | { 124 | value = 300.0; 125 | unit = "W/(m K)"; 126 | }; 127 | coolant = ( 128 | { 129 | name = "CH6N2(L)"; 130 | massFraction = 1.0; 131 | T : 132 | { 133 | value = 298.0; 134 | unit = "K"; 135 | }; 136 | p : 137 | { 138 | value = 18.0; 139 | unit = "bar"; 140 | }; 141 | } ); 142 | flowrate = 0.328; 143 | oppositeFlow = true; 144 | height1 : 145 | { 146 | value = 3.0; 147 | unit = "mm"; 148 | }; 149 | height2 : 150 | { 151 | value = 2.0; 152 | unit = "mm"; 153 | }; 154 | gamma : 155 | { 156 | value = 0.0; 157 | unit = "degrees"; 158 | }; 159 | a1 : 160 | { 161 | value = 2.0; 162 | unit = "mm"; 163 | }; 164 | a2 : 165 | { 166 | value = 4.0; 167 | unit = "mm"; 168 | }; 169 | n = 120; 170 | }; 171 | }, 172 | { 173 | radiationCooling : 174 | { 175 | location : 176 | { 177 | value = 591.0; 178 | unit = "mm"; 179 | }; 180 | length : 181 | { 182 | value = 0.0; 183 | unit = "m"; 184 | }; 185 | wallThickness : 186 | { 187 | value = 1.5; 188 | unit = "mm"; 189 | }; 190 | wallConductivity : 191 | { 192 | value = 50.0; 193 | unit = "W/(m K)"; 194 | }; 195 | coldSideWallSurfaceEmissivity = 0.75; 196 | }; 197 | } ); 198 | filmSlots = ( ); 199 | }; 200 | propelantFeedSystem : 201 | { 202 | estimateDryMass = false; 203 | }; 204 | -------------------------------------------------------------------------------- /Configs/Thermal Analysis/HeatTransfer.cfg: -------------------------------------------------------------------------------- 1 | version = 1.2; 2 | name = "testing"; 3 | info = "description"; 4 | generalOptions : 5 | { 6 | multiphase = true; 7 | ions = true; 8 | flowSeparation = true; 9 | }; 10 | combustionChamberConditions : 11 | { 12 | pressure : 13 | { 14 | value = 150.0; 15 | unit = "psi"; 16 | }; 17 | }; 18 | nozzleFlow : 19 | { 20 | calculateNozzleFlow = true; 21 | nozzleInletConditions : 22 | { 23 | contractionAreaRatio = 6.0; 24 | }; 25 | nozzleExitConditions : 26 | { 27 | pressure : 28 | { 29 | value = 14.7; 30 | unit = "psi"; 31 | }; 32 | }; 33 | efficiencies : 34 | { 35 | nozzleHalfAngle = 15.0; 36 | }; 37 | nozzleStations = ( ); 38 | }; 39 | propellant : 40 | { 41 | components : 42 | { 43 | ratio : 44 | { 45 | value = 1.0; 46 | unit = "O/F"; 47 | }; 48 | oxidizer = ( 49 | { 50 | name = "O2"; 51 | massFraction = 1.0; 52 | T : 53 | { 54 | value = 280.0; 55 | unit = "K"; 56 | }; 57 | p : 58 | { 59 | value = 200.0; 60 | unit = "psi"; 61 | }; 62 | } ); 63 | fuel = ( 64 | { 65 | name = "C2H5OH(L),90%"; 66 | massFraction = 1.0; 67 | T : 68 | { 69 | value = 280.0; 70 | unit = "K"; 71 | }; 72 | p : 73 | { 74 | value = 500.0; 75 | unit = "psi"; 76 | }; 77 | } ); 78 | }; 79 | }; 80 | engineSize : 81 | { 82 | throatDiameter : 83 | { 84 | value = 0.8176; 85 | unit = "in"; 86 | }; 87 | chambersNo = 1; 88 | chamberGeometry : 89 | { 90 | length : 91 | { 92 | value = 0.7416; 93 | unit = "m"; 94 | }; 95 | characteristicLength = true; 96 | contractionAngle = 30.0; 97 | R1_to_Rt_ratio = 1.5; 98 | Rn_to_Rt_ratio = 0.382; 99 | R2_to_R2max_ratio = 0.5; 100 | }; 101 | }; 102 | chamberCooling : 103 | { 104 | heatTransfer : 105 | { 106 | relationsType = "Ievlev"; 107 | applyBLC = false; 108 | numberOfStations = 50; 109 | wallLayerHeight = 0.05; 110 | }; 111 | chamberCoolingSections = ( 112 | { 113 | tubularJacketDesign : 114 | { 115 | location : 116 | { 117 | value = 0.0; 118 | unit = "mm"; 119 | }; 120 | length : 121 | { 122 | value = 0.0; 123 | unit = "m"; 124 | }; 125 | wallThickness : 126 | { 127 | value = 0.04; 128 | unit = "in"; 129 | }; 130 | wallConductivity : 131 | { 132 | value = 28.0; 133 | unit = "Btu/(s in R)"; 134 | }; 135 | coolantFrom = "nozzle"; 136 | flowrate = 1.0; 137 | oppositeFlow = true; 138 | d : 139 | { 140 | value = 2.903498992; 141 | unit = "mm"; 142 | }; 143 | n = 55; 144 | helix = false; 145 | }; 146 | }, 147 | { 148 | tubularJacketDesign : 149 | { 150 | location : 151 | { 152 | value = 97.71; 153 | unit = "mm"; 154 | }; 155 | length : 156 | { 157 | value = 0.0; 158 | unit = "m"; 159 | }; 160 | wallThickness : 161 | { 162 | value = 0.04; 163 | unit = "in"; 164 | }; 165 | id = "nozzle"; 166 | wallConductivity : 167 | { 168 | value = 28.0; 169 | unit = "Btu/(s in R)"; 170 | }; 171 | coolant = ( 172 | { 173 | name = "C2H5OH(L)"; 174 | massFraction = 0.9; 175 | T : 176 | { 177 | value = 298.0; 178 | unit = "K"; 179 | }; 180 | p : 181 | { 182 | value = 500.0; 183 | unit = "psi"; 184 | }; 185 | }, 186 | { 187 | name = "H2O(L)"; 188 | massFraction = 0.1; 189 | T : 190 | { 191 | value = 298.0; 192 | unit = "K"; 193 | }; 194 | p : 195 | { 196 | value = 500.0; 197 | unit = "psi"; 198 | }; 199 | } ); 200 | flowrate = 0.5; 201 | oppositeFlow = true; 202 | d : 203 | { 204 | value = 5.693463508; 205 | unit = "mm"; 206 | }; 207 | n = 24; 208 | helix = false; 209 | }; 210 | } ); 211 | filmSlots = ( ); 212 | }; 213 | propelantFeedSystem : 214 | { 215 | estimateDryMass = false; 216 | }; 217 | -------------------------------------------------------------------------------- /Configs/Thermal Propulsion/H2O_1000K.cfg: -------------------------------------------------------------------------------- 1 | version = 1.2; 2 | name = ""; 3 | info = ""; 4 | generalOptions : 5 | { 6 | multiphase = true; 7 | ions = true; 8 | flowSeparation = true; 9 | }; 10 | combustionChamberConditions : 11 | { 12 | pressure : 13 | { 14 | value = 100.0; 15 | unit = "psi"; 16 | }; 17 | }; 18 | nozzleFlow : 19 | { 20 | calculateNozzleFlow = true; 21 | nozzleInletConditions : 22 | { 23 | contractionAreaRatio = 6.0; 24 | }; 25 | nozzleExitConditions : 26 | { 27 | areaRatio = 50.0; 28 | supersonic = true; 29 | }; 30 | nozzleStations = ( ); 31 | }; 32 | propellant : 33 | { 34 | mixture : 35 | { 36 | species = ( 37 | { 38 | name = "H2O"; 39 | massFraction = 1.0; 40 | T : 41 | { 42 | value = 1000.0; 43 | unit = "K"; 44 | }; 45 | p : 46 | { 47 | value = 0.0; 48 | unit = "atm"; 49 | }; 50 | } ); 51 | }; 52 | }; 53 | engineSize : 54 | { 55 | chambersNo = 1; 56 | }; 57 | propelantFeedSystem : 58 | { 59 | estimateDryMass = false; 60 | }; 61 | -------------------------------------------------------------------------------- /Configs/Thermal Propulsion/H2O_2000K.cfg: -------------------------------------------------------------------------------- 1 | version = 1.2; 2 | name = ""; 3 | info = ""; 4 | generalOptions : 5 | { 6 | multiphase = true; 7 | ions = true; 8 | flowSeparation = true; 9 | }; 10 | combustionChamberConditions : 11 | { 12 | pressure : 13 | { 14 | value = 100.0; 15 | unit = "psi"; 16 | }; 17 | }; 18 | nozzleFlow : 19 | { 20 | calculateNozzleFlow = true; 21 | nozzleInletConditions : 22 | { 23 | contractionAreaRatio = 6.0; 24 | }; 25 | nozzleExitConditions : 26 | { 27 | areaRatio = 100.0; 28 | supersonic = true; 29 | }; 30 | nozzleStations = ( ); 31 | }; 32 | propellant : 33 | { 34 | mixture : 35 | { 36 | species = ( 37 | { 38 | name = "H2O"; 39 | massFraction = 1.0; 40 | T : 41 | { 42 | value = 2020.0; 43 | unit = "K"; 44 | }; 45 | p : 46 | { 47 | value = 0.0; 48 | unit = "atm"; 49 | }; 50 | } ); 51 | }; 52 | }; 53 | engineSize : 54 | { 55 | chambersNo = 1; 56 | }; 57 | propelantFeedSystem : 58 | { 59 | estimateDryMass = false; 60 | }; 61 | -------------------------------------------------------------------------------- /Configs/Thermal Propulsion/H2O_3000K.cfg: -------------------------------------------------------------------------------- 1 | version = 1.2; 2 | name = ""; 3 | info = ""; 4 | generalOptions : 5 | { 6 | multiphase = true; 7 | ions = true; 8 | flowSeparation = true; 9 | }; 10 | combustionChamberConditions : 11 | { 12 | pressure : 13 | { 14 | value = 100.0; 15 | unit = "psi"; 16 | }; 17 | }; 18 | nozzleFlow : 19 | { 20 | calculateNozzleFlow = true; 21 | nozzleInletConditions : 22 | { 23 | contractionAreaRatio = 6.0; 24 | }; 25 | nozzleExitConditions : 26 | { 27 | areaRatio = 100.0; 28 | supersonic = true; 29 | }; 30 | nozzleStations = ( ); 31 | }; 32 | propellant : 33 | { 34 | mixture : 35 | { 36 | species = ( 37 | { 38 | name = "H2O"; 39 | massFraction = 1.0; 40 | T : 41 | { 42 | value = 3700.0; 43 | unit = "K"; 44 | }; 45 | p : 46 | { 47 | value = 0.0; 48 | unit = "atm"; 49 | }; 50 | } ); 51 | }; 52 | }; 53 | engineSize : 54 | { 55 | chambersNo = 1; 56 | }; 57 | propelantFeedSystem : 58 | { 59 | estimateDryMass = false; 60 | }; 61 | -------------------------------------------------------------------------------- /Configs/VIKING 4B.cfg: -------------------------------------------------------------------------------- 1 | version = 1.1; 2 | name = "VIKING 4B"; 3 | info = "Second Stage Engine of Ariane 2 to Ariane 4"; 4 | generalOptions : 5 | { 6 | multiphase = true; 7 | ions = true; 8 | flowSeparation = true; 9 | }; 10 | combustionChamberConditions : 11 | { 12 | pressure : 13 | { 14 | value = 58.5; 15 | unit = "atm"; 16 | }; 17 | }; 18 | nozzleFlow : 19 | { 20 | calculateNozzleFlow = true; 21 | nozzleInletConditions : 22 | { 23 | contractionAreaRatio = 4.0; 24 | }; 25 | nozzleExitConditions : 26 | { 27 | areaRatio = 30.8; 28 | }; 29 | ambientConditions : 30 | { 31 | minPressure : 32 | { 33 | value = 1.0; 34 | unit = "atm"; 35 | }; 36 | maxPressure : 37 | { 38 | value = 1e-005; 39 | unit = "atm"; 40 | }; 41 | }; 42 | }; 43 | propellant : 44 | { 45 | components : 46 | { 47 | ratio : 48 | { 49 | value = 1.7; 50 | unit = "O/F"; 51 | }; 52 | oxidizer = ( 53 | { 54 | name = "N2O4(L)"; 55 | massFraction = 1.0; 56 | p : 57 | { 58 | value = 0.0; 59 | unit = "MPa"; 60 | }; 61 | } ); 62 | fuel = ( 63 | { 64 | name = "C2H8N2(L),UDMH"; 65 | massFraction = 0.9025; 66 | p : 67 | { 68 | value = 0.0; 69 | unit = "MPa"; 70 | }; 71 | }, 72 | { 73 | name = "H2O(L)"; 74 | massFraction = 0.0975; 75 | p : 76 | { 77 | value = 0.0; 78 | unit = "MPa"; 79 | }; 80 | } ); 81 | }; 82 | }; 83 | engineSize : 84 | { 85 | thrust : 86 | { 87 | value = 805.0; 88 | unit = "kN"; 89 | }; 90 | ambientConditions : 91 | { 92 | value = 0.0; 93 | unit = "atm"; 94 | }; 95 | chambersNo = 1; 96 | chamberGeometry : 97 | { 98 | length : 99 | { 100 | value = 1.0; 101 | unit = "m"; 102 | }; 103 | contractionAngle = 30.0; 104 | R1_to_Rt_ratio = 1.5; 105 | Rn_to_Rt_ratio = 0.382; 106 | R2_to_R2max_ratio = 0.5; 107 | TOC = false; 108 | }; 109 | }; 110 | propelantFeedSystem : 111 | { 112 | }; 113 | -------------------------------------------------------------------------------- /Configs/VIKING 4B_2.cfg: -------------------------------------------------------------------------------- 1 | version = 1.1; 2 | name = "VIKING 4B"; 3 | info = "Second Stage Engine of Ariane 2 to Ariane 4"; 4 | generalOptions : 5 | { 6 | multiphase = true; 7 | ions = true; 8 | flowSeparation = true; 9 | }; 10 | combustionChamberConditions : 11 | { 12 | pressure : 13 | { 14 | value = 58.5; 15 | unit = "atm"; 16 | }; 17 | }; 18 | nozzleFlow : 19 | { 20 | calculateNozzleFlow = true; 21 | nozzleInletConditions : 22 | { 23 | contractionAreaRatio = 4.0; 24 | }; 25 | nozzleExitConditions : 26 | { 27 | areaRatio = 10.0; 28 | }; 29 | }; 30 | propellant : 31 | { 32 | components : 33 | { 34 | ratio : 35 | { 36 | value = 1.7; 37 | unit = "O/F"; 38 | }; 39 | oxidizer = ( 40 | { 41 | name = "N2O4(L)"; 42 | massFraction = 1.0; 43 | p : 44 | { 45 | value = 0.0; 46 | unit = "MPa"; 47 | }; 48 | } ); 49 | fuel = ( 50 | { 51 | name = "C2H8N2(L),UDMH"; 52 | massFraction = 1.0; 53 | p : 54 | { 55 | value = 0.0; 56 | unit = "MPa"; 57 | }; 58 | } ); 59 | }; 60 | }; 61 | engineSize : 62 | { 63 | thrust : 64 | { 65 | value = 805.0; 66 | unit = "kN"; 67 | }; 68 | ambientConditions : 69 | { 70 | value = 0.0; 71 | unit = "atm"; 72 | }; 73 | chambersNo = 1; 74 | chamberGeometry : 75 | { 76 | length : 77 | { 78 | value = 1.0; 79 | unit = "m"; 80 | }; 81 | contractionAngle = 30.0; 82 | R1_to_Rt_ratio = 1.5; 83 | Rn_to_Rt_ratio = 0.382; 84 | R2_to_R2max_ratio = 0.5; 85 | TOC = false; 86 | }; 87 | }; 88 | propelantFeedSystem : 89 | { 90 | }; 91 | -------------------------------------------------------------------------------- /Configs/Validation/test_case_1.cfg: -------------------------------------------------------------------------------- 1 | version = 1.0; 2 | name = "Test case 1"; 3 | info = ""; 4 | generalOptions : 5 | { 6 | multiphase = true; 7 | ions = true; 8 | }; 9 | combustionChamberConditions : 10 | { 11 | pressure : 12 | { 13 | value = 10.0; 14 | unit = "MPa"; 15 | }; 16 | }; 17 | nozzleFlow : 18 | { 19 | calculateNozzleFlow = false; 20 | }; 21 | propellant : 22 | { 23 | components : 24 | { 25 | ratio : 26 | { 27 | value = 6.0; 28 | unit = "km"; 29 | }; 30 | oxidizer = ( 31 | { 32 | name = "O2(L)"; 33 | massFraction = 1.0; 34 | } ); 35 | fuel = ( 36 | { 37 | name = "H2(L)"; 38 | massFraction = 1.0; 39 | } ); 40 | }; 41 | }; 42 | -------------------------------------------------------------------------------- /Configs/Validation/test_case_2.cfg: -------------------------------------------------------------------------------- 1 | version = 1.0; 2 | name = "Test case 2"; 3 | info = ""; 4 | generalOptions : 5 | { 6 | multiphase = true; 7 | ions = true; 8 | }; 9 | combustionChamberConditions : 10 | { 11 | pressure : 12 | { 13 | value = 10.0; 14 | unit = "MPa"; 15 | }; 16 | }; 17 | nozzleFlow : 18 | { 19 | calculateNozzleFlow = false; 20 | }; 21 | propellant : 22 | { 23 | components : 24 | { 25 | ratio : 26 | { 27 | value = 2.6; 28 | unit = "km"; 29 | }; 30 | oxidizer = ( 31 | { 32 | name = "O2(L)"; 33 | massFraction = 1.0; 34 | } ); 35 | fuel = ( 36 | { 37 | name = "RP-1"; 38 | massFraction = 1.0; 39 | } ); 40 | }; 41 | }; 42 | -------------------------------------------------------------------------------- /Configs/Validation/test_case_3.cfg: -------------------------------------------------------------------------------- 1 | version = 1.0; 2 | name = "Test case 3"; 3 | info = ""; 4 | generalOptions : 5 | { 6 | multiphase = true; 7 | ions = true; 8 | }; 9 | combustionChamberConditions : 10 | { 11 | pressure : 12 | { 13 | value = 5.0; 14 | unit = "MPa"; 15 | }; 16 | }; 17 | nozzleFlow : 18 | { 19 | calculateNozzleFlow = false; 20 | }; 21 | propellant : 22 | { 23 | components : 24 | { 25 | ratio : 26 | { 27 | value = 2.6; 28 | unit = "km"; 29 | }; 30 | oxidizer = ( 31 | { 32 | name = "N2O4(L)"; 33 | massFraction = 1.0; 34 | } ); 35 | fuel = ( 36 | { 37 | name = "C2H8N2(L),UDMH"; 38 | massFraction = 1.0; 39 | } ); 40 | }; 41 | }; 42 | -------------------------------------------------------------------------------- /Configs/Validation/test_case_4.cfg: -------------------------------------------------------------------------------- 1 | version = 1.0; 2 | name = "Test case 4"; 3 | info = ""; 4 | generalOptions : 5 | { 6 | multiphase = true; 7 | ions = true; 8 | }; 9 | combustionChamberConditions : 10 | { 11 | pressure : 12 | { 13 | value = 1.0; 14 | unit = "MPa"; 15 | }; 16 | }; 17 | nozzleFlow : 18 | { 19 | calculateNozzleFlow = false; 20 | }; 21 | propellant : 22 | { 23 | mixture : 24 | { 25 | species = ( 26 | { 27 | name = "N2H4(L)"; 28 | massFraction = 1.0; 29 | } ); 30 | }; 31 | }; 32 | -------------------------------------------------------------------------------- /Configs/Validation/test_case_5.cfg: -------------------------------------------------------------------------------- 1 | version = 1.0; 2 | name = "Test case 5"; 3 | info = ""; 4 | generalOptions : 5 | { 6 | multiphase = true; 7 | ions = true; 8 | }; 9 | combustionChamberConditions : 10 | { 11 | pressure : 12 | { 13 | value = 1.0; 14 | unit = "MPa"; 15 | }; 16 | }; 17 | nozzleFlow : 18 | { 19 | calculateNozzleFlow = false; 20 | }; 21 | propellant : 22 | { 23 | mixture : 24 | { 25 | species = ( 26 | { 27 | name = "H2O2(L)"; 28 | massFraction = 0.8; 29 | }, 30 | { 31 | name = "H2O(L)"; 32 | massFraction = 0.2; 33 | } ); 34 | }; 35 | }; 36 | -------------------------------------------------------------------------------- /Configs/Vinci.cfg: -------------------------------------------------------------------------------- 1 | version = 1.2; 2 | name = "Vinci"; 3 | info = "http://cs.astrium.eads.net/sp/launcher-propulsion/rocket-engines/vinci-rocket-engine.html"; 4 | generalOptions : 5 | { 6 | multiphase = true; 7 | ions = true; 8 | flowSeparation = true; 9 | }; 10 | combustionChamberConditions : 11 | { 12 | pressure : 13 | { 14 | value = 60.8; 15 | unit = "bar"; 16 | }; 17 | }; 18 | nozzleFlow : 19 | { 20 | calculateNozzleFlow = true; 21 | freezingConditions : 22 | { 23 | calculate = true; 24 | expansionRatio = 1.3; 25 | }; 26 | nozzleInletConditions : 27 | { 28 | contractionAreaRatio = 2.3843; 29 | }; 30 | nozzleExitConditions : 31 | { 32 | areaRatio = 240.0; 33 | supersonic = true; 34 | }; 35 | nozzleStations = ( ); 36 | }; 37 | propellant : 38 | { 39 | components : 40 | { 41 | ratio : 42 | { 43 | value = 5.8; 44 | unit = "O/F"; 45 | }; 46 | oxidizer = ( 47 | { 48 | name = "O2(L)"; 49 | massFraction = 1.0; 50 | p : 51 | { 52 | value = 0.0; 53 | unit = "MPa"; 54 | }; 55 | } ); 56 | fuel = ( 57 | { 58 | name = "H2(L)"; 59 | massFraction = 1.0; 60 | p : 61 | { 62 | value = 0.0; 63 | unit = "MPa"; 64 | }; 65 | } ); 66 | }; 67 | }; 68 | engineSize : 69 | { 70 | thrust : 71 | { 72 | value = 180.0; 73 | unit = "kN"; 74 | }; 75 | ambientConditions : 76 | { 77 | value = 0.0; 78 | unit = "atm"; 79 | }; 80 | chambersNo = 1; 81 | chamberGeometry : 82 | { 83 | length : 84 | { 85 | value = 0.31; 86 | unit = "m"; 87 | }; 88 | characteristicLength = false; 89 | contractionAngle = 35.0; 90 | R1_to_Rt_ratio = 0.8; 91 | Rn_to_Rt_ratio = 0.382; 92 | R2_to_R2max_ratio = 1.0; 93 | TOC = true; 94 | Tw_to_T0 = 0.4; 95 | }; 96 | }; 97 | propelantFeedSystem : 98 | { 99 | }; 100 | -------------------------------------------------------------------------------- /Configs/Vulcain-2.cfg: -------------------------------------------------------------------------------- 1 | version = 1.2; 2 | name = "Vulcain-2"; 3 | info = "http://cs.astrium.eads.net/sp/launcher-propulsion/rocket-engines/vulcain-2-rocket-engine.html"; 4 | generalOptions : 5 | { 6 | multiphase = true; 7 | ions = true; 8 | flowSeparation = true; 9 | }; 10 | combustionChamberConditions : 11 | { 12 | pressure : 13 | { 14 | value = 117.3; 15 | unit = "bar"; 16 | }; 17 | }; 18 | nozzleFlow : 19 | { 20 | calculateNozzleFlow = true; 21 | freezingConditions : 22 | { 23 | calculate = true; 24 | expansionRatio = 1.3; 25 | }; 26 | nozzleInletConditions : 27 | { 28 | contractionAreaRatio = 2.3843; 29 | }; 30 | nozzleExitConditions : 31 | { 32 | areaRatio = 58.2; 33 | supersonic = true; 34 | }; 35 | nozzleStations = ( ); 36 | }; 37 | propellant : 38 | { 39 | components : 40 | { 41 | ratio : 42 | { 43 | value = 6.7; 44 | unit = "O/F"; 45 | }; 46 | oxidizer = ( 47 | { 48 | name = "O2(L)"; 49 | massFraction = 1.0; 50 | p : 51 | { 52 | value = 0.0; 53 | unit = "MPa"; 54 | }; 55 | } ); 56 | fuel = ( 57 | { 58 | name = "H2(L)"; 59 | massFraction = 1.0; 60 | p : 61 | { 62 | value = 0.0; 63 | unit = "MPa"; 64 | }; 65 | } ); 66 | }; 67 | }; 68 | engineSize : 69 | { 70 | thrust : 71 | { 72 | value = 1359.0; 73 | unit = "kN"; 74 | }; 75 | ambientConditions : 76 | { 77 | value = 0.0; 78 | unit = "atm"; 79 | }; 80 | chambersNo = 1; 81 | chamberGeometry : 82 | { 83 | length : 84 | { 85 | value = 0.31; 86 | unit = "m"; 87 | }; 88 | characteristicLength = false; 89 | contractionAngle = 35.0; 90 | R1_to_Rt_ratio = 0.8; 91 | Rn_to_Rt_ratio = 0.382; 92 | R2_to_R2max_ratio = 1.0; 93 | TOC = true; 94 | Tw_to_T0 = 0.4; 95 | }; 96 | }; 97 | propelantFeedSystem : 98 | { 99 | turbopumpFeedSystem : 100 | { 101 | cycle = "gas generator"; 102 | oxidizerFeedSystem : 103 | { 104 | inletPressure : 105 | { 106 | value = 0.7; 107 | unit = "MPa"; 108 | }; 109 | inletVelocity : 110 | { 111 | value = 5.0; 112 | unit = "m/s"; 113 | }; 114 | pumpEfficiency = 0.7; 115 | valvePressureDrop : 116 | { 117 | value = 0.5; 118 | unit = "MPa"; 119 | }; 120 | injectorPressureDrop : 121 | { 122 | value = 0.5; 123 | unit = "MPa"; 124 | }; 125 | branches = ( ); 126 | }; 127 | fuelFeedSystem : 128 | { 129 | inletPressure : 130 | { 131 | value = 0.3; 132 | unit = "MPa"; 133 | }; 134 | inletVelocity : 135 | { 136 | value = 5.0; 137 | unit = "m/s"; 138 | }; 139 | pumpEfficiency = 0.7; 140 | valvePressureDrop : 141 | { 142 | value = 0.5; 143 | unit = "MPa"; 144 | }; 145 | coolingPressureDrop : 146 | { 147 | value = 5.0; 148 | unit = "MPa"; 149 | }; 150 | injectorPressureDrop : 151 | { 152 | value = 0.5; 153 | unit = "MPa"; 154 | }; 155 | branches = ( ); 156 | }; 157 | gasGenerators = ( 158 | { 159 | ggType = "fuel-rich"; 160 | pressure : 161 | { 162 | value = 8.0; 163 | unit = "MPa"; 164 | }; 165 | sigma = 0.9; 166 | maxTemperature : 167 | { 168 | value = 900.0; 169 | unit = "K"; 170 | }; 171 | oxidizerFeedSystem : 172 | { 173 | name = ""; 174 | areaRatio = 0.3; 175 | valvePressureDrop : 176 | { 177 | value = 1.0; 178 | unit = "MPa"; 179 | }; 180 | injectorPressureDrop : 181 | { 182 | value = 0.5; 183 | unit = "MPa"; 184 | }; 185 | }; 186 | fuelFeedSystem : 187 | { 188 | name = ""; 189 | areaRatio = 0.3; 190 | valvePressureDrop : 191 | { 192 | value = 1.0; 193 | unit = "MPa"; 194 | }; 195 | injectorPressureDrop : 196 | { 197 | value = 0.5; 198 | unit = "MPa"; 199 | }; 200 | }; 201 | } ); 202 | turbines = ( 203 | { 204 | ggType = "serial"; 205 | turbinePressureRatio = 12.0; 206 | turbineEfficiency = 0.7; 207 | rotationalSpeed : 208 | { 209 | value = 12600.0; 210 | unit = "rpm"; 211 | }; 212 | }, 213 | { 214 | ggType = "parallel"; 215 | turbinePressureRatio = 18.0; 216 | turbineEfficiency = 0.7; 217 | rotationalSpeed : 218 | { 219 | value = 35500.0; 220 | unit = "rpm"; 221 | }; 222 | } ); 223 | }; 224 | estimateDryMass = true; 225 | }; 226 | -------------------------------------------------------------------------------- /Configs/Vulcain.cfg: -------------------------------------------------------------------------------- 1 | version = 1.2; 2 | name = "Vulcain"; 3 | info = "http://cs.astrium.eads.net/sp/launcher-propulsion/rocket-engines/vulcain-rocket-engine.html"; 4 | generalOptions : 5 | { 6 | multiphase = true; 7 | ions = true; 8 | flowSeparation = true; 9 | }; 10 | combustionChamberConditions : 11 | { 12 | pressure : 13 | { 14 | value = 100.0; 15 | unit = "bar"; 16 | }; 17 | }; 18 | nozzleFlow : 19 | { 20 | calculateNozzleFlow = true; 21 | freezingConditions : 22 | { 23 | calculate = true; 24 | expansionRatio = 1.3; 25 | }; 26 | nozzleInletConditions : 27 | { 28 | contractionAreaRatio = 2.3843; 29 | }; 30 | nozzleExitConditions : 31 | { 32 | areaRatio = 45.1; 33 | supersonic = true; 34 | }; 35 | nozzleStations = ( ); 36 | }; 37 | propellant : 38 | { 39 | components : 40 | { 41 | ratio : 42 | { 43 | value = 5.6; 44 | unit = "O/F"; 45 | }; 46 | oxidizer = ( 47 | { 48 | name = "O2(L)"; 49 | massFraction = 1.0; 50 | p : 51 | { 52 | value = 0.0; 53 | unit = "MPa"; 54 | }; 55 | } ); 56 | fuel = ( 57 | { 58 | name = "H2(L)"; 59 | massFraction = 1.0; 60 | p : 61 | { 62 | value = 0.0; 63 | unit = "MPa"; 64 | }; 65 | } ); 66 | }; 67 | }; 68 | engineSize : 69 | { 70 | thrust : 71 | { 72 | value = 1015.0; 73 | unit = "kN"; 74 | }; 75 | ambientConditions : 76 | { 77 | value = 0.0; 78 | unit = "atm"; 79 | }; 80 | chambersNo = 1; 81 | chamberGeometry : 82 | { 83 | length : 84 | { 85 | value = 0.31; 86 | unit = "m"; 87 | }; 88 | characteristicLength = false; 89 | contractionAngle = 35.0; 90 | R1_to_Rt_ratio = 0.8; 91 | Rn_to_Rt_ratio = 0.382; 92 | R2_to_R2max_ratio = 1.0; 93 | TOC = true; 94 | Tw_to_T0 = 0.4; 95 | }; 96 | }; 97 | propelantFeedSystem : 98 | { 99 | }; 100 | -------------------------------------------------------------------------------- /Configs/peregrine.cfg: -------------------------------------------------------------------------------- 1 | version = 1.1; 2 | name = "Peregrine hybrid propulsion"; 3 | info = "Hybrid engine for Peregrine Sounding Rocket"; 4 | generalOptions : 5 | { 6 | multiphase = true; 7 | ions = true; 8 | flowSeparation = true; 9 | }; 10 | combustionChamberConditions : 11 | { 12 | pressure : 13 | { 14 | value = 700.0; 15 | unit = "psi"; 16 | }; 17 | }; 18 | nozzleFlow : 19 | { 20 | calculateNozzleFlow = true; 21 | nozzleInletConditions : 22 | { 23 | contractionAreaRatio = 7.25; 24 | }; 25 | nozzleExitConditions : 26 | { 27 | areaRatio = 8.4; 28 | }; 29 | }; 30 | propellant : 31 | { 32 | components : 33 | { 34 | ratio : 35 | { 36 | value = 4.0654; 37 | unit = "O/F"; 38 | }; 39 | oxidizer = ( 40 | { 41 | name = "N2O(L),184.67K"; 42 | massFraction = 1.0; 43 | p : 44 | { 45 | value = 0.0; 46 | unit = "MPa"; 47 | }; 48 | } ); 49 | fuel = ( 50 | { 51 | name = "C32H66(a)"; 52 | massFraction = 1.0; 53 | p : 54 | { 55 | value = 0.0; 56 | unit = "MPa"; 57 | }; 58 | } ); 59 | }; 60 | }; 61 | engineSize : 62 | { 63 | thrust : 64 | { 65 | value = 14034.0; 66 | unit = "lbf"; 67 | }; 68 | ambientConditions : 69 | { 70 | value = 1.0; 71 | unit = "atm"; 72 | }; 73 | chambersNo = 1; 74 | }; 75 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # RPA-Examples 2 | Examples for RPA - Rocket Propulsion Analysis 3 | 4 | This repository provides examples of configuration files, scripts, and extensions for RPA - Rocket Propulsion Analysis. 5 | 6 | To run the examples of configuration files, get a copy of RPA Standard Edition from http://www.propulsion-analysis.com/ 7 | 8 | Documentation available: 9 | 10 | User Manual: 11 | http://www.propulsion-analysis.com/downloads/2/docs/RPA_2_User_Manual.pdf 12 | 13 | How-To: 14 | http://www.propulsion-analysis.com/docs/howto/index.htm -------------------------------------------------------------------------------- /SDK/build/common.mk: -------------------------------------------------------------------------------- 1 | 2 | OBJS=$(SOURCES:.cpp=.o) 3 | 4 | LIBOBJS=$(LIBSOURCES:.cpp=.o) 5 | 6 | 7 | ifeq ($(PLATFORM),win32) 8 | include win32.mk 9 | endif 10 | 11 | ifeq ($(PLATFORM),win64) 12 | include win64.mk 13 | endif 14 | 15 | ifeq ($(PLATFORM),linux32) 16 | include linux32.mk 17 | endif 18 | 19 | ifeq ($(PLATFORM),linux64) 20 | include linux64.mk 21 | endif 22 | 23 | ifeq ($(PLATFORM),macosx) 24 | include macosx.mk 25 | endif 26 | -------------------------------------------------------------------------------- /SDK/build/cycle_analysis.mk: -------------------------------------------------------------------------------- 1 | EXENAME = cycle_analysis 2 | 3 | SOURCES = \ 4 | ../src/cycle_analysis.cpp \ 5 | ../src/common.cpp 6 | 7 | include common.mk 8 | 9 | -------------------------------------------------------------------------------- /SDK/build/cycle_analysis_2.mk: -------------------------------------------------------------------------------- 1 | EXENAME = cycle_analysis_2 2 | 3 | SOURCES = \ 4 | ../src/cycle_analysis_2.cpp \ 5 | ../src/common.cpp 6 | 7 | include common.mk 8 | 9 | -------------------------------------------------------------------------------- /SDK/build/example1.mk: -------------------------------------------------------------------------------- 1 | EXENAME = example1 2 | 3 | SOURCES = \ 4 | ../src/example1.cpp \ 5 | ../src/common.cpp 6 | 7 | include common.mk 8 | 9 | -------------------------------------------------------------------------------- /SDK/build/example2.mk: -------------------------------------------------------------------------------- 1 | EXENAME = example2 2 | 3 | SOURCES = \ 4 | ../src/example2.cpp \ 5 | ../src/common.cpp 6 | 7 | include common.mk 8 | 9 | -------------------------------------------------------------------------------- /SDK/build/example3.mk: -------------------------------------------------------------------------------- 1 | EXENAME = example3 2 | 3 | SOURCES = \ 4 | ../src/example3.cpp \ 5 | ../src/common.cpp 6 | 7 | include common.mk 8 | 9 | -------------------------------------------------------------------------------- /SDK/build/example4.mk: -------------------------------------------------------------------------------- 1 | EXENAME = example4 2 | 3 | SOURCES = \ 4 | ../src/example4.cpp \ 5 | ../src/common.cpp 6 | 7 | include common.mk 8 | 9 | -------------------------------------------------------------------------------- /SDK/build/example5.mk: -------------------------------------------------------------------------------- 1 | EXENAME = example5 2 | 3 | SOURCES = \ 4 | ../src/example5.cpp \ 5 | ../src/common.cpp 6 | 7 | include common.mk 8 | 9 | -------------------------------------------------------------------------------- /SDK/build/example6.mk: -------------------------------------------------------------------------------- 1 | EXENAME = example6 2 | 3 | SOURCES = \ 4 | ../src/example6.cpp \ 5 | ../src/common.cpp 6 | 7 | include common.mk 8 | 9 | -------------------------------------------------------------------------------- /SDK/build/example_chamber.mk: -------------------------------------------------------------------------------- 1 | EXENAME = chamber 2 | 3 | SOURCES = \ 4 | ../src/chamber.cpp \ 5 | ../src/common.cpp 6 | 7 | include common.mk 8 | 9 | -------------------------------------------------------------------------------- /SDK/build/example_performance1.mk: -------------------------------------------------------------------------------- 1 | EXENAME = performance1 2 | 3 | SOURCES = \ 4 | ../src/performance1.cpp \ 5 | ../src/common.cpp 6 | 7 | include common.mk 8 | 9 | -------------------------------------------------------------------------------- /SDK/build/example_performance2.mk: -------------------------------------------------------------------------------- 1 | EXENAME = performance2 2 | 3 | SOURCES = \ 4 | ../src/performance2.cpp \ 5 | ../src/common.cpp 6 | 7 | include common.mk 8 | 9 | -------------------------------------------------------------------------------- /SDK/build/example_performance3.mk: -------------------------------------------------------------------------------- 1 | EXENAME = performance3 2 | 3 | SOURCES = \ 4 | ../src/performance3.cpp \ 5 | ../src/common.cpp 6 | 7 | include common.mk 8 | 9 | -------------------------------------------------------------------------------- /SDK/build/example_performance4.mk: -------------------------------------------------------------------------------- 1 | EXENAME = performance4 2 | 3 | SOURCES = \ 4 | ../src/performance4.cpp \ 5 | ../src/common.cpp 6 | 7 | include common.mk 8 | 9 | -------------------------------------------------------------------------------- /SDK/build/example_wrapper.mk: -------------------------------------------------------------------------------- 1 | LIBNAME = wrapper 2 | 3 | LIBSOURCES = \ 4 | ../src/wrapper.cpp \ 5 | ../src/common.cpp 6 | 7 | EXENAME = wrapper_client 8 | 9 | SOURCES = \ 10 | ../src/wrapper_client.cpp 11 | 12 | include common.mk 13 | 14 | -------------------------------------------------------------------------------- /SDK/build/linux.mk: -------------------------------------------------------------------------------- 1 | RM = rm -rf 2 | CP = cp -f -d 3 | MV = mv -f 4 | 5 | CC = g++ 6 | AR = ar 7 | 8 | INCLUDES = \ 9 | -I../../third_parties/libconfig-1.4.5/lib \ 10 | -I../../libutils/include \ 11 | -I../../libmath/include \ 12 | -I../../librpa/include \ 13 | -I../../libnozzle/include \ 14 | -I../../libthermo/include \ 15 | -I../../libdesign/include \ 16 | -I../../libflow/include 17 | 18 | LIBS = \ 19 | -L../../third_parties/bin/$(ARCH) \ 20 | -L../../libutils/bin/$(ARCH) \ 21 | -L../../libmath/bin/$(ARCH) \ 22 | -L../../librpa/bin/$(ARCH) \ 23 | -L../../libnozzle/bin/$(ARCH) \ 24 | -L../../libthermo/bin/$(ARCH) \ 25 | -L../../libdesign/bin/$(ARCH) \ 26 | -L../../libflow/bin/$(ARCH) \ 27 | -L$(SLIB) \ 28 | -lconfig++ -lutils -lmath -lrpa -lnozzle -lthermo -ldesign -lflow -lm 29 | 30 | CFLAGS = $(FLAG) -LNO:vintr=2 -LNO:simd=2 -Wall -fmessage-length=0 -pthread -std=c++0x \ 31 | -falign-functions -falign-loops \ 32 | $(INCLUDES) $(LIBS) \ 33 | -g0 -O3 -mssse3 -mtune=generic -fno-math-errno -finline-functions -c 34 | 35 | SHARED_CFLAGS = $(CFLAGS) -fPIC -DSHARED -D__dll_impl__ 36 | 37 | LDFLAGS = $(FLAG) -lpthread -s 38 | 39 | all: init dll exe clean 40 | echo Done 41 | 42 | init: 43 | mkdir -p ../bin 44 | $(RM) ../bin/* 45 | 46 | $(OBJS): $(SOURCES) 47 | $(CC) $(CFLAGS) $(INCLUDES) $(patsubst %.o,%.cpp,$@) 48 | 49 | dll: 50 | ifdef LIBSOURCES 51 | $(CC) $(SHARED_CFLAGS) /Fe$(LIBNAME).dll $(LIBSOURCES) $(LIBS) 52 | $(MT) -nologo -manifest $(LIBNAME).dll.manifest.xml -outputresource:$(LIBNAME).dll;2 53 | $(MV) $(LIBNAME).dll "..\bin\" 54 | endif 55 | 56 | exe: $(OBJS) 57 | $(CC) $(FLAG) $(LIBS) $(notdir $(OBJS)) -o ../bin/$(EXENAME) 58 | $(RM) *.o 59 | # strip --strip-unneeded ../bin/$(EXENAME) 60 | $(CP) -r ../../files/* ../bin/ 61 | $(CP) ../../third_parties/bin/$(ARCH)/*.* ../bin/ 62 | $(CP) ../../libutils/bin/$(ARCH)/*.* ../bin/ 63 | $(CP) ../../libmath/bin/$(ARCH)/*.* ../bin/ 64 | $(CP) ../../librpa/bin/$(ARCH)/*.* ../bin/ 65 | $(CP) ../../libnozzle/bin/$(ARCH)/*.* ../bin/ 66 | $(CP) ../../libthermo/bin/$(ARCH)/*.* ../bin/ 67 | $(CP) ../../libdesign/bin/$(ARCH)/*.* ../bin/ 68 | $(CP) ../../libflow/bin/$(ARCH)/*.* ../bin/ 69 | echo "#!/bin/sh" > ../bin/$(EXENAME).exe 70 | # echo "LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH ./$(EXENAME) $@" >> ../bin/$(EXENAME).exe 71 | echo "LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH ./$(EXENAME)" >> ../bin/$(EXENAME).exe 72 | chmod +x ../bin/$(EXENAME).exe 73 | 74 | clean: 75 | $(RM) $(OBJS) 76 | $(RM) *.o 77 | 78 | -------------------------------------------------------------------------------- /SDK/build/linux32.mk: -------------------------------------------------------------------------------- 1 | # Configuration for Linux 32 2 | 3 | ARCH = linux32 4 | FLAG = -m32 5 | SLIB = /usr/lib 6 | 7 | include build/linux.mk 8 | -------------------------------------------------------------------------------- /SDK/build/linux64.mk: -------------------------------------------------------------------------------- 1 | # Configuration for Linux 64 2 | 3 | ARCH = linux64 4 | FLAG = -m64 5 | SLIB = /usr/lib64 6 | 7 | include linux.mk 8 | -------------------------------------------------------------------------------- /SDK/build/thermal_analysis.mk: -------------------------------------------------------------------------------- 1 | EXENAME = thermal_analysis 2 | 3 | SOURCES = \ 4 | ../src/thermal_analysis.cpp \ 5 | ../src/common.cpp 6 | 7 | include common.mk 8 | 9 | -------------------------------------------------------------------------------- /SDK/build/win32.mk: -------------------------------------------------------------------------------- 1 | ARCH = win32 2 | 3 | include windows.mk 4 | 5 | -------------------------------------------------------------------------------- /SDK/build/win64.mk: -------------------------------------------------------------------------------- 1 | ARCH = win64 2 | 3 | include windows.mk 4 | 5 | -------------------------------------------------------------------------------- /SDK/build/windows.mk: -------------------------------------------------------------------------------- 1 | RM = del /Q 2 | CP = xcopy /Y 3 | XCP = xcopy /Y /S /E 4 | MV = move /Y 5 | 6 | CC = cl 7 | MT = mt 8 | 9 | INCLUDES = \ 10 | /I "..\..\third_parties\libconfig-1.4.5\lib" \ 11 | /I "..\..\libutils\include" \ 12 | /I "..\..\libmath\include" \ 13 | /I "..\..\librpa\include" \ 14 | /I "..\..\libnozzle\include" \ 15 | /I "..\..\libthermo\include" \ 16 | /I "..\..\libdesign\include" \ 17 | /I "..\..\libflow\include" 18 | 19 | WLIBS = \ 20 | /link libconfig++.lib libutils.lib libmath.lib librpa.lib libnozzle.lib libthermo.lib libdesign.lib libflow.lib wrapper.lib \ 21 | /LIBPATH:"..\..\third_parties\bin\$(ARCH)" \ 22 | /LIBPATH:"..\..\libutils\bin\$(ARCH)" \ 23 | /LIBPATH:"..\..\libmath\bin\$(ARCH)" \ 24 | /LIBPATH:"..\..\librpa\bin\$(ARCH)" \ 25 | /LIBPATH:"..\..\libnozzle\bin\$(ARCH)" \ 26 | /LIBPATH:"..\..\libthermo\bin\$(ARCH)" \ 27 | /LIBPATH:"..\..\libdesign\bin\$(ARCH)" \ 28 | /LIBPATH:"..\..\libflow\bin\$(ARCH)" 29 | 30 | LIBS = \ 31 | /link libconfig++.lib libutils.lib libmath.lib librpa.lib libnozzle.lib libthermo.lib libdesign.lib libflow.lib \ 32 | /LIBPATH:"..\..\third_parties\bin\$(ARCH)" \ 33 | /LIBPATH:"..\..\libutils\bin\$(ARCH)" \ 34 | /LIBPATH:"..\..\libmath\bin\$(ARCH)" \ 35 | /LIBPATH:"..\..\librpa\bin\$(ARCH)" \ 36 | /LIBPATH:"..\..\libnozzle\bin\$(ARCH)" \ 37 | /LIBPATH:"..\..\libthermo\bin\$(ARCH)" \ 38 | /LIBPATH:"..\..\libdesign\bin\$(ARCH)" \ 39 | /LIBPATH:"..\..\libflow\bin\$(ARCH)" 40 | 41 | 42 | CFLAGS_OPT = /MP /O2 /EHsc /w $(INCLUDES) /D "_WINDOWS" /D "UNICODE" /D "_UNICODE" 43 | 44 | ifneq ($(ARCH),win64) 45 | CFLAGS_OPT += /arch:SSE2 46 | endif 47 | 48 | CFLAGS_LIB = $(CFLAGS_OPT) /MD /c 49 | 50 | CFLAGS = $(CFLAGS_OPT) /D "SHARED" /MD /D "_BIND_TO_CURRENT_CRT_VERSION=1" 51 | 52 | SHARED_CFLAGS = $(CFLAGS) /D "_USRDLL" /LD 53 | 54 | 55 | all: init dll clean exe clean_lib 56 | 57 | init: 58 | if not exist ..\bin mkdir ..\bin 59 | $(RM) ..\bin\* 60 | 61 | dll: 62 | ifdef LIBSOURCES 63 | $(CC) $(SHARED_CFLAGS) /Fe$(LIBNAME).dll $(LIBSOURCES) $(LIBS) 64 | $(MT) -nologo -manifest $(LIBNAME).dll.manifest.xml -outputresource:$(LIBNAME).dll;2 65 | $(MV) $(LIBNAME).dll "..\bin\" 66 | endif 67 | 68 | exe: 69 | ifndef LIBSOURCES 70 | $(CC) $(CFLAGS) /Fe..\bin\$(EXENAME).exe $(SOURCES) $(LIBS) 71 | else 72 | $(CC) $(CFLAGS) /Fe..\bin\$(EXENAME).exe $(SOURCES) $(WLIBS) 73 | $(CP) ..\src\*.py "..\bin\" 74 | endif 75 | $(XCP) ..\..\files "..\bin\" 76 | $(CP) ..\..\third_parties\bin\$(ARCH)\*.dll "..\bin\" 77 | $(CP) ..\..\libutils\bin\$(ARCH)\*.dll "..\bin\" 78 | $(CP) ..\..\libmath\bin\$(ARCH)\*.dll "..\bin\" 79 | $(CP) ..\..\librpa\bin\$(ARCH)\*.dll "..\bin\" 80 | $(CP) ..\..\libnozzle\bin\$(ARCH)\*.dll "..\bin\" 81 | $(CP) ..\..\libthermo\bin\$(ARCH)\*.dll "..\bin\" 82 | $(CP) ..\..\libdesign\bin\$(ARCH)\*.dll "..\bin\" 83 | $(CP) ..\..\libflow\bin\$(ARCH)\*.dll "..\bin\" 84 | 85 | clean: 86 | $(RM) *.obj 87 | 88 | clean_lib: 89 | $(RM) *.obj 90 | ifdef LIBSOURCES 91 | $(RM) *.lib 92 | $(RM) *.exp 93 | endif 94 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /SDK/build/wrapper.dll.manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | RPA - Rocket Propulsion Analysis 3 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /SDK/src/common.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * RPA - Tool for Rocket Propulsion Analysis 3 | * RPA Software Development Kit (SDK) 4 | * 5 | * Copyright 2009,2015 Alexander Ponomarenko. 6 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 7 | * 8 | * This software is a commercial product; you can use it under the terms of the 9 | * RPA SDK License as published at http://www.propulsion-analysis.com/sdk_eula.htm 10 | * 11 | * This program is distributed WITHOUT ANY WARRANTY; without even the 12 | * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 13 | * PURPOSE. See the RPA SDK License for more details (a copy is included 14 | * in the sdk_eula.htm file that accompanied this program). 15 | * 16 | * You should have received a copy of the RPA SDK License along with this program; 17 | * if not, write to author 18 | * 19 | * Please contact author or visit http://www.propulsion-analysis.com 20 | * if you need additional information or have any questions. 21 | */ 22 | 23 | #include "utils/Util.hpp" 24 | #include "thermodynamics/input/Input.hpp" 25 | #include "thermodynamics/thermo/Thermodynamics.hpp" 26 | #include "thermodynamics/dll/Export.hpp" 27 | 28 | void initThermoDatabase() { 29 | try { 30 | loadThermodynamicsDatabase("resources/thermo.inp", true); 31 | } catch (const std::exception& ex) { 32 | util::Log::warnf("THERMO", "Could not load thermodynamics data from resources/thermo.inp\n"); 33 | } 34 | 35 | try { 36 | loadThermodynamicsDatabase("resources/usr_thermo.inp", false); 37 | } catch (const std::exception& ex) { 38 | util::Log::warnf("THERMO", "Could not load user-defined thermodynamics data from resources/usr_thermo.inp\n"); 39 | } 40 | 41 | try { 42 | loadPropertiesDatabase("resources/properties.inp"); 43 | } catch (const std::exception& ex) { 44 | util::Log::warnf("THERMO", "Could not load properties data from resources/properties.inp\n"); 45 | } 46 | 47 | try { 48 | loadPropertiesDatabase("resources/usr_properties.inp"); 49 | } catch (const std::exception& ex) { 50 | util::Log::warnf("THERMO", "Could not load user-defined properties data from resources/usr_properties.inp\n"); 51 | } 52 | 53 | try { 54 | loadTransportPropertiesDatabase("resources/trans.inp"); 55 | } catch (const std::exception& ex) { 56 | util::Log::warnf("THERMO", "Could not load transport properties data from resources/trans.inp\n"); 57 | } 58 | } 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /SDK/src/common.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * RPA - Tool for Rocket Propulsion Analysis 3 | * RPA Software Development Kit (SDK) 4 | * 5 | * Copyright 2009,2015 Alexander Ponomarenko. 6 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 7 | * 8 | * This software is a commercial product; you can use it under the terms of the 9 | * RPA SDK License as published at http://www.propulsion-analysis.com/sdk_eula.htm 10 | * 11 | * This program is distributed WITHOUT ANY WARRANTY; without even the 12 | * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 13 | * PURPOSE. See the RPA SDK License for more details (a copy is included 14 | * in the sdk_eula.htm file that accompanied this program). 15 | * 16 | * You should have received a copy of the RPA SDK License along with this program; 17 | * if not, write to author 18 | * 19 | * Please contact author or visit http://www.propulsion-analysis.com 20 | * if you need additional information or have any questions. 21 | */ 22 | 23 | #ifndef EXAMPLES_COMMON_HPP_ 24 | #define EXAMPLES_COMMON_HPP_ 25 | 26 | extern void initThermoDatabase(); 27 | 28 | #endif /* EXAMPLES_COMMON_HPP_ */ 29 | -------------------------------------------------------------------------------- /SDK/src/example1.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * RPA - Tool for Rocket Propulsion Analysis 3 | * RPA Software Development Kit (SDK) 4 | * 5 | * Copyright 2009,2015 Alexander Ponomarenko. 6 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 7 | * 8 | * This software is a commercial product; you can use it under the terms of the 9 | * RPA SDK License as published at http://www.propulsion-analysis.com/sdk_eula.htm 10 | * 11 | * This program is distributed WITHOUT ANY WARRANTY; without even the 12 | * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 13 | * PURPOSE. See the RPA SDK License for more details (a copy is included 14 | * in the sdk_eula.htm file that accompanied this program). 15 | * 16 | * You should have received a copy of the RPA SDK License along with this program; 17 | * if not, write to author 18 | * 19 | * Please contact author or visit http://www.propulsion-analysis.com 20 | * if you need additional information or have any questions. 21 | */ 22 | 23 | #include "utils/Util.hpp" 24 | #include "thermodynamics/input/Input.hpp" 25 | #include "thermodynamics/thermo/Thermodynamics.hpp" 26 | #include "thermodynamics/dll/Export.hpp" 27 | #include "thermodynamics/gasdynamics/StandardAtmosphere.hpp" 28 | 29 | #include "common.hpp" 30 | 31 | /** 32 | * This example calculates the performance of rocket engine using pre-defined configuration file. 33 | */ 34 | int main(int argc, char* argv[]) { 35 | 36 | double throttleValue = 1.0; 37 | 38 | util::Log::createLog("ROOT")-> 39 | addLogger(new util::FileLogger("", 10*1024)); 40 | 41 | // Initialize thermodatabase 42 | initThermoDatabase(); 43 | 44 | // Initialize configuration file object 45 | thermo::input::ConfigFile* data = new thermo::input::ConfigFile("examples/RD-170.cfg"); 46 | 47 | // Read configuration file 48 | data->read(); 49 | 50 | // Initialize performance solver 51 | performance::TheoreticalPerformance* performance = new performance::TheoreticalPerformance(data, false); 52 | performance::ThrottlingPerformance* throttlingPerformance = NULL; 53 | 54 | // Solve 55 | performance->solve(); 56 | if (throttleValue!=1.0) { 57 | throttlingPerformance = new performance::ThrottlingPerformance(performance, throttleValue); 58 | } 59 | 60 | // Get nozzle exit object 61 | performance::equilibrium::NozzleSectionConditions* nozzleExit = (throttlingPerformance?throttlingPerformance:performance)->getExitSection(); 62 | 63 | double Is_v = nozzleExit->getIs_v(); 64 | double Is = nozzleExit->getIs(); 65 | double Is_SL = nozzleExit->getIs_H(CONST_ATM); 66 | 67 | printf("Is_SL=%8.3f m/s, Is_opt=%8.3f Is_vac=%8.3f, r=%4.2f\n", Is_SL, Is, Is_v, throttleValue); 68 | 69 | // Do not delete nozzleExit 70 | delete performance; 71 | delete throttlingPerformance; 72 | delete data; 73 | 74 | util::Log::finalize(); 75 | 76 | return 0; 77 | } 78 | 79 | 80 | -------------------------------------------------------------------------------- /SDK/src/example2.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * RPA - Tool for Rocket Propulsion Analysis 3 | * RPA Software Development Kit (SDK) 4 | * 5 | * Copyright 2009,2015 Alexander Ponomarenko. 6 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 7 | * 8 | * This software is a commercial product; you can use it under the terms of the 9 | * RPA SDK License as published at http://www.propulsion-analysis.com/sdk_eula.htm 10 | * 11 | * This program is distributed WITHOUT ANY WARRANTY; without even the 12 | * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 13 | * PURPOSE. See the RPA SDK License for more details (a copy is included 14 | * in the sdk_eula.htm file that accompanied this program). 15 | * 16 | * You should have received a copy of the RPA SDK License along with this program; 17 | * if not, write to author 18 | * 19 | * Please contact author or visit http://www.propulsion-analysis.com 20 | * if you need additional information or have any questions. 21 | */ 22 | 23 | #include "utils/Util.hpp" 24 | #include "thermodynamics/input/Input.hpp" 25 | #include "thermodynamics/thermo/Thermodynamics.hpp" 26 | #include "thermodynamics/dll/Export.hpp" 27 | #include "thermodynamics/gasdynamics/StandardAtmosphere.hpp" 28 | 29 | #include "common.hpp" 30 | 31 | 32 | /** 33 | * This example calculates the performance of rocket engine at several values of ambient pressure using pre-defined configuration file. 34 | */ 35 | int main(int argc, char* argv[]) { 36 | 37 | double nominalMdot = 10; // kg/s 38 | double throttleValue = 1.0; 39 | double mdot = throttleValue*nominalMdot; 40 | 41 | util::Log::createLog("ROOT")-> 42 | addLogger(new util::FileLogger("", 10*1024)); 43 | 44 | // Initialize thermodatabase 45 | initThermoDatabase(); 46 | 47 | // Initialize configuration file object 48 | thermo::input::ConfigFile* data = new thermo::input::ConfigFile("examples/RD-170.cfg"); 49 | 50 | // Read configuration file 51 | data->read(); 52 | 53 | // Initialize performance solver 54 | performance::TheoreticalPerformance* performance = new performance::TheoreticalPerformance(data, false); 55 | performance::ThrottlingPerformance* throttlingPerformance = NULL; 56 | 57 | // Solve 58 | performance->solve(); 59 | if (throttleValue!=1.0) { 60 | throttlingPerformance = new performance::ThrottlingPerformance(performance, throttleValue); 61 | } 62 | 63 | // Get nozzle exit object 64 | performance::equilibrium::NozzleSectionConditions* nozzleExit = (throttlingPerformance?throttlingPerformance:performance)->getExitSection(); 65 | 66 | int n = 50; 67 | double p1 = CONST_ATM; // Ambient pressure initial value 68 | double p2 = CONST_ATM*0.0001; // Ambient pressure final value 69 | for (int i=0; i<=n; ++i) { 70 | double pa = p1 + (p2-p1)*(double)i/(double)n; // Ambient pressure current value 71 | double Is = nozzleExit->getIs_H(pa); 72 | double F = Is*mdot; 73 | printf("pa=%8.3f atm, Is=%8.3f m/s, F=%8.3f kN, r=%4.2f\n", pa/CONST_ATM, Is, F/1000., throttleValue); 74 | } 75 | 76 | delete performance; 77 | delete throttlingPerformance; 78 | delete data; 79 | 80 | util::Log::finalize(); 81 | 82 | return 0; 83 | } 84 | 85 | 86 | -------------------------------------------------------------------------------- /SDK/src/example4.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * RPA - Tool for Rocket Propulsion Analysis 3 | * RPA Software Development Kit (SDK) 4 | * 5 | * Copyright 2009,2015 Alexander Ponomarenko. 6 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 7 | * 8 | * This software is a commercial product; you can use it under the terms of the 9 | * RPA SDK License as published at http://www.propulsion-analysis.com/sdk_eula.htm 10 | * 11 | * This program is distributed WITHOUT ANY WARRANTY; without even the 12 | * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 13 | * PURPOSE. See the RPA SDK License for more details (a copy is included 14 | * in the sdk_eula.htm file that accompanied this program). 15 | * 16 | * You should have received a copy of the RPA SDK License along with this program; 17 | * if not, write to author 18 | * 19 | * Please contact author or visit http://www.propulsion-analysis.com 20 | * if you need additional information or have any questions. 21 | */ 22 | 23 | #include "utils/Util.hpp" 24 | #include "thermodynamics/input/Input.hpp" 25 | #include "thermodynamics/thermo/Thermodynamics.hpp" 26 | #include "thermodynamics/dll/Export.hpp" 27 | #include "thermodynamics/gasdynamics/StandardAtmosphere.hpp" 28 | 29 | #include "common.hpp" 30 | 31 | 32 | /** 33 | * This example calculates the performance of rocket engine at several values of ambient pressure using pre-defined configuration file, 34 | * considering performance losses. 35 | */ 36 | int main(int argc, char* argv[]) { 37 | 38 | bool applyCorrectionFactor = true; 39 | 40 | double nominalMdot = 10; // kg/s 41 | double throttleValue = 1.0; 42 | double mdot = throttleValue*nominalMdot; 43 | 44 | util::Log::createLog("ROOT")-> 45 | addLogger(new util::FileLogger("", 10*1024)); 46 | 47 | // Initialize thermodatabase 48 | initThermoDatabase(); 49 | 50 | // Initialize configuration file object 51 | thermo::input::ConfigFile* data = new thermo::input::ConfigFile("examples/RD-170.cfg"); 52 | 53 | // Read configuration file 54 | data->read(); 55 | 56 | // Initialize performance solver 57 | performance::TheoreticalPerformance* performance = new performance::TheoreticalPerformance(data, false); 58 | performance::ThrottlingPerformance* throttlingPerformance = NULL; 59 | 60 | // Solve 61 | performance->solve(); 62 | if (throttleValue!=1.0) { 63 | throttlingPerformance = new performance::ThrottlingPerformance(performance, throttleValue); 64 | } 65 | 66 | // Get nozzle exit object 67 | performance::equilibrium::NozzleSectionConditions* nozzleExit = (throttlingPerformance?throttlingPerformance:performance)->getExitSection(); 68 | 69 | // Performance correction factor 70 | double phi = 1.0; 71 | if (applyCorrectionFactor) { 72 | // Get performance correction factor 73 | performance::efficiency::CorrectionFactors* correctionFactors = new performance::efficiency::CorrectionFactors(throttlingPerformance?throttlingPerformance:performance); 74 | phi = correctionFactors->getOverallEfficiency(); 75 | delete correctionFactors; 76 | } 77 | 78 | int n = 50; 79 | double p1 = CONST_ATM; // Ambient pressure initial value 80 | double p2 = CONST_ATM*0.0001; // Ambient pressure final value 81 | for (int i=0; i<=n; ++i) { 82 | double pa = p1 + (p2-p1)*(double)i/(double)n; // Ambient pressure current value 83 | double Is = nozzleExit->getIs_v()*phi - nozzleExit->getF()*pa; 84 | double F = Is*mdot; 85 | printf("pa=%8.3f atm, Is=%8.3f m/s, F=%8.3f kN, r=%4.2f\n", pa/CONST_ATM, Is, F/1000., throttleValue); 86 | } 87 | 88 | delete performance; 89 | delete throttlingPerformance; 90 | delete data; 91 | 92 | util::Log::finalize(); 93 | 94 | return 0; 95 | } 96 | 97 | 98 | -------------------------------------------------------------------------------- /SDK/src/performance1.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * RPA - Tool for Rocket Propulsion Analysis 3 | * RPA Software Development Kit (SDK) 4 | * 5 | * Copyright 2009,2015 Alexander Ponomarenko. 6 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 7 | * 8 | * This software is a commercial product; you can use it under the terms of the 9 | * RPA SDK License as published at http://www.propulsion-analysis.com/sdk_eula.htm 10 | * 11 | * This program is distributed WITHOUT ANY WARRANTY; without even the 12 | * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 13 | * PURPOSE. See the RPA SDK License for more details (a copy is included 14 | * in the sdk_eula.htm file that accompanied this program). 15 | * 16 | * You should have received a copy of the RPA SDK License along with this program; 17 | * if not, write to author 18 | * 19 | * Please contact author or visit http://www.propulsion-analysis.com 20 | * if you need additional information or have any questions. 21 | */ 22 | 23 | #include "utils/Util.hpp" 24 | #include "thermodynamics/input/Input.hpp" 25 | #include "thermodynamics/thermo/Thermodynamics.hpp" 26 | #include "thermodynamics/dll/Export.hpp" 27 | #include "thermodynamics/gasdynamics/StandardAtmosphere.hpp" 28 | 29 | #include "common.hpp" 30 | 31 | /** 32 | * This example calculates the performance of rocket engine using pre-defined configuration file. 33 | */ 34 | int main(int argc, char* argv[]) { 35 | 36 | util::Log::createLog("ROOT")-> 37 | addLogger(new util::FileLogger("", 10*1024)); 38 | 39 | // Initialize thermodatabase 40 | initThermoDatabase(); 41 | 42 | bool optimizePropellant = false; 43 | 44 | // Initialize configuration file object 45 | thermo::input::ConfigFile* data = new thermo::input::ConfigFile("examples/RD-170.cfg"); 46 | 47 | // Read configuration file 48 | data->read(); 49 | 50 | // Modify input data, if necessary 51 | // For instance: 52 | // 53 | // Set nozzle area ratio 54 | // data->getNozzleFlowOptions().setNozzleExitConditions().setAreaRatio(30, true); 55 | // 56 | // Set propellant O/F ratio (km==O/F): 57 | // data->getPropellant().setRatio(2.5, thermo::input::Ratio::km); 58 | // 59 | // Set chamber pressure: 60 | // data->getCombustionChamberConditions().setPressure(15, thermo::input::Pressure::MPa); 61 | // 62 | // etc. 63 | 64 | // Initialize performance solver 65 | performance::TheoreticalPerformance* performance = new performance::TheoreticalPerformance(data, false); 66 | 67 | if (optimizePropellant && thermo::input::Ratio::fractions!=data->getPropellant().getRatioType()) { 68 | // Find optimal mixture ratio for given propellant 69 | performance->optimizeForSpecificImpulse(); 70 | } else { 71 | performance->solve(); 72 | } 73 | // O/F ratio 74 | double r = performance->getPropellant()->getKm(); 75 | 76 | // Get nozzle exit object 77 | performance::equilibrium::NozzleSectionConditions* nozzleExit = performance->getExitSection(); 78 | 79 | double Is_v = nozzleExit->getIs_v(); 80 | double Is = nozzleExit->getIs(); 81 | double Is_SL = nozzleExit->getIs_H(CONST_ATM); 82 | 83 | printf("Is_SL=%8.3f m/s, Is_opt=%8.3f Is_vac=%8.3f\n", Is_SL/CONST_G, Is, Is_v); 84 | 85 | delete performance; 86 | delete data; 87 | 88 | util::Log::finalize(); 89 | 90 | return 0; 91 | } 92 | 93 | 94 | -------------------------------------------------------------------------------- /SDK/src/wrapper_client.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "wrapper.h" 4 | 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | int main(int argc, char* argv[]) { 10 | initialize(1); 11 | 12 | void* c = configFileLoad("examples/RD-170.cfg"); 13 | void* p = performanceCreate(c, 0, 0); 14 | 15 | performanceSolve(p, 0); 16 | performancePrint(p); 17 | 18 | performanceDelete(p); 19 | configFileDelete(c); 20 | 21 | finalize(); 22 | } 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | -------------------------------------------------------------------------------- /SDK/src/wrapper_client_1.py: -------------------------------------------------------------------------------- 1 | import ctypes 2 | 3 | # Load CDLL 4 | rpa = ctypes.CDLL("wrapper.dll"); 5 | 6 | # Declare used functions 7 | rpa.configFileLoad.argtypes = [ctypes.c_void_p]; 8 | rpa.performanceGetOF.argtypes = [ctypes.c_void_p]; 9 | rpa.performanceGetOF.restype = ctypes.c_double; 10 | rpa.performanceGetDeliveredIspH.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_double, ctypes.c_char_p, ctypes.c_double]; 11 | rpa.performanceGetDeliveredIspH.restype = ctypes.c_double; 12 | rpa.performanceGetDeliveredIsp.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_double, ctypes.c_char_p, ctypes.c_double]; 13 | rpa.performanceGetDeliveredIsp.restype = ctypes.c_double; 14 | rpa.chamberGetThroatDiameter.argtypes = [ctypes.c_void_p, ctypes.c_char_p]; 15 | rpa.chamberGetThroatDiameter.restype = ctypes.c_double; 16 | rpa.nozzleGetExitDiameter.restype = ctypes.c_double; 17 | rpa.nozzleGetLength.restype = ctypes.c_double; 18 | 19 | # Initialize RPA 20 | rpa.initialize(1); 21 | 22 | # Run analysis 23 | conf = rpa.configFileLoad("examples\\RD-170.cfg"); 24 | performance = rpa.performanceCreate(conf, 0, 0); 25 | rpa.performanceSolve(performance, 0); 26 | 27 | # Calculate combustion chamber and nozzle geometry 28 | chamber = rpa.chamberCreate(performance, 1); 29 | nozzle = rpa.nozzleCreate(chamber, 1); 30 | 31 | # Get results 32 | of = rpa.performanceGetOF(performance); 33 | Isp_SL = rpa.performanceGetDeliveredIspH(performance, "s", 0, "m", 0); 34 | Isp_vac = rpa.performanceGetDeliveredIsp(performance, "s", 0, "atm", 0); 35 | Dt = rpa.chamberGetThroatDiameter(chamber, "mm"); 36 | De = rpa.nozzleGetExitDiameter(nozzle, "mm"); 37 | Le = rpa.nozzleGetLength(nozzle, "mm"); 38 | 39 | print "O/F=%2.1f" % of; 40 | print "Isp(SL)=%3.2f s, Isp(vac)=%3.2f s" % (Isp_SL, Isp_vac); 41 | print "Dt=%4.2f mm, De=%4.2f mm Le=%4.2f mm" % (Dt, De, Le); 42 | 43 | # Release created objects 44 | rpa.nozzleDelete(nozzle); 45 | rpa.chamberDelete(chamber); 46 | rpa.performanceDelete(performance); 47 | rpa.configFileDelete(conf); 48 | 49 | # Finalize RPA 50 | rpa.finalize(); -------------------------------------------------------------------------------- /SDK/src/wrapper_client_2.py: -------------------------------------------------------------------------------- 1 | import ctypes 2 | 3 | # Load CDLL 4 | rpa = ctypes.CDLL("wrapper.dll"); 5 | 6 | # Declare used functions 7 | rpa.configFileLoad.argtypes = [ctypes.c_void_p]; 8 | rpa.performanceGetOF.argtypes = [ctypes.c_void_p]; 9 | rpa.performanceGetOF.restype = ctypes.c_double; 10 | rpa.performanceGetDeliveredIspH.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_double, ctypes.c_char_p, ctypes.c_double]; 11 | rpa.performanceGetDeliveredIspH.restype = ctypes.c_double; 12 | rpa.performanceGetDeliveredIsp.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_double, ctypes.c_char_p, ctypes.c_double]; 13 | rpa.performanceGetDeliveredIsp.restype = ctypes.c_double; 14 | rpa.chamberGetThroatDiameter.argtypes = [ctypes.c_void_p, ctypes.c_char_p]; 15 | rpa.chamberGetThroatDiameter.restype = ctypes.c_double; 16 | rpa.nozzleGetExitDiameter.restype = ctypes.c_double; 17 | rpa.nozzleGetLength.restype = ctypes.c_double; 18 | 19 | # Initialize RPA 20 | rpa.initialize(1); 21 | 22 | # Run analysis 23 | conf = rpa.configFileLoad("examples\\RD-170.cfg"); 24 | performance = rpa.performanceCreate(conf, 0, 0); 25 | rpa.performanceSolve(performance, 0); 26 | 27 | # Get results 28 | Isp_SL = rpa.performanceGetDeliveredIspH(performance, "s", 0, "m", 0); 29 | Isp_vac = rpa.performanceGetDeliveredIsp(performance, "s", 0, "atm", 0); 30 | 31 | print "Isp(SL)=%3.2f s, Isp(vac)=%3.2f s" % (Isp_SL, Isp_vac); 32 | 33 | # Calculate Isp at given altitudes (m) 34 | altitude_list = [0, 3e3, 5e3, 10e3, 20e3, 50e3]; 35 | for H in altitude_list : 36 | Isp = rpa.performanceGetDeliveredIspH(performance, "s", H, "m", 0); 37 | print "H=%3.0f km: Isp=%3.2f s" % (H/1000, Isp); 38 | 39 | # Release created objects 40 | rpa.performanceDelete(performance); 41 | rpa.configFileDelete(conf); 42 | 43 | # Finalize RPA 44 | rpa.finalize(); -------------------------------------------------------------------------------- /SDK/src/wrapper_client_3.py: -------------------------------------------------------------------------------- 1 | import ctypes 2 | 3 | # Load CDLL 4 | rpa = ctypes.CDLL("wrapper.dll"); 5 | 6 | # Declare used functions 7 | rpa.configFileLoad.argtypes = [ctypes.c_void_p]; 8 | rpa.configFileNozzlePropellantSetRatio.argtypes = [ctypes.c_void_p, ctypes.c_double, ctypes.c_char_p]; 9 | rpa.performanceGetOF.argtypes = [ctypes.c_void_p]; 10 | rpa.performanceGetOF.restype = ctypes.c_double; 11 | rpa.performanceGetDeliveredIspH.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_double, ctypes.c_char_p, ctypes.c_double] 12 | rpa.performanceGetDeliveredIspH.restype = ctypes.c_double; 13 | rpa.performanceGetDeliveredIsp.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_double, ctypes.c_char_p, ctypes.c_double] 14 | rpa.performanceGetDeliveredIsp.restype = ctypes.c_double; 15 | 16 | # Initialize RPA 17 | rpa.initialize(1); 18 | 19 | # Run analysis 20 | conf = rpa.configFileLoad("examples\\RD-170.cfg"); 21 | 22 | # Calculate performance at given O/F ratios 23 | of_ratios = [1.2, 1.5, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0]; 24 | for of in of_ratios : 25 | rpa.configFileNozzlePropellantSetRatio(conf, of, "O/F"); 26 | performance = rpa.performanceCreate(conf, 0, 0); 27 | rpa.performanceSolve(performance, 0); 28 | # Get results 29 | Isp_SL = rpa.performanceGetDeliveredIspH(performance, "s", 0, "m", 0); 30 | Isp_vac = rpa.performanceGetDeliveredIsp(performance, "s", 0, "atm", 0); 31 | print "O/F=%2.1f: Isp(SL)=%3.2f s, Isp(vac)=%3.2f s" % (of, Isp_SL, Isp_vac); 32 | # Release created objects 33 | rpa.performanceDelete(performance) 34 | 35 | 36 | # Release created objects 37 | rpa.configFileDelete(conf) 38 | 39 | # Finalize RPA 40 | rpa.finalize(); -------------------------------------------------------------------------------- /Scripts/H2OL_thermo.js: -------------------------------------------------------------------------------- 1 | 2 | // Enthalpy of propellant 3 | var H = -9311.2836; // kJ/kg 4 | 5 | 6 | mix = Mixture(); 7 | mix.addSpecies("H2O(L)"); 8 | // The sum "H2(L) mass fraction" (0.8) + "RP-1 mass frcation" (0.2) must be equal to 1.0 9 | 10 | chamber = Chamber(mix); 11 | chamber.setPH(100, "psi", H*mix.getM(), "J/mol"); 12 | chamber.setFcr(6); 13 | chamber.solve(true); 14 | 15 | nozzleExit = NozzleSectionConditions(chamber, 100, "A/At", true); 16 | 17 | 18 | // Print out propellant information 19 | mix.print("SI"); // USe "US" to print out results in US/Imperial system 20 | 21 | 22 | // Get objects Reaction and Derivatives for injector station (0). 23 | injector_r = chamber.getReaction(0); 24 | injector_d = chamber.getDerivatives(0); 25 | 26 | print("***************************************************"); 27 | print("Injector"); 28 | print("***************************************************"); 29 | injector_r.print("SI"); // USe "US" to print out results in US/Imperial system 30 | injector_d.print("SI"); 31 | 32 | /* 33 | // Uncomment this section if you need tp know all parameters at 34 | // nozzle inlet, nozzle throat, and nozzle exit 35 | 36 | 37 | // Get objects Reaction and Derivatives for nozzle inlet station (1). 38 | nozzleInlet_r = chamber.getReaction(1); 39 | nozzleInlet_d = chamber.getDerivatives(1); 40 | 41 | print("***************************************************"); 42 | print("Nozzle Inlet"); 43 | print("***************************************************"); 44 | nozzleInlet_r.print("SI"); // USe "US" to print out results in US/Imperial system 45 | nozzleInlet_d.print("SI"); 46 | 47 | 48 | // Get objects Reaction and Derivatives for nozzle throat station (2). 49 | throat_r = chamber.getReaction(2); 50 | throat_d = chamber.getDerivatives(2); 51 | 52 | print("***************************************************"); 53 | print("Nozzle Throat"); 54 | print("***************************************************"); 55 | throat_r.print("SI"); // USe "US" to print out results in US/Imperial system 56 | throat_d.print("SI"); 57 | 58 | 59 | // Get objects Reaction and Derivatives for nozzle exit. 60 | nozzleExit_r = nozzleExit.getReaction(); 61 | nozzleExit_d = nozzleExit.getDerivatives(); 62 | 63 | print("***************************************************"); 64 | print("Nozzle Exit"); 65 | print("***************************************************"); 66 | nozzleExit_r.print("SI"); // USe "US" to print out results in US/Imperial system 67 | nozzleExit_d.print("SI"); 68 | 69 | */ 70 | 71 | 72 | print("***************************************************"); 73 | print("Ideal performance"); 74 | print("***************************************************"); 75 | printf(" %6s=%8.2f s, %6s=%8.4f\n %6s=%8.2f s, %6s=%8.4f\n", 76 | "Is_v", nozzleExit.getIs_v("s"), 77 | "Cf_v", nozzleExit.getCf_v(), 78 | "Is_opt", nozzleExit.getIs("s"), 79 | "Cf_opt", nozzleExit.getCf() 80 | ); 81 | 82 | -------------------------------------------------------------------------------- /Scripts/RD-170-conf.js: -------------------------------------------------------------------------------- 1 | /*************************************************** 2 | RPA - Tool for Rocket Propulsion Analysis 3 | Copyright 2009-2015 Alexander Ponomarenko 4 | Please contact author 5 | or visit http://www.propulsion-analysis.com 6 | if you need additional information or have any questions. 7 | 8 | This example performes the following tasks: 9 | - solves engine performance problem 10 | - designs combustion chamber 11 | - designs nozzle contour 12 | - solves cycle analysis problem 13 | - estimates engine dry mass 14 | 15 | All parameters are obtained from configuration file "examples/cycle_analysis/RD-170.cfg". 16 | 17 | ****************************************************/ 18 | 19 | // This script is used for printing out the chamber parameters. 20 | load("utils.js"); 21 | 22 | //********************************* 23 | // Read configuration file 24 | 25 | conf = ConfigFile("examples/cycle_analysis/RD-170.cfg"); 26 | conf.read(); 27 | 28 | //********************************* 29 | // Solve engine performance problem 30 | 31 | perf = Performance(conf); 32 | perf.solve(); 33 | perf.printResults(); 34 | 35 | //********************************* 36 | // Design combustion chamber 37 | chamber = CombustionChamberContour(perf, CorrectionFactors(perf), conf); 38 | Utils.printChamberParameters(chamber); 39 | 40 | //********************************* 41 | // Design nozzle contour 42 | nozzle = NozzleContour(conf, chamber); 43 | Utils.printNozzleParameters(chamber, nozzle, 0); 44 | 45 | //********************************* 46 | // Solve cycle analysis problem 47 | cycle = EngineCycle(conf, nozzle); 48 | cycle.print(); 49 | 50 | p = CyclePerformance(perf, chamber, cycle); 51 | p.print(); 52 | 53 | //********************************* 54 | // Estimate engine dry mass 55 | m = MassEstimation(conf, cycle, nozzle); 56 | m.print(); 57 | 58 | -------------------------------------------------------------------------------- /Scripts/RD-170-conf2.js: -------------------------------------------------------------------------------- 1 | load("utils.js"); 2 | 3 | solver = Utils.load("examples/cycle_analysis/RD-170.cfg"); 4 | solver.run(); 5 | solver.print(); 6 | 7 | -------------------------------------------------------------------------------- /Scripts/RD-170.js: -------------------------------------------------------------------------------- 1 | // Example of solving ox-rich staged combustion cycle (RD-170) 2 | // with direct configuration of all parameters 3 | 4 | p_c = 24.5; // MPa 5 | 6 | ox = Mixture(); 7 | ox.addSpecies("O2(L)", 1.0); 8 | ox.checkFractions(true); 9 | ox.setT(80.0, "K"); 10 | 11 | fuel = Mixture(); 12 | fuel.addSpecies("RP-1", 1.0); 13 | fuel.checkFractions(true); 14 | fuel.setT(298.15, "K"); 15 | 16 | paramsOx = ChamberFeedSubsystemParameters("Oxidizer feed subsystem", ox, p_c, "MPa"); 17 | paramsOx.setMDot(1728.686, "kg/s"); 18 | paramsOx.setPIn(0.8, "MPa"); 19 | paramsOx.setVIn(5.0, "m/s"); 20 | paramsOx.setPOut(p_c, "MPa"); 21 | paramsOx.setPumpEta(0.74); 22 | paramsOx.setValveDeltaP(7.0, "MPa"); 23 | paramsOx.setInjectorDeltaP(3.0, "MPa"); 24 | 25 | paramsOxBoost = BoostPumpParameters(); 26 | paramsOxBoost.setPIn(paramsOx.getPIn()); 27 | paramsOxBoost.setPOut(1.2, "MPa"); 28 | paramsOxBoost.setPumpEta(0.7); 29 | paramsOxBoost.setGasTurbine(true); 30 | paramsOxBoost.setTurbineEta(0.7); 31 | paramsOxBoost.setTurbinePi(15); 32 | 33 | 34 | paramsFuel = ChamberFeedSubsystemParameters("Fuel Feed Subsystem", fuel, p_c, "MPa"); 35 | paramsFuel.setMDot(657.295, "kg/s"); 36 | paramsFuel.setPIn(0.75, "MPa"); 37 | paramsFuel.setVIn(5.0, "m/s"); 38 | paramsFuel.setPOut(p_c, "MPa"); 39 | paramsFuel.setPumpEta(0.74); 40 | paramsFuel.setValveDeltaP(7.0, "MPa"); 41 | paramsFuel.setCoolingDeltaP(15.0, "MPa"); 42 | paramsFuel.setInjectorDeltaP(2.5, "MPa"); 43 | 44 | paramsFuelBoost = BoostPumpParameters(); 45 | paramsFuelBoost.setPIn(paramsFuel.getPIn()); 46 | paramsFuelBoost.setPOut(1.2, "MPa"); 47 | paramsFuelBoost.setPumpEta(0.8); 48 | paramsFuelBoost.setHydraulicTurbine(true); 49 | paramsFuelBoost.setTurbineEta(0.7); 50 | paramsFuelBoost.setTurbinePi(1.3); 51 | 52 | paramsFuelGG = GasGeneratorBranchParameters(p_c, "MPa"); 53 | paramsFuelGG.setABar(0.3); 54 | paramsFuelGG.setMDot(paramsFuel.getMDot()*0.05, "kg/s"); 55 | paramsFuelGG.setPumpEta(0.7); 56 | paramsFuelGG.setValveDeltaP(3.0, "MPa"); 57 | paramsFuelGG.setInjectorDeltaP(3.0, "MPa"); 58 | paramsFuelGG.setFixedDeltaP(5.0, "MPa"); 59 | paramsFuelGG.setConnectToName("pump"); 60 | 61 | paramsGG = GasGeneratorParameters(p_c, "MPa", 0.95, 772, "K", "oxidizer_rich"); 62 | 63 | paramsT = TurbineParameters(1.5, 0.79); 64 | 65 | 66 | cycle = StagedCombustionCycle(p_c, "MPa", paramsOx, paramsFuel); 67 | cycle.addOxBoostPump(paramsOxBoost); 68 | cycle.addFuelBoostPump(paramsFuelBoost); 69 | cycle.addPreburner(paramsFuelGG, paramsGG); 70 | cycle.addTurbine(paramsT); 71 | 72 | cycle.setPrintLog(false); 73 | cycle.solve(); 74 | cycle.setPrintLog(true); 75 | 76 | cycle.print(); 77 | 78 | 79 | -------------------------------------------------------------------------------- /Scripts/RD-275-conf.js: -------------------------------------------------------------------------------- 1 | /*************************************************** 2 | RPA - Tool for Rocket Propulsion Analysis 3 | Copyright 2009-2015 Alexander Ponomarenko 4 | Please contact author 5 | or visit http://www.propulsion-analysis.com 6 | if you need additional information or have any questions. 7 | 8 | This example performes the following tasks: 9 | - solves engine performance problem 10 | - designs combustion chamber 11 | - designs nozzle contour 12 | - solves cycle analysis problem 13 | - estimates engine dry mass 14 | 15 | All parameters are obtained from configuration file "examples/cycle_analysis/RD-275.cfg". 16 | 17 | ****************************************************/ 18 | 19 | // This script is used for printing out the chamber parameters. 20 | load("utils.js"); 21 | 22 | //********************************* 23 | // Read configuration file 24 | 25 | conf = ConfigFile("examples/cycle_analysis/RD-275.cfg"); 26 | conf.read(); 27 | 28 | //********************************* 29 | // Solve engine performance problem 30 | 31 | perf = Performance(conf); 32 | perf.solve(); 33 | perf.printResults(); 34 | 35 | //********************************* 36 | // Design combustion chamber 37 | chamber = CombustionChamberContour(perf, CorrectionFactors(perf), conf); 38 | Utils.printChamberParameters(chamber); 39 | 40 | //********************************* 41 | // Design nozzle contour 42 | nozzle = NozzleContour(conf, chamber); 43 | Utils.printNozzleParameters(chamber, nozzle, 0); 44 | 45 | //********************************* 46 | // Solve cycle analysis problem 47 | cycle = EngineCycle(conf, nozzle); 48 | cycle.print(); 49 | 50 | p = CyclePerformance(perf, chamber, cycle); 51 | p.print(); 52 | 53 | //********************************* 54 | // Estimate engine dry mass 55 | m = MassEstimation(conf, cycle, nozzle); 56 | m.print(); 57 | 58 | -------------------------------------------------------------------------------- /Scripts/RD-275-conf2.js: -------------------------------------------------------------------------------- 1 | load("utils.js"); 2 | 3 | // Read configuration file 4 | 5 | conf = ConfigFile("examples/cycle_analysis/RD-275.cfg"); 6 | conf.read(); 7 | 8 | // Solve engine performance problem 9 | 10 | perf = Performance(conf); 11 | perf.solve(); 12 | 13 | //perf.printResults(); 14 | 15 | engineSizeConf = conf.getEngineSize(); 16 | chamberConf = conf.getChamberGeometry(); 17 | 18 | // Design combustion chamber 19 | chamber = CombustionChamberContour(perf, CorrectionFactors(perf)); 20 | 21 | // Configure the chamber 22 | 23 | if (engineSizeConf.isThrust()) { 24 | chamber.setThrust( 25 | engineSizeConf.getThrust("N"), "N", 26 | engineSizeConf.isAmbientPressure()?engineSizeConf.getAmbientPressure("Pa"):0, "Pa" 27 | ); 28 | } 29 | if (engineSizeConf.isMdot()) { 30 | chamber.setMdot(engineSizeConf.getMdot("kg/s")/engineSizeConf.getChambersNo(), "kg/s"); 31 | } 32 | if (engineSizeConf.isThroatD()) { 33 | chamber.setThroatD(engineSizeConf.getThroatD("m"), "m"); 34 | } 35 | 36 | chamber.setContractionAngle(chamberConf.getContractionAngle("degrees"), "degrees"); 37 | chamber.setR1ToRtRatio(chamberConf.getR1ToRtRatio()); 38 | chamber.setR2toR2max(chamberConf.getR2ToR2maxRatio()); 39 | if (chamberConf.isCharacteristicChamberLength()) { 40 | chamber.setLstar(chamberConf.getChamberLength("m"), "m"); 41 | } else { 42 | chamber.setLc(chamberConf.getChamberLength("m"), "m"); 43 | } 44 | 45 | 46 | chamber.calcGeometry(); 47 | Utils.printChamberParameters(chamber); 48 | 49 | // Design nozzle contour 50 | nozzle = MocNozzleContour(chamber); 51 | // Configure nozzle via parameters of the function: 52 | nozzle.calcGeometryAtFixedArea(chamber.getFre(), chamber.getDc("m")/chamber.getDt("m"), chamberConf.getRnToRtRatio(), chamberConf.isTwToT0()?chamberConf.getTwToT0():0.3); 53 | Utils.printNozzleParameters(chamber, nozzle, 0); 54 | 55 | // Solve cycle analysis problem 56 | cycle = EngineCycle(conf, nozzle); 57 | cycle.print(); 58 | 59 | // Estimate engine performance 60 | p = CyclePerformance(perf, chamber, cycle); 61 | p.print(); 62 | 63 | // Estimate engine dry mass 64 | m = MassEstimation(conf, cycle, nozzle); 65 | m.print(); 66 | 67 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /Scripts/RD-275-conf3.js: -------------------------------------------------------------------------------- 1 | load("utils.js"); 2 | 3 | solver = Utils.load("examples/cycle_analysis/RD-275.cfg"); 4 | solver.run(Utils.Solver.ALL); 5 | solver.print(Utils.Solver.ALL); 6 | 7 | -------------------------------------------------------------------------------- /Scripts/SSME-conf.js: -------------------------------------------------------------------------------- 1 | load("utils.js"); 2 | 3 | solver = Utils.load("examples/cycle_analysis/SSME.cfg"); 4 | solver.run(); 5 | solver.print(); 6 | 7 | -------------------------------------------------------------------------------- /Scripts/SSME.js: -------------------------------------------------------------------------------- 1 | // SSME 2 | 3 | p_c = 22.6148; // MPa 4 | 5 | ox = Mixture(); 6 | ox.addSpecies("O2(L)", 1.0); 7 | ox.checkFractions(true); 8 | ox.setT(ox.getSpecies(0).getT0(), "K"); 9 | 10 | fuel = Mixture(); 11 | fuel.addSpecies("H2(L)", 1.0); 12 | fuel.checkFractions(true); 13 | fuel.setT(fuel.getSpecies(0).getT0(), "K"); 14 | 15 | 16 | paramsOx = ChamberFeedSubsystemParameters("Oxidizer feed subsystem", ox, p_c, "MPa"); 17 | paramsOx.setMDot(440.374, "kg/s"); 18 | paramsOx.setPIn(0.7, "MPa"); 19 | paramsOx.setVIn(5.0, "m/s"); 20 | paramsOx.setPOut(p_c, "MPa"); 21 | paramsOx.setPumpEta(0.7); 22 | paramsOx.setValveDeltaP(0.5, "MPa"); 23 | paramsOx.setInjectorDeltaP(1.0, "MPa"); 24 | 25 | paramsOxBoost = BoostPumpParameters(); 26 | paramsOxBoost.setPIn(paramsOx.getPIn()); 27 | paramsOxBoost.setPOut(3.0, "MPa"); 28 | paramsOxBoost.setPumpEta(0.7); 29 | paramsOxBoost.setHydraulicTurbine(true); 30 | paramsOxBoost.setTurbineEta(0.7); 31 | paramsOxBoost.setTurbinePi(20); 32 | 33 | paramsOxGG1 = GasGeneratorBranchParameters(p_c, "MPa"); 34 | paramsOxGG1.setABar(0.3); 35 | paramsOxGG1.setPumpEta(0.7); 36 | paramsOxGG1.setValveDeltaP(0.5, "MPa"); 37 | paramsOxGG1.setInjectorDeltaP(1.0, "MPa"); 38 | paramsOxGG1.setConnectToName("pump"); 39 | 40 | paramsOxGG2 = GasGeneratorBranchParameters(p_c, "MPa"); 41 | paramsOxGG2.setABar(0.3); 42 | paramsOxGG2.setPumpEta(0.7); 43 | paramsOxGG2.setValveDeltaP(0.5, "MPa"); 44 | paramsOxGG2.setInjectorDeltaP(1.0, "MPa"); 45 | paramsOxGG2.setConnectToName("pump"); 46 | 47 | 48 | paramsFuel = ChamberFeedSubsystemParameters("Fuel Feed Subsystem", fuel, p_c, "MPa"); 49 | paramsFuel.setMDot(73.396, "kg/s"); 50 | paramsFuel.setPIn(0.2, "MPa"); 51 | paramsFuel.setVIn(5.0, "m/s"); 52 | paramsFuel.setPOut(p_c, "MPa"); 53 | paramsFuel.setPumpEta(0.7); 54 | paramsFuel.setValveDeltaP(0.5, "MPa"); 55 | paramsFuel.setInjectorDeltaP(1.0, "MPa"); 56 | 57 | paramsFuelBoost = BoostPumpParameters(); 58 | paramsFuelBoost.setPIn(paramsOx.getPIn()); 59 | paramsFuelBoost.setPOut(2.0, "MPa"); 60 | paramsFuelBoost.setPumpEta(0.7); 61 | paramsFuelBoost.setHydraulicTurbine(true); 62 | paramsFuelBoost.setTurbineEta(0.7); 63 | paramsFuelBoost.setTurbinePi(20); 64 | 65 | paramsFuelGG1 = GasGeneratorBranchParameters(p_c, "MPa"); 66 | paramsFuelGG1.setABar(0.3); 67 | paramsFuelGG1.setMDot(paramsFuel.getMDot()*0.2, "kg/s"); 68 | paramsFuelGG1.setValveDeltaP(0.5, "MPa"); 69 | paramsFuelGG1.setInjectorDeltaP(1.0, "MPa"); 70 | paramsFuelGG1.setConnectToName("pump"); 71 | 72 | branch = BranchParameters("Chamber Cooling"); 73 | branch.setABar(0.3); 74 | branch.setMDot(paramsFuel.getMDot()*0.2, "kg/s"); 75 | branch.setPumpEta(0.7); 76 | branch.setPOut(p_c, "MPa"); 77 | branch.setValveDeltaP(0.5, "MPa"); 78 | branch.setCoolingDeltaP(7.0, "MPa"); 79 | branch.connectTo = "pump"; 80 | 81 | 82 | paramsGG1 = GasGeneratorParameters(p_c, "MPa", 0.95, 815, "K", "fuel_rich"); 83 | paramsGG2 = GasGeneratorParameters(p_c, "MPa", 0.95, 960, "K", "fuel_rich"); 84 | 85 | paramsT1 = TurbineParameters(2.0, 0.7); 86 | paramsT2 = TurbineParameters(2.0, 0.7); 87 | 88 | 89 | cycle = StagedCombustionCycle(p_c, "MPa", paramsOx, paramsFuel); 90 | cycle.addOxBoostPump(paramsOxBoost); 91 | cycle.addFuelBoostPump(paramsFuelBoost); 92 | cycle.addPreburners(paramsFuelGG1, paramsOxGG1, paramsGG1, paramsOxGG2, paramsGG2); 93 | cycle.addTurbine(paramsT1); 94 | cycle.addTurbine(paramsT2); 95 | cycle.addFuelBranch(branch); 96 | 97 | cycle.setPrintLog(false); 98 | cycle.solve(); 99 | cycle.setPrintLog(true); 100 | 101 | cycle.print(); 102 | 103 | 104 | -------------------------------------------------------------------------------- /Scripts/Vulcain-2-conf.js: -------------------------------------------------------------------------------- 1 | /*************************************************** 2 | RPA - Tool for Rocket Propulsion Analysis 3 | Copyright 2009-2015 Alexander Ponomarenko 4 | Please contact author 5 | or visit http://www.propulsion-analysis.com 6 | if you need additional information or have any questions. 7 | 8 | This example performes the following tasks: 9 | - solves engine performance problem 10 | - designs combustion chamber 11 | - designs nozzle contour 12 | - solves cycle analysis problem 13 | - estimates engine dry mass 14 | 15 | All parameters are obtained from configuration file "examples/cycle_analysis/Vulcain-2.cfg". 16 | 17 | ****************************************************/ 18 | 19 | // This script is used for printing out the chamber parameters. 20 | load("utils.js"); 21 | 22 | solver = Utils.load("examples/cycle_analysis/Vulcain-2.cfg"); 23 | 24 | solver.run(); 25 | solver.print(); 26 | 27 | 28 | exit(); 29 | 30 | //********************************* 31 | // Read configuration file 32 | 33 | conf = ConfigFile("examples/cycle_analysis/Vulcain-2.cfg"); 34 | conf.read(); 35 | 36 | //********************************* 37 | // Solve engine performance problem 38 | 39 | perf = Performance(conf); 40 | perf.solve(); 41 | perf.printResults(); 42 | 43 | //********************************* 44 | // Design combustion chamber 45 | chamber = CombustionChamberContour(perf, CorrectionFactors(perf), conf); 46 | Utils.printChamberParameters(chamber); 47 | 48 | //********************************* 49 | // Design nozzle contour 50 | nozzle = NozzleContour(conf, chamber); 51 | Utils.printNozzleParameters(chamber, nozzle, 0); 52 | 53 | //********************************* 54 | // Solve cycle analysis problem 55 | cycle = EngineCycle(conf, nozzle); 56 | cycle.print(); 57 | 58 | //********************************* 59 | // Estimate cycle performence 60 | p = CyclePerformance(perf, chamber, cycle); 61 | p.print(); 62 | 63 | //********************************* 64 | // Estimate engine dry mass 65 | m = MassEstimation(conf, cycle, nozzle); 66 | m.print(); 67 | 68 | -------------------------------------------------------------------------------- /Scripts/Vulcain-2-conf2.js: -------------------------------------------------------------------------------- 1 | /*************************************************** 2 | RPA - Tool for Rocket Propulsion Analysis 3 | Copyright 2009-2015 Alexander Ponomarenko 4 | Please contact author 5 | or visit http://www.propulsion-analysis.com 6 | if you need additional information or have any questions. 7 | 8 | This example performes the following tasks: 9 | - solves engine performance problem 10 | - designs combustion chamber 11 | - designs nozzle contour 12 | - solves cycle analysis problem 13 | - estimates engine dry mass 14 | 15 | All parameters are obtained from configuration file "examples/cycle_analysis/Vulcain-2.cfg". 16 | 17 | ****************************************************/ 18 | 19 | load("utils.js"); 20 | 21 | solver = Utils.load("examples/cycle_analysis/Vulcain-2.cfg"); 22 | solver.run(); 23 | solver.print(); 24 | -------------------------------------------------------------------------------- /Scripts/Vulcain-2.js: -------------------------------------------------------------------------------- 1 | // Example of solving GG-cycle (Vulcaun-2) with 2 | // direct configuration of all parameters 3 | 4 | p_c = 11.73; // MPa 5 | 6 | ox = Mixture(); 7 | ox.addSpecies("O2(L)", 1.0); 8 | ox.checkFractions(true); 9 | ox.setT(90.17, "K"); 10 | 11 | fuel = Mixture(); 12 | fuel.addSpecies("H2(L)", 1.0); 13 | fuel.checkFractions(true); 14 | fuel.setT(20.27, "K"); 15 | 16 | paramsOx = ChamberFeedSubsystemParameters("Oxidizer feed subsystem", ox, p_c, "MPa"); 17 | paramsOx.setMDot(280.74, "kg/s"); 18 | paramsOx.setPIn(0.7, "MPa"); 19 | paramsOx.setVIn(5.0, "m/s"); 20 | paramsOx.setPOut(p_c, "MPa"); 21 | paramsOx.setPumpEta(0.7); 22 | paramsOx.setValveDeltaP(0.5, "MPa"); 23 | paramsOx.setInjectorDeltaP(0.5, "MPa"); 24 | 25 | paramsOxGG = GasGeneratorBranchParameters(p_c, "MPa"); 26 | paramsOxGG.setValveDeltaP(1.0, "MPa"); 27 | paramsOxGG.setInjectorDeltaP(0.5, "MPa"); 28 | //ramsOxGG.setConnectToName("pump"); 29 | 30 | 31 | paramsFuel = ChamberFeedSubsystemParameters("Fuel Feed Subsystem", fuel, p_c, "MPa"); 32 | paramsFuel.setMDot(41.90, "kg/s"); 33 | paramsFuel.setPIn(0.3, "MPa"); 34 | paramsFuel.setVIn(5.0, "m/s"); 35 | paramsFuel.setPOut(p_c, "MPa"); 36 | paramsFuel.setPumpEta(0.7); 37 | paramsFuel.setValveDeltaP(0.5, "MPa"); 38 | paramsFuel.setCoolingDeltaP(5, "MPa"); // 1.5*ComponentFeedSystem.getCoolingPressureDrop(p_c, "MPa") 39 | paramsFuel.setInjectorDeltaP(0.5, "MPa"); 40 | 41 | 42 | paramsFuelGG = GasGeneratorBranchParameters(p_c, "MPa"); 43 | paramsFuelGG.setValveDeltaP(1.0, "MPa"); 44 | paramsFuelGG.setInjectorDeltaP(0.5, "MPa"); 45 | paramsFuelGG.setConnectToName("pump"); 46 | 47 | paramsGG = GasGeneratorParameters(10.1, "MPa", 0.90, 875, "K", "fuel_rich"); 48 | 49 | paramsT1 = TurbineParameters(12.0, 0.7); 50 | paramsT2 = TurbineParameters(18.0, 0.7); 51 | 52 | 53 | cycle = GasGeneratorCycle(p_c, "MPa", paramsOx, paramsFuel); 54 | cycle.addGasGenerator(paramsOxGG, paramsFuelGG, paramsGG); 55 | cycle.addTurbine(paramsT1); 56 | cycle.addTurbine(paramsT2, "parallel"); 57 | cycle.setPrintLog(false); 58 | 59 | cycle.setPrintLog(false); 60 | cycle.solve(); 61 | cycle.setPrintLog(true); 62 | cycle.print(); 63 | 64 | -------------------------------------------------------------------------------- /Scripts/frozen.js: -------------------------------------------------------------------------------- 1 | /*************************************************** 2 | RPA - Tool for Rocket Propulsion Analysis 3 | Copyright 2009-2014 Alexander Ponomarenko 4 | Please contact author 5 | or visit http://www.propulsion-analysis.com 6 | if you need additional information or have any questions. 7 | 8 | frozen.js 9 | 10 | ****************************************************/ 11 | 12 | load("resources/scripts/printf.js"); 13 | 14 | 15 | prop = Propellant(); 16 | prop.setRatio(6.0, "O/F"); // Set O/F weight ratio 17 | prop.addOxidizer("O2(L)"); // Add oxidizer at it's normal temperature and atmospheric pressure 18 | prop.addFuel("H2(L)"); // Add fuel at it's normal temperature and atmospheric pressure 19 | 20 | // Define chamber to calculate performance with frozen equilibrium flow, 21 | // specifying nozzle area ratio where shifting equilibrium model swtitched to frozen one 22 | chamber = ChamberFr(prop, true, true, 10, "A/At"); 23 | chamber.setP(10, "MPa"); // Chamber pressure 24 | chamber.setFcr(3); // Nozzle inlet contraction area ratio 25 | chamber.solve(true); // finiteChamberSection=true 26 | 27 | // Get nozzle area ratio where shifting equilibrium model swtitched to frozen one 28 | frozenAt = chamber.getEquilibriumSection().getFr(); 29 | 30 | // Define an array with different expansion area ratios. 31 | r = [2, 5, 10, 20, 26.2, 40]; 32 | 33 | // Print out table header 34 | printf("#%5s %8s %8s %8s", "A/At", "Is_v,s", "Is_v,m/s", "Is,ft/s"); 35 | 36 | // Optional: pre-initialize the inner A/At table for better performance 37 | NozzleSectionConditions(chamber, frozenAt, "A/At", true) 38 | 39 | // Calculate performamce for each area ratio in the array. 40 | for (i=0; ifrozenAt ? NozzleSectionConditionsFr(chamber, r[i], "A/At", true) : NozzleSectionConditions(chamber, r[i], "A/At", true); 43 | 44 | // Print out current area ratio and calculated vacuum specific impulse in s, m/s and ft/s. 45 | printf(" %5.2f %8.2f %8.2f %8.2f", 46 | r[i], 47 | s.getIs_v("s"), 48 | s.getIs_v("m/s"), 49 | s.getIs_v("ft/s") 50 | ); 51 | 52 | } 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /Scripts/gg_cycle.js: -------------------------------------------------------------------------------- 1 | // Example of solving the GG cycle with direct configuration of all parameters 2 | 3 | 4 | printDesignParams = false; 5 | 6 | p_c = 7; // MPa 7 | 8 | ox = Mixture(); 9 | ox.addSpecies("O2(L)", 1.0); 10 | ox.checkFractions(true); 11 | ox.setT(90, "K"); 12 | 13 | fuel = Mixture(); 14 | fuel.addSpecies("H2(L)", 1.0); 15 | fuel.checkFractions(true); 16 | fuel.setT(21, "K"); 17 | 18 | 19 | paramsOx = ChamberFeedSubsystemParameters("Oxidizer", ox, p_c, "MPa"); 20 | paramsOx.setMDot(13, "kg/s"); 21 | paramsOx.setPIn(0.7, "MPa"); 22 | paramsOx.setVIn(3.0, "m/s"); 23 | paramsOx.setPOut(p_c, "MPa"); 24 | paramsOx.setPumpEta(0.7); 25 | paramsOx.setValveDeltaP(0.15*p_c, "MPa"); 26 | paramsOx.setValveZeta(0); 27 | paramsOx.setInjectorDeltaP(1.5*ComponentFeedSystem.getInjectorPressureDrop(p_c, "MPa"), "MPa"); 28 | paramsOx.setInjectorMu(0); 29 | 30 | paramsOxBoost = BoostPumpParameters(); 31 | paramsOxBoost.setPIn(paramsOx.getPIn("MPa"), "MPa"); 32 | paramsOxBoost.setPOut(paramsOx.getPIn("MPa")+0.2, "MPa"); 33 | paramsOxBoost.setPumpEta(0.65); 34 | paramsOxBoost.setGasTurbine(); 35 | paramsOxBoost.setTurbineEta(0.7); 36 | 37 | paramsOxGG = GasGeneratorBranchParameters(p_c, "MPa"); 38 | paramsOxGG.setMDot(paramsOx.getMDot()*0.05, "kg/s"); 39 | paramsOxGG.setValveDeltaP(1.5, "MPa"); 40 | paramsOxGG.setInjectorDeltaP(1.5*ComponentFeedSystem.getInjectorPressureDrop(p_c, "MPa"), "MPa"); 41 | paramsOxGG.setInjectorMu(0.7); 42 | paramsOxGG.setConnectToName("pump"); 43 | 44 | 45 | paramsFuel = ChamberFeedSubsystemParameters("Fuel", fuel, p_c, "MPa"); 46 | paramsFuel.setMDot(2, "kg/s"); 47 | paramsFuel.setPIn(0.7, "MPa"); 48 | paramsFuel.setVIn(5.0, "m/s"); 49 | paramsFuel.setPOut(p_c, "MPa"); 50 | paramsFuel.setPumpEta(0.7); 51 | paramsFuel.setValveDeltaP(0.15*p_c, "MPa"); 52 | paramsFuel.setValveZeta(0); 53 | paramsFuel.setCoolingDeltaP(1.5*ComponentFeedSystem.getCoolingPressureDrop(p_c, "MPa"), "MPa"); 54 | paramsFuel.setInjectorDeltaP(1.5*ComponentFeedSystem.getInjectorPressureDrop(p_c, "MPa"), "MPa"); 55 | paramsFuel.setInjectorMu(0); 56 | 57 | 58 | paramsFuelGG = GasGeneratorBranchParameters(p_c, "MPa"); 59 | paramsFuelGG.setMDot(paramsFuel.getMDot()*0.05, "kg/s"); 60 | paramsFuelGG.setValveDeltaP(1.5, "MPa"); 61 | paramsFuelGG.setInjectorDeltaP(1.5*ComponentFeedSystem.getInjectorPressureDrop(p_c, "MPa"), "MPa"); 62 | paramsFuelGG.setInjectorMu(0.7); 63 | paramsFuelGG.setConnectToName("pump"); 64 | 65 | paramsGG = GasGeneratorParameters(0.8*p_c, "MPa", 0.97, 1000, "K", "fuel_rich"); 66 | 67 | paramsT1 = TurbineParameters(2.5, 0.75); 68 | paramsT2 = TurbineParameters(5.0, 0.75); 69 | 70 | branch = BranchParameters("test"); 71 | branch.setMDot(paramsOx.getMDot("kg/s")*0.1, "kg/s"); 72 | branch.setPumpEta(0.7); 73 | branch.setPOut(p_c*2, "MPa"); 74 | branch.setFixedDeltaP(1, "MPa"); 75 | branch.setConnectToName("pump"); 76 | 77 | cycle = GasGeneratorCycle(p_c, "MPa", paramsOx, paramsFuel); 78 | cycle.addOxBoostPump(paramsOxBoost); 79 | cycle.addGasGenerator(paramsOxGG, paramsFuelGG, paramsGG); 80 | cycle.addTurbine(paramsT1); 81 | cycle.addTurbine(paramsT2, "parallel"); 82 | cycle.addOxBranch(branch); 83 | cycle.setPrintLog(true); 84 | 85 | cycle.setPrintLog(false); 86 | cycle.solve(); 87 | cycle.setPrintLog(true); 88 | 89 | cycle.print(); 90 | -------------------------------------------------------------------------------- /Scripts/mixture.js: -------------------------------------------------------------------------------- 1 | /*************************************************** 2 | RPA - Tool for Rocket Propulsion Analysis 3 | Copyright 2009-2014 Alexander Ponomarenko 4 | Please contact author 5 | or visit http://www.propulsion-analysis.com 6 | if you need additional information or have any questions. 7 | 8 | propellant1.js 9 | 10 | 11 | ****************************************************/ 12 | 13 | load("resources/scripts/printf.js"); 14 | 15 | 16 | mix = Mixture(); 17 | mix.addSpecies("O2(L)", 0.8); // Add 1st component at it's normal temperature and atmospheric pressure 18 | mix.addSpecies("H2(L)", 0.02); // Add 2nd component at it's normal temperature and atmospheric pressure 19 | mix.addSpecies("RP-1", 0, "K", 3, "atm", 0.15); // Add 3rd component at it's normal temperature and pressure 3 atm 20 | mix.addSpecies("AL(cr)", 0.03); // Add 4th component at it's normal temperature and atmospheric pressure 21 | // The sum "O2(L) mass fraction" (0.8) + "H2(L) mass frcation" (0.02) + "RP-1 mass fraction" (0.15) + "AL(cr) mass fcraction" (0.03) must be equal to 1.0 22 | 23 | chamber = Chamber(mix); 24 | chamber.setP(10, "MPa"); // Chamber pressure 25 | chamber.setFcr(3); // Nozzle inlet contraction area ratio 26 | chamber.solve(true); // finiteChamberSection=true 27 | 28 | 29 | nozzleExit = NozzleSectionConditions(chamber, 40, "A/At", true); 30 | 31 | 32 | // Get objects Reaction and Derivatives for injector station (0). 33 | injector_r = chamber.getReaction(0); 34 | injector_d = chamber.getDerivatives(0); 35 | 36 | // Get objects Reaction and Derivatives for nozzle inlet station (1). 37 | nozzleInlet_r = chamber.getReaction(1); 38 | nozzleInlet_d = chamber.getDerivatives(1); 39 | 40 | // Get objects Reaction and Derivatives for nozzle throat station (2). 41 | throat_r = chamber.getReaction(2); 42 | throat_d = chamber.getDerivatives(2); 43 | 44 | // Get objects Reaction and Derivatives for nozzle exit. 45 | nozzleExit_r = nozzleExit.getReaction(); 46 | nozzleExit_d = nozzleExit.getDerivatives(); 47 | 48 | // Print out propellant information 49 | mix.print("US"); 50 | 51 | print("***************************************************"); 52 | print("Injector"); 53 | print("***************************************************"); 54 | injector_r.print("US"); 55 | injector_d.print("US"); 56 | 57 | print("***************************************************"); 58 | print("Nozzle Inlet"); 59 | print("***************************************************"); 60 | nozzleInlet_r.print("US"); 61 | nozzleInlet_d.print("US"); 62 | 63 | print("***************************************************"); 64 | print("Nozzle Throat"); 65 | print("***************************************************"); 66 | throat_r.print("US"); 67 | throat_d.print("US"); 68 | 69 | print("***************************************************"); 70 | print("Nozzle Exit"); 71 | print("***************************************************"); 72 | nozzleExit_r.print("US"); 73 | nozzleExit_d.print("US"); 74 | 75 | print("***************************************************"); 76 | print("Performance"); 77 | print("***************************************************"); 78 | printf(" Is_v=%8.2f s\n Is_opt=%8.2f s\n Is_sl=%8.2fs", 79 | nozzleExit.getIs_v("s"), 80 | nozzleExit.getIs("s"), 81 | nozzleExit.getIs_H(1, "atm", "s") 82 | ); 83 | -------------------------------------------------------------------------------- /Scripts/nested_analysis1.js: -------------------------------------------------------------------------------- 1 | /*************************************************** 2 | RPA - Tool for Rocket Propulsion Analysis 3 | Copyright 2009-2014 Alexander Ponomarenko 4 | Please contact author 5 | or visit http://www.propulsion-analysis.com 6 | if you need additional information or have any questions. 7 | 8 | nested_analysis1.js 9 | 10 | ****************************************************/ 11 | 12 | load("resources/scripts/printf.js"); 13 | 14 | // Load configuration file "examples/RD-275.cfg". 15 | c = ConfigFile("examples/RD-275.cfg"); 16 | c.read(); 17 | 18 | // Create Performance object, initializing it with loaded configuration. 19 | p = Performance(c); 20 | 21 | // Array of O/F weight ratios 22 | r = [2.5, 2.6, 2.7, 2.8, 2.9, 3.0, 3.1]; 23 | 24 | // Define an array with different expansion area ratios. 25 | a = [10, 20, 30, 40]; 26 | 27 | // Print out table header 28 | printf("#%4s %5s %8s %8s %8s", "r", "A/At", "Is_v,s", "Is_opt,s", "Is_sl,s"); 29 | 30 | // Solve the performance problem for each ratio in the array. 31 | for (i=0; i 5 | or visit http://www.propulsion-analysis.com 6 | if you need additional information or have any questions. 7 | 8 | nested_analysis2.js 9 | 10 | ****************************************************/ 11 | 12 | load("resources/scripts/printf.js"); 13 | 14 | // Load configuration file "examples/RD-275.cfg". 15 | c = ConfigFile("examples/RD-275.cfg"); 16 | c.read(); 17 | 18 | // Create Performance object, initializing it with loaded configuration. 19 | p = Performance(c); 20 | 21 | // Array with different values of O/F weight ratio 22 | r = [2.4, 2.6, 2.8, 3.0, 3.2, 3.4]; 23 | r_unit = "O/F"; 24 | 25 | // Array with different values of combustion chamber pressure (MPa). 26 | pc = [5, 10, 15, 20]; 27 | pc_unit = "MPa"; 28 | 29 | // Nozzle exit area ratio 30 | Aexit = 26; 31 | 32 | // Print out table header 33 | printf("#%4s %6s %5s %8s %8s %8s", "r", "pc,MPa", "A/At", "Is_v,s", "Is_opt,s", "Is_sl,s"); 34 | 35 | // Solve the performance problem for each ratio in the array. 36 | for (i=0; i 5 | or visit http://www.propulsion-analysis.com 6 | if you need additional information or have any questions. 7 | 8 | performance1.js 9 | 10 | This script loads existing configuration file, 11 | solves the performance problem and prints out the results. 12 | 13 | ****************************************************/ 14 | 15 | // Load configuration file "examples/RD-275.cfg". 16 | c = ConfigFile("examples/RD-275.cfg"); 17 | c.read(); 18 | 19 | // Create Performance object, initializing it with loaded configuration. 20 | p = Performance(c); 21 | 22 | // Solve the problem 23 | p.solve(); 24 | 25 | // Print out the results in SI units (default). 26 | p.printResults(); 27 | 28 | -------------------------------------------------------------------------------- /Scripts/performance2.js: -------------------------------------------------------------------------------- 1 | /*************************************************** 2 | RPA - Tool for Rocket Propulsion Analysis 3 | Copyright 2009-2014 Alexander Ponomarenko 4 | Please contact author 5 | or visit http://www.propulsion-analysis.com 6 | if you need additional information or have any questions. 7 | 8 | performance2.js 9 | 10 | This script loads existing configuration file, 11 | solves the performance problem and prints out the 12 | combustion parameters for each station "injector", 13 | "nozzle inlet", "nozzle throat" and "nozzle exit" separately. 14 | 15 | ****************************************************/ 16 | 17 | // Load configuration file "examples/RD-275.cfg". 18 | c = ConfigFile("examples/RD-275.cfg"); 19 | c.read(); 20 | 21 | // Create Performance object, initializing it with loaded configuration. 22 | p = Performance(c); 23 | 24 | // Solve the problem. 25 | p.solve(); 26 | 27 | // Get the combustion chamber object. 28 | chamber = p.getChamber(); 29 | 30 | // Get objects Reaction and Derivatives for injector station (0). 31 | injector_r = chamber.getReaction(0); 32 | injector_d = chamber.getDerivatives(0); 33 | 34 | // Get objects Reaction and Derivatives for nozzle inlet station (1). 35 | nozzleInlet_r = chamber.getReaction(1); 36 | nozzleInlet_d = chamber.getDerivatives(1); 37 | 38 | // Get objects Reaction and Derivatives for nozzle throat station (2). 39 | throat_r = chamber.getReaction(2); 40 | throat_d = chamber.getDerivatives(2); 41 | 42 | // Get objects Reaction and Derivatives for nozzle exit station. 43 | nozzleExit_r = p.getNozzleExitSection().getReaction(); 44 | nozzleExit_d = p.getNozzleExitSection().getDerivatives(); 45 | 46 | // Print out the results in US units. 47 | 48 | print("***************************************************"); 49 | print("Injector"); 50 | print("***************************************************"); 51 | injector_r.print("US"); 52 | injector_d.print("US"); 53 | 54 | print("***************************************************"); 55 | print("Nozzle Inlet"); 56 | print("***************************************************"); 57 | nozzleInlet_r.print("US"); 58 | nozzleInlet_d.print("US"); 59 | 60 | print("***************************************************"); 61 | print("Nozzle Throat"); 62 | print("***************************************************"); 63 | throat_r.print("US"); 64 | throat_d.print("US"); 65 | 66 | print("***************************************************"); 67 | print("Nozzle Exit"); 68 | print("***************************************************"); 69 | if (null!=nozzleExit_r) { 70 | nozzleExit_r.print("US"); 71 | nozzleExit_d.print("US"); 72 | } else { 73 | // Frozen flow model! 74 | // Objects "Reaction" and "Derivatives" could not be obtained for nozzle exit station. 75 | s = p.getNozzleExitSection(); 76 | s.printResults("US"); 77 | } 78 | -------------------------------------------------------------------------------- /Scripts/performance3.js: -------------------------------------------------------------------------------- 1 | /*************************************************** 2 | RPA - Tool for Rocket Propulsion Analysis 3 | Copyright 2009-2014 Alexander Ponomarenko 4 | Please contact author 5 | or visit http://www.propulsion-analysis.com 6 | if you need additional information or have any questions. 7 | 8 | performance2.js 9 | 10 | This script loads existing configuration file, and runs a number 11 | of problems, replacing the preconfigured O/F ratio with values 12 | from array. 13 | 14 | ****************************************************/ 15 | 16 | load("resources/scripts/printf.js"); 17 | 18 | // Load configuration file "examples/RD-275.cfg". 19 | c = ConfigFile("examples/RD-275.cfg"); 20 | c.read(); 21 | 22 | // Create Performance object, initializing it with loaded configuration. 23 | p = Performance(c); 24 | 25 | // Array of O/F weight ratios 26 | r = [2.5, 2.6, 2.7, 2.8, 2.9, 3.0, 3.1]; 27 | 28 | 29 | // Print out table header 30 | printf("#%4s %8s %8s %8s", "r", "Is_v,s", "Is_opt,s", "Is_sl,s"); 31 | 32 | 33 | // Solve the performance problem for each ratio in the array. 34 | for (i=0; i 5 | or visit http://www.propulsion-analysis.com 6 | if you need additional information or have any questions. 7 | 8 | performance4.js 9 | 10 | This script loads existing configuration file, solves the main problem to obtain chamber conditions, 11 | and then calculates the performance for nozzles with different expansion area ratio. 12 | 13 | ****************************************************/ 14 | 15 | load("resources/scripts/printf.js"); 16 | 17 | // Load configuration file "examples/RD-275.cfg". 18 | c = ConfigFile("examples/RD-275.cfg"); 19 | c.read(); 20 | 21 | // Create Performance object, initializing it with loaded configuration, 22 | // and then solve the problem to get chamber/throat conditions. 23 | p = Performance(c); 24 | p.solve(); 25 | 26 | // Print out configured area ratio and corresponding vacuum specific impulse 27 | print("#Configured A/At = "+p.getNozzleExitSection().getFr().toFixed(2)+" Is_v = "+p.getNozzleExitSection().getIs_v("m/s").toPrecision(7)+" m/s"); 28 | 29 | // Define an array with different expansion area ratios. 30 | // Note that area ratio 26.2 is equal to the preconfigured one for RD-275. 31 | r = [10, 20, 26.2, 40]; 32 | 33 | // Print out table header 34 | printf("#%5s %8s %8s %8s", "A/At", "Is_v,s", "Is_v,m/s", "Is,ft/s"); 35 | 36 | // Calculate performamce for each area ratio in the array. 37 | for (i=0; i 5 | or visit http://www.propulsion-analysis.com 6 | if you need additional information or have any questions. 7 | 8 | performance5.js 9 | 10 | ****************************************************/ 11 | 12 | load("resources/scripts/printf.js"); 13 | 14 | 15 | // Load configuration file "examples/RD-275.cfg". 16 | c = ConfigFile("examples/RD-275.cfg"); 17 | c.read(); 18 | 19 | // Create Performance object, initializing it with loaded configuration, 20 | // and then solve the problem to get chamber/throat conditions. 21 | p = Performance(c); 22 | p.solve(); 23 | 24 | // Get the combustion chamber object. 25 | chamber = p.getChamber(); 26 | 27 | // Nozzle area ratios 28 | subsonic = [1.54, 1.35, 1.2, 1]; 29 | supersonic = [5, 10, 26.2, 50, 100]; 30 | 31 | printf("#%6s %5s %5s %8s", "A/At", "Mach", "p,MPa", "Is_v,s"); 32 | 33 | // For each subsonic nozzle section, print out A/At, Mach number, and pressure 34 | for (i=0; i 5 | or visit http://www.propulsion-analysis.com 6 | if you need additional information or have any questions. 7 | 8 | propellant.js 9 | 10 | 11 | ****************************************************/ 12 | 13 | load("resources/scripts/printf.js"); 14 | 15 | 16 | prop = Propellant(); 17 | prop.setRatio(6.0, "O/F"); // Set O/F weight ratio 18 | prop.addOxidizer("O2(L)"); // Add oxidizer at it's normal temperature and atmospheric pressure 19 | prop.addFuel("H2(L)", 0.8); // Add 1st fuel component at it's normal temperature and atmospheric pressure 20 | prop.addFuel("RP-1", 0, "K", 3, "atm", 0.2); // Add 2nd fuel component at it's normal temperature and pressure 3 atm 21 | // The sum "H2(L) mass fraction" (0.8) + "RP-1 mass frcation" (0.2) must be equal to 1.0 22 | 23 | chamber = Chamber(prop); 24 | chamber.setP(10, "MPa"); // Chamber pressure 25 | chamber.setFcr(3); // Nozzle inlet contraction area ratio 26 | chamber.solve(true); // finiteChamberSection=true 27 | 28 | 29 | nozzleExit = NozzleSectionConditions(chamber, 40, "A/At", true); 30 | 31 | 32 | // Get objects Reaction and Derivatives for injector station (0). 33 | injector_r = chamber.getReaction(0); 34 | injector_d = chamber.getDerivatives(0); 35 | 36 | // Get objects Reaction and Derivatives for nozzle inlet station (1). 37 | nozzleInlet_r = chamber.getReaction(1); 38 | nozzleInlet_d = chamber.getDerivatives(1); 39 | 40 | // Get objects Reaction and Derivatives for nozzle throat station (2). 41 | throat_r = chamber.getReaction(2); 42 | throat_d = chamber.getDerivatives(2); 43 | 44 | // Get objects Reaction and Derivatives for nozzle exit. 45 | nozzleExit_r = nozzleExit.getReaction(); 46 | nozzleExit_d = nozzleExit.getDerivatives(); 47 | 48 | // Print out propellant information 49 | prop.print("US"); 50 | 51 | print("***************************************************"); 52 | print("Injector"); 53 | print("***************************************************"); 54 | injector_r.print("US"); 55 | injector_d.print("US"); 56 | 57 | print("***************************************************"); 58 | print("Nozzle Inlet"); 59 | print("***************************************************"); 60 | nozzleInlet_r.print("US"); 61 | nozzleInlet_d.print("US"); 62 | 63 | print("***************************************************"); 64 | print("Nozzle Throat"); 65 | print("***************************************************"); 66 | throat_r.print("US"); 67 | throat_d.print("US"); 68 | 69 | print("***************************************************"); 70 | print("Nozzle Exit"); 71 | print("***************************************************"); 72 | nozzleExit_r.print("US"); 73 | nozzleExit_d.print("US"); 74 | 75 | print("***************************************************"); 76 | print("Performance"); 77 | print("***************************************************"); 78 | printf(" Is_v=%8.2f s\n Is_opt=%8.2f s\n Is_sl=%8.2fs", 79 | nozzleExit.getIs_v("s"), 80 | nozzleExit.getIs("s"), 81 | nozzleExit.getIs_H(1, "atm", "s") 82 | ); 83 | -------------------------------------------------------------------------------- /Scripts/propellant_analysis.js: -------------------------------------------------------------------------------- 1 | /*************************************************** 2 | RPA - Tool for Rocket Propulsion Analysis 3 | Copyright 2009-2014 Alexander Ponomarenko 4 | Please contact author 5 | or visit http://www.propulsion-analysis.com 6 | if you need additional information or have any questions. 7 | 8 | propellant_analysis.js 9 | 10 | ****************************************************/ 11 | 12 | load("resources/scripts/printf.js"); 13 | 14 | mix = Mixture(); 15 | mix.addSpecies("O2(L)", 0.8); // Add 1st component at it's normal temperature and atmospheric pressure 16 | mix.addSpecies("H2(L)", 0.15); // Add 2nd component at it's normal temperature and atmospheric pressure 17 | mix.addSpecies("RP-1", 0, "K", 3, "atm", 0.03); // Add 3rd component at it's normal temperature and pressure 3 atm 18 | mix.addSpecies("AL(cr)", 0.02); // Add 4th component at it's normal temperature and atmospheric pressure 19 | 20 | // Total mass fraction of components #2 (RP-1) and #3 (AL(cr)) 21 | sf = mix.getFraction(2) + mix.getFraction(3); 22 | 23 | // Array with different values of AL(cr) mass fraction 24 | m = Array(); 25 | for (i=0; i<=1.0; i+=0.2) { 26 | m[m.length] = sf*i; 27 | } 28 | 29 | // Print out table header 30 | printf("#%6s %6s %8s %8s %8s", "RP-1", "AL(cr)", "Is_v,s", "Is_opt,s", "Is_sl,s"); 31 | 32 | for (i=0; i 5 | or visit http://www.propulsion-analysis.com 6 | if you need additional information or have any questions. 7 | 8 | reaction.js 9 | 10 | 11 | ****************************************************/ 12 | 13 | prop = Propellant(); 14 | prop.setRatio(6.0, "O/F"); // Set O/F weight ratio 15 | prop.addOxidizer("O2(L)"); // Add oxidizer at it's normal temperature and atmospheric pressure 16 | prop.addFuel("H2(L)", 0.8); // Add 1st fuel component at it's normal temperature and atmospheric pressure 17 | prop.addFuel("RP-1", 0, "K", 3, "atm", 0.2); // Add 2nd fuel component at it's normal temperature and pressure 3 atm 18 | // The sum "H2(L) mass fraction" (0.8) + "RP-1 mass frcation" (0.2) must be equal to 1.0 19 | 20 | // Print out propellant information 21 | prop.print("US"); 22 | 23 | print("***************************************************"); 24 | print("Problem (p,H)=const"); 25 | print("***************************************************"); 26 | 27 | r1 = Reaction(prop); 28 | r1.setPH(10, "MPa", prop.getH("Btu/lb-mol"), "Btu/lb-mol"); 29 | r1.solve(); 30 | 31 | d1 = Derivatives(r1); 32 | 33 | // Print out reaction information 34 | r1.print("US"); 35 | d1.print("US"); 36 | 37 | print("***************************************************"); 38 | print("Problem (p,T)=const"); 39 | print("***************************************************"); 40 | 41 | r2 = Reaction(prop); 42 | r2.setPT(10, "MPa", 6062.38174, "F", true); // Set "true" to switch to isothermal problem 43 | r2.solve(); 44 | 45 | d2 = Derivatives(r2); 46 | 47 | // Print out reaction information 48 | r2.print("US"); 49 | d2.print("US"); 50 | 51 | print("***************************************************"); 52 | print("Problem (p,S)=const"); 53 | print("***************************************************"); 54 | 55 | r3 = Reaction(prop); 56 | r3.setPS(10, "MPa", 0.050, "Btu/(lb-mol R)"); 57 | r3.solve(); 58 | 59 | d3 = Derivatives(r3); 60 | 61 | // Print out reaction information 62 | r3.print("US"); 63 | d3.print("US"); 64 | 65 | -------------------------------------------------------------------------------- /Scripts/reaction_products.js: -------------------------------------------------------------------------------- 1 | /*************************************************** 2 | RPA - Tool for Rocket Propulsion Analysis 3 | Copyright 2009-2014 Alexander Ponomarenko 4 | Please contact author 5 | or visit http://www.propulsion-analysis.com 6 | if you need additional information or have any questions. 7 | 8 | reaction.js 9 | 10 | ****************************************************/ 11 | 12 | load("resources/scripts/printf.js"); 13 | 14 | 15 | prop = Propellant(); 16 | prop.setRatio(6.0, "O/F"); // Set O/F weight ratio 17 | prop.addOxidizer("O2(L)"); // Add oxidizer at it's normal temperature and atmospheric pressure 18 | prop.addFuel("H2(L)"); // Add fuel at it's normal temperature and atmospheric pressure 19 | 20 | // Print out propellant information 21 | prop.print("US"); 22 | 23 | r = Reaction(prop); 24 | r.setPH(10, "MPa", prop.getH("J/mol"), "J/mol"); 25 | r.solve(); 26 | 27 | d = Derivatives(r); 28 | 29 | products = r.getResultingMixture(); 30 | 31 | // Reaction products total number of moles 32 | // The absolute number does not matter, and only used for calculation of mole fraction 33 | totalMoles = 0; 34 | for (i=0; i 22 | * 23 | * Please contact author or visit http://www.propulsion-analysis.com 24 | * if you need additional information or have any questions. 25 | */ 26 | 27 | 28 | /* 29 | * This example demonstrates how to use the RPA wrapper within C/C++ programs. 30 | * 31 | * Compilation on Linux: 32 | * 33 | * make -f Makefile_gcc 34 | * 35 | * Compilation on Windows: 36 | * 37 | * make -f Makefile_win 38 | * 39 | */ 40 | 41 | #include "../include/Wrapper.h" 42 | #include "../include/ConfigFile.h" 43 | #include "../include/Performance.h" 44 | 45 | #ifdef __cplusplus 46 | extern "C" { 47 | #endif 48 | 49 | int main(int argc, char* argv[]) { 50 | initializeWithPath("../resources", 0, 1); 51 | 52 | void* c = configFileLoad("RD-170.cfg"); 53 | 54 | void* p = performanceCreate(c, 0, 0); 55 | 56 | performanceSolve(p, 0); 57 | performancePrint(p); 58 | 59 | performanceDelete(p); 60 | configFileDelete(c); 61 | 62 | finalize(); 63 | } 64 | 65 | #ifdef __cplusplus 66 | } 67 | #endif 68 | -------------------------------------------------------------------------------- /Wrapper/lite/wrapper_client_1.py: -------------------------------------------------------------------------------- 1 | # 2 | # RPA - Tool for Rocket Propulsion Analysis 3 | # RPA wrapper library 4 | # 5 | # Copyright 2009,2014 Alexander Ponomarenko. 6 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 7 | # 8 | # This software is a commercial product; you can use it either 9 | # under the terms of the valid RPA SDK License as published 10 | # at http://www.propulsion-analysis.com/sdk_eula.htm 11 | # or as a complementary tool under the terms of valid RPA Standard Edition License 12 | # as published at http://www.propulsion-analysis.com/lic_standard.htm 13 | # or RPA Lite Edition License as published at http://www.propulsion-analysis.com/lic_lite.htm 14 | # 15 | # This program is distributed WITHOUT ANY WARRANTY; without even the 16 | # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 17 | # PURPOSE. See the applicable RPA SDK License, RPA Standard Edition License or 18 | # RPA Lite Edition License for more details. 19 | # 20 | # You should have received a valid copy of the RPA SDK License, RPA Standard Edition License or 21 | # RPA Lite Edition License along with this program; if not, write to author 22 | # 23 | # Please contact author or visit http://www.propulsion-analysis.com 24 | # if you need additional information or have any questions. 25 | # 26 | 27 | import platform 28 | import ctypes 29 | 30 | # Load wrapper library 31 | if platform.system()=="Windows": 32 | rpa = ctypes.CDLL("libwrapper.dll"); 33 | elif platform.system()=="Linux": 34 | rpa = ctypes.CDLL("libwrapper.so"); 35 | else: 36 | rpa = ctypes.CDLL("libwrapper.dylib"); 37 | 38 | # Declare used functions 39 | # Attention! 40 | # The list of functions is incomplete! Please reffer to C incluion files 41 | # and declare other functions you need. 42 | rpa.initializeWithPath.argtypes = [ctypes.c_char_p, ctypes.c_char_p, ctypes.c_bool]; 43 | rpa.configFileLoad.argtypes = [ctypes.c_void_p]; 44 | rpa.performanceGetOF.argtypes = [ctypes.c_void_p]; 45 | rpa.performanceGetOF.restype = ctypes.c_double; 46 | rpa.performanceGetDeliveredIspH.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_double, ctypes.c_char_p, ctypes.c_double]; 47 | rpa.performanceGetDeliveredIspH.restype = ctypes.c_double; 48 | rpa.performanceGetDeliveredIsp.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_double, ctypes.c_char_p, ctypes.c_double]; 49 | rpa.performanceGetDeliveredIsp.restype = ctypes.c_double; 50 | rpa.chamberGetThroatDiameter.argtypes = [ctypes.c_void_p, ctypes.c_char_p]; 51 | rpa.chamberGetThroatDiameter.restype = ctypes.c_double; 52 | rpa.nozzleGetExitDiameter.restype = ctypes.c_double; 53 | rpa.nozzleGetLength.restype = ctypes.c_double; 54 | 55 | # Initialize RPA 56 | rpa.initializeWithPath("../resources", None, 1); 57 | 58 | # Run analysis 59 | conf = rpa.configFileLoad("RD-170.cfg"); 60 | performance = rpa.performanceCreate(conf, 0, 0); 61 | rpa.performanceSolve(performance, 0); 62 | 63 | # Calculate combustion chamber and nozzle geometry 64 | chamber = rpa.chamberCreate(performance, 1); 65 | nozzle = rpa.nozzleCreate(chamber, 1); 66 | 67 | # Get results 68 | of = rpa.performanceGetOF(performance); 69 | Isp_SL = rpa.performanceGetDeliveredIspH(performance, "s", 0, "m", 0); 70 | Isp_vac = rpa.performanceGetDeliveredIsp(performance, "s", 0, "atm", 0); 71 | Dt = rpa.chamberGetThroatDiameter(chamber, "mm"); 72 | De = rpa.nozzleGetExitDiameter(nozzle, "mm"); 73 | Le = rpa.nozzleGetLength(nozzle, "mm"); 74 | 75 | print "O/F=%2.1f" % of; 76 | print "Isp(SL)=%3.2f s, Isp(vac)=%3.2f s" % (Isp_SL, Isp_vac); 77 | print "Dt=%4.2f mm, De=%4.2f mm Le=%4.2f mm" % (Dt, De, Le); 78 | 79 | # Release created objects 80 | rpa.nozzleDelete(nozzle); 81 | rpa.chamberDelete(chamber); 82 | rpa.performanceDelete(performance); 83 | rpa.configFileDelete(conf); 84 | 85 | # Finalize RPA 86 | rpa.finalize(); -------------------------------------------------------------------------------- /Wrapper/lite/wrapper_client_3.py: -------------------------------------------------------------------------------- 1 | # 2 | # RPA - Tool for Rocket Propulsion Analysis 3 | # RPA wrapper library 4 | # 5 | # Copyright 2009,2014 Alexander Ponomarenko. 6 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 7 | # 8 | # This software is a commercial product; you can use it either 9 | # under the terms of the valid RPA SDK License as published 10 | # at http://www.propulsion-analysis.com/sdk_eula.htm 11 | # or as a complementary tool under the terms of valid RPA Standard Edition License 12 | # as published at http://www.propulsion-analysis.com/lic_standard.htm 13 | # or RPA Lite Edition License as published at http://www.propulsion-analysis.com/lic_lite.htm 14 | # 15 | # This program is distributed WITHOUT ANY WARRANTY; without even the 16 | # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 17 | # PURPOSE. See the applicable RPA SDK License, RPA Standard Edition License or 18 | # RPA Lite Edition License for more details. 19 | # 20 | # You should have received a valid copy of the RPA SDK License, RPA Standard Edition License or 21 | # RPA Lite Edition License along with this program; if not, write to author 22 | # 23 | # Please contact author or visit http://www.propulsion-analysis.com 24 | # if you need additional information or have any questions. 25 | # 26 | 27 | import platform 28 | import ctypes 29 | 30 | # Load wrapper library 31 | # Attention! 32 | # The list of functions is incomplete! Please reffer to C incluion files 33 | # and declare other functions you need. 34 | if platform.system()=="Windows": 35 | rpa = ctypes.CDLL("libwrapper.dll"); 36 | elif platform.system()=="Linux": 37 | rpa = ctypes.CDLL("libwrapper.so"); 38 | else: 39 | rpa = ctypes.CDLL("libwrapper.dylib"); 40 | 41 | # Declare used functions 42 | rpa.initializeWithPath.argtypes = [ctypes.c_char_p, ctypes.c_char_p, ctypes.c_bool]; 43 | 44 | # config : Incomplete list. 45 | rpa.configFileLoad.argtypes = [ctypes.c_void_p]; 46 | rpa.configFilePropellantSetRatio.argtypes = [ctypes.c_void_p, ctypes.c_double, ctypes.c_char_p]; 47 | 48 | rpa.performanceCreate.argtypes = [ctypes.c_void_p, ctypes.c_bool, ctypes.c_bool]; 49 | rpa.performanceCreate.restype = ctypes.c_void_p; 50 | rpa.performanceDelete.argtypes = [ctypes.c_void_p]; 51 | rpa.performanceSolve.argtypes = [ctypes.c_void_p, ctypes.c_bool]; 52 | rpa.performanceGetOF.argtypes = [ctypes.c_void_p]; 53 | rpa.performanceGetOF.restype = ctypes.c_double; 54 | rpa.performanceGetDeliveredIsp.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_double, ctypes.c_char_p, ctypes.c_double]; 55 | rpa.performanceGetDeliveredIsp.restype = ctypes.c_double; 56 | rpa.performanceGetDeliveredIspH.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_double, ctypes.c_char_p, ctypes.c_double]; 57 | rpa.performanceGetDeliveredIspH.restype = ctypes.c_double; 58 | rpa.performanceGetDeliveredIspThrottled.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_double, ctypes.c_char_p, ctypes.c_double, ctypes.c_double]; 59 | rpa.performanceGetDeliveredIspThrottled.restype = ctypes.c_double; 60 | rpa.performanceGetDeliveredIspHThrottled.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_double, ctypes.c_char_p, ctypes.c_double, ctypes.c_double]; 61 | rpa.performanceGetDeliveredIspHThrottled.restype = ctypes.c_double; 62 | rpa.performanceGetIdealIsp.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_double, ctypes.c_char_p]; 63 | rpa.performanceGetIdealIsp.restype = ctypes.c_double; 64 | rpa.performanceGetIdealIspH.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_double, ctypes.c_char_p]; 65 | rpa.performanceGetIdealIspH.restype = ctypes.c_double; 66 | rpa.performanceGetIdealIspThrottled.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_double, ctypes.c_char_p, ctypes.c_double]; 67 | rpa.performanceGetIdealIspThrottled.restype = ctypes.c_double; 68 | rpa.performanceGetIdealIspHThrottled.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_double, ctypes.c_char_p, ctypes.c_double]; 69 | rpa.performanceGetIdealIspHThrottled.restype = ctypes.c_double; 70 | rpa.performancePrint.argtypes = [ctypes.c_void_p]; 71 | 72 | # Initialize RPA 73 | rpa.initializeWithPath("../resources", None, 1); 74 | 75 | # Run analysis 76 | conf = rpa.configFileLoad("RD-170.cfg"); 77 | 78 | # Calculate performance at given O/F ratios 79 | of_ratios = [1.2, 1.5, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0]; 80 | for of in of_ratios : 81 | rpa.configFilePropellantSetRatio(conf, of, "O/F"); 82 | performance = rpa.performanceCreate(conf, False, False); 83 | rpa.performanceSolve(performance, False); 84 | # Get results 85 | Isp_SL = rpa.performanceGetDeliveredIspH(performance, "s", 0, "m", 0); 86 | Isp_vac = rpa.performanceGetDeliveredIsp(performance, "s", 0, "atm", 0); 87 | print "O/F=%3.1f: Isp(SL)=%6.2f s, Isp(vac)=%6.2f s" % (of, Isp_SL, Isp_vac); 88 | # Release created objects 89 | rpa.performanceDelete(performance) 90 | 91 | 92 | # Release created objects 93 | rpa.configFileDelete(conf) 94 | 95 | # Finalize RPA 96 | rpa.finalize(); -------------------------------------------------------------------------------- /Wrapper/standard/Makefile_gcc: -------------------------------------------------------------------------------- 1 | all: build execute 2 | 3 | build: 4 | gcc -DSTANDARD_EDITION -L../ -lwrapper -lrpa -lutils -lmath -lnozzle -lconfig++ \ 5 | wrapper_client.cpp -o wrapper_client.exe 6 | 7 | execute: 8 | LD_LIBRARY_PATH=../:$LD_LIBRARY_PATH ./wrapper_client.exe -------------------------------------------------------------------------------- /Wrapper/standard/Makefile_win: -------------------------------------------------------------------------------- 1 | all: build execute 2 | 3 | build: 4 | cl /D "STANDARD_EDITION" wrapper_client.cpp /Fewrapper_client.exe \ 5 | /I "..\include" /link libwrapper.lib /LIBPATH:"..\lib" 6 | 7 | execute: 8 | set PATH=%PATH%;..\ && wrapper_client.exe -------------------------------------------------------------------------------- /Wrapper/standard/Octave/test-rpa.m: -------------------------------------------------------------------------------- 1 | # 2 | # RPA - Tool for Rocket Propulsion Analysis 3 | # RPA wrapper library 4 | # 5 | # Copyright 2009,2015 Alexander Ponomarenko. 6 | # 7 | # 8 | # This is an example Octave file which loads and uses RPA Wrapper functions provided via rpa.oct (compiled from rpa.cpp). 9 | # 10 | 11 | autoload("rpaInit", "rpa.oct") 12 | autoload("rpaFinalize", "rpa.oct") 13 | 14 | autoload("rpaConfigOpen", "rpa.oct") 15 | autoload("rpaConfigClose", "rpa.oct") 16 | autoload("rpaConfigGetPc", "rpa.oct") 17 | autoload("rpaConfigSetPc", "rpa.oct") 18 | 19 | autoload("rpaPerformance", "rpa.oct") 20 | autoload("rpaPerformanceDelete", "rpa.oct") 21 | autoload("rpaPerformanceGetIsp", "rpa.oct") 22 | autoload("rpaPerformanceGetIdealIsp", "rpa.oct") 23 | 24 | rpaInit(false); 25 | 26 | name = "examples/RD-170.cfg"; 27 | 28 | disp("Loading "), disp(name) 29 | c = rpaConfigOpen(name); 30 | 31 | disp(""), disp("Create performance object from loaded configuration file") 32 | p = rpaPerformance(c); 33 | 34 | disp(""), disp("Get Isp (vac)") 35 | [Is_v, Is_v_units] = rpaPerformanceGetIsp(p) 36 | 37 | disp(""), disp("Get Isp (SL) at throttleLevel=0.75") 38 | [Is_a, Is_a_units, p_a, p_a_units, t, phi] = rpaPerformanceGetIsp(p, 1, "atm", 0.75) 39 | rpaPerformanceDelete(p); 40 | 41 | disp(""), disp("Modify pc in configuration file") 42 | 43 | rpaConfigSetPc(c, rpaConfigGetPc(c)*0.75) 44 | 45 | disp(""), disp("Create performance object from modified configuration file") 46 | p = rpaPerformance(c); 47 | disp(""), disp("Get Isp (vac)") 48 | [Is_v, Is_v_units] = rpaPerformanceGetIsp(p, "s") 49 | rpaPerformanceDelete(p); 50 | 51 | disp(""), disp("Close configuration file and finalize RPA") 52 | rpaConfigClose(c); 53 | rpaFinalize(); 54 | -------------------------------------------------------------------------------- /Wrapper/standard/wrapper_client.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * RPA - Tool for Rocket Propulsion Analysis 3 | * RPA wrapper library 4 | * 5 | * Copyright 2009,2014 Alexander Ponomarenko. 6 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 7 | * 8 | * This software is a commercial product; you can use it either 9 | * under the terms of the valid RPA SDK License as published 10 | * at http://www.propulsion-analysis.com/sdk_eula.htm 11 | * or as a complementary tool under the terms of valid RPA Standard Edition License 12 | * as published at http://www.propulsion-analysis.com/lic_standard.htm 13 | * or RPA Lite Edition License as published at http://www.propulsion-analysis.com/lic_lite.htm 14 | * 15 | * This program is distributed WITHOUT ANY WARRANTY; without even the 16 | * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 17 | * PURPOSE. See the applicable RPA SDK License, RPA Standard Edition License or 18 | * RPA Lite Edition License for more details. 19 | * 20 | * You should have received a valid copy of the RPA SDK License, RPA Standard Edition License or 21 | * RPA Lite Edition License along with this program; if not, write to author 22 | * 23 | * Please contact author or visit http://www.propulsion-analysis.com 24 | * if you need additional information or have any questions. 25 | */ 26 | 27 | 28 | /* 29 | * This example demonstrates how to use the RPA wrapper within C/C++ programs. 30 | * 31 | * Compilation on Linux: 32 | * 33 | * make -f Makefile_gcc 34 | * 35 | * Compilation on Windows: 36 | * 37 | * make -f Makefile_win 38 | * 39 | */ 40 | 41 | #include "../include/Wrapper.h" 42 | #include "../include/ConfigFile.h" 43 | #include "../include/Performance.h" 44 | 45 | #ifdef __cplusplus 46 | extern "C" { 47 | #endif 48 | 49 | int main(int argc, char* argv[]) { 50 | initializeWithPath("../resources", 0, 1); 51 | 52 | void* c = configFileLoad("RD-170.cfg"); 53 | 54 | void* p = performanceCreate(c, 0, 0); 55 | 56 | performanceSolve(p, 0); 57 | performancePrint(p); 58 | 59 | performanceDelete(p); 60 | configFileDelete(c); 61 | 62 | finalize(); 63 | } 64 | 65 | #ifdef __cplusplus 66 | } 67 | #endif 68 | -------------------------------------------------------------------------------- /Wrapper/standard/wrapper_client_1.py: -------------------------------------------------------------------------------- 1 | # 2 | # RPA - Tool for Rocket Propulsion Analysis 3 | # RPA wrapper library 4 | # 5 | # Copyright 2009,2014 Alexander Ponomarenko. 6 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 7 | # 8 | # This software is a commercial product; you can use it either 9 | # under the terms of the valid RPA SDK License as published 10 | # at http://www.propulsion-analysis.com/sdk_eula.htm 11 | # or as a complementary tool under the terms of valid RPA Standard Edition License 12 | # as published at http://www.propulsion-analysis.com/lic_standard.htm 13 | # or RPA Lite Edition License as published at http://www.propulsion-analysis.com/lic_lite.htm 14 | # 15 | # This program is distributed WITHOUT ANY WARRANTY; without even the 16 | # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 17 | # PURPOSE. See the applicable RPA SDK License, RPA Standard Edition License or 18 | # RPA Lite Edition License for more details. 19 | # 20 | # You should have received a valid copy of the RPA SDK License, RPA Standard Edition License or 21 | # RPA Lite Edition License along with this program; if not, write to author 22 | # 23 | # Please contact author or visit http://www.propulsion-analysis.com 24 | # if you need additional information or have any questions. 25 | # 26 | 27 | import platform 28 | import ctypes 29 | 30 | # Load wrapper library 31 | if platform.system()=="Windows": 32 | rpa = ctypes.CDLL("libwrapper.dll"); 33 | elif platform.system()=="Linux": 34 | rpa = ctypes.CDLL("libwrapper.so"); 35 | else: 36 | rpa = ctypes.CDLL("libwrapper.dylib"); 37 | 38 | # Declare used functions 39 | # Attention! 40 | # The list of functions is incomplete! Please reffer to C incluion files 41 | # and declare other functions you need. 42 | rpa.initializeWithPath.argtypes = [ctypes.c_char_p, ctypes.c_char_p, ctypes.c_bool]; 43 | rpa.configFileLoad.argtypes = [ctypes.c_void_p]; 44 | rpa.performanceGetOF.argtypes = [ctypes.c_void_p]; 45 | rpa.performanceGetOF.restype = ctypes.c_double; 46 | rpa.performanceGetDeliveredIspH.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_double, ctypes.c_char_p, ctypes.c_double]; 47 | rpa.performanceGetDeliveredIspH.restype = ctypes.c_double; 48 | rpa.performanceGetDeliveredIsp.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_double, ctypes.c_char_p, ctypes.c_double]; 49 | rpa.performanceGetDeliveredIsp.restype = ctypes.c_double; 50 | rpa.chamberGetThroatDiameter.argtypes = [ctypes.c_void_p, ctypes.c_char_p]; 51 | rpa.chamberGetThroatDiameter.restype = ctypes.c_double; 52 | rpa.nozzleGetExitDiameter.restype = ctypes.c_double; 53 | rpa.nozzleGetLength.restype = ctypes.c_double; 54 | 55 | # Initialize RPA 56 | rpa.initializeWithPath("../resources", None, 1); 57 | 58 | # Run analysis 59 | conf = rpa.configFileLoad("RD-170.cfg"); 60 | performance = rpa.performanceCreate(conf, 0, 0); 61 | rpa.performanceSolve(performance, 0); 62 | 63 | # Calculate combustion chamber and nozzle geometry 64 | chamber = rpa.chamberCreate(performance, 1); 65 | nozzle = rpa.nozzleCreate(chamber, 1); 66 | 67 | # Get results 68 | of = rpa.performanceGetOF(performance); 69 | Isp_SL = rpa.performanceGetDeliveredIspH(performance, "s", 0, "m", 0); 70 | Isp_vac = rpa.performanceGetDeliveredIsp(performance, "s", 0, "atm", 0); 71 | Dt = rpa.chamberGetThroatDiameter(chamber, "mm"); 72 | De = rpa.nozzleGetExitDiameter(nozzle, "mm"); 73 | Le = rpa.nozzleGetLength(nozzle, "mm"); 74 | 75 | print "O/F=%3.1f" % of; 76 | print "Isp(SL)=%6.2f s, Isp(vac)=%6.2f s" % (Isp_SL, Isp_vac); 77 | print "Dt=%6.2f mm, De=%6.2f mm Le=%6.2f mm" % (Dt, De, Le); 78 | 79 | # Release created objects 80 | rpa.nozzleDelete(nozzle); 81 | rpa.chamberDelete(chamber); 82 | rpa.performanceDelete(performance); 83 | rpa.configFileDelete(conf); 84 | 85 | # Finalize RPA 86 | rpa.finalize(); -------------------------------------------------------------------------------- /Wrapper/standard/wrapper_client_3.py: -------------------------------------------------------------------------------- 1 | # 2 | # RPA - Tool for Rocket Propulsion Analysis 3 | # RPA wrapper library 4 | # 5 | # Copyright 2009,2014 Alexander Ponomarenko. 6 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 7 | # 8 | # This software is a commercial product; you can use it either 9 | # under the terms of the valid RPA SDK License as published 10 | # at http://www.propulsion-analysis.com/sdk_eula.htm 11 | # or as a complementary tool under the terms of valid RPA Standard Edition License 12 | # as published at http://www.propulsion-analysis.com/lic_standard.htm 13 | # or RPA Lite Edition License as published at http://www.propulsion-analysis.com/lic_lite.htm 14 | # 15 | # This program is distributed WITHOUT ANY WARRANTY; without even the 16 | # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 17 | # PURPOSE. See the applicable RPA SDK License, RPA Standard Edition License or 18 | # RPA Lite Edition License for more details. 19 | # 20 | # You should have received a valid copy of the RPA SDK License, RPA Standard Edition License or 21 | # RPA Lite Edition License along with this program; if not, write to author 22 | # 23 | # Please contact author or visit http://www.propulsion-analysis.com 24 | # if you need additional information or have any questions. 25 | # 26 | 27 | import platform 28 | import ctypes 29 | 30 | # Load wrapper library 31 | # Attention! 32 | # The list of functions is incomplete! Please reffer to C incluion files 33 | # and declare other functions you need. 34 | if platform.system()=="Windows": 35 | rpa = ctypes.CDLL("libwrapper.dll"); 36 | elif platform.system()=="Linux": 37 | rpa = ctypes.CDLL("libwrapper.so"); 38 | else: 39 | rpa = ctypes.CDLL("libwrapper.dylib"); 40 | 41 | # Declare used functions 42 | rpa.initializeWithPath.argtypes = [ctypes.c_char_p, ctypes.c_char_p, ctypes.c_bool]; 43 | 44 | # config : Incomplete list. 45 | rpa.configFileLoad.argtypes = [ctypes.c_void_p]; 46 | rpa.configFilePropellantSetRatio.argtypes = [ctypes.c_void_p, ctypes.c_double, ctypes.c_char_p]; 47 | 48 | rpa.performanceCreate.argtypes = [ctypes.c_void_p, ctypes.c_bool, ctypes.c_bool]; 49 | rpa.performanceCreate.restype = ctypes.c_void_p; 50 | rpa.performanceDelete.argtypes = [ctypes.c_void_p]; 51 | rpa.performanceSolve.argtypes = [ctypes.c_void_p, ctypes.c_bool]; 52 | rpa.performanceGetOF.argtypes = [ctypes.c_void_p]; 53 | rpa.performanceGetOF.restype = ctypes.c_double; 54 | rpa.performanceGetDeliveredIsp.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_double, ctypes.c_char_p, ctypes.c_double]; 55 | rpa.performanceGetDeliveredIsp.restype = ctypes.c_double; 56 | rpa.performanceGetDeliveredIspH.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_double, ctypes.c_char_p, ctypes.c_double]; 57 | rpa.performanceGetDeliveredIspH.restype = ctypes.c_double; 58 | rpa.performanceGetDeliveredIspThrottled.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_double, ctypes.c_char_p, ctypes.c_double, ctypes.c_double]; 59 | rpa.performanceGetDeliveredIspThrottled.restype = ctypes.c_double; 60 | rpa.performanceGetDeliveredIspHThrottled.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_double, ctypes.c_char_p, ctypes.c_double, ctypes.c_double]; 61 | rpa.performanceGetDeliveredIspHThrottled.restype = ctypes.c_double; 62 | rpa.performanceGetIdealIsp.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_double, ctypes.c_char_p]; 63 | rpa.performanceGetIdealIsp.restype = ctypes.c_double; 64 | rpa.performanceGetIdealIspH.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_double, ctypes.c_char_p]; 65 | rpa.performanceGetIdealIspH.restype = ctypes.c_double; 66 | rpa.performanceGetIdealIspThrottled.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_double, ctypes.c_char_p, ctypes.c_double]; 67 | rpa.performanceGetIdealIspThrottled.restype = ctypes.c_double; 68 | rpa.performanceGetIdealIspHThrottled.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_double, ctypes.c_char_p, ctypes.c_double]; 69 | rpa.performanceGetIdealIspHThrottled.restype = ctypes.c_double; 70 | rpa.performancePrint.argtypes = [ctypes.c_void_p]; 71 | 72 | # Initialize RPA 73 | rpa.initializeWithPath("../resources", None, 1); 74 | 75 | # Run analysis 76 | conf = rpa.configFileLoad("RD-170.cfg"); 77 | 78 | # Calculate performance at given O/F ratios 79 | of_ratios = [1.2, 1.5, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0]; 80 | for of in of_ratios : 81 | rpa.configFilePropellantSetRatio(conf, of, "O/F"); 82 | performance = rpa.performanceCreate(conf, False, False); 83 | rpa.performanceSolve(performance, False); 84 | # Get results 85 | Isp_SL = rpa.performanceGetDeliveredIspH(performance, "s", 0, "m", 0); 86 | Isp_vac = rpa.performanceGetDeliveredIsp(performance, "s", 0, "atm", 0); 87 | print "O/F=%3.1f: Isp(SL)=%6.2f s, Isp(vac)=%6.2f s" % (of, Isp_SL, Isp_vac); 88 | # Release created objects 89 | rpa.performanceDelete(performance) 90 | 91 | 92 | # Release created objects 93 | rpa.configFileDelete(conf) 94 | 95 | # Finalize RPA 96 | rpa.finalize(); --------------------------------------------------------------------------------