gemseo / problems / sobieski

core module

SSBJ core computations

Classes:

SobieskiProblem([dtype])

Class defining Sobieski problem and related method to the problem such as disciplines computation, constraints, reference optimum.

class gemseo.problems.sobieski.core.SobieskiProblem(dtype='float64')[source]

Bases: object

Class defining Sobieski problem and related method to the problem such as disciplines computation, constraints, reference optimum.

Constructor.

Parameters

dtype (str) – data type of problem, either “float64” or “complex128”.

Attributes:

CONTRAINTS_NAMES

CONTRAINTS_NAMES_INEQUALITY

COUPLING_VARIABLES_NAMES

DTYPE_COMPLEX

DTYPE_DOUBLE

DV_NAMES

DV_NAMES_NORMALIZED

ESF_LOWER_LIMIT

ESF_UPPER_LIMIT

PRESSURE_GRADIENT_LIMIT

STRESS_LIMIT

TEMPERATURE_LIMIT

TWIST_LOWER_LIMIT

TWIST_UPPER_LIMIT

Methods:

blackbox_aerodynamics(x_shared, y_12, y_32, x_2)

This function calculates drag and lift to drag ratio of A/C.

blackbox_mission(x_shared, y_14, y_24, y_34)

THIS SECTION COMPUTES THE A/C RANGE from Breguet’s law.

blackbox_propulsion(x_shared, y_23, x_3[, …])

This function calculates fuel comsumption, engine weight and engine scale factor.

blackbox_structure(x_shared, y_21, y_31, x_1)

This function calculates the weight of the aircraft by structure and adds them to obtain a total aircraft weight.

default_constants()

Definition of constants vector C for Sobieski problem.

derive_blackbox_aerodynamics(x_shared, y_12, …)

This function calculates drag and lift to drag ratio of A/C.

derive_blackbox_mission(x_shared, y_14, …)

param x_shared

shared design variable vector:

derive_blackbox_propulsion(x_shared, y_23, x_3)

This function calculates the Jacobian matrix of propulsion.

derive_blackbox_structure(x_shared, y_21, …)

Compute jacobian matrix of structural analysis y_1 is the vector of structural outputs and g_1 are the structural constraints.

get_bounds_by_name(variables_names)

Class method that return bounds of design variables and coupling variables.

get_constraints(design_vector[, true_cstr])

Compute all constraints of Sobieski problem.

get_default_inputs([names])

Returns a set of default inputs for the different disciplines.

get_default_inputs_equilibrium([names])

Returns a set of default inputs, where coupling variables are at the equilibrium (MDA) for X0.

get_default_inputs_feasible([names])

Returns a set of default inputs for the different disciplines.

get_default_x0()

Function that returns a default initial value for design variables.

get_random_input([names, seed])

Get a randomized starting point with specified variables names.

get_sobieski_bounds()

Set the input design bounds and return them as 2 ndarrays.

get_sobieski_constraints(g_1, g_2, g_3[, …])

Compare the constraints to their limits for Sobieski problem.

get_sobieski_optimum()

Optimum by Sobieski with BLISS.

get_sobieski_optimum_range()

Return range value by Sobieski with BLISS.

get_x0_feasible([names])

Gets a feasible starting point with specified variables names.

normalize_inputs(input_vector)

This function normalizes design variables w.r.t lower and upper bounds of these design variables They will be defined in [0,1]

read_design_space()

Reads the sobieski design space file and creates a DesignSpace instance.

systemanalysis_gauss_seidel(design_vector[, …])

This subfunction uses Gauss-Seidel iterations on the A/C range optimization model to compute behavior variables, given a set of design variables.

unnormalize_inputs(input_vector)

This function unnormalizes design variables.

