Rocket module#

In this section, you will find the documentation of the routines implemented to obtain the rocket propellant performance under ideal conditions. Currently, there are two models implemented in the Combustion Toolbox:

  • IAC: Infinite-Area-Chamber,

  • FAC: Finite-Area-Chamber.

RocketSolver#

class RocketSolver(varargin)#

Bases: handle

The RocketSolver() class is used to solve rocket problems. The class provides methods to compute the performance of a rocket using the Infinite Area Chamber (IAC) and Finite Area Chamber (FAC) models.

The RocketSolver() object can be initialized as follows:

solver = RocketSolver('problemType', problemType, ...)

Here problemType represents the acronym of the problem to be solved (see below). Additional optional parameters can be provided to customize the solver’s behavior.

Problem types:
  • ROCKET_IAC: Get the performance of a rocket using the Infinite Area Chamber (IAC) model

  • ROCKET_FAC: Get the performance of a rocket using the Finite Area Chamber (FAC) model

See also: Mixture(), EquilibriumSolver(), solve(), solveArray(), report()

FLAG_CACHE = 'true'#

Flag to clear cache after calculations

FLAG_REPORT = 'false'#

Flag to print predefined plots

FLAG_RESULTS = 'true'#

Flag to print results

FLAG_SUBSONIC = 'false'#

Flag to indicate subsonic Area ratio

FLAG_TIME = 'true'#

Flag to print elapsed time

RocketSolver(varargin)#

Constructor

equilibriumSolver = None#

EquilibriumSolver object

itMax = '10'#

Max number of iterations - rocket performance

plot(mixArray1, mixArray2, varargin)#

Plot results

Parameters:
  • obj (RocketSolver) – RocketSolver object

  • mixArray1 (Mixture) – Array of Mixture objects (initial state)

  • mixArray2 (Mixture) – Array of Mixture objects

Optional Args:
  • mixArray_i (Mixture): Array of Mixture objects

Examples

  • plot(RocketSolver(), mixArray1, mixArray2, mixArray3);

  • plot(RocketSolver(), mixArray1, mixArray2, mixArray3, mixArray4);

  • plot(RocketSolver(), mixArray1, mixArray2, mixArray3, mixArray4, mixArray5);

plotConfig = None#

PlotConfig object

printTime()#

Print execution time

Parameters:

obj (EquilibriumSolver) – EquilibriumSolver object

problemType = None#

Problem type

report(mixArray1, mixArray2, varargin)#

Postprocess all the results with predefined plots

Parameters:
  • obj (DetonationSolver) – DetonationSolver object

  • mixArray1 (Mixture) – Array of Mixture objects (pre-shock state)

  • mixArray2 (Mixture) – Array of Mixture objects (post-shock state)

Optional args:
  • mixArray_i (Mixture): Array of Mixture objects

Examples

  • report(DetonationSolver(), mixArray1, mixArray2);

  • report(DetonationSolver(), mixArray1, mixArray2, mixArray3);

solve(mix1, varargin)#

Solve rocket problems

Parameters:
  • obj (EquilibriumSolver) – EquilibriumSolver object

  • mix1 (Mixture) – initial Mixture object

Optional Args:
  • mix2_inj_guess (Mixture): Initial guess for the injector Mixture object

  • mix2_c_guess (Mixture): Initial guess for the chamber Mixture object

  • mix3_guess (Mixture): Initial guess for the throat Mixture object

  • mix4_guess (Mixture): Initial guess for the exit Mixture object

Returns:

varargout (Mixture) – Updated Mixture objects depending on the problem type

Examples

  • [mix1, mix2_c, mix3] = solve(RocketSolver(), mix1); % Rocket IAC

  • [mix1, mix2_c, mix3, mix4] = solve(RocketSolver(), mix1); % Rocket IAC

  • [mix1, mix2_c, mix3] = solve(RocketSolver(), mix1, mix2Guess, mix3Guess); % Rocket IAC

  • [mix1, mix2_c, mix3, mix4] = solve(RocketSolver(), mix1, mix2Guess, mix3Guess, mix4Guess); % Rocket IAC

  • [mix1, mix2_inj, mix2_c, mix3] = solve(RocketSolver(), mix1); % Rocket FAC

  • [mix1, mix2_inj, mix2_c, mix3, mix4] = solve(RocketSolver(), mix1); % Rocket FAC

  • [mix1, mix2_inj, mix2_c, mix3] = solve(RocketSolver(), mix1, mix2Guess, mix3Guess); % Rocket FAC

  • [mix1, mix2_inj, mix2_c, mix3] = solve(RocketSolver(), mix1, mix2Guess, mix3Guess, mix4Guess); % Rocket FAC

