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: MDODiscipline

The first set of equations of the propane combustion.

This discipline is characterized by two coupling equations in functional form.

classmethod compute_y0(x_shared)[source]

Solve the first coupling equation in functional form.

Parameters:

x_shared (ndarray) – The shared design variables.

Returns:

The coupling variable y0.

Return type:

ndarray

classmethod compute_y1(x_shared)[source]

Solve the second coupling equation in functional form.

Parameters:

x_shared – The shared design variables.

Returns:

The coupling variable y1.

Return type:

float

cache: AbstractCache | None

The cache containing one or several executions of the discipline according to the cache policy.

data_processor: DataProcessor

A tool to pre- and post-process discipline data.

exec_for_lin: bool

Whether the last execution was due to a linearization.

input_grammar: BaseGrammar

The input grammar.

jac: dict[str, dict[str, ndarray]]

The Jacobians of the outputs wrt inputs.

The structure is {output: {input: matrix}}.

name: str

The name of the discipline.

output_grammar: BaseGrammar

The output grammar.

re_exec_policy: ReExecutionPolicy

The policy to re-execute the same discipline.

residual_variables: Mapping[str, str]

The output variables mapping to their inputs, to be considered as residuals; they shall be equal to zero.

run_solves_residuals: bool

Whether the run method shall solve the residuals.

class gemseo.problems.propane.propane.PropaneComb2[source]

Bases: MDODiscipline

The second set of equations of the propane combustion.

This discipline is characterized by two coupling equations in functional form.

classmethod compute_y2(x_shared)[source]

Solve the third coupling equation in functional form.

Parameters:

x_shared (ndarray) – The shared design variables.

Returns:

The coupling variable y2.

Return type:

ndarray

classmethod compute_y3(x_shared)[source]

Solve the fourth coupling equation in functional form.

Parameters:

x_shared – The shared design variables.

Returns:

The coupling variable y3.

cache: AbstractCache | None

The cache containing one or several executions of the discipline according to the cache policy.

data_processor: DataProcessor

A tool to pre- and post-process discipline data.

exec_for_lin: bool

Whether the last execution was due to a linearization.

input_grammar: BaseGrammar

The input grammar.

jac: dict[str, dict[str, ndarray]]

The Jacobians of the outputs wrt inputs.

The structure is {output: {input: matrix}}.

name: str

The name of the discipline.

output_grammar: BaseGrammar

The output grammar.

re_exec_policy: ReExecutionPolicy

The policy to re-execute the same discipline.

residual_variables: Mapping[str, str]

The output variables mapping to their inputs, to be considered as residuals; they shall be equal to zero.

run_solves_residuals: bool

Whether the run method shall solve the residuals.

class gemseo.problems.propane.propane.PropaneComb3[source]

Bases: MDODiscipline

The third set of equations of the propane combustion.

This discipline is characterized by three coupling equations in functional form.

classmethod compute_y4(x_shared)[source]

Solve the fifth coupling equation in functional form.

Parameters:

x_shared – The shared design variables.

Returns:

The coupling variable y4.

Return type:

float

classmethod compute_y5(x_shared)[source]

Solve the sixth coupling equation in functional form.

Parameters:

x_shared – The shared design variables.

Returns:

The coupling variable y5.

classmethod compute_y6(x_shared)[source]

Solve the seventh coupling equation in functional form.

Parameters:

x_shared – The shared design variables.

Returns:

The coupling variable y6.

Return type:

float

cache: AbstractCache | None

The cache containing one or several executions of the discipline according to the cache policy.

data_processor: DataProcessor

A tool to pre- and post-process discipline data.

exec_for_lin: bool

Whether the last execution was due to a linearization.

input_grammar: BaseGrammar

The input grammar.

jac: dict[str, dict[str, ndarray]]

The Jacobians of the outputs wrt inputs.

The structure is {output: {input: matrix}}.

name: str

The name of the discipline.

output_grammar: BaseGrammar

The output grammar.

re_exec_policy: ReExecutionPolicy

The policy to re-execute the same discipline.

residual_variables: Mapping[str, str]

The output variables mapping to their inputs, to be considered as residuals; they shall be equal to zero.

run_solves_residuals: bool

Whether the run method shall solve the residuals.

class gemseo.problems.propane.propane.PropaneReaction[source]

Bases: MDODiscipline

Propane’s objective and constraints discipline.

This discipline’s outputs are the objective function and partial terms used in inequality constraints.

Notes

The equations have been decoupled (y_i = y_i(x_shared)). Otherwise, the solvers may find iterates for which discipline analyses are not computable.

classmethod f_2(x_shared, y_1, y_2, y_3)[source]

Compute the first term of the objective function.

It is also a non-negative constraint at system level.

Parameters:
• x_shared (ndarray) – The shared design variables.

• y_1 (ndarray) – The first coupling variable.

• y_2 (ndarray) – The second coupling variable.

• y_3 (ndarray) – The third coupling variable.

Returns:

The first term of the objective function.

Return type:

ndarray

classmethod f_6(x_shared, y_1, y_3)[source]

Compute the second term of the objective function.

It is also a non-negative constraint at system level.

Parameters:
• x_shared – The shared design variables.

• y_1 – The first coupling variable.

• y_3 – The third coupling variable.

Returns:

The second term of the objective function.

Return type:

complex

classmethod f_7(x_shared, y_1, y_3)[source]

Compute the third term of the objective function.

It is also a non-negative constraint at system level.

Parameters:
• x_shared – The shared design variables.

• y_1 – The first coupling variable.

• y_3 – The third coupling variable.

Returns:

The third term of the objective function.

Return type:

complex

classmethod f_9(x_shared, y_1, y_3)[source]

Compute the fourth term of the objective function.

It is also a non-negative constraint at system level.

Parameters:
• x_shared – The shared design variables.

• y_1 – The first coupling variable.

• y_3 – The third coupling variable.

Returns:

The fourth term of the objective function.

cache: AbstractCache | None

The cache containing one or several executions of the discipline according to the cache policy.

data_processor: DataProcessor

A tool to pre- and post-process discipline data.

exec_for_lin: bool

Whether the last execution was due to a linearization.

input_grammar: BaseGrammar

The input grammar.

jac: dict[str, dict[str, ndarray]]

The Jacobians of the outputs wrt inputs.

The structure is {output: {input: matrix}}.

name: str

The name of the discipline.

output_grammar: BaseGrammar

The output grammar.

re_exec_policy: ReExecutionPolicy

The policy to re-execute the same discipline.

residual_variables: Mapping[str, str]

The output variables mapping to their inputs, to be considered as residuals; they shall be equal to zero.

run_solves_residuals: bool

Whether the run method shall solve the residuals.

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