CONTRAINTS_NAMES = ('Stress_x1', 'Stress_x2', 'Stress_x3', 'Stress_x4', 'Stress_x5', 'Twist', 'Pgrad', 'ESF', 'Temperature', 'Throttle')
CONTRAINTS_NAMES_INEQUALITY = ('c_Stress_x1', 'c_Stress_x2', 'c_Stress_x3', 'c_Stress_x4', 'c_Stress_x5', 'c_Twist_upper', 'c_Twist_lower', 'c_Pgrad', 'c_ESF_upper', 'c_ESF_lower', 'c_Throttle', 'c_Temperature')
COUPLING_VARIABLES_NAMES = ('Total weight', 'Fuel weight', 'Wing twist', 'Lift', 'Drag', 'Lift/Drag', 'SFC', 'Engine weight')
DTYPE_COMPLEX = 'complex128'
DTYPE_DOUBLE = 'float64'
DV_NAMES = ('TaperRatio', 'SectionalArea', 'Cf', 'Throttle_setting', 'eta', 'h', 'Mach', 'AR', 'Phi', 'sref')
DV_NAMES_NORMALIZED = ('x_TaperRatio', 'x_SectionalArea', 'x_Cf', 'x_Throttle_setting', 'x_eta', 'x_h', 'x_Mach', 'x_AR', 'x_Phi', 'x_sref')
ESF_LOWER_LIMIT = 0.5
ESF_UPPER_LIMIT = 1.5
PRESSURE_GRADIENT_LIMIT = 1.04
STRESS_LIMIT = 1.09
TEMPERATURE_LIMIT = 1.02
TWIST_LOWER_LIMIT = 0.8
TWIST_UPPER_LIMIT = 1.04
blackbox_aerodynamics(x_shared, y_12, y_32, x_2, true_cstr=False)[source]

This function calculates drag and lift to drag ratio of A/C.

Parameters
  • x_shared (ndarray) –

    shared design variable vector:

    • x_shared[0]: thickness/chord ratio

    • x_shared[1]: altitude

    • x_shared[2]: Mach

    • x_shared[3]: aspect ratio

    • x_shared[4]: wing sweep

    • x_shared[5]: wing surface area

  • y_12 (ndarray) –

    shared variables coming from blackbox_structure:

    • y_12[0]: total aircraft weight

    • y_12[1]: wing twist

  • y_32 (ndarray) –

    shared variables coming from blackbox_propulsion:

    • y_32[0]: engine scale factor

  • x_2 (ndarray) –

    aero. design variable:

    • x_2[0]: friction coeff

  • true_cstr – Default value = False)

Returns

y_2, y_21, y_23, y_24, g_2:

  • y_2: aero. analysis outputs

  • y_2[0]: lift

  • y_2[1]: drag

  • y_2[2]: lift/drag ratio

  • y_21: shared variable for blackbox_structure (lift)

  • y_23: shared variable for blackbox_propulsion (drag)

  • y_24: shared variable for blackbox_mission (lift/drag ratio)

  • g_2: aero constraint (pressure gradient)

Return type

ndarray, ndarray, ndarray, ndarray, ndarray

blackbox_mission(x_shared, y_14, y_24, y_34)[source]

THIS SECTION COMPUTES THE A/C RANGE from Breguet’s law.

Parameters
  • x_shared (ndarray) –

    shared design variable vector:

    • x_shared[0]: thickness/chord ratio

    • x_shared[1]: altitude

    • x_shared[2]: Mach

    • x_shared[3]: aspect ratio

    • x_shared[4]: wing sweep

    • x_shared[5]: wing surface area

  • y_14 (ndarray) –

    shared variables coming from blackbox_structure:

    • y_14[0]: total aircraft weight

    • y_14[1]: fuel weight

  • y_24 – shared variables coming from blackbox_aerodynamics (lift/drag ratio)

  • y_34 (ndarray) – shared variables coming from blackbox_propulsion (SFC)

Returns

y_4: range value

Return type

ndarray

blackbox_propulsion(x_shared, y_23, x_3, true_cstr=False)[source]

This function calculates fuel comsumption, engine weight and engine scale factor.