solveArray(mixArray1, varargin)#

Solve a set of rocket problems

Parameters:
  • obj (EquilibriumSolver) – EquilibriumSolver object

  • mixArray1 (Mixture) – Array of initial Mixture objects

Returns:

varargout (Mixture) – Updated arrays of Mixture objects depending on the shock problem type

Examples

  • [mixArray1, mixArray2, mixArray3] = solveArray(RocketSolver(), mixArray1); % Rocket IAC

  • [mixArray1, mixArray2, mixArray3, mixArray4] = solveArray(RocketSolver(), mixArray1); % Rocket IAC

  • [mixArray1, mixArray2, mixArray3, mixArray4] = solveArray(RocketSolver(), mixArray1); % Rocket FAC

  • [mixArray1, mixArray2, mixArray3, mixArray4, mixArray5] = solveArray(RocketSolver(), mixArray1); % Rocket FAC

time = None#

Elapsed time [s]

tol0 = '1e-4'#

Tolerance rocket performance

rocketChamberIAC(obj, mix, mix_guess)#

Compute chemical equilibria at the exit of the chamber (HP) using the Infinite-Area-Chamber (IAC) model

This method is based on the method outlined in Gordon, S., & McBride, B. J. (1994). NASA reference publication, 1311.

Parameters:
  • obj (RocketSolver) – RocketSolver object

  • mix (Mixture) – Properties of the initial mixture

  • mix_guess (Mixture) – Properties of the mixture at the outlet of the chamber (previous calculation)

Returns:

mix (Mixture) – Properties of the mixture at the outlet of the chamber

Example

mix = rocketChamberIAC(obj, mix, mix_guess)

rocketExit(obj, mix2, mix3, mix4_guess, areaRatio, varargin)#

Compute thermochemical composition for a given areaRatio

This method is based on the method outlined in Gordon, S., & McBride, B. J. (1994). NASA reference publication, 1311.

Parameters:
  • obj (RocketSolver) – RocketSolver object

  • mix2 (Mixture) – Properties of the mixture at the outlet of the chamber

  • mix3 (Mixture) – Properties of the mixture at the throat

  • mix4 (Mixture) – Properties of the mixture at the exit (previous calculation)

  • areaRatio (float) – Ratio area_exit / area_throat

Optional Args:

mix2_inj (Mixture): Properties of the mixture at the injector of the chamber

Returns:

mix3 (Mixture) – Properties of the mixture at the throat

Examples

  • mix4 = rocketExit(RocketSolver(), mix2, mix3, mix4)

  • mix4 = rocketExit(RocketSolver(), mix2, mix3, mix4, mix2_inj)

rocketFAC(obj, mix1, varargin)#

Compute chemical equilibria at the injector, outlet of the chamber and at the throat using the Finite-Area-Chamber (FAC) model

This method is based on the method outlined in Gordon, S., & McBride, B. J. (1994). NASA reference publication, 1311.

Parameters:
  • obj (RocketSolver) – RocketSolver object

  • mix1 (Mixture) – Properties of the initial mixture

Optional Args:
  • mix2_inj (Mixture): Properties of the mixture at the injector of the chamber (previous calculation)

  • mix2_c (Mixture): Properties of the mixture at the outlet of the chamber (previous calculation)

  • mix3 (Mixture): Properties of the mixture at the throat (previous calculation)

  • mix4 (Mixture): Properties of the mixture at the given exit points (previous calculation)

Returns:

Tuple containing

  • mix2_inj (Mixture): Properties of the mixture at the injector of the chamber

  • mix2_c (Mixture): Properties of the mixture at the outlet of the chamber

  • mix3 (Mixture): Properties of the mixture at the throat

  • mix4 (Mixture): Array of mixtures objects at the given exit points

Example

[mix2_inj, mix2_c, mix3] = rocketFAC(obj, mix1, mix2_inj, mix2_c, mix3)

rocketGuessExitIAC(mix2, mix3, areaRatio, FLAG_SUBSONIC)#

Compute guess logarithm of the ratio pressure_inf / pressure_exit [-] for the given Area ratio [-] and indicanting if the point of interest is in the subsonic area ratios or the supersonic area ratios

