PANDORA – A python based framework for modelling and structural sizing of transport aircraft

. Over the last years a multidisciplinary aircraft predesign process chain was established at the DLR, including different numerical tools for the modelling and structural sizing of fuselage structures. To improve the flexibility and performance of this structural analysis part in the MDO process a new tool development has been started in 2016 called “Parametric Numerical Design and Optimization Routines for Aircraft” (PANDORA). The PANDORA framework is using the interpreted high-level programming language Python and is focused on using dedicated open-source packages. Within PANDORA a lot of new packages have been implemented, like a new interface to access CPACS data, a python based FE pre-and postprocessor, a FE data converter to build an interface between PANDORA and different FE solver and a visualization interface using “The Visualization Toolkit” (VTK). Some further packages to generate a FE model based on a CPACS file using the geometry core “Open Cascade” (OCC) and a new FE sizing algorithm is also under development. To simplify the usage of PANDORA and to keep it comprehensible – a graphical user interface (GUI) has been added using the PYQT toolkit. In this paper the current state of the PANDORA development is presented and initial applications are shown.


MDO at DLR
To handle complex interactions of multiple disciplines in aircraft predesign an iterative process is necessary to reach an optimal design.Doing it step by step manually takes a lot of time and will be limited by the configuration assumed at the beginning.And to fix a wrong initial assumption by hand later will cost a lot of time and money.Therefore an automated predesign process can be helpful to analyse multiple different aircraft designs at once to find an optimum and building up an automated model as basic starting point for detailed design processes.
The "German Aerospace Center" (DLR) intensively worked on automated multidisciplinary aircraft predesign process chains for transport aircraft in projects such as DIGITAL-X (2011 -2016 [1]) or VICTORIA (2016 -2019 [2]) in the last couple of years.In the DIGITAL-X project different disciplines of aircraft predesign like aerodynamics, loads or structural analysis have been coupled at different levels of detail in an automated optimization process chain using the "Remote Component Environment" (RCE) [3].To transfer aircraft parameters between multiple tools the "Common Parametric Aircraft Configuration Schema" (CPACS) [4] has been established.At the Institute of Structures and Design (BT) the tools "Transport Aircraft Fuselage Model" (TRAFUMO) and "Sizing-Robot+" (S-BOT+) [5] [6] have been used to estimate the structural mass of the fuselage using a physics based approach with a finite element model generator and a sizing tool based on the ANSYS FE software.

CPACS
At DLR the CPACS schema has been established in 2005 to describe all parameters of the aircraft.After few years of internal development the format was released under OpenSource license in 2012 [4] and is increasingly used by research partners in industry and academia.The file format is xml-based and readable by computer and humans as well.CPACS itself is only a schema that describes the possible parameters and how the format looks like.An aircraft described in a CPACS file can be validated easily using that schema.The plausibility of given CPACS parameter is checked by the tools itself.
To visualize the aircraft surface geometry defined in CPACS the TIGL [7] viewer may be used or the PANDORA GUI (Fig. 1).In recent versions the TIGL viewer has also an interface to access the geometry core using Open Cascade via Python.In addition the internal wing structure geometry can also be generated using OCC.A basic description of an aircraft in CPACS may include several thousands of lines.First to describe the outer surface geometry of the aircraft multiple profiles/airfoils are defined by an arbitrary number of points.These points are used to interpolate a curve using B-Splines.And by defined transformations and scaling of these profiles multiple sections are created which are used for surface interpolation.The aircraft structure, for example the frames in the fuselage, are defined by plane intersections with the surface geometry.The resulting intersection curve is discretised to generate beam elements.Additional CPACS defined cross sections and materials are linked to these beams.More details about the description of the fuselage structure are given in chapter 2.2.

MDO Workflow
Generating an optimized aircraft design using CPACS is done by connecting multiple disciplinary tools using an iterative process.In the project DIGITAL-X a MDO workflow using the "Remote Component Environment" (RCE) was established at DLR [3][8].In this workflow multiple individual tools developed at different disciplinary institutes are connected to each other.Each tool reads and writes some specific CPACS parameters like reading the structure definition and writing back the estimated mass of the sized fuselage structure to update the CPACS file.
Another recent approach in using MDO is currently in progress in VICTORIA project where the workflow is not defined statically but more dynamically and so called Cybermatrix [2].The advantage of connecting tools dynamically is to run multiple tools in parallel and exchange updated data periodically to reduce the idle time of tools.