Parameters
  • x_shared (ndarray) –

    shared design variable vector:

    • x_shared[0]: thickness/chord ratio

    • x_shared[1]: altitude

    • x_shared[2]: Mach

    • x_shared[3]: aspect ratio

    • x_shared[4]: wing sweep

    • x_shared[5]: wing surface area

  • y_23 (ndarray) – shared variables coming from blackbox_aerodynamics (drag)

  • x_3 (ndarray) – power/propulsion design variable (throttle setting)

  • true_cstr (bool) – analysis returns constraint absolute value or relative value to bounds (Default value = False)

Returns

y_3, y_34, y_31, y_32, g_3:

  • y_3: output variables for propulsion analysis

  • y_3[0]: SFC

  • y_3[1]: engine weight

  • y_3[2]: engine scale factor

  • y_34: shared variable for blackbox_mission (SFC)

  • y_31: shared variable for blackbox_structure (engine weight)

  • y_32: shared variable for blackbox_aerodynamics (ESF)

  • g_3: propulsion constraints

  • g_3[0]: engine scale factor constraint

  • g_3[1]: engine temperature

  • g_3[2]: throttle setting constraint

Return type

ndarray, ndarray, ndarray, ndarray, ndarray

blackbox_structure(x_shared, y_21, y_31, x_1, true_cstr=False)[source]

This function calculates the weight of the aircraft by structure and adds them to obtain a total aircraft weight.

Parameters
  • x_shared (ndarray) –

    shared design variable vector:

    • x_shared[0]: thickness/chord ratio

    • x_shared[1]: altitude

    • x_shared[2]: Mach

    • x_shared[3]: aspect ratio

    • x_shared[4]: wing sweep

    • x_shared[5]: wing surface area

  • y_21 (ndarray) – lift

  • y_31 (ndarray) – engine weight

  • x_1 (ndarray) –

    weight design variables:

    • x_1[0]: wing taper ratio

    • x_1[1]: wingbox x-sectional area as poly. funct

  • true_cstr – Default value = False)

Returns

g_1,y_1, y_12:

  • g_1 : vector of constraints for weight analysis

  • g_1[0] to g_1[4]: stress on wing

  • g_1[5]: wing twist as constraint

  • y_1: weight analysis outputs

  • y_1[0]: total aircraft weight

  • y_1[1]: fuel weight

  • y_1[2]: wing twist

  • y_12: shared variables used for aero. computations (blackbox_aerodynamics)

  • y_12[0]: total aircraft weight

  • y_12[1]: wing twist

  • y_14: shared variables used for range computation (blackbox_mission)

  • y_14[0]: total aircraft weight

  • y_14[1]: fuel weight

Return type

ndarray, ndarray, ndarray, ndarray

default_constants()[source]

Definition of constants vector C for Sobieski problem.

Returns

constant vector

Return type

ndarray

derive_blackbox_aerodynamics(x_shared, y_12, y_32, x_2)[source]

This function calculates drag and lift to drag ratio of A/C.

Parameters
  • x_shared (ndarray) –

    shared design variable vector:

    • x_shared[0]: thickness/chord ratio

    • x_shared[1]: altitude

    • x_shared[2]: Mach

    • x_shared[3]: aspect ratio

    • x_shared[4]: wing sweep

    • x_shared[5]: wing surface area

  • y_12 (ndarray) –

    shared variables coming from blackbox_structure:

    • y_12[0]: total aircraft weight

    • y_12[1]: wing twist

  • y_32 (ndarray) –

    shared variables coming from blackbox_propulsion:

    • y_32[0]: engine scale factor

  • x_2 (ndarray) –

    aero. design variable:

    • x_2[0]: friction coeff

Returns

J : Jacobian matrix

Return type

dict(ndarray)

derive_blackbox_mission(x_shared, y_14, y_24, y_34)[source]
Parameters
  • x_shared (ndarray) –

    shared design variable vector:

    • x_shared[0]: thickness/chord ratio

    • x_shared[1]: altitude

    • x_shared[2]: Mach

    • x_shared[3]: aspect ratio

    • x_shared[4]: wing sweep

    • x_shared[5]: wing surface area

  • y_14 (ndarray) –

    shared variables coming from blackbox_structure:

    • y_14[0]: total aircraft weight

    • y_14[1]: fuel weight

  • y_24 – shared variables coming from blackbox_aerodynamics (lift/drag ratio)

  • y_34 (ndarray) – shared variables coming from blackbox_propulsion (SFC)

