self#

Routines to initialize the main module. All the data is save in a self variable (struct).

App#

Routines to initialize the main module.


App(varargin)#

Generate self variable with all the data required to initialize the computations

Parameters

empty (none) – Generate default self variable assuming as products LS = Soot formation

Optional Args:
  • LS (cell): List of species

  • obj (class): Class combustion_toolbox_app (GUI)

  • type (str): If value is fast initialize from the given Databases

  • DB_master (struct): Master database

  • DB (struct) : Database with custom thermodynamic polynomials functions generated from NASAs 9 polynomials fits

Returns

self (struct) – Data of the mixture (initialization - empty), conditions, and databases

ContainedElements(self)#

Obtain containted elements from the given set of species (reactants and products)

Parameters

self (struct) – Data of the mixture, conditions, and databases

Returns

self (struct) – Data of the mixture, conditions, and databases

Initialize(self)#
This routine have three tasks:
  • Check that all species are contained in the Database

  • Establish cataloged list of species according to the state of the phase (gaseous or condensed). It also obtains the indices of cryogenic liquid species, e.g., liquified gases

  • Compute Stoichiometric Matrix

Parameters

self (struct) – Data of the mixture, conditions, and databases

Returns

self (struct) – Data of the mixture, conditions, and databases

set_DB(self, FLAG_REDUCED_DB, FLAG_FAST)#

Generate Database with custom polynomials from DB_master

Parameters
  • self (struct) – Data of the mixture, conditions, and databases

  • FLAG_REDUCED_DB (bool) – Flag compute from reduced database

  • FLAG_FAST (bool) – Flag load databases

Returns

self (struct) – Data of the mixture, conditions, and databases

Constants#

Routines to initialize the Constants submodule in the self variable (struct).


Constants()#

Initialize struct with constants data

Returns

self (struct) – struct with constants data

Elements#

Routines to initialize the Elements submodule in the self variable (struct).


Elements()#

Initialize struct with elements data

Returns

self (struct) – struct with elements data

set_elements()#

Set cell with elements name

Returns

Tuple containing

  • elements (cell): Elements

  • NE (struct): Number of elements

Miscellaneous#

Routines to initialize the Miscellaneous submodule in the self variable (struct).


Miscellaneous()#

Initialize struct with miscellaneous data

Returns

self (struct) – struct with miscellaneous data

ProblemDescription#

Routines to initialize the ProblemDescription submodule in the self variable (struct).


ProblemDescription()#

Initialize struct with problem description data

Returns

self (struct) – struct with problem description data

ProblemSolution#

Routines to initialize the ProblemSolution submodule in the self variable (struct).


ProblemSolution()#

Initialize struct with problem solution data

Returns

self (struct) – struct with problem solution data

Species#

Routines to initialize the Species submodule in the self variable (struct).


ListSpecies(varargin)#

Set list of species in the mixture (reactants and products)

Predefined list of species:
  • SOOT FORMATION (default)

  • COMPLETE

  • HC/O2/N2 EXTENDED

  • SOOT FORMATION EXTENDED

  • NASA ALL

  • AIR, DISSOCIATED AIR

  • AIR IONS, AIR_IONS

  • IDEAL_AIR, AIR_IDEAL

  • HYDROGEN

  • HYDROGEN_L, HYDROGEN (L)

  • HC/O2/N2 PROPELLANTS

Parameters

empty (none) – return default list of species (soot formation)

Optional Args:
  • self (struct): Data of the mixture, conditions, and databases

  • LS (cell): Name list species / list of species

  • EquivalenceRatio (float): Equivalence ratio

  • EquivalenceRatio_soot (float): Equivalence ratio in which theoretically appears soot

Returns

self (struct) – Data of the mixture, conditions, and databases

Species()#

Initialize struct with problem solution data

Returns

self (struct) – struct with problem solution data

get_index_ions(species)#

Get index of ions for the given list of species

Parameters

species (str) – List of species

Returns

index (float) – Index of ions

TunningProperties#

Routines to initialize the TunningProperties submodule in the self variable (struct).


TunningProperties()#

Initialize struct with tunning properties attributes

FLAG_FAST#

Flag indicating use guess composition of the previous computation (default: false)

Type

bool

tolN#

Tolerance of the Gibbs minimization method (default: 1e-15)

Type

float

tolE#

Tolerance of the mass balance (default: 1e-06)

Type

float

tol_pi_e#

Tolerance of the dimensionless Lagrangian multiplier - ions (default: 1e-04)

Type

float

tol0#

Tolerance of the root finding algorithm (default: 1e-03)

Type

float

root_method#

Method for root finding (default: newton)

Type

function

itMax#

Max number of iterations - root finding method - HP, EV, SP, SV (default: 30)

Type

float

root_T0_l#

First guess T [K] left branch - root finding method (default: 300)

Type

float

root_T0_r#

First guess T [K] right branch - root finding method (default: 1500)

Type

float

root_T0#

Guess T[K] if it’s of previous range - root finding method (default: 2000)

Type

float

tol_shocks#

Tolerance of shocks routines (default: 5e-05)

Type

float

it_shocks#

Max number of iterations - shocks and detonations (default: 50)

Type

float

volume_ratio#

Initial guess volume ratio shocks (default: 5)

Type

float

tol_oblique#

Tolerance oblique shocks (default: 1e-03)

Type

float

it_oblique#

Max number of iterations - oblique shocks (default: 20)

Type

float

N_points_polar#

Number of points to compute shock polar (default: 100)

Type

float

tol_rocket#

Tolerance rocket performance (default: 1e-04)

Type

float

it_rocket#

Max number of iterations - rocket performance (default: 10)

Type

float

Returns

self (struct) – struct with tunning properties data