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:
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.
- 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:
- 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: MutableMapping[str, MutableMapping[str, ndarray | csr_array | JacobianOperator]]
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: dict[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.
- 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: MutableMapping[str, MutableMapping[str, ndarray | csr_array | JacobianOperator]]
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: dict[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:
- 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:
- 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: MutableMapping[str, MutableMapping[str, ndarray | csr_array | JacobianOperator]]
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: dict[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.
- 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:
- 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:
- 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: MutableMapping[str, MutableMapping[str, ndarray | csr_array | JacobianOperator]]
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: dict[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.