propane module¶
The propane combustion MDO problem¶
The Propane MDO problem can be found in [PAG96] and [TM06]. It represents the chemical equilibrium reached during the combustion of propane in air. Variables are assigned to represent each of the ten combustion products as well as the sum of the products.
The optimization problem is as follows:
where the System Discipline consists of computing the following expressions:
Discipline 1 computes \((x_{2}, x_{4})\) by satisfying the following equations:
Discipline 2 computes \((x_2, x_4)\) such that:
and Discipline 3 computes \((x_5, x_9, x_{11})\) by solving:
-
class
gemseo.problems.propane.propane.
PropaneComb1
[source]¶ Bases:
gemseo.core.discipline.MDODiscipline
Propane combustion 1st set of equations This discipline is characterized by two governing equations.
Constructor.
- Parameters
name – the name of the discipline
input_grammar_file – the file for input grammar description, if None, name + “_input.json” is used
output_grammar_file – the file for output grammar description, if None, name + “_output.json” is used
auto_detect_grammar_files – if no input and output grammar files are provided, auto_detect_grammar_files uses a naming convention to associate a grammar file to a discipline: searches in the “comp_dir” directory containing the discipline source file for files basenames self.name _input.json and self.name _output.json
grammar_type – the type of grammar to use for IO declaration either JSON_GRAMMAR_TYPE or SIMPLE_GRAMMAR_TYPE
cache_type – type of cache policy, SIMPLE_CACHE or HDF5_CACHE
cache_file_path – the file to store the data, mandatory when HDF caching is used
-
class
gemseo.problems.propane.propane.
PropaneComb2
[source]¶ Bases:
gemseo.core.discipline.MDODiscipline
Propane combustion 2nd set of equations This discipline is characterized by two governing equations.
Constructor.
- Parameters
name – the name of the discipline
input_grammar_file – the file for input grammar description, if None, name + “_input.json” is used
output_grammar_file – the file for output grammar description, if None, name + “_output.json” is used
auto_detect_grammar_files – if no input and output grammar files are provided, auto_detect_grammar_files uses a naming convention to associate a grammar file to a discipline: searches in the “comp_dir” directory containing the discipline source file for files basenames self.name _input.json and self.name _output.json
grammar_type – the type of grammar to use for IO declaration either JSON_GRAMMAR_TYPE or SIMPLE_GRAMMAR_TYPE
cache_type – type of cache policy, SIMPLE_CACHE or HDF5_CACHE
cache_file_path – the file to store the data, mandatory when HDF caching is used
-
class
gemseo.problems.propane.propane.
PropaneComb3
[source]¶ Bases:
gemseo.core.discipline.MDODiscipline
This discipline is characterized by three governing equations.
Constructor.
- Parameters
name – the name of the discipline
input_grammar_file – the file for input grammar description, if None, name + “_input.json” is used
output_grammar_file – the file for output grammar description, if None, name + “_output.json” is used
auto_detect_grammar_files – if no input and output grammar files are provided, auto_detect_grammar_files uses a naming convention to associate a grammar file to a discipline: searches in the “comp_dir” directory containing the discipline source file for files basenames self.name _input.json and self.name _output.json
grammar_type – the type of grammar to use for IO declaration either JSON_GRAMMAR_TYPE or SIMPLE_GRAMMAR_TYPE
cache_type – type of cache policy, SIMPLE_CACHE or HDF5_CACHE
cache_file_path – the file to store the data, mandatory when HDF caching is used
-
classmethod
compute_y4
(x_shared)[source]¶ Solve the fifth coupling equation in functional form.
- Parameters
x_shared (ndarray) – vector of shared design variables
- Returns
coupling variable y_4
-
class
gemseo.problems.propane.propane.
PropaneReaction
[source]¶ Bases:
gemseo.core.discipline.MDODiscipline
Propane’s objective and constraints discipline This discipline’s outputs are the objective function and partial terms used in inequality constraints. Note: the equations have been decoupled (y_i = y_i(x_shared)). Otherwise, the solvers may find iterates for which discipline analyses are not computable.
Constructor.
- Parameters
name – the name of the discipline
input_grammar_file – the file for input grammar description, if None, name + “_input.json” is used
output_grammar_file – the file for output grammar description, if None, name + “_output.json” is used
auto_detect_grammar_files – if no input and output grammar files are provided, auto_detect_grammar_files uses a naming convention to associate a grammar file to a discipline: searches in the “comp_dir” directory containing the discipline source file for files basenames self.name _input.json and self.name _output.json
grammar_type – the type of grammar to use for IO declaration either JSON_GRAMMAR_TYPE or SIMPLE_GRAMMAR_TYPE
cache_type – type of cache policy, SIMPLE_CACHE or HDF5_CACHE
cache_file_path – the file to store the data, mandatory when HDF caching is used
-
classmethod
f_2
(x_shared, y_1, y_2, y_3)[source]¶ First term of a sum of four in the objective function. Is also a nonnegative constraint at system level.
- Parameters
x_shared (ndarray) – vector of shared design variables
y_1 (ndarray) – first coupling variable
y_2 (ndarray) – second coupling variable
y_3 (ndarray) – third coupling variable
- Returns
f2(x_shared, y_1, y_2, y_3)
- Return type
float
-
classmethod
f_6
(x_shared, y_1, y_3)[source]¶ Second term of a sum of four in the objective function. Is also a nonnegative constraint at system level.
- Parameters
x_shared (ndarray) – vector of shared design variables
y_1 (ndarray) – first coupling variable
y_3 (ndarray) – third coupling variable
- Returns
f6(x, y)
- Return type
float
-
classmethod
f_7
(x_shared, y_1, y_3)[source]¶ Third term of a sum of four in the objective function. Is also a nonnegative constraint at system level.
- Parameters
x_shared (ndarray) – vector of shared design variables
y_1 (ndarray) – first coupling variable
y_3 (ndarray) – third coupling variable
- Returns
f7(x, y)
- Return type
float
-
classmethod
f_9
(x_shared, y_1, y_3)[source]¶ Fourth term of a sum of four in the objective function. Is also a nonnegative constraint at system level.
- Parameters
x_shared (ndarray) – vector of shared design variables
y_1 (ndarray) – first coupling variable
y_3 (ndarray) – third coupling variable
- Returns
f9(x, y)
- Return type
float