Returns

J : Jacobian matrix

Return type

dict(ndarray)

derive_blackbox_propulsion(x_shared, y_23, x_3, true_cstr=False)[source]

This function calculates the Jacobian matrix of propulsion.

Parameters
  • x_shared (ndarray) –

    shared design variable vector:

    • x_shared[0]: thickness/chord ratio

    • x_shared[1]: altitude

    • x_shared[2]: Mach

    • x_shared[3]: aspect ratio

    • x_shared[4]: wing sweep

    • x_shared[5]: wing surface area

  • y_23 (ndarray) – shared variables coming from blackbox_aerodynamics (drag)

  • x_3 (ndarray) – power/propulsion design variable (throttle setting)

  • true_cstr (bool) – analysis returns constraint absolute value or relative value to bounds (Default value = False)

Returns

J : Jacobian matrix

Return type

dict(ndarray)

derive_blackbox_structure(x_shared, y_21, y_31, x_1, true_cstr=False)[source]

Compute jacobian matrix of structural analysis y_1 is the vector of structural outputs and g_1 are the structural constraints.

  • y_1[0]: total aircraft weight

  • y_1[1]: fuel weight

  • y_1[2]: wing twist

Parameters
  • x_shared (ndarray) – shared design variable vector

  • x_1 (ndarray) –

    structure design variable vector:

    • x_1[0]: wing taper ratio

    • x_1[1]: wingbox x-sectional area as poly. funct

  • y_21 (ndarray) – coupling variable from aerodynamics (lift)

  • y_31 (ndarray) – coupling variable from propulsion (Engine weight)

  • true_cstr – Default value = False)

Returns

J : Jacobian matrix

Return type

dict(ndarray)

get_bounds_by_name(variables_names)[source]

Class method that return bounds of design variables and coupling variables.

Parameters

variables_names – name of variable

Returns

lower bound and upper bound

get_constraints(design_vector, true_cstr=False)[source]

Compute all constraints of Sobieski problem.

Parameters
  • design_vector (ndarray) – design variable vector

  • true_cstr (bool) – indicates if user wants absolute value or relative to limits (Default value = False)

Returns

outputs : g_1,g_2,g_3:constraint values

Return type

ndarray

get_default_inputs(names=None)[source]

Returns a set of default inputs for the different disciplines.

Parameters

names (str or list(str)) – specific data names, if None, returns all inputs (Default value = None)

Returns

indata , a dict of input data

Return type

dict

get_default_inputs_equilibrium(names=None)[source]

Returns a set of default inputs, where coupling variables are at the equilibrium (MDA) for X0.

Parameters

names (str or list(str)) – specific data names, if None, returns all inputs (Default value = None)

Returns

indata , a dict of input data

Return type

dict

get_default_inputs_feasible(names=None)[source]

Returns a set of default inputs for the different disciplines.

Parameters

names (str or list(str)) – specific data names, if None, returns all inputs (Default value = None)

Returns

indata , a dict of input data

Return type

dict

get_default_x0()[source]

Function that returns a default initial value for design variables.

Returns

i_0 , initial design variables

Return type

ndarray

get_random_input(names=None, seed=None)[source]

Get a randomized starting point with specified variables names.

Parameters
  • names (str or list(str)) – specific data names, if None, returns all inputs (Default value = None)

  • seed – the seed for random number generation (Default value = None)

Returns

values of specified design variable name

Return type

ndarray

get_sobieski_bounds()[source]

Set the input design bounds and return them as 2 ndarrays.

Returns

ub,lb: upper and lower bounds

Return type

ndarray,ndarray

get_sobieski_constraints(g_1, g_2, g_3, true_cstr=False)[source]

Compare the constraints to their limits for Sobieski problem.

