gemseo / problems / sobieski / core

Hide inherited members

utils module

Sobieski’s SSBJ base class.

class gemseo.problems.sobieski.core.utils.SobieskiBase(dtype)[source]

Bases: object

Utilities for Sobieski’s SSBJ use case.

Parameters:

dtype (DataType) – The NumPy data type.

class DataType(value)[source]

Bases: StrEnum

A NumPy data type.

COMPLEX = 'complex128'
FLOAT = 'float64'
static compute_aero_center(wing_taper_ratio)[source]

Computes the aerodynamic center.

Parameters:

wing_taper_ratio (float) – The wing taper ratio.

Returns:

The aerodynamic center.

Return type:

float

compute_half_span(aspect_ratio, wing_surface_area)[source]

Compute the half-span from the wing surface and aspect ratio.

Parameters:
  • aspect_ratio (float) – The aspect ratio.

  • wing_surface_area (float) – The wing_surface_area.

Returns:

The half-span.

Return type:

float

compute_polynomial_approximation(s_ref, s_new, flag, s_bound, a0_coeff, ai_coeff, aij_coeff)[source]

Compute the polynomial coefficients.

These coefficients characterize the behavior of certain synthetic variables and function modifiers.

Parameters:
  • s_ref (ndarray) – The initial values of the independent variables (5 variables at max).

  • s_new (ndarray) – The current values of the independent variables.

  • flag (int) – The functional relationship between the variables: - flag = 1: linear >0, - flag = 2: nonlinear >0, - flag = 3: linear < 0, - flag = 4: nonlinear <0, - flag = 5: parabolic.

  • s_bound (ndarray) – The offset value for normalization.

  • a0_coeff (ndarray) –

  • ai_coeff (ndarray) –

  • aij_coeff (ndarray) –

Returns:

The value of the synthetic variables or function modifiers.

Return type:

ndarray

compute_thickness(aspect_ratio, thickness_to_chord_ratio, wing_surface_area)[source]

Compute a wing thickness.

Parameters:
  • aspect_ratio (float) – The aspect ratio.

  • thickness_to_chord_ratio (float) – The thickness to chord ratio.

  • wing_surface_area (float) – The wing_surface_area.

Returns:

The wing thickness.

Return type:

float

static derive_normalization(s_ref, s_new)[source]

Derivation of normalization of input variables.

For use of polynomial approximation.

Parameters:
  • s_ref (float | ndarray) – The initial values of the independent variables (5 variables at max).

  • s_new (float | ndarray) – The current values of the independent variables.

Returns:

Derivatives of normalized value.

Return type:

float | ndarray

derive_polynomial_approximation(s_ref, s_new, flag, s_bound, a0_coeff, ai_coeff, aij_coeff)[source]

Compute the polynomial coefficients for both evaluation and linearization.

These coefficients characterize the behavior of certain synthetic variables and function modifiers.

Parameters:
  • s_ref (ndarray) – The initial values of the independent variables (5 variables at max).

  • s_new (ndarray) – The current values of the independent variables.

  • flag (int) – The functional relationship between the variables: - flag = 1: linear >0, - flag = 2: nonlinear >0, - flag = 3: linear < 0, - flag = 4: nonlinear <0, - flag = 5: parabolic.

  • s_bound (ndarray) – The offset value for normalization.

  • a0_coeff (ndarray) –

  • ai_coeff (ndarray) –

  • aij_coeff (ndarray) –

Returns:

The value of the synthetic variables or function modifiers for both evaluation and linearization.

Return type:

tuple[ndarray, ndarray, ndarray, ndarray]

classmethod get_bounds_by_name(variable_names)[source]

Return the bounds of the design and coupling variables.

Parameters:

variable_names (str | Sequence[str]) – The names of the variables.

Returns:

The lower and upper bounds of these variables.

Return type:

tuple[ndarray, ndarray]

get_initial_values()[source]

Return the initial values used by the polynomial functions.

Returns:

The initial values used by the polynomial functions.

Return type:

tuple[float]

DTYPE_COMPLEX = 'complex128'
DTYPE_DEFAULT = 'complex128'
DTYPE_DOUBLE = 'float64'
property constants: ndarray

The default constants.

property design_bounds: tuple[ndarray, ndarray]

The lower and upper bounds of the design variables.

dtype: DataType

The NumPy data type.

property initial_design: ndarray

The initial design.

math: ModuleType

The library of mathematical functions.