sellar module¶
Sellar MDO problem¶
The sellar module implements all MDODiscipline
included in the Sellar problem:
where the coupling variables are
and
and where the general constraints are
-
class
gemseo.problems.sellar.sellar.
Sellar1
(residual_form=False)[source]¶ Bases:
gemseo.core.discipline.MDODiscipline
Sellar1 is the
MDODiscipline
implementing the 1st set of equations: y_0.Constructor
- Parameters
residual_form (bool) – if True only residuals are computed, no Ys
-
static
compute_r_0
(x_local, x_shared, y_0, y_1)[source]¶ Evaluate the first coupling equation in residual form.
- Parameters
x_local (ndarray) – vector of design variables local to discipline 1
x_shared (ndarray) – vector of shared design variables
y_0 (ndarray) – coupling variable of discipline 1
y_1 (ndarray) – coupling variable of discipline 2
- Returns
coupling variable y_0
- Return type
float
-
static
compute_y_0
(x_local, x_shared, y_1)[source]¶ Solve the first coupling equation in functional form.
- Parameters
x_local (ndarray) – vector of design variables local to discipline 1
x_shared (ndarray) – vector of shared design variables
y_1 (ndarray) – coupling variable of discipline 2
- Returns
coupling variable y_0 of discipline 1
- Return type
float
-
class
gemseo.problems.sellar.sellar.
Sellar2
(residual_form=False)[source]¶ Bases:
gemseo.core.discipline.MDODiscipline
Sellar1 is the
MDODiscipline
implementing the 2nd set of equations: y_1Constructor
- Parameters
residual_form (bool) – if True only residuals are computed, no Ys
-
static
compute_r_1
(x_shared, y_0, y_1)[source]¶ Evaluate the second coupling equation in residual form.
- Parameters
x_shared (ndarray) – vector of shared design variables
y_0 (ndarray) – coupling variable of discipline 1
y_1 (ndarray) – coupling variable of discipline 2
- Returns
coupling variable y_0
- Return type
float
-
class
gemseo.problems.sellar.sellar.
SellarSystem
[source]¶ Bases:
gemseo.core.discipline.MDODiscipline
SellarSystem is the
MDODiscipline
implementing the computation of the Sellar’s objective and constraints discipline.Constructor
-
static
c_1
(y_0)[source]¶ First constraint on system level
- Parameters
y_0 (ndarray) – coupling variable from discipline 1
- Returns
Value of the constraint
- Return type
float
-
static
c_2
(y_1)[source]¶ Second constraint on system level
- Parameters
y_1 (ndarray) – coupling variable from discipline 2
- Returns
Value of the constraint
- Return type
float
-
static
obj
(x_local, x_shared, y_0, y_1)[source]¶ Objective function
- Parameters
x_local (ndarray) – local design variables
x_shared (ndarray) – shared design variables
y_0 (ndarray) – coupling variable from discipline 1
y_1 (ndarray) – coupling variable from discipline 2
- Returns
Objective value
- Return type
float
-
static