fastga_he.models.propulsion.components.source.generator.components.cstr_generator module

class fastga_he.models.propulsion.components.source.generator.components.cstr_generator.ConstraintsGenerator(**kwargs)[source]

Bases: Group

Class that gather the different constraints for the generator be they ensure or enforce.

Set the solvers to nonlinear and linear block Gauss–Seidel by default.

initialize()[source]

Perform any one-time initialization run at instantiation.

setup()[source]

Build this group.

This method should be overidden by your Group’s method. The reason for using this method to add subsystem is to save memory and setup time when using your Group while running under MPI. This avoids the creation of systems that will not be used in the current process.

You may call ‘add_subsystem’ to add systems to this group. You may also issue connections, and set the linear and nonlinear solvers for this group level. You cannot safely change anything on children systems; use the ‘configure’ method instead.

Available attributes:

name pathname comm options

class fastga_he.models.propulsion.components.source.generator.components.cstr_generator.ConstraintGeneratorPowerRateMission(**kwargs)[source]

Bases: ExplicitComponent

This class will define the value of the maximum power we use to get the power rate inside the mission, it is mandatory that we compute it outside the mission when sizing the power train or else when recomputing the wing area it will be stuck at one which we don’t want. It’s nothing complex but we need it done outside of the mission and we need consistent naming.

Store some bound methods so we can detect runtime overrides.

initialize()[source]

Perform any one-time initialization run at instantiation.

setup()[source]

Declare inputs and outputs.

Available attributes:

name pathname comm options

compute(inputs, outputs, discrete_inputs=None, discrete_outputs=None)[source]

Compute outputs given inputs. The model is assumed to be in an unscaled state.

An inherited component may choose to either override this function or to define a compute_primal function.

Parameters:
  • inputs (Vector) – Unscaled, dimensional input variables read via inputs[key].

  • outputs (Vector) – Unscaled, dimensional output variables read via outputs[key].

  • discrete_inputs (dict-like or None) – If not None, dict-like object containing discrete input values.

  • discrete_outputs (dict-like or None) – If not None, dict-like object containing discrete output values.