TRAFUMO
In 2010 the development of the tool TRAFUMO started to generate FE models automatically based on CPACS defined parameters using the commercial FE software ANSYS with the specific scripting language ANSYS APDL.Also some Python programming was established to handle the processes and to generate APDL scripts.The sizing process of the FE structure was done using ANSYS APDL as well with the tool S-BOT+.Because the handling of big data tables using the APDL script language is slow and inconvenient the new tool development was focused on using Python.

PANDORA Environment
At DLR Institute of Structures and Design in Stuttgart the primary focus in the MDO workflow is to estimate the mass of the aircraft fuselage structure.To achieve more flexibility, speed and maintainability with the new tool compared to the existing tools TRAFUMO and S-BOT+ the new development called "Parametric Numerical Design and Optimization Routines for Aircraft" (PANDORA) [9][10] was mainly based on Python programming and focused on open-source philosophy.Thus PANDORA provides more possibilities than before like building a graphical user interface to simplify the usage or an interface to use multiple FE solvers.
To handle a lot of CPACS parameters and FE data in Python the development of multiple new packages was necessary.The programming language Python has been chosen because it has a good readability and it is easy to use for engineers with less IT knowledge.

Python and external Packages
Multiple operations and calculations are done using "numpy", "scipy" or "pandas" to keep the usage of python-based for-loops as low as possible and therefore increase speed by using faster operations implemented in C for example numpy.To store and handle large tables of data (like FE data) the pandas DataFrames are a perfect choice and to read large CPACS xml files the "lxml" package provides fast access.
To calculate the implicit defined aircraft structure with intersection methods the Open Cascade geometry toolkit is used directly or via the application programming interface of the DLR developed software TIGL.The visualization of 3D data is done using "The Visualization Toolkit" (VTK) which can also be used embedded in PYQT to create a graphical user interface (GUI).

Internal packages
The internal packages in PANDORA can be divided into three main parts.CPACS based, FE-data based and additional utility packages.In this way the functionalities are strictly separated and basic packages are also usable beside the aircraft design process.