This method is based on the method outlined in Gordon, S., & McBride, B. J. (1994). NASA reference publication, 1311.

Parameters:
  • mix2 (Mixture) – Properties of the mixture at the outlet of the chamber

  • mix3 (Mixture) – Properties of the mixture at the throat

  • areaRatio (float) – Ratio area_exit / area_throat

  • FLAG_SUBSONIC (bool) – Flag indicating if the areaRatio refer to the subsonic region or the supersonic region

Returns:

log_P (float) – Log pressure ratio [-]

Example

log_P = rocketGuessExitIAC(mix2, mix3, 3, false)

rocketGuessInjectorFAC(pressure_inj, areaRatioChamber)#

Compute pressure guess [bar] assuming an Infinite-Area-Chamber (IAC) for the Finite-Area-Chamber model (FAC)

Parameters:
  • pressure_inj (float) – Pressure at the injector [bar]

  • areaRatioChamber (float) – Area chamber / Area throat

Returns:

pressure (float) – Pressure at the throat [bar]

Example

pressure = rocketGuessInjectorFAC(pressure_inj, areaRatioChamber)

rocketGuessThroatIAC(mix)#

Compute pressure guess [bar] at the throat considering an Infinite-Area-Chamber (IAC)

Parameters:

mix (Mixture) – Properties of the mixture

Returns:

pressure (float) – Pressure at the throat [bar]

Example

pressure = rocketGuessThroatIAC(mix)

rocketIAC(obj, mix1, varargin)#

Routine that computes the propellant rocket performance using the Infinite-Area-Chamber (IAC) model

This method is based on the method outlined in Gordon, S., & McBride, B. J. (1994). NASA reference publication, 1311.

Parameters:
  • obj (RocketSolver) – RocketSolver object

  • mix1 (Mixture) – Properties of the initial mixture

Optional Args:
  • mix2_c (Mixture): Properties of the mixture at the outlet of the chamber (previous calculation)

  • mix3 (Mixture): Properties of the mixture at the throat (previous calculation)

  • mix4 (Mixture): Properties of the mixture at the given exit points (previous calculation)

  • FLAG_PERFORMANCE (bool): Flag to compute rocket parameters (default = true)

Returns:

Tuple containing

  • mix1 (Mixture): Properties of the initial mixture

  • mix2_c (Mixture): Properties of the mixture at the outlet of the chamber

  • mix3 (Mixture): Properties of the mixture at the throat

  • mix4 (Mixture): Array of mixtures objects at the given exit points

Examples

  • [mix1, mix2_c, mix3, mix4] = rocketIAC(obj, mix1)

  • [mix1, mix2_c, mix3, mix4] = rocketIAC(obj, mix1)

  • [mix1, mix2_c, mix3, mix4] = rocketIAC(obj, mix1, mix2_c)

  • [mix1, mix2_c, mix3, mix4] = rocketIAC(obj, mix1, mix2_c, mix3)

  • [mix1, mix2_c, mix3, mix4] = rocketIAC(obj, mix1, mix2_c, mix3, mix4)

rocketParameters(mix2, mix3, varargin)#

Compute Rocket performance parameters at the throat

This method is based on the method outlined in Gordon, S., & McBride, B. J. (1994). NASA reference publication, 1311.

Parameters:
  • mix2 (Mixture) – Properties of the mixture at the outlet of the chamber

  • mix3 (Mixture) – Properties of the mixture at the throat

Optional Args:
  • mixi (Mixture): Properties of the mixture at the the exit (obj.FLAG_SUBSONIC = false) or at the combustion chamber (obj.FLAG_SUBSONIC = true)

Returns:

mix3 (Mixture) – Properties of the mixture at the throat

rocketThroatIAC(obj, mix2, mix3_guess)#

Compute thermochemical composition for the Infinite-Area-Chamber (IAC) model

This method is based on the method outlined in Gordon, S., & McBride, B. J. (1994). NASA reference publication, 1311.

Parameters:
  • obj (RocketSolver) – RocketSolver object

  • mix2 (Mixture) – Properties of the mixture at the outlet of the chamber

  • mix3_guess (Mixture) – Properties of the mixture at the throat (previous calculation)

Returns:

mix3 (Mixture) – Properties of the mixture at the throat

Examples

  • mix3 = rocketThroatIAC(RocketSolver(), mix2, mix3_guess)

  • mix3 = rocketThroatIAC(RocketSolver(), mix2, [])