Parameters
  • g_1 (ndarray) –

    vector of constraints for weight analysis:

    • g_1[0] to g_1[4]: stress on wing

    • g_1[5]: wing twist as constraint

  • g_2 (ndarray) –

    vector of constraints for aerodynamics analysis:

    • g_2[0]: pressure gradient

  • g_3 (ndarray) –

    vector of constraints for propulsion analysis:

    • g_3[0]: engine scale factor constraint

    • g_3[1]: engine temperature

    • g_3[2]: throttle setting constraint: must be, at least, requested throttle

  • true_cstr (bool) – choice for true value of constraints or comparison to bounds (Default value = False)

Returns

constraints_values or comparison to bounds

Return type

ndarray

get_sobieski_optimum()[source]

Optimum by Sobieski with BLISS.

Returns

array of x optimum x_1, x_2, x_3, x_shared concatenated

Return type

ndarray

get_sobieski_optimum_range()[source]

Return range value by Sobieski with BLISS.

Returns

optimal range value

Return type

ndarray

get_x0_feasible(names=None)[source]

Gets a feasible starting point with specified variables names.

Parameters

names (str or list(str)) – specific data names, if None, returns all inputs (Default value = None)

Returns

values of specified design variable name

Return type

ndarray

normalize_inputs(input_vector)[source]

This function normalizes design variables w.r.t lower and upper bounds of these design variables They will be defined in [0,1]

Parameters

input_vector (ndarray) – real design variables vector

Returns

normalized vector of design variables

Return type

ndarray

read_design_space()[source]

Reads the sobieski design space file and creates a DesignSpace instance.

systemanalysis_gauss_seidel(design_vector, true_cstr=False, accuracy=0.001)[source]

This subfunction uses Gauss-Seidel iterations on the A/C range optimization model to compute behavior variables, given a set of design variables. Black boxes WEIGHT, DRAGPOLAR, and POWER are called.

Parameters
  • design_vector (ndarray) – design variable vector

  • true_cstr (bool) – return constraint value or compare it to bounds (Default value = False)

  • accuracy (float) – system resolution accuracy (Default value = 1e-3)

Returns

y_1, y_2, y_3, y_4, y_12, y_14, y_21, y_23, y_24, y_31, y_32, y_34, g_1, g_2, g_3:

  • y_1: weight analysis outputs

  • y_1[0]: total aircraft weight

  • y_1[1]: fuel weight

  • y_1[2]: wing twist

  • y_2: aero. analysis outputs

  • y_2[0]: lift

  • y_2[1]: drag

  • y_2[2]: lift/drag ratio

  • y_3: output variables for propulsion analysis

  • y_3[0]: SFC

  • y_3[1]: engine weight

  • y_4: range computation output

  • y_12: shared variables from blackbox_structure for blackbox_aerodynamics

  • y_12[0]: total aircraft weight

  • y_12[1]: wing twist

  • y_14: shared variables coming from blackbox_structure for blackbox_mission

  • y_14[0]: total aircraft weight

  • y_14[1]: fuel weight

  • y_21: lift from blackbox_aerodynamics for blackbox_structure

  • y_23: drag from blackbox_aerodynamics for blackbox_propulsion

  • y_24: lift/drag ratio coming from blackbox_aerodynamics for blackbox_mission

  • y_31: engine weight coming from blackbox_propulsion for blackbox_structure

  • y_32: engine scale factor coming from BlackBoxPower for blackbox_aerodynamics

  • y_34:SFC coming from blackbox_propulsion for blackbox_mission

  • g_1: vector of constraints for weight analysis

  • g_1[0] to g_1[4]: stress on wing

  • g_1[5]: wing twist as constraint

  • g_2: aero constraint (pressure gradient)

  • g_3: propulsion constraints

  • g_3[0]: engine scale factor constraint

  • g_3[1]: engine temperature

  • g_3[2]: throttle setting constraint

Return type

ndarray

unnormalize_inputs(input_vector)[source]

This function unnormalizes design variables.

Parameters

input_vector (ndarray) – normalized design variables vector

Returns

real vector of design variables

Return type

ndarray