1% -------------------------------------------------------------------------
2% EXAMPLE: ROCKET Propellants considering an Infinite-Area-Chamber (IAC)
3%
4% Compute rocket propellant performance considering an Infinite-Area-Chamber
5% for lean to rich LH2-LOX mixtures at 101.325 bar, a set of equivalence
6% ratios phi contained in (1, 5) [-], and an exit area ratio A_exit/A_throat = 3
7%
8% See wiki or setListspecies method from ChemicalSystem class for predefined
9% sets of species
10%
11% @author: Alberto Cuadra Lara
12%
13% Last update October 06 2025
14% -------------------------------------------------------------------------
15
16% Import packages
17import combustiontoolbox.databases.NasaDatabase
18import combustiontoolbox.core.*
19import combustiontoolbox.rocket.*
20
21% Get Nasa database
22DB = NasaDatabase();
23
24% Define chemical system
25system = ChemicalSystem(DB);
26
27% Initialize mixture
28mix = Mixture(system);
29
30% Define chemical state
31set(mix, {'H2bLb'}, 'fuel', 1);
32set(mix, {'O2bLb'}, 'oxidizer', 1);
33
34% Define properties
35mixArray1 = setProperties(mix, 'temperature', 90, 'pressure', 100 * 1.01325, 'equivalenceRatio', 1:0.05:5, 'areaRatio', 3);
36
37% Initialize solver
38solver = RocketSolver('problemType', 'ROCKET_IAC');
39
40% Solve problem
41[mixArray1, mixArray2, mixArray3, mixArray4] = solver.solveArray(mixArray1);
42
43% Generate report
44report(solver, mixArray1, mixArray2, mixArray3, mixArray4);