gemseo / problems / propane

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:

\[\begin{split}\begin{aligned} \text{minimize the objective function } & f_2 + f_6 + f_7 + f_9 \\ \text{with respect to the design variables } & x_{1},\,x_{3},\,x_{6},\,x_{7} \\ \text{subject to the general constraints } & f_2(x) \geq 0\\ & f_6(x) \geq 0\\ & f_7(x) \geq 0\\ & f_9(x) \geq 0\\ \text{subject to the bound constraints } & x_{1} \geq 0\\ & x_{3} \geq 0\\ & x_{6} \geq 0\\ & x_{7} \geq 0\\ \end{aligned}\end{split}\]

where the System Discipline consists of computing the following expressions:

\[\begin{split}\begin{aligned} f_2(x) & = & 2x_1 + x_2 + x_4 + x_7 + x_8 + x_9 + 2x_{10} - R, \\ f_6(x) & = & K_6x_2^{1/2}x_4^{1/2} - x_1^{1/2}x_6(p/x_{11})^{1/2}, \\ f_7(x) & = & K_7x_1^{1/2}x_2^{1/2} - x_4^{1/2}x_7(p/x_{11})^{1/2}, \\ f_9(x) & = & K_9x_1x_3^{1/2} - x_4x_9(p/x_{11})^{1/2}. \\ \end{aligned}\end{split}\]

Discipline 1 computes \((x_{2}, x_{4})\) by satisfying the following equations:

\[\begin{split}\begin{aligned} x_1 + x_4 - 3 &=& 0,\\ K_5x_2x_4 - x_1x_5 &=& 0.\\ \end{aligned}\end{split}\]

Discipline 2 computes \((x_2, x_4)\) such that:

\[\begin{split}\begin{aligned} K_8x_1 + x_4x_8(p/x_{11}) &=& 0,\\ K_{10}x_{1}^{2} - x_4^2x_{10}(p/x_{11}) &=& 0.\\ \end{aligned}\end{split}\]

and Discipline 3 computes \((x_5, x_9, x_{11})\) by solving:

\[\begin{split}\begin{aligned} 2x_2 + 2x_5 + x_6 + x_7 - 8&=& 0,\\ 2x_3 + x_9 - 4R &=& 0, \\ x_{11} - \sum_{j=1}^{10} x_j &=& 0. \\ \end{aligned}\end{split}\]
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

classmethod compute_y0(x_shared)[source]

Solve the first coupling equation in functional form.

Parameters

x_shared (ndarray) – vector of shared design variables

Returns

coupling variable y0

classmethod compute_y1(x_shared)[source]

Solve the second coupling equation in functional form.

Parameters

x_shared (ndarray) – vector of shared design variables

Returns

coupling variable y1

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

classmethod compute_y2(x_shared)[source]

Solve the third coupling equation in functional form.

Parameters

x_shared (ndarray) – vector of shared design variables

Returns

coupling variable y_2

classmethod compute_y3(x_shared)[source]

Solve the fourth coupling equation in functional form.

Parameters

x_shared (ndarray) – vector of shared design variables

Returns

coupling variable y_3

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

classmethod compute_y5(x_shared)[source]

Solve the sixth coupling equation in functional form.

Parameters

x_shared (ndarray) – vector of shared design variables

Returns

coupling variable Y5

classmethod compute_y6(x_shared)[source]

Solve the seventh coupling equation in functional form.

Parameters

x_shared (ndarray) – vector of shared design variables

Returns

coupling variable Y6

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

gemseo.problems.propane.propane.get_design_space(to_complex=True)[source]

Reads the design space file

Parameters

to_complex – if True, current x is a complex vector