CPACS based packages
CPACS based packages are more specific like handling CPACS data itself, building geometry from CPACS or generating FE models based on it.The basic CPACS package called CPACS_DATA is used to access CPACS xml data but with some specific CPACS features using the lxml toolkit with fast C libraries.Links between objects are specific defined in CPACS using unique identifier (uID's) which are given as an attribute of an xml branch.
Based on the CPACS_DATA package there is a more specific one to extract only surface geometry information from CPACS called CPACS_GEOMETRY.The geometry is extracted and build up as described in chapter 1.1 using B-Spline interpolation.These created curve and surface objects are used for visualization or conversion into OCC objects and to execute Boolean operations.
To build the fuselage structure model using FE based shell and beam elements the basic components like skin fields, frames, stringers and floor reinforcements are generated initially.The created beam elements have specific cross sections defined via CPACS which can be visualized in PANDORA as well and are used to calculate area moment of inertia.
Additional parts of the fuselage structure are generated using some more specific CPACS parameters like the pressure bulkheads in the front, rear and center fuselage area.As well as loads applied to the fuselage using dynamic aircraft model points (DAM points) connected to the fuselage hull structure using RBE3 elements (green lines) as shown in Fig. 2.

Fig. 2. FE model generated from CPACS (left) and focus on center fuselage area (right)
The overall FE model generation runtime depends on the number structural components and takes for example less than 2 minutes for a long range aircraft with 130 frames.
The loadcases stored in the CPACS file are generated using a condensated dynamic massstiffness model of the aircraft and simulating different flight maneuvers and gust loads.Therefore different tools at DLR like MONA exist to create the dynamical structural model or Varloads to evaluate loadcases [11].

FE data based packages
FE data based packages are less specific and can be used independent from aircraft design process.A simple FE preprocessor called FE_PYPREP is used to handle all data in a solver independent format in python which is leant to Nastran.This internal format can also be stored in a fast way using the binary HDF5 file format.
The required interface to any external solver is provided by the package FE_CONVERTER which uses the internal FE data format as core and provides conversion from and to specific solver files.Additional solver runs can be started directly and afterwards results can be parsed and converted to internal format for post processing and sizing of the structure.
The sizing process of any FE structure which can be imported in PANDORA is done by the package FE_SIZER.Only the sizing algorithm and the sizing criteria are defined there.The single solver runs are executed by the FE_CONVERTER package and afterwards the results are parsed and converted into internal results format for post processing.Currently the sizing process provides three criteria which are still not fully validated yet but first results are looking plausible (Fig. 3).The used colormap ranges between blue (small values) and red (high values).
The max strength criteria only sizes for maximum allowed von Mises stress given by the material data.Additional a buckling criterion is defined using Bruhn handbook methods for shells with clamped or simply supported edges under compression and shear based on the panel edge ratio.The third criterion (still under development) estimates the maximum number of fatigue load spectrum cycles.Therefore a spectrum out of the given loadcases is MATEC Web of Conferences 233, 00013 (2018) https://doi.org/10.1051/matecconf/201823300013EASN-CEAS 2018 set and the rainflow counting is executed to get the number of hysteresis cycles and stresses to estimate lifetime of any aircraft part based on material data using Brown-Miller approach.
For example a bending loadcase of a simple barrel with frames and stringer is sized as shown in Fig. 3 by the single criteria (only sizing of shell elements).The results of the max strength criteria showing a thicker area most far away from the neutral axis which is plausible because of the highest stresses reached there.The sizing process for buckling shows a thicker area only at the compression side of the barrel as expected.And the first version of a fatigue estimations shows the minimum lifetime is reached at areas where the maximum stress fluctuations are reached between applied bending load and unloaded state.
Static sizing of a long range aircraft fuselage based on two sizing criteria (strength and buckling) using ANSYS as solver takes around 6 minutes with PANDORA when using 5 loadcases and 3 iterations on a local computer.This is at least 10 times faster than the previous APDL based tool TRAFUMO and afterwards all FE data including solver and sizing results can be visualized and compared using the PANDORA GUI independent from the used solver.

Utility packages
Additional packages are available to access general used functionalities like visualization of 3D data via VTK, mathematical transformations and interpolations or simple geometrical calculations like plane-curve intersections.The used visualization toolkit VTK provides a Python interface and is fast enough for 3D visualization of FE data models (tested up to 1 million elements).The CPACS defined aircraft surface is build up in PANDORA using B-Spline interpolation methods and OCC.Alternative CPACS geometry access is provided by the DLR developed tool TIGL which is also using OCC and has an application programming interface (API) for Python.

PANDORA GUI
The PANDORA GUI provides the main functionality to any user who is not familiar with using the python source code.Furthermore the GUI is also helpful for developer to keep clarity of the multiple functionalities and simplify processes.
For example accessible functionalities using the GUI are the illustration of the CPACS xml data tree and additional 3D visualization of specific CPACS data objects.Thus a user who is not familiar with CPACS can visualize different objects to see the impact of parameters and their dependencies to each other by interactive usage in the GUI (Fig. 1).
The functionality to generate a new aircraft from scratch is not yet implemented in PANDORA.Therefore some more programming effort is necessary to simplify building an aircraft surface and filling it with structure based on specific design rules.One simple approach has already been tested by J. Walther [12].
Beside modifying and visualizing CPACS data the CPACS_GFEM packages provides the possibility to generate the fuselage structure model via the GUI directly from a CPACS file.But it is also possible to import external FE data by using the FE_CONVERTER package.Any solver which is implemented can be used to write and parse FE data or to directly run a simulation and post process the results directly in PANDORA.
Therefore the user does not need to switch the program while working with different solver formats.The implementation of FE formats is currently best implemented for commercial solvers like ANSYS, NASTRAN and ABAQUS.Furthermore open-source solver formats like CODE_ASTER or B2000 are in development.And additional any FE model in PANDORA can easily be stored in internal format using the "Hierarchical Data Format" (HDF5).

Outlook
Instead of generating the aircraft FE model from CPACS only for static sizing also some explicit crash or ditching simulations are possible.But to handle the large FE deformations a finer FE mesh is necessary.A refinement approach using linear interpolation methods to split existing elements of a FE model mesh is still implemented (Fig. 4).
An additional approach to do not lose the curvature information of the surface geometry is to keep the link of the nodes with the aircraft surface geometry to recalculate nodes between at surface instead of linear interpolation.And a more accurate but complex and slower process is to use OCC not only to build the outer surface but also to build extruded reinforcement structures like frames and stringers.

Fig. 1 .
Fig. 1.Geometry defined in a CPACS file visualized using PANDORA GUI