Source code for fastga_he.models.propulsion.assemblies.simple_assembly.full_simple_assembly

# This file is part of FAST-OAD_CS23-HE : A framework for rapid Overall Aircraft Design of Hybrid
# Electric Aircraft.
# Copyright (C) 2022 ISAE-SUPAERO

import openmdao.api as om

from .sizing_simple_assembly import SizingAssembly
from .performances_simple_assembly import PerformancesAssembly


[docs] class FullSimpleAssembly(om.Group): def __init__(self, **kwargs): super().__init__(**kwargs) # Solvers setup self.nonlinear_solver = om.NonlinearBlockGS() self.nonlinear_solver.options["iprint"] = 2 self.nonlinear_solver.options["maxiter"] = 200 self.nonlinear_solver.options["rtol"] = 1e-5 self.linear_solver = om.LinearBlockGS()
[docs] def initialize(self): self.options.declare( "number_of_points", default=1, desc="number of equilibrium to be treated" )
[docs] def setup(self): number_of_points = self.options["number_of_points"] self.add_subsystem(name="sizing", subsys=SizingAssembly(), promotes=["*"]) self.add_subsystem( name="performances", subsys=PerformancesAssembly(number_of_points=number_of_points), promotes=["*"], )