Simulation of High Aspect Ratio planes in Python [SHARPy]

https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fraw.githubusercontent.com%2FImperialCollegeLondon%2Fsharpy%2Fmaster%2F.version.json https://codecov.io/gh/ImperialCollegeLondon/sharpy/branch/master/graph/badge.svg https://img.shields.io/badge/License-BSD%203--Clause-blue.svg https://readthedocs.org/projects/ic-sharpy/badge/?version=master https://joss.theoj.org/papers/f7ccd562160f1a54f64a81e90f5d9af9/status.svg https://zenodo.org/badge/DOI/10.5281/zenodo.3531965.svg

Welcome to SHARPy (Simulation of High Aspect Ratio aeroplanes in Python)!

SHARPy is an aeroelastic analysis package currently under development at the Department of Aeronautics, Imperial College London. It can be used for the structural, aerodynamic, aeroelastic and flight dynamics analysis of flexible aircraft, flying wings and wind turbines. Amongst other capabilities, it offers the following solutions to the user:

  • Static aerodynamic, structural and aeroelastic solutions

  • Finding trim conditions for aeroelastic configurations

  • Nonlinear, dynamic time domain simulations under a large number of conditions such as:

    • Prescribed trajectories.

    • Free flight.

    • Dynamic follower forces.

    • Control inputs in thrust, control surface deflection…

    • Arbitrary time-domain gusts, including non span-constant ones.

    • Full 3D turbulent fields.

  • Multibody dynamics with hinges, articulations and prescribed nodal motions.

    • Applicable to wind turbines.

    • Hinged aircraft.

    • Catapult assisted takeoffs.

  • Linear analysis

    • Linearisation around a nonlinear equilibrium.

    • Frequency response analysis.

    • Asymptotic stability analysis.

  • Model order reduction

    • Krylov-subspace reduction methods.

    • Balancing reduction methods.

The modular design of SHARPy allows to simulate complex aeroelastic cases involving very flexible aircraft. The structural solver supports very complex beam arrangements, while retaining geometrical nonlinearity. The UVLM solver features different wake modelling fidelities while supporting large lifting surface deformations in a native way. Detailed information on each of the solvers is presented in their respective documentation packages.

Contents

SHARPy Installation Guide

Last revision 3 February 2020

The following step by step tutorial will guide you through the installation process of SHARPy.

Requirements

Operating System Requirements

SHARPy is being developed and tested on the following operating systems:

  • CentOS 7 and CentOS 8

  • Ubuntu 18.04 LTS

  • MacOS Mojave and Catalina

It is also available to the vast majority of operating systems that are supported by Docker, including Windows!

Required Distributions

  • Anaconda Python 3.7

  • GCC 6.0 or higher (recommended). C++ and Fortran.

Recommended Software

You may find the applications below useful, we recommend you use them but cannot provide any direct support.

  • HDFView to read and view .h5 files. HDF5 is the SHARPy input file format.

  • Paraview to visualise SHARPy’s output.

GitHub Repository

SHARPy can be installed from the source code available on GitHub or you can get it packed in a Docker container. If what you want is to give it a go and run some static or simple dynamic cases (and are familiar with Docker), we recommend the Docker route. If you want to check the code, modify it and compile the libraries with custom flags, build it from source (recommended).

Building SHARPy from source (release or development builds)

SHARPy can be built from source so that you can get the latest release or (stable) development build.

SHARPy depends on two external libraries, xbeam and UVLM. These are included as submodules to SHARPy and therefore once you initialise SHARPy you will also automatically clone the relevant versions of each library.

Set up the folder structure
  1. Clone sharpy in your desired location, if you agree with the license in license.txt

    git clone --recursive http://github.com/ImperialCollegeLondon/sharpy
    

    The --recursive flag will also initialise and update the submodules SHARPy depends on, xbeam and UVLM.

  2. We will now set up the SHARPy environment that will install other required distributions.

Setting up the Python Environment

SHARPy uses the Anaconda package manager to provide the necessary Python packages. These are specified in an Anaconda environment that shall be activated prior to compiling the xbeam and UVLM libraries or running any SHARPy cases.

  1. If you do not have it, install the Anaconda Python 3 distribution

  2. Make sure your Python version is at least 3.7:

    python --version
    
  3. Create the conda environment that SHARPy will use. Change environment_linux.yml to read environment_macos.yml file if you are installing SHARPy on Mac OS X

    cd sharpy/utils
    conda env create -f environment_linux.yml
    cd ../..
    

    We also provide a light-weight environment with the minimum required dependencies. If you’d like to use it, create the conda environment using environment_minimal.yml.

  4. Activate the sharpy_env conda environment

    conda activate sharpy_env
    

    you need to do this before you compile the xbeam and uvlm libraries, as some dependencies are included in the conda environment.

    If you would like to use the minimal environment you can run conda activate sharpy_minimal.

Quick install

The quick install is geared towards getting the release build of SHARPy running as quickly and simply as possible. If you would like to install a develop build or modify the compilation settings of the libraries skip to the next section.

  1. Move into the cloned repository

    cd sharpy
    
  2. Ensure that the SHARPy environment is active in the session. Your terminal prompt line should begin with

    (sharpy_env) [usr@host] $
    

    If it is not the case, activate the environment. Otherwise xbeam and UVLM will not compile

    conda activate sharpy_env
    
  3. Create a directory build that will be used during CMake’s building process and cd into it:

    mkdir build
    cd build
    
  4. Prepare UVLM and xbeam for compilation using gfortran and g++ in their release builds running. If you’d like to change compilers see the Custom Installation.

    cmake ..
    
  5. Compile the libraries

    make install -j 4
    

    where the number after the -j flag will specify how many cores to use during installation.

  6. Finally, load the SHARPy variables

    source bin/sharpy_vars.sh
    

You are ready to run SHARPy. Continue reading the Running SHARPy section.

Custom installation

These steps will show you how to compile the xbeam and UVLM libraries such that you can modify the compilation settings to your taste.

  1. If you want to use SHARPy’s latest release, skip this step. If you would like to use the latest development work, you will need to checkout the develop branch. For more info on how we structure our development and what branches are used for what kind of features have a look at the Contributing page.

    git checkout develop
    git submodule update --recursive
    

    This command will check out the develop branch and set it to track the remote origin. It will also set the submodules (xbeam and UVLM) to the right commit.

  2. Create the conda environment that SHARPy will use. Change environment_linux.yml to read environment_macos.yml file if you are installing SHARPy on Mac OS X

    cd sharpy/utils
    conda env create -f environment_linux.yml
    cd ../..
    
  3. Activate the sharpy_env conda environment

    conda activate sharpy_env
    
  4. Create a directory build that will be used during CMake’s building process and cd into it:

    mkdir build
    cd build
    
  5. Run CMake with custom flags:

    1. Choose your compilers for Fortran FC and C++ CXX, for instance

      FC=gfortran CXX=g++ cmake ..
      

      If you’d like to use the Intel compilers you can set them using:

      FC=ifort CXX=icpc cmake ..
      
    2. Alternatively, you can build the libraries in debug mode with the following flag for cmake:

      -DCMAKE_BUILD_TYPE=Debug
      
  6. Compile the libraries and parallelise as you prefer

    make install -j 4
    
  7. Finally, load the SHARPy variables

    source bin/sharpy_vars.sh
    
  8. This concludes the installation! Continue reading the Running SHARPy section.

Using SHARPy from a Docker container

Docker containers are similar to lightweight virtual machines. The SHARPy container distributed through Docker Hub is a CentOS 8 machine with the libraries compiled with gfortran and g++ and an Anaconda Python distribution.

Make sure your machine has Docker working. The instructions are here: link.

You might want to run a test in your terminal:

docker pull hello-world
docker run hello-world

If this works, you’re good to go!

First, obtain the SHARPy docker container:

docker pull fonsocarre/sharpy:stable

Now you can run it:

docker run --name sharpy -it fonsocarre/sharpy:stable

You should see a welcome dialog such as:

>>>> docker run -it fonsocarre/sharpy:stable
SHARPy added to PATH from the directory: /sharpy_dir/bin
=======================================================================
Welcome to the Docker image of SHARPy
SHARPy is located in /sharpy_dir/ and the
environment is already set up!
Copyright Imperial College London. Released under BSD 3-Clause license.
=======================================================================
SHARPy>

You are now good to go.

It is important to note that a docker container runs as an independent operating system with no access to your hard drive. If you want to copy your own files, run the container and from another terminal run:

docker cp my_file.txt sharpy:/my_file.txt     # copy from host to container
docker cp sharpy:/my_file.txt my_file.txt     # copy from container to host

The sharpy: part is the --name argument you wrote in the docker run command.

You can run the test suite once inside the container as:

cd sharpy_dir
python -m unittest

We make available two different releases: stable and experimental. The former is the latest SHARPy release. The latter is our latest development work which will include new features but with higher chances of encountering some bugs along the way. To obtain the experimental build, follow the instructions above replacing the stable tag for experimental.

Enjoy!

Running SHARPy

In order to run SHARPy, you need to load the conda environment and load the SHARPy variables (so your computer knows where SHARPy is). Therefore, before you run any SHARPy case:

  1. Activate the SHARPy conda environment

    conda activate sharpy_env
    
  2. Load the SHARPy variables

    source sharpy/bin/sharpy_vars.sh
    

You are now ready to run SHARPy cases from the terminal.

Automated tests

SHARPy uses unittests to verify the integrity of the code.

These tests can be run from the ./sharpy directory.

python -m unittest

The tests will run and you should see a success message. If you don’t… check the following options:

  • Check you are running the latest version. Running the following from the root directory should update to the latest release version:

    • git pull

    • git submodule update --init --recursive

  • If the tests don’t run, make sure you have followed correctly the instructions and that you managed to compile xbeam and UVLM.

  • If some tests fail, i.e. you get a message after the tests run saying that certain tests did not pass, please open an issue with the following information:

    • Operating system

    • Whether you did a Custom/quick install

    • UVLM and xbeam compiler of choice

    • A log of the tests that failed

The SHARPy Case Structure and input files

Setting up a SHARPy case

SHARPy cases are usually structured in the following way:

  1. A generate_case.py file: contains the setup of the problem like geometry, flight conditions etc. This script creates the output files that will then be used by SHARPy, namely:

    • The structural .fem.h5 file.

    • The aerodynamic .aero.h5 file.

    • Simulation information and settings .sharpy file.

    • The dynamic forces file .dyn.h5 (when required).

    • The linear input files .lininput.h5 (when required).

    • The ROM settings file .rom.h5 (when required).

    See the chapter on the case files for a detailed description on the contents of each one.Data is exchanged in binary format by means of .h5 files that make the transmission efficient between the different languages of the required libraries. To view these .h5 files, a viewer like HDF5 is recommended.

  2. The h5 files contain data of the FEM, aerodynamics, dynamic conditions. They are later read by SHARPy.

  3. The .sharpy file contains the settings for SHARPy and is the file that is parsed to SHARPy.

To run a SHARPy case

SHARPy cases are therefore usually ran in the following way:

  1. Create a generate_case.py file following the provided templates.

  2. Run it to produce the .h5 files and the .sharpy files.

    (sharpy_env) python generate_case.py
    
  3. Run SHARPy (ensure the environment is activated).

    (sharpy_env) sharpy case.sharpy
    
Output

By default, the output is located in the output folder.

The contents of the folder will typically be a beam and aero folders, which contain the output data that can then be loaded in Paraview. These are the .vtu format files that can be used with Paraview.

Running (and modifiying) a test case
  1. This command generates the required files for running a static, clamped beam case that is used as part of code verification:

    cd ../sharpy
    python ./tests/xbeam/geradin/generate_geradin.py
    

Now you should see a success message, and if you check the ./tests/xbeam/geradin/ folder, you should see two new files:

  • geradin_cardona.sharpy

  • geradin_cardona.fem.h5

Try to open the sharpy file with a plain text editor and have a quick look. The sharpy file is the main settings file. We’ll get deeper into this later.

If you try to open the fem.h5 file, you’ll get an error or something meaningless. This is because the structural data is stored in HDF5 format, which is compressed binary.

  1. Run it (part 1)

    The sharpy call is:

    # Make sure that the sharpy_env conda environment is active
    sharpy <path to solver file>
    
  2. Results (part 1)

    Since this is a test case, there is no output directly to screen.

    We will therefore change this setting first. In the generate_geradin.py file, look for the SHARPy setting write_screen and set it to on. This will output the progress of the execution to the terminal.

    We would also like to create a Paraview file to view the beam deformation. Append the post-processor BeamPlot to the end of the SHARPy setting flow, which is a list. This will run the post-processor and plot the beam in Paraview format with the settings specified in the generate_geradin.py file under config['BeamPlot].

  3. Run (part 2)

    Now that we have made these modifications, run again the generation script:

    python ./tests/xbeam/geradin/generate_geradin.py
    

    Check the solver file geradin.sharpy and look for the settings we just changed. Make sure they read what we wanted.

    You are now ready to run the case again:

    # Make sure that the sharpy_env conda environment is active
    sharpy <path to solver file>
    
  4. Post-processing

    After a successful execution, you should a long display of information in the terminal as the case is being executed.

    The deformed beam will have been written in a .vtu file and will be located in the output/ folder (or where you specified in the settings) which you can open using Paraview.

    In the output directory you will also note a folder named WriteVariablesTime which outputs certain variables as a function of time to a .dat file. In this case, the beam tip position deflection and rotation is written. Check the values of those files and look for the following result:

        Pos_def:
    	      4.403530 0.000000 -2.159692
        Psi_def:
    	      0.000000 0.672006 0.000000
    

    FYI, the correct solution for this test case by Geradin and Cardona is Delta R_3 = -2.159 m and Psi_2 = 0.6720 rad.

Congratulations, you’ve run your first case. You can now check the Examples section for further cases.

Capabilities

This is just the tip of the iceberg, possibilities are nearly endless and once you understand how SHARPy’s modular interface works, you will be capable of running very complex simulations.

Very flexible aircraft nonlinear aeroelasticity

The modular design of SHARPy allows to simulate complex aeroelastic cases involving very flexible aircraft. The structural solver supports very complex beam arrangements, while retaining geometrical nonlinearity. The UVLM solver features different wake modelling fidelities while supporting large lifting surface deformations in a native way.

Among the problems studied, a few interesting ones, in no particular order are:

  • Catapult take off of a very flexible aircraft analysis [Paper]. In this type of simulations, a PID controller was used in order to enforce displacements and velocities in a number of structural nodes (the clamping points). Then, several take off strategies were studied in order to analyse the influence of the structural stiffness in this kind of procedures. This case is a very good example of the type of problems where nonlinear aeroelasticity is essential.

_images/hale_cruise.pngCatapult Takeoff of Flexible Aircraft

  • Flight in full 3D atmospheric boundary layer (to be published). A very flexible aircraft is flown immersed in a turbulent boundary layer obtained from HPC LES simulations. The results are compared against simpler turbulence models such as von Karman and Kaimal. Intermittency and coherence features in the LES field are absent or less remarkable in the synthetic turbulence fields.

_images/hale_turb.jpegHALE Aircraft in a Turbulent Field

  • Lateral gust reponse of a realistic very flexible aircraft. For this problem (to be published), a realistic very flexible aircraft (University of Michigan X-HALE) model has been created in SHARPy and validated against their own aeroelastic solver for static and dynamic cases. A set of vertical and lateral gust responses have been simulated.

_images/xhale.pngX-HALE

Wind turbine aeroelasticity

SHARPy is suitable to simulate wind turbine aeroelasticity.

On the structural side, it accounts for material anisotropy which is needed to characterize composite blades and for geometrically non-linear deformations observed in current blades due to the increasing length and flexibility. Both rigid and flexible simulations can be performed and the structural modes can be computed accounting for rotational effects (Campbell diagrams). The rotor-tower interaction is modelled through a multibody approach based on the theory of Lagrange multipliers. Finally, the tower base can be fixed or subjected to prescribed linear and angular velocities.

On the aerodynamic side, the use of potential flow theory allows the characterization of flow unsteadiness at a reasonable computational cost. Specifically, steady and dynamic simulations can be performed. The steady simulations are carried out in a non-inertial frame of reference linked to the rotor under uniform steady wind with the assumption of prescribed helicoidal wake. On the other hand, dynamic simulations can be enriched with a wide variety of incoming winds such as shear and yaw. Moreover, the wake shape can be freely computed under no assumptions accounting for self-induction and wake expansion or can be prescribed to an helicoidal shape for computational efficiency.

_images/turbine.pngWind Turbine

Model Order Reduction

Numerical models of physical phenomena require fine discretisations to show convergence and agreement with their real counterparts, and, in the case of SHARPy’s aeroelastic systems, hundreds of thousands of states are not an uncommon encounter. However, modern hardware or the use of these models for other applications such as controller synthesis may limit their size, and we must turn to model order reduction techniques to achieve lower dimensional representations that can then be used.

SHARPy offers several model order reduction methods to reduce the initially large system to a lower dimension, attending to the user’s requirements of numerical efficiency or global error bound.

Krylov Methods for Model Order Reduction - Moment Matching

Model reduction by moment matching can be seen as approximating a transfer function through a power series expansion about a user defined point in the complex plane. The reduction by projection retains the moments between the full and reduced systems as long as the projection matrices span certain Krylov subspaces dependant on the expansion point and the system’s matrices. This can be taken advantage of, in particular for aeroelastic applications where the interest resides in the low frequency behaviour of the system, the ROM can be expanded about these low frequency points discarding accuracy higher up the frequency spectrum.

Example 1 - Aerodynamics - Frequency response of a high AR flat plate subject to a sinusoidal gust

The objective is to compare SHARPy’s solution of a very high aspect ratio flat plate subject to a sinusoidal gust to the closed form solution obtained by Sears (1944 - Ref). SHARPy’s inherent 3D nature makes comparing results to the 2D solution require very high aspect ratio wings with fine discretisations, resulting in very large state space models. In this case, we would like to utilise a Krylov ROM to approximate the low frequency behaviour and perform a frequency response analysis on the reduced system, since it would represent too much computational cost if it were performed on the full system.

The full order model was reduced utilising Krylov methods, in particular the Arnoldi iteration, with an expansion about zero frequency to produce the following result.

_images/sears.pngSears Gust Bode Plot

As it can be seen from the image above, the ROM approximates well the low frequency, quasi-steady state and loses accuracy as the frequency is increased, just as intended. Still, perfect matching is never achieved even at the expansion frequency given the 3D nature of the wing compared to the 2D analytical solution.

Example 2 - Aeroelastics - Flutter analysis of a Goland wing with modal projection

The Goland wing flutter example is presented next. The aerodynamic surface is finely discretised for the UVLM solution, resulting in not only a large state space but also in large input/output dimensionality. Therefore, to reduce the number of inputs and outputs, the UVLM is projected onto the structural mode shapes, the first four in this particular case. The resulting multi input multi output system (mode shapes -> UVLM -> modal forces) was subsequently reduced using Krylov methods aimed at MIMO systems which use variations of the block Arnoldi iteration. Again, the expansion frequency selected was the zero frequency. As a sample, the transfer function from two inputs to two outputs is shown to illustrate the performance of the reduced model against the full order UVLM.

_images/goland_rom.pngGoland Reduced Order Model Transfer Functions

The reduced aerodynamic model projected onto the modal shapes was then coupled to the linearised beam model, and the stability analysed against a change in velocity. Note that the UVLM model and its ROM are actually scaled to be independent on the freestream velocity, hence only one UVLM and ROM need to be computed. The structural model needs to be updated at each test velocity but its a lot less costly in computational terms. The resulting stability of the aeroelastic system is plotted on the Argand diagram below with changing freestream velocity.

_images/goland_flutter.pngGoland Flutter

Publications

SHARPy has been used in many technical papers that have been both published in Journals and presented at conferences. Here we present a list of past papers which have used SHARPy for research purposes:

2022

  • Goizueta, N., Wynn, A., Palacios, R., Drachinsky, A., Raveh, D. E. (2022). Flutter Predictions for Very Flexible Wing Wind Tunnel Test. Journal of Aircraft. Article in Advance. https://doi.org/10.2514/1.C036710

  • Muñoz-Simón A, Wynn A, Palacios R (2022). Some modelling improvements for prediction of wind turbine rotor loads in turbulent wind. Wind Energy: 25(2), pp. 333-353. https://doi.org/10.1002/we.2675

  • Goizueta, N., Wynn, A., Palacios, R. (2022). Fast flutter evaluation of very flexible wing using interpolation on an optimal training dataset. AIAA SciTech Forum. https://doi.org/10.2514/6.2022-1345

  • Düssler, S., Goizueta, N., Muñoz-Simón, A., & Palacios, R. (2022). Modelling and Numerical Enhancements on a UVLM for Nonlinear Aeroelastic Simulation. AIAA SciTech Forum. https://doi.org/10.2514/6.2022-2455

  • Cea, A., Palacios, R. (2022). Parametric Reduced Order Models for Aeroelastic Design of Very Flexible Aircraft. AIAA SciTech Forum. https://doi.org/10.2514/6.2022-0727

  • Wynn, A., Artola, M., Palacios, R. (2022). Nonlinear optimal control for gust load alleviation with a physics-constrained data-driven internal model. AIAA SciTech Forum. https://doi.org/10.2514/6.2022-0442

2021

  • Artola, M., Goizueta, N., Wynn, A., & Palacios, R. (2021). Aeroelastic Control and Estimation with a Minimal Nonlinear Modal Description. AIAA Journal: 59(7), pp. 2697–2713. https://doi.org/10.2514/1.j060018

  • Artola, M., Goizueta, N., Wynn, A., & Palacios, R. (2021). Proof of Concept for a Hardware-in-the-Loop Nonlinear. In AIAA SciTech Forum (pp. 1–26). https://doi.org/10.2514/6.2021-1392

  • Goizueta, N., Drachinsky, A., Wynn, A., Raveh, D. E., & Palacios, R. (2021). Flutter prediction for a very flexible wing wind tunnel test. In AIAA SciTech Forum (pp. 1–17). https://doi.org/10.2514/6.2021-1711

  • Goizueta, N., Wynn, A., & Palacios, R. (2021). Parametric Krylov-based order reduction of aircraft aeroelastic models. In AIAA SciTech Forum (pp. 1–25). https://doi.org/10.2514/6.2021-1798

2020

  • Muñoz-Simón, A., Palacios, R., & Wynn, A. (2020). Benchmarking different fidelities in wind turbine aerodynamics under yaw. Journal of Physics: Conference Series, 1618, 42017. https://doi.org/10.1088/1742-6596/1618/4/042017

  • del Carre, A., & Palacios, R. (2020). Simulation and Optimization of Takeoff Maneuvers of Very Flexible Aircraft. Journal of Aircraft: 57(6) 1097-1110. https://doi.org/10.2514/1.C035901

  • Maraniello, S. & Palacios, R. (2020). Parametric Reduced-Order Modeling of the Unsteady Vortex-Lattice Method. AIAA Journal, 58(5), 2206-2220. https://doi.org/10.2514/1.J058894

  • Deskos, G., del Carre, A., & Palacios, R. (2020). Assessment of low-altitude atmospheric turbulence models for aircraft aeroelasticity. Journal of Fluids and Structures, 95, 102981. https://doi.org/10.1016/j.jfluidstructs.2020.102981

  • Goizueta, Norberto, del Carre, Alfonso, Muñoz-Simón, Arturo, & Palacios, Rafael. (2020, February). SHARPy: from a research code to an open-source software tool for the simulation of very flexible aircraft. RSLondonSouthEast 2020 Conference. Zenodo: http://doi.org/10.5281/zenodo.3641216

  • Del Carre, A., Deskos, G., & Palacios, R. (2020). Realistic turbulence effects in low altitude dynamics of very flexible aircraft. In AIAA SciTech Forum (pp. 1–18). https://doi.org/10.2514/6.2020-1187

  • Artola, M., Goizueta, N., Wynn, A., & Palacios, R. (2020). Modal-Based Nonlinear Estimation and Control for Highly Flexible Aeroelastic Systems. In AIAA SciTech Forum (pp. 1–23). https://doi.org/10.2514/6.2020-1192

  • Muñoz-Simón, A., Wynn, A., & Palacios, R. (2020). Unsteady and three-dimensional aerodynamic effects on wind turbine rotor loads. In AIAA SciTech Forum. https://doi.org/10.2514/6.2020-0991

2019

  • del Carre, A., Muñoz-Simón, A., Goizueta, N., & Palacios, R. (2019). SHARPy : A dynamic aeroelastic simulation toolbox for very flexible aircraft and wind turbines. Journal of Open Source Software, 4(44), 1885. https://doi.org/10.21105/joss.01885

  • del Carre, A., Teixeira, P. C., Palacios, R., & Cesnik, C. E. S. (2019). Nonlinear Response of a Very Flexible Aircraft Under Lateral Gust. In International Forum on Aeroelasticity and Structural Dynamics.

  • del Carre, A., & Palacios, R. (2019). Efficient Time-Domain Simulations in Nonlinear Aeroelasticity. In AIAA Scitech Forum (pp. 1–20). https://doi.org/10.2514/6.2019-2038

  • Maraniello, S., & Palacios, R. (2019). State-Space Realizations and Internal Balancing in Potential-Flow Aerodynamics with Arbitrary Kinematics. AIAA Journal, 57(6), 2308-2321. https://doi.org/10.2514/1.J058153

Examples

A set of SHARPy examples created with Jupyter Notebooks is provided for users to interact and modify cases running on SHARPy.

Flutter Analysis of a Goland Wing using the SHARPy Linear Solver

This is an example using SHARPy to find the flutter speed of a Goland wing by:

  • Calculating aerodynamic forces and deflections using a nonlinear solver

  • Linearising about this reference condition

  • Creating a reduced order model of the linearised aerodynamics

  • Evaluate the stability of the linearised aeroelastic system at different velocities

References

Maraniello, S., & Palacios, R. (2019). State-Space Realizations and Internal Balancing in Potential-Flow Aerodynamics with Arbitrary Kinematics. AIAA Journal, 57(6), 1–14. https://doi.org/10.2514/1.J058153

Required Packages
[1]:
import numpy as np
import matplotlib.pyplot as plt
import os
import sys
import cases.templates.flying_wings as wings  # See this package for the Goland wing structural and aerodynamic definition
import sharpy.sharpy_main  # used to run SHARPy from Jupyter
Problem Set-up
Velocity

The UVLM is assembled in normalised time at a velocity of \(1 m/s\). The only matrices that need updating then with free stream velocity are the structural matrices, which is significantly cheaper to do than to update the UVLM.

[2]:
u_inf = 1.
alpha_deg = 0.
rho = 1.02
num_modes = 4
Discretisation

Note: To achieve convergence of the flutter results with the ones found in the literature, a significant discretisation may be required. If you are running this notebook for the first time, set M = 4 initially to verify that your system can perform!

[3]:
M = 16
N = 32
M_star_fact = 10
ROM

A moment-matching (Krylov subspace) model order reduction technique is employed. This ROM method offers the ability to interpolate the transfer functions at a desired point in the complex plane. See the ROM documentation pages for more info.

Note: this ROM method matches the transfer function but does not guarantee stability. Therefore the resulting system may be unstable. These unstable modes may appear far in the right hand plane but will not affect the flutter speed calculations.

[4]:
c_ref = 1.8288 # Goland wing reference chord. Used for frequency normalisation
rom_settings = dict()
rom_settings['algorithm'] = 'mimo_rational_arnoldi'  # reduction algorithm
rom_settings['r'] = 6  # Krylov subspace order
frequency_continuous_k = np.array([0.])  # Interpolation point in the complex plane with reduced frequency units
frequency_continuous_w = 2 * u_inf * frequency_continuous_k / c_ref
rom_settings['frequency'] = frequency_continuous_w
Case Admin
[5]:
case_name = 'goland_cs'
case_nlin_info = 'M%dN%dMs%d_nmodes%d' % (M, N, M_star_fact, num_modes)
case_rom_info = 'rom_MIMORA_r%d_sig%04d_%04dj' % (rom_settings['r'], frequency_continuous_k[-1].real * 100,
                                                  frequency_continuous_k[-1].imag * 100)

case_name += case_nlin_info + case_rom_info

route_test_dir = os.path.abspath('')

print('The case to run will be: %s' % case_name)
print('Case files will be saved in ./cases/%s' %case_name)
print('Output files will be saved in ./output/%s/' %case_name)
The case to run will be: goland_csM16N32Ms10_nmodes4rom_MIMORA_r6_sig0000_0000j
Case files will be saved in ./cases/goland_csM16N32Ms10_nmodes4rom_MIMORA_r6_sig0000_0000j
Output files will be saved in ./output/goland_csM16N32Ms10_nmodes4rom_MIMORA_r6_sig0000_0000j/
Simulation Set-Up
Goland Wing

ws is an instance of a Goland wing with a control surface. Reference the template file cases.templates.flying_wings.GolandControlSurface for more info on the geometrical, structural and aerodynamic definition of the Goland wing here used.

[6]:
ws = wings.GolandControlSurface(M=M,
                                N=N,
                                Mstar_fact=M_star_fact,
                                u_inf=u_inf,
                                alpha=alpha_deg,
                                cs_deflection=[0, 0],
                                rho=rho,
                                sweep=0,
                                physical_time=2,
                                n_surfaces=2,
                                route=route_test_dir + '/cases',
                                case_name=case_name)

ws.clean_test_files()
ws.update_derived_params()
ws.set_default_config_dict()

ws.generate_aero_file()
ws.generate_fem_file()
Simulation Settings

The settings for each of the solvers are now set. For a detailed description on them please reference their respective documentation pages

SHARPy Settings

The most important setting is the flow list. It tells SHARPy which solvers to run and in which order.

[7]:
ws.config['SHARPy'] = {
    'flow':
        ['BeamLoader', 'AerogridLoader',
         'StaticCoupled',
         'AerogridPlot',
         'BeamPlot',
         'Modal',
         'LinearAssembler',
         'AsymptoticStability',
         ],
    'case': ws.case_name, 'route': ws.route,
    'write_screen': 'on', 'write_log': 'on',
    'log_folder': route_test_dir + '/output/',
    'log_file': ws.case_name + '.log'}
Beam Loader Settings
[8]:
ws.config['BeamLoader'] = {
    'unsteady': 'off',
    'orientation': ws.quat}
Aerogrid Loader Settings
[9]:
ws.config['AerogridLoader'] = {
    'unsteady': 'off',
    'aligned_grid': 'on',
    'mstar': ws.Mstar_fact * ws.M,
    'freestream_dir': ws.u_inf_direction,
    'wake_shape_generator': 'StraightWake',
    'wake_shape_generator_input': {'u_inf': ws.u_inf,
                                    'u_inf_direction': ws.u_inf_direction,
                                    'dt': ws.dt}}

Static Coupled Solver
[10]:
ws.config['StaticCoupled'] = {
    'print_info': 'on',
    'max_iter': 200,
    'n_load_steps': 1,
    'tolerance': 1e-10,
    'relaxation_factor': 0.,
    'aero_solver': 'StaticUvlm',
    'aero_solver_settings': {
        'rho': ws.rho,
        'print_info': 'off',
        'horseshoe': 'off',
        'num_cores': 4,
        'n_rollup': 0,
        'rollup_dt': ws.dt,
        'rollup_aic_refresh': 1,
        'rollup_tolerance': 1e-4,
        'velocity_field_generator': 'SteadyVelocityField',
        'velocity_field_input': {
            'u_inf': ws.u_inf,
            'u_inf_direction': ws.u_inf_direction}},
    'structural_solver': 'NonLinearStatic',
    'structural_solver_settings': {'print_info': 'off',
                                   'max_iterations': 150,
                                   'num_load_steps': 4,
                                   'delta_curved': 1e-1,
                                   'min_delta': 1e-10,
                                   'gravity_on': 'on',
                                   'gravity': 9.81}}
AerogridPlot Settings
[11]:
ws.config['AerogridPlot'] = {'include_rbm': 'off',
                             'include_applied_forces': 'on',
                             'minus_m_star': 0}
BeamPlot Settings
[12]:
ws.config['BeamPlot'] = {'include_rbm': 'off',
                         'include_applied_forces': 'on'}
Linear System Assembly Settings
[14]:
ws.config['LinearAssembler'] = {'linear_system': 'LinearAeroelastic',
                                'linear_system_settings': {
                                    'beam_settings': {'modal_projection': 'on',
                                                      'inout_coords': 'modes',
                                                      'discrete_time': 'on',
                                                      'newmark_damp': 0.5e-4,
                                                      'discr_method': 'newmark',
                                                      'dt': ws.dt,
                                                      'proj_modes': 'undamped',
                                                      'use_euler': 'off',
                                                      'num_modes': num_modes,
                                                      'print_info': 'on',
                                                      'gravity': 'on',
                                                      'remove_sym_modes': 'on',
                                                      'remove_dofs': []},
                                    'aero_settings': {'dt': ws.dt,
                                                      'ScalingDict': {'length': 0.5 * ws.c_ref,
                                                                      'speed': u_inf,
                                                                      'density': rho},
                                                      'integr_order': 2,
                                                      'density': ws.rho,
                                                      'remove_predictor': 'on',
                                                      'use_sparse': 'on',
                                                      'remove_inputs': ['u_gust'],
                                                      'rom_method': ['Krylov'],
                                                      'rom_method_settings': {'Krylov': rom_settings}},
                                    }}
Asymptotic Stability Analysis Settings
[15]:
ws.config['AsymptoticStability'] = {'print_info': True,
                                    'velocity_analysis': [100, 180, 81],
                                   'modes_to_plot': []}
[16]:
ws.config.write()
Run SHARPy
[17]:
sharpy.sharpy_main.main(['', ws.route + ws.case_name + '.sharpy'])
--------------------------------------------------------------------------------
            ######  ##     ##    ###    ########  ########  ##    ##
           ##    ## ##     ##   ## ##   ##     ## ##     ##  ##  ##
           ##       ##     ##  ##   ##  ##     ## ##     ##   ####
            ######  ######### ##     ## ########  ########     ##
                 ## ##     ## ######### ##   ##   ##           ##
           ##    ## ##     ## ##     ## ##    ##  ##           ##
            ######  ##     ## ##     ## ##     ## ##           ##
--------------------------------------------------------------------------------
Aeroelastics Lab, Aeronautics Department.
    Copyright (c), Imperial College London.
    All rights reserved.
    License available at https://github.com/imperialcollegelondon/sharpy
Running SHARPy from /home/ng213/2TB/pazy_code/pazy-sharpy/lib/sharpy/docs/source/content/example_notebooks
SHARPy being run is in /home/ng213/2TB/pazy_code/pazy-sharpy/lib/sharpy
The branch being run is dev_setting_error
The version and commit hash are: v1.2.1-339-g156c731-156c731
SHARPy output folder set
     /home/ng213/2TB/pazy_code/pazy-sharpy/lib/sharpy/docs/source/content/example_notebooks/output//goland_csM16N32Ms10_nmodes4rom_MIMORA_r6_sig0000_0000j/
Generating an instance of BeamLoader
Variable for_pos has no assigned value in the settings file.
    will default to the value: [0.0, 0, 0]
Generating an instance of AerogridLoader
Variable control_surface_deflection has no assigned value in the settings file.
    will default to the value: []
Variable control_surface_deflection_generator_settings has no assigned value in the settings file.
    will default to the value: {}
Variable dx1 has no assigned value in the settings file.
    will default to the value: -1.0
Variable ndx1 has no assigned value in the settings file.
    will default to the value: 1
Variable r has no assigned value in the settings file.
    will default to the value: 1.0
Variable dxmax has no assigned value in the settings file.
    will default to the value: -1.0
The aerodynamic grid contains 2 surfaces
  Surface 0, M=16, N=16
     Wake 0, M=160, N=16
  Surface 1, M=16, N=16
     Wake 1, M=160, N=16
  In total: 512 bound panels
  In total: 5120 wake panels
  Total number of panels = 5632
Generating an instance of StaticCoupled
Variable correct_forces_method has no assigned value in the settings file.
    will default to the value: 
Variable runtime_generators has no assigned value in the settings file.
    will default to the value: {}
Generating an instance of NonLinearStatic
Variable newmark_damp has no assigned value in the settings file.
    will default to the value: 0.0001
Variable gravity_dir has no assigned value in the settings file.
    will default to the value: [0.0, 0.0, 1.0]
Variable relaxation_factor has no assigned value in the settings file.
    will default to the value: 0.3
Variable dt has no assigned value in the settings file.
    will default to the value: 0.01
Variable num_steps has no assigned value in the settings file.
    will default to the value: 500
Variable initial_position has no assigned value in the settings file.
    will default to the value: [0. 0. 0.]
Generating an instance of StaticUvlm
Variable iterative_solver has no assigned value in the settings file.
    will default to the value: False
Variable iterative_tol has no assigned value in the settings file.
    will default to the value: 0.0001
Variable iterative_precond has no assigned value in the settings file.
    will default to the value: False
Variable cfl1 has no assigned value in the settings file.
    will default to the value: True
Variable vortex_radius has no assigned value in the settings file.
    will default to the value: 1e-06
Variable vortex_radius_wake_ind has no assigned value in the settings file.
    will default to the value: 1e-06
Variable rbm_vel_g has no assigned value in the settings file.
    will default to the value: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
Variable centre_rot_g has no assigned value in the settings file.
    will default to the value: [0.0, 0.0, 0.0]



|=====|=====|============|==========|==========|==========|==========|==========|==========|
|iter |step | log10(res) |    Fx    |    Fy    |    Fz    |    Mx    |    My    |    Mz    |
|=====|=====|============|==========|==========|==========|==========|==========|==========|
|  0  |  0  |  0.00000   |  0.0000  | -0.0000  |-4271.0417|  0.0000  | 781.0842 |  0.0000  |
|  1  |  0  | -11.89144  |  0.0000  | -0.0000  |-4271.0039|  0.0000  | 781.0906 |  0.0000  |
Generating an instance of AerogridPlot
Variable include_forward_motion has no assigned value in the settings file.
    will default to the value: False
Variable include_unsteady_applied_forces has no assigned value in the settings file.
    will default to the value: False
Variable name_prefix has no assigned value in the settings file.
    will default to the value: 
Variable u_inf has no assigned value in the settings file.
    will default to the value: 0.0
Variable dt has no assigned value in the settings file.
    will default to the value: 0.0
Variable include_velocities has no assigned value in the settings file.
    will default to the value: False
Variable include_incidence_angle has no assigned value in the settings file.
    will default to the value: False
Variable num_cores has no assigned value in the settings file.
    will default to the value: 1
Variable vortex_radius has no assigned value in the settings file.
    will default to the value: 1e-06
...Finished
Generating an instance of BeamPlot
Variable include_FoR has no assigned value in the settings file.
    will default to the value: False
Variable include_applied_moments has no assigned value in the settings file.
    will default to the value: True
Variable name_prefix has no assigned value in the settings file.
    will default to the value: 
Variable output_rbm has no assigned value in the settings file.
    will default to the value: True
...Finished
Generating an instance of Modal
Variable print_info has no assigned value in the settings file.
    will default to the value: True
Variable delta_curved has no assigned value in the settings file.
    will default to the value: 0.01
Variable use_custom_timestep has no assigned value in the settings file.
    will default to the value: -1
Structural eigenvalues



|==============|==============|==============|==============|==============|==============|==============|
|     mode     |  eval_real   |  eval_imag   | freq_n (Hz)  | freq_d (Hz)  |   damping    |  period (s)  |
|==============|==============|==============|==============|==============|==============|==============|
|      0       |   0.000000   |  48.067396   |   7.650164   |   7.650164   |  -0.000000   |   0.130716   |
|      1       |   0.000000   |  48.067398   |   7.650164   |   7.650164   |  -0.000000   |   0.130716   |
|      2       |   0.000000   |  95.685736   |  15.228858   |  15.228858   |  -0.000000   |   0.065665   |
|      3       |   0.000000   |  95.685754   |  15.228861   |  15.228861   |  -0.000000   |   0.065665   |
|      4       |   0.000000   |  243.144471  |  38.697644   |  38.697644   |  -0.000000   |   0.025841   |
|      5       |   0.000000   |  243.144477  |  38.697645   |  38.697645   |  -0.000000   |   0.025841   |
|      6       |   0.000000   |  343.801136  |  54.717650   |  54.717650   |  -0.000000   |   0.018276   |
|      7       |   0.000000   |  343.801137  |  54.717650   |  54.717650   |  -0.000000   |   0.018276   |
|      8       |   0.000000   |  443.324608  |  70.557303   |  70.557303   |  -0.000000   |   0.014173   |
|      9       |   0.000000   |  443.324619  |  70.557304   |  70.557304   |  -0.000000   |   0.014173   |
|      10      |   0.000000   |  461.992869  |  73.528449   |  73.528449   |  -0.000000   |   0.013600   |
|      11      |   0.000000   |  461.992869  |  73.528449   |  73.528449   |  -0.000000   |   0.013600   |
|      12      |   0.000000   |  601.126871  |  95.672313   |  95.672313   |  -0.000000   |   0.010452   |
|      13      |   0.000000   |  601.126873  |  95.672313   |  95.672313   |  -0.000000   |   0.010452   |
|      14      |   0.000000   |  782.997645  |  124.617946  |  124.617946  |  -0.000000   |   0.008025   |
|      15      |   0.000000   |  782.997649  |  124.617946  |  124.617946  |  -0.000000   |   0.008025   |
|      16      |   0.000000   |  917.191257  |  145.975522  |  145.975522  |  -0.000000   |   0.006850   |
|      17      |   0.000000   |  917.191259  |  145.975523  |  145.975523  |  -0.000000   |   0.006850   |
|      18      |   0.000000   |  975.005694  |  155.176976  |  155.176976  |  -0.000000   |   0.006444   |
|      19      |   0.000000   |  975.005699  |  155.176977  |  155.176977  |  -0.000000   |   0.006444   |
Generating an instance of LinearAssembler
Variable linearisation_tstep has no assigned value in the settings file.
    will default to the value: -1
Variable modal_tstep has no assigned value in the settings file.
    will default to the value: -1
Variable inout_coordinates has no assigned value in the settings file.
    will default to the value: 
Variable retain_inputs has no assigned value in the settings file.
    will default to the value: []
Variable retain_outputs has no assigned value in the settings file.
    will default to the value: []
Generating an instance of LinearAeroelastic
Variable uvlm_filename has no assigned value in the settings file.
    will default to the value: 
Variable track_body has no assigned value in the settings file.
    will default to the value: True
Variable use_euler has no assigned value in the settings file.
    will default to the value: False
Generating an instance of LinearUVLM
Variable gust_assembler has no assigned value in the settings file.
    will default to the value: 
Variable vortex_radius has no assigned value in the settings file.
    will default to the value: 1e-06
Variable cfl1 has no assigned value in the settings file.
    will default to the value: True
Variable velocity_field_generator has no assigned value in the settings file.
    will default to the value: SteadyVelocityField
Variable velocity_field_input has no assigned value in the settings file.
    will default to the value: {}
Variable physical_model has no assigned value in the settings file.
    will default to the value: True
Variable track_body has no assigned value in the settings file.
    will default to the value: False
Variable track_body_number has no assigned value in the settings file.
    will default to the value: -1
Initialising Static linear UVLM solver class...
                        ...done in 1.35 sec
Generating an instance of Krylov
Variable print_info has no assigned value in the settings file.
    will default to the value: True
Variable single_side has no assigned value in the settings file.
    will default to the value: 
Variable tangent_input_file has no assigned value in the settings file.
    will default to the value: 
Variable restart_arnoldi has no assigned value in the settings file.
    will default to the value: False
Initialising Krylov Model Order Reduction
State-space realisation of UVLM equations started...
Computing wake propagation matrix with CFL1=True
/home/ng213/anaconda3/envs/sharpy_env/lib/python3.7/site-packages/scipy/sparse/_index.py:126: SparseEfficiencyWarning: Changing the sparsity structure of a csc_matrix is expensive. lil_matrix is more efficient.
  self._set_arrayXarray(i, j, x)
     state-space model produced in form:
                     h_{n+1} = A h_{n} + B u_{n}
                     with:
     x_n = h_n + Bp u_n
                        ...done in 17.25 sec
Scaling UVLM system with reference time 0.914400s
Non-dimensional time step set (0.125000)
System scaled in 31.698308s
Generating an instance of LinearBeam
Warning, projecting system with damping onto undamped modes

Linearising gravity terms...
     M = 7.26 kg
     X_CG A -> 0.00 0.00 -0.00
Node  1      -> B -0.000 -0.116 0.000
                     -> A 0.116 0.381 -0.000
                     -> G 0.116 0.381 -0.000
     Node mass:
             Matrix: 14.5125
Node  2      -> B -0.000 -0.116 0.000
                     -> A 0.116 0.762 -0.000
                     -> G 0.116 0.762 -0.000
     Node mass:
             Matrix: 7.2563
Node  3      -> B -0.000 -0.116 0.000
                     -> A 0.116 1.143 -0.000
                     -> G 0.116 1.143 -0.000
     Node mass:
             Matrix: 14.5125
Node  4      -> B -0.000 -0.116 0.000
                     -> A 0.116 1.524 -0.001
                     -> G 0.116 1.524 -0.001
     Node mass:
             Matrix: 7.2563
Node  5      -> B -0.000 -0.116 0.000
                     -> A 0.116 1.905 -0.001
                     -> G 0.116 1.905 -0.001
     Node mass:
             Matrix: 14.5125
Node  6      -> B -0.000 -0.116 0.000
                     -> A 0.116 2.286 -0.001
                     -> G 0.116 2.286 -0.001
     Node mass:
             Matrix: 7.2563
Node  7      -> B -0.000 -0.116 0.000
                     -> A 0.116 2.667 -0.002
                     -> G 0.116 2.667 -0.002
     Node mass:
             Matrix: 14.5125
Node  8      -> B -0.000 -0.116 0.000
                     -> A 0.116 3.048 -0.002
                     -> G 0.116 3.048 -0.002
     Node mass:
             Matrix: 7.2563
Node  9      -> B -0.000 -0.116 0.000
                     -> A 0.116 3.429 -0.003
                     -> G 0.116 3.429 -0.003
     Node mass:
             Matrix: 14.5125
Node 10      -> B -0.000 -0.116 0.000
                     -> A 0.116 3.810 -0.003
                     -> G 0.116 3.810 -0.003
     Node mass:
             Matrix: 7.2563
Node 11      -> B -0.000 -0.116 0.000
                     -> A 0.116 4.191 -0.004
                     -> G 0.116 4.191 -0.004
     Node mass:
             Matrix: 14.5125
Node 12      -> B -0.000 -0.116 0.000
                     -> A 0.116 4.572 -0.004
                     -> G 0.116 4.572 -0.004
     Node mass:
             Matrix: 7.2563
Node 13      -> B -0.000 -0.116 0.000
                     -> A 0.116 4.953 -0.005
                     -> G 0.116 4.953 -0.005
     Node mass:
             Matrix: 14.5125
Node 14      -> B -0.000 -0.116 0.000
                     -> A 0.116 5.334 -0.005
                     -> G 0.116 5.334 -0.005
     Node mass:
             Matrix: 7.2563
Node 15      -> B -0.000 -0.116 0.000
                     -> A 0.116 5.715 -0.006
                     -> G 0.116 5.715 -0.006
     Node mass:
             Matrix: 14.5125
Node 16      -> B -0.000 -0.116 0.000
                     -> A 0.116 6.096 -0.006
                     -> G 0.116 6.096 -0.006
     Node mass:
             Matrix: 3.6281
Node 17      -> B -0.000 -0.116 -0.000
                     -> A 0.116 -6.096 -0.006
                     -> G 0.116 -6.096 -0.006
     Node mass:
             Matrix: 3.6281
Node 18      -> B -0.000 -0.116 -0.000
                     -> A 0.116 -5.715 -0.006
                     -> G 0.116 -5.715 -0.006
     Node mass:
             Matrix: 14.5125
Node 19      -> B -0.000 -0.116 -0.000
                     -> A 0.116 -5.334 -0.005
                     -> G 0.116 -5.334 -0.005
     Node mass:
             Matrix: 7.2563
Node 20      -> B -0.000 -0.116 -0.000
                     -> A 0.116 -4.953 -0.005
                     -> G 0.116 -4.953 -0.005
     Node mass:
             Matrix: 14.5125
Node 21      -> B -0.000 -0.116 -0.000
                     -> A 0.116 -4.572 -0.004
                     -> G 0.116 -4.572 -0.004
     Node mass:
             Matrix: 7.2563
Node 22      -> B -0.000 -0.116 -0.000
                     -> A 0.116 -4.191 -0.004
                     -> G 0.116 -4.191 -0.004
     Node mass:
             Matrix: 14.5125
Node 23      -> B -0.000 -0.116 -0.000
                     -> A 0.116 -3.810 -0.003
                     -> G 0.116 -3.810 -0.003
     Node mass:
             Matrix: 7.2563
Node 24      -> B -0.000 -0.116 -0.000
                     -> A 0.116 -3.429 -0.003
                     -> G 0.116 -3.429 -0.003
     Node mass:
             Matrix: 14.5125
Node 25      -> B -0.000 -0.116 -0.000
                     -> A 0.116 -3.048 -0.002
                     -> G 0.116 -3.048 -0.002
     Node mass:
             Matrix: 7.2563
Node 26      -> B -0.000 -0.116 -0.000
                     -> A 0.116 -2.667 -0.002
                     -> G 0.116 -2.667 -0.002
     Node mass:
             Matrix: 14.5125
Node 27      -> B -0.000 -0.116 -0.000
                     -> A 0.116 -2.286 -0.002
                     -> G 0.116 -2.286 -0.002
     Node mass:
             Matrix: 7.2563
Node 28      -> B -0.000 -0.116 -0.000
                     -> A 0.116 -1.905 -0.001
                     -> G 0.116 -1.905 -0.001
     Node mass:
             Matrix: 14.5125
Node 29      -> B -0.000 -0.116 -0.000
                     -> A 0.116 -1.524 -0.001
                     -> G 0.116 -1.524 -0.001
     Node mass:
             Matrix: 7.2563
Node 30      -> B -0.000 -0.116 -0.000
                     -> A 0.116 -1.143 -0.000
                     -> G 0.116 -1.143 -0.000
     Node mass:
             Matrix: 14.5125
Node 31      -> B -0.000 -0.116 -0.000
                     -> A 0.116 -0.762 -0.000
                     -> G 0.116 -0.762 -0.000
     Node mass:
             Matrix: 7.2563
Node 32      -> B -0.000 -0.116 -0.000
                     -> A 0.116 -0.381 -0.000
                     -> G 0.116 -0.381 -0.000
     Node mass:
             Matrix: 14.5125
        Updated the beam C, modal C and K matrices with the terms from the
gravity linearisation

Scaling beam according to reduced time...
     Setting the beam time step to (0.1250)
Updating C and K matrices and natural frequencies with new normalised time...
Model Order Reduction in progress...
Moment Matching Krylov Model Reduction
        Construction Algorithm:
             mimo_rational_arnoldi
        Interpolation points:
             sigma = 0.000000 + 0.000000j [rad/s]

        Krylov order:
             r = 6
     Constructing controllability space
     Constructing observability space
     Deflating column 23
     Deflating column 25
     Deflating column 28
     Deflating column 33
ROM is stable
        DT Eigenvalues:
                mu = 0.992076 + -0.000000j
                mu = 0.971409 + -0.000000j
                mu = 0.957534 + -0.038927j
                mu = 0.957534 + 0.038927j
                mu = 0.954926 + -0.072820j
                mu = 0.954926 + 0.072820j
                mu = 0.954282 + -0.000000j
                mu = 0.935272 + 0.000000j
                mu = 0.927865 + 0.092012j
                mu = 0.927865 + -0.092012j
                mu = 0.927075 + -0.066636j
                mu = 0.927075 + 0.066636j
                mu = 0.925588 + 0.038813j
                mu = 0.925588 + -0.038813j
                mu = 0.922836 + -0.004482j
                mu = 0.922836 + 0.004482j
                mu = 0.915491 + -0.025196j
                mu = 0.915491 + 0.025196j
                mu = 0.908662 + 0.053066j
                mu = 0.908662 + -0.053066j
                mu = 0.881127 + -0.056743j
                mu = 0.881127 + 0.056743j
                mu = 0.882642 + -0.000000j
                mu = 0.867726 + -0.000000j
                mu = 0.717587 + 0.263893j
                mu = 0.717587 + -0.263893j
                mu = 0.697184 + 0.000000j
                mu = 0.360807 + 0.000000j
                mu = -0.000018 + -0.002663j
                mu = -0.000018 + 0.002663j
                mu = 0.000155 + -0.000000j
                mu = -0.000154 + 0.000000j

System reduced from order 6656 to
     n = 32 states
...Completed Model Order Reduction in 5.16 s
Aeroelastic system assembled:
     Aerodynamic states: 32
     Structural states: 4
     Total states: 36
     Inputs: 8
     Outputs: 6
Final system is:
State-space system
States: 36
Inputs: 8
Outputs: 6

Generating an instance of AsymptoticStability
Variable reference_velocity has no assigned value in the settings file.
    will default to the value: 1.0
Variable frequency_cutoff has no assigned value in the settings file.
    will default to the value: 0.0
Variable export_eigenvalues has no assigned value in the settings file.
    will default to the value: False
Variable display_root_locus has no assigned value in the settings file.
    will default to the value: False
Variable iterative_eigvals has no assigned value in the settings file.
    will default to the value: False
Variable num_evals has no assigned value in the settings file.
    will default to the value: 200
Variable postprocessors has no assigned value in the settings file.
    will default to the value: []
Variable postprocessors_settings has no assigned value in the settings file.
    will default to the value: {}
Dynamical System Eigenvalues
Calculating eigenvalues using direct method



|==============|==============|==============|==============|==============|==============|==============|
|     mode     |  eval_real   |  eval_imag   | freq_n (Hz)  | freq_d (Hz)  |   damping    |  period (s)  |
|==============|==============|==============|==============|==============|==============|==============|
|      0       |  -0.021637   |  24.315428   |   3.869922   |   3.869921   |   0.000890   |   0.258403   |
|      1       |  -0.021637   |  -24.315428  |   3.869922   |   3.869921   |   0.000890   |   0.258403   |
|      2       |  -0.069601   |  -0.000000   |   0.011077   |   0.000000   |   1.000000   |     inf      |
|      3       |  -0.105223   |  -21.320535  |   3.393310   |   3.393269   |   0.004935   |   0.294701   |
|      4       |  -0.105223   |  21.320535   |   3.393310   |   3.393269   |   0.004935   |   0.294701   |
|      5       |  -0.253787   |  -0.000000   |   0.040391   |   0.000000   |   1.000000   |     inf      |
|      6       |  -0.372425   |   0.355473   |   0.081940   |   0.056575   |   0.723379   |  17.675568   |
|      7       |  -0.372425   |  -0.355473   |   0.081940   |   0.056575   |   0.723379   |  17.675568   |
|      8       |  -0.378143   |   0.665882   |   0.121875   |   0.105978   |   0.493812   |   9.435879   |
|      9       |  -0.378143   |  -0.665882   |   0.121875   |   0.105978   |   0.493812   |   9.435879   |
|      10      |  -0.409413   |  -0.000000   |   0.065160   |   0.000000   |   1.000000   |     inf      |
|      11      |  -0.585461   |   0.000000   |   0.093179   |   0.000000   |   1.000000   |     inf      |
|      12      |  -0.612214   |  -0.864763   |   0.168631   |   0.137631   |   0.577812   |   7.265789   |
|      13      |  -0.612214   |   0.864763   |   0.168631   |   0.137631   |   0.577812   |   7.265789   |
|      14      |  -0.639935   |   0.627769   |   0.142673   |   0.099913   |   0.713860   |  10.008752   |
|      15      |  -0.639935   |  -0.627769   |   0.142673   |   0.099913   |   0.713860   |  10.008752   |
|      16      |  -0.668833   |   0.366654   |   0.121394   |   0.058355   |   0.876881   |  17.136529   |
|      17      |  -0.668833   |  -0.366654   |   0.121394   |   0.058355   |   0.876881   |  17.136529   |
|      18      |  -0.702465   |   0.042487   |   0.112005   |   0.006762   |   0.998176   |  147.883816  |
|      19      |  -0.702465   |  -0.042487   |   0.112005   |   0.006762   |   0.998176   |  147.883816  |
|      20      |  -0.769174   |   0.240726   |   0.128273   |   0.038313   |   0.954353   |  26.100974   |
|      21      |  -0.769174   |  -0.240726   |   0.128273   |   0.038313   |   0.954353   |  26.100974   |
|      22      |  -0.823096   |   0.510355   |   0.154138   |   0.081226   |   0.849886   |  12.311395   |
|      23      |  -0.823096   |  -0.510355   |   0.154138   |   0.081226   |   0.849886   |  12.311395   |
|      24      |  -1.089098   |   0.562639   |   0.195099   |   0.089547   |   0.888447   |  11.167353   |
|      25      |  -1.089098   |  -0.562639   |   0.195099   |   0.089547   |   0.888447   |  11.167353   |
|      26      |  -1.092180   |  -0.000000   |   0.173826   |   0.000000   |   1.000000   |     inf      |
|      27      |  -1.241288   |   0.000000   |   0.197557   |   0.000000   |   1.000000   |     inf      |
|      28      |  -2.348569   |   3.083089   |   0.616840   |   0.490689   |   0.605970   |   2.037951   |
|      29      |  -2.348569   |  -3.083089   |   0.616840   |   0.490689   |   0.605970   |   2.037951   |
|      30      |  -3.155780   |  -0.000000   |   0.502258   |   0.000000   |   1.000000   |     inf      |
|      31      |  -8.918115   |  -0.000000   |   1.419362   |   0.000000   |   1.000000   |     inf      |
|      32      |  -26.700406  |  -27.485500  |   6.098697   |   4.374453   |   0.696788   |   0.228600   |
|      33      |  -28.824123  |   0.000000   |   4.587502   |   0.000000   |   1.000000   |     inf      |
|      34      |  -35.766803  |  -27.485500  |   7.179135   |   4.374453   |   0.792918   |   0.228600   |
|      35      |  -36.676675  |  -0.000000   |   5.837274   |   0.000000   |   1.000000   |     inf      |
Velocity Asymptotic Stability Analysis
Initial velocity: 100.00 m/s
Final velocity: 180.00 m/s
Number of evaluations: 81
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 100.00 m/2   max. CT eig. real: -3.925687
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 101.00 m/2   max. CT eig. real: -3.951244
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 102.00 m/2   max. CT eig. real: -3.975951
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 103.00 m/2   max. CT eig. real: -3.999782
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 104.00 m/2   max. CT eig. real: -4.022709
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 105.00 m/2   max. CT eig. real: -4.044705
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 106.00 m/2   max. CT eig. real: -4.065744
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 107.00 m/2   max. CT eig. real: -4.085798
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 108.00 m/2   max. CT eig. real: -4.104841
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 109.00 m/2   max. CT eig. real: -4.122845
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 110.00 m/2   max. CT eig. real: -4.139781
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 111.00 m/2   max. CT eig. real: -4.155617
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 112.00 m/2   max. CT eig. real: -4.170322
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 113.00 m/2   max. CT eig. real: -4.183860
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 114.00 m/2   max. CT eig. real: -4.196192
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 115.00 m/2   max. CT eig. real: -4.207276
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 116.00 m/2   max. CT eig. real: -4.217065
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 117.00 m/2   max. CT eig. real: -4.225507
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 118.00 m/2   max. CT eig. real: -4.232544
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 119.00 m/2   max. CT eig. real: -4.238111
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 120.00 m/2   max. CT eig. real: -4.242138
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 121.00 m/2   max. CT eig. real: -4.244545
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 122.00 m/2   max. CT eig. real: -4.245246
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 123.00 m/2   max. CT eig. real: -4.244143
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 124.00 m/2   max. CT eig. real: -4.241130
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 125.00 m/2   max. CT eig. real: -4.236092
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 126.00 m/2   max. CT eig. real: -4.228899
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 127.00 m/2   max. CT eig. real: -4.219413
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 128.00 m/2   max. CT eig. real: -4.207482
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 129.00 m/2   max. CT eig. real: -4.192940
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 130.00 m/2   max. CT eig. real: -4.175607
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 131.00 m/2   max. CT eig. real: -4.155291
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 132.00 m/2   max. CT eig. real: -4.131780
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 133.00 m/2   max. CT eig. real: -4.104848
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 134.00 m/2   max. CT eig. real: -4.074252
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 135.00 m/2   max. CT eig. real: -4.039730
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 136.00 m/2   max. CT eig. real: -4.001000
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 137.00 m/2   max. CT eig. real: -3.957763
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 138.00 m/2   max. CT eig. real: -3.909697
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 139.00 m/2   max. CT eig. real: -3.856462
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 140.00 m/2   max. CT eig. real: -3.797697
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 141.00 m/2   max. CT eig. real: -3.733020
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 142.00 m/2   max. CT eig. real: -3.662031
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 143.00 m/2   max. CT eig. real: -3.584314
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 144.00 m/2   max. CT eig. real: -3.499436
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 145.00 m/2   max. CT eig. real: -3.406959
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 146.00 m/2   max. CT eig. real: -3.306437
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 147.00 m/2   max. CT eig. real: -3.197433
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 148.00 m/2   max. CT eig. real: -3.079522
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 149.00 m/2   max. CT eig. real: -2.952307
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 150.00 m/2   max. CT eig. real: -2.815436
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 151.00 m/2   max. CT eig. real: -2.668615
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 152.00 m/2   max. CT eig. real: -2.511634
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 153.00 m/2   max. CT eig. real: -2.344382
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 154.00 m/2   max. CT eig. real: -2.166866
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 155.00 m/2   max. CT eig. real: -1.979231
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 156.00 m/2   max. CT eig. real: -1.781770
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 157.00 m/2   max. CT eig. real: -1.574929
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 158.00 m/2   max. CT eig. real: -1.359301
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 159.00 m/2   max. CT eig. real: -1.135613
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 160.00 m/2   max. CT eig. real: -0.904707
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 161.00 m/2   max. CT eig. real: -0.667505
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 162.00 m/2   max. CT eig. real: -0.424982
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 163.00 m/2   max. CT eig. real: -0.178127
        N unstab.: 000
        Unstable aeroelastic natural frequency CT(rad/s):
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 164.00 m/2   max. CT eig. real: 0.072086
        N unstab.: 002
        Unstable aeroelastic natural frequency CT(rad/s):       70.64   70.64
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 165.00 m/2   max. CT eig. real: 0.324729
        N unstab.: 002
        Unstable aeroelastic natural frequency CT(rad/s):       70.41   70.41
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 166.00 m/2   max. CT eig. real: 0.578936
        N unstab.: 002
        Unstable aeroelastic natural frequency CT(rad/s):       70.20   70.20
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 167.00 m/2   max. CT eig. real: 0.833925
        N unstab.: 002
        Unstable aeroelastic natural frequency CT(rad/s):       69.99   69.99
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 168.00 m/2   max. CT eig. real: 1.088998
        N unstab.: 002
        Unstable aeroelastic natural frequency CT(rad/s):       69.79   69.79
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 169.00 m/2   max. CT eig. real: 1.343552
        N unstab.: 002
        Unstable aeroelastic natural frequency CT(rad/s):       69.61   69.61
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 170.00 m/2   max. CT eig. real: 1.597068
        N unstab.: 002
        Unstable aeroelastic natural frequency CT(rad/s):       69.43   69.43
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 171.00 m/2   max. CT eig. real: 1.849117
        N unstab.: 002
        Unstable aeroelastic natural frequency CT(rad/s):       69.26   69.26
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 172.00 m/2   max. CT eig. real: 2.099343
        N unstab.: 002
        Unstable aeroelastic natural frequency CT(rad/s):       69.10   69.10
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 173.00 m/2   max. CT eig. real: 2.347461
        N unstab.: 002
        Unstable aeroelastic natural frequency CT(rad/s):       68.94   68.94
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 174.00 m/2   max. CT eig. real: 2.593246
        N unstab.: 002
        Unstable aeroelastic natural frequency CT(rad/s):       68.79   68.79
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 175.00 m/2   max. CT eig. real: 2.836529
        N unstab.: 002
        Unstable aeroelastic natural frequency CT(rad/s):       68.65   68.65
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 176.00 m/2   max. CT eig. real: 3.077180
        N unstab.: 002
        Unstable aeroelastic natural frequency CT(rad/s):       68.51   68.51
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 177.00 m/2   max. CT eig. real: 3.315113
        N unstab.: 002
        Unstable aeroelastic natural frequency CT(rad/s):       68.38   68.38
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 178.00 m/2   max. CT eig. real: 3.550268
        N unstab.: 002
        Unstable aeroelastic natural frequency CT(rad/s):       68.25   68.25
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 179.00 m/2   max. CT eig. real: 3.782616
        N unstab.: 002
        Unstable aeroelastic natural frequency CT(rad/s):       68.13   68.13
Updating C and K matrices and natural frequencies with new normalised time...
LTI     u: 180.00 m/2   max. CT eig. real: 4.012145
        N unstab.: 002
        Unstable aeroelastic natural frequency CT(rad/s):       68.01   68.01
Saving velocity analysis results...
     Successful
FINISHED - Elapsed time = 59.1569176 seconds
FINISHED - CPU process time = 94.3774846 seconds
[17]:
<sharpy.presharpy.presharpy.PreSharpy at 0x7f85b5231850>
Analysis
Nonlinear equilibrium

The nonlinear equilibrium condition can be visualised and analysed by opening, with Paraview, the files in the /output/<case_name>/aero and /output/<case_name>/beam folders to see the deflection and aerodynamic forces acting

Stability

The stability of the Goland wing is now analysed under changing free stream velocity. The aeroelastic system is projected onto 2 structural modes (1st bending and 1st torsion). The two modes are seen quite separated at 100 m/s. As speed is increased, the damping of the torsion mode decreases until it crosses the imaginary axis onto the right hand plane and flutter begins. This flutter mode is a bending-torsion mode, as seen from the natural frequency plot where the frequencies of each coalesce into this mode.

[18]:
file_name = './output/%s/stability/velocity_analysis_min1000_max1800_nvel0081.dat' % case_name

velocity_analysis = np.loadtxt(file_name)
u_inf = velocity_analysis[:, 0]
eigs_r = velocity_analysis[:, 1]
eigs_i = velocity_analysis[:, 2]
[19]:
fig = plt.figure()
plt.scatter(eigs_r, eigs_i, c=u_inf, cmap='Blues')
cbar = plt.colorbar()
cbar.set_label('Free Stream Velocity, $u_\infty$ [m/s]')

plt.grid()
plt.xlim(-10, 10)
plt.ylim(-150, 150)
plt.xlabel('Real Part, $\lambda$ [rad/s]')
plt.ylabel('Imag Part, $\lambda$ [rad/s]');
_images/content_example_notebooks_linear_goland_flutter_43_0.png
[20]:
fig = plt.figure()
natural_frequency = np.sqrt(eigs_r ** 2 + eigs_i ** 2)
damping_ratio = eigs_r / natural_frequency
cond = (eigs_r>-25) * (eigs_r<10) * (natural_frequency<100) # filter unwanted eigenvalues for this plot (mostly aero modes)

plt.scatter(u_inf[cond], damping_ratio[cond], color='k', marker='s', s=9)

plt.grid()
plt.ylim(-0.25, 0.25)
plt.xlabel('Free Stream Velocity, $u_\infty$ [m/s]')
plt.ylabel('Damping Ratio, $\zeta$ [-]');
_images/content_example_notebooks_linear_goland_flutter_44_0.png
[21]:
fig = plt.figure()
cond = (eigs_r>-25) * (eigs_r<10) # filter unwanted eigenvalues for this plot (mostly aero modes)
plt.scatter(u_inf[cond], natural_frequency[cond], color='k', marker='s', s=9)

plt.grid()
plt.ylim(40, 100)
plt.xlabel('Free Stream Velocity, $u_\infty$ [m/s]')
plt.ylabel('Natural Frequency, $\omega_n$ [rad/s]');
_images/content_example_notebooks_linear_goland_flutter_45_0.png
[1]:
%load_ext autoreload
%autoreload 2
%matplotlib inline
%config InlineBackend.figure_format = 'svg'
import numpy as np
import matplotlib.pyplot as plt
from IPython.display import Image

T-Tail HALE Model tutorial

The HALE T-Tail model intends to be a representative example of a typical HALE configuration, with high flexibility and aspect-ratio.

A geometry outline and a summary of the beam properties are given next

[2]:
url = 'https://raw.githubusercontent.com/ImperialCollegeLondon/sharpy/dev_doc/docs/source/content/example_notebooks/images/t-tail_geometry.png'
Image(url=url, width=800)
[2]:
[3]:
url = 'https://raw.githubusercontent.com/ImperialCollegeLondon/sharpy/dev_doc/docs/source/content/example_notebooks/images/t-tail_properties.png'
Image(url=url, width=500)
[3]:

This case is included in tests/coupled/simple_HALE/. The generate_hale.py file in that folder is the one that, if executed, generates all the required SHARPy files. This document is a step by step guide to how to process that case.

The T-Tail HALE model is subject to a 20% 1-cos spanwise constant gust.

First, let’s start with importing SHARPy in our Python environment.

[4]:
import sharpy
import sharpy.sharpy_main as sharpy_main

And now the generate_HALE.py file needs to be executed.

[5]:
route_to_case = '../../../../cases/coupled/simple_HALE/'
%run '../../../../cases/coupled/simple_HALE/generate_hale.py'

There should be 3 new files, apart from the original generate_hale.py:

[6]:
!ls ../../../../cases/coupled/simple_HALE/
generate_hale.py  simple_HALE.aero.h5  simple_HALE.sharpy
output            simple_HALE.fem.h5

SHARPy can be run now. In the terminal, doing cd to the simple_HALE folder, the command would look like:

sharpy simple_HALE.sharpy

From a python console with import sharpy already run, the command is:

[7]:
case_data = sharpy_main.main(['', route_to_case + 'simple_HALE.sharpy'])
--------------------------------------------------------------------------------
            ######  ##     ##    ###    ########  ########  ##    ##
           ##    ## ##     ##   ## ##   ##     ## ##     ##  ##  ##
           ##       ##     ##  ##   ##  ##     ## ##     ##   ####
            ######  ######### ##     ## ########  ########     ##
                 ## ##     ## ######### ##   ##   ##           ##
           ##    ## ##     ## ##     ## ##    ##  ##           ##
            ######  ##     ## ##     ## ##     ## ##           ##
--------------------------------------------------------------------------------
Aeroelastics Lab, Aeronautics Department.
    Copyright (c), Imperial College London.
    All rights reserved.
    License available at https://github.com/imperialcollegelondon/sharpy
Running SHARPy from /home/ng213/2TB/pazy_code/pazy-sharpy/lib/sharpy/docs/source/content/example_notebooks
SHARPy being run is in /home/ng213/2TB/pazy_code/pazy-sharpy/lib/sharpy
The branch being run is dev_setting_error
The version and commit hash are: v1.2.1-348-g402e87e-402e87e
SHARPy output folder set
     /home/ng213/2TB/pazy_code/pazy-sharpy/lib/sharpy/cases/coupled/simple_HALE//output//simple_HALE/
Generating an instance of BeamLoader
Variable for_pos has no assigned value in the settings file.
    will default to the value: [0.0, 0, 0]
Generating an instance of AerogridLoader
Variable control_surface_deflection has no assigned value in the settings file.
    will default to the value: []
Variable control_surface_deflection_generator_settings has no assigned value in the settings file.
    will default to the value: {}
Variable dx1 has no assigned value in the settings file.
    will default to the value: -1.0
Variable ndx1 has no assigned value in the settings file.
    will default to the value: 1
Variable r has no assigned value in the settings file.
    will default to the value: 1.0
Variable dxmax has no assigned value in the settings file.
    will default to the value: -1.0
The aerodynamic grid contains 5 surfaces
  Surface 0, M=4, N=16
     Wake 0, M=20, N=16
  Surface 1, M=4, N=16
     Wake 1, M=20, N=16
  Surface 2, M=4, N=8
     Wake 2, M=20, N=8
  Surface 3, M=4, N=8
     Wake 3, M=20, N=8
  Surface 4, M=4, N=8
     Wake 4, M=20, N=8
  In total: 224 bound panels
  In total: 1120 wake panels
  Total number of panels = 1344
Generating an instance of StaticTrim
Variable print_info has no assigned value in the settings file.
    will default to the value: True
Variable max_iter has no assigned value in the settings file.
    will default to the value: 100
Variable fz_tolerance has no assigned value in the settings file.
    will default to the value: 0.01
Variable fx_tolerance has no assigned value in the settings file.
    will default to the value: 0.01
Variable m_tolerance has no assigned value in the settings file.
    will default to the value: 0.01
Variable tail_cs_index has no assigned value in the settings file.
    will default to the value: 0
Variable thrust_nodes has no assigned value in the settings file.
    will default to the value: [0]
Variable initial_angle_eps has no assigned value in the settings file.
    will default to the value: 0.05
Variable initial_thrust_eps has no assigned value in the settings file.
    will default to the value: 2.0
Variable relaxation_factor has no assigned value in the settings file.
    will default to the value: 0.2
Variable save_info has no assigned value in the settings file.
    will default to the value: False
Generating an instance of StaticCoupled
Variable correct_forces_method has no assigned value in the settings file.
    will default to the value: 
Variable runtime_generators has no assigned value in the settings file.
    will default to the value: {}
Generating an instance of NonLinearStatic
Variable newmark_damp has no assigned value in the settings file.
    will default to the value: 0.0001
Variable gravity_dir has no assigned value in the settings file.
    will default to the value: [0.0, 0.0, 1.0]
Variable relaxation_factor has no assigned value in the settings file.
    will default to the value: 0.3
Variable dt has no assigned value in the settings file.
    will default to the value: 0.01
Variable num_steps has no assigned value in the settings file.
    will default to the value: 500
Variable initial_position has no assigned value in the settings file.
    will default to the value: [0. 0. 0.]
Generating an instance of StaticUvlm
Variable iterative_solver has no assigned value in the settings file.
    will default to the value: False
Variable iterative_tol has no assigned value in the settings file.
    will default to the value: 0.0001
Variable iterative_precond has no assigned value in the settings file.
    will default to the value: False
Variable cfl1 has no assigned value in the settings file.
    will default to the value: True
Variable vortex_radius has no assigned value in the settings file.
    will default to the value: 1e-06
Variable vortex_radius_wake_ind has no assigned value in the settings file.
    will default to the value: 1e-06
Variable rbm_vel_g has no assigned value in the settings file.
    will default to the value: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
Variable centre_rot_g has no assigned value in the settings file.
    will default to the value: [0.0, 0.0, 0.0]



|==========|==========|==========|==========|==========|==========|==========|==========|==========|==========|
|   iter   |alpha[deg]|elev[deg] |  thrust  |    Fx    |    Fy    |    Fz    |    Mx    |    My    |    Mz    |
|==========|==========|==========|==========|==========|==========|==========|==========|==========|==========|
|    0     |  4.3100  | -2.0800  |  6.1600  | -0.3600  | -0.0000  |  0.8010  |  0.0000  | -0.6935  |  0.0000  |
|    0     |  7.1748  | -4.9448  |  6.1600  | -27.8570 | -0.0000  | 280.1530 |  0.0000  |-105.5351 |  0.0000  |
|    0     |  4.3100  |  0.7848  |  6.1600  | -2.4506  | -0.0000  | 38.7819  |  0.0000  |-377.3661 | -0.0000  |
|    0     |  4.3100  | -2.0800  |  8.1600  | -2.3600  | -0.0000  |  0.8010  |  0.0000  | -0.6935  |  0.0000  |
|    1     |  4.3018  | -2.0771  |  5.8000  |  0.0660  |  0.0000  | -0.2782  | -0.0000  |  0.2446  |  0.0000  |
|    2     |  4.3039  | -2.0778  |  5.8558  | -0.0068  | -0.0000  |  0.0003  |  0.0000  |  0.0008  |  0.0000  |
Generating an instance of BeamLoads
Variable output_file_name has no assigned value in the settings file.
    will default to the value: beam_loads
Generating an instance of AerogridPlot
Variable include_unsteady_applied_forces has no assigned value in the settings file.
    will default to the value: False
Variable name_prefix has no assigned value in the settings file.
    will default to the value: 
Variable include_velocities has no assigned value in the settings file.
    will default to the value: False
Variable include_incidence_angle has no assigned value in the settings file.
    will default to the value: False
Variable num_cores has no assigned value in the settings file.
    will default to the value: 1
Variable vortex_radius has no assigned value in the settings file.
    will default to the value: 1e-06
...Finished
Generating an instance of BeamPlot
Variable include_FoR has no assigned value in the settings file.
    will default to the value: False
Variable include_applied_moments has no assigned value in the settings file.
    will default to the value: True
Variable name_prefix has no assigned value in the settings file.
    will default to the value: 
Variable output_rbm has no assigned value in the settings file.
    will default to the value: True
...Finished
Generating an instance of DynamicCoupled
Variable print_info has no assigned value in the settings file.
    will default to the value: True
Variable structural_substeps has no assigned value in the settings file.
    will default to the value: 0
Variable dynamic_relaxation has no assigned value in the settings file.
    will default to the value: False
Variable controller_id has no assigned value in the settings file.
    will default to the value: {}
Variable controller_settings has no assigned value in the settings file.
    will default to the value: {}
Variable cleanup_previous_solution has no assigned value in the settings file.
    will default to the value: False
Variable steps_without_unsteady_force has no assigned value in the settings file.
    will default to the value: 0
Variable pseudosteps_ramp_unsteady_force has no assigned value in the settings file.
    will default to the value: 0
Variable correct_forces_method has no assigned value in the settings file.
    will default to the value: 
Variable network_settings has no assigned value in the settings file.
    will default to the value: {}
Variable runtime_generators has no assigned value in the settings file.
    will default to the value: {}
Generating an instance of NonLinearDynamicCoupledStep
Variable num_load_steps has no assigned value in the settings file.
    will default to the value: 1
Variable gravity_dir has no assigned value in the settings file.
    will default to the value: [0.0, 0.0, 1.0]
Variable relaxation_factor has no assigned value in the settings file.
    will default to the value: 0.3
Variable balancing has no assigned value in the settings file.
    will default to the value: False
Variable initial_velocity_direction has no assigned value in the settings file.
    will default to the value: [-1.0, 0.0, 0.0]
Generating an instance of StepUvlm
Variable iterative_solver has no assigned value in the settings file.
    will default to the value: False
Variable iterative_tol has no assigned value in the settings file.
    will default to the value: 0.0001
Variable iterative_precond has no assigned value in the settings file.
    will default to the value: False
Variable cfl1 has no assigned value in the settings file.
    will default to the value: True
Variable vortex_radius has no assigned value in the settings file.
    will default to the value: 1e-06
Variable vortex_radius_wake_ind has no assigned value in the settings file.
    will default to the value: 1e-06
Variable interp_coords has no assigned value in the settings file.
    will default to the value: 0
Variable filter_method has no assigned value in the settings file.
    will default to the value: 0
Variable interp_method has no assigned value in the settings file.
    will default to the value: 0
Variable yaw_slerp has no assigned value in the settings file.
    will default to the value: 0.0
Variable centre_rot has no assigned value in the settings file.
    will default to the value: [0.0, 0.0, 0.0]
Variable quasi_steady has no assigned value in the settings file.
    will default to the value: False
gamma_dot_filtering does not support even numbers.Changing 6 to 7
Generating an instance of BeamLoads
Variable output_file_name has no assigned value in the settings file.
    will default to the value: beam_loads
Generating an instance of BeamPlot
Variable include_FoR has no assigned value in the settings file.
    will default to the value: False
Variable include_applied_moments has no assigned value in the settings file.
    will default to the value: True
Variable name_prefix has no assigned value in the settings file.
    will default to the value: 
Variable output_rbm has no assigned value in the settings file.
    will default to the value: True
Generating an instance of AerogridPlot
Variable include_forward_motion has no assigned value in the settings file.
    will default to the value: False
Variable include_unsteady_applied_forces has no assigned value in the settings file.
    will default to the value: False
Variable name_prefix has no assigned value in the settings file.
    will default to the value: 
Variable u_inf has no assigned value in the settings file.
    will default to the value: 0.0
Variable dt has no assigned value in the settings file.
    will default to the value: 0.0
Variable include_velocities has no assigned value in the settings file.
    will default to the value: False
Variable include_incidence_angle has no assigned value in the settings file.
    will default to the value: False
Variable num_cores has no assigned value in the settings file.
    will default to the value: 1
Variable vortex_radius has no assigned value in the settings file.
    will default to the value: 1e-06



|=======|========|======|==============|==============|==============|==============|==============|
|  ts   |   t    | iter | struc ratio  |  iter time   | residual vel |  FoR_vel(x)  |  FoR_vel(z)  |
|=======|========|======|==============|==============|==============|==============|==============|
/home/ng213/2TB/pazy_code/pazy-sharpy/lib/sharpy/sharpy/aero/utils/uvlmlib.py:264: RuntimeWarning: invalid value encountered in true_divide
  flightconditions.uinf_direction = np.ctypeslib.as_ctypes(ts_info.u_ext[0][:, 0, 0]/flightconditions.uinf)
/home/ng213/2TB/pazy_code/pazy-sharpy/lib/sharpy/sharpy/aero/utils/uvlmlib.py:325: RuntimeWarning: invalid value encountered in true_divide
  flightconditions.uinf_direction = np.ctypeslib.as_ctypes(ts_info.u_ext[0][:, 0, 0]/flightconditions.uinf)
|   1   | 0.0250 |  2   |   0.660158   |   0.788767   |  -4.245993   |-9.971789e+00 |-7.504783e-01 |
|   2   | 0.0500 |  3   |   0.698975   |   0.965136   |  -4.635143   |-9.971745e+00 |-7.505379e-01 |
|   3   | 0.0750 |  2   |   0.699509   |   0.744684   |  -4.142638   |-9.971678e+00 |-7.506741e-01 |
|   4   | 0.1000 |  2   |   0.702553   |   0.742001   |  -4.583042   |-9.971654e+00 |-7.508442e-01 |
|   5   | 0.1250 |  1   |   0.705584   |   0.512845   |  -4.384776   |-9.971729e+00 |-7.509873e-01 |
|   6   | 0.1500 |  2   |   0.710967   |   0.733027   |  -4.729199   |-9.971808e+00 |-7.510934e-01 |
|   7   | 0.1750 |  1   |   0.717295   |   0.511901   |  -4.049012   |-9.971749e+00 |-7.511575e-01 |
|   8   | 0.2000 |  1   |   0.687752   |   0.519393   |  -4.147149   |-9.971609e+00 |-7.511620e-01 |
|   9   | 0.2250 |  1   |   0.657027   |   0.533608   |  -4.243231   |-9.971483e+00 |-7.511461e-01 |
|  10   | 0.2500 |  1   |   0.650443   |   0.540742   |  -4.352169   |-9.971378e+00 |-7.511644e-01 |
|  11   | 0.2750 |  1   |   0.656218   |   0.534101   |  -4.191190   |-9.971371e+00 |-7.511728e-01 |
|  12   | 0.3000 |  1   |   0.671768   |   0.554114   |  -4.122823   |-9.971442e+00 |-7.511539e-01 |
|  13   | 0.3250 |  1   |   0.656158   |   0.537498   |  -4.418002   |-9.971429e+00 |-7.511300e-01 |
|  14   | 0.3500 |  1   |   0.704366   |   0.508580   |  -4.678378   |-9.971349e+00 |-7.510900e-01 |
|  15   | 0.3750 |  1   |   0.719952   |   0.514705   |  -4.402185   |-9.971299e+00 |-7.510668e-01 |
|  16   | 0.4000 |  1   |   0.705019   |   0.512428   |  -4.448460   |-9.971290e+00 |-7.510571e-01 |
|  17   | 0.4250 |  1   |   0.713898   |   0.511336   |  -4.476767   |-9.971358e+00 |-7.510533e-01 |
|  18   | 0.4500 |  1   |   0.715516   |   0.511316   |  -4.534268   |-9.971488e+00 |-7.510753e-01 |
|  19   | 0.4750 |  1   |   0.709680   |   0.508300   |  -4.662816   |-9.971575e+00 |-7.510784e-01 |
|  20   | 0.5000 |  2   |   0.704182   |   0.744397   |  -4.812376   |-9.971586e+00 |-7.510241e-01 |
|  21   | 0.5250 |  3   |   0.708522   |   0.965943   |  -4.402757   |-9.971726e+00 |-7.507397e-01 |
|  22   | 0.5500 |  4   |   0.708365   |   1.200794   |  -4.475885   |-9.972374e+00 |-7.497152e-01 |
|  23   | 0.5750 |  4   |   0.708962   |   1.199187   |  -4.264700   |-9.973956e+00 |-7.471042e-01 |
|  24   | 0.6000 |  4   |   0.709056   |   1.201371   |  -4.148547   |-9.977005e+00 |-7.417512e-01 |
|  25   | 0.6250 |  4   |   0.707360   |   1.214448   |  -4.101431   |-9.982064e+00 |-7.323149e-01 |
|  26   | 0.6500 |  4   |   0.707825   |   1.211973   |  -4.083226   |-9.989506e+00 |-7.173484e-01 |
|  27   | 0.6750 |  4   |   0.705636   |   1.209574   |  -4.081045   |-9.999533e+00 |-6.954412e-01 |
|  28   | 0.7000 |  4   |   0.702970   |   1.199970   |  -4.095091   |-1.001216e+01 |-6.653667e-01 |
|  29   | 0.7250 |  4   |   0.705531   |   1.206136   |  -4.120431   |-1.002734e+01 |-6.261403e-01 |
|  30   | 0.7500 |  4   |   0.702935   |   1.213436   |  -4.153507   |-1.004515e+01 |-5.771350e-01 |
|  31   | 0.7750 |  4   |   0.698230   |   1.203890   |  -4.194909   |-1.006573e+01 |-5.180671e-01 |
|  32   | 0.8000 |  4   |   0.703664   |   1.208508   |  -4.236529   |-1.008907e+01 |-4.489843e-01 |
|  33   | 0.8250 |  4   |   0.701559   |   1.203176   |  -4.281618   |-1.011502e+01 |-3.702984e-01 |
|  34   | 0.8500 |  4   |   0.700114   |   1.215140   |  -4.272027   |-1.014323e+01 |-2.827796e-01 |
|  35   | 0.8750 |  4   |   0.701394   |   1.206869   |  -4.137638   |-1.017318e+01 |-1.875441e-01 |
|  36   | 0.9000 |  4   |   0.698019   |   1.213434   |  -4.087979   |-1.020434e+01 |-8.606667e-02 |
|  37   | 0.9250 |  4   |   0.697820   |   1.213205   |  -4.081173   |-1.023614e+01 | 1.986601e-02 |
|  38   | 0.9500 |  4   |   0.692925   |   1.210431   |  -4.067952   |-1.026798e+01 | 1.282642e-01 |
|  39   | 0.9750 |  4   |   0.692719   |   1.203242   |  -4.040392   |-1.029913e+01 | 2.371167e-01 |
|  40   | 1.0000 |  4   |   0.695089   |   1.205393   |  -4.023531   |-1.032875e+01 | 3.445071e-01 |
|  41   | 1.0250 |  5   |   0.696443   |   1.438348   |  -4.548408   |-1.035594e+01 | 4.482817e-01 |
|  42   | 1.0500 |  5   |   0.699286   |   1.456647   |  -4.496733   |-1.037989e+01 | 5.458046e-01 |
|  43   | 1.0750 |  5   |   0.693181   |   1.451422   |  -4.426046   |-1.040006e+01 | 6.342879e-01 |
|  44   | 1.1000 |  5   |   0.672004   |   1.475300   |  -4.379701   |-1.041606e+01 | 7.112695e-01 |
|  45   | 1.1250 |  5   |   0.672251   |   1.468131   |  -4.402469   |-1.042753e+01 | 7.747229e-01 |
|  46   | 1.1500 |  5   |   0.689079   |   1.445732   |  -4.477108   |-1.043429e+01 | 8.230013e-01 |
|  47   | 1.1750 |  5   |   0.690835   |   1.446807   |  -4.548994   |-1.043627e+01 | 8.549797e-01 |
|  48   | 1.2000 |  5   |   0.692859   |   1.458130   |  -4.602614   |-1.043347e+01 | 8.701306e-01 |
|  49   | 1.2250 |  5   |   0.692201   |   1.450715   |  -4.670662   |-1.042601e+01 | 8.683187e-01 |
|  50   | 1.2500 |  4   |   0.692043   |   1.211332   |  -4.009458   |-1.041409e+01 | 8.498052e-01 |
|  51   | 1.2750 |  5   |   0.691406   |   1.450458   |  -4.437774   |-1.039785e+01 | 8.153184e-01 |
|  52   | 1.3000 |  5   |   0.690078   |   1.456433   |  -4.400817   |-1.037756e+01 | 7.658481e-01 |
|  53   | 1.3250 |  5   |   0.642589   |   1.516374   |  -4.491993   |-1.035352e+01 | 7.027470e-01 |
|  54   | 1.3500 |  5   |   0.636213   |   1.529562   |  -4.660919   |-1.032602e+01 | 6.277602e-01 |
|  55   | 1.3750 |  4   |   0.654913   |   1.257229   |  -4.127066   |-1.029540e+01 | 5.429281e-01 |
|  56   | 1.4000 |  4   |   0.690183   |   1.213338   |  -4.180862   |-1.026211e+01 | 4.504884e-01 |
|  57   | 1.4250 |  4   |   0.690784   |   1.220024   |  -4.119756   |-1.022658e+01 | 3.526569e-01 |
|  58   | 1.4500 |  4   |   0.693190   |   1.230164   |  -4.115756   |-1.018920e+01 | 2.516427e-01 |
|  59   | 1.4750 |  4   |   0.689614   |   1.227466   |  -4.089544   |-1.015042e+01 | 1.494680e-01 |
|  60   | 1.5000 |  4   |   0.686766   |   1.221660   |  -4.073221   |-1.011070e+01 | 4.789509e-02 |
|  61   | 1.5250 |  4   |   0.688439   |   1.225181   |  -4.065044   |-1.007052e+01 |-5.142849e-02 |
|  62   | 1.5500 |  4   |   0.686541   |   1.221131   |  -4.066648   |-1.003034e+01 |-1.468432e-01 |
|  63   | 1.5750 |  4   |   0.649074   |   1.269069   |  -4.116776   |-9.990515e+00 |-2.367221e-01 |
|  64   | 1.6000 |  4   |   0.634231   |   1.298771   |  -4.232749   |-9.951260e+00 |-3.197660e-01 |
|  65   | 1.6250 |  4   |   0.631620   |   1.295939   |  -4.346372   |-9.912713e+00 |-3.949816e-01 |
|  66   | 1.6500 |  4   |   0.676708   |   1.241231   |  -4.462283   |-9.875008e+00 |-4.616848e-01 |
|  67   | 1.6750 |  4   |   0.690826   |   1.236500   |  -4.536211   |-9.838289e+00 |-5.194903e-01 |
|  68   | 1.7000 |  4   |   0.685831   |   1.222472   |  -4.557395   |-9.802717e+00 |-5.683337e-01 |
|  69   | 1.7250 |  4   |   0.683209   |   1.225972   |  -4.514445   |-9.768493e+00 |-6.084703e-01 |
|  70   | 1.7500 |  4   |   0.681402   |   1.219586   |  -4.515767   |-9.735644e+00 |-6.403299e-01 |
|  71   | 1.7750 |  4   |   0.679701   |   1.241776   |  -4.561782   |-9.704041e+00 |-6.644313e-01 |
|  72   | 1.8000 |  4   |   0.687585   |   1.233221   |  -4.576978   |-9.673585e+00 |-6.813177e-01 |
|  73   | 1.8250 |  3   |   0.685128   |   0.992525   |  -4.085489   |-9.644153e+00 |-6.916357e-01 |
|  74   | 1.8500 |  3   |   0.630406   |   1.081735   |  -4.228827   |-9.615525e+00 |-6.960345e-01 |
|  75   | 1.8750 |  3   |   0.633953   |   1.068277   |  -4.281040   |-9.587600e+00 |-6.952011e-01 |
|  76   | 1.9000 |  3   |   0.631463   |   1.060051   |  -4.298619   |-9.560401e+00 |-6.899257e-01 |
|  77   | 1.9250 |  3   |   0.641269   |   1.076329   |  -4.263283   |-9.533905e+00 |-6.810428e-01 |
|  78   | 1.9500 |  3   |   0.632168   |   1.056881   |  -4.172553   |-9.508183e+00 |-6.694250e-01 |
|  79   | 1.9750 |  3   |   0.644723   |   1.078860   |  -4.087294   |-9.483448e+00 |-6.559401e-01 |
|  80   | 2.0000 |  3   |   0.629024   |   1.058206   |  -4.017983   |-9.459903e+00 |-6.414764e-01 |
|  81   | 2.0250 |  4   |   0.641541   |   1.337528   |  -4.489993   |-9.437808e+00 |-6.269365e-01 |
|  82   | 2.0500 |  4   |   0.628707   |   1.310679   |  -4.470211   |-9.417538e+00 |-6.131778e-01 |
|  83   | 2.0750 |  4   |   0.628663   |   1.307533   |  -4.453642   |-9.399441e+00 |-6.009539e-01 |
|  84   | 2.1000 |  4   |   0.631778   |   1.301269   |  -4.451153   |-9.383802e+00 |-5.909513e-01 |
|  85   | 2.1250 |  4   |   0.629938   |   1.308679   |  -4.454054   |-9.370919e+00 |-5.837527e-01 |
|  86   | 2.1500 |  4   |   0.630758   |   1.309061   |  -4.489244   |-9.361058e+00 |-5.798117e-01 |
|  87   | 2.1750 |  4   |   0.630606   |   1.308830   |  -4.529495   |-9.354357e+00 |-5.794602e-01 |
|  88   | 2.2000 |  4   |   0.629895   |   1.306216   |  -4.555062   |-9.350910e+00 |-5.828920e-01 |
|  89   | 2.2250 |  4   |   0.627658   |   1.299544   |  -4.583501   |-9.350758e+00 |-5.901807e-01 |
|  90   | 2.2500 |  4   |   0.631380   |   1.304904   |  -4.577435   |-9.353747e+00 |-6.012367e-01 |
|  91   | 2.2750 |  3   |   0.632640   |   1.049719   |  -4.015225   |-9.359659e+00 |-6.158432e-01 |
|  92   | 2.3000 |  3   |   0.677727   |   0.998599   |  -4.029324   |-9.368239e+00 |-6.336696e-01 |
|  93   | 2.3250 |  3   |   0.681171   |   0.994001   |  -4.027658   |-9.379037e+00 |-6.542748e-01 |
|  94   | 2.3500 |  3   |   0.681259   |   0.989943   |  -4.032139   |-9.391519e+00 |-6.771019e-01 |
|  95   | 2.3750 |  3   |   0.662018   |   1.012158   |  -4.018542   |-9.405213e+00 |-7.015133e-01 |
|  96   | 2.4000 |  4   |   0.649296   |   1.280039   |  -4.507534   |-9.419633e+00 |-7.269046e-01 |
|  97   | 2.4250 |  4   |   0.643727   |   1.278447   |  -4.486197   |-9.434238e+00 |-7.525958e-01 |
|  98   | 2.4500 |  4   |   0.626945   |   1.300289   |  -4.469752   |-9.448552e+00 |-7.778583e-01 |
|  99   | 2.4750 |  4   |   0.630502   |   1.316456   |  -4.479896   |-9.462111e+00 |-8.020210e-01 |
|  100  | 2.5000 |  4   |   0.624389   |   1.310294   |  -4.502345   |-9.474427e+00 |-8.243816e-01 |
|  101  | 2.5250 |  4   |   0.631037   |   1.315843   |  -4.533404   |-9.485161e+00 |-8.442818e-01 |
|  102  | 2.5500 |  4   |   0.644611   |   1.283856   |  -4.554463   |-9.494088e+00 |-8.611748e-01 |
|  103  | 2.5750 |  4   |   0.680174   |   1.237591   |  -4.579594   |-9.501053e+00 |-8.746547e-01 |
|  104  | 2.6000 |  4   |   0.680077   |   1.236782   |  -4.596771   |-9.506032e+00 |-8.844994e-01 |
|  105  | 2.6250 |  4   |   0.675584   |   1.232872   |  -4.484950   |-9.509125e+00 |-8.907008e-01 |
|  106  | 2.6500 |  4   |   0.678916   |   1.235079   |  -4.463714   |-9.510468e+00 |-8.934511e-01 |
|  107  | 2.6750 |  4   |   0.677563   |   1.234071   |  -4.381520   |-9.510274e+00 |-8.931021e-01 |
|  108  | 2.7000 |  4   |   0.674451   |   1.246872   |  -4.443680   |-9.508969e+00 |-8.901755e-01 |
|  109  | 2.7250 |  4   |   0.680008   |   1.243277   |  -4.646030   |-9.507028e+00 |-8.852282e-01 |
|  110  | 2.7500 |  3   |   0.687824   |   1.013889   |  -4.095041   |-9.504803e+00 |-8.787479e-01 |
|  111  | 2.7750 |  3   |   0.678555   |   1.000272   |  -4.324971   |-9.502690e+00 |-8.711948e-01 |
|  112  | 2.8000 |  3   |   0.629410   |   1.056518   |  -4.391682   |-9.501123e+00 |-8.630844e-01 |
|  113  | 2.8250 |  3   |   0.631289   |   1.061790   |  -4.405523   |-9.500417e+00 |-8.548953e-01 |
|  114  | 2.8500 |  3   |   0.623451   |   1.061574   |  -4.405133   |-9.500842e+00 |-8.469691e-01 |
|  115  | 2.8750 |  3   |   0.629521   |   1.063894   |  -4.364937   |-9.502651e+00 |-8.395888e-01 |
|  116  | 2.9000 |  3   |   0.625789   |   1.052592   |  -4.333192   |-9.505900e+00 |-8.329495e-01 |
|  117  | 2.9250 |  3   |   0.634558   |   1.059645   |  -4.287009   |-9.510496e+00 |-8.271466e-01 |
|  118  | 2.9500 |  3   |   0.676550   |   1.015943   |  -4.245942   |-9.516385e+00 |-8.222099e-01 |
|  119  | 2.9750 |  3   |   0.680614   |   1.002676   |  -4.205825   |-9.523418e+00 |-8.181140e-01 |
|  120  | 3.0000 |  3   |   0.682271   |   1.006870   |  -4.188187   |-9.531318e+00 |-8.148053e-01 |
|  121  | 3.0250 |  3   |   0.680266   |   0.996102   |  -4.232299   |-9.539814e+00 |-8.121677e-01 |
|  122  | 3.0500 |  3   |   0.681732   |   0.999955   |  -4.231690   |-9.548602e+00 |-8.100300e-01 |
|  123  | 3.0750 |  3   |   0.682858   |   1.010936   |  -4.279188   |-9.557348e+00 |-8.082342e-01 |
|  124  | 3.1000 |  3   |   0.681190   |   1.009030   |  -4.271080   |-9.565764e+00 |-8.066818e-01 |
|  125  | 3.1250 |  3   |   0.683038   |   1.007188   |  -4.392752   |-9.573620e+00 |-8.052156e-01 |
|  126  | 3.1500 |  3   |   0.678701   |   1.000200   |  -4.449904   |-9.580739e+00 |-8.036619e-01 |
|  127  | 3.1750 |  2   |   0.676607   |   0.762312   |  -4.000854   |-9.587007e+00 |-8.019792e-01 |
|  128  | 3.2000 |  3   |   0.676056   |   1.006674   |  -4.538007   |-9.592408e+00 |-8.001705e-01 |
|  129  | 3.2250 |  3   |   0.675263   |   1.005720   |  -4.547103   |-9.596953e+00 |-7.981922e-01 |
|  130  | 3.2500 |  3   |   0.676868   |   1.006415   |  -4.525018   |-9.600665e+00 |-7.960410e-01 |
|  131  | 3.2750 |  3   |   0.675184   |   1.010851   |  -4.506300   |-9.603640e+00 |-7.937587e-01 |
|  132  | 3.3000 |  3   |   0.672328   |   1.002885   |  -4.509537   |-9.606035e+00 |-7.913608e-01 |
|  133  | 3.3250 |  3   |   0.671273   |   1.006276   |  -4.517757   |-9.608054e+00 |-7.889411e-01 |
|  134  | 3.3500 |  2   |   0.667902   |   0.767805   |  -4.004169   |-9.609914e+00 |-7.866119e-01 |
|  135  | 3.3750 |  2   |   0.672012   |   0.762166   |  -4.037206   |-9.611796e+00 |-7.844475e-01 |
|  136  | 3.4000 |  2   |   0.674040   |   0.766492   |  -4.091199   |-9.613836e+00 |-7.825251e-01 |
|  137  | 3.4250 |  2   |   0.677833   |   0.764682   |  -4.161763   |-9.616142e+00 |-7.808889e-01 |
|  138  | 3.4500 |  2   |   0.678520   |   0.772371   |  -4.208416   |-9.618837e+00 |-7.795641e-01 |
|  139  | 3.4750 |  2   |   0.675557   |   0.769200   |  -4.185191   |-9.622012e+00 |-7.786017e-01 |
|  140  | 3.5000 |  2   |   0.658891   |   0.777941   |  -4.143336   |-9.625717e+00 |-7.780201e-01 |
|  141  | 3.5250 |  2   |   0.670239   |   0.764967   |  -4.111505   |-9.629952e+00 |-7.777878e-01 |
|  142  | 3.5500 |  2   |   0.675294   |   0.780672   |  -4.095589   |-9.634644e+00 |-7.778791e-01 |
|  143  | 3.5750 |  2   |   0.674070   |   0.768821   |  -4.089987   |-9.639706e+00 |-7.782389e-01 |
|  144  | 3.6000 |  2   |   0.675235   |   0.770859   |  -4.092880   |-9.645044e+00 |-7.787973e-01 |
|  145  | 3.6250 |  2   |   0.667235   |   0.766770   |  -4.113065   |-9.650579e+00 |-7.794970e-01 |
|  146  | 3.6500 |  2   |   0.664948   |   0.775005   |  -4.162262   |-9.656221e+00 |-7.802848e-01 |
|  147  | 3.6750 |  2   |   0.669905   |   0.778505   |  -4.233073   |-9.661859e+00 |-7.810839e-01 |
|  148  | 3.7000 |  2   |   0.673135   |   0.772653   |  -4.300425   |-9.667393e+00 |-7.818259e-01 |
|  149  | 3.7250 |  2   |   0.668814   |   0.767011   |  -4.341062   |-9.672713e+00 |-7.824584e-01 |
|  150  | 3.7500 |  2   |   0.667366   |   0.768942   |  -4.347827   |-9.677758e+00 |-7.829222e-01 |
|  151  | 3.7750 |  2   |   0.671508   |   0.768175   |  -4.340552   |-9.682512e+00 |-7.832059e-01 |
|  152  | 3.8000 |  2   |   0.657508   |   0.783694   |  -4.331623   |-9.686971e+00 |-7.832953e-01 |
|  153  | 3.8250 |  2   |   0.672415   |   0.768370   |  -4.316722   |-9.691148e+00 |-7.831777e-01 |
|  154  | 3.8500 |  2   |   0.677129   |   0.779227   |  -4.299262   |-9.695058e+00 |-7.828747e-01 |
|  155  | 3.8750 |  2   |   0.673584   |   0.770337   |  -4.305853   |-9.698731e+00 |-7.823999e-01 |
|  156  | 3.9000 |  2   |   0.665485   |   0.772028   |  -4.334291   |-9.702215e+00 |-7.817778e-01 |
|  157  | 3.9250 |  2   |   0.666994   |   0.776969   |  -4.377407   |-9.705587e+00 |-7.810551e-01 |
|  158  | 3.9500 |  2   |   0.665925   |   0.780606   |  -4.439104   |-9.708933e+00 |-7.802775e-01 |
|  159  | 3.9750 |  2   |   0.670904   |   0.771282   |  -4.498475   |-9.712316e+00 |-7.794772e-01 |
|  160  | 4.0000 |  1   |   0.671639   |   0.530210   |  -4.008078   |-9.715787e+00 |-7.786931e-01 |
|  161  | 4.0250 |  1   |   0.670327   |   0.533749   |  -4.092355   |-9.719380e+00 |-7.779506e-01 |
|  162  | 4.0500 |  1   |   0.668751   |   0.537579   |  -4.156978   |-9.723116e+00 |-7.772698e-01 |
|  163  | 4.0750 |  1   |   0.663677   |   0.531485   |  -4.072783   |-9.727029e+00 |-7.766788e-01 |
|  164  | 4.1000 |  2   |   0.666350   |   0.773267   |  -4.569537   |-9.731146e+00 |-7.761920e-01 |
|  165  | 4.1250 |  2   |   0.682839   |   0.788505   |  -4.570174   |-9.735472e+00 |-7.758138e-01 |
|  166  | 4.1500 |  2   |   0.620765   |   0.812113   |  -4.549853   |-9.739981e+00 |-7.755403e-01 |
|  167  | 4.1750 |  2   |   0.618753   |   0.825905   |  -4.537868   |-9.744625e+00 |-7.753472e-01 |
|  168  | 4.2000 |  2   |   0.618510   |   0.819368   |  -4.524976   |-9.749356e+00 |-7.752100e-01 |
|  169  | 4.2250 |  2   |   0.613543   |   0.817032   |  -4.515910   |-9.754134e+00 |-7.751152e-01 |
|  170  | 4.2500 |  2   |   0.614536   |   0.814042   |  -4.538699   |-9.758943e+00 |-7.750408e-01 |
|  171  | 4.2750 |  1   |   0.625472   |   0.574294   |  -4.020787   |-9.763759e+00 |-7.749700e-01 |
|  172  | 4.3000 |  1   |   0.608604   |   0.560485   |  -4.061045   |-9.768537e+00 |-7.748838e-01 |
|  173  | 4.3250 |  1   |   0.613070   |   0.563931   |  -4.121220   |-9.773242e+00 |-7.747597e-01 |
|  174  | 4.3500 |  1   |   0.642887   |   0.551584   |  -4.110854   |-9.777831e+00 |-7.745740e-01 |
|  175  | 4.3750 |  1   |   0.666433   |   0.534772   |  -4.088306   |-9.782291e+00 |-7.743221e-01 |
|  176  | 4.4000 |  1   |   0.673361   |   0.543510   |  -4.077439   |-9.786631e+00 |-7.740007e-01 |
|  177  | 4.4250 |  1   |   0.675407   |   0.545999   |  -4.085008   |-9.790868e+00 |-7.736116e-01 |
|  178  | 4.4500 |  1   |   0.663487   |   0.537923   |  -4.084174   |-9.795016e+00 |-7.731651e-01 |
|  179  | 4.4750 |  1   |   0.656179   |   0.541705   |  -4.095747   |-9.799077e+00 |-7.726600e-01 |
|  180  | 4.5000 |  1   |   0.665239   |   0.538480   |  -4.143039   |-9.803063e+00 |-7.721067e-01 |
|  181  | 4.5250 |  1   |   0.671591   |   0.542443   |  -4.219653   |-9.806995e+00 |-7.715207e-01 |
|  182  | 4.5500 |  1   |   0.663922   |   0.536485   |  -4.324315   |-9.810904e+00 |-7.709163e-01 |
|  183  | 4.5750 |  1   |   0.657884   |   0.540013   |  -4.462694   |-9.814833e+00 |-7.703121e-01 |
|  184  | 4.6000 |  1   |   0.664151   |   0.536879   |  -4.555594   |-9.818801e+00 |-7.697261e-01 |
|  185  | 4.6250 |  1   |   0.664279   |   0.534583   |  -4.636689   |-9.822816e+00 |-7.691634e-01 |
|  186  | 4.6500 |  1   |   0.663570   |   0.535142   |  -4.623202   |-9.826877e+00 |-7.686317e-01 |
|  187  | 4.6750 |  1   |   0.654862   |   0.535068   |  -4.465982   |-9.830990e+00 |-7.681383e-01 |
|  188  | 4.7000 |  1   |   0.664028   |   0.540949   |  -4.338112   |-9.835165e+00 |-7.676893e-01 |
|  189  | 4.7250 |  1   |   0.663004   |   0.538335   |  -4.294846   |-9.839409e+00 |-7.672874e-01 |
|  190  | 4.7500 |  1   |   0.661509   |   0.535572   |  -4.283904   |-9.843723e+00 |-7.669317e-01 |
|  191  | 4.7750 |  1   |   0.667410   |   0.544977   |  -4.289664   |-9.848084e+00 |-7.666140e-01 |
|  192  | 4.8000 |  1   |   0.631005   |   0.557035   |  -4.285048   |-9.852468e+00 |-7.663236e-01 |
|  193  | 4.8250 |  1   |   0.655634   |   0.543174   |  -4.249586   |-9.856861e+00 |-7.660553e-01 |
|  194  | 4.8500 |  1   |   0.663471   |   0.540511   |  -4.240242   |-9.861248e+00 |-7.657973e-01 |
|  195  | 4.8750 |  1   |   0.663061   |   0.537256   |  -4.279527   |-9.865630e+00 |-7.655457e-01 |
|  196  | 4.9000 |  1   |   0.666065   |   0.559327   |  -4.341423   |-9.869997e+00 |-7.652934e-01 |
|  197  | 4.9250 |  1   |   0.655532   |   0.540197   |  -4.389727   |-9.874334e+00 |-7.650274e-01 |
|  198  | 4.9500 |  1   |   0.653665   |   0.536703   |  -4.392163   |-9.878621e+00 |-7.647419e-01 |
|  199  | 4.9750 |  1   |   0.643891   |   0.551159   |  -4.356375   |-9.882848e+00 |-7.644317e-01 |
|  200  | 5.0000 |  1   |   0.658182   |   0.536739   |  -4.357632   |-9.887023e+00 |-7.640960e-01 |
|  201  | 5.0250 |  1   |   0.666568   |   0.547456   |  -4.374468   |-9.891152e+00 |-7.637354e-01 |
|  202  | 5.0500 |  1   |   0.690858   |   0.576716   |  -4.405701   |-9.895246e+00 |-7.633546e-01 |
|  203  | 5.0750 |  1   |   0.648976   |   0.543039   |  -4.457054   |-9.899310e+00 |-7.629532e-01 |
|  204  | 5.1000 |  1   |   0.645745   |   0.541463   |  -4.487556   |-9.903338e+00 |-7.625328e-01 |
|  205  | 5.1250 |  1   |   0.591463   |   0.597350   |  -4.532516   |-9.907334e+00 |-7.620999e-01 |
|  206  | 5.1500 |  1   |   0.602864   |   0.567360   |  -4.584225   |-9.911313e+00 |-7.616581e-01 |
|  207  | 5.1750 |  1   |   0.607332   |   0.564882   |  -4.653390   |-9.915290e+00 |-7.612183e-01 |
|  208  | 5.2000 |  1   |   0.617578   |   0.575872   |  -4.738979   |-9.919278e+00 |-7.607846e-01 |
|  209  | 5.2250 |  1   |   0.608336   |   0.568334   |  -4.813565   |-9.923281e+00 |-7.603606e-01 |
|  210  | 5.2500 |  1   |   0.608519   |   0.571894   |  -4.767231   |-9.927295e+00 |-7.599484e-01 |
|  211  | 5.2750 |  1   |   0.611513   |   0.573648   |  -4.664724   |-9.931315e+00 |-7.595504e-01 |
|  212  | 5.3000 |  1   |   0.663295   |   0.546204   |  -4.542805   |-9.935346e+00 |-7.591674e-01 |
|  213  | 5.3250 |  1   |   0.653387   |   0.540858   |  -4.498708   |-9.939397e+00 |-7.588020e-01 |
|  214  | 5.3500 |  1   |   0.651487   |   0.537849   |  -4.514320   |-9.943465e+00 |-7.584560e-01 |
|  215  | 5.3750 |  1   |   0.662014   |   0.545498   |  -4.531746   |-9.947549e+00 |-7.581246e-01 |
|  216  | 5.4000 |  1   |   0.650294   |   0.540917   |  -4.526842   |-9.951634e+00 |-7.578047e-01 |
|  217  | 5.4250 |  1   |   0.653085   |   0.536544   |  -4.480060   |-9.955710e+00 |-7.574922e-01 |
|  218  | 5.4500 |  1   |   0.661230   |   0.548448   |  -4.442806   |-9.959772e+00 |-7.571838e-01 |
|  219  | 5.4750 |  1   |   0.655229   |   0.543616   |  -4.442100   |-9.963823e+00 |-7.568782e-01 |
|  220  | 5.5000 |  1   |   0.655222   |   0.546932   |  -4.480309   |-9.967864e+00 |-7.565737e-01 |
|  221  | 5.5250 |  1   |   0.650105   |   0.542159   |  -4.527770   |-9.971886e+00 |-7.562652e-01 |
|  222  | 5.5500 |  1   |   0.651475   |   0.537507   |  -4.542362   |-9.975885e+00 |-7.559507e-01 |
|  223  | 5.5750 |  1   |   0.659401   |   0.547510   |  -4.506293   |-9.979850e+00 |-7.556271e-01 |
|  224  | 5.6000 |  1   |   0.601784   |   0.569276   |  -4.504088   |-9.983780e+00 |-7.552935e-01 |
|  225  | 5.6250 |  1   |   0.623897   |   0.557574   |  -4.512552   |-9.987687e+00 |-7.549518e-01 |
|  226  | 5.6500 |  1   |   0.600244   |   0.569273   |  -4.550006   |-9.991573e+00 |-7.546024e-01 |
|  227  | 5.6750 |  1   |   0.624355   |   0.556274   |  -4.608499   |-9.995440e+00 |-7.542473e-01 |
|  228  | 5.7000 |  1   |   0.660840   |   0.555257   |  -4.628774   |-9.999287e+00 |-7.538857e-01 |
|  229  | 5.7250 |  1   |   0.648993   |   0.540272   |  -4.638629   |-1.000311e+01 |-7.535194e-01 |
|  230  | 5.7500 |  1   |   0.649691   |   0.542594   |  -4.620373   |-1.000691e+01 |-7.531502e-01 |
|  231  | 5.7750 |  1   |   0.654206   |   0.542916   |  -4.623969   |-1.001071e+01 |-7.527814e-01 |
|  232  | 5.8000 |  1   |   0.651407   |   0.541567   |  -4.658962   |-1.001450e+01 |-7.524169e-01 |
|  233  | 5.8250 |  1   |   0.634053   |   0.546768   |  -4.709952   |-1.001828e+01 |-7.520571e-01 |
|  234  | 5.8500 |  1   |   0.649142   |   0.540074   |  -4.711982   |-1.002206e+01 |-7.517035e-01 |
|  235  | 5.8750 |  1   |   0.651331   |   0.541255   |  -4.674097   |-1.002584e+01 |-7.513553e-01 |
|  236  | 5.9000 |  1   |   0.650602   |   0.540557   |  -4.609681   |-1.002960e+01 |-7.510131e-01 |
|  237  | 5.9250 |  1   |   0.625181   |   0.556794   |  -4.572926   |-1.003336e+01 |-7.506790e-01 |
|  238  | 5.9500 |  1   |   0.598372   |   0.577537   |  -4.593342   |-1.003712e+01 |-7.503529e-01 |
|  239  | 5.9750 |  1   |   0.597025   |   0.572500   |  -4.606399   |-1.004088e+01 |-7.500343e-01 |
|  240  | 6.0000 |  1   |   0.597859   |   0.576480   |  -4.633256   |-1.004462e+01 |-7.497216e-01 |
|  241  | 6.0250 |  1   |   0.598875   |   0.573635   |  -4.596024   |-1.004836e+01 |-7.494121e-01 |
|  242  | 6.0500 |  1   |   0.597534   |   0.573711   |  -4.557101   |-1.005207e+01 |-7.491049e-01 |
|  243  | 6.0750 |  1   |   0.615834   |   0.560475   |  -4.544709   |-1.005577e+01 |-7.487993e-01 |
|  244  | 6.1000 |  1   |   0.645833   |   0.545940   |  -4.560556   |-1.005945e+01 |-7.484956e-01 |
|  245  | 6.1250 |  1   |   0.641262   |   0.550605   |  -4.599376   |-1.006312e+01 |-7.481921e-01 |
|  246  | 6.1500 |  1   |   0.650546   |   0.543172   |  -4.621850   |-1.006677e+01 |-7.478876e-01 |
|  247  | 6.1750 |  1   |   0.650686   |   0.547601   |  -4.613310   |-1.007040e+01 |-7.475803e-01 |
|  248  | 6.2000 |  1   |   0.643572   |   0.551210   |  -4.588594   |-1.007400e+01 |-7.472693e-01 |
|  249  | 6.2250 |  1   |   0.643333   |   0.539960   |  -4.585553   |-1.007758e+01 |-7.469564e-01 |
|  250  | 6.2500 |  1   |   0.631976   |   0.548090   |  -4.600869   |-1.008114e+01 |-7.466414e-01 |
|  251  | 6.2750 |  1   |   0.647855   |   0.541747   |  -4.650767   |-1.008469e+01 |-7.463261e-01 |
|  252  | 6.3000 |  1   |   0.649241   |   0.544522   |  -4.672520   |-1.008821e+01 |-7.460094e-01 |
|  253  | 6.3250 |  1   |   0.643516   |   0.545110   |  -4.673014   |-1.009172e+01 |-7.456916e-01 |
|  254  | 6.3500 |  1   |   0.638767   |   0.540989   |  -4.653989   |-1.009520e+01 |-7.453734e-01 |
|  255  | 6.3750 |  1   |   0.631475   |   0.546431   |  -4.631053   |-1.009867e+01 |-7.450557e-01 |
|  256  | 6.4000 |  1   |   0.644038   |   0.541411   |  -4.653231   |-1.010213e+01 |-7.447412e-01 |
|  257  | 6.4250 |  1   |   0.645015   |   0.541870   |  -4.678113   |-1.010557e+01 |-7.444295e-01 |
|  258  | 6.4500 |  1   |   0.646439   |   0.544957   |  -4.706046   |-1.010900e+01 |-7.441219e-01 |
|  259  | 6.4750 |  1   |   0.636618   |   0.544506   |  -4.688480   |-1.011242e+01 |-7.438168e-01 |
|  260  | 6.5000 |  1   |   0.636472   |   0.544515   |  -4.660864   |-1.011582e+01 |-7.435149e-01 |
|  261  | 6.5250 |  1   |   0.642801   |   0.547305   |  -4.622978   |-1.011920e+01 |-7.432168e-01 |
|  262  | 6.5500 |  1   |   0.642521   |   0.549237   |  -4.634656   |-1.012258e+01 |-7.429228e-01 |
|  263  | 6.5750 |  1   |   0.640326   |   0.546690   |  -4.652540   |-1.012594e+01 |-7.426333e-01 |
|  264  | 6.6000 |  1   |   0.646080   |   0.569616   |  -4.675082   |-1.012928e+01 |-7.423474e-01 |
|  265  | 6.6250 |  1   |   0.637068   |   0.545332   |  -4.671475   |-1.013261e+01 |-7.420636e-01 |
|  266  | 6.6500 |  1   |   0.641454   |   0.542948   |  -4.635937   |-1.013592e+01 |-7.417815e-01 |
|  267  | 6.6750 |  1   |   0.648429   |   0.563219   |  -4.626090   |-1.013921e+01 |-7.415010e-01 |
|  268  | 6.7000 |  1   |   0.638889   |   0.546413   |  -4.619397   |-1.014248e+01 |-7.412219e-01 |
|  269  | 6.7250 |  1   |   0.645476   |   0.551120   |  -4.654354   |-1.014573e+01 |-7.409449e-01 |
|  270  | 6.7500 |  1   |   0.644807   |   0.553462   |  -4.677256   |-1.014897e+01 |-7.406684e-01 |
|  271  | 6.7750 |  1   |   0.643342   |   0.545453   |  -4.677941   |-1.015219e+01 |-7.403922e-01 |
|  272  | 6.8000 |  1   |   0.642737   |   0.554577   |  -4.663328   |-1.015538e+01 |-7.401152e-01 |
|  273  | 6.8250 |  1   |   0.636924   |   0.547193   |  -4.647117   |-1.015854e+01 |-7.398382e-01 |
|  274  | 6.8500 |  1   |   0.636881   |   0.549125   |  -4.652275   |-1.016169e+01 |-7.395617e-01 |
|  275  | 6.8750 |  1   |   0.642097   |   0.546781   |  -4.679255   |-1.016482e+01 |-7.392860e-01 |
|  276  | 6.9000 |  1   |   0.644362   |   0.546495   |  -4.710093   |-1.016793e+01 |-7.390117e-01 |
|  277  | 6.9250 |  1   |   0.636971   |   0.552398   |  -4.709777   |-1.017103e+01 |-7.387375e-01 |
|  278  | 6.9500 |  1   |   0.642068   |   0.550708   |  -4.702989   |-1.017410e+01 |-7.384642e-01 |
|  279  | 6.9750 |  1   |   0.636245   |   0.548906   |  -4.675771   |-1.017714e+01 |-7.381918e-01 |
|  280  | 7.0000 |  1   |   0.631892   |   0.553548   |  -4.683037   |-1.018018e+01 |-7.379216e-01 |
|  281  | 7.0250 |  1   |   0.636876   |   0.548173   |  -4.700304   |-1.018319e+01 |-7.376540e-01 |
|  282  | 7.0500 |  1   |   0.641117   |   0.548960   |  -4.723800   |-1.018619e+01 |-7.373891e-01 |
|  283  | 7.0750 |  1   |   0.639323   |   0.547961   |  -4.733571   |-1.018917e+01 |-7.371265e-01 |
|  284  | 7.1000 |  1   |   0.636166   |   0.555813   |  -4.706688   |-1.019212e+01 |-7.368659e-01 |
|  285  | 7.1250 |  1   |   0.634238   |   0.555710   |  -4.691827   |-1.019506e+01 |-7.366075e-01 |
|  286  | 7.1500 |  1   |   0.635902   |   0.551450   |  -4.681559   |-1.019798e+01 |-7.363519e-01 |
|  287  | 7.1750 |  1   |   0.637927   |   0.565596   |  -4.702253   |-1.020088e+01 |-7.360992e-01 |
|  288  | 7.2000 |  1   |   0.636154   |   0.548763   |  -4.718294   |-1.020377e+01 |-7.358495e-01 |
|  289  | 7.2250 |  1   |   0.635841   |   0.549645   |  -4.734186   |-1.020663e+01 |-7.356017e-01 |
|  290  | 7.2500 |  1   |   0.633560   |   0.553457   |  -4.709277   |-1.020948e+01 |-7.353555e-01 |
|  291  | 7.2750 |  1   |   0.633063   |   0.551744   |  -4.697645   |-1.021230e+01 |-7.351108e-01 |
|  292  | 7.3000 |  1   |   0.596012   |   0.573846   |  -4.690652   |-1.021510e+01 |-7.348676e-01 |
|  293  | 7.3250 |  1   |   0.628225   |   0.550297   |  -4.705748   |-1.021788e+01 |-7.346267e-01 |
|  294  | 7.3500 |  1   |   0.635229   |   0.558756   |  -4.733700   |-1.022064e+01 |-7.343873e-01 |
|  295  | 7.3750 |  1   |   0.633064   |   0.553635   |  -4.738990   |-1.022338e+01 |-7.341492e-01 |
|  296  | 7.4000 |  1   |   0.636859   |   0.550407   |  -4.735953   |-1.022610e+01 |-7.339119e-01 |
|  297  | 7.4250 |  1   |   0.623950   |   0.565263   |  -4.716011   |-1.022879e+01 |-7.336753e-01 |
|  298  | 7.4500 |  1   |   0.642621   |   0.555373   |  -4.714487   |-1.023146e+01 |-7.334401e-01 |
|  299  | 7.4750 |  1   |   0.631974   |   0.548812   |  -4.730516   |-1.023411e+01 |-7.332063e-01 |
|  300  | 7.5000 |  1   |   0.635308   |   0.557555   |  -4.753499   |-1.023674e+01 |-7.329746e-01 |
|  301  | 7.5250 |  1   |   0.629950   |   0.550125   |  -4.765495   |-1.023935e+01 |-7.327439e-01 |
|  302  | 7.5500 |  1   |   0.615770   |   0.560338   |  -4.762381   |-1.024194e+01 |-7.325148e-01 |
|  303  | 7.5750 |  1   |   0.584256   |   0.590264   |  -4.742845   |-1.024450e+01 |-7.322869e-01 |
|  304  | 7.6000 |  1   |   0.582597   |   0.587076   |  -4.737265   |-1.024704e+01 |-7.320607e-01 |
|  305  | 7.6250 |  1   |   0.584283   |   0.579482   |  -4.752925   |-1.024956e+01 |-7.318370e-01 |
|  306  | 7.6500 |  1   |   0.586216   |   0.584941   |  -4.767222   |-1.025207e+01 |-7.316154e-01 |
|  307  | 7.6750 |  1   |   0.585430   |   0.579851   |  -4.787773   |-1.025455e+01 |-7.313962e-01 |
|  308  | 7.7000 |  1   |   0.631306   |   0.551397   |  -4.774572   |-1.025701e+01 |-7.311787e-01 |
|  309  | 7.7250 |  1   |   0.634317   |   0.553543   |  -4.762915   |-1.025944e+01 |-7.309630e-01 |
|  310  | 7.7500 |  1   |   0.636891   |   0.556693   |  -4.750823   |-1.026186e+01 |-7.307494e-01 |
|  311  | 7.7750 |  1   |   0.639769   |   0.563616   |  -4.761181   |-1.026425e+01 |-7.305383e-01 |
|  312  | 7.8000 |  1   |   0.631767   |   0.554912   |  -4.781589   |-1.026663e+01 |-7.303294e-01 |
|  313  | 7.8250 |  1   |   0.634194   |   0.558768   |  -4.793059   |-1.026898e+01 |-7.301229e-01 |
|  314  | 7.8500 |  1   |   0.626796   |   0.556363   |  -4.791256   |-1.027131e+01 |-7.299178e-01 |
|  315  | 7.8750 |  1   |   0.625787   |   0.550935   |  -4.775101   |-1.027361e+01 |-7.297145e-01 |
|  316  | 7.9000 |  1   |   0.631936   |   0.553434   |  -4.770127   |-1.027590e+01 |-7.295127e-01 |
|  317  | 7.9250 |  1   |   0.632807   |   0.554769   |  -4.771512   |-1.027816e+01 |-7.293129e-01 |
|  318  | 7.9500 |  1   |   0.636354   |   0.555106   |  -4.801316   |-1.028040e+01 |-7.291153e-01 |
|  319  | 7.9750 |  1   |   0.651982   |   0.601691   |  -4.806386   |-1.028262e+01 |-7.289192e-01 |
|  320  | 8.0000 |  1   |   0.642667   |   0.630753   |  -4.813430   |-1.028481e+01 |-7.287248e-01 |
|  321  | 8.0250 |  1   |   0.638641   |   0.626061   |  -4.798908   |-1.028698e+01 |-7.285314e-01 |
|  322  | 8.0500 |  1   |   0.627977   |   0.630209   |  -4.790992   |-1.028913e+01 |-7.283397e-01 |
|  323  | 8.0750 |  1   |   0.615535   |   0.632846   |  -4.799474   |-1.029125e+01 |-7.281498e-01 |
|  324  | 8.1000 |  1   |   0.628741   |   0.623770   |  -4.816641   |-1.029336e+01 |-7.279618e-01 |
|  325  | 8.1250 |  1   |   0.646119   |   0.631292   |  -4.835626   |-1.029544e+01 |-7.277758e-01 |
|  326  | 8.1500 |  1   |   0.635751   |   0.604086   |  -4.834189   |-1.029750e+01 |-7.275912e-01 |
|  327  | 8.1750 |  1   |   0.635591   |   0.596375   |  -4.826611   |-1.029953e+01 |-7.274083e-01 |
|  328  | 8.2000 |  1   |   0.654686   |   0.625780   |  -4.815149   |-1.030154e+01 |-7.272270e-01 |
|  329  | 8.2250 |  1   |   0.631972   |   0.593750   |  -4.822991   |-1.030353e+01 |-7.270479e-01 |
|  330  | 8.2500 |  1   |   0.627881   |   0.594475   |  -4.835602   |-1.030549e+01 |-7.268709e-01 |
|  331  | 8.2750 |  1   |   0.632779   |   0.588022   |  -4.856780   |-1.030744e+01 |-7.266960e-01 |
|  332  | 8.3000 |  1   |   0.623576   |   0.572123   |  -4.856935   |-1.030936e+01 |-7.265231e-01 |
|  333  | 8.3250 |  1   |   0.616926   |   0.572569   |  -4.844436   |-1.031125e+01 |-7.263517e-01 |
|  334  | 8.3500 |  1   |   0.656718   |   0.615642   |  -4.841857   |-1.031313e+01 |-7.261824e-01 |
|  335  | 8.3750 |  1   |   0.647848   |   0.593447   |  -4.836181   |-1.031498e+01 |-7.260150e-01 |
|  336  | 8.4000 |  1   |   0.620897   |   0.556400   |  -4.858940   |-1.031681e+01 |-7.258500e-01 |
|  337  | 8.4250 |  1   |   0.636878   |   0.568918   |  -4.870038   |-1.031861e+01 |-7.256870e-01 |
|  338  | 8.4500 |  1   |   0.624409   |   0.560472   |  -4.878751   |-1.032040e+01 |-7.255258e-01 |
|  339  | 8.4750 |  1   |   0.626291   |   0.560779   |  -4.866752   |-1.032216e+01 |-7.253663e-01 |
|  340  | 8.5000 |  1   |   0.624523   |   0.557208   |  -4.860873   |-1.032389e+01 |-7.252085e-01 |
|  341  | 8.5250 |  1   |   0.621932   |   0.557273   |  -4.861571   |-1.032560e+01 |-7.250526e-01 |
|  342  | 8.5500 |  1   |   0.620140   |   0.558312   |  -4.876236   |-1.032729e+01 |-7.248988e-01 |
|  343  | 8.5750 |  1   |   0.618488   |   0.558703   |  -4.894443   |-1.032896e+01 |-7.247469e-01 |
|  344  | 8.6000 |  1   |   0.614675   |   0.555611   |  -4.898885   |-1.033060e+01 |-7.245967e-01 |
|  345  | 8.6250 |  1   |   0.608933   |   0.564743   |  -4.897533   |-1.033222e+01 |-7.244482e-01 |
|  346  | 8.6500 |  1   |   0.577061   |   0.585133   |  -4.881841   |-1.033381e+01 |-7.243012e-01 |
|  347  | 8.6750 |  1   |   0.608953   |   0.587979   |  -4.892088   |-1.033539e+01 |-7.241562e-01 |
|  348  | 8.7000 |  1   |   0.624541   |   0.558283   |  -4.899079   |-1.033693e+01 |-7.240130e-01 |
|  349  | 8.7250 |  1   |   0.625952   |   0.557111   |  -4.918737   |-1.033846e+01 |-7.238720e-01 |
|  350  | 8.7500 |  1   |   0.623287   |   0.557909   |  -4.928123   |-1.033996e+01 |-7.237327e-01 |
|  351  | 8.7750 |  1   |   0.622417   |   0.555740   |  -4.921486   |-1.034144e+01 |-7.235950e-01 |
|  352  | 8.8000 |  1   |   0.621352   |   0.554043   |  -4.914257   |-1.034289e+01 |-7.234592e-01 |
|  353  | 8.8250 |  1   |   0.625442   |   0.559248   |  -4.914487   |-1.034432e+01 |-7.233251e-01 |
|  354  | 8.8500 |  1   |   0.621001   |   0.554895   |  -4.927093   |-1.034573e+01 |-7.231933e-01 |
|  355  | 8.8750 |  1   |   0.616331   |   0.556795   |  -4.942194   |-1.034711e+01 |-7.230634e-01 |
|  356  | 8.9000 |  1   |   0.620400   |   0.561975   |  -4.953444   |-1.034848e+01 |-7.229356e-01 |
|  357  | 8.9250 |  1   |   0.617789   |   0.557966   |  -4.948106   |-1.034981e+01 |-7.228093e-01 |
|  358  | 8.9500 |  1   |   0.617529   |   0.559993   |  -4.942308   |-1.035113e+01 |-7.226850e-01 |
|  359  | 8.9750 |  1   |   0.618381   |   0.557392   |  -4.938375   |-1.035241e+01 |-7.225625e-01 |
|  360  | 9.0000 |  1   |   0.615879   |   0.559019   |  -4.952078   |-1.035368e+01 |-7.224422e-01 |
|  361  | 9.0250 |  1   |   0.619261   |   0.558077   |  -4.968153   |-1.035492e+01 |-7.223238e-01 |
|  362  | 9.0500 |  1   |   0.620542   |   0.558342   |  -4.974721   |-1.035614e+01 |-7.222074e-01 |
|  363  | 9.0750 |  1   |   0.620811   |   0.562190   |  -4.979177   |-1.035734e+01 |-7.220928e-01 |
|  364  | 9.1000 |  1   |   0.621215   |   0.561517   |  -4.966813   |-1.035851e+01 |-7.219798e-01 |
|  365  | 9.1250 |  1   |   0.619293   |   0.556963   |  -4.968124   |-1.035966e+01 |-7.218687e-01 |
|  366  | 9.1500 |  1   |   0.617414   |   0.560206   |  -4.976628   |-1.036079e+01 |-7.217596e-01 |
|  367  | 9.1750 |  1   |   0.617224   |   0.560026   |  -4.995733   |-1.036189e+01 |-7.216525e-01 |
|  368  | 9.2000 |  1   |   0.594361   |   0.572718   |  -5.002079   |-1.036297e+01 |-7.215472e-01 |
|  369  | 9.2250 |  1   |   0.591752   |   0.620408   |  -5.007823   |-1.036402e+01 |-7.214437e-01 |
|  370  | 9.2500 |  1   |   0.573933   |   0.595363   |  -4.998087   |-1.036505e+01 |-7.213418e-01 |
|  371  | 9.2750 |  1   |   0.574780   |   0.599225   |  -4.997593   |-1.036606e+01 |-7.212418e-01 |
|  372  | 9.3000 |  1   |   0.573589   |   0.590403   |  -5.006758   |-1.036704e+01 |-7.211437e-01 |
|  373  | 9.3250 |  1   |   0.609827   |   0.562178   |  -5.021476   |-1.036800e+01 |-7.210476e-01 |
|  374  | 9.3500 |  1   |   0.614184   |   0.559384   |  -5.036294   |-1.036894e+01 |-7.209533e-01 |
|  375  | 9.3750 |  1   |   0.613003   |   0.559421   |  -5.033179   |-1.036985e+01 |-7.208608e-01 |
|  376  | 9.4000 |  1   |   0.615698   |   0.562315   |  -5.033218   |-1.037074e+01 |-7.207701e-01 |
|  377  | 9.4250 |  1   |   0.614765   |   0.561798   |  -5.027569   |-1.037161e+01 |-7.206811e-01 |
|  378  | 9.4500 |  1   |   0.617829   |   0.560943   |  -5.035541   |-1.037245e+01 |-7.205942e-01 |
|  379  | 9.4750 |  1   |   0.618720   |   0.564336   |  -5.051179   |-1.037327e+01 |-7.205092e-01 |
|  380  | 9.5000 |  1   |   0.612249   |   0.559879   |  -5.064730   |-1.037407e+01 |-7.204262e-01 |
|  381  | 9.5250 |  1   |   0.616751   |   0.558819   |  -5.064004   |-1.037484e+01 |-7.203449e-01 |
|  382  | 9.5500 |  1   |   0.609852   |   0.562424   |  -5.062977   |-1.037559e+01 |-7.202654e-01 |
|  383  | 9.5750 |  1   |   0.610932   |   0.561283   |  -5.059836   |-1.037632e+01 |-7.201877e-01 |
|  384  | 9.6000 |  1   |   0.609683   |   0.559666   |  -5.063394   |-1.037702e+01 |-7.201119e-01 |
|  385  | 9.6250 |  1   |   0.614492   |   0.563530   |  -5.081452   |-1.037770e+01 |-7.200382e-01 |
|  386  | 9.6500 |  1   |   0.606921   |   0.560035   |  -5.090793   |-1.037835e+01 |-7.199663e-01 |
|  387  | 9.6750 |  1   |   0.614644   |   0.567031   |  -5.097605   |-1.037899e+01 |-7.198962e-01 |
|  388  | 9.7000 |  1   |   0.584276   |   0.590999   |  -5.091026   |-1.037960e+01 |-7.198278e-01 |
|  389  | 9.7250 |  1   |   0.567643   |   0.593811   |  -5.091591   |-1.038018e+01 |-7.197613e-01 |
|  390  | 9.7500 |  1   |   0.567374   |   0.596893   |  -5.095862   |-1.038075e+01 |-7.196965e-01 |
|  391  | 9.7750 |  1   |   0.572616   |   0.596802   |  -5.106980   |-1.038129e+01 |-7.196338e-01 |
|  392  | 9.8000 |  1   |   0.570078   |   0.591577   |  -5.123029   |-1.038181e+01 |-7.195729e-01 |
|  393  | 9.8250 |  1   |   0.568206   |   0.592200   |  -5.126210   |-1.038230e+01 |-7.195138e-01 |
|  394  | 9.8500 |  1   |   0.571314   |   0.611958   |  -5.123923   |-1.038277e+01 |-7.194564e-01 |
|  395  | 9.8750 |  1   |   0.567253   |   0.597897   |  -5.121337   |-1.038322e+01 |-7.194006e-01 |
|  396  | 9.9000 |  1   |   0.568210   |   0.593683   |  -5.128361   |-1.038365e+01 |-7.193469e-01 |
|  397  | 9.9250 |  1   |   0.565010   |   0.597851   |  -5.135472   |-1.038405e+01 |-7.192949e-01 |
|  398  | 9.9500 |  1   |   0.607473   |   0.563262   |  -5.151271   |-1.038443e+01 |-7.192449e-01 |
|  399  | 9.9750 |  1   |   0.611926   |   0.565768   |  -5.156484   |-1.038479e+01 |-7.191966e-01 |
|  400  |10.0000 |  1   |   0.609614   |   0.566774   |  -5.154040   |-1.038512e+01 |-7.191501e-01 |
|  401  |10.0250 |  1   |   0.609190   |   0.563351   |  -5.151962   |-1.038543e+01 |-7.191053e-01 |
|  402  |10.0500 |  1   |   0.609842   |   0.560413   |  -5.156639   |-1.038572e+01 |-7.190623e-01 |
|  403  |10.0750 |  1   |   0.608545   |   0.562862   |  -5.165364   |-1.038599e+01 |-7.190212e-01 |
|  404  |10.1000 |  1   |   0.609280   |   0.574591   |  -5.175709   |-1.038623e+01 |-7.189820e-01 |
|  405  |10.1250 |  1   |   0.606715   |   0.563175   |  -5.184143   |-1.038645e+01 |-7.189446e-01 |
|  406  |10.1500 |  1   |   0.604479   |   0.564748   |  -5.181991   |-1.038665e+01 |-7.189088e-01 |
|  407  |10.1750 |  1   |   0.606050   |   0.565112   |  -5.179552   |-1.038683e+01 |-7.188749e-01 |
|  408  |10.2000 |  1   |   0.607161   |   0.564970   |  -5.182516   |-1.038698e+01 |-7.188427e-01 |
|  409  |10.2250 |  1   |   0.611589   |   0.565026   |  -5.191318   |-1.038711e+01 |-7.188124e-01 |
|  410  |10.2500 |  1   |   0.609824   |   0.564363   |  -5.199527   |-1.038722e+01 |-7.187839e-01 |
|  411  |10.2750 |  1   |   0.608612   |   0.565428   |  -5.204957   |-1.038731e+01 |-7.187572e-01 |
|  412  |10.3000 |  1   |   0.607257   |   0.561791   |  -5.208673   |-1.038738e+01 |-7.187322e-01 |
|  413  |10.3250 |  1   |   0.609691   |   0.568279   |  -5.201979   |-1.038742e+01 |-7.187089e-01 |
|  414  |10.3500 |  1   |   0.601743   |   0.568179   |  -5.206076   |-1.038744e+01 |-7.186873e-01 |
|  415  |10.3750 |  1   |   0.601717   |   0.567023   |  -5.212946   |-1.038744e+01 |-7.186677e-01 |
|  416  |10.4000 |  1   |   0.559912   |   0.595790   |  -5.218419   |-1.038742e+01 |-7.186497e-01 |
|  417  |10.4250 |  1   |   0.564230   |   0.598142   |  -5.224424   |-1.038737e+01 |-7.186336e-01 |
|  418  |10.4500 |  1   |   0.583181   |   0.581345   |  -5.225489   |-1.038730e+01 |-7.186191e-01 |
|  419  |10.4750 |  1   |   0.602301   |   0.565017   |  -5.224159   |-1.038721e+01 |-7.186063e-01 |
|  420  |10.5000 |  1   |   0.603593   |   0.566494   |  -5.222729   |-1.038710e+01 |-7.185953e-01 |
|  421  |10.5250 |  1   |   0.601339   |   0.567735   |  -5.228588   |-1.038697e+01 |-7.185860e-01 |
|  422  |10.5500 |  1   |   0.600440   |   0.570387   |  -5.234701   |-1.038682e+01 |-7.185785e-01 |
|  423  |10.5750 |  1   |   0.578888   |   0.583202   |  -5.234590   |-1.038664e+01 |-7.185728e-01 |
|  424  |10.6000 |  1   |   0.604815   |   0.565890   |  -5.239249   |-1.038645e+01 |-7.185687e-01 |
|  425  |10.6250 |  1   |   0.604126   |   0.569152   |  -5.236159   |-1.038623e+01 |-7.185663e-01 |
|  426  |10.6500 |  1   |   0.603547   |   0.566174   |  -5.235546   |-1.038599e+01 |-7.185655e-01 |
|  427  |10.6750 |  1   |   0.602865   |   0.569464   |  -5.237490   |-1.038573e+01 |-7.185666e-01 |
|  428  |10.7000 |  1   |   0.600635   |   0.568652   |  -5.241270   |-1.038545e+01 |-7.185694e-01 |
|  429  |10.7250 |  1   |   0.605226   |   0.574795   |  -5.242437   |-1.038514e+01 |-7.185739e-01 |
|  430  |10.7500 |  1   |   0.600788   |   0.571143   |  -5.241394   |-1.038482e+01 |-7.185801e-01 |
|  431  |10.7750 |  1   |   0.577222   |   0.591226   |  -5.242569   |-1.038448e+01 |-7.185880e-01 |
|  432  |10.8000 |  1   |   0.560620   |   0.597055   |  -5.240958   |-1.038411e+01 |-7.185975e-01 |
|  433  |10.8250 |  1   |   0.556709   |   0.596082   |  -5.238278   |-1.038372e+01 |-7.186087e-01 |
|  434  |10.8500 |  1   |   0.556684   |   0.597562   |  -5.242316   |-1.038332e+01 |-7.186217e-01 |
|  435  |10.8750 |  1   |   0.559204   |   0.599864   |  -5.240932   |-1.038289e+01 |-7.186363e-01 |
|  436  |10.9000 |  1   |   0.554305   |   0.620321   |  -5.238040   |-1.038244e+01 |-7.186526e-01 |
|  437  |10.9250 |  1   |   0.577513   |   0.588008   |  -5.241438   |-1.038197e+01 |-7.186705e-01 |
|  438  |10.9500 |  1   |   0.599971   |   0.568971   |  -5.235789   |-1.038148e+01 |-7.186901e-01 |
|  439  |10.9750 |  1   |   0.599382   |   0.571610   |  -5.237054   |-1.038097e+01 |-7.187113e-01 |
|  440  |11.0000 |  1   |   0.597518   |   0.569614   |  -5.232763   |-1.038044e+01 |-7.187342e-01 |
|  441  |11.0250 |  1   |   0.603696   |   0.575074   |  -5.233276   |-1.037989e+01 |-7.187588e-01 |
|  442  |11.0500 |  1   |   0.583094   |   0.697022   |  -5.231065   |-1.037932e+01 |-7.187850e-01 |
|  443  |11.0750 |  1   |   0.619875   |   0.676204   |  -5.227894   |-1.037873e+01 |-7.188128e-01 |
|  444  |11.1000 |  1   |   0.598458   |   0.604789   |  -5.230200   |-1.037812e+01 |-7.188422e-01 |
|  445  |11.1250 |  1   |   0.604274   |   0.596907   |  -5.223329   |-1.037749e+01 |-7.188732e-01 |
|  446  |11.1500 |  1   |   0.573906   |   0.610394   |  -5.222229   |-1.037684e+01 |-7.189059e-01 |
|  447  |11.1750 |  1   |   0.561556   |   0.624831   |  -5.217935   |-1.037617e+01 |-7.189403e-01 |
|  448  |11.2000 |  1   |   0.569148   |   0.626453   |  -5.216896   |-1.037548e+01 |-7.189761e-01 |
|  449  |11.2250 |  1   |   0.564965   |   0.673984   |  -5.213489   |-1.037477e+01 |-7.190136e-01 |
|  450  |11.2500 |  1   |   0.561458   |   0.614712   |  -5.212846   |-1.037404e+01 |-7.190527e-01 |
|  451  |11.2750 |  1   |   0.573335   |   0.635211   |  -5.209958   |-1.037329e+01 |-7.190933e-01 |
|  452  |11.3000 |  1   |   0.601036   |   0.589727   |  -5.203174   |-1.037253e+01 |-7.191356e-01 |
|  453  |11.3250 |  1   |   0.588650   |   0.649352   |  -5.201050   |-1.037174e+01 |-7.191795e-01 |
|  454  |11.3500 |  1   |   0.581506   |   0.609257   |  -5.196793   |-1.037094e+01 |-7.192250e-01 |
|  455  |11.3750 |  1   |   0.589146   |   0.602935   |  -5.195584   |-1.037011e+01 |-7.192719e-01 |
|  456  |11.4000 |  1   |   0.604540   |   0.602902   |  -5.192228   |-1.036927e+01 |-7.193204e-01 |
|  457  |11.4250 |  1   |   0.600579   |   0.594754   |  -5.191012   |-1.036841e+01 |-7.193705e-01 |
|  458  |11.4500 |  1   |   0.594932   |   0.585988   |  -5.182644   |-1.036753e+01 |-7.194222e-01 |
|  459  |11.4750 |  1   |   0.594136   |   0.587465   |  -5.180474   |-1.036663e+01 |-7.194754e-01 |
|  460  |11.5000 |  1   |   0.615072   |   0.617353   |  -5.174101   |-1.036571e+01 |-7.195302e-01 |
|  461  |11.5250 |  1   |   0.580867   |   0.632210   |  -5.174853   |-1.036478e+01 |-7.195865e-01 |
|  462  |11.5500 |  1   |   0.594978   |   0.646045   |  -5.170050   |-1.036382e+01 |-7.196442e-01 |
|  463  |11.5750 |  1   |   0.578537   |   0.617545   |  -5.167418   |-1.036285e+01 |-7.197035e-01 |
|  464  |11.6000 |  1   |   0.591423   |   0.656918   |  -5.163354   |-1.036186e+01 |-7.197643e-01 |
|  465  |11.6250 |  1   |   0.596206   |   0.593319   |  -5.154243   |-1.036085e+01 |-7.198267e-01 |
|  466  |11.6500 |  1   |   0.594452   |   0.615504   |  -5.154289   |-1.035983e+01 |-7.198905e-01 |
|  467  |11.6750 |  1   |   0.585962   |   0.589556   |  -5.148727   |-1.035878e+01 |-7.199559e-01 |
|  468  |11.7000 |  1   |   0.590704   |   0.592317   |  -5.148438   |-1.035772e+01 |-7.200226e-01 |
|  469  |11.7250 |  1   |   0.588268   |   0.610512   |  -5.143636   |-1.035664e+01 |-7.200909e-01 |
|  470  |11.7500 |  1   |   0.613000   |   0.604874   |  -5.138982   |-1.035554e+01 |-7.201607e-01 |
|  471  |11.7750 |  1   |   0.597844   |   0.624120   |  -5.133073   |-1.035443e+01 |-7.202319e-01 |
|  472  |11.8000 |  1   |   0.612249   |   0.607180   |  -5.128111   |-1.035330e+01 |-7.203046e-01 |
|  473  |11.8250 |  1   |   0.589453   |   0.613552   |  -5.126736   |-1.035215e+01 |-7.203787e-01 |
|  474  |11.8500 |  1   |   0.593775   |   0.611720   |  -5.123366   |-1.035098e+01 |-7.204543e-01 |
|  475  |11.8750 |  1   |   0.589657   |   0.587944   |  -5.120797   |-1.034980e+01 |-7.205313e-01 |
|  476  |11.9000 |  1   |   0.589097   |   0.606891   |  -5.114568   |-1.034860e+01 |-7.206098e-01 |
|  477  |11.9250 |  1   |   0.587495   |   0.629681   |  -5.110620   |-1.034739e+01 |-7.206897e-01 |
|  478  |11.9500 |  1   |   0.584468   |   0.608920   |  -5.103850   |-1.034615e+01 |-7.207710e-01 |
|  479  |11.9750 |  1   |   0.590653   |   0.613406   |  -5.103272   |-1.034491e+01 |-7.208537e-01 |
|  480  |12.0000 |  1   |   0.622715   |   0.666483   |  -5.099819   |-1.034364e+01 |-7.209378e-01 |
|  481  |12.0250 |  1   |   0.604598   |   0.600735   |  -5.096876   |-1.034236e+01 |-7.210233e-01 |
|  482  |12.0500 |  1   |   0.607466   |   0.600419   |  -5.092345   |-1.034106e+01 |-7.211102e-01 |
|  483  |12.0750 |  1   |   0.611803   |   0.651007   |  -5.086132   |-1.033975e+01 |-7.211985e-01 |
|  484  |12.1000 |  1   |   0.600163   |   0.604296   |  -5.082930   |-1.033842e+01 |-7.212882e-01 |
|  485  |12.1250 |  1   |   0.597081   |   0.608633   |  -5.078037   |-1.033707e+01 |-7.213792e-01 |
|  486  |12.1500 |  1   |   0.599493   |   0.694460   |  -5.078534   |-1.033571e+01 |-7.214716e-01 |
|  487  |12.1750 |  1   |   0.569671   |   0.611804   |  -5.072894   |-1.033433e+01 |-7.215653e-01 |
|  488  |12.2000 |  1   |   0.590231   |   0.592073   |  -5.070548   |-1.033294e+01 |-7.216604e-01 |
|  489  |12.2250 |  1   |   0.586426   |   0.587308   |  -5.063791   |-1.033153e+01 |-7.217569e-01 |
|  490  |12.2500 |  1   |   0.605616   |   0.639888   |  -5.060453   |-1.033011e+01 |-7.218546e-01 |
|  491  |12.2750 |  1   |   0.601391   |   0.589785   |  -5.056911   |-1.032867e+01 |-7.219537e-01 |
|  492  |12.3000 |  1   |   0.583376   |   0.588843   |  -5.054795   |-1.032722e+01 |-7.220541e-01 |
|  493  |12.3250 |  1   |   0.591293   |   0.608539   |  -5.052808   |-1.032575e+01 |-7.221558e-01 |
|  494  |12.3500 |  1   |   0.568992   |   0.595768   |  -5.047491   |-1.032427e+01 |-7.222588e-01 |
|  495  |12.3750 |  1   |   0.563630   |   0.599818   |  -5.043728   |-1.032277e+01 |-7.223631e-01 |
|  496  |12.4000 |  1   |   0.583918   |   0.582994   |  -5.038711   |-1.032126e+01 |-7.224687e-01 |
|  497  |12.4250 |  1   |   0.587738   |   0.584071   |  -5.036205   |-1.031973e+01 |-7.225755e-01 |
|  498  |12.4500 |  1   |   0.575600   |   0.588839   |  -5.033715   |-1.031819e+01 |-7.226837e-01 |
|  499  |12.4750 |  1   |   0.586772   |   0.589606   |  -5.031815   |-1.031664e+01 |-7.227930e-01 |
|  500  |12.5000 |  1   |   0.577898   |   0.602334   |  -5.027416   |-1.031507e+01 |-7.229037e-01 |
|  501  |12.5250 |  1   |   0.585324   |   0.589641   |  -5.023384   |-1.031348e+01 |-7.230155e-01 |
|  502  |12.5500 |  1   |   0.585512   |   0.584594   |  -5.019042   |-1.031189e+01 |-7.231287e-01 |
|  503  |12.5750 |  1   |   0.583865   |   0.582880   |  -5.016063   |-1.031028e+01 |-7.232430e-01 |
|  504  |12.6000 |  1   |   0.588496   |   0.592948   |  -5.014501   |-1.030865e+01 |-7.233586e-01 |
|  505  |12.6250 |  1   |   0.587081   |   0.593772   |  -5.011221   |-1.030702e+01 |-7.234753e-01 |
|  506  |12.6500 |  1   |   0.585744   |   0.587407   |  -5.009390   |-1.030537e+01 |-7.235933e-01 |
|  507  |12.6750 |  1   |   0.584881   |   0.596360   |  -5.003415   |-1.030370e+01 |-7.237125e-01 |
|  508  |12.7000 |  1   |   0.596729   |   0.591525   |  -5.001095   |-1.030203e+01 |-7.238329e-01 |
|  509  |12.7250 |  1   |   0.596917   |   0.597681   |  -4.997208   |-1.030034e+01 |-7.239544e-01 |
|  510  |12.7500 |  1   |   0.591709   |   0.586425   |  -4.995682   |-1.029863e+01 |-7.240771e-01 |
|  511  |12.7750 |  1   |   0.587641   |   0.591100   |  -4.993524   |-1.029692e+01 |-7.242010e-01 |
|  512  |12.8000 |  1   |   0.587204   |   0.586659   |  -4.990360   |-1.029519e+01 |-7.243260e-01 |
|  513  |12.8250 |  1   |   0.591092   |   0.587204   |  -4.986833   |-1.029345e+01 |-7.244521e-01 |
|  514  |12.8500 |  1   |   0.585463   |   0.583301   |  -4.982664   |-1.029170e+01 |-7.245795e-01 |
|  515  |12.8750 |  1   |   0.589045   |   0.586801   |  -4.980566   |-1.028993e+01 |-7.247079e-01 |
|  516  |12.9000 |  1   |   0.596714   |   0.601805   |  -4.977829   |-1.028816e+01 |-7.248374e-01 |
|  517  |12.9250 |  1   |   0.584486   |   0.594004   |  -4.976834   |-1.028637e+01 |-7.249680e-01 |
|  518  |12.9500 |  1   |   0.577005   |   0.592874   |  -4.973053   |-1.028457e+01 |-7.250998e-01 |
|  519  |12.9750 |  1   |   0.576873   |   0.590686   |  -4.970798   |-1.028276e+01 |-7.252326e-01 |
|  520  |13.0000 |  1   |   0.588123   |   0.584250   |  -4.966119   |-1.028094e+01 |-7.253666e-01 |
|  521  |13.0250 |  1   |   0.588080   |   0.592052   |  -4.964473   |-1.027910e+01 |-7.255016e-01 |
|  522  |13.0500 |  1   |   0.586211   |   0.588701   |  -4.961953   |-1.027726e+01 |-7.256376e-01 |
|  523  |13.0750 |  1   |   0.582357   |   0.595669   |  -4.960468   |-1.027540e+01 |-7.257747e-01 |
|  524  |13.1000 |  1   |   0.569600   |   0.594107   |  -4.958069   |-1.027353e+01 |-7.259128e-01 |
|  525  |13.1250 |  1   |   0.575376   |   0.594160   |  -4.954661   |-1.027165e+01 |-7.260521e-01 |
|  526  |13.1500 |  1   |   0.578324   |   0.588696   |  -4.952012   |-1.026976e+01 |-7.261923e-01 |
|  527  |13.1750 |  1   |   0.587095   |   0.592266   |  -4.948571   |-1.026786e+01 |-7.263335e-01 |
|  528  |13.2000 |  1   |   0.569050   |   0.599524   |  -4.947926   |-1.026595e+01 |-7.264758e-01 |
|  529  |13.2250 |  1   |   0.542086   |   0.614471   |  -4.945114   |-1.026403e+01 |-7.266190e-01 |
|  530  |13.2500 |  1   |   0.540521   |   0.611883   |  -4.943929   |-1.026210e+01 |-7.267632e-01 |
|  531  |13.2750 |  1   |   0.543265   |   0.621184   |  -4.940566   |-1.026016e+01 |-7.269084e-01 |
|  532  |13.3000 |  1   |   0.541681   |   0.615142   |  -4.937617   |-1.025821e+01 |-7.270546e-01 |
|  533  |13.3250 |  1   |   0.540352   |   0.616832   |  -4.935709   |-1.025625e+01 |-7.272018e-01 |
|  534  |13.3500 |  1   |   0.544213   |   0.620769   |  -4.933038   |-1.025428e+01 |-7.273499e-01 |
|  535  |13.3750 |  1   |   0.580695   |   0.590777   |  -4.932776   |-1.025230e+01 |-7.274989e-01 |
|  536  |13.4000 |  1   |   0.575465   |   0.596223   |  -4.929595   |-1.025031e+01 |-7.276489e-01 |
|  537  |13.4250 |  1   |   0.542536   |   0.618744   |  -4.928176   |-1.024831e+01 |-7.277998e-01 |
|  538  |13.4500 |  1   |   0.580911   |   0.591514   |  -4.924586   |-1.024631e+01 |-7.279516e-01 |
|  539  |13.4750 |  1   |   0.581108   |   0.591034   |  -4.922988   |-1.024429e+01 |-7.281044e-01 |
|  540  |13.5000 |  1   |   0.545993   |   0.614974   |  -4.920767   |-1.024227e+01 |-7.282580e-01 |
|  541  |13.5250 |  1   |   0.545921   |   0.615012   |  -4.919915   |-1.024023e+01 |-7.284125e-01 |
|  542  |13.5500 |  1   |   0.542495   |   0.613665   |  -4.917870   |-1.023819e+01 |-7.285679e-01 |
|  543  |13.5750 |  1   |   0.536964   |   0.622532   |  -4.915675   |-1.023614e+01 |-7.287241e-01 |
|  544  |13.6000 |  1   |   0.554106   |   0.603419   |  -4.913529   |-1.023408e+01 |-7.288812e-01 |
|  545  |13.6250 |  1   |   0.578840   |   0.604562   |  -4.910680   |-1.023202e+01 |-7.290392e-01 |
|  546  |13.6500 |  1   |   0.585058   |   0.606280   |  -4.910137   |-1.022994e+01 |-7.291979e-01 |
|  547  |13.6750 |  1   |   0.579318   |   0.591994   |  -4.907749   |-1.022786e+01 |-7.293575e-01 |
|  548  |13.7000 |  1   |   0.580380   |   0.589279   |  -4.907371   |-1.022577e+01 |-7.295179e-01 |
|  549  |13.7250 |  1   |   0.584794   |   0.591958   |  -4.904445   |-1.022367e+01 |-7.296792e-01 |
|  550  |13.7500 |  1   |   0.588687   |   0.601052   |  -4.902856   |-1.022157e+01 |-7.298412e-01 |
|  551  |13.7750 |  1   |   0.579102   |   0.595429   |  -4.900526   |-1.021945e+01 |-7.300040e-01 |
|  552  |13.8000 |  1   |   0.579922   |   0.596135   |  -4.899156   |-1.021733e+01 |-7.301676e-01 |
|  553  |13.8250 |  1   |   0.579598   |   0.597193   |  -4.898152   |-1.021521e+01 |-7.303320e-01 |
|  554  |13.8500 |  1   |   0.589419   |   0.608047   |  -4.896538   |-1.021307e+01 |-7.304971e-01 |
|  555  |13.8750 |  1   |   0.584321   |   0.601955   |  -4.895262   |-1.021093e+01 |-7.306629e-01 |
|  556  |13.9000 |  1   |   0.579038   |   0.593430   |  -4.892631   |-1.020879e+01 |-7.308295e-01 |
|  557  |13.9250 |  1   |   0.577858   |   0.591474   |  -4.891491   |-1.020663e+01 |-7.309968e-01 |
|  558  |13.9500 |  1   |   0.578370   |   0.601104   |  -4.889505   |-1.020447e+01 |-7.311649e-01 |
|  559  |13.9750 |  1   |   0.574518   |   0.594961   |  -4.888943   |-1.020231e+01 |-7.313336e-01 |
|  560  |14.0000 |  1   |   0.578717   |   0.588370   |  -4.887586   |-1.020014e+01 |-7.315030e-01 |
|  561  |14.0250 |  1   |   0.569221   |   0.592313   |  -4.886037   |-1.019796e+01 |-7.316731e-01 |
|  562  |14.0500 |  1   |   0.569323   |   0.588773   |  -4.884458   |-1.019577e+01 |-7.318439e-01 |
|  563  |14.0750 |  1   |   0.575350   |   0.590234   |  -4.882463   |-1.019359e+01 |-7.320154e-01 |
|  564  |14.1000 |  1   |   0.565140   |   0.597502   |  -4.881607   |-1.019139e+01 |-7.321875e-01 |
|  565  |14.1250 |  1   |   0.555995   |   0.601872   |  -4.880250   |-1.018919e+01 |-7.323602e-01 |
|  566  |14.1500 |  1   |   0.582065   |   0.599824   |  -4.879771   |-1.018699e+01 |-7.325336e-01 |
|  567  |14.1750 |  1   |   0.573287   |   0.591480   |  -4.877873   |-1.018478e+01 |-7.327076e-01 |
|  568  |14.2000 |  1   |   0.574334   |   0.602253   |  -4.876963   |-1.018256e+01 |-7.328822e-01 |
|  569  |14.2250 |  1   |   0.531243   |   0.628437   |  -4.874752   |-1.018034e+01 |-7.330574e-01 |
|  570  |14.2500 |  1   |   0.530046   |   0.617958   |  -4.874261   |-1.017812e+01 |-7.332332e-01 |
|  571  |14.2750 |  1   |   0.533493   |   0.621578   |  -4.872975   |-1.017589e+01 |-7.334095e-01 |
|  572  |14.3000 |  1   |   0.531280   |   0.620959   |  -4.872344   |-1.017365e+01 |-7.335865e-01 |
|  573  |14.3250 |  1   |   0.533888   |   0.617618   |  -4.871330   |-1.017142e+01 |-7.337640e-01 |
|  574  |14.3500 |  1   |   0.538329   |   0.615710   |  -4.869608   |-1.016917e+01 |-7.339420e-01 |
|  575  |14.3750 |  1   |   0.538880   |   0.617203   |  -4.868750   |-1.016693e+01 |-7.341206e-01 |
|  576  |14.4000 |  1   |   0.538717   |   0.619451   |  -4.867217   |-1.016468e+01 |-7.342997e-01 |
|  577  |14.4250 |  1   |   0.521259   |   0.628772   |  -4.866965   |-1.016243e+01 |-7.344794e-01 |
|  578  |14.4500 |  1   |   0.532905   |   0.622927   |  -4.865877   |-1.016017e+01 |-7.346595e-01 |
|  579  |14.4750 |  1   |   0.533617   |   0.622496   |  -4.865300   |-1.015791e+01 |-7.348401e-01 |
|  580  |14.5000 |  1   |   0.534588   |   0.619178   |  -4.863812   |-1.015565e+01 |-7.350212e-01 |
|  581  |14.5250 |  1   |   0.541063   |   0.619951   |  -4.862879   |-1.015338e+01 |-7.352028e-01 |
|  582  |14.5500 |  1   |   0.552002   |   0.630617   |  -4.861832   |-1.015111e+01 |-7.353848e-01 |
|  583  |14.5750 |  1   |   0.534411   |   0.618651   |  -4.861210   |-1.014884e+01 |-7.355673e-01 |
|  584  |14.6000 |  1   |   0.519947   |   0.634783   |  -4.860831   |-1.014656e+01 |-7.357502e-01 |
|  585  |14.6250 |  1   |   0.532511   |   0.623628   |  -4.859751   |-1.014429e+01 |-7.359336e-01 |
|  586  |14.6500 |  1   |   0.533837   |   0.631545   |  -4.859199   |-1.014201e+01 |-7.361174e-01 |
|  587  |14.6750 |  1   |   0.531337   |   0.621002   |  -4.857699   |-1.013972e+01 |-7.363016e-01 |
|  588  |14.7000 |  1   |   0.533695   |   0.628152   |  -4.857362   |-1.013744e+01 |-7.364862e-01 |
|  589  |14.7250 |  1   |   0.537053   |   0.620282   |  -4.856500   |-1.013515e+01 |-7.366711e-01 |
|  590  |14.7500 |  1   |   0.530726   |   0.624015   |  -4.856289   |-1.013286e+01 |-7.368564e-01 |
|  591  |14.7750 |  1   |   0.536236   |   0.627392   |  -4.855632   |-1.013057e+01 |-7.370421e-01 |
|  592  |14.8000 |  1   |   0.543870   |   0.627993   |  -4.854757   |-1.012828e+01 |-7.372282e-01 |
|  593  |14.8250 |  1   |   0.526978   |   0.622442   |  -4.854112   |-1.012599e+01 |-7.374146e-01 |
|  594  |14.8500 |  1   |   0.533051   |   0.620095   |  -4.853078   |-1.012369e+01 |-7.376013e-01 |
|  595  |14.8750 |  1   |   0.537832   |   0.629321   |  -4.853194   |-1.012140e+01 |-7.377884e-01 |
|  596  |14.9000 |  1   |   0.534586   |   0.618118   |  -4.852261   |-1.011910e+01 |-7.379757e-01 |
|  597  |14.9250 |  1   |   0.567604   |   0.593661   |  -4.852487   |-1.011680e+01 |-7.381634e-01 |
|  598  |14.9500 |  1   |   0.572954   |   0.599532   |  -4.851275   |-1.011451e+01 |-7.383513e-01 |
|  599  |14.9750 |  1   |   0.562174   |   0.595357   |  -4.851012   |-1.011221e+01 |-7.385395e-01 |
|  600  |15.0000 |  1   |   0.565041   |   0.594815   |  -4.850216   |-1.010991e+01 |-7.387280e-01 |
|  601  |15.0250 |  1   |   0.568619   |   0.602458   |  -4.849993   |-1.010761e+01 |-7.389167e-01 |
|  602  |15.0500 |  1   |   0.565685   |   0.599703   |  -4.849887   |-1.010531e+01 |-7.391057e-01 |
|  603  |15.0750 |  1   |   0.559376   |   0.612765   |  -4.849425   |-1.010300e+01 |-7.392949e-01 |
|  604  |15.1000 |  1   |   0.558552   |   0.602107   |  -4.849206   |-1.010070e+01 |-7.394843e-01 |
|  605  |15.1250 |  1   |   0.582718   |   0.633646   |  -4.848406   |-1.009840e+01 |-7.396740e-01 |
|  606  |15.1500 |  1   |   0.581577   |   0.623610   |  -4.848264   |-1.009610e+01 |-7.398638e-01 |
|  607  |15.1750 |  1   |   0.565744   |   0.594525   |  -4.847774   |-1.009380e+01 |-7.400538e-01 |
|  608  |15.2000 |  1   |   0.564061   |   0.594557   |  -4.848037   |-1.009150e+01 |-7.402440e-01 |
|  609  |15.2250 |  1   |   0.567888   |   0.599122   |  -4.847578   |-1.008921e+01 |-7.404344e-01 |
|  610  |15.2500 |  1   |   0.570234   |   0.602823   |  -4.847542   |-1.008691e+01 |-7.406249e-01 |
|  611  |15.2750 |  1   |   0.561263   |   0.598452   |  -4.847030   |-1.008461e+01 |-7.408156e-01 |
|  612  |15.3000 |  1   |   0.568963   |   0.599018   |  -4.846710   |-1.008231e+01 |-7.410064e-01 |
|  613  |15.3250 |  1   |   0.559163   |   0.605724   |  -4.846813   |-1.008002e+01 |-7.411973e-01 |
|  614  |15.3500 |  1   |   0.564462   |   0.599463   |  -4.846562   |-1.007773e+01 |-7.413883e-01 |
|  615  |15.3750 |  1   |   0.580952   |   0.610074   |  -4.846943   |-1.007543e+01 |-7.415794e-01 |
|  616  |15.4000 |  1   |   0.568574   |   0.597096   |  -4.846413   |-1.007314e+01 |-7.417706e-01 |
|  617  |15.4250 |  1   |   0.565757   |   0.596118   |  -4.846541   |-1.007085e+01 |-7.419619e-01 |
|  618  |15.4500 |  1   |   0.537671   |   0.632581   |  -4.846117   |-1.006857e+01 |-7.421533e-01 |
|  619  |15.4750 |  1   |   0.561591   |   0.596576   |  -4.846302   |-1.006628e+01 |-7.423447e-01 |
|  620  |15.5000 |  1   |   0.559380   |   0.594044   |  -4.846417   |-1.006400e+01 |-7.425361e-01 |
|  621  |15.5250 |  1   |   0.550661   |   0.639299   |  -4.846521   |-1.006172e+01 |-7.427276e-01 |
|  622  |15.5500 |  1   |   0.564344   |   0.599497   |  -4.846664   |-1.005944e+01 |-7.429191e-01 |
|  623  |15.5750 |  1   |   0.564470   |   0.598390   |  -4.846375   |-1.005716e+01 |-7.431107e-01 |
|  624  |15.6000 |  1   |   0.582095   |   0.621527   |  -4.846646   |-1.005489e+01 |-7.433022e-01 |
|  625  |15.6250 |  1   |   0.563067   |   0.594485   |  -4.846450   |-1.005262e+01 |-7.434937e-01 |
|  626  |15.6500 |  1   |   0.556217   |   0.597713   |  -4.847057   |-1.005035e+01 |-7.436852e-01 |
|  627  |15.6750 |  1   |   0.556730   |   0.599759   |  -4.847059   |-1.004809e+01 |-7.438766e-01 |
|  628  |15.7000 |  1   |   0.559253   |   0.596950   |  -4.847442   |-1.004582e+01 |-7.440680e-01 |
|  629  |15.7250 |  1   |   0.566564   |   0.599786   |  -4.847356   |-1.004357e+01 |-7.442594e-01 |
|  630  |15.7500 |  1   |   0.541901   |   0.610011   |  -4.847580   |-1.004131e+01 |-7.444507e-01 |
|  631  |15.7750 |  1   |   0.552107   |   0.603683   |  -4.847782   |-1.003906e+01 |-7.446419e-01 |
|  632  |15.8000 |  1   |   0.559163   |   0.600536   |  -4.848163   |-1.003681e+01 |-7.448331e-01 |
|  633  |15.8250 |  1   |   0.565520   |   0.607117   |  -4.848649   |-1.003456e+01 |-7.450241e-01 |
|  634  |15.8500 |  1   |   0.563058   |   0.602004   |  -4.848834   |-1.003232e+01 |-7.452150e-01 |
|  635  |15.8750 |  1   |   0.565077   |   0.604592   |  -4.849242   |-1.003009e+01 |-7.454058e-01 |
|  636  |15.9000 |  1   |   0.561084   |   0.613315   |  -4.849257   |-1.002785e+01 |-7.455965e-01 |
|  637  |15.9250 |  1   |   0.562131   |   0.608055   |  -4.849893   |-1.002562e+01 |-7.457870e-01 |
|  638  |15.9500 |  1   |   0.567037   |   0.607231   |  -4.850162   |-1.002340e+01 |-7.459774e-01 |
|  639  |15.9750 |  1   |   0.559362   |   0.605681   |  -4.850853   |-1.002118e+01 |-7.461676e-01 |
|  640  |16.0000 |  1   |   0.559990   |   0.606771   |  -4.851290   |-1.001896e+01 |-7.463577e-01 |
|  641  |16.0250 |  1   |   0.563540   |   0.604675   |  -4.851567   |-1.001675e+01 |-7.465476e-01 |
|  642  |16.0500 |  1   |   0.569776   |   0.614118   |  -4.852131   |-1.001455e+01 |-7.467372e-01 |
|  643  |16.0750 |  1   |   0.526022   |   0.638151   |  -4.852404   |-1.001234e+01 |-7.469267e-01 |
|  644  |16.1000 |  1   |   0.561008   |   0.613815   |  -4.853264   |-1.001015e+01 |-7.471159e-01 |
|  645  |16.1250 |  1   |   0.558149   |   0.610124   |  -4.853699   |-1.000796e+01 |-7.473050e-01 |
|  646  |16.1500 |  1   |   0.558817   |   0.602424   |  -4.854509   |-1.000577e+01 |-7.474938e-01 |
|  647  |16.1750 |  1   |   0.551800   |   0.649783   |  -4.854874   |-1.000359e+01 |-7.476823e-01 |
|  648  |16.2000 |  1   |   0.563560   |   0.614133   |  -4.830412   |-1.000141e+01 |-7.478702e-01 |
|  649  |16.2250 |  1   |   0.527692   |   0.637038   |  -4.860230   |-9.999242e+00 |-7.480574e-01 |
|  650  |16.2500 |  1   |   0.520572   |   0.630335   |  -4.856936   |-9.997077e+00 |-7.482449e-01 |
|  651  |16.2750 |  1   |   0.538065   |   0.623007   |  -4.855762   |-9.994918e+00 |-7.484321e-01 |
|  652  |16.3000 |  1   |   0.563850   |   0.606399   |  -4.859225   |-9.992765e+00 |-7.486189e-01 |
|  653  |16.3250 |  1   |   0.569525   |   0.613083   |  -4.857579   |-9.990618e+00 |-7.488056e-01 |
|  654  |16.3500 |  1   |   0.572920   |   0.616659   |  -4.856411   |-9.988477e+00 |-7.489920e-01 |
|  655  |16.3750 |  1   |   0.565054   |   0.622951   |  -4.859712   |-9.986343e+00 |-7.491781e-01 |
|  656  |16.4000 |  1   |   0.538484   |   0.637184   |  -4.858656   |-9.984214e+00 |-7.493640e-01 |
|  657  |16.4250 |  1   |   0.572575   |   0.628920   |  -4.863059   |-9.982092e+00 |-7.495496e-01 |
|  658  |16.4500 |  1   |   0.553086   |   0.615147   |  -4.865486   |-9.979977e+00 |-7.497349e-01 |
|  659  |16.4750 |  1   |   0.554584   |   0.608671   |  -4.862494   |-9.977868e+00 |-7.499197e-01 |
|  660  |16.5000 |  1   |   0.566182   |   0.632013   |  -4.865031   |-9.975766e+00 |-7.501042e-01 |
|  661  |16.5250 |  1   |   0.559237   |   0.607847   |  -4.864222   |-9.973671e+00 |-7.502883e-01 |
|  662  |16.5500 |  1   |   0.547495   |   0.609668   |  -4.865897   |-9.971582e+00 |-7.504721e-01 |
|  663  |16.5750 |  1   |   0.554912   |   0.604920   |  -4.870242   |-9.969500e+00 |-7.506554e-01 |
|  664  |16.6000 |  1   |   0.563164   |   0.608630   |  -4.868999   |-9.967426e+00 |-7.508382e-01 |
|  665  |16.6250 |  1   |   0.557828   |   0.607771   |  -4.870617   |-9.965359e+00 |-7.510206e-01 |
|  666  |16.6500 |  1   |   0.564567   |   0.611154   |  -4.869702   |-9.963299e+00 |-7.512027e-01 |
|  667  |16.6750 |  1   |   0.570958   |   0.634616   |  -4.868988   |-9.961247e+00 |-7.513841e-01 |
|  668  |16.7000 |  1   |   0.555363   |   0.608414   |  -4.873698   |-9.959202e+00 |-7.515652e-01 |
|  669  |16.7250 |  1   |   0.550943   |   0.608364   |  -4.874542   |-9.957164e+00 |-7.517458e-01 |
|  670  |16.7500 |  1   |   0.555703   |   0.608518   |  -4.875535   |-9.955134e+00 |-7.519257e-01 |
|  671  |16.7750 |  1   |   0.545052   |   0.613267   |  -4.877426   |-9.953112e+00 |-7.521053e-01 |
|  672  |16.8000 |  1   |   0.553070   |   0.605358   |  -4.874922   |-9.951098e+00 |-7.522844e-01 |
|  673  |16.8250 |  1   |   0.561627   |   0.612107   |  -4.876898   |-9.949092e+00 |-7.524629e-01 |
|  674  |16.8500 |  1   |   0.555659   |   0.607956   |  -4.879987   |-9.947094e+00 |-7.526409e-01 |
|  675  |16.8750 |  1   |   0.553403   |   0.616417   |  -4.880702   |-9.945105e+00 |-7.528184e-01 |
|  676  |16.9000 |  1   |   0.553432   |   0.612899   |  -4.884087   |-9.943123e+00 |-7.529953e-01 |
|  677  |16.9250 |  1   |   0.559188   |   0.618660   |  -4.883577   |-9.941150e+00 |-7.531718e-01 |
|  678  |16.9500 |  1   |   0.555787   |   0.615341   |  -4.883057   |-9.939185e+00 |-7.533476e-01 |
|  679  |16.9750 |  1   |   0.558311   |   0.612354   |  -4.885587   |-9.937229e+00 |-7.535229e-01 |
|  680  |17.0000 |  1   |   0.561945   |   0.618028   |  -4.886378   |-9.935282e+00 |-7.536977e-01 |
|  681  |17.0250 |  1   |   0.539489   |   0.628249   |  -4.890029   |-9.933343e+00 |-7.538718e-01 |
|  682  |17.0500 |  1   |   0.514794   |   0.643622   |  -4.892106   |-9.931413e+00 |-7.540454e-01 |
|  683  |17.0750 |  1   |   0.539393   |   0.626948   |  -4.890958   |-9.929493e+00 |-7.542183e-01 |
|  684  |17.1000 |  1   |   0.560875   |   0.618428   |  -4.893438   |-9.927581e+00 |-7.543907e-01 |
|  685  |17.1250 |  1   |   0.554366   |   0.611880   |  -4.893277   |-9.925678e+00 |-7.545624e-01 |
|  686  |17.1500 |  1   |   0.553763   |   0.618234   |  -4.894869   |-9.923784e+00 |-7.547335e-01 |
|  687  |17.1750 |  1   |   0.553390   |   0.611751   |  -4.899919   |-9.921900e+00 |-7.549040e-01 |
|  688  |17.2000 |  1   |   0.556929   |   0.626983   |  -4.899359   |-9.920025e+00 |-7.550737e-01 |
|  689  |17.2250 |  1   |   0.551784   |   0.617594   |  -4.901290   |-9.918159e+00 |-7.552428e-01 |
|  690  |17.2500 |  1   |   0.534141   |   0.623701   |  -4.902376   |-9.916303e+00 |-7.554113e-01 |
|  691  |17.2750 |  1   |   0.520007   |   0.638176   |  -4.901707   |-9.914456e+00 |-7.555791e-01 |
|  692  |17.3000 |  1   |   0.514522   |   0.638778   |  -4.905930   |-9.912619e+00 |-7.557462e-01 |
|  693  |17.3250 |  1   |   0.510692   |   0.643761   |  -4.907376   |-9.910792e+00 |-7.559126e-01 |
|  694  |17.3500 |  1   |   0.517713   |   0.643936   |  -4.909717   |-9.908974e+00 |-7.560782e-01 |
|  695  |17.3750 |  1   |   0.541182   |   0.655376   |  -4.911696   |-9.907166e+00 |-7.562432e-01 |
|  696  |17.4000 |  1   |   0.551757   |   0.611377   |  -4.910876   |-9.905369e+00 |-7.564075e-01 |
|  697  |17.4250 |  1   |   0.555262   |   0.614891   |  -4.913403   |-9.903581e+00 |-7.565710e-01 |
|  698  |17.4500 |  1   |   0.564454   |   0.624082   |  -4.915500   |-9.901804e+00 |-7.567338e-01 |
|  699  |17.4750 |  1   |   0.553199   |   0.610732   |  -4.917215   |-9.900037e+00 |-7.568959e-01 |
|  700  |17.5000 |  1   |   0.548138   |   0.608044   |  -4.921356   |-9.898280e+00 |-7.570572e-01 |
|  701  |17.5250 |  1   |   0.549388   |   0.607808   |  -4.921642   |-9.896533e+00 |-7.572177e-01 |
|  702  |17.5500 |  1   |   0.553081   |   0.618402   |  -4.922276   |-9.894797e+00 |-7.573775e-01 |
|  703  |17.5750 |  1   |   0.551544   |   0.613274   |  -4.925124   |-9.893071e+00 |-7.575366e-01 |
|  704  |17.6000 |  1   |   0.537771   |   0.622332   |  -4.925960   |-9.891356e+00 |-7.576948e-01 |
|  705  |17.6250 |  1   |   0.547941   |   0.612396   |  -4.929428   |-9.889651e+00 |-7.578523e-01 |
|  706  |17.6500 |  1   |   0.558546   |   0.618044   |  -4.932578   |-9.887957e+00 |-7.580090e-01 |
|  707  |17.6750 |  1   |   0.550670   |   0.613128   |  -4.933198   |-9.886274e+00 |-7.581648e-01 |
|  708  |17.7000 |  1   |   0.549359   |   0.610619   |  -4.935304   |-9.884602e+00 |-7.583199e-01 |
|  709  |17.7250 |  1   |   0.548109   |   0.608598   |  -4.936363   |-9.882941e+00 |-7.584741e-01 |
|  710  |17.7500 |  1   |   0.550066   |   0.621723   |  -4.938473   |-9.881290e+00 |-7.586276e-01 |
|  711  |17.7750 |  1   |   0.547227   |   0.613100   |  -4.942387   |-9.879651e+00 |-7.587801e-01 |
|  712  |17.8000 |  1   |   0.549032   |   0.607084   |  -4.943841   |-9.878023e+00 |-7.589318e-01 |
|  713  |17.8250 |  1   |   0.553408   |   0.626393   |  -4.946716   |-9.876405e+00 |-7.590827e-01 |
|  714  |17.8500 |  1   |   0.552940   |   0.612425   |  -4.948343   |-9.874799e+00 |-7.592327e-01 |
|  715  |17.8750 |  1   |   0.547835   |   0.608350   |  -4.948430   |-9.873205e+00 |-7.593819e-01 |
|  716  |17.9000 |  1   |   0.540325   |   0.615331   |  -4.952754   |-9.871621e+00 |-7.595302e-01 |
|  717  |17.9250 |  1   |   0.541983   |   0.615043   |  -4.954732   |-9.870049e+00 |-7.596776e-01 |
|  718  |17.9500 |  1   |   0.545322   |   0.613781   |  -4.957229   |-9.868489e+00 |-7.598241e-01 |
|  719  |17.9750 |  1   |   0.550283   |   0.619134   |  -4.960988   |-9.866940e+00 |-7.599697e-01 |
|  720  |18.0000 |  1   |   0.545893   |   0.614056   |  -4.961059   |-9.865402e+00 |-7.601144e-01 |
|  721  |18.0250 |  1   |   0.545672   |   0.612643   |  -4.963571   |-9.863876e+00 |-7.602583e-01 |
|  722  |18.0500 |  1   |   0.547688   |   0.613754   |  -4.966223   |-9.862362e+00 |-7.604012e-01 |
|  723  |18.0750 |  1   |   0.552767   |   0.618856   |  -4.968695   |-9.860860e+00 |-7.605432e-01 |
|  724  |18.1000 |  1   |   0.536194   |   0.619256   |  -4.972596   |-9.859369e+00 |-7.606842e-01 |
|  725  |18.1250 |  1   |   0.547934   |   0.614264   |  -4.974514   |-9.857890e+00 |-7.608244e-01 |
|  726  |18.1500 |  1   |   0.546250   |   0.609647   |  -4.976536   |-9.856423e+00 |-7.609636e-01 |
|  727  |18.1750 |  1   |   0.543682   |   0.612869   |  -4.979007   |-9.854968e+00 |-7.611018e-01 |
|  728  |18.2000 |  1   |   0.540415   |   0.613370   |  -4.980559   |-9.853525e+00 |-7.612392e-01 |
|  729  |18.2250 |  1   |   0.545937   |   0.614889   |  -4.984680   |-9.852095e+00 |-7.613755e-01 |
|  730  |18.2500 |  1   |   0.545980   |   0.617822   |  -4.988031   |-9.850676e+00 |-7.615109e-01 |
|  731  |18.2750 |  1   |   0.542477   |   0.615399   |  -4.989711   |-9.849269e+00 |-7.616453e-01 |
|  732  |18.3000 |  1   |   0.547334   |   0.637717   |  -4.993188   |-9.847874e+00 |-7.617788e-01 |
|  733  |18.3250 |  1   |   0.553981   |   0.623099   |  -4.994720   |-9.846492e+00 |-7.619113e-01 |
|  734  |18.3500 |  1   |   0.548177   |   0.615461   |  -4.996885   |-9.845122e+00 |-7.620428e-01 |
|  735  |18.3750 |  1   |   0.541814   |   0.619284   |  -5.001297   |-9.843764e+00 |-7.621732e-01 |
|  736  |18.4000 |  1   |   0.545819   |   0.612507   |  -5.004011   |-9.842419e+00 |-7.623028e-01 |
|  737  |18.4250 |  1   |   0.544200   |   0.612841   |  -5.007008   |-9.841085e+00 |-7.624312e-01 |
|  738  |18.4500 |  1   |   0.542160   |   0.613612   |  -5.009954   |-9.839765e+00 |-7.625587e-01 |
|  739  |18.4750 |  1   |   0.579838   |   0.652729   |  -5.011577   |-9.838457e+00 |-7.626852e-01 |
|  740  |18.5000 |  1   |   0.502843   |   0.647341   |  -5.014921   |-9.837161e+00 |-7.628107e-01 |
|  741  |18.5250 |  1   |   0.551553   |   0.615329   |  -5.018108   |-9.835878e+00 |-7.629351e-01 |
|  742  |18.5500 |  1   |   0.527083   |   0.626063   |  -5.021511   |-9.834607e+00 |-7.630585e-01 |
|  743  |18.5750 |  1   |   0.539414   |   0.623069   |  -5.025618   |-9.833349e+00 |-7.631809e-01 |
|  744  |18.6000 |  1   |   0.525490   |   0.626166   |  -5.027066   |-9.832104e+00 |-7.633022e-01 |
|  745  |18.6250 |  1   |   0.517001   |   0.654233   |  -5.030386   |-9.830872e+00 |-7.634225e-01 |
|  746  |18.6500 |  1   |   0.534137   |   0.626574   |  -5.033620   |-9.829652e+00 |-7.635418e-01 |
|  747  |18.6750 |  1   |   0.542476   |   0.619676   |  -5.035894   |-9.828445e+00 |-7.636599e-01 |
|  748  |18.7000 |  1   |   0.553023   |   0.625866   |  -5.041104   |-9.827250e+00 |-7.637771e-01 |
|  749  |18.7250 |  1   |   0.540949   |   0.619120   |  -5.044064   |-9.826069e+00 |-7.638931e-01 |
|  750  |18.7500 |  1   |   0.537734   |   0.621421   |  -5.046464   |-9.824900e+00 |-7.640081e-01 |
|  751  |18.7750 |  1   |   0.538831   |   0.623689   |  -5.050195   |-9.823745e+00 |-7.641221e-01 |
|  752  |18.8000 |  1   |   0.541038   |   0.621485   |  -5.052620   |-9.822602e+00 |-7.642350e-01 |
|  753  |18.8250 |  1   |   0.535511   |   0.620073   |  -5.056418   |-9.821472e+00 |-7.643467e-01 |
|  754  |18.8500 |  1   |   0.530924   |   0.626769   |  -5.060668   |-9.820355e+00 |-7.644574e-01 |
|  755  |18.8750 |  1   |   0.537222   |   0.615511   |  -5.064038   |-9.819251e+00 |-7.645670e-01 |
|  756  |18.9000 |  1   |   0.534256   |   0.619716   |  -5.067645   |-9.818160e+00 |-7.646756e-01 |
|  757  |18.9250 |  1   |   0.535977   |   0.618753   |  -5.070290   |-9.817082e+00 |-7.647830e-01 |
|  758  |18.9500 |  1   |   0.540988   |   0.623975   |  -5.073509   |-9.816018e+00 |-7.648893e-01 |
|  759  |18.9750 |  1   |   0.549132   |   0.621750   |  -5.078004   |-9.814966e+00 |-7.649945e-01 |
|  760  |19.0000 |  1   |   0.539145   |   0.617640   |  -5.081158   |-9.813927e+00 |-7.650987e-01 |
|  761  |19.0250 |  1   |   0.540759   |   0.626675   |  -5.085734   |-9.812902e+00 |-7.652017e-01 |
|  762  |19.0500 |  1   |   0.538078   |   0.622588   |  -5.089589   |-9.811890e+00 |-7.653036e-01 |
|  763  |19.0750 |  1   |   0.522208   |   0.636657   |  -5.091690   |-9.810890e+00 |-7.654044e-01 |
|  764  |19.1000 |  1   |   0.533418   |   0.625254   |  -5.096080   |-9.809904e+00 |-7.655040e-01 |
|  765  |19.1250 |  1   |   0.539772   |   0.619554   |  -5.100005   |-9.808932e+00 |-7.656026e-01 |
|  766  |19.1500 |  1   |   0.539060   |   0.621184   |  -5.103610   |-9.807972e+00 |-7.657000e-01 |
|  767  |19.1750 |  1   |   0.535861   |   0.620145   |  -5.108621   |-9.807026e+00 |-7.657963e-01 |
|  768  |19.2000 |  1   |   0.536273   |   0.636314   |  -5.112126   |-9.806093e+00 |-7.658914e-01 |
|  769  |19.2250 |  1   |   0.527759   |   0.633821   |  -5.115285   |-9.805173e+00 |-7.659854e-01 |
|  770  |19.2500 |  1   |   0.544239   |   0.628317   |  -5.119466   |-9.804266e+00 |-7.660783e-01 |
|  771  |19.2750 |  1   |   0.537259   |   0.622405   |  -5.123024   |-9.803373e+00 |-7.661701e-01 |
|  772  |19.3000 |  1   |   0.534405   |   0.621513   |  -5.128168   |-9.802493e+00 |-7.662607e-01 |
|  773  |19.3250 |  1   |   0.536213   |   0.619574   |  -5.132116   |-9.801626e+00 |-7.663501e-01 |
|  774  |19.3500 |  1   |   0.547262   |   0.633010   |  -5.136146   |-9.800773e+00 |-7.664384e-01 |
|  775  |19.3750 |  1   |   0.532413   |   0.624157   |  -5.140640   |-9.799933e+00 |-7.665256e-01 |
|  776  |19.4000 |  1   |   0.528069   |   0.631161   |  -5.143361   |-9.799106e+00 |-7.666116e-01 |
|  777  |19.4250 |  1   |   0.508258   |   0.655418   |  -5.148293   |-9.798293e+00 |-7.666965e-01 |
|  778  |19.4500 |  1   |   0.531947   |   0.619965   |  -5.153388   |-9.797493e+00 |-7.667802e-01 |
|  779  |19.4750 |  1   |   0.538257   |   0.624263   |  -5.157054   |-9.796706e+00 |-7.668627e-01 |
|  780  |19.5000 |  1   |   0.513675   |   0.639047   |  -5.162093   |-9.795933e+00 |-7.669441e-01 |
|  781  |19.5250 |  1   |   0.524592   |   0.629631   |  -5.166237   |-9.795173e+00 |-7.670243e-01 |
|  782  |19.5500 |  1   |   0.501278   |   0.646392   |  -5.169515   |-9.794426e+00 |-7.671034e-01 |
|  783  |19.5750 |  1   |   0.508310   |   0.653496   |  -5.174678   |-9.793693e+00 |-7.671812e-01 |
|  784  |19.6000 |  1   |   0.501368   |   0.644803   |  -5.179349   |-9.792973e+00 |-7.672580e-01 |
|  785  |19.6250 |  1   |   0.505631   |   0.653741   |  -5.184141   |-9.792267e+00 |-7.673335e-01 |
|  786  |19.6500 |  1   |   0.501214   |   0.647573   |  -5.188924   |-9.791574e+00 |-7.674079e-01 |
|  787  |19.6750 |  1   |   0.495648   |   0.655176   |  -5.192845   |-9.790894e+00 |-7.674811e-01 |
|  788  |19.7000 |  1   |   0.499932   |   0.647758   |  -5.197708   |-9.790228e+00 |-7.675532e-01 |
|  789  |19.7250 |  1   |   0.518200   |   0.630863   |  -5.201669   |-9.789575e+00 |-7.676241e-01 |
|  790  |19.7500 |  1   |   0.536332   |   0.619421   |  -5.206930   |-9.788935e+00 |-7.676937e-01 |
|  791  |19.7750 |  1   |   0.531387   |   0.621932   |  -5.212611   |-9.788309e+00 |-7.677623e-01 |
|  792  |19.8000 |  1   |   0.527384   |   0.622412   |  -5.216559   |-9.787696e+00 |-7.678296e-01 |
|  793  |19.8250 |  1   |   0.529678   |   0.620205   |  -5.221430   |-9.787096e+00 |-7.678958e-01 |
|  794  |19.8500 |  1   |   0.508913   |   0.648031   |  -5.226400   |-9.786510e+00 |-7.679608e-01 |
|  795  |19.8750 |  1   |   0.504351   |   0.648719   |  -5.230347   |-9.785937e+00 |-7.680246e-01 |
|  796  |19.9000 |  1   |   0.500118   |   0.648664   |  -5.235880   |-9.785377e+00 |-7.680872e-01 |
|  797  |19.9250 |  1   |   0.528246   |   0.630585   |  -5.241694   |-9.784831e+00 |-7.681487e-01 |
|  798  |19.9500 |  1   |   0.542162   |   0.629759   |  -5.245912   |-9.784298e+00 |-7.682090e-01 |
|  799  |19.9750 |  1   |   0.529981   |   0.619840   |  -5.251163   |-9.783778e+00 |-7.682681e-01 |
|  800  |20.0000 |  1   |   0.529003   |   0.618461   |  -5.255740   |-9.783271e+00 |-7.683260e-01 |
|  801  |20.0250 |  1   |   0.531965   |   0.615729   |  -5.260634   |-9.782778e+00 |-7.683827e-01 |
|  802  |20.0500 |  1   |   0.535846   |   0.625167   |  -5.265935   |-9.782298e+00 |-7.684383e-01 |
|  803  |20.0750 |  1   |   0.530973   |   0.621185   |  -5.271230   |-9.781831e+00 |-7.684927e-01 |
|  804  |20.1000 |  1   |   0.534419   |   0.622091   |  -5.277057   |-9.781378e+00 |-7.685459e-01 |
|  805  |20.1250 |  1   |   0.534982   |   0.622699   |  -5.281286   |-9.780938e+00 |-7.685979e-01 |
|  806  |20.1500 |  1   |   0.530764   |   0.620805   |  -5.286196   |-9.780510e+00 |-7.686487e-01 |
|  807  |20.1750 |  1   |   0.511985   |   0.636388   |  -5.291943   |-9.780096e+00 |-7.686984e-01 |
|  808  |20.2000 |  1   |   0.496395   |   0.650078   |  -5.296389   |-9.779696e+00 |-7.687469e-01 |
|  809  |20.2250 |  1   |   0.500372   |   0.658939   |  -5.302208   |-9.779308e+00 |-7.687942e-01 |
|  810  |20.2500 |  1   |   0.499443   |   0.650036   |  -5.308191   |-9.778933e+00 |-7.688403e-01 |
|  811  |20.2750 |  1   |   0.507094   |   0.660675   |  -5.312377   |-9.778572e+00 |-7.688852e-01 |
|  812  |20.3000 |  1   |   0.501244   |   0.655777   |  -5.317533   |-9.778224e+00 |-7.689290e-01 |
|  813  |20.3250 |  1   |   0.497886   |   0.659485   |  -5.322998   |-9.777888e+00 |-7.689716e-01 |
|  814  |20.3500 |  1   |   0.531331   |   0.625960   |  -5.327874   |-9.777566e+00 |-7.690130e-01 |
|  815  |20.3750 |  1   |   0.520818   |   0.633773   |  -5.333552   |-9.777257e+00 |-7.690533e-01 |
|  816  |20.4000 |  1   |   0.528115   |   0.629487   |  -5.338954   |-9.776961e+00 |-7.690924e-01 |
|  817  |20.4250 |  1   |   0.533945   |   0.639602   |  -5.344271   |-9.776677e+00 |-7.691303e-01 |
|  818  |20.4500 |  1   |   0.518692   |   0.616616   |  -5.348659   |-9.776407e+00 |-7.691670e-01 |
|  819  |20.4750 |  1   |   0.522226   |   0.616927   |  -5.353802   |-9.776149e+00 |-7.692026e-01 |
|  820  |20.5000 |  1   |   0.488609   |   0.653811   |  -5.359571   |-9.775905e+00 |-7.692370e-01 |
|  821  |20.5250 |  1   |   0.484709   |   0.644598   |  -5.364204   |-9.775673e+00 |-7.692702e-01 |
|  822  |20.5500 |  1   |   0.486915   |   0.644077   |  -5.369689   |-9.775454e+00 |-7.693023e-01 |
|  823  |20.5750 |  1   |   0.486652   |   0.644571   |  -5.375147   |-9.775248e+00 |-7.693332e-01 |
|  824  |20.6000 |  1   |   0.504305   |   0.636577   |  -5.379300   |-9.775055e+00 |-7.693629e-01 |
|  825  |20.6250 |  1   |   0.498041   |   0.634625   |  -5.383927   |-9.774875e+00 |-7.693915e-01 |
|  826  |20.6500 |  1   |   0.491458   |   0.658197   |  -5.389699   |-9.774707e+00 |-7.694190e-01 |
|  827  |20.6750 |  1   |   0.496825   |   0.658731   |  -5.394111   |-9.774552e+00 |-7.694452e-01 |
|  828  |20.7000 |  1   |   0.502448   |   0.654295   |  -5.398969   |-9.774409e+00 |-7.694703e-01 |
|  829  |20.7250 |  1   |   0.526343   |   0.629665   |  -5.404191   |-9.774279e+00 |-7.694943e-01 |
|  830  |20.7500 |  1   |   0.527985   |   0.637049   |  -5.408232   |-9.774162e+00 |-7.695171e-01 |
|  831  |20.7750 |  1   |   0.526428   |   0.631766   |  -5.412435   |-9.774057e+00 |-7.695388e-01 |
|  832  |20.8000 |  1   |   0.549858   |   0.656701   |  -5.417086   |-9.773965e+00 |-7.695593e-01 |
|  833  |20.8250 |  1   |   0.525367   |   0.640356   |  -5.421889   |-9.773886e+00 |-7.695787e-01 |
|  834  |20.8500 |  1   |   0.526791   |   0.632546   |  -5.425807   |-9.773818e+00 |-7.695970e-01 |
|  835  |20.8750 |  1   |   0.527689   |   0.634832   |  -5.429904   |-9.773763e+00 |-7.696141e-01 |
|  836  |20.9000 |  1   |   0.527279   |   0.632626   |  -5.434402   |-9.773721e+00 |-7.696301e-01 |
|  837  |20.9250 |  1   |   0.522657   |   0.645628   |  -5.437396   |-9.773691e+00 |-7.696449e-01 |
|  838  |20.9500 |  1   |   0.525489   |   0.635935   |  -5.441073   |-9.773673e+00 |-7.696586e-01 |
|  839  |20.9750 |  1   |   0.532311   |   0.650099   |  -5.445642   |-9.773668e+00 |-7.696712e-01 |
|  840  |21.0000 |  1   |   0.529552   |   0.651858   |  -5.448456   |-9.773674e+00 |-7.696827e-01 |
|  841  |21.0250 |  1   |   0.503458   |   0.671841   |  -5.451750   |-9.773693e+00 |-7.696930e-01 |
|  842  |21.0500 |  1   |   0.501758   |   0.675092   |  -5.455281   |-9.773724e+00 |-7.697022e-01 |
|  843  |21.0750 |  1   |   0.514197   |   0.677148   |  -5.457769   |-9.773768e+00 |-7.697103e-01 |
|  844  |21.1000 |  1   |   0.501449   |   0.669868   |  -5.460336   |-9.773823e+00 |-7.697173e-01 |
|  845  |21.1250 |  1   |   0.497707   |   0.677975   |  -5.463272   |-9.773890e+00 |-7.697232e-01 |
|  846  |21.1500 |  1   |   0.500228   |   0.670709   |  -5.466064   |-9.773969e+00 |-7.697280e-01 |
|  847  |21.1750 |  1   |   0.504896   |   0.676630   |  -5.467633   |-9.774060e+00 |-7.697316e-01 |
|  848  |21.2000 |  1   |   0.500956   |   0.671256   |  -5.469894   |-9.774164e+00 |-7.697342e-01 |
|  849  |21.2250 |  1   |   0.496505   |   0.674550   |  -5.472033   |-9.774278e+00 |-7.697357e-01 |
|  850  |21.2500 |  1   |   0.529665   |   0.644782   |  -5.472924   |-9.774405e+00 |-7.697361e-01 |
|  851  |21.2750 |  1   |   0.528408   |   0.645465   |  -5.474619   |-9.774544e+00 |-7.697354e-01 |
|  852  |21.3000 |  1   |   0.519741   |   0.635947   |  -5.476252   |-9.774694e+00 |-7.697336e-01 |
|  853  |21.3250 |  1   |   0.504346   |   0.651090   |  -5.476890   |-9.774856e+00 |-7.697307e-01 |
|  854  |21.3500 |  1   |   0.532271   |   0.638573   |  -5.477458   |-9.775029e+00 |-7.697268e-01 |
|  855  |21.3750 |  1   |   0.523634   |   0.638200   |  -5.478494   |-9.775214e+00 |-7.697218e-01 |
|  856  |21.4000 |  1   |   0.519422   |   0.638265   |  -5.478639   |-9.775411e+00 |-7.697157e-01 |
|  857  |21.4250 |  1   |   0.518510   |   0.639035   |  -5.478368   |-9.775619e+00 |-7.697085e-01 |
|  858  |21.4500 |  1   |   0.510864   |   0.672835   |  -5.478909   |-9.775839e+00 |-7.697003e-01 |
|  859  |21.4750 |  1   |   0.524935   |   0.637128   |  -5.478554   |-9.776069e+00 |-7.696910e-01 |
|  860  |21.5000 |  1   |   0.507660   |   0.648373   |  -5.477690   |-9.776312e+00 |-7.696807e-01 |
|  861  |21.5250 |  1   |   0.499457   |   0.665963   |  -5.477335   |-9.776565e+00 |-7.696693e-01 |
|  862  |21.5500 |  1   |   0.499270   |   0.658582   |  -5.476603   |-9.776830e+00 |-7.696569e-01 |
|  863  |21.5750 |  1   |   0.519785   |   0.638694   |  -5.475176   |-9.777106e+00 |-7.696434e-01 |
|  864  |21.6000 |  1   |   0.534959   |   0.658340   |  -5.473925   |-9.777393e+00 |-7.696289e-01 |
|  865  |21.6250 |  1   |   0.516683   |   0.652932   |  -5.472998   |-9.777691e+00 |-7.696133e-01 |
|  866  |21.6500 |  1   |   0.524993   |   0.643355   |  -5.470927   |-9.778000e+00 |-7.695968e-01 |
|  867  |21.6750 |  1   |   0.521338   |   0.641387   |  -5.469193   |-9.778320e+00 |-7.695792e-01 |
|  868  |21.7000 |  1   |   0.511949   |   0.650276   |  -5.467707   |-9.778651e+00 |-7.695606e-01 |
|  869  |21.7250 |  1   |   0.516787   |   0.641368   |  -5.465221   |-9.778993e+00 |-7.695409e-01 |
|  870  |21.7500 |  1   |   0.526370   |   0.644767   |  -5.462966   |-9.779345e+00 |-7.695203e-01 |
|  871  |21.7750 |  1   |   0.527064   |   0.650980   |  -5.460746   |-9.779709e+00 |-7.694986e-01 |
|  872  |21.8000 |  1   |   0.516300   |   0.660074   |  -5.458348   |-9.780083e+00 |-7.694760e-01 |
|  873  |21.8250 |  1   |   0.516653   |   0.640115   |  -5.455473   |-9.780468e+00 |-7.694523e-01 |
|  874  |21.8500 |  1   |   0.519911   |   0.637954   |  -5.452906   |-9.780863e+00 |-7.694277e-01 |
|  875  |21.8750 |  1   |   0.515326   |   0.653226   |  -5.450254   |-9.781269e+00 |-7.694021e-01 |
|  876  |21.9000 |  1   |   0.519997   |   0.639056   |  -5.446816   |-9.781685e+00 |-7.693755e-01 |
|  877  |21.9250 |  1   |   0.520825   |   0.640152   |  -5.443891   |-9.782112e+00 |-7.693479e-01 |
|  878  |21.9500 |  1   |   0.517811   |   0.643432   |  -5.441052   |-9.782549e+00 |-7.693193e-01 |
|  879  |21.9750 |  1   |   0.514777   |   0.645231   |  -5.437508   |-9.782996e+00 |-7.692898e-01 |
|  880  |22.0000 |  1   |   0.509819   |   0.664910   |  -5.434299   |-9.783453e+00 |-7.692593e-01 |
|  881  |22.0250 |  1   |   0.533964   |   0.644499   |  -5.431166   |-9.783921e+00 |-7.692279e-01 |
|  882  |22.0500 |  1   |   0.515048   |   0.643263   |  -5.427340   |-9.784399e+00 |-7.691955e-01 |
|  883  |22.0750 |  1   |   0.528883   |   0.638636   |  -5.423886   |-9.784887e+00 |-7.691622e-01 |
|  884  |22.1000 |  1   |   0.520719   |   0.634711   |  -5.420468   |-9.785385e+00 |-7.691279e-01 |
|  885  |22.1250 |  1   |   0.520284   |   0.649912   |  -5.416873   |-9.785892e+00 |-7.690927e-01 |
|  886  |22.1500 |  1   |   0.528762   |   0.647822   |  -5.413226   |-9.786410e+00 |-7.690565e-01 |
|  887  |22.1750 |  1   |   0.509786   |   0.659574   |  -5.409500   |-9.786937e+00 |-7.690194e-01 |
|  888  |22.2000 |  1   |   0.520104   |   0.640645   |  -5.405926   |-9.787475e+00 |-7.689815e-01 |
|  889  |22.2250 |  1   |   0.528201   |   0.646174   |  -5.401876   |-9.788022e+00 |-7.689426e-01 |
|  890  |22.2500 |  1   |   0.517401   |   0.639639   |  -5.398218   |-9.788578e+00 |-7.689027e-01 |
|  891  |22.2750 |  1   |   0.520639   |   0.632424   |  -5.394694   |-9.789144e+00 |-7.688620e-01 |
|  892  |22.3000 |  1   |   0.522067   |   0.636225   |  -5.390716   |-9.789720e+00 |-7.688204e-01 |
|  893  |22.3250 |  1   |   0.517790   |   0.632747   |  -5.386888   |-9.790305e+00 |-7.687779e-01 |
|  894  |22.3500 |  1   |   0.507874   |   0.644954   |  -5.383266   |-9.790899e+00 |-7.687345e-01 |
|  895  |22.3750 |  1   |   0.464989   |   0.691658   |  -5.379134   |-9.791502e+00 |-7.686902e-01 |
|  896  |22.4000 |  1   |   0.480783   |   0.677711   |  -5.375381   |-9.792115e+00 |-7.686451e-01 |
|  897  |22.4250 |  1   |   0.490632   |   0.674024   |  -5.371811   |-9.792737e+00 |-7.685991e-01 |
|  898  |22.4500 |  1   |   0.481621   |   0.671897   |  -5.367827   |-9.793368e+00 |-7.685522e-01 |
|  899  |22.4750 |  1   |   0.474796   |   0.677255   |  -5.364149   |-9.794009e+00 |-7.685045e-01 |
|  900  |22.5000 |  1   |   0.491788   |   0.670256   |  -5.360229   |-9.794658e+00 |-7.684559e-01 |
|  901  |22.5250 |  1   |   0.484136   |   0.663273   |  -5.356469   |-9.795316e+00 |-7.684065e-01 |
|  902  |22.5500 |  1   |   0.494571   |   0.674221   |  -5.352664   |-9.795983e+00 |-7.683562e-01 |
|  903  |22.5750 |  1   |   0.484502   |   0.666114   |  -5.348923   |-9.796658e+00 |-7.683051e-01 |
|  904  |22.6000 |  1   |   0.500552   |   0.659357   |  -5.345406   |-9.797343e+00 |-7.682532e-01 |
|  905  |22.6250 |  1   |   0.474210   |   0.675963   |  -5.341552   |-9.798036e+00 |-7.682004e-01 |
|  906  |22.6500 |  1   |   0.512181   |   0.642814   |  -5.337793   |-9.798737e+00 |-7.681468e-01 |
|  907  |22.6750 |  1   |   0.530902   |   0.671671   |  -5.334230   |-9.799447e+00 |-7.680925e-01 |
|  908  |22.7000 |  1   |   0.514472   |   0.642086   |  -5.330476   |-9.800166e+00 |-7.680373e-01 |
|  909  |22.7250 |  1   |   0.511914   |   0.644290   |  -5.326850   |-9.800893e+00 |-7.679813e-01 |
|  910  |22.7500 |  1   |   0.510064   |   0.648282   |  -5.323523   |-9.801628e+00 |-7.679245e-01 |
|  911  |22.7750 |  1   |   0.513836   |   0.638366   |  -5.319777   |-9.802371e+00 |-7.678670e-01 |
|  912  |22.8000 |  1   |   0.522687   |   0.642639   |  -5.316235   |-9.803123e+00 |-7.678087e-01 |
|  913  |22.8250 |  1   |   0.513428   |   0.637363   |  -5.312791   |-9.803882e+00 |-7.677496e-01 |
|  914  |22.8500 |  1   |   0.512795   |   0.639266   |  -5.309169   |-9.804650e+00 |-7.676897e-01 |
|  915  |22.8750 |  1   |   0.519954   |   0.638287   |  -5.305885   |-9.805425e+00 |-7.676291e-01 |
|  916  |22.9000 |  1   |   0.481317   |   0.673174   |  -5.302459   |-9.806209e+00 |-7.675677e-01 |
|  917  |22.9250 |  1   |   0.498218   |   0.656933   |  -5.299122   |-9.807000e+00 |-7.675056e-01 |
|  918  |22.9500 |  1   |   0.515562   |   0.638124   |  -5.295768   |-9.807799e+00 |-7.674427e-01 |
|  919  |22.9750 |  1   |   0.518832   |   0.657375   |  -5.292315   |-9.808606e+00 |-7.673791e-01 |
|  920  |23.0000 |  1   |   0.509751   |   0.646163   |  -5.289145   |-9.809420e+00 |-7.673148e-01 |
|  921  |23.0250 |  1   |   0.521466   |   0.646805   |  -5.285912   |-9.810242e+00 |-7.672497e-01 |
|  922  |23.0500 |  1   |   0.512008   |   0.637779   |  -5.282643   |-9.811071e+00 |-7.671840e-01 |
|  923  |23.0750 |  1   |   0.517762   |   0.647592   |  -5.279669   |-9.811908e+00 |-7.671175e-01 |
|  924  |23.1000 |  1   |   0.521314   |   0.644842   |  -5.276377   |-9.812752e+00 |-7.670503e-01 |
|  925  |23.1250 |  1   |   0.495290   |   0.652850   |  -5.273205   |-9.813603e+00 |-7.669824e-01 |
|  926  |23.1500 |  1   |   0.516843   |   0.640946   |  -5.270279   |-9.814461e+00 |-7.669139e-01 |
|  927  |23.1750 |  1   |   0.511137   |   0.637577   |  -5.267108   |-9.815327e+00 |-7.668446e-01 |
|  928  |23.2000 |  1   |   0.512721   |   0.636781   |  -5.264265   |-9.816199e+00 |-7.667747e-01 |
|  929  |23.2250 |  1   |   0.514486   |   0.641128   |  -5.261287   |-9.817078e+00 |-7.667042e-01 |
|  930  |23.2500 |  1   |   0.502929   |   0.654364   |  -5.258338   |-9.817965e+00 |-7.666329e-01 |
|  931  |23.2750 |  1   |   0.482228   |   0.677815   |  -5.255424   |-9.818858e+00 |-7.665610e-01 |
|  932  |23.3000 |  1   |   0.476847   |   0.674906   |  -5.252544   |-9.819758e+00 |-7.664885e-01 |
|  933  |23.3250 |  1   |   0.479599   |   0.666247   |  -5.249762   |-9.820664e+00 |-7.664153e-01 |
|  934  |23.3500 |  1   |   0.481180   |   0.669578   |  -5.247035   |-9.821577e+00 |-7.663414e-01 |
|  935  |23.3750 |  1   |   0.480612   |   0.667914   |  -5.244279   |-9.822497e+00 |-7.662670e-01 |
|  936  |23.4000 |  1   |   0.494679   |   0.679912   |  -5.241565   |-9.823423e+00 |-7.661919e-01 |
|  937  |23.4250 |  1   |   0.480638   |   0.670267   |  -5.238915   |-9.824355e+00 |-7.661162e-01 |
|  938  |23.4500 |  1   |   0.476561   |   0.677960   |  -5.236134   |-9.825294e+00 |-7.660399e-01 |
|  939  |23.4750 |  1   |   0.479632   |   0.672821   |  -5.233690   |-9.826238e+00 |-7.659630e-01 |
|  940  |23.5000 |  1   |   0.473291   |   0.676737   |  -5.231094   |-9.827189e+00 |-7.658855e-01 |
|  941  |23.5250 |  1   |   0.474442   |   0.677697   |  -5.228548   |-9.828146e+00 |-7.658074e-01 |
|  942  |23.5500 |  1   |   0.485998   |   0.658387   |  -5.226139   |-9.829110e+00 |-7.657288e-01 |
|  943  |23.5750 |  1   |   0.514283   |   0.634293   |  -5.223562   |-9.830079e+00 |-7.656495e-01 |
|  944  |23.6000 |  1   |   0.516713   |   0.646159   |  -5.221143   |-9.831053e+00 |-7.655697e-01 |
|  945  |23.6250 |  1   |   0.509222   |   0.641191   |  -5.218806   |-9.832034e+00 |-7.654894e-01 |
|  946  |23.6500 |  1   |   0.511243   |   0.639904   |  -5.216415   |-9.833020e+00 |-7.654084e-01 |
|  947  |23.6750 |  1   |   0.504852   |   0.645054   |  -5.214173   |-9.834012e+00 |-7.653270e-01 |
|  948  |23.7000 |  1   |   0.481507   |   0.668694   |  -5.211857   |-9.835010e+00 |-7.652450e-01 |
|  949  |23.7250 |  1   |   0.478430   |   0.667698   |  -5.209544   |-9.836013e+00 |-7.651624e-01 |
|  950  |23.7500 |  1   |   0.473767   |   0.672205   |  -5.207393   |-9.837021e+00 |-7.650793e-01 |
|  951  |23.7750 |  1   |   0.477168   |   0.673745   |  -5.205109   |-9.838035e+00 |-7.649957e-01 |
|  952  |23.8000 |  1   |   0.473230   |   0.681051   |  -5.203066   |-9.839054e+00 |-7.649116e-01 |
|  953  |23.8250 |  1   |   0.474712   |   0.669055   |  -5.200959   |-9.840078e+00 |-7.648270e-01 |
|  954  |23.8500 |  1   |   0.478994   |   0.672140   |  -5.198806   |-9.841107e+00 |-7.647419e-01 |
|  955  |23.8750 |  1   |   0.510193   |   0.643556   |  -5.196823   |-9.842141e+00 |-7.646563e-01 |
|  956  |23.9000 |  1   |   0.510342   |   0.649685   |  -5.194717   |-9.843180e+00 |-7.645702e-01 |
|  957  |23.9250 |  1   |   0.502699   |   0.645553   |  -5.192758   |-9.844224e+00 |-7.644836e-01 |
|  958  |23.9500 |  1   |   0.509565   |   0.643627   |  -5.190837   |-9.845273e+00 |-7.643966e-01 |
|  959  |23.9750 |  1   |   0.505842   |   0.650800   |  -5.188929   |-9.846327e+00 |-7.643091e-01 |
|  960  |24.0000 |  1   |   0.509080   |   0.639700   |  -5.187018   |-9.847385e+00 |-7.642211e-01 |
|  961  |24.0250 |  1   |   0.506969   |   0.643642   |  -5.185180   |-9.848448e+00 |-7.641327e-01 |
|  962  |24.0500 |  1   |   0.502202   |   0.644327   |  -5.183292   |-9.849515e+00 |-7.640438e-01 |
|  963  |24.0750 |  1   |   0.504608   |   0.646704   |  -5.181523   |-9.850587e+00 |-7.639545e-01 |
|  964  |24.1000 |  1   |   0.506113   |   0.640549   |  -5.179790   |-9.851663e+00 |-7.638648e-01 |
|  965  |24.1250 |  1   |   0.516273   |   0.650328   |  -5.178029   |-9.852743e+00 |-7.637746e-01 |
|  966  |24.1500 |  1   |   0.514624   |   0.656699   |  -5.176397   |-9.853828e+00 |-7.636840e-01 |
|  967  |24.1750 |  1   |   0.509777   |   0.652485   |  -5.174642   |-9.854916e+00 |-7.635931e-01 |
|  968  |24.2000 |  1   |   0.506223   |   0.644373   |  -5.173014   |-9.856009e+00 |-7.635017e-01 |
|  969  |24.2250 |  1   |   0.497977   |   0.651589   |  -5.171420   |-9.857106e+00 |-7.634099e-01 |
|  970  |24.2500 |  1   |   0.542505   |   0.823516   |  -5.169807   |-9.858206e+00 |-7.633177e-01 |
|  971  |24.2750 |  1   |   0.458664   |   0.726943   |  -5.168319   |-9.859311e+00 |-7.632251e-01 |
|  972  |24.3000 |  1   |   0.501798   |   0.644348   |  -5.166790   |-9.860419e+00 |-7.631322e-01 |
|  973  |24.3250 |  1   |   0.514156   |   0.663782   |  -5.165249   |-9.861531e+00 |-7.630389e-01 |
|  974  |24.3500 |  1   |   0.509705   |   0.649251   |  -5.163825   |-9.862646e+00 |-7.629452e-01 |
|  975  |24.3750 |  1   |   0.500570   |   0.646102   |  -5.162345   |-9.863765e+00 |-7.628512e-01 |
|  976  |24.4000 |  1   |   0.501039   |   0.644028   |  -5.160961   |-9.864888e+00 |-7.627568e-01 |
|  977  |24.4250 |  1   |   0.504128   |   0.646994   |  -5.159634   |-9.866014e+00 |-7.626621e-01 |
|  978  |24.4500 |  1   |   0.509705   |   0.643946   |  -5.158234   |-9.867143e+00 |-7.625670e-01 |
|  979  |24.4750 |  1   |   0.504889   |   0.642303   |  -5.156955   |-9.868275e+00 |-7.624717e-01 |
|  980  |24.5000 |  1   |   0.511998   |   0.654649   |  -5.155620   |-9.869411e+00 |-7.623759e-01 |
|  981  |24.5250 |  1   |   0.505531   |   0.643071   |  -5.154346   |-9.870549e+00 |-7.622799e-01 |
|  982  |24.5500 |  1   |   0.505855   |   0.644088   |  -5.153156   |-9.871691e+00 |-7.621836e-01 |
|  983  |24.5750 |  1   |   0.503710   |   0.643562   |  -5.151921   |-9.872835e+00 |-7.620870e-01 |
|  984  |24.6000 |  1   |   0.503625   |   0.652749   |  -5.150775   |-9.873983e+00 |-7.619900e-01 |
|  985  |24.6250 |  1   |   0.497902   |   0.668819   |  -5.149604   |-9.875133e+00 |-7.618928e-01 |
|  986  |24.6500 |  1   |   0.508365   |   0.655839   |  -5.148454   |-9.876286e+00 |-7.617953e-01 |
|  987  |24.6750 |  1   |   0.499875   |   0.649295   |  -5.147360   |-9.877441e+00 |-7.616975e-01 |
|  988  |24.7000 |  1   |   0.507928   |   0.651539   |  -5.146301   |-9.878599e+00 |-7.615995e-01 |
|  989  |24.7250 |  1   |   0.504901   |   0.643364   |  -5.145247   |-9.879760e+00 |-7.615012e-01 |
|  990  |24.7500 |  1   |   0.496468   |   0.650975   |  -5.144263   |-9.880923e+00 |-7.614026e-01 |
|  991  |24.7750 |  1   |   0.485625   |   0.660757   |  -5.143244   |-9.882088e+00 |-7.613038e-01 |
|  992  |24.8000 |  1   |   0.511090   |   0.655112   |  -5.142258   |-9.883256e+00 |-7.612048e-01 |
|  993  |24.8250 |  1   |   0.499859   |   0.652944   |  -5.141341   |-9.884426e+00 |-7.611055e-01 |
|  994  |24.8500 |  1   |   0.503584   |   0.657031   |  -5.140395   |-9.885598e+00 |-7.610060e-01 |
|  995  |24.8750 |  1   |   0.487252   |   0.669019   |  -5.139545   |-9.886772e+00 |-7.609062e-01 |
|  996  |24.9000 |  1   |   0.486750   |   0.677291   |  -5.138686   |-9.887948e+00 |-7.608063e-01 |
|  997  |24.9250 |  1   |   0.499252   |   0.655279   |  -5.137821   |-9.889126e+00 |-7.607061e-01 |
|  998  |24.9500 |  1   |   0.490417   |   0.702562   |  -5.137027   |-9.890305e+00 |-7.606058e-01 |
|  999  |24.9750 |  1   |   0.503546   |   0.651132   |  -5.136210   |-9.891487e+00 |-7.605052e-01 |
| 1000  |25.0000 |  1   |   0.483413   |   0.668655   |  -5.135456   |-9.892670e+00 |-7.604045e-01 |
| 1001  |25.0250 |  1   |   0.493134   |   0.660787   |  -5.134750   |-9.893855e+00 |-7.603035e-01 |
| 1002  |25.0500 |  1   |   0.499426   |   0.657750   |  -5.134009   |-9.895041e+00 |-7.602024e-01 |
| 1003  |25.0750 |  1   |   0.494080   |   0.661456   |  -5.133351   |-9.896229e+00 |-7.601011e-01 |
| 1004  |25.1000 |  1   |   0.507680   |   0.664709   |  -5.132659   |-9.897418e+00 |-7.599997e-01 |
| 1005  |25.1250 |  1   |   0.494671   |   0.669049   |  -5.132007   |-9.898609e+00 |-7.598981e-01 |
| 1006  |25.1500 |  1   |   0.509767   |   0.652732   |  -5.131421   |-9.899801e+00 |-7.597964e-01 |
| 1007  |25.1750 |  1   |   0.495492   |   0.653077   |  -5.130814   |-9.900994e+00 |-7.596945e-01 |
| 1008  |25.2000 |  1   |   0.498837   |   0.670956   |  -5.130269   |-9.902188e+00 |-7.595924e-01 |
| 1009  |25.2250 |  1   |   0.500010   |   0.651370   |  -5.129726   |-9.903383e+00 |-7.594903e-01 |
| 1010  |25.2500 |  1   |   0.499026   |   0.649779   |  -5.129186   |-9.904579e+00 |-7.593880e-01 |
| 1011  |25.2750 |  1   |   0.503929   |   0.657456   |  -5.128693   |-9.905776e+00 |-7.592856e-01 |
| 1012  |25.3000 |  1   |   0.502894   |   0.652709   |  -5.128228   |-9.906974e+00 |-7.591831e-01 |
| 1013  |25.3250 |  1   |   0.493295   |   0.659944   |  -5.127776   |-9.908173e+00 |-7.590805e-01 |
| 1014  |25.3500 |  1   |   0.496672   |   0.655548   |  -5.127374   |-9.909372e+00 |-7.589777e-01 |
| 1015  |25.3750 |  1   |   0.496958   |   0.668447   |  -5.126963   |-9.910572e+00 |-7.588749e-01 |
| 1016  |25.4000 |  1   |   0.477043   |   0.671800   |  -5.126575   |-9.911773e+00 |-7.587720e-01 |
| 1017  |25.4250 |  1   |   0.493859   |   0.660183   |  -5.126228   |-9.912974e+00 |-7.586690e-01 |
| 1018  |25.4500 |  1   |   0.497632   |   0.654123   |  -5.125876   |-9.914176e+00 |-7.585660e-01 |
| 1019  |25.4750 |  1   |   0.502519   |   0.653777   |  -5.125597   |-9.915378e+00 |-7.584628e-01 |
| 1020  |25.5000 |  1   |   0.499899   |   0.652161   |  -5.125308   |-9.916580e+00 |-7.583596e-01 |
| 1021  |25.5250 |  1   |   0.505590   |   0.660761   |  -5.125039   |-9.917782e+00 |-7.582564e-01 |
| 1022  |25.5500 |  1   |   0.499622   |   0.658219   |  -5.124808   |-9.918985e+00 |-7.581531e-01 |
| 1023  |25.5750 |  1   |   0.494296   |   0.658807   |  -5.124571   |-9.920187e+00 |-7.580498e-01 |
| 1024  |25.6000 |  1   |   0.499221   |   0.654806   |  -5.124375   |-9.921390e+00 |-7.579464e-01 |
| 1025  |25.6250 |  1   |   0.499540   |   0.652259   |  -5.124226   |-9.922592e+00 |-7.578430e-01 |
| 1026  |25.6500 |  1   |   0.497204   |   0.653026   |  -5.124062   |-9.923795e+00 |-7.577395e-01 |
| 1027  |25.6750 |  1   |   0.498324   |   0.660967   |  -5.123947   |-9.924997e+00 |-7.576361e-01 |
| 1028  |25.7000 |  1   |   0.495586   |   0.657316   |  -5.123838   |-9.926199e+00 |-7.575326e-01 |
| 1029  |25.7250 |  1   |   0.495336   |   0.659465   |  -5.123735   |-9.927401e+00 |-7.574291e-01 |
| 1030  |25.7500 |  1   |   0.498829   |   0.654207   |  -5.123691   |-9.928602e+00 |-7.573256e-01 |
| 1031  |25.7750 |  1   |   0.496229   |   0.656042   |  -5.123643   |-9.929803e+00 |-7.572221e-01 |
| 1032  |25.8000 |  1   |   0.498100   |   0.658060   |  -5.123639   |-9.931003e+00 |-7.571187e-01 |
| 1033  |25.8250 |  1   |   0.493844   |   0.656294   |  -5.123650   |-9.932203e+00 |-7.570152e-01 |
| 1034  |25.8500 |  1   |   0.496206   |   0.652885   |  -5.123656   |-9.933402e+00 |-7.569118e-01 |
| 1035  |25.8750 |  1   |   0.493092   |   0.655715   |  -5.123718   |-9.934600e+00 |-7.568084e-01 |
| 1036  |25.9000 |  1   |   0.499616   |   0.658027   |  -5.123774   |-9.935798e+00 |-7.567050e-01 |
| 1037  |25.9250 |  1   |   0.491226   |   0.658937   |  -5.123870   |-9.936995e+00 |-7.566016e-01 |
| 1038  |25.9500 |  1   |   0.500340   |   0.653876   |  -5.124001   |-9.938190e+00 |-7.564983e-01 |
| 1039  |25.9750 |  1   |   0.495677   |   0.650797   |  -5.124126   |-9.939385e+00 |-7.563951e-01 |
| 1040  |26.0000 |  1   |   0.476759   |   0.680443   |  -5.124280   |-9.940579e+00 |-7.562919e-01 |
| 1041  |26.0250 |  1   |   0.488234   |   0.659470   |  -5.124460   |-9.941772e+00 |-7.561888e-01 |
| 1042  |26.0500 |  1   |   0.504142   |   0.662927   |  -5.124649   |-9.942963e+00 |-7.560857e-01 |
| 1043  |26.0750 |  1   |   0.493124   |   0.657806   |  -5.124875   |-9.944154e+00 |-7.559827e-01 |
| 1044  |26.1000 |  1   |   0.494713   |   0.663481   |  -5.125130   |-9.945343e+00 |-7.558798e-01 |
| 1045  |26.1250 |  1   |   0.490307   |   0.656816   |  -5.125384   |-9.946530e+00 |-7.557770e-01 |
| 1046  |26.1500 |  1   |   0.484677   |   0.662911   |  -5.125675   |-9.947717e+00 |-7.556742e-01 |
| 1047  |26.1750 |  1   |   0.493045   |   0.654708   |  -5.125970   |-9.948901e+00 |-7.555716e-01 |
| 1048  |26.2000 |  1   |   0.538497   |   0.726460   |  -5.126294   |-9.950085e+00 |-7.554690e-01 |
| 1049  |26.2250 |  1   |   0.549513   |   0.737299   |  -5.126653   |-9.951266e+00 |-7.553666e-01 |
| 1050  |26.2500 |  1   |   0.492540   |   0.664606   |  -5.127014   |-9.952446e+00 |-7.552643e-01 |
| 1051  |26.2750 |  1   |   0.493577   |   0.659932   |  -5.127419   |-9.953625e+00 |-7.551620e-01 |
| 1052  |26.3000 |  1   |   0.467239   |   0.712753   |  -5.127825   |-9.954801e+00 |-7.550599e-01 |
| 1053  |26.3250 |  1   |   0.455075   |   0.725685   |  -5.128240   |-9.955976e+00 |-7.549580e-01 |
| 1054  |26.3500 |  1   |   0.475621   |   0.676184   |  -5.128711   |-9.957149e+00 |-7.548561e-01 |
| 1055  |26.3750 |  1   |   0.534025   |   0.705199   |  -5.129171   |-9.958320e+00 |-7.547544e-01 |
| 1056  |26.4000 |  1   |   0.535417   |   0.733416   |  -5.129674   |-9.959488e+00 |-7.546529e-01 |
| 1057  |26.4250 |  1   |   0.490559   |   0.667110   |  -5.130201   |-9.960655e+00 |-7.545515e-01 |
| 1058  |26.4500 |  1   |   0.492721   |   0.667776   |  -5.130724   |-9.961820e+00 |-7.544502e-01 |
| 1059  |26.4750 |  1   |   0.469686   |   0.716404   |  -5.131284   |-9.962982e+00 |-7.543491e-01 |
| 1060  |26.5000 |  1   |   0.461801   |   0.727427   |  -5.131858   |-9.964142e+00 |-7.542482e-01 |
| 1061  |26.5250 |  1   |   0.464589   |   0.694128   |  -5.132457   |-9.965300e+00 |-7.541474e-01 |
| 1062  |26.5500 |  1   |   0.471781   |   0.706331   |  -5.133085   |-9.966456e+00 |-7.540468e-01 |
| 1063  |26.5750 |  1   |   0.459214   |   0.698293   |  -5.133724   |-9.967609e+00 |-7.539464e-01 |
| 1064  |26.6000 |  1   |   0.465039   |   0.701240   |  -5.134387   |-9.968759e+00 |-7.538461e-01 |
| 1065  |26.6250 |  1   |   0.469236   |   0.698958   |  -5.135067   |-9.969907e+00 |-7.537461e-01 |
| 1066  |26.6500 |  1   |   0.464358   |   0.702767   |  -5.135759   |-9.971053e+00 |-7.536462e-01 |
| 1067  |26.6750 |  1   |   0.465766   |   0.699608   |  -5.136493   |-9.972195e+00 |-7.535466e-01 |
| 1068  |26.7000 |  1   |   0.459619   |   0.698973   |  -5.084913   |-9.973335e+00 |-7.534475e-01 |
| 1069  |26.7250 |  1   |   0.476216   |   0.700416   |  -5.145987   |-9.974473e+00 |-7.533490e-01 |
| 1070  |26.7500 |  1   |   0.480763   |   0.738047   |  -5.138887   |-9.975607e+00 |-7.532503e-01 |
| 1071  |26.7750 |  1   |   0.461171   |   0.701831   |  -5.135784   |-9.976739e+00 |-7.531516e-01 |
| 1072  |26.8000 |  1   |   0.447415   |   0.732048   |  -5.142042   |-9.977868e+00 |-7.530534e-01 |
| 1073  |26.8250 |  1   |   0.463453   |   0.697525   |  -5.138247   |-9.978994e+00 |-7.529551e-01 |
| 1074  |26.8500 |  1   |   0.461543   |   0.697473   |  -5.135863   |-9.980116e+00 |-7.528572e-01 |
| 1075  |26.8750 |  1   |   0.457196   |   0.716596   |  -5.141322   |-9.981236e+00 |-7.527593e-01 |
| 1076  |26.9000 |  1   |   0.468679   |   0.696296   |  -5.138910   |-9.982352e+00 |-7.526616e-01 |
| 1077  |26.9250 |  1   |   0.461713   |   0.706081   |  -5.146215   |-9.983465e+00 |-7.525640e-01 |
| 1078  |26.9500 |  1   |   0.466057   |   0.697697   |  -5.150453   |-9.984575e+00 |-7.524668e-01 |
| 1079  |26.9750 |  1   |   0.464665   |   0.702892   |  -5.143797   |-9.985682e+00 |-7.523698e-01 |
| 1080  |27.0000 |  1   |   0.460304   |   0.700288   |  -5.148337   |-9.986785e+00 |-7.522730e-01 |
| 1081  |27.0250 |  1   |   0.487071   |   0.704852   |  -5.146060   |-9.987885e+00 |-7.521765e-01 |
| 1082  |27.0500 |  1   |   0.491921   |   0.701263   |  -5.148301   |-9.988981e+00 |-7.520802e-01 |
| 1083  |27.0750 |  1   |   0.514891   |   0.691098   |  -5.155984   |-9.990075e+00 |-7.519842e-01 |
| 1084  |27.1000 |  1   |   0.511289   |   0.700004   |  -5.152389   |-9.991164e+00 |-7.518885e-01 |
| 1085  |27.1250 |  1   |   0.464907   |   0.689621   |  -5.154942   |-9.992250e+00 |-7.517932e-01 |
| 1086  |27.1500 |  1   |   0.522192   |   0.703924   |  -5.152321   |-9.993332e+00 |-7.516980e-01 |
| 1087  |27.1750 |  1   |   0.482099   |   0.686301   |  -5.150296   |-9.994411e+00 |-7.516032e-01 |
| 1088  |27.2000 |  1   |   0.484473   |   0.666338   |  -5.158286   |-9.995485e+00 |-7.515087e-01 |
| 1089  |27.2250 |  1   |   0.465606   |   0.714366   |  -5.158936   |-9.996557e+00 |-7.514145e-01 |
| 1090  |27.2500 |  1   |   0.455517   |   0.696506   |  -5.159762   |-9.997624e+00 |-7.513207e-01 |
| 1091  |27.2750 |  1   |   0.466815   |   0.703345   |  -5.162399   |-9.998687e+00 |-7.512272e-01 |
| 1092  |27.3000 |  1   |   0.456211   |   0.701992   |  -5.156860   |-9.999747e+00 |-7.511339e-01 |
| 1093  |27.3250 |  1   |   0.465226   |   0.696526   |  -5.159533   |-1.000080e+01 |-7.510410e-01 |
| 1094  |27.3500 |  1   |   0.512126   |   0.700777   |  -5.164709   |-1.000185e+01 |-7.509483e-01 |
| 1095  |27.3750 |  1   |   0.479834   |   0.671114   |  -5.164529   |-1.000290e+01 |-7.508561e-01 |
| 1096  |27.4000 |  1   |   0.492537   |   0.673946   |  -5.170199   |-1.000394e+01 |-7.507642e-01 |
| 1097  |27.4250 |  1   |   0.489561   |   0.672850   |  -5.167845   |-1.000498e+01 |-7.506725e-01 |
| 1098  |27.4500 |  1   |   0.488160   |   0.668952   |  -5.165967   |-1.000602e+01 |-7.505812e-01 |
| 1099  |27.4750 |  1   |   0.519246   |   0.695777   |  -5.169713   |-1.000705e+01 |-7.504902e-01 |
| 1100  |27.5000 |  1   |   0.489192   |   0.667250   |  -5.170115   |-1.000808e+01 |-7.503995e-01 |
| 1101  |27.5250 |  1   |   0.499167   |   0.682266   |  -5.175767   |-1.000910e+01 |-7.503093e-01 |
| 1102  |27.5500 |  1   |   0.492088   |   0.672850   |  -5.178382   |-1.001011e+01 |-7.502193e-01 |
| 1103  |27.5750 |  1   |   0.487768   |   0.663787   |  -5.175107   |-1.001113e+01 |-7.501297e-01 |
| 1104  |27.6000 |  1   |   0.493979   |   0.674322   |  -5.178327   |-1.001214e+01 |-7.500404e-01 |
| 1105  |27.6250 |  1   |   0.490692   |   0.663366   |  -5.177274   |-1.001314e+01 |-7.499515e-01 |
| 1106  |27.6500 |  1   |   0.492805   |   0.674422   |  -5.178603   |-1.001414e+01 |-7.498630e-01 |
| 1107  |27.6750 |  1   |   0.485858   |   0.664090   |  -5.187219   |-1.001513e+01 |-7.497748e-01 |
| 1108  |27.7000 |  1   |   0.486335   |   0.663156   |  -5.184418   |-1.001613e+01 |-7.496872e-01 |
| 1109  |27.7250 |  1   |   0.494404   |   0.702291   |  -5.186787   |-1.001711e+01 |-7.495997e-01 |
| 1110  |27.7500 |  1   |   0.446076   |   0.705973   |  -5.187599   |-1.001809e+01 |-7.495127e-01 |
| 1111  |27.7750 |  1   |   0.482750   |   0.662560   |  -5.184811   |-1.001907e+01 |-7.494261e-01 |
| 1112  |27.8000 |  1   |   0.476889   |   0.669748   |  -5.191664   |-1.002004e+01 |-7.493398e-01 |
| 1113  |27.8250 |  1   |   0.492741   |   0.670303   |  -5.192749   |-1.002101e+01 |-7.492541e-01 |
| 1114  |27.8500 |  1   |   0.481042   |   0.663581   |  -5.195669   |-1.002197e+01 |-7.491686e-01 |
| 1115  |27.8750 |  1   |   0.484773   |   0.664162   |  -5.197804   |-1.002292e+01 |-7.490836e-01 |
| 1116  |27.9000 |  1   |   0.471439   |   0.679314   |  -5.194899   |-1.002388e+01 |-7.489990e-01 |
| 1117  |27.9250 |  1   |   0.484387   |   0.664117   |  -5.198012   |-1.002482e+01 |-7.489147e-01 |
| 1118  |27.9500 |  1   |   0.485070   |   0.664848   |  -5.200681   |-1.002576e+01 |-7.488309e-01 |
| 1119  |27.9750 |  1   |   0.483672   |   0.663051   |  -5.202168   |-1.002670e+01 |-7.487475e-01 |
| 1120  |28.0000 |  1   |   0.483831   |   0.665529   |  -5.208302   |-1.002763e+01 |-7.486645e-01 |
| 1121  |28.0250 |  1   |   0.486482   |   0.662659   |  -5.207243   |-1.002856e+01 |-7.485818e-01 |
| 1122  |28.0500 |  1   |   0.484792   |   0.665026   |  -5.206583   |-1.002948e+01 |-7.484996e-01 |
| 1123  |28.0750 |  1   |   0.484451   |   0.669203   |  -5.210633   |-1.003040e+01 |-7.484179e-01 |
| 1124  |28.1000 |  1   |   0.483054   |   0.665843   |  -5.210285   |-1.003131e+01 |-7.483365e-01 |
| 1125  |28.1250 |  1   |   0.479900   |   0.666058   |  -5.215282   |-1.003221e+01 |-7.482556e-01 |
| 1126  |28.1500 |  1   |   0.481851   |   0.666201   |  -5.219299   |-1.003311e+01 |-7.481751e-01 |
| 1127  |28.1750 |  1   |   0.483100   |   0.663770   |  -5.218610   |-1.003401e+01 |-7.480950e-01 |
| 1128  |28.2000 |  1   |   0.485134   |   0.663042   |  -5.220768   |-1.003490e+01 |-7.480154e-01 |
| 1129  |28.2250 |  1   |   0.489655   |   0.667828   |  -5.221060   |-1.003578e+01 |-7.479362e-01 |
| 1130  |28.2500 |  1   |   0.480716   |   0.672463   |  -5.223165   |-1.003666e+01 |-7.478574e-01 |
| 1131  |28.2750 |  1   |   0.483455   |   0.666447   |  -5.228675   |-1.003753e+01 |-7.477791e-01 |
| 1132  |28.3000 |  1   |   0.483978   |   0.671011   |  -5.229529   |-1.003840e+01 |-7.477012e-01 |
| 1133  |28.3250 |  1   |   0.475710   |   0.669280   |  -5.232726   |-1.003926e+01 |-7.476238e-01 |
| 1134  |28.3500 |  1   |   0.479361   |   0.669395   |  -5.234044   |-1.004012e+01 |-7.475468e-01 |
| 1135  |28.3750 |  1   |   0.496386   |   0.682017   |  -5.232092   |-1.004097e+01 |-7.474703e-01 |
| 1136  |28.4000 |  1   |   0.485283   |   0.674847   |  -5.238405   |-1.004182e+01 |-7.473943e-01 |
| 1137  |28.4250 |  1   |   0.479666   |   0.672826   |  -5.240062   |-1.004266e+01 |-7.473187e-01 |
| 1138  |28.4500 |  1   |   0.479845   |   0.676287   |  -5.242591   |-1.004349e+01 |-7.472436e-01 |
| 1139  |28.4750 |  1   |   0.481158   |   0.666536   |  -5.247594   |-1.004432e+01 |-7.471689e-01 |
| 1140  |28.5000 |  1   |   0.483141   |   0.667308   |  -5.245477   |-1.004514e+01 |-7.470948e-01 |
| 1141  |28.5250 |  1   |   0.486443   |   0.666994   |  -5.248138   |-1.004596e+01 |-7.470210e-01 |
| 1142  |28.5500 |  1   |   0.479723   |   0.665961   |  -5.251076   |-1.004677e+01 |-7.469478e-01 |
| 1143  |28.5750 |  1   |   0.478889   |   0.668256   |  -5.253471   |-1.004757e+01 |-7.468750e-01 |
| 1144  |28.6000 |  1   |   0.480882   |   0.666810   |  -5.258529   |-1.004837e+01 |-7.468027e-01 |
| 1145  |28.6250 |  1   |   0.474088   |   0.675753   |  -5.259920   |-1.004917e+01 |-7.467310e-01 |
| 1146  |28.6500 |  1   |   0.480283   |   0.668231   |  -5.261212   |-1.004995e+01 |-7.466596e-01 |
| 1147  |28.6750 |  1   |   0.480788   |   0.674629   |  -5.263745   |-1.005073e+01 |-7.465887e-01 |
| 1148  |28.7000 |  1   |   0.480191   |   0.669986   |  -5.264326   |-1.005151e+01 |-7.465184e-01 |
| 1149  |28.7250 |  1   |   0.470319   |   0.675661   |  -5.269713   |-1.005228e+01 |-7.464485e-01 |
| 1150  |28.7500 |  1   |   0.480411   |   0.673238   |  -5.273651   |-1.005304e+01 |-7.463791e-01 |
| 1151  |28.7750 |  1   |   0.473258   |   0.678330   |  -5.274198   |-1.005380e+01 |-7.463102e-01 |
| 1152  |28.8000 |  1   |   0.478426   |   0.670399   |  -5.278360   |-1.005455e+01 |-7.462418e-01 |
| 1153  |28.8250 |  1   |   0.481835   |   0.677192   |  -5.278659   |-1.005530e+01 |-7.461739e-01 |
| 1154  |28.8500 |  1   |   0.477153   |   0.671792   |  -5.280378   |-1.005604e+01 |-7.461065e-01 |
| 1155  |28.8750 |  1   |   0.483710   |   0.675545   |  -5.286094   |-1.005677e+01 |-7.460396e-01 |
| 1156  |28.9000 |  1   |   0.478907   |   0.667440   |  -5.288677   |-1.005750e+01 |-7.459732e-01 |
| 1157  |28.9250 |  1   |   0.476032   |   0.683400   |  -5.291475   |-1.005822e+01 |-7.459074e-01 |
| 1158  |28.9500 |  1   |   0.478212   |   0.670153   |  -5.294549   |-1.005893e+01 |-7.458420e-01 |
| 1159  |28.9750 |  1   |   0.490696   |   0.674169   |  -5.294755   |-1.005964e+01 |-7.457771e-01 |
| 1160  |29.0000 |  1   |   0.478562   |   0.668860   |  -5.298482   |-1.006034e+01 |-7.457127e-01 |
| 1161  |29.0250 |  1   |   0.477472   |   0.670187   |  -5.301871   |-1.006104e+01 |-7.456489e-01 |
| 1162  |29.0500 |  1   |   0.481258   |   0.684804   |  -5.305298   |-1.006173e+01 |-7.455856e-01 |
| 1163  |29.0750 |  1   |   0.460059   |   0.686929   |  -5.310364   |-1.006241e+01 |-7.455228e-01 |
| 1164  |29.1000 |  1   |   0.448954   |   0.699926   |  -5.310048   |-1.006309e+01 |-7.454605e-01 |
| 1165  |29.1250 |  1   |   0.453478   |   0.709623   |  -5.313561   |-1.006376e+01 |-7.453987e-01 |
| 1166  |29.1500 |  1   |   0.445714   |   0.707670   |  -5.316738   |-1.006442e+01 |-7.453374e-01 |
| 1167  |29.1750 |  1   |   0.452987   |   0.698719   |  -5.318177   |-1.006508e+01 |-7.452767e-01 |
| 1168  |29.2000 |  1   |   0.449597   |   0.705269   |  -5.325022   |-1.006573e+01 |-7.452165e-01 |
| 1169  |29.2250 |  1   |   0.490915   |   0.676666   |  -5.327513   |-1.006637e+01 |-7.451568e-01 |
| 1170  |29.2500 |  1   |   0.449594   |   0.712068   |  -5.328948   |-1.006701e+01 |-7.450977e-01 |
| 1171  |29.2750 |  1   |   0.457821   |   0.707891   |  -5.332960   |-1.006764e+01 |-7.450391e-01 |
| 1172  |29.3000 |  1   |   0.451920   |   0.700959   |  -5.334478   |-1.006827e+01 |-7.449809e-01 |
| 1173  |29.3250 |  1   |   0.457635   |   0.705507   |  -5.338479   |-1.006889e+01 |-7.449234e-01 |
| 1174  |29.3500 |  1   |   0.447267   |   0.700000   |  -5.343494   |-1.006950e+01 |-7.448664e-01 |
| 1175  |29.3750 |  1   |   0.458476   |   0.705746   |  -5.346398   |-1.007011e+01 |-7.448099e-01 |
| 1176  |29.4000 |  1   |   0.450082   |   0.701366   |  -5.350024   |-1.007071e+01 |-7.447539e-01 |
| 1177  |29.4250 |  1   |   0.476268   |   0.681734   |  -5.351738   |-1.007130e+01 |-7.446985e-01 |
| 1178  |29.4500 |  1   |   0.460729   |   0.691428   |  -5.354504   |-1.007189e+01 |-7.446436e-01 |
| 1179  |29.4750 |  1   |   0.457731   |   0.717534   |  -5.359754   |-1.007247e+01 |-7.445893e-01 |
| 1180  |29.5000 |  1   |   0.448818   |   0.702547   |  -5.362285   |-1.007304e+01 |-7.445355e-01 |
| 1181  |29.5250 |  1   |   0.444427   |   0.710591   |  -5.367519   |-1.007361e+01 |-7.444822e-01 |
| 1182  |29.5500 |  1   |   0.449657   |   0.703114   |  -5.371200   |-1.007417e+01 |-7.444295e-01 |
| 1183  |29.5750 |  1   |   0.440618   |   0.711450   |  -5.371774   |-1.007472e+01 |-7.443773e-01 |
| 1184  |29.6000 |  1   |   0.446356   |   0.706056   |  -5.376509   |-1.007527e+01 |-7.443257e-01 |
| 1185  |29.6250 |  1   |   0.448475   |   0.708371   |  -5.380511   |-1.007581e+01 |-7.442746e-01 |
| 1186  |29.6500 |  1   |   0.448725   |   0.706641   |  -5.383604   |-1.007634e+01 |-7.442241e-01 |
| 1187  |29.6750 |  1   |   0.467714   |   0.685492   |  -5.389558   |-1.007687e+01 |-7.441741e-01 |
| 1188  |29.7000 |  1   |   0.469720   |   0.679917   |  -5.392343   |-1.007739e+01 |-7.441247e-01 |
| 1189  |29.7250 |  1   |   0.472234   |   0.676739   |  -5.394581   |-1.007790e+01 |-7.440758e-01 |
| 1190  |29.7500 |  1   |   0.471790   |   0.681953   |  -5.398936   |-1.007841e+01 |-7.440275e-01 |
| 1191  |29.7750 |  1   |   0.467655   |   0.680340   |  -5.401760   |-1.007891e+01 |-7.439797e-01 |
| 1192  |29.8000 |  1   |   0.474229   |   0.672687   |  -5.407802   |-1.007940e+01 |-7.439325e-01 |
| 1193  |29.8250 |  1   |   0.476449   |   0.675359   |  -5.411367   |-1.007989e+01 |-7.438858e-01 |
| 1194  |29.8500 |  1   |   0.476582   |   0.678527   |  -5.415002   |-1.008037e+01 |-7.438397e-01 |
| 1195  |29.8750 |  1   |   0.472185   |   0.686604   |  -5.419606   |-1.008084e+01 |-7.437942e-01 |
| 1196  |29.9000 |  1   |   0.471914   |   0.678537   |  -5.420797   |-1.008131e+01 |-7.437492e-01 |
| 1197  |29.9250 |  1   |   0.466368   |   0.687928   |  -5.426230   |-1.008177e+01 |-7.437047e-01 |
| 1198  |29.9500 |  1   |   0.471255   |   0.677494   |  -5.431831   |-1.008222e+01 |-7.436608e-01 |
| 1199  |29.9750 |  1   |   0.474277   |   0.679189   |  -5.434645   |-1.008267e+01 |-7.436175e-01 |
| 1200  |30.0000 |  1   |   0.470302   |   0.680280   |  -5.440101   |-1.008311e+01 |-7.435748e-01 |
...Finished
FINISHED - Elapsed time = 897.2004556 seconds
FINISHED - CPU process time = 1055.3392616 seconds

The resulting data structure that is returned from the call to main contains all the time-dependant variables for both the structural and aerodynamic solvers.

timestep_info can be found in case_data.structure and case_data.aero. It is an array with custom-made structure to contain the data of each solver.

In the .sharpy file, we can see which solvers are run:

flow = ['BeamLoader',
        'AerogridLoader',
        'StaticTrim',
        'BeamLoads',
        'AerogridPlot',
        'BeamPlot',
        'DynamicCoupled',
        ]

In order:

  • BeamLoader: reads the fem.h5 file and generates the structure for the beam solver.

  • AerogridLoader: reads the aero.h5 file and generates the aerodynamic grid for the aerodynamic solver.

  • StaticTrim: this solver performs a longitudinal trim (Thrust, Angle of attack and Elevator deflection) using the StaticCoupled solver.

  • BeamLoads: calculates the internal beam loads for the static solution

  • AerogridPlot: outputs the aerodynamic grid for the static solution.

  • BeamPlot: outputs the structural discretisation for the static solution.

  • DynamicCoupled: is the main driver of the dynamic simulation: executes the structural and aerodynamic solvers and couples both. Every converged time step is followed by a BeamLoads, AerogridPlot and BeamPlot execution.

Structural data organisation

The timestep_info structure contains several relevant variables:

  • for_pos: position of the body-attached frame of reference in inertial FoR.

  • for_vel: velocity (in body FoR) of the body FoR wrt inertial FoR.

  • pos: nodal position in A FoR.

  • psi: nodal rotations (from the material B FoR to A FoR) in a Cartesian Rotation Vector parametrisation.

  • applied_steady_forces: nodal forces from the aero solver and the applied forces.

  • postproc_cell: is a dictionary that contains the variables generated by a postprocessor, such as the internal beam loads.

The structural timestep_info also contains some useful variables:

  • cag and cga return \(C^{AG}\) and \(C^{GA}\), the rotation matrices from the body-attached (A) FoR to the inertial (G).

  • glob_pos rotates the pos variable to give you the inertial nodal position. If include_rbm = True is passed, for_pos is added to it.

Aerodynamic data organisation

The aerodynamic datastructure can be found in case_data.aero.timestep_info. It contains useful variables, such as:

  • dimensions and dimensions_star: gives the dimensions of every surface and wake surface. Organised as: dimensions[i_surf, 0] = chordwise panels, dimensions[i_surf, 1] = spanwise panels.

  • zeta and zeta_star: they are the \(G\) FoR coordinates of the surface vertices.

  • gamma and gamma_star: vortex ring circulations.

Structural dynamics

We can now plot the rigid body dynamics:

RBM trajectory

[8]:
fig, ax = plt.subplots(1, 1, figsize=(7, 4))

# extract information
n_tsteps = len(case_data.structure.timestep_info)
xz = np.zeros((n_tsteps, 2))
for it in range(n_tsteps):
    xz[it, 0] = -case_data.structure.timestep_info[it].for_pos[0] # the - is so that increasing time -> increasing x
    xz[it, 1] = case_data.structure.timestep_info[it].for_pos[2]
ax.plot(xz[:, 0], xz[:, 1])
fig.suptitle('Longitudinal trajectory of the T-Tail model in a 20% 1-cos gust encounter')
ax.set_xlabel('X [m]')
ax.set_ylabel('Z [m]');
plt.show()
_images/content_example_notebooks_nonlinear_t-tail_HALE_22_0.svg

RBM velocities

[10]:
fig, ax = plt.subplots(3, 1, figsize=(7, 6), sharex=True)
ylabels = ['Vx [m/s]', 'Vy [m/s]', 'Vz [m/s]']

# extract information
n_tsteps = len(case_data.structure.timestep_info)
dt = case_data.settings['DynamicCoupled']['dt']
time_vec = np.linspace(0, n_tsteps*dt, n_tsteps)
for_vel = np.zeros((n_tsteps, 3))
for it in range(n_tsteps):
    for_vel[it, 0:3] = case_data.structure.timestep_info[it].for_vel[0:3]

for idim in range(3):
    ax[idim].plot(time_vec, for_vel[:, idim])
    ax[idim].set_ylabel(ylabels[idim])

ax[2].set_xlabel('time [s]')
plt.subplots_adjust(hspace=0)
fig.suptitle('Linear RBM velocities. T-Tail model in a 20% 1-cos gust encounter');
# ax.set_xlabel('X [m]')
# ax.set_ylabel('Z [m]');
plt.show()
_images/content_example_notebooks_nonlinear_t-tail_HALE_24_0.svg
[12]:
fig, ax = plt.subplots(3, 1, figsize=(7, 6), sharex=True)
ylabels = ['Roll rate [deg/s]', 'Pitch rate [deg/s]', 'Yaw rate [deg/s]']

# extract information
n_tsteps = len(case_data.structure.timestep_info)
dt = case_data.settings['DynamicCoupled']['dt']
time_vec = np.linspace(0, n_tsteps*dt, n_tsteps)
for_vel = np.zeros((n_tsteps, 3))
for it in range(n_tsteps):
    for_vel[it, 0:3] = case_data.structure.timestep_info[it].for_vel[3:6]*180/np.pi

for idim in range(3):
    ax[idim].plot(time_vec, for_vel[:, idim])
    ax[idim].set_ylabel(ylabels[idim])

ax[2].set_xlabel('time [s]')
plt.subplots_adjust(hspace=0)
fig.suptitle('Angular RBM velocities. T-Tail model in a 20% 1-cos gust encounter');
# ax.set_xlabel('X [m]')
# ax.set_ylabel('Z [m]');
plt.show()
_images/content_example_notebooks_nonlinear_t-tail_HALE_25_0.svg

Wing tip deformation

It is stored in timestep_info as pos. We need to find the correct node.

[13]:
fig, ax = plt.subplots(1, 1, figsize=(6, 6))
ax.scatter(case_data.structure.ini_info.pos[:, 0], case_data.structure.ini_info.pos[:, 1])
ax.axis('equal')
tip_node = np.argmax(case_data.structure.ini_info.pos[:, 1])
print('Wing tip node is the maximum Y one: ', tip_node)
ax.scatter(case_data.structure.ini_info.pos[tip_node, 0], case_data.structure.ini_info.pos[tip_node, 1], color='red')
plt.show()
Wing tip node is the maximum Y one:  16
_images/content_example_notebooks_nonlinear_t-tail_HALE_27_1.svg

We can plot now the pos[tip_node,:] variable:

[14]:
fig, ax = plt.subplots(1, 1, figsize=(7, 3))

# extract information
n_tsteps = len(case_data.structure.timestep_info)
xz = np.zeros((n_tsteps, 2))
for it in range(n_tsteps):
    xz[it, 0] = case_data.structure.timestep_info[it].pos[tip_node, 0]
    xz[it, 1] = case_data.structure.timestep_info[it].pos[tip_node, 2]
ax.plot(time_vec, xz[:, 1])
# fig.suptitle('Longitudinal trajectory of the T-Tail model in a 20% 1-cos gust encounter')
ax.set_xlabel('time [s]')
ax.set_ylabel('Vertical disp. [m]');
plt.show()
_images/content_example_notebooks_nonlinear_t-tail_HALE_29_0.svg
[15]:
fig, ax = plt.subplots(1, 1, figsize=(7, 3))

# extract information
n_tsteps = len(case_data.structure.timestep_info)
xz = np.zeros((n_tsteps, 2))
for it in range(n_tsteps):
    xz[it, 0] = case_data.structure.timestep_info[it].pos[tip_node, 0]
    xz[it, 1] = case_data.structure.timestep_info[it].pos[tip_node, 2]
ax.plot(time_vec, xz[:, 0])
# fig.suptitle('Longitudinal trajectory of the T-Tail model in a 20% 1-cos gust encounter')
ax.set_xlabel('time [s]')
ax.set_ylabel('Horizontal disp. [m]\nPositive is aft');
plt.show()
_images/content_example_notebooks_nonlinear_t-tail_HALE_30_0.svg

Wing root loads

The wing root loads can be extracted from the postproc_cell structure in timestep_info.

[17]:
fig, ax = plt.subplots(3, 1, figsize=(7, 6), sharex=True)
ylabels = ['Torsion [Nm2]', 'OOP [Nm2]', 'IP [Nm2]']

# extract information
n_tsteps = len(case_data.structure.timestep_info)
dt = case_data.settings['DynamicCoupled']['dt']
time_vec = np.linspace(0, n_tsteps*dt, n_tsteps)
loads = np.zeros((n_tsteps, 3))
for it in range(n_tsteps):
    loads[it, 0:3] = case_data.structure.timestep_info[it].postproc_cell['loads'][0, 3:6]

for idim in range(3):
    ax[idim].plot(time_vec, loads[:, idim])
    ax[idim].set_ylabel(ylabels[idim])

ax[2].set_xlabel('time [s]')
plt.subplots_adjust(hspace=0)
fig.suptitle('Wing root loads. T-Tail model in a 20% 1-cos gust encounter');
# ax.set_xlabel('X [m]')
# ax.set_ylabel('Z [m]');
plt.show()
_images/content_example_notebooks_nonlinear_t-tail_HALE_32_0.svg
Aerodynamic analysis

The aerodynamic analysis can be obviously conducted using python. However, the easiest way is to run the case by yourself and open the files in output/simple_HALE/beam and output/simple_HALE/aero with Paraview.

[18]:
url = 'https://raw.githubusercontent.com/ImperialCollegeLondon/sharpy/dev_doc/docs/source/content/example_notebooks/images/t-tail_solution.png'
Image(url=url, width=600)
[18]:

Asymptotic Stability of a Flying Wing in Cruise Trimmed Conditions

A Horten flying wing is analysed. The nonlinear trim condition is found and the system is linearised. The eigenvalues of the linearised system are then used to evaluate the stability at the cruise trimmed flight conditions.

[1]:
# required packages
import sharpy.utils.algebra as algebra
import sharpy.sharpy_main
from cases.hangar.richards_wing import Baseline
import numpy as np
import configobj
import matplotlib.pyplot as plt
Flight Conditions

Initial flight conditions. The values for angle of attack alpha, control surface deflection cs_deflection and thrust are only initial values. The values required for trim will be calculated by the StaticTrim routine

[2]:
u_inf = 28
alpha_deg = 4.5135
cs_deflection = 0.1814
thrust = 5.5129
Discretisation
[3]:
M = 4  # chordwise panels
N = 11  # spanwise panels
Msf = 5  # wake length in chord numbers
Create Horten Wing
[4]:
ws = Baseline(M=M,
              N=N,
              Mstarfactor=Msf,
              u_inf=u_inf,
              rho=1.02,
              alpha_deg=alpha_deg,
              roll_deg=0,
              cs_deflection_deg=cs_deflection,
              thrust=thrust,
              physical_time=20,
              case_name='horten',
              case_name_format=4,
              case_remarks='M%gN%gMsf%g' % (M, N, Msf))

ws.set_properties()
ws.initialise()
ws.clean_test_files()

ws.update_mass_stiffness(sigma=1., sigma_mass=2.5)
ws.update_fem_prop()
ws.generate_fem_file()
ws.update_aero_properties()
ws.generate_aero_file()
0
Section Mass: 11.88
Linear Mass: 11.88
Section Ixx: 1.8777
Section Iyy: 1.0137
Section Izz: 2.5496
Linear Ixx: 1.88
1
Section Mass: 10.99
Linear Mass: 10.99
Section Ixx: 1.4694
Section Iyy: 0.9345
Section Izz: 2.1501
Linear Ixx: 1.74
2
Section Mass: 10.10
Linear Mass: 10.10
Section Ixx: 1.1257
Section Iyy: 0.8561
Section Izz: 1.7993
Linear Ixx: 1.60
3
Section Mass: 9.21
Linear Mass: 9.21
Section Ixx: 0.8410
Section Iyy: 0.7783
Section Izz: 1.4933
Linear Ixx: 1.46
4
Section Mass: 8.32
Linear Mass: 8.32
Section Ixx: 0.6096
Section Iyy: 0.7011
Section Izz: 1.2280
Linear Ixx: 1.31
5
Section Mass: 7.43
Linear Mass: 7.43
Section Ixx: 0.4260
Section Iyy: 0.6246
Section Izz: 0.9996
Linear Ixx: 1.17
6
Section Mass: 6.54
Linear Mass: 6.54
Section Ixx: 0.2845
Section Iyy: 0.5485
Section Izz: 0.8040
Linear Ixx: 1.03
7
Section Mass: 5.64
Linear Mass: 5.64
Section Ixx: 0.1796
Section Iyy: 0.4728
Section Izz: 0.6374
Linear Ixx: 0.89
8
Section Mass: 4.75
Linear Mass: 4.75
Section Ixx: 0.1055
Section Iyy: 0.3975
Section Izz: 0.4959
Linear Ixx: 0.75
9
Section Mass: 3.86
Linear Mass: 3.86
Section Ixx: 0.0567
Section Iyy: 0.3226
Section Izz: 0.3753
Linear Ixx: 0.61
10
Section Mass: 2.97
Linear Mass: 2.97
Section Ixx: 0.0275
Section Iyy: 0.2479
Section Izz: 0.2719
Linear Ixx: 0.47
Simulation Information

The flow setting tells SHARPy which solvers to run and in which order. You may be stranged by the presence of the DynamicCoupled solver but it is necessary to give an initial speed to the structure. This will allow proper linearisation of the structural and rigid body equations.

[5]:
flow = ['BeamLoader',
        'AerogridLoader',
        'StaticTrim',
        'BeamPlot',
        'AerogridPlot',
        'AeroForcesCalculator',
        'DynamicCoupled',
        'Modal',
        'LinearAssembler',
        'AsymptoticStability',
        ]
SHARPy Settings
[6]:
settings = dict()
settings['SHARPy'] = {'case': ws.case_name,
                      'route': ws.case_route,
                      'flow': flow,
                      'write_screen': 'on',
                      'write_log': 'on',
                      'log_folder': './output/',
                      'log_file': ws.case_name + '.log'}


Loaders
[7]:
settings['BeamLoader'] = {'unsteady': 'off',
                          'orientation': algebra.euler2quat(np.array([ws.roll,
                                                                      ws.alpha,
                                                                      ws.beta]))}
settings['AerogridLoader'] = {'unsteady': 'off',
                              'aligned_grid': 'on',
                              'mstar': int(ws.M * ws.Mstarfactor),
                              'freestream_dir': ['1', '0', '0'],
                              'control_surface_deflection': [''],
                              'wake_shape_generator': 'StraightWake',
                              'wake_shape_generator_input': {'u_inf': ws.u_inf,
                                    'u_inf_direction': ['1', '0', '0'],
                                    'dt': ws.dt}}
StaticCoupled Solver
[8]:
settings['StaticCoupled'] = {'print_info': 'on',
                             'structural_solver': 'NonLinearStatic',
                             'structural_solver_settings': {'print_info': 'off',
                                                            'max_iterations': 200,
                                                            'num_load_steps': 1,
                                                            'delta_curved': 1e-5,
                                                            'min_delta': ws.tolerance,
                                                            'gravity_on': 'on',
                                                            'gravity': 9.81},
                             'aero_solver': 'StaticUvlm',
                             'aero_solver_settings': {'print_info': 'on',
                                                      'horseshoe': ws.horseshoe,
                                                      'num_cores': 4,
                                                      'n_rollup': int(0),
                                                      'rollup_dt': ws.dt,
                                                      'rollup_aic_refresh': 1,
                                                      'rollup_tolerance': 1e-4,
                                                      'velocity_field_generator': 'SteadyVelocityField',
                                                      'velocity_field_input': {'u_inf': ws.u_inf,
                                                                               'u_inf_direction': [1., 0, 0]},
                                                      'rho': ws.rho},
                             'max_iter': 200,
                             'n_load_steps': 1,
                             'tolerance': ws.tolerance,
                             'relaxation_factor': 0.2}
Trim solver
[9]:
settings['StaticTrim'] = {'solver': 'StaticCoupled',
                          'solver_settings': settings['StaticCoupled'],
                          'thrust_nodes': ws.thrust_nodes,
                          'initial_alpha': ws.alpha,
                          'initial_deflection': ws.cs_deflection,
                          'initial_thrust': ws.thrust,
                          'max_iter': 200,
                          'fz_tolerance': 1e-2,
                          'fx_tolerance': 1e-2,
                          'm_tolerance': 1e-2}
Nonlinear Equilibrium Post-process
[10]:
settings['AerogridPlot'] = {
                            'include_rbm': 'off',
                            'include_applied_forces': 'on',
                            'minus_m_star': 0,
                            'u_inf': ws.u_inf
                            }
settings['AeroForcesCalculator'] = {
                                    'write_text_file': 'off',
                                    'text_file_name': ws.case_name + '_aeroforces.csv',
                                    'screen_output': 'on',
                                    'unsteady': 'off',
                                    'coefficients': True,
                                    'q_ref': 0.5 * ws.rho * ws.u_inf ** 2,
                                    'S_ref': 12.809,
                                    }

settings['BeamPlot'] = {
                        'include_rbm': 'on',
                        'include_applied_forces': 'on',
                        'include_FoR': 'on'}
DynamicCoupled Solver

As mentioned before, a single time step of DynamicCoupled is required to give the structure the velocity required for the linearisation of the rigid body equations to be correct. Hence n_time_steps = 1

[11]:
struct_solver_settings = {'print_info': 'off',
                          'initial_velocity_direction': [-1., 0., 0.],
                          'max_iterations': 950,
                          'delta_curved': 1e-6,
                          'min_delta': ws.tolerance,
                          'newmark_damp': 5e-3,
                          'gravity_on': True,
                          'gravity': 9.81,
                          'num_steps': ws.n_tstep,
                          'dt': ws.dt,
                          'initial_velocity': ws.u_inf * 1}

step_uvlm_settings = {'print_info': 'on',
                      'num_cores': 4,
                      'convection_scheme': ws.wake_type,
                      'velocity_field_generator': 'SteadyVelocityField',
                      'velocity_field_input': {'u_inf': ws.u_inf * 0,
                                               'u_inf_direction': [1., 0., 0.]},
                      'rho': ws.rho,
                      'n_time_steps': ws.n_tstep,
                      'dt': ws.dt,
                      'gamma_dot_filtering': 3}

settings['DynamicCoupled'] = {'print_info': 'on',
                              'structural_solver': 'NonLinearDynamicCoupledStep',
                              'structural_solver_settings': struct_solver_settings,
                              'aero_solver': 'StepUvlm',
                              'aero_solver_settings': step_uvlm_settings,
                              'fsi_substeps': 200,
                              'fsi_tolerance': ws.fsi_tolerance,
                              'relaxation_factor': ws.relaxation_factor,
                              'minimum_steps': 1,
                              'relaxation_steps': 150,
                              'final_relaxation_factor': 0.5,
                              'n_time_steps': 1,
                              'dt': ws.dt,
                              'include_unsteady_force_contribution': 'off',
                                                          }
Linear Assembler Settings

Note that for the assembly of the linear system, we replace the parametrisation of the orientation with Euler angles instead of quaternions.

[13]:
settings['LinearAssembler'] = {'linear_system': 'LinearAeroelastic',
                               'linear_system_settings': {
                                   'beam_settings': {'modal_projection': 'off',
                                                     'inout_coords': 'modes',
                                                     'discrete_time': True,
                                                     'newmark_damp': 0.5e-2,
                                                     'discr_method': 'newmark',
                                                     'dt': ws.dt,
                                                     'proj_modes': 'undamped',
                                                     'num_modes': 9,
                                                     'print_info': 'on',
                                                     'gravity': 'on',
                                                     'remove_dofs': []},
                                   'aero_settings': {'dt': ws.dt,
                                                     'integr_order': 2,
                                                     'density': ws.rho,
                                                     'remove_predictor': 'off',
                                                     'use_sparse': 'off',
                                                     'remove_inputs': ['u_gust']},
                                   'track_body': 'on',
                                   'use_euler': 'on',
                                }}
Asymptotic Stability Post-processor
[14]:
settings['AsymptoticStability'] = {
                                    'print_info': 'on',
                                    'frequency_cutoff': 0,
                                    'export_eigenvalues': 'on',
                                    'num_evals': 100,
                                    }
Write solver file
[15]:
config = configobj.ConfigObj()
np.set_printoptions(precision=16)
file_name = ws.case_route + '/' + ws.case_name + '.sharpy'
config.filename = file_name
for k, v in settings.items():
    config[k] = v
config.write()
Run Simulation
[16]:
data = sharpy.sharpy_main.main(['', ws.case_route + '/' + ws.case_name + '.sharpy'])
--------------------------------------------------------------------------------
            ######  ##     ##    ###    ########  ########  ##    ##
           ##    ## ##     ##   ## ##   ##     ## ##     ##  ##  ##
           ##       ##     ##  ##   ##  ##     ## ##     ##   ####
            ######  ######### ##     ## ########  ########     ##
                 ## ##     ## ######### ##   ##   ##           ##
           ##    ## ##     ## ##     ## ##    ##  ##           ##
            ######  ##     ## ##     ## ##     ## ##           ##
--------------------------------------------------------------------------------
Aeroelastics Lab, Aeronautics Department.
    Copyright (c), Imperial College London.
    All rights reserved.
    License available at https://github.com/imperialcollegelondon/sharpy
Running SHARPy from /home/ng213/2TB/pazy_code/pazy-sharpy/lib/sharpy/docs/source/content/example_notebooks
SHARPy being run is in /home/ng213/2TB/pazy_code/pazy-sharpy/lib/sharpy
The branch being run is dev_setting_error
The version and commit hash are: v1.2.1-344-g0239644-0239644
SHARPy output folder set
     ./output//horten_u_inf2800_M4N11Msf5/
Generating an instance of BeamLoader
Variable for_pos has no assigned value in the settings file.
    will default to the value: [0.0, 0, 0]
Generating an instance of AerogridLoader
Variable control_surface_deflection_generator_settings has no assigned value in the settings file.
    will default to the value: {}
Variable dx1 has no assigned value in the settings file.
    will default to the value: -1.0
Variable ndx1 has no assigned value in the settings file.
    will default to the value: 1
Variable r has no assigned value in the settings file.
    will default to the value: 1.0
Variable dxmax has no assigned value in the settings file.
    will default to the value: -1.0
The aerodynamic grid contains 4 surfaces
  Surface 0, M=4, N=2
     Wake 0, M=20, N=2
  Surface 1, M=4, N=22
     Wake 1, M=20, N=22
  Surface 2, M=4, N=2
     Wake 2, M=20, N=2
  Surface 3, M=4, N=22
     Wake 3, M=20, N=22
  In total: 192 bound panels
  In total: 960 wake panels
  Total number of panels = 1152
Generating an instance of StaticTrim
Variable print_info has no assigned value in the settings file.
    will default to the value: True
Variable tail_cs_index has no assigned value in the settings file.
    will default to the value: 0
Variable initial_angle_eps has no assigned value in the settings file.
    will default to the value: 0.05
Variable initial_thrust_eps has no assigned value in the settings file.
    will default to the value: 2.0
Variable relaxation_factor has no assigned value in the settings file.
    will default to the value: 0.2
Variable save_info has no assigned value in the settings file.
    will default to the value: False
Generating an instance of StaticCoupled
Variable correct_forces_method has no assigned value in the settings file.
    will default to the value: 
Variable runtime_generators has no assigned value in the settings file.
    will default to the value: {}
Generating an instance of NonLinearStatic
Variable newmark_damp has no assigned value in the settings file.
    will default to the value: 0.0001
Variable gravity_dir has no assigned value in the settings file.
    will default to the value: [0.0, 0.0, 1.0]
Variable relaxation_factor has no assigned value in the settings file.
    will default to the value: 0.3
Variable dt has no assigned value in the settings file.
    will default to the value: 0.01
Variable num_steps has no assigned value in the settings file.
    will default to the value: 500
Variable initial_position has no assigned value in the settings file.
    will default to the value: [0. 0. 0.]
Generating an instance of StaticUvlm
Variable iterative_solver has no assigned value in the settings file.
    will default to the value: False
Variable iterative_tol has no assigned value in the settings file.
    will default to the value: 0.0001
Variable iterative_precond has no assigned value in the settings file.
    will default to the value: False
Variable cfl1 has no assigned value in the settings file.
    will default to the value: True
Variable vortex_radius has no assigned value in the settings file.
    will default to the value: 1e-06
Variable vortex_radius_wake_ind has no assigned value in the settings file.
    will default to the value: 1e-06
Variable rbm_vel_g has no assigned value in the settings file.
    will default to the value: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
Variable centre_rot_g has no assigned value in the settings file.
    will default to the value: [0.0, 0.0, 0.0]



|=====|=====|============|==========|==========|==========|==========|==========|==========|
|iter |step | log10(res) |    Fx    |    Fy    |    Fz    |    Mx    |    My    |    Mz    |
|=====|=====|============|==========|==========|==========|==========|==========|==========|



|==========|==========|==========|==========|==========|==========|==========|==========|==========|==========|
|   iter   |alpha[deg]|elev[deg] |  thrust  |    Fx    |    Fy    |    Fz    |    Mx    |    My    |    Mz    |
|==========|==========|==========|==========|==========|==========|==========|==========|==========|==========|
|  0  |  0  |  0.00000   | -0.1051  | -0.0000  |  0.0598  | -0.0000  |  1.0837  | -0.0000  |
|  1  |  0  |  -7.62384  | -0.1284  | -0.0000  |  0.1276  | -0.0000  |  0.0045  | -0.0000  |
|  2  |  0  |  -8.33392  | -0.1190  | -0.0000  |  0.0397  | -0.0000  | -0.0774  | -0.0000  |
|  3  |  0  |  -9.30379  | -0.1133  |  0.0000  |  0.0011  | -0.0000  | -0.0070  |  0.0000  |
|  4  |  0  | -10.71602  | -0.1136  | -0.0000  |  0.0032  |  0.0000  | -0.0100  | -0.0000  |
|  5  |  0  | -10.88827  | -0.1138  | -0.0000  |  0.0043  |  0.0000  | -0.0119  | -0.0000  |
|  6  |  0  | -11.66331  | -0.1138  | -0.0000  |  0.0042  |  0.0000  | -0.0116  | -0.0000  |
|  7  |  0  | -12.88496  | -0.1138  | -0.0000  |  0.0041  |  0.0000  | -0.0116  |  0.0000  |
|    0     |  4.5135  |  0.1814  |  5.5129  | -0.1138  | -0.0000  |  0.0041  |  0.0000  | -0.0116  |  0.0000  |
|  0  |  0  |  0.00000   |-116.9870 | -0.0000  | 994.8063 | -0.0000  |-882.4104 | -0.0000  |
|  1  |  0  |  -5.79178  | -72.3841 |  0.0000  | 944.6140 |  0.0000  |-802.5912 |  0.0000  |
|  2  |  0  |  -6.63730  | -62.4378 |  0.0000  | 937.6662 |  0.0000  |-792.1259 | -0.0000  |
|  3  |  0  |  -7.22937  | -62.8923 | -0.0000  | 939.7866 | -0.0000  |-795.7093 | -0.0000  |
|  4  |  0  |  -8.65323  | -62.8757 | -0.0000  | 939.7100 | -0.0000  |-795.5764 | -0.0000  |
|  5  |  0  |  -8.81438  | -62.8640 | -0.0000  | 939.6554 | -0.0000  |-795.4837 | -0.0000  |
|  6  |  0  |  -9.59386  | -62.8660 |  0.0000  | 939.6644 | -0.0000  |-795.4991 |  0.0000  |
|  7  |  0  | -10.80422  | -62.8661 |  0.0000  | 939.6650 | -0.0000  |-795.5000 |  0.0000  |
|  8  |  0  | -11.01365  | -62.8660 | -0.0000  | 939.6647 | -0.0000  |-795.4994 | -0.0000  |
|  9  |  0  | -12.15197  | -62.8660 |  0.0000  | 939.6647 | -0.0000  |-795.4995 |  0.0000  |
|    0     |  7.3783  | -2.6834  |  5.5129  | -62.8660 |  0.0000  | 939.6647 | -0.0000  |-795.4995 |  0.0000  |
|  0  |  0  |  0.00000   | -32.9132 | -0.0000  | 371.4715 | -0.0000  |-902.7953 | -0.0000  |
|  1  |  0  |  -5.48409  | -8.7241  | -0.0000  | 298.8484 |  0.0000  |-777.2938 |  0.0000  |
|  2  |  0  |  -6.39387  | -4.0957  | -0.0000  | 289.8092 | -0.0000  |-761.4855 | -0.0000  |
|  3  |  0  |  -6.85613  | -4.6263  | -0.0000  | 293.2407 | -0.0000  |-767.3376 |  0.0000  |
|  4  |  0  |  -8.25962  | -4.6052  | -0.0000  | 293.1048 | -0.0000  |-767.1066 |  0.0000  |
|  5  |  0  |  -8.44065  | -4.5914  | -0.0000  | 293.0156 |  0.0000  |-766.9545 |  0.0000  |
|  6  |  0  |  -9.20968  | -4.5937  | -0.0000  | 293.0308 | -0.0000  |-766.9804 | -0.0000  |
|  7  |  0  | -10.44736  | -4.5939  | -0.0000  | 293.0316 | -0.0000  |-766.9819 | -0.0000  |
|  8  |  0  | -10.63000  | -4.5938  | -0.0000  | 293.0311 |  0.0000  |-766.9809 | -0.0000  |
|  9  |  0  | -11.74670  | -4.5938  |  0.0000  | 293.0311 |  0.0000  |-766.9810 |  0.0000  |
| 10  |  0  | -12.29943  | -4.5938  | -0.0000  | 293.0311 |  0.0000  |-766.9810 |  0.0000  |
|    0     |  4.5135  |  3.0462  |  5.5129  | -4.5938  | -0.0000  | 293.0311 |  0.0000  |-766.9810 |  0.0000  |
|  0  |  0  |  0.00000   | -4.1051  | -0.0000  |  0.0598  | -0.0000  |  1.0834  | -0.0000  |
|  1  |  0  |  -7.62384  | -4.1284  | -0.0000  |  0.1276  | -0.0000  |  0.0042  | -0.0000  |
|  2  |  0  |  -8.33392  | -4.1190  | -0.0000  |  0.0397  |  0.0000  | -0.0778  | -0.0000  |
|  3  |  0  |  -9.30379  | -4.1133  | -0.0000  |  0.0011  |  0.0000  | -0.0074  | -0.0000  |
|  4  |  0  | -10.71602  | -4.1136  |  0.0000  |  0.0032  | -0.0000  | -0.0104  |  0.0000  |
|  5  |  0  | -10.88827  | -4.1138  |  0.0000  |  0.0043  |  0.0000  | -0.0123  |  0.0000  |
|  6  |  0  | -11.66331  | -4.1138  | -0.0000  |  0.0042  |  0.0000  | -0.0119  | -0.0000  |
|  7  |  0  | -12.88496  | -4.1138  | -0.0000  |  0.0041  |  0.0000  | -0.0119  | -0.0000  |
|    0     |  4.5135  |  0.1814  |  7.5129  | -4.1138  | -0.0000  |  0.0041  |  0.0000  | -0.0119  | -0.0000  |
|  0  |  0  |  0.00000   |  0.0095  | -0.0000  |  0.0498  |  0.0000  |  1.1013  | -0.0000  |
|  1  |  0  |  -7.62357  | -0.0140  |  0.0000  |  0.1189  |  0.0000  |  0.0198  |  0.0000  |
|  2  |  0  |  -8.33375  | -0.0046  | -0.0000  |  0.0312  | -0.0000  | -0.0624  |  0.0000  |
|  3  |  0  |  -9.30318  |  0.0010  | -0.0000  | -0.0075  |  0.0000  |  0.0081  | -0.0000  |
|  4  |  0  | -10.71542  |  0.0007  | -0.0000  | -0.0054  |  0.0000  |  0.0051  |  0.0000  |
|  5  |  0  | -10.88766  |  0.0006  | -0.0000  | -0.0043  |  0.0000  |  0.0032  | -0.0000  |
|  6  |  0  | -11.66271  |  0.0006  |  0.0000  | -0.0044  | -0.0000  |  0.0035  |  0.0000  |
|  7  |  0  | -12.88441  |  0.0006  | -0.0000  | -0.0045  |  0.0000  |  0.0035  | -0.0000  |
|    1     |  4.5135  |  0.1814  |  5.4560  |  0.0006  | -0.0000  | -0.0045  |  0.0000  |  0.0035  | -0.0000  |
Generating an instance of BeamPlot
Variable include_applied_moments has no assigned value in the settings file.
    will default to the value: True
Variable name_prefix has no assigned value in the settings file.
    will default to the value: 
Variable output_rbm has no assigned value in the settings file.
    will default to the value: True
...Finished
Generating an instance of AerogridPlot
Variable include_forward_motion has no assigned value in the settings file.
    will default to the value: False
Variable include_unsteady_applied_forces has no assigned value in the settings file.
    will default to the value: False
Variable name_prefix has no assigned value in the settings file.
    will default to the value: 
Variable dt has no assigned value in the settings file.
    will default to the value: 0.0
Variable include_velocities has no assigned value in the settings file.
    will default to the value: False
Variable include_incidence_angle has no assigned value in the settings file.
    will default to the value: False
Variable num_cores has no assigned value in the settings file.
    will default to the value: 1
Variable vortex_radius has no assigned value in the settings file.
    will default to the value: 1e-06
...Finished
Generating an instance of AeroForcesCalculator
--------------------------------------------------------------------------------
tstep |   fx_g     |   fy_g     |   fz_g     |   Cfx_g    |   Cfy_g    |   Cfz_g   
    0 |  1.088e+01 | -4.476e-13 |  1.835e+03 |  2.124e-03 | -8.740e-17 |  3.583e-01
...Finished
Generating an instance of DynamicCoupled
Variable structural_substeps has no assigned value in the settings file.
    will default to the value: 0
Variable dynamic_relaxation has no assigned value in the settings file.
    will default to the value: False
Variable postprocessors has no assigned value in the settings file.
    will default to the value: []
Variable postprocessors_settings has no assigned value in the settings file.
    will default to the value: {}
Variable controller_id has no assigned value in the settings file.
    will default to the value: {}
Variable controller_settings has no assigned value in the settings file.
    will default to the value: {}
Variable cleanup_previous_solution has no assigned value in the settings file.
    will default to the value: False
Variable steps_without_unsteady_force has no assigned value in the settings file.
    will default to the value: 0
Variable pseudosteps_ramp_unsteady_force has no assigned value in the settings file.
    will default to the value: 0
Variable correct_forces_method has no assigned value in the settings file.
    will default to the value: 
Variable network_settings has no assigned value in the settings file.
    will default to the value: {}
Variable runtime_generators has no assigned value in the settings file.
    will default to the value: {}
Generating an instance of NonLinearDynamicCoupledStep
Variable num_load_steps has no assigned value in the settings file.
    will default to the value: 1
Variable gravity_dir has no assigned value in the settings file.
    will default to the value: [0.0, 0.0, 1.0]
Variable relaxation_factor has no assigned value in the settings file.
    will default to the value: 0.3
Variable balancing has no assigned value in the settings file.
    will default to the value: False
Generating an instance of StepUvlm
Variable iterative_solver has no assigned value in the settings file.
    will default to the value: False
Variable iterative_tol has no assigned value in the settings file.
    will default to the value: 0.0001
Variable iterative_precond has no assigned value in the settings file.
    will default to the value: False
Variable cfl1 has no assigned value in the settings file.
    will default to the value: True
Variable vortex_radius has no assigned value in the settings file.
    will default to the value: 1e-06
Variable vortex_radius_wake_ind has no assigned value in the settings file.
    will default to the value: 1e-06
Variable interp_coords has no assigned value in the settings file.
    will default to the value: 0
Variable filter_method has no assigned value in the settings file.
    will default to the value: 0
Variable interp_method has no assigned value in the settings file.
    will default to the value: 0
Variable yaw_slerp has no assigned value in the settings file.
    will default to the value: 0.0
Variable centre_rot has no assigned value in the settings file.
    will default to the value: [0.0, 0.0, 0.0]
Variable quasi_steady has no assigned value in the settings file.
    will default to the value: False



|=======|========|======|==============|==============|==============|==============|==============|
|  ts   |   t    | iter | struc ratio  |  iter time   | residual vel |  FoR_vel(x)  |  FoR_vel(z)  |
|=======|========|======|==============|==============|==============|==============|==============|
/home/ng213/2TB/pazy_code/pazy-sharpy/lib/sharpy/sharpy/aero/utils/uvlmlib.py:264: RuntimeWarning: invalid value encountered in true_divide
  flightconditions.uinf_direction = np.ctypeslib.as_ctypes(ts_info.u_ext[0][:, 0, 0]/flightconditions.uinf)
|   1   | 0.0089 |  3   |   0.877319   |   0.593232   |  -10.598250  |-2.791317e+01 |-2.203426e+00 |
...Finished
Generating an instance of Modal
Variable keep_linear_matrices has no assigned value in the settings file.
    will default to the value: True
Variable write_dat has no assigned value in the settings file.
    will default to the value: True
Variable delta_curved has no assigned value in the settings file.
    will default to the value: 0.01
Variable max_rotation_deg has no assigned value in the settings file.
    will default to the value: 15.0
Variable max_displacement has no assigned value in the settings file.
    will default to the value: 0.15
Variable use_custom_timestep has no assigned value in the settings file.
    will default to the value: -1
Structural eigenvalues



|==============|==============|==============|==============|==============|==============|==============|
|     mode     |  eval_real   |  eval_imag   | freq_n (Hz)  | freq_d (Hz)  |   damping    |  period (s)  |
|==============|==============|==============|==============|==============|==============|==============|
/home/ng213/2TB/pazy_code/pazy-sharpy/lib/sharpy/sharpy/solvers/modal.py:265: UserWarning: Projecting a system with damping on undamped modal shapes
  warnings.warn('Projecting a system with damping on undamped modal shapes')
|      0       |  -0.000000   |   0.000000   |   0.000000   |   0.000000   |   1.000000   |     inf      |
|      1       |   0.000000   |   0.000000   |   0.000000   |   0.000000   |   1.000000   |     inf      |
|      2       |   0.000000   |   0.000000   |   0.000000   |   0.000000   |   1.000000   |     inf      |
|      3       |   0.000000   |   0.000000   |   0.000000   |   0.000000   |   1.000000   |     inf      |
|      4       |  -0.000000   |   0.000000   |   0.000000   |   0.000000   |   1.000000   |     inf      |
|      5       |   0.000000   |   0.000000   |   0.000000   |   0.000000   |   1.000000   |     inf      |
|      6       |   0.000000   |   0.000000   |   0.000000   |   0.000000   |   1.000000   |     inf      |
|      7       |  -0.000000   |   0.000000   |   0.000000   |   0.000000   |   1.000000   |     inf      |
|      8       |  -0.000000   |   0.000000   |   0.000000   |   0.000000   |   1.000000   |     inf      |
|      9       |  -0.000000   |   0.000000   |   0.000000   |   0.000000   |   1.000000   |     inf      |
|      10      |   0.000000   |  28.293939   |   4.503120   |   4.503120   |  -0.000000   |   0.222068   |
|      11      |   0.000000   |  29.271318   |   4.658675   |   4.658675   |  -0.000000   |   0.214653   |
|      12      |   0.000000   |  54.780234   |   8.718545   |   8.718545   |  -0.000000   |   0.114698   |
|      13      |   0.000000   |  58.999779   |   9.390106   |   9.390106   |  -0.000000   |   0.106495   |
|      14      |   0.000000   |  70.520741   |  11.223724   |  11.223724   |  -0.000000   |   0.089097   |
|      15      |   0.000000   |  76.917111   |  12.241738   |  12.241738   |  -0.000000   |   0.081688   |
|      16      |   0.000000   |  87.324076   |  13.898058   |  13.898058   |  -0.000000   |   0.071952   |
|      17      |   0.000000   |  108.035577  |  17.194396   |  17.194396   |  -0.000000   |   0.058158   |
|      18      |   0.000000   |  119.692139  |  19.049596   |  19.049596   |  -0.000000   |   0.052495   |
|      19      |   0.000000   |  133.495187  |  21.246419   |  21.246419   |  -0.000000   |   0.047067   |
|      20      |   0.000000   |  134.444788  |  21.397553   |  21.397553   |  -0.000000   |   0.046734   |
|      21      |   0.000000   |  151.060442  |  24.042016   |  24.042016   |  -0.000000   |   0.041594   |
|      22      |   0.000000   |  159.369020  |  25.364367   |  25.364367   |  -0.000000   |   0.039425   |
|      23      |   0.000000   |  171.256102  |  27.256255   |  27.256255   |  -0.000000   |   0.036689   |
|      24      |   0.000000   |  173.895881  |  27.676389   |  27.676389   |  -0.000000   |   0.036132   |
|      25      |   0.000000   |  199.016557  |  31.674469   |  31.674469   |  -0.000000   |   0.031571   |
|      26      |   0.000000   |  205.412581  |  32.692428   |  32.692428   |  -0.000000   |   0.030588   |
|      27      |   0.000000   |  205.419531  |  32.693534   |  32.693534   |  -0.000000   |   0.030587   |
|      28      |   0.000000   |  223.563796  |  35.581283   |  35.581283   |  -0.000000   |   0.028105   |
|      29      |   0.000000   |  227.924750  |  36.275351   |  36.275351   |  -0.000000   |   0.027567   |
Generating an instance of LinearAssembler
Variable linearisation_tstep has no assigned value in the settings file.
    will default to the value: -1
Variable modal_tstep has no assigned value in the settings file.
    will default to the value: -1
Variable inout_coordinates has no assigned value in the settings file.
    will default to the value: 
Variable retain_inputs has no assigned value in the settings file.
    will default to the value: []
Variable retain_outputs has no assigned value in the settings file.
    will default to the value: []
Generating an instance of LinearAeroelastic
Variable uvlm_filename has no assigned value in the settings file.
    will default to the value: 
Generating an instance of LinearUVLM
Variable ScalingDict has no assigned value in the settings file.
    will default to the value: {}
Variable gust_assembler has no assigned value in the settings file.
    will default to the value: 
Variable rom_method has no assigned value in the settings file.
    will default to the value: []
Variable rom_method_settings has no assigned value in the settings file.
    will default to the value: {}
Variable vortex_radius has no assigned value in the settings file.
    will default to the value: 1e-06
Variable cfl1 has no assigned value in the settings file.
    will default to the value: True
Variable length has no assigned value in the settings file.
    will default to the value: 1.0
Variable speed has no assigned value in the settings file.
    will default to the value: 1.0
Variable density has no assigned value in the settings file.
    will default to the value: 1.0
Variable velocity_field_generator has no assigned value in the settings file.
    will default to the value: SteadyVelocityField
Variable velocity_field_input has no assigned value in the settings file.
    will default to the value: {}
Variable physical_model has no assigned value in the settings file.
    will default to the value: True
Variable track_body has no assigned value in the settings file.
    will default to the value: False
Variable track_body_number has no assigned value in the settings file.
    will default to the value: -1
Initialising Static linear UVLM solver class...
                        ...done in 0.39 sec
State-space realisation of UVLM equations started...
Computing wake propagation matrix with CFL1=True
     state-space model produced in form:
     x_{n+1} = A x_{n} + Bp u_{n+1}
                        ...done in 2.43 sec
Generating an instance of LinearBeam
Variable remove_sym_modes has no assigned value in the settings file.
    will default to the value: False
Warning, projecting system with damping onto undamped modes

Linearising gravity terms...
     M = 187.12 kg
     X_CG A -> 1.19 0.00 0.01
Node  1      -> B 0.000 -0.089 -0.000
                     -> A 0.089 0.206 0.000
                     -> G 0.089 0.206 -0.007
     Node mass:
             Matrix: 2.6141
Node  2      -> B -0.010 -0.019 -0.000
                     -> A 0.019 0.403 0.000
                     -> G 0.019 0.403 -0.001
     Node mass:
             Matrix: 7.3672
Node  3      -> B -0.019 -0.087 -0.000
                     -> A 0.234 0.800 0.000
                     -> G 0.234 0.800 -0.018
     Node mass:
             Matrix: 5.8780
Node  4      -> B -0.019 -0.084 -0.000
                     -> A 0.390 1.238 0.001
                     -> G 0.389 1.238 -0.030
     Node mass:
             Matrix: 2.8288
Node  5      -> B -0.018 -0.081 -0.000
                     -> A 0.546 1.676 0.001
                     -> G 0.544 1.676 -0.041
     Node mass:
             Matrix: 5.4372
Node  6      -> B -0.017 -0.078 -0.000
                     -> A 0.702 2.113 0.002
                     -> G 0.700 2.113 -0.053
     Node mass:
             Matrix: 2.6084
Node  7      -> B -0.016 -0.074 -0.000
                     -> A 0.857 2.551 0.003
                     -> G 0.855 2.551 -0.064
     Node mass:
             Matrix: 4.9963
Node  8      -> B -0.016 -0.071 -0.000
                     -> A 1.013 2.988 0.004
                     -> G 1.010 2.988 -0.076
     Node mass:
             Matrix: 2.3879
Node  9      -> B -0.015 -0.068 -0.000
                     -> A 1.169 3.426 0.005
                     -> G 1.166 3.426 -0.087
     Node mass:
             Matrix: 4.5555
Node 10      -> B -0.014 -0.065 -0.000
                     -> A 1.325 3.863 0.006
                     -> G 1.321 3.863 -0.098
     Node mass:
             Matrix: 2.1675
Node 11      -> B -0.013 -0.061 -0.000
                     -> A 1.480 4.301 0.007
                     -> G 1.476 4.301 -0.109
     Node mass:
             Matrix: 4.1146
Node 12      -> B -0.013 -0.058 -0.000
                     -> A 1.636 4.739 0.009
                     -> G 1.632 4.739 -0.120
     Node mass:
             Matrix: 1.9471
Node 13      -> B -0.012 -0.055 -0.000
                     -> A 1.792 5.176 0.010
                     -> G 1.787 5.176 -0.131
     Node mass:
             Matrix: 3.6738
Node 14      -> B -0.011 -0.052 -0.000
                     -> A 1.948 5.614 0.011
                     -> G 1.943 5.614 -0.142
     Node mass:
             Matrix: 1.7267
Node 15      -> B -0.011 -0.048 -0.000
                     -> A 2.104 6.052 0.012
                     -> G 2.098 6.052 -0.153
     Node mass:
             Matrix: 3.2329
Node 16      -> B -0.010 -0.045 -0.000
                     -> A 2.260 6.489 0.014
                     -> G 2.254 6.489 -0.164
     Node mass:
             Matrix: 1.5062
Node 17      -> B -0.009 -0.042 -0.000
                     -> A 2.415 6.927 0.015
                     -> G 2.409 6.927 -0.175
     Node mass:
             Matrix: 2.7921
Node 18      -> B -0.008 -0.039 -0.000
                     -> A 2.571 7.364 0.016
                     -> G 2.564 7.364 -0.186
     Node mass:
             Matrix: 1.2858
Node 19      -> B -0.008 -0.035 -0.000
                     -> A 2.727 7.802 0.017
                     -> G 2.720 7.802 -0.197
     Node mass:
             Matrix: 2.3512
Node 20      -> B -0.007 -0.032 -0.000
                     -> A 2.883 8.239 0.019
                     -> G 2.875 8.239 -0.208
     Node mass:
             Matrix: 1.0654
Node 21      -> B -0.006 -0.028 -0.000
                     -> A 3.038 8.677 0.020
                     -> G 3.030 8.677 -0.219
     Node mass:
             Matrix: 1.9104
Node 22      -> B -0.006 -0.026 -0.000
                     -> A 3.194 9.114 0.021
                     -> G 3.186 9.114 -0.230
     Node mass:
             Matrix: 0.8450
Node 23      -> B -0.005 -0.022 -0.000
                     -> A 3.350 9.552 0.023
                     -> G 3.341 9.552 -0.241
     Node mass:
             Matrix: 1.4695
Node 24      -> B -0.005 -0.022 -0.000
                     -> A 3.508 9.988 0.024
                     -> G 3.499 9.988 -0.252
     Node mass:
             Matrix: 0.3674
Node 25      -> B 0.000 0.089 -0.000
                     -> A 0.089 -0.206 0.000
                     -> G 0.089 -0.206 -0.007
     Node mass:
             Matrix: 2.6141
Node 26      -> B -0.010 0.019 -0.000
                     -> A 0.019 -0.403 0.000
                     -> G 0.019 -0.403 -0.001
     Node mass:
             Matrix: 7.3672
Node 27      -> B -0.019 0.087 -0.000
                     -> A 0.234 -0.800 0.000
                     -> G 0.234 -0.800 -0.018
     Node mass:
             Matrix: 5.8780
Node 28      -> B -0.019 0.084 -0.000
                     -> A 0.390 -1.238 0.001
                     -> G 0.389 -1.238 -0.030
     Node mass:
             Matrix: 2.8288
Node 29      -> B -0.018 0.081 -0.000
                     -> A 0.546 -1.676 0.001
                     -> G 0.544 -1.676 -0.041
     Node mass:
             Matrix: 5.4372
Node 30      -> B -0.017 0.078 -0.000
                     -> A 0.702 -2.113 0.002
                     -> G 0.700 -2.113 -0.053
     Node mass:
             Matrix: 2.6084
Node 31      -> B -0.016 0.074 -0.000
                     -> A 0.857 -2.551 0.003
                     -> G 0.855 -2.551 -0.064
     Node mass:
             Matrix: 4.9963
Node 32      -> B -0.016 0.071 -0.000
                     -> A 1.013 -2.988 0.004
                     -> G 1.010 -2.988 -0.076
     Node mass:
             Matrix: 2.3879
Node 33      -> B -0.015 0.068 -0.000
                     -> A 1.169 -3.426 0.005
                     -> G 1.166 -3.426 -0.087
     Node mass:
             Matrix: 4.5555
Node 34      -> B -0.014 0.065 -0.000
                     -> A 1.325 -3.863 0.006
                     -> G 1.321 -3.863 -0.098
     Node mass:
             Matrix: 2.1675
Node 35      -> B -0.013 0.061 -0.000
                     -> A 1.480 -4.301 0.007
                     -> G 1.476 -4.301 -0.109
     Node mass:
             Matrix: 4.1146
Node 36      -> B -0.013 0.058 -0.000
                     -> A 1.636 -4.739 0.009
                     -> G 1.632 -4.739 -0.120
     Node mass:
             Matrix: 1.9471
Node 37      -> B -0.012 0.055 -0.000
                     -> A 1.792 -5.176 0.010
                     -> G 1.787 -5.176 -0.131
     Node mass:
             Matrix: 3.6738
Node 38      -> B -0.011 0.052 -0.000
                     -> A 1.948 -5.614 0.011
                     -> G 1.943 -5.614 -0.142
     Node mass:
             Matrix: 1.7267
Node 39      -> B -0.011 0.048 -0.000
                     -> A 2.104 -6.052 0.012
                     -> G 2.098 -6.052 -0.153
     Node mass:
             Matrix: 3.2329
Node 40      -> B -0.010 0.045 -0.000
                     -> A 2.260 -6.489 0.014
                     -> G 2.254 -6.489 -0.164
     Node mass:
             Matrix: 1.5062
Node 41      -> B -0.009 0.042 -0.000
                     -> A 2.415 -6.927 0.015
                     -> G 2.409 -6.927 -0.175
     Node mass:
             Matrix: 2.7921
Node 42      -> B -0.008 0.039 -0.000
                     -> A 2.571 -7.364 0.016
                     -> G 2.564 -7.364 -0.186
     Node mass:
             Matrix: 1.2858
Node 43      -> B -0.008 0.035 -0.000
                     -> A 2.727 -7.802 0.017
                     -> G 2.720 -7.802 -0.197
     Node mass:
             Matrix: 2.3512
Node 44      -> B -0.007 0.032 -0.000
                     -> A 2.883 -8.239 0.019
                     -> G 2.875 -8.239 -0.208
     Node mass:
             Matrix: 1.0654
Node 45      -> B -0.006 0.028 -0.000
                     -> A 3.038 -8.677 0.020
                     -> G 3.030 -8.677 -0.219
     Node mass:
             Matrix: 1.9104
Node 46      -> B -0.006 0.026 -0.000
                     -> A 3.194 -9.114 0.021
                     -> G 3.186 -9.114 -0.230
     Node mass:
             Matrix: 0.8450
Node 47      -> B -0.005 0.022 -0.000
                     -> A 3.350 -9.552 0.023
                     -> G 3.341 -9.552 -0.241
     Node mass:
             Matrix: 1.4695
Node 48      -> B -0.005 0.022 -0.000
                     -> A 3.508 -9.988 0.024
                     -> G 3.499 -9.988 -0.252
     Node mass:
             Matrix: 0.3674
        Updated the beam C, modal C and K matrices with the terms from the
gravity linearisation

Aeroelastic system assembled:
     Aerodynamic states: 1536
     Structural states: 594
     Total states: 2130
     Inputs: 893
     Outputs: 891
Final system is:
State-space system
States: 2130
Inputs: 893
Outputs: 891

Generating an instance of AsymptoticStability
Variable reference_velocity has no assigned value in the settings file.
    will default to the value: 1.0
Variable display_root_locus has no assigned value in the settings file.
    will default to the value: False
Variable velocity_analysis has no assigned value in the settings file.
    will default to the value: []
Variable iterative_eigvals has no assigned value in the settings file.
    will default to the value: False
Variable modes_to_plot has no assigned value in the settings file.
    will default to the value: []
Variable postprocessors has no assigned value in the settings file.
    will default to the value: []
Variable postprocessors_settings has no assigned value in the settings file.
    will default to the value: {}
Dynamical System Eigenvalues
Calculating eigenvalues using direct method



|==============|==============|==============|==============|==============|==============|==============|
|     mode     |  eval_real   |  eval_imag   | freq_n (Hz)  | freq_d (Hz)  |   damping    |  period (s)  |
|==============|==============|==============|==============|==============|==============|==============|
|      0       |   0.000000   |   0.000000   |   0.000000   |   0.000000   |   1.000000   |     inf      |
|      1       |   0.000000   |   0.000000   |   0.000000   |   0.000000   |   1.000000   |     inf      |
|      2       |   0.000000   |   0.000000   |   0.000000   |   0.000000   |   1.000000   |     inf      |
|      3       |   0.000000   |   0.000000   |   0.000000   |   0.000000   |   1.000000   |     inf      |
|      4       |   0.000000   |   0.000000   |   0.000000   |   0.000000   |   1.000000   |     inf      |
|      5       |   0.000000   |   0.000000   |   0.000000   |   0.000000   |   1.000000   |     inf      |
|      6       |   0.000000   |   0.000000   |   0.000000   |   0.000000   |   1.000000   |     inf      |
|      7       |   0.000000   |   0.000000   |   0.000000   |   0.000000   |   1.000000   |     inf      |
|      8       |   0.000000   |   0.000000   |   0.000000   |   0.000000   |   1.000000   |     inf      |
|      9       |  -0.000000   |   0.000000   |   0.000000   |   0.000000   |   1.000000   |     inf      |
|      10      |  -0.000884   |  -0.321712   |   0.051202   |   0.051202   |   0.002747   |  19.530439   |
|      11      |  -0.000884   |   0.321712   |   0.051202   |   0.051202   |   0.002747   |  19.530439   |
|      12      |  -0.008470   |  -0.391287   |   0.062290   |   0.062275   |   0.021642   |  16.057731   |
|      13      |  -0.008470   |   0.391287   |   0.062290   |   0.062275   |   0.021642   |  16.057731   |
|      14      |  -0.022506   |   0.000000   |   0.003582   |   0.000000   |   1.000000   |     inf      |
|      15      |  -0.064808   |  -53.732514  |   8.551801   |   8.551795   |   0.001206   |   0.116935   |
|      16      |  -0.064808   |  53.732514   |   8.551801   |   8.551795   |   0.001206   |   0.116935   |
|      17      |  -0.101946   |  68.319141   |  10.873341   |  10.873329   |   0.001492   |   0.091968   |
|      18      |  -0.101946   |  -68.319141  |  10.873341   |  10.873329   |   0.001492   |   0.091968   |
|      19      |  -0.147587   |  83.265282   |  13.252102   |  13.252081   |   0.001772   |   0.075460   |
|      20      |  -0.147587   |  -83.265282  |  13.252102   |  13.252081   |   0.001772   |   0.075460   |
|      21      |  -0.248703   | -109.925782  |  17.495276   |  17.495232   |   0.002262   |   0.057158   |
|      22      |  -0.248703   |  109.925782  |  17.495276   |  17.495232   |   0.002262   |   0.057158   |
|      23      |  -0.293472   |  120.387631  |  19.160344   |  19.160287   |   0.002438   |   0.052191   |
|      24      |  -0.293472   | -120.387631  |  19.160344   |  19.160287   |   0.002438   |   0.052191   |
|      25      |  -0.350319   |  132.903280  |  21.152288   |  21.152214   |   0.002636   |   0.047276   |
|      26      |  -0.350319   | -132.903280  |  21.152288   |  21.152214   |   0.002636   |   0.047276   |
|      27      |  -0.376401   |  138.516954  |  22.045739   |  22.045658   |   0.002717   |   0.045360   |
|      28      |  -0.376401   | -138.516954  |  22.045739   |  22.045658   |   0.002717   |   0.045360   |
|      29      |  -0.494445   |  162.714232  |  25.896894   |  25.896774   |   0.003039   |   0.038615   |
|      30      |  -0.494445   | -162.714232  |  25.896894   |  25.896774   |   0.003039   |   0.038615   |
|      31      |  -0.511651   | -166.238306  |  26.457773   |  26.457648   |   0.003078   |   0.037796   |
|      32      |  -0.511651   |  166.238306  |  26.457773   |  26.457648   |   0.003078   |   0.037796   |
|      33      |  -0.559180   |  175.709816  |  27.965227   |  27.965086   |   0.003182   |   0.035759   |
|      34      |  -0.559180   | -175.709816  |  27.965227   |  27.965086   |   0.003182   |   0.035759   |
|      35      |  -0.569755   |  177.873274  |  28.309556   |  28.309411   |   0.003203   |   0.035324   |
|      36      |  -0.569755   | -177.873274  |  28.309556   |  28.309411   |   0.003203   |   0.035324   |
|      37      |  -0.669914   | -197.999020  |  31.512703   |  31.512523   |   0.003383   |   0.031733   |
|      38      |  -0.669914   |  197.999020  |  31.512703   |  31.512523   |   0.003383   |   0.031733   |
|      39      |  -0.678424   |  199.782714  |  31.796590   |  31.796406   |   0.003396   |   0.031450   |
|      40      |  -0.678424   | -199.782714  |  31.796590   |  31.796406   |   0.003396   |   0.031450   |
|      41      |  -0.715684   |  207.440562  |  33.015387   |  33.015191   |   0.003450   |   0.030289   |
|      42      |  -0.715684   | -207.440562  |  33.015387   |  33.015191   |   0.003450   |   0.030289   |
|      43      |  -0.721193   | -208.623018  |  33.203583   |  33.203385   |   0.003457   |   0.030117   |
|      44      |  -0.721193   |  208.623018  |  33.203583   |  33.203385   |   0.003457   |   0.030117   |
|      45      |  -0.796838   | -224.809928  |  35.779836   |  35.779611   |   0.003544   |   0.027949   |
|      46      |  -0.796838   |  224.809928  |  35.779836   |  35.779611   |   0.003544   |   0.027949   |
|      47      |  -0.801462   | -225.851223  |  35.945565   |  35.945339   |   0.003549   |   0.027820   |
|      48      |  -0.801462   |  225.851223  |  35.945565   |  35.945339   |   0.003549   |   0.027820   |
|      49      |  -0.823218   |  257.880058  |  41.043095   |  41.042886   |   0.003192   |   0.024365   |
|      50      |  -0.823218   | -257.880058  |  41.043095   |  41.042886   |   0.003192   |   0.024365   |
|      51      |  -0.829849   |  232.223377  |  36.959734   |  36.959498   |   0.003573   |   0.027057   |
|      52      |  -0.829849   | -232.223377  |  36.959734   |  36.959498   |   0.003573   |   0.027057   |
|      53      |  -0.833132   |  232.986723  |  37.081226   |  37.080989   |   0.003576   |   0.026968   |
|      54      |  -0.833132   | -232.986723  |  37.081226   |  37.080989   |   0.003576   |   0.026968   |
|      55      |  -0.837692   |  252.830750  |  40.239484   |  40.239264   |   0.003313   |   0.024851   |
|      56      |  -0.837692   | -252.830750  |  40.239484   |  40.239264   |   0.003313   |   0.024851   |
|      57      |  -0.843057   | -274.636584  |  43.709976   |  43.709770   |   0.003070   |   0.022878   |
|      58      |  -0.843057   |  274.636584  |  43.709976   |  43.709770   |   0.003070   |   0.022878   |
|      59      |  -0.855990   | -264.468496  |  42.091689   |  42.091468   |   0.003237   |   0.023758   |
|      60      |  -0.855990   |  264.468496  |  42.091689   |  42.091468   |   0.003237   |   0.023758   |
|      61      |  -0.864725   |  271.184095  |  43.160509   |  43.160289   |   0.003189   |   0.023169   |
|      62      |  -0.864725   | -271.184095  |  43.160509   |  43.160289   |   0.003189   |   0.023169   |
|      63      |  -0.871325   | -283.421756  |  45.108187   |  45.107973   |   0.003074   |   0.022169   |
|      64      |  -0.871325   |  283.421756  |  45.108187   |  45.107973   |   0.003074   |   0.022169   |
|      65      |  -0.878445   |  267.336890  |  42.548217   |  42.547987   |   0.003286   |   0.023503   |
|      66      |  -0.878445   | -267.336890  |  42.548217   |  42.547987   |   0.003286   |   0.023503   |
|      67      |  -0.882869   | -280.833495  |  44.696260   |  44.696039   |   0.003144   |   0.022373   |
|      68      |  -0.882869   |  280.833495  |  44.696260   |  44.696039   |   0.003144   |   0.022373   |
|      69      |  -0.884024   | -245.027542  |  38.997598   |  38.997344   |   0.003608   |   0.025643   |
|      70      |  -0.884024   |  245.027542  |  38.997598   |  38.997344   |   0.003608   |   0.025643   |
|      71      |  -0.886589   | -245.661879  |  39.098557   |  39.098302   |   0.003609   |   0.025577   |
|      72      |  -0.886589   |  245.661879  |  39.098557   |  39.098302   |   0.003609   |   0.025577   |
|      73      |  -0.891210   | -288.915188  |  45.982499   |  45.982280   |   0.003085   |   0.021748   |
|      74      |  -0.891210   |  288.915188  |  45.982499   |  45.982280   |   0.003085   |   0.021748   |
|      75      |  -0.908699   |  251.206723  |  39.981053   |  39.980792   |   0.003617   |   0.025012   |
|      76      |  -0.908699   | -251.206723  |  39.981053   |  39.980792   |   0.003617   |   0.025012   |
|      77      |  -0.910251   | -251.606127  |  40.044621   |  40.044359   |   0.003618   |   0.024972   |
|      78      |  -0.910251   |  251.606127  |  40.044621   |  40.044359   |   0.003618   |   0.024972   |
|      79      |  -0.914184   | -241.156682  |  38.381554   |  38.381278   |   0.003791   |   0.026054   |
|      80      |  -0.914184   |  241.156682  |  38.381554   |  38.381278   |   0.003791   |   0.026054   |
|      81      |  -0.915395   |  290.517030  |  46.237451   |  46.237221   |   0.003151   |   0.021628   |
|      82      |  -0.915395   | -290.517030  |  46.237451   |  46.237221   |   0.003151   |   0.021628   |
|      83      |  -0.933974   | -278.955360  |  44.397373   |  44.397124   |   0.003348   |   0.022524   |
|      84      |  -0.933974   |  278.955360  |  44.397373   |  44.397124   |   0.003348   |   0.022524   |
|      85      |  -0.943144   | -260.320871  |  41.431625   |  41.431353   |   0.003623   |   0.024136   |
|      86      |  -0.943144   |  260.320871  |  41.431625   |  41.431353   |   0.003623   |   0.024136   |
|      87      |  -0.944542   | -260.700481  |  41.492043   |  41.491770   |   0.003623   |   0.024101   |
|      88      |  -0.944542   |  260.700481  |  41.492043   |  41.491770   |   0.003623   |   0.024101   |
|      89      |  -0.953003   | -294.814043  |  46.921357   |  46.921112   |   0.003233   |   0.021312   |
|      90      |  -0.953003   |  294.814043  |  46.921357   |  46.921112   |   0.003233   |   0.021312   |
|      91      |  -0.960626   | -295.652742  |  47.054844   |  47.054595   |   0.003249   |   0.021252   |
|      92      |  -0.960626   |  295.652742  |  47.054844   |  47.054595   |   0.003249   |   0.021252   |
|      93      |  -0.960976   | -265.315963  |  42.226624   |  42.226347   |   0.003622   |   0.023682   |
|      94      |  -0.960976   |  265.315963  |  42.226624   |  42.226347   |   0.003622   |   0.023682   |
|      95      |  -0.961739   |  300.017779  |  47.749558   |  47.749313   |   0.003206   |   0.020943   |
|      96      |  -0.961739   | -300.017779  |  47.749558   |  47.749313   |   0.003206   |   0.020943   |
|      97      |  -0.961940   | -265.596058  |  42.271203   |  42.270925   |   0.003622   |   0.023657   |
|      98      |  -0.961940   |  265.596058  |  42.271203   |  42.270925   |   0.003622   |   0.023657   |
|      99      |  -0.965385   | -266.582863  |  42.428259   |  42.427980   |   0.003621   |   0.023569   |
FINISHED - Elapsed time = 16.3462206 seconds
FINISHED - CPU process time = 68.0131146 seconds
Post-processing
Nonlinear Equilibrium

The files can be opened with Paraview to see the deformation and aerodynamic loading on the flying wing in trim conditions.

Asymptotic Stability
[17]:
eigenvalues_trim = np.loadtxt('./output/horten_u_inf2800_M4N11Msf5/stability/eigenvalues.dat')

Flight Dynamics modes

The flight dynamics modes can be found close to the origin of the Argand diagram. In particular, the phugoid is the mode that is closest to the imaginary axis. An exercise is left to the user to compare this phugoid predicition with the nonlinear response!

[18]:
fig = plt.figure()
plt.scatter(eigenvalues_trim[:, 0], eigenvalues_trim[:, 1],
           marker='x',
           color='k')
plt.xlim(-0.5, 0.5)
plt.ylim(-0.5, 0.5)
plt.grid()
plt.xlabel('Real Part, $Re(\lambda)$ [rad/s]')
plt.ylabel('Imaginary Part, $Im(\lambda)$ [rad/s]');
_images/content_example_notebooks_linear_horten_37_0.png
Structural Modes

Looking further out on the plot, the structural modes appear. There is a curve given the Newmark-\(\beta\) integration scheme and on top of it several modes are damped by the presence of the aerodynamics.

Try changing newmark_damp in the LinearAssembler settings to see how this plot changes!

[19]:
fig = plt.figure()
plt.scatter(eigenvalues_trim[:, 0], eigenvalues_trim[:, 1],
           marker='x',
           color='k')
plt.xlim(-5, 0.5)
plt.ylim(-200, 200)
plt.grid()
plt.xlabel('Real Part, $Re(\lambda)$ [rad/s]')
plt.ylabel('Imaginary Part, $Im(\lambda)$ [rad/s]');
_images/content_example_notebooks_linear_horten_39_0.png

Simulation NREL 5MW wind turbine

[1]:
%config InlineBackend.figure_format = 'svg'
from IPython.display import Image
url = 'https://raw.githubusercontent.com/ImperialCollegeLondon/sharpy/dev_doc/docs/source/content/example_notebooks/images/turbulence_no_legend.png'
Image(url=url, width=800)
[1]:

In this notebook the blade loads on the NREL-5MW reference wind turbine computed with SHARPy and OpenFAST will be compared. However, zero-drag airfoils have been used.

OpenFAST: https://openfast.readthedocs.io

NREL-5MW: Jonkman, J.; Butterfield, S.; Musial, W. and Scott, G.. Definition of a 5-MW Reference Wind Turbine for Offshore System Development, Technical Report, NREL 2009

Load the required packages:

[2]:
# Required packages
%matplotlib inline
import numpy as np
import os
import matplotlib.pyplot as plt

# Required SHARPy modules
import sharpy.sharpy_main
import sharpy.utils.algebra as algebra
import sharpy.utils.generate_cases as gc
import cases.templates.template_wt as template_wt

These are the results from the OpenFAST simulation for comparison: out-of-plane of_cNdrR and in-plane of_cTdrR coefficients along the blade and thrust of_ct and power of_cp rotor coefficients

[3]:
of_rR = np.array([0.20158356, 0.3127131, 0.40794048, 0.5984148, 0.6936519, 0.85238045, 0.899999, 0.95555407, 0.98729974, 1.0])
of_cNdrR = np.array([0.08621394, 0.14687876, 0.19345148, 0.2942731, 0.36003628, 0.43748564, 0.44762507, 0.38839236, 0.29782477, 0.0])
of_cTdrR = np.array([0.048268348, 0.051957503, 0.05304592, 0.052862607, 0.056001827, 0.0536646, 0.050112925, 0.038993906, 0.023664437, 0.0])

of_ct = 0.69787693
of_cp = 0.48813498
Create SHARPy case

Definition of parameters

[4]:
# Mathematical constants
deg2rad = np.pi/180.

# Case
case = 'rotor'
route = './'

# Geometry discretization
chord_panels = np.array([8], dtype=int)
revs_in_wake = 5

# Operation
rotation_velocity = 12.1*2*np.pi/60
pitch_deg = 0. #degrees

# Wind
WSP = 12.
air_density = 1.225

# Simulation
dphi = 4.*deg2rad
revs_to_simulate = 5

Computation of associated parameters

[5]:
dt = dphi/rotation_velocity
time_steps = int(revs_to_simulate*2.*np.pi/dphi)
mstar = int(revs_in_wake*2.*np.pi/dphi)

Generation of the rotor geometry based on the information in the excel file

[6]:
op_params = {'rotation_velocity': rotation_velocity,
             'pitch_deg': pitch_deg,
             'wsp': WSP,
             'dt': dt}

geom_params = {'chord_panels':chord_panels,
               'tol_remove_points': 1e-8,
               'n_points_camber': 100,
               'm_distribution': 'uniform'}

excel_description = {'excel_file_name': route + '/source/type02_db_NREL5MW_v02.xlsx',
                     'excel_sheet_parameters': 'parameters',
                     'excel_sheet_structural_blade': 'structural_blade',
                     'excel_sheet_discretization_blade': 'discretization_blade',
                     'excel_sheet_aero_blade': 'aero_blade',
                     'excel_sheet_airfoil_info': 'airfoil_info',
                     'excel_sheet_airfoil_chord': 'airfoil_coord'}

options = {'camber_effect_on_twist': False,
           'user_defined_m_distribution_type': None,
           'include_polars': False}

rotor = template_wt.rotor_from_excel_type03(op_params,
                                            geom_params,
                                            excel_description,
                                            options)

WARNING: The poisson cofficient is assumed equal to 0.3
WARNING: Cross-section area is used as shear area
WARNING: Using perpendicular axis theorem to compute the inertia around xB
WARNING: Replacing node 29 by node 0
WARNING: Replacing node 58 by node 0

Define simulation details. The steady simulation is faster than the dynamic simulation. However, the dynamic simulation includes wake self-induction and provides more accurate results.

[7]:
steady_simulation = False
[8]:
SimInfo = gc.SimulationInformation()
SimInfo.set_default_values()

if steady_simulation:
    SimInfo.solvers['SHARPy']['flow'] = ['BeamLoader',
                            'AerogridLoader',
                            'StaticCoupledRBM',
                            'BeamPlot',
                            'AerogridPlot',
                            'SaveData']
else:
    SimInfo.solvers['SHARPy']['flow'] = ['BeamLoader',
                            'AerogridLoader',
                            'StaticCoupledRBM',
                            'DynamicCoupled']

SimInfo.solvers['SHARPy']['case'] = case
SimInfo.solvers['SHARPy']['route'] = route
SimInfo.solvers['SHARPy']['write_log'] = True
SimInfo.set_variable_all_dicts('dt', dt)
SimInfo.set_variable_all_dicts('rho', air_density)

SimInfo.solvers['SteadyVelocityField']['u_inf'] = WSP
SimInfo.solvers['SteadyVelocityField']['u_inf_direction'] = np.array([0., 0., 1.])

SimInfo.solvers['BeamLoader']['unsteady'] = 'on'

SimInfo.solvers['AerogridLoader']['unsteady'] = 'on'
SimInfo.solvers['AerogridLoader']['mstar'] = mstar
SimInfo.solvers['AerogridLoader']['freestream_dir'] = np.array([0.,0.,0.])
SimInfo.solvers['AerogridLoader']['wake_shape_generator'] = 'HelicoidalWake'
SimInfo.solvers['AerogridLoader']['wake_shape_generator_input'] = {'u_inf': WSP,
                                                                   'u_inf_direction': SimInfo.solvers['SteadyVelocityField']['u_inf_direction'],
                                                                   'rotation_velocity': rotation_velocity*np.array([0., 0., 1.]),
                                                                   'dt': dt,
                                                                   'dphi1': dphi,
                                                                   'ndphi1': mstar,
                                                                   'r': 1.,
                                                                   'dphimax': 10*deg2rad}

SimInfo.solvers['StaticCoupledRBM']['structural_solver'] = 'RigidDynamicPrescribedStep'
SimInfo.solvers['StaticCoupledRBM']['structural_solver_settings'] = SimInfo.solvers['RigidDynamicPrescribedStep']
SimInfo.solvers['StaticCoupledRBM']['aero_solver'] = 'StaticUvlm'
SimInfo.solvers['StaticCoupledRBM']['aero_solver_settings'] = SimInfo.solvers['StaticUvlm']

SimInfo.solvers['StaticCoupledRBM']['tolerance'] = 1e-8
SimInfo.solvers['StaticCoupledRBM']['n_load_steps'] = 0
SimInfo.solvers['StaticCoupledRBM']['relaxation_factor'] = 0.

SimInfo.solvers['StaticUvlm']['num_cores'] = 8
SimInfo.solvers['StaticUvlm']['velocity_field_generator'] = 'SteadyVelocityField'
SimInfo.solvers['StaticUvlm']['velocity_field_input'] = SimInfo.solvers['SteadyVelocityField']

SimInfo.solvers['SaveData']['compress_float'] = True

# Only used for steady_simulation = False
SimInfo.solvers['StepUvlm']['convection_scheme'] = 3
SimInfo.solvers['StepUvlm']['num_cores'] = 8
SimInfo.solvers['StepUvlm']['velocity_field_generator'] = 'SteadyVelocityField'
SimInfo.solvers['StepUvlm']['velocity_field_input'] = SimInfo.solvers['SteadyVelocityField']

SimInfo.solvers['DynamicCoupled']['structural_solver'] = 'RigidDynamicPrescribedStep'
SimInfo.solvers['DynamicCoupled']['structural_solver_settings'] = SimInfo.solvers['RigidDynamicPrescribedStep']
SimInfo.solvers['DynamicCoupled']['aero_solver'] = 'StepUvlm'
SimInfo.solvers['DynamicCoupled']['aero_solver_settings'] = SimInfo.solvers['StepUvlm']
SimInfo.solvers['DynamicCoupled']['postprocessors'] = ['BeamPlot', 'AerogridPlot', 'Cleanup', 'SaveData']
SimInfo.solvers['DynamicCoupled']['postprocessors_settings'] = {'BeamPlot': SimInfo.solvers['BeamPlot'],
                                                             'AerogridPlot': SimInfo.solvers['AerogridPlot'],
                                                             'Cleanup': SimInfo.solvers['Cleanup'],
                                                             'SaveData': SimInfo.solvers['SaveData']}
SimInfo.solvers['DynamicCoupled']['minimum_steps'] = 0
SimInfo.solvers['DynamicCoupled']['include_unsteady_force_contribution'] = True
SimInfo.solvers['DynamicCoupled']['relaxation_factor'] = 0.
SimInfo.solvers['DynamicCoupled']['final_relaxation_factor'] = 0.
SimInfo.solvers['DynamicCoupled']['dynamic_relaxation'] = False
SimInfo.solvers['DynamicCoupled']['relaxation_steps'] = 0

# Define dynamic simulation (used regardless the value of "steady_simulation" variable)
SimInfo.define_num_steps(time_steps)
SimInfo.with_forced_vel = True
SimInfo.for_vel = np.zeros((time_steps,6), dtype=float)
SimInfo.for_vel[:,5] = rotation_velocity
SimInfo.for_acc = np.zeros((time_steps,6), dtype=float)
SimInfo.with_dynamic_forces = True
SimInfo.dynamic_forces = np.zeros((time_steps,rotor.StructuralInformation.num_node,6), dtype=float)

Generate simulation files

[9]:
gc.clean_test_files(SimInfo.solvers['SHARPy']['route'], SimInfo.solvers['SHARPy']['case'])
rotor.generate_h5_files(SimInfo.solvers['SHARPy']['route'], SimInfo.solvers['SHARPy']['case'])
SimInfo.generate_solver_file()
SimInfo.generate_dyn_file(time_steps)
Run SHARPy case
[10]:
sharpy_output = sharpy.sharpy_main.main(['', SimInfo.solvers['SHARPy']['route'] + SimInfo.solvers['SHARPy']['case'] + '.sharpy'])
--------------------------------------------------------------------------------
            ######  ##     ##    ###    ########  ########  ##    ##
           ##    ## ##     ##   ## ##   ##     ## ##     ##  ##  ##
           ##       ##     ##  ##   ##  ##     ## ##     ##   ####
            ######  ######### ##     ## ########  ########     ##
                 ## ##     ## ######### ##   ##   ##           ##
           ##    ## ##     ## ##     ## ##    ##  ##           ##
            ######  ##     ## ##     ## ##     ## ##           ##
--------------------------------------------------------------------------------
Aeroelastics Lab, Aeronautics Department.
    Copyright (c), Imperial College London.
    All rights reserved.
    License available at https://github.com/imperialcollegelondon/sharpy
Running SHARPy from /home/am3717/code/sharpy/docs/source/content/example_notebooks
SHARPy being run is in /home/am3717/code/sharpy
The branch being run is dev_setting_error
The version and commit hash are: v1.2.1-357-gbb7c4b4-bb7c4b4
SHARPy output folder set
     ./output//rotor/
Generating an instance of BeamLoader
Generating an instance of AerogridLoader
Variable shear_direction has no assigned value in the settings file.
    will default to the value: [1. 0. 0.]
Variable shear_exp has no assigned value in the settings file.
    will default to the value: 0.0
Variable h_ref has no assigned value in the settings file.
    will default to the value: 1.0
Variable h_corr has no assigned value in the settings file.
    will default to the value: 1.0
The aerodynamic grid contains 3 surfaces
  Surface 0, M=8, N=26
     Wake 0, M=450, N=26
  Surface 1, M=8, N=26
     Wake 1, M=450, N=26
  Surface 2, M=8, N=26
     Wake 2, M=450, N=26
  In total: 624 bound panels
  In total: 35100 wake panels
  Total number of panels = 35724
Generating an instance of StaticCoupledRBM
Generating an instance of RigidDynamicPrescribedStep
Generating an instance of StaticUvlm
i_step: 0, i_iter: 0
Resultant forces and moments: (array([2.54814836e-08, 5.82946313e-09, 2.09459948e+04]), array([1.53411975e-07, 3.24440634e-08, 5.96558361e+06]))
Generating an instance of DynamicCoupled
Generating an instance of RigidDynamicPrescribedStep
Generating an instance of StepUvlm
Generating an instance of BeamPlot
Generating an instance of AerogridPlot
Generating an instance of Cleanup
Generating an instance of SaveData



|=======|========|======|==============|==============|==============|==============|==============|
|  ts   |   t    | iter | struc ratio  |  iter time   | residual vel |  FoR_vel(x)  |  FoR_vel(z)  |
|=======|========|======|==============|==============|==============|==============|==============|
|   1   | 0.0551 |  1   |   0.000251   |  56.804234   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|   2   | 0.1102 |  1   |   0.000177   |  60.232129   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|   3   | 0.1653 |  1   |   0.000234   |  59.442611   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|   4   | 0.2204 |  1   |   0.000290   |  64.383652   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|   5   | 0.2755 |  1   |   0.000275   |  52.774436   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|   6   | 0.3306 |  1   |   0.000293   |  48.828457   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|   7   | 0.3857 |  1   |   0.000316   |  49.762675   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|   8   | 0.4408 |  1   |   0.000227   |  49.627842   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|   9   | 0.4959 |  1   |   0.000193   |  58.254770   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  10   | 0.5510 |  1   |   0.000233   |  49.347327   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  11   | 0.6061 |  1   |   0.000222   |  51.950339   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  12   | 0.6612 |  1   |   0.000195   |  58.489715   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  13   | 0.7163 |  1   |   0.000190   |  55.497720   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  14   | 0.7713 |  1   |   0.000287   |  49.864559   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  15   | 0.8264 |  1   |   0.000198   |  56.915311   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  16   | 0.8815 |  1   |   0.000273   |  52.475129   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  17   | 0.9366 |  1   |   0.000212   |  53.472742   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  18   | 0.9917 |  1   |   0.000220   |  51.679432   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  19   | 1.0468 |  1   |   0.000230   |  49.468328   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  20   | 1.1019 |  1   |   0.000233   |  48.806374   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  21   | 1.1570 |  1   |   0.000214   |  51.507987   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  22   | 1.2121 |  1   |   0.000152   |  75.114590   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  23   | 1.2672 |  1   |   0.000178   |  63.764692   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  24   | 1.3223 |  1   |   0.000232   |  48.927093   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  25   | 1.3774 |  1   |   0.000205   |  55.065928   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  26   | 1.4325 |  1   |   0.000209   |  53.747631   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  27   | 1.4876 |  1   |   0.000215   |  65.487096   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  28   | 1.5427 |  1   |   0.000366   |  52.159906   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  29   | 1.5978 |  1   |   0.000286   |  50.405248   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  30   | 1.6529 |  1   |   0.000243   |  53.903698   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  31   | 1.7080 |  1   |   0.000189   |  55.762230   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  32   | 1.7631 |  1   |   0.000230   |  49.679477   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  33   | 1.8182 |  1   |   0.000267   |  49.140923   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  34   | 1.8733 |  1   |   0.000217   |  51.686471   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  35   | 1.9284 |  1   |   0.000227   |  49.924635   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  36   | 1.9835 |  1   |   0.000290   |  49.295199   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  37   | 2.0386 |  1   |   0.000231   |  49.096186   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  38   | 2.0937 |  1   |   0.000267   |  53.824351   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  39   | 2.1488 |  1   |   0.000274   |  50.208116   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  40   | 2.2039 |  1   |   0.000164   |  68.475332   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  41   | 2.2590 |  1   |   0.000219   |  51.476537   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  42   | 2.3140 |  1   |   0.000258   |  50.780835   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  43   | 2.3691 |  1   |   0.000205   |  54.508414   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  44   | 2.4242 |  1   |   0.000229   |  49.643120   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  45   | 2.4793 |  1   |   0.000423   |  49.510440   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  46   | 2.5344 |  1   |   0.000229   |  49.386177   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  47   | 2.5895 |  1   |   0.000224   |  51.096846   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  48   | 2.6446 |  1   |   0.000429   |  67.054611   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  49   | 2.6997 |  1   |   0.000674   |  49.034094   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  50   | 2.7548 |  1   |   0.000473   |  67.770922   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  51   | 2.8099 |  1   |   0.000623   |  52.057162   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  52   | 2.8650 |  1   |   0.000197   |  57.338530   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  53   | 2.9201 |  1   |   0.000211   |  53.323214   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  54   | 2.9752 |  1   |   0.000228   |  49.446313   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  55   | 3.0303 |  1   |   0.000226   |  50.531894   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  56   | 3.0854 |  1   |   0.000216   |  49.277498   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  57   | 3.1405 |  1   |   0.000229   |  49.378688   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  58   | 3.1956 |  1   |   0.000456   |  49.096131   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  59   | 3.2507 |  1   |   0.000638   |  49.407950   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  60   | 3.3058 |  1   |   0.000644   |  49.355487   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  61   | 3.3609 |  1   |   0.000429   |  52.381709   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  62   | 3.4160 |  1   |   0.000227   |  50.244867   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  63   | 3.4711 |  1   |   0.000226   |  50.090238   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  64   | 3.5262 |  1   |   0.000221   |  50.890983   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  65   | 3.5813 |  1   |   0.000292   |  52.582257   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  66   | 3.6364 |  1   |   0.000229   |  48.970770   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  67   | 3.6915 |  1   |   0.000211   |  53.921150   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  68   | 3.7466 |  1   |   0.000276   |  49.332785   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  69   | 3.8017 |  1   |   0.000405   |  49.861912   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  70   | 3.8567 |  1   |   0.000678   |  50.109032   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  71   | 3.9118 |  1   |   0.000627   |  50.052867   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  72   | 3.9669 |  1   |   0.000231   |  49.125818   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  73   | 4.0220 |  1   |   0.000215   |  52.475354   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  74   | 4.0771 |  1   |   0.000302   |  51.044905   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  75   | 4.1322 |  1   |   0.000232   |  49.154350   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  76   | 4.1873 |  1   |   0.000263   |  49.587372   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  77   | 4.2424 |  1   |   0.000382   |  48.959923   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  78   | 4.2975 |  1   |   0.000207   |  54.498279   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  79   | 4.3526 |  1   |   0.000209   |  55.866552   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  80   | 4.4077 |  1   |   0.000222   |  50.659905   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  81   | 4.4628 |  1   |   0.000232   |  49.229321   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  82   | 4.5179 |  1   |   0.000230   |  49.197802   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  83   | 4.5730 |  1   |   0.000244   |  58.532026   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  84   | 4.6281 |  1   |   0.000229   |  49.010943   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  85   | 4.6832 |  1   |   0.000236   |  49.181471   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  86   | 4.7383 |  1   |   0.000234   |  50.404876   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  87   | 4.7934 |  1   |   0.000223   |  50.863604   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  88   | 4.8485 |  1   |   0.000232   |  49.386036   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  89   | 4.9036 |  1   |   0.000292   |  48.966426   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  90   | 4.9587 |  1   |   0.000204   |  55.176201   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  91   | 5.0138 |  1   |   0.000381   |  49.363449   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  92   | 5.0689 |  1   |   0.000254   |  51.436284   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  93   | 5.1240 |  1   |   0.000427   |  54.203413   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  94   | 5.1791 |  1   |   0.000278   |  51.088371   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  95   | 5.2342 |  1   |   0.000221   |  51.267494   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  96   | 5.2893 |  1   |   0.000220   |  51.246126   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  97   | 5.3444 |  1   |   0.000261   |  50.044367   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  98   | 5.3994 |  1   |   0.000237   |  48.928531   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  99   | 5.4545 |  1   |   0.000230   |  48.869230   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  100  | 5.5096 |  1   |   0.000229   |  49.124024   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  101  | 5.5647 |  1   |   0.000230   |  49.170615   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  102  | 5.6198 |  1   |   0.000227   |  51.072559   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  103  | 5.6749 |  1   |   0.000230   |  49.106752   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  104  | 5.7300 |  1   |   0.000230   |  49.157374   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  105  | 5.7851 |  1   |   0.000230   |  48.729726   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  106  | 5.8402 |  1   |   0.000230   |  49.307981   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  107  | 5.8953 |  1   |   0.000232   |  49.303297   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  108  | 5.9504 |  1   |   0.000228   |  49.388923   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  109  | 6.0055 |  1   |   0.000251   |  49.505395   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  110  | 6.0606 |  1   |   0.000294   |  49.671154   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  111  | 6.1157 |  1   |   0.000637   |  49.106910   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  112  | 6.1708 |  1   |   0.000668   |  49.600747   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  113  | 6.2259 |  1   |   0.000694   |  48.788273   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  114  | 6.2810 |  1   |   0.000605   |  49.259812   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  115  | 6.3361 |  1   |   0.000235   |  49.096078   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  116  | 6.3912 |  1   |   0.000235   |  48.627974   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  117  | 6.4463 |  1   |   0.000231   |  48.687230   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  118  | 6.5014 |  1   |   0.000261   |  50.182136   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  119  | 6.5565 |  1   |   0.000220   |  51.480792   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  120  | 6.6116 |  1   |   0.000212   |  52.759361   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  121  | 6.6667 |  1   |   0.000234   |  61.395446   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  122  | 6.7218 |  1   |   0.000196   |  57.312678   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  123  | 6.7769 |  1   |   0.000196   |  57.288595   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  124  | 6.8320 |  1   |   0.000219   |  52.597533   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  125  | 6.8871 |  1   |   0.000279   |  51.215139   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  126  | 6.9421 |  1   |   0.000232   |  48.835388   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  127  | 6.9972 |  1   |   0.000228   |  49.442145   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  128  | 7.0523 |  1   |   0.000232   |  49.943434   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  129  | 7.1074 |  1   |   0.000265   |  48.943739   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  130  | 7.1625 |  1   |   0.000233   |  48.552538   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  131  | 7.2176 |  1   |   0.000235   |  48.576140   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  132  | 7.2727 |  1   |   0.000227   |  50.729522   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  133  | 7.3278 |  1   |   0.000199   |  57.042671   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  134  | 7.3829 |  1   |   0.000229   |  49.647710   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  135  | 7.4380 |  1   |   0.000377   |  53.191903   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  136  | 7.4931 |  1   |   0.000666   |  50.832518   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  137  | 7.5482 |  1   |   0.000560   |  52.129724   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  138  | 7.6033 |  1   |   0.000593   |  48.825715   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  139  | 7.6584 |  1   |   0.000231   |  49.220850   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  140  | 7.7135 |  1   |   0.000347   |  64.642874   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  141  | 7.7686 |  1   |   0.000615   |  54.791703   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  142  | 7.8237 |  1   |   0.000557   |  55.332506   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  143  | 7.8788 |  1   |   0.000649   |  51.958248   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  144  | 7.9339 |  1   |   0.000431   |  52.224418   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  145  | 7.9890 |  1   |   0.000532   |  60.207598   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  146  | 8.0441 |  1   |   0.000267   |  48.557877   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  147  | 8.0992 |  1   |   0.000283   |  50.720948   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  148  | 8.1543 |  1   |   0.000264   |  54.107664   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  149  | 8.2094 |  1   |   0.000225   |  49.998135   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  150  | 8.2645 |  1   |   0.000297   |  48.723537   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  151  | 8.3196 |  1   |   0.000229   |  48.991915   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  152  | 8.3747 |  1   |   0.000223   |  50.525580   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  153  | 8.4298 |  1   |   0.000372   |  48.880427   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  154  | 8.4848 |  1   |   0.000232   |  48.851891   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  155  | 8.5399 |  1   |   0.000231   |  48.731096   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  156  | 8.5950 |  1   |   0.000209   |  53.669843   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  157  | 8.6501 |  1   |   0.000203   |  55.525421   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  158  | 8.7052 |  1   |   0.000216   |  48.727216   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  159  | 8.7603 |  1   |   0.000240   |  52.981239   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  160  | 8.8154 |  1   |   0.000294   |  50.516618   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  161  | 8.8705 |  1   |   0.000198   |  56.957355   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  162  | 8.9256 |  1   |   0.000268   |  48.780843   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  163  | 8.9807 |  1   |   0.000228   |  49.216988   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  164  | 9.0358 |  1   |   0.000228   |  49.020854   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  165  | 9.0909 |  1   |   0.000236   |  48.516192   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  166  | 9.1460 |  1   |   0.000275   |  48.936249   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  167  | 9.2011 |  1   |   0.000229   |  48.984558   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  168  | 9.2562 |  1   |   0.000228   |  50.011495   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  169  | 9.3113 |  1   |   0.000230   |  49.079509   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  170  | 9.3664 |  1   |   0.000232   |  48.940832   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  171  | 9.4215 |  1   |   0.000266   |  48.539668   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  172  | 9.4766 |  1   |   0.000329   |  48.707876   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  173  | 9.5317 |  1   |   0.000344   |  49.214713   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  174  | 9.5868 |  1   |   0.000221   |  50.762513   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  175  | 9.6419 |  1   |   0.000336   |  55.302099   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  176  | 9.6970 |  1   |   0.000217   |  48.736059   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  177  | 9.7521 |  1   |   0.000231   |  48.750098   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  178  | 9.8072 |  1   |   0.000229   |  48.794680   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  179  | 9.8623 |  1   |   0.000225   |  50.519301   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  180  | 9.9174 |  1   |   0.000225   |  49.930789   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  181  | 9.9725 |  1   |   0.000265   |  50.077232   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  182  |10.0275 |  1   |   0.000285   |  50.327260   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  183  |10.0826 |  1   |   0.000319   |  50.215326   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  184  |10.1377 |  1   |   0.000288   |  48.350528   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  185  |10.1928 |  1   |   0.000233   |  48.372314   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  186  |10.2479 |  1   |   0.000232   |  49.104808   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  187  |10.3030 |  1   |   0.000292   |  48.972235   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  188  |10.3581 |  1   |   0.000655   |  48.972110   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  189  |10.4132 |  1   |   0.000233   |  48.457135   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  190  |10.4683 |  1   |   0.000229   |  49.120724   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  191  |10.5234 |  1   |   0.000222   |  51.106254   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  192  |10.5785 |  1   |   0.000232   |  48.794933   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  193  |10.6336 |  1   |   0.000292   |  49.537670   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  194  |10.6887 |  1   |   0.000230   |  49.236260   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  195  |10.7438 |  1   |   0.000603   |  52.529460   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  196  |10.7989 |  1   |   0.000697   |  48.383116   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  197  |10.8540 |  1   |   0.000347   |  48.288813   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  198  |10.9091 |  1   |   0.000227   |  49.550065   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  199  |10.9642 |  1   |   0.000216   |  48.675859   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  200  |11.0193 |  1   |   0.000231   |  49.152487   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  201  |11.0744 |  1   |   0.000235   |  48.778197   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  202  |11.1295 |  1   |   0.000373   |  57.791454   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  203  |11.1846 |  1   |   0.000582   |  57.753718   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  204  |11.2397 |  1   |   0.000451   |  48.675944   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  205  |11.2948 |  1   |   0.000235   |  48.274112   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  206  |11.3499 |  1   |   0.000232   |  48.917871   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  207  |11.4050 |  1   |   0.000293   |  49.482251   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  208  |11.4601 |  1   |   0.000297   |  48.304309   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  209  |11.5152 |  1   |   0.000263   |  49.162448   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  210  |11.5702 |  1   |   0.000227   |  50.845835   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  211  |11.6253 |  1   |   0.000232   |  48.809305   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  212  |11.6804 |  1   |   0.000293   |  48.950330   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  213  |11.7355 |  1   |   0.000298   |  48.481146   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  214  |11.7906 |  1   |   0.000234   |  48.222179   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  215  |11.8457 |  1   |   0.000225   |  48.228569   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  216  |11.9008 |  1   |   0.000218   |  48.173668   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  217  |11.9559 |  1   |   0.000230   |  48.496389   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  218  |12.0110 |  1   |   0.000212   |  53.240908   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  219  |12.0661 |  1   |   0.000224   |  51.372105   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  220  |12.1212 |  1   |   0.000419   |  49.490550   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  221  |12.1763 |  1   |   0.000459   |  49.025501   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  222  |12.2314 |  1   |   0.000210   |  53.157816   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  223  |12.2865 |  1   |   0.000233   |  48.099241   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  224  |12.3416 |  1   |   0.000241   |  59.450060   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  225  |12.3967 |  1   |   0.000224   |  50.153783   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  226  |12.4518 |  1   |   0.000169   |  67.550282   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  227  |12.5069 |  1   |   0.000635   |  51.062920   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  228  |12.5620 |  1   |   0.000233   |  48.498621   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  229  |12.6171 |  1   |   0.000647   |  48.837410   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  230  |12.6722 |  1   |   0.000685   |  48.524438   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  231  |12.7273 |  1   |   0.000645   |  47.972726   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  232  |12.7824 |  1   |   0.000698   |  48.332650   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  233  |12.8375 |  1   |   0.000291   |  49.344210   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  234  |12.8926 |  1   |   0.000231   |  48.621207   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  235  |12.9477 |  1   |   0.000211   |  53.099352   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  236  |13.0028 |  1   |   0.000231   |  48.779174   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  237  |13.0579 |  1   |   0.000221   |  52.508748   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  238  |13.1129 |  1   |   0.000197   |  57.071891   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  239  |13.1680 |  1   |   0.000232   |  48.635785   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  240  |13.2231 |  1   |   0.000228   |  49.653808   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  241  |13.2782 |  1   |   0.000232   |  49.880283   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  242  |13.3333 |  1   |   0.000219   |  50.989864   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  243  |13.3884 |  1   |   0.000218   |  51.562733   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  244  |13.4435 |  1   |   0.000175   |  60.525012   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  245  |13.4986 |  1   |   0.000208   |  53.714735   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  246  |13.5537 |  1   |   0.000188   |  60.430187   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  247  |13.6088 |  1   |   0.000580   |  55.369422   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  248  |13.6639 |  1   |   0.000376   |  52.945929   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  249  |13.7190 |  1   |   0.000221   |  50.621281   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  250  |13.7741 |  1   |   0.000222   |  51.930545   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  251  |13.8292 |  1   |   0.000203   |  55.750479   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  252  |13.8843 |  1   |   0.000228   |  49.736165   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  253  |13.9394 |  1   |   0.000239   |  48.733683   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  254  |13.9945 |  1   |   0.000228   |  48.860423   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  255  |14.0496 |  1   |   0.000234   |  48.158656   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  256  |14.1047 |  1   |   0.000222   |  48.995898   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  257  |14.1598 |  1   |   0.000181   |  61.699569   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  258  |14.2149 |  1   |   0.000217   |  51.853006   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  259  |14.2700 |  1   |   0.000231   |  48.370357   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  260  |14.3251 |  1   |   0.000231   |  48.536412   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  261  |14.3802 |  1   |   0.000231   |  48.706123   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  262  |14.4353 |  1   |   0.000321   |  48.889459   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  263  |14.4904 |  1   |   0.000232   |  48.413389   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  264  |14.5455 |  1   |   0.000183   |  61.637297   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  265  |14.6006 |  1   |   0.000266   |  51.996729   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  266  |14.6556 |  1   |   0.000440   |  51.124606   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  267  |14.7107 |  1   |   0.000206   |  54.482224   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  268  |14.7658 |  1   |   0.000227   |  49.396567   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  269  |14.8209 |  1   |   0.000216   |  48.399076   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  270  |14.8760 |  1   |   0.000225   |  49.932379   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  271  |14.9311 |  1   |   0.000229   |  48.837313   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  272  |14.9862 |  1   |   0.000234   |  48.303012   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  273  |15.0413 |  1   |   0.000297   |  48.557886   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  274  |15.0964 |  1   |   0.000232   |  48.462573   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  275  |15.1515 |  1   |   0.000235   |  48.074680   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  276  |15.2066 |  1   |   0.000237   |  47.978437   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  277  |15.2617 |  1   |   0.000218   |  48.799704   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  278  |15.3168 |  1   |   0.000180   |  61.907709   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  279  |15.3719 |  1   |   0.000223   |  50.256748   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  280  |15.4270 |  1   |   0.000229   |  49.243923   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  281  |15.4821 |  1   |   0.000453   |  49.924487   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  282  |15.5372 |  1   |   0.000350   |  49.501563   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  283  |15.5923 |  1   |   0.000234   |  48.333380   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  284  |15.6474 |  1   |   0.000223   |  50.163273   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  285  |15.7025 |  1   |   0.000225   |  50.068699   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  286  |15.7576 |  1   |   0.000229   |  48.458516   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  287  |15.8127 |  1   |   0.000231   |  49.273332   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  288  |15.8678 |  1   |   0.000232   |  48.548550   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  289  |15.9229 |  1   |   0.000224   |  51.276163   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  290  |15.9780 |  1   |   0.000233   |  48.570122   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  291  |16.0331 |  1   |   0.000192   |  50.266936   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  292  |16.0882 |  1   |   0.000295   |  48.692444   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  293  |16.1433 |  1   |   0.000202   |  48.893389   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  294  |16.1983 |  1   |   0.000443   |  50.813372   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  295  |16.2534 |  1   |   0.000529   |  60.601432   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  296  |16.3085 |  1   |   0.000571   |  50.993108   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  297  |16.3636 |  1   |   0.000228   |  49.065097   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  298  |16.4187 |  1   |   0.000234   |  48.226984   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  299  |16.4738 |  1   |   0.000233   |  48.534926   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  300  |16.5289 |  1   |   0.000627   |  48.788802   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  301  |16.5840 |  1   |   0.000555   |  60.530895   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  302  |16.6391 |  1   |   0.000628   |  48.944436   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  303  |16.6942 |  1   |   0.000427   |  49.049230   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  304  |16.7493 |  1   |   0.000236   |  47.892993   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  305  |16.8044 |  1   |   0.000325   |  48.441506   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  306  |16.8595 |  1   |   0.000236   |  48.047404   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  307  |16.9146 |  1   |   0.000232   |  48.215284   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  308  |16.9697 |  1   |   0.000226   |  50.124858   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  309  |17.0248 |  1   |   0.000213   |  52.395805   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  310  |17.0799 |  1   |   0.000222   |  51.302776   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  311  |17.1350 |  1   |   0.000439   |  51.171773   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  312  |17.1901 |  1   |   0.000232   |  49.032143   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  313  |17.2452 |  1   |   0.000233   |  48.628400   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  314  |17.3003 |  1   |   0.000237   |  47.940311   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  315  |17.3554 |  1   |   0.000216   |  51.865635   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  316  |17.4105 |  1   |   0.000373   |  54.905208   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  317  |17.4656 |  1   |   0.000310   |  48.191338   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  318  |17.5207 |  1   |   0.000409   |  48.607705   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  319  |17.5758 |  1   |   0.000350   |  53.126807   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  320  |17.6309 |  1   |   0.000236   |  47.827493   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  321  |17.6860 |  1   |   0.000233   |  48.142512   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  322  |17.7410 |  1   |   0.000233   |  48.315800   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  323  |17.7961 |  1   |   0.000203   |  55.821999   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  324  |17.8512 |  1   |   0.000227   |  49.786573   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  325  |17.9063 |  1   |   0.000424   |  53.387859   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  326  |17.9614 |  1   |   0.000447   |  50.685506   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  327  |18.0165 |  1   |   0.000235   |  48.078798   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  328  |18.0716 |  1   |   0.000232   |  48.322922   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  329  |18.1267 |  1   |   0.000223   |  48.098878   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  330  |18.1818 |  1   |   0.000201   |  48.656743   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  331  |18.2369 |  1   |   0.000273   |  48.314217   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  332  |18.2920 |  1   |   0.000224   |  48.475068   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  333  |18.3471 |  1   |   0.000230   |  48.642246   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  334  |18.4022 |  1   |   0.000194   |  57.654265   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  335  |18.4573 |  1   |   0.000225   |  50.092508   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  336  |18.5124 |  1   |   0.000291   |  49.505815   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  337  |18.5675 |  1   |   0.000228   |  49.799143   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  338  |18.6226 |  1   |   0.000272   |  48.344175   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  339  |18.6777 |  1   |   0.000219   |  48.669889   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  340  |18.7328 |  1   |   0.000221   |  48.424671   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  341  |18.7879 |  1   |   0.000204   |  55.293948   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  342  |18.8430 |  1   |   0.000361   |  48.517776   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  343  |18.8981 |  1   |   0.000218   |  52.256841   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  344  |18.9532 |  1   |   0.000232   |  48.441100   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  345  |19.0083 |  1   |   0.000234   |  48.389977   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  346  |19.0634 |  1   |   0.000230   |  48.982534   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  347  |19.1185 |  1   |   0.000231   |  48.746604   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  348  |19.1736 |  1   |   0.000229   |  56.961390   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  349  |19.2287 |  1   |   0.000188   |  59.830517   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  350  |19.2837 |  1   |   0.000296   |  51.906979   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  351  |19.3388 |  1   |   0.000217   |  51.754677   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  352  |19.3939 |  1   |   0.000244   |  48.090983   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  353  |19.4490 |  1   |   0.000234   |  48.219884   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  354  |19.5041 |  1   |   0.000211   |  53.274204   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  355  |19.5592 |  1   |   0.000236   |  47.988238   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  356  |19.6143 |  1   |   0.000236   |  48.149312   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  357  |19.6694 |  1   |   0.000231   |  48.684465   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  358  |19.7245 |  1   |   0.000245   |  48.573752   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  359  |19.7796 |  1   |   0.000255   |  48.387298   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  360  |19.8347 |  1   |   0.000233   |  48.496933   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  361  |19.8898 |  1   |   0.000298   |  48.227055   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  362  |19.9449 |  1   |   0.000277   |  50.033512   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  363  |20.0000 |  1   |   0.000230   |  48.865905   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  364  |20.0551 |  1   |   0.000233   |  48.282476   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  365  |20.1102 |  1   |   0.000231   |  48.869913   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  366  |20.1653 |  1   |   0.000240   |  48.197653   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  367  |20.2204 |  1   |   0.000236   |  47.995288   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  368  |20.2755 |  1   |   0.000218   |  48.416211   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  369  |20.3306 |  1   |   0.000229   |  49.650859   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  370  |20.3857 |  1   |   0.000281   |  50.925766   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  371  |20.4408 |  1   |   0.000293   |  49.072721   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  372  |20.4959 |  1   |   0.000237   |  47.848434   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  373  |20.5510 |  1   |   0.000461   |  48.577324   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  374  |20.6061 |  1   |   0.000288   |  48.149040   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  375  |20.6612 |  1   |   0.000232   |  48.140545   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  376  |20.7163 |  1   |   0.000627   |  48.528365   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  377  |20.7713 |  1   |   0.000649   |  48.815492   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  378  |20.8264 |  1   |   0.000220   |  48.691541   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  379  |20.8815 |  1   |   0.000234   |  48.163874   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  380  |20.9366 |  1   |   0.000397   |  47.970319   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  381  |20.9917 |  1   |   0.000266   |  49.183593   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  382  |21.0468 |  1   |   0.000228   |  49.448159   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  383  |21.1019 |  1   |   0.000230   |  48.558385   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  384  |21.1570 |  1   |   0.000279   |  48.382636   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  385  |21.2121 |  1   |   0.000237   |  47.482272   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  386  |21.2672 |  1   |   0.000233   |  48.183362   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  387  |21.3223 |  1   |   0.000232   |  48.062299   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  388  |21.3774 |  1   |   0.000235   |  48.362948   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  389  |21.4325 |  1   |   0.000233   |  48.422455   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  390  |21.4876 |  1   |   0.000236   |  48.077169   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  391  |21.5427 |  1   |   0.000218   |  48.317787   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  392  |21.5978 |  1   |   0.000231   |  48.382455   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  393  |21.6529 |  1   |   0.000233   |  48.310206   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  394  |21.7080 |  1   |   0.000219   |  49.225511   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  395  |21.7631 |  1   |   0.000238   |  47.725182   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  396  |21.8182 |  1   |   0.000403   |  48.100903   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  397  |21.8733 |  1   |   0.000227   |  49.886770   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  398  |21.9284 |  1   |   0.000226   |  49.658201   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  399  |21.9835 |  1   |   0.000236   |  48.305113   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  400  |22.0386 |  1   |   0.000213   |  53.014337   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  401  |22.0937 |  1   |   0.000323   |  48.752367   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  402  |22.1488 |  1   |   0.000231   |  48.655110   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  403  |22.2039 |  1   |   0.000302   |  49.894845   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  404  |22.2590 |  1   |   0.000192   |  54.227928   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  405  |22.3140 |  1   |   0.000213   |  53.815790   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  406  |22.3691 |  1   |   0.000231   |  49.235416   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  407  |22.4242 |  1   |   0.000232   |  48.387503   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  408  |22.4793 |  1   |   0.000220   |  52.815450   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  409  |22.5344 |  1   |   0.000232   |  48.253041   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  410  |22.5895 |  1   |   0.000218   |  52.584628   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  411  |22.6446 |  1   |   0.000222   |  50.874607   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  412  |22.6997 |  1   |   0.000234   |  48.125687   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  413  |22.7548 |  1   |   0.000314   |  65.912785   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  414  |22.8099 |  1   |   0.000294   |  48.712801   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  415  |22.8650 |  1   |   0.000234   |  48.264049   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  416  |22.9201 |  1   |   0.000219   |  52.101943   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  417  |22.9752 |  1   |   0.000233   |  48.181907   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  418  |23.0303 |  1   |   0.000239   |  47.737343   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  419  |23.0854 |  1   |   0.000189   |  55.077763   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  420  |23.1405 |  1   |   0.000252   |  48.412007   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  421  |23.1956 |  1   |   0.000207   |  52.025445   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  422  |23.2507 |  1   |   0.000202   |  55.306192   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  423  |23.3058 |  1   |   0.000235   |  48.069254   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  424  |23.3609 |  1   |   0.000268   |  48.786326   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  425  |23.4160 |  1   |   0.000234   |  48.662434   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  426  |23.4711 |  1   |   0.000430   |  48.229208   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  427  |23.5262 |  1   |   0.000660   |  48.355178   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  428  |23.5813 |  1   |   0.000475   |  47.940589   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  429  |23.6364 |  1   |   0.000464   |  48.627356   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  430  |23.6915 |  1   |   0.000231   |  48.519762   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  431  |23.7466 |  1   |   0.000233   |  48.359547   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  432  |23.8017 |  1   |   0.000273   |  48.313746   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  433  |23.8567 |  1   |   0.000237   |  47.977213   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  434  |23.9118 |  1   |   0.000226   |  49.786822   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  435  |23.9669 |  1   |   0.000231   |  48.641675   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  436  |24.0220 |  1   |   0.000263   |  50.056180   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  437  |24.0771 |  1   |   0.000239   |  48.169318   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  438  |24.1322 |  1   |   0.000237   |  47.903935   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  439  |24.1873 |  1   |   0.000235   |  48.071315   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  440  |24.2424 |  1   |   0.000298   |  47.997039   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  441  |24.2975 |  1   |   0.000204   |  51.404477   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  442  |24.3526 |  1   |   0.000234   |  48.367934   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  443  |24.4077 |  1   |   0.000297   |  48.626223   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  444  |24.4628 |  1   |   0.000254   |  48.214660   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  445  |24.5179 |  1   |   0.000234   |  47.731147   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  446  |24.5730 |  1   |   0.000268   |  48.701918   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  447  |24.6281 |  1   |   0.000233   |  48.425494   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  448  |24.6832 |  1   |   0.000233   |  48.324203   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  449  |24.7383 |  1   |   0.000228   |  49.378323   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
|  450  |24.7934 |  1   |   0.000229   |  48.777402   |   0.000000   | 0.000000e+00 | 0.000000e+00 |
...Finished
FINISHED - Elapsed time = 23245.3692466 seconds
FINISHED - CPU process time = 92349.9106726 seconds
Postprocessing

Read the structural and aerodynamic information of the last time step

[11]:
tstep = sharpy_output.structure.timestep_info[-1]
astep = sharpy_output.aero.timestep_info[-1]

Separate the structure into blades

[12]:
# Define beams
ielem = 0
nblades = np.max(sharpy_output.structure.beam_number) + 1
nodes_blade = []
first_node = 0
for iblade in range(nblades):
    nodes_blade.append(np.zeros((sharpy_output.structure.num_node,), dtype=bool))
    while sharpy_output.structure.beam_number[ielem] <= iblade:
        ielem += 1
        if ielem == sharpy_output.structure.num_elem:
            break
    nodes_blade[iblade][first_node:sharpy_output.structure.connectivities[ielem-1,1]+1] = True
    first_node = sharpy_output.structure.connectivities[ielem-1,1]+1

Compute the radial position of the nodes and initialise the rest of the variables

[13]:
r = []
c = []
dr = []
forces = []
CN_drR = []
CTan_drR = []
CP_drR = []
nodes_num = []
for iblade in range(nblades):
    forces.append(tstep.steady_applied_forces[nodes_blade[iblade]].copy())

    nodes_num.append(np.arange(0, sharpy_output.structure.num_node, 1)[nodes_blade[iblade]])

    r.append(np.linalg.norm(tstep.pos[nodes_blade[iblade], :], axis=1))
    dr.append(np.zeros(np.sum(nodes_blade[iblade])))
    dr[iblade][0] = 0.5*(r[iblade][1]-r[iblade][0])
    dr[iblade][-1] = 0.5 * (r[iblade][-1] - r[iblade][-2])
    for inode in range(1,len(r[iblade]) - 1):
        dr[iblade][inode] = 0.5*(r[iblade][inode+1] - r[iblade][inode-1])

    CN_drR.append(np.zeros(len(r[iblade])))
    c.append(np.zeros(len(r[iblade])))
    CTan_drR.append(np.zeros(len(r[iblade])))
    CP_drR.append(np.zeros(len(r[iblade])))

Transform the loads computed by SHARPy into out-of-plane and in-plane components

[14]:
rho = sharpy_output.settings['StaticCoupledRBM']['aero_solver_settings']['rho']
uinf = sharpy_output.settings['StaticCoupledRBM']['aero_solver_settings']['velocity_field_input']['u_inf']
R = np.max(r[0])
Cp = 0
Ct = 0

global_force_factor = 0.5 * rho * uinf** 2 * np.pi * R**2
global_power_factor = global_force_factor*uinf
for iblade in range(nblades):
    for inode in range(len(r[iblade])):
        forces[iblade][inode, 0] *= 0. # Discard the spanwise component

        node_global_index = nodes_num[iblade][inode]
        ielem = sharpy_output.structure.node_master_elem[node_global_index, 0]
        inode_in_elem = sharpy_output.structure.node_master_elem[node_global_index, 1]
        CAB = algebra.crv2rotation(tstep.psi[ielem, inode_in_elem, :])

        c[iblade][inode] = sharpy_output.aero.aero_dict['chord'][ielem,inode_in_elem]

        forces_AFoR = np.dot(CAB, forces[iblade][inode, 0:3])

        CN_drR[iblade][inode] = forces_AFoR[2]/dr[iblade][inode]*R / global_force_factor
        CTan_drR[iblade][inode] = np.linalg.norm(forces_AFoR[0:2])/dr[iblade][inode]*R  / global_force_factor
        CP_drR[iblade][inode] = np.linalg.norm(forces_AFoR[0:2])/dr[iblade][inode]*R  * r[iblade][inode]*rotation_velocity / global_power_factor

    Cp += np.sum(CP_drR[iblade]*dr[iblade]/R)
    Ct += np.sum(CN_drR[iblade]*dr[iblade]/R)
Results

Plot of the loads along the blade

[15]:
fig, list_plots = plt.subplots(1, 2, figsize=(12, 3))

list_plots[0].grid()
list_plots[0].set_xlabel("r/R [-]")
list_plots[0].set_ylabel("CN/d(r/R) [-]")
list_plots[0].plot(r[0]/R, CN_drR[0], '-', label='SHARPy')
list_plots[0].plot(of_rR, of_cNdrR, '-', label='OpenFAST')
list_plots[0].legend()

list_plots[1].grid()
list_plots[1].set_xlabel("r/R [-]")
list_plots[1].set_ylabel("CT/d(r/R) [-]")
list_plots[1].plot(r[0]/R, CTan_drR[0], '-', label='SHARPy')
list_plots[1].plot(of_rR, of_cTdrR, '-', label='OpenFAST')
list_plots[1].legend()

plt.show()
_images/content_example_notebooks_wind_turbine_34_0.svg

Print the rotor thrust and power coefficients

[16]:
print("      OpenFAST SHARPy")
print("Cp[-] %.2f       %.2f" % (of_cp, Cp))
print("Ct[-] %.2f       %.2f" % (of_ct, Ct))
      OpenFAST SHARPy
Cp[-] 0.49       0.52
Ct[-] 0.70       0.70

A prismatic cantilever beam under a tip load

This is an example of the geometrically-exact beam structural solver in SHARPy.

Reference: Simpson R.J.S., Palacios R., “Numerical Aspects of Nonlinear Flexible Aircraft Flight Dynamics Modeling.” 54th AIAA/ASME/ASCE/AHS/ASC Structures, Structural Dynamics and Materials Conference, 8-11 April 2013, Boston, Massachusetts, USA [http://hdl.handle.net/10044/1/11077, http://dx.doi.org/10.2514/6.2013-1634]

Required Packages
[1]:
import numpy as np
import os
import matplotlib.pyplot as plt
import sharpy.sharpy_main                # used to run SHARPy from Jupyter
import model_static_cantilever as model  # model definition
from IPython.display import Image

plt.rcParams.update({'font.size': 20})   # Large fonts in all plots
Problem 1: Tip vertical dead load

Consider first a massless beam with a heavy tip mass, such that the deformations are due to the resulting dead load P. The static equilibrium will be obtained for multiple values of P=0, 100, …, 1000 kN

[2]:
Image('images/cantilever.png', width=500)
[2]:
_images/content_example_notebooks_cantilever_static_cantilever_4_0.png
[3]:
# Define temporary files to generate sharpy models.
case_name= 'temp'
route = './'

Nforces=10         # Number of force steps
DeltaForce=100e3 # Increment of forces
Nelem=20          # Number of beam elements

N=2*Nelem+1
x1=np.zeros((Nforces,N))
z1=np.zeros((Nforces,N))

#Loop through all external forces
for jForce in range(Nforces):
    model.clean_test_files(route, case_name)
    model.generate_fem_file(route, case_name, Nelem, float(jForce+1)*DeltaForce)
    model.generate_solver_file(route,case_name)

    case_data=sharpy.sharpy_main.main(['', route + case_name + '.sharpy'])

    x1[jForce,0:N]=case_data.structure.timestep_info[0].pos[:, 0]
    z1[jForce,0:N]=case_data.structure.timestep_info[0].pos[:, 2]

#Store initial geometry
x0=case_data.structure.ini_info.pos[:, 0]
z0=case_data.structure.ini_info.pos[:, 2]
[4]:
# Plot the deformed beam shapes
fig= plt.subplots(1, 1, figsize=(15, 6))
plt.scatter(x0,z0,c='black')
plt.plot(x0,z0,c='black')

for jForce in range(Nforces):
    plt.scatter(x1[jForce,0:N],z1[jForce,0:N],c='black')
    plt.plot(x1[jForce,0:N],z1[jForce,0:N],c='black')

plt.axis('equal')
plt.grid()
plt.xlabel('x (m)')
plt.ylabel('z (m)')
plt.savefig("images/ncb1-dead-displ.eps",  format='eps', dpi=1000, bbox_inches='tight')
_images/content_example_notebooks_cantilever_static_cantilever_6_0.png
[5]:
print('{:>8s}{:>12s}'.format('Force','Tip z'))
dash=20*'-'; print(dash)
for jForce in range(Nforces):
    print('{:>8.0f}{:>12.4f}'.format((jForce+1)*DeltaForce,z1[jForce,N-1]))
   Force       Tip z
--------------------
  100000     -0.4438
  200000     -0.8672
  300000     -1.2551
  400000     -1.5999
  500000     -1.9005
  600000     -2.1597
  700000     -2.3824
  800000     -2.5737
  900000     -2.7386
 1000000     -2.8813
[6]:
model.clean_test_files(route, case_name)
Problem 2: Comparing follower and dead forces
[7]:
#Loop through all external follower forces, again applied at the tip.
x2=np.zeros((Nforces,N))
z2=np.zeros((Nforces,N))
for jForce in range(Nforces):
    model.clean_test_files(route, case_name)
    model.generate_fem_file(route, case_name, Nelem, 0, -float(jForce+1)*DeltaForce)
    model.generate_solver_file(route,case_name)

    case_foll=sharpy.sharpy_main.main(['', route + case_name + '.sharpy'])

    x2[jForce,0:N]=case_foll.structure.timestep_info[0].pos[:, 0]
    z2[jForce,0:N]=case_foll.structure.timestep_info[0].pos[:, 2]
[8]:
#Plot results.
fig, axs = plt.subplots(nrows=1, ncols=2, figsize=(15, 6))

ax0 = axs[0]
ax0.plot([0,Nforces],[0, 0],linestyle=':', c='black')
ax0.plot(range(Nforces+1), np.concatenate((5, x1[0:Nforces,-1]), axis=None)-5*np.ones(Nforces+1),linestyle='-', c='black')
ax0.plot(range(Nforces+1), np.concatenate((5, x2[0:Nforces,-1]), axis=None)-5*np.ones(Nforces+1),linestyle='--', c='black')
#ax0.axis('equal')
ax0.grid()
ax0.set_xlabel('Force (N) x 10^5')
ax0.set_ylabel('Tip horizontal displacement (m)')
ax0.set(xlim=(0, Nforces), ylim=(-6, 1))

ax1 = axs[1]
ax1.plot([0,Nforces],np.concatenate((0, z1[0,-1]*Nforces), axis=None),linestyle=':', c='black')
ax1.plot(range(Nforces+1), np.concatenate((0, z1[0:Nforces,-1]), axis=None),linestyle='-', c='black')
ax1.plot(range(Nforces+1), np.concatenate((0, z2[0:Nforces,-1]), axis=None),linestyle='--', c='black')


#ax1.axis('equal')
ax1.grid()
ax1.set_xlabel('Force (N) x 10^5')
ax1.set_ylabel('Tip vertical displacement (m)')
ax1.set(xlim=(0, Nforces), ylim=(-5, 1))

ax1.legend(['Linear','Dead','Follower'])

fig.savefig("images/ncb1-foll-displ.eps", format='eps', dpi=1000, bbox_inches="tight")
The PostScript backend does not support transparency; partially transparent artists will be rendered opaque.
The PostScript backend does not support transparency; partially transparent artists will be rendered opaque.
The PostScript backend does not support transparency; partially transparent artists will be rendered opaque.
The PostScript backend does not support transparency; partially transparent artists will be rendered opaque.
_images/content_example_notebooks_cantilever_static_cantilever_11_1.png
[9]:
model.clean_test_files(route, case_name)

A first test case with SHARPy

This notebook explains how to create a prismatic cantilever and flexible wing in SHARPy. It aims to provide a big picture about the simulations available in SHARPy describing the very fundamental concepts.

This notebook requires around two hours to be completed.

Generation of the aeroelastic model

This section explains how to generate the input files for SHARPy including the structure, the aerodynamics and the simulation details.

[3]:
# Loading of the used packages
import numpy as np              # basic mathematical and array functions
import os                       # Functions related to the operating system
import matplotlib.pyplot as plt # Plotting library

import sharpy.sharpy_main                  # Run SHARPy inside jupyter notebooks
import sharpy.utils.plotutils as pu        # Plotting utilities
from sharpy.utils.constants import deg2rad # Constant to conver degrees to radians

import sharpy.utils.generate_cases as gc

The generate cases module of SHARPy includes a number of templates for the creation of simple cases using common parameters as inputs. It also removes clutter from this notebook.

The following cell configures the plotting library to show the next graphics, it is not part of SHARPy.

[4]:
%%capture
! pip install plotly
Define the problem parameters

In this section, we define the basic parameters to generate a model for the wing shown in the image below. We use SI units for all variables.

[5]:
%config InlineBackend.figure_format = 'svg'
from IPython.display import Image
url = ('https://raw.githubusercontent.com/ImperialCollegeLondon/sharpy/dev_example/docs/' +
       'source/content/example_notebooks/images/simple_wing_scheme.png')
Image(url=url, width=800)
[5]:
[6]:
# Geometry
chord = 1.         # Chord of the wing
aspect_ratio = 16. # Ratio between lenght and chord: aspect_ratio = length/chord
wake_length = 50   # Length of the wake in chord lengths

# Discretization
num_node = 21           # Number of nodes in the structural discretisation
                        # The number of nodes will also define the aerodynamic panels in the
                        # spanwise direction
num_chord_panels = 4    # Number of aerodynamic panels in the chordwise direction
num_points_camber = 200 # The camber line of the wing will be defined by a series of (x,y)
                        # coordintes. Here, we define the size of the (x,y) vectors

# Structural properties of the beam cross section
mass_per_unit_length = 0.75 # Mass per unit length
mass_iner_x = 0.1           # Mass inertia around the local x axis
mass_iner_y = 0.05          # Mass inertia around the local y axis
mass_iner_z = 0.05          # Mass inertia around the local z axis
pos_cg_B = np.zeros((3))    # position of the centre of mass with respect to the elastic axis
EA = 1e7                    # Axial stiffness
GAy = 1e6                   # Shear stiffness in the local y axis
GAz = 1e6                   # Shear stiffness in the local z axis
GJ = 1e4                    # Torsional stiffness
EIy = 2e4                   # Bending stiffness around the flapwise direction
EIz = 5e6                   # Bending stiffness around the edgewise direction

# Operation
WSP = 2.                # Wind speed
air_density = 0.1       # Air density

# Time discretization
end_time = 5.0                  # End time of the simulation
dt = chord/num_chord_panels/WSP # Always keep one timestep per panel

First, we are going to compute the static equilibrium of the wing at an angle of attack (aoa_ini_deg). Next, we will change the angle of attack to aoa_end_deg and we will compute the dynamic response of the wing.

[7]:
aoa_ini_deg = 2.        # Angle of attack at the beginning of the simulation
aoa_end_deg = 1.        # Angle of attack at the end of the simulation

For now, we keep the size of the wake panels equal to the distance covered by the flow in one time step.

Structural model

This section creates a class called AeroelasticInformation. This class is not directly used by SHARPy, it has been thought as an intermediate step between common engineering inputs and the input information that SHARPy needs.

It has many functionalities (rotate objects, assembly simple strucures together …) which can be looked up in the documentation.

Let’s initialise an Aeroelastic system that will include a StructuralInformation class and an AerodynamicInformation class:

[8]:
wing = gc.AeroelasticInformation()

The attibutes that have to be defined (not all of them are compulsory) can be displayed with the code below. They constitute the input parameters to SHARPy and their names are intuitive, however, a complete description of the input variables to SHARPy can be found in the documentation: structural inputs and aerodynamic inputs

For example, the structural properties are:

[9]:
wing.StructuralInformation.__dict__.keys()
[9]:
dict_keys(['num_node_elem', 'num_node', 'num_elem', 'coordinates', 'connectivities', 'elem_stiffness', 'stiffness_db', 'elem_mass', 'mass_db', 'frame_of_reference_delta', 'structural_twist', 'boundary_conditions', 'beam_number', 'body_number', 'app_forces', 'lumped_mass_nodes', 'lumped_mass', 'lumped_mass_inertia', 'lumped_mass_position', 'lumped_mass_mat', 'lumped_mass_mat_nodes'])

For example, the connectivities between the nodes required by the finite element solver are empty so far:

[10]:
print(wing.StructuralInformation.connectivities)
None

For a list of methods that allow us to modify the structure, Check the documentation.

First, we need to define the basic characteristics of the equations as the number of nodes, the number of nodes per element, the number of elements and the location of the nodes in the space:

[11]:
# Define the number of nodes and the number of nodes per element
wing.StructuralInformation.num_node = num_node
wing.StructuralInformation.num_node_elem = 3
# Compute the number of elements assuming basic connections
wing.StructuralInformation.compute_basic_num_elem()
[12]:
# Generate an array with the location of the nodes
node_r = np.zeros((num_node, 3))
node_r[:,1] = np.linspace(0, chord*aspect_ratio, num_node)
print(node_r)
[[ 0.   0.   0. ]
 [ 0.   0.8  0. ]
 [ 0.   1.6  0. ]
 [ 0.   2.4  0. ]
 [ 0.   3.2  0. ]
 [ 0.   4.   0. ]
 [ 0.   4.8  0. ]
 [ 0.   5.6  0. ]
 [ 0.   6.4  0. ]
 [ 0.   7.2  0. ]
 [ 0.   8.   0. ]
 [ 0.   8.8  0. ]
 [ 0.   9.6  0. ]
 [ 0.  10.4  0. ]
 [ 0.  11.2  0. ]
 [ 0.  12.   0. ]
 [ 0.  12.8  0. ]
 [ 0.  13.6  0. ]
 [ 0.  14.4  0. ]
 [ 0.  15.2  0. ]
 [ 0.  16.   0. ]]

The following function creates a uniform beam from the previous parameters. On top of assigning the previous parameters, it defines other variables such as the connectivities between nodes

[13]:
wing.StructuralInformation.generate_uniform_beam(node_r,
                    mass_per_unit_length,
                    mass_iner_x,
                    mass_iner_y,
                    mass_iner_z,
                    pos_cg_B,
                    EA,
                    GAy,
                    GAz,
                    GJ,
                    EIy,
                    EIz,
                    num_node_elem = wing.StructuralInformation.num_node_elem,
                    y_BFoR = 'x_AFoR',
                    num_lumped_mass=0)

If we now show the connectivities between nodes, the function has created them for us. Further information

[14]:
print(wing.StructuralInformation.connectivities)
[[ 0  2  1]
 [ 2  4  3]
 [ 4  6  5]
 [ 6  8  7]
 [ 8 10  9]
 [10 12 11]
 [12 14 13]
 [14 16 15]
 [16 18 17]
 [18 20 19]]

Let’s define the boundary conditions as clamped for node 0 and free for the last node (-1) Further information

[15]:
wing.StructuralInformation.boundary_conditions[0] = 1
wing.StructuralInformation.boundary_conditions[-1] = -1
Aerodynamics

We need to define the number of panels in the wake (wake_panels) and the camber line of the wing which, in this case, is flat. Further information

[16]:
# Compute the number of panels in the wake (streamwise direction) based on the previous paramete
wake_panels = int(wake_length*chord/dt)

# Define the coordinates of the camber line of the wing
wing_camber = np.zeros((1, num_points_camber, 2))
wing_camber[0, :, 0] = np.linspace(0, 1, num_points_camber)

The following function creates an aerodynamic surface uniform on top of the beam that we have already created

[17]:
# Generate blade aerodynamics
wing.AerodynamicInformation.create_one_uniform_aerodynamics(wing.StructuralInformation,
                                 chord = chord,
                                 twist = 0.,
                                 sweep = 0.,
                                 num_chord_panels = num_chord_panels,
                                 m_distribution = 'uniform',
                                 elastic_axis = 0.5,
                                 num_points_camber = num_points_camber,
                                 airfoil = wing_camber)
Summary

Now, we have all the inputs that we need for SHARPy. In this section, a first simulation with SHARPy is run. However, it will perform no computation, it will just load the data so we can plot the system we have just created.

SHARPy runs a series of solvers and postprocessors in the order indicated by the flow variable in the SHARPy dictionary.

The generate cases module also allows us to show all the avaiable solvers and all the parameters they accept as inputs. To do so, we need to run the following commands:

[18]:
# Gather data about available solvers
SimInfo = gc.SimulationInformation() # Initialises the SimulationInformation class
SimInfo.set_default_values()         # Assigns the default values to all the solvers

# Print the available solvers and postprocessors
for key in SimInfo.solvers.keys():
    print(key)
_BaseStructural
AerogridLoader
BeamLoader
DynamicCoupled
DynamicUVLM
LinDynamicSim
LinearAssembler
Modal
NoAero
NonLinearDynamic
NonLinearDynamicCoupledStep
NonLinearDynamicMultibody
NonLinearDynamicPrescribedStep
NonLinearStatic
PrescribedUvlm
RigidDynamicCoupledStep
RigidDynamicPrescribedStep
StaticCoupled
StaticCoupledRBM
StaticTrim
StaticUvlm
StepLinearUVLM
StepUvlm
_BaseTimeIntegrator
NewmarkBeta
GeneralisedAlpha
Trim
LiftDistribution
Cleanup
AerogridPlot
BeamPlot
UDPout
PlotFlowField
PickleData
SaveParametricCase
FrequencyResponse
StallCheck
WriteVariablesTime
CreateSnapshot
SHARPy
SaveData
AeroForcesCalculator
AsymptoticStability
BeamLoads
FloatingForces
ShearVelocityField
DynamicControlSurface
GustVelocityField
TrajectoryGenerator
TurbVelocityField
SteadyVelocityField
ModifyStructure
StraightWake
HelicoidalWake
GridBox
BumpVelocityField
TurbVelocityFieldBts

Let’s output as an example, the input parameters of the BeamLoader solver. This solver is in charge of loading the structural infromation

[19]:
SimInfo.solvers['BeamLoader']
[19]:
{'unsteady': True, 'orientation': [1.0, 0, 0, 0], 'for_pos': [0.0, 0, 0]}

The following dictionary defines the basic inputs of SHARPy including the solvers to be run (flow variable), the case name and the route in the file system. In this case we are turning off the screen output because it is useless because we are not running any computation.

[20]:
SimInfo.solvers['SHARPy']['flow'] = ['BeamLoader',
                        'AerogridLoader']

SimInfo.solvers['SHARPy']['case'] = 'plot'
SimInfo.solvers['SHARPy']['route'] = './'
SimInfo.solvers['SHARPy']['write_screen'] = 'off'

We do not modify any of the default input paramteters in BeamLoader but we need to define the initial wake shape that we want and its size (wake_panels)

[21]:
SimInfo.solvers['AerogridLoader']['unsteady'] = 'on'
SimInfo.solvers['AerogridLoader']['mstar'] = wake_panels
SimInfo.solvers['AerogridLoader']['freestream_dir'] = np.array([1.,0.,0.])
SimInfo.solvers['AerogridLoader']['wake_shape_generator'] = 'StraightWake'
SimInfo.solvers['AerogridLoader']['wake_shape_generator_input'] = {'u_inf': WSP,
                                                                   'u_inf_direction' : np.array(
                                                                                         [np.cos(aoa_ini_deg*deg2rad),
                                                                                         0.,
                                                                                         np.sin(aoa_ini_deg*deg2rad)]),
                                                                   'dt': dt}

The following functions write the input files needed by SHARPy

[22]:
gc.clean_test_files(SimInfo.solvers['SHARPy']['route'], SimInfo.solvers['SHARPy']['case'])
wing.generate_h5_files(SimInfo.solvers['SHARPy']['route'], SimInfo.solvers['SHARPy']['case'])
SimInfo.generate_solver_file()

The following line of code runs SHARPy inside the jupyter notebook. It is equivalent to run in a terminal: sharpy plot.sharpy being “plot” the case name defined above

[23]:
sharpy_output = sharpy.sharpy_main.main(['',
                                         SimInfo.solvers['SHARPy']['route'] +
                                         SimInfo.solvers['SHARPy']['case'] +
                                         '.sharpy'])

Let’s plot the case we have created. The function below provides a quick way of generating an interactive plot but it is not suitable for large cases. Luckily SHARPy has other more complex plotting capabilities.

If you download the original jupyter notebook, change thee geometric parameters above and rerun the jupyter notebook you will see its impact on the geometry.

Only the first 6 wake panels are plotted for efficiency.

[24]:
pu.plot_timestep(sharpy_output, tstep=-1, minus_mstar=(wake_panels - 6), plotly=True)
Static simulation

Next, we run a static simulation of the previous system. We have already defined the required inputs for BeamLoader and AerogridLoader but we need to define the static solvers. We are going to use a FSI solver (StaticCoupled) that will include a structural solver (NonLinearStatic) and an aerodynamic solver (StaticUvlm).

We use most of the default values but we redefine some of them: - We assign the air density to all the solvers that need it - We turn off the gravity on the structural solver - We use a horseshoe solution without roll up for the aerodynamics - We define the velocity field against the wing - We do not use load steps in the FSI solver

In the documentation you can fine further information about the modular framework and about the solvers and their inputs.

[25]:
# Define the simulation
SimInfo.solvers['SHARPy']['flow'] = ['BeamLoader',
                        'AerogridLoader',
                        'StaticCoupled']

SimInfo.set_variable_all_dicts('rho', air_density)

SimInfo.solvers['SHARPy']['case'] = 'static'
SimInfo.solvers['SHARPy']['write_screen'] = 'on'

SimInfo.solvers['NonLinearStatic']['gravity_on'] = False

SimInfo.solvers['StaticUvlm']['horseshoe'] = True
SimInfo.solvers['StaticUvlm']['n_rollup'] = 0
SimInfo.solvers['StaticUvlm']['velocity_field_generator'] = 'SteadyVelocityField'
SimInfo.solvers['StaticUvlm']['velocity_field_input'] = {'u_inf' : WSP,
                                                         'u_inf_direction' : np.array(
                                                                                [np.cos(aoa_ini_deg*deg2rad),
                                                                                 0.,
                                                                                 np.sin(aoa_ini_deg*deg2rad)])}

SimInfo.solvers['StaticCoupled']['structural_solver'] = 'NonLinearStatic'
SimInfo.solvers['StaticCoupled']['structural_solver_settings'] = SimInfo.solvers['NonLinearStatic']
SimInfo.solvers['StaticCoupled']['aero_solver'] = 'StaticUvlm'
SimInfo.solvers['StaticCoupled']['aero_solver_settings'] = SimInfo.solvers['StaticUvlm']
SimInfo.solvers['StaticCoupled']['n_load_steps'] = 0

The following functions create the input files required by SHARPy. For further information check: - Configuration file - FEM input file - Aerodynamic input file

[26]:
gc.clean_test_files(SimInfo.solvers['SHARPy']['route'], SimInfo.solvers['SHARPy']['case'])
SimInfo.generate_solver_file()
wing.generate_h5_files(SimInfo.solvers['SHARPy']['route'], SimInfo.solvers['SHARPy']['case'])
[27]:
# Running SHARPy again inside jupyter
sharpy_output = sharpy.sharpy_main.main(['',
                                         SimInfo.solvers['SHARPy']['route'] +
                                         SimInfo.solvers['SHARPy']['case'] +
                                         '.sharpy'])
--------------------------------------------------------------------------------
            ######  ##     ##    ###    ########  ########  ##    ##
           ##    ## ##     ##   ## ##   ##     ## ##     ##  ##  ##
           ##       ##     ##  ##   ##  ##     ## ##     ##   ####
            ######  ######### ##     ## ########  ########     ##
                 ## ##     ## ######### ##   ##   ##           ##
           ##    ## ##     ## ##     ## ##    ##  ##           ##
            ######  ##     ## ##     ## ##     ## ##           ##
--------------------------------------------------------------------------------
Aeroelastics Lab, Aeronautics Department.
    Copyright (c), Imperial College London.
    All rights reserved.
    License available at https://github.com/imperialcollegelondon/sharpy
Running SHARPy from /home/arturo/code/sharpy/docs/source/content/example_notebooks
SHARPy being run is in /home/arturo/code/sharpy
The branch being run is dev_setting_error
The version and commit hash are: v1.2.1-360-gc3031060-c3031060
SHARPy output folder set
     ./output//static/
Generating an instance of BeamLoader
Generating an instance of AerogridLoader
Variable dx1 has no assigned value in the settings file.
    will default to the value: -1.0
Variable ndx1 has no assigned value in the settings file.
    will default to the value: 1
Variable r has no assigned value in the settings file.
    will default to the value: 1.0
Variable dxmax has no assigned value in the settings file.
    will default to the value: -1.0
The aerodynamic grid contains 1 surfaces
  Surface 0, M=4, N=20
     Wake 0, M=400, N=20
  In total: 80 bound panels
  In total: 8000 wake panels
  Total number of panels = 8080
Generating an instance of StaticCoupled
Generating an instance of NonLinearStatic
Generating an instance of StaticUvlm



|=====|=====|============|==========|==========|==========|==========|==========|==========|
|iter |step | log10(res) |    Fx    |    Fy    |    Fz    |    Mx    |    My    |    Mz    |
|=====|=====|============|==========|==========|==========|==========|==========|==========|
|  0  |  0  |  0.00000   | -0.0187  | -0.0006  |  0.6029  |  4.8229  |  0.1523  |  0.1495  |
|  1  |  0  |  -9.22874  | -0.0188  | -0.0006  |  0.6043  |  4.8366  |  0.1526  |  0.1504  |
FINISHED - Elapsed time = 1.1078096 seconds
FINISHED - CPU process time = 4.8641626 seconds

The next function will plot the static equilibirium solution for the wing

[28]:
pu.plot_timestep(sharpy_output, tstep=-1, minus_mstar=(wake_panels-6), plotly=True)
Dynamic simulation

Finally, we run a dynamic simulation after the previous static one. With that objective, we include a dynamic FSI solver (DynamicCoupled) in the simulation

[29]:
SimInfo.solvers['SHARPy']['flow'] = ['BeamLoader',
                        'AerogridLoader',
                        'StaticCoupled',
                        'DynamicCoupled']

SimInfo.solvers['SHARPy']['route'] = './'
SimInfo.solvers['SHARPy']['case'] = 'dynamic'

We need information about the time step and the number of iterations

[30]:
# Compute the number of time steps needed based on the previous parameters
time_steps = int(end_time/dt)

# Define the time step and the number of time steps in every solver that requires them as input
SimInfo.set_variable_all_dicts('dt', dt)
SimInfo.define_num_steps(time_steps)

We define the approximation we are going to use for the wake convection (convection_scheme), the velocity field and deactivate the gravity.

We are going to use a FSI solver (DynamicCoupled) that couples a structual solver (NonLinearDynamicPrescribedStep) and an aerodynamic solver (StepUvlm).

Moreover, the FSI solver runs a series of postprocessors after each time step. Specifically it will save a plot of the structure (BeamPlot) and of the aerodynamic surfaces (AerogridPlot).

[31]:
SimInfo.solvers['StepUvlm']['convection_scheme'] = 2
SimInfo.solvers['StaticUvlm']['velocity_field_generator'] = 'SteadyVelocityField'
SimInfo.solvers['StepUvlm']['velocity_field_input'] = {'u_inf' : WSP,
                                                       'u_inf_direction' : np.array(
                                                                              [np.cos(aoa_end_deg*deg2rad),
                                                                               0.,
                                                                               np.sin(aoa_end_deg*deg2rad)])}

SimInfo.solvers['NonLinearDynamicPrescribedStep']['gravity_on'] = False

SimInfo.solvers['DynamicCoupled']['structural_solver'] = 'NonLinearDynamicPrescribedStep'
SimInfo.solvers['DynamicCoupled']['structural_solver_settings'] = SimInfo.solvers['NonLinearDynamicPrescribedStep']
SimInfo.solvers['DynamicCoupled']['aero_solver'] = 'StepUvlm'
SimInfo.solvers['DynamicCoupled']['aero_solver_settings'] = SimInfo.solvers['StepUvlm']
SimInfo.solvers['DynamicCoupled']['postprocessors'] = ['BeamPlot', 'AerogridPlot']
SimInfo.solvers['DynamicCoupled']['postprocessors_settings'] = {'BeamPlot': SimInfo.solvers['BeamPlot'],
                                                             'AerogridPlot': SimInfo.solvers['AerogridPlot']}

Finally we need to define the movement of the whole wing through its velocity and acceleration. In this case we want a clamped structure so we will set every thing to zero.

Moreover, se can define forces applied togheter with the aerodynamic ones. In this case they will be set to zero.

[32]:
SimInfo.with_forced_vel = True
SimInfo.for_vel = np.zeros((time_steps,6), dtype=float)
SimInfo.for_acc = np.zeros((time_steps,6), dtype=float)
SimInfo.with_dynamic_forces = True
SimInfo.dynamic_forces = np.zeros((time_steps,wing.StructuralInformation.num_node,6),
                                  dtype=float)

We write the input files required by SHARPy again:

[33]:
gc.clean_test_files(SimInfo.solvers['SHARPy']['route'], SimInfo.solvers['SHARPy']['case'])
wing.generate_h5_files(SimInfo.solvers['SHARPy']['route'], SimInfo.solvers['SHARPy']['case'])
SimInfo.generate_solver_file()
SimInfo.generate_dyn_file(time_steps)

And we run the simulation

[34]:
sharpy_output = sharpy.sharpy_main.main(['',
                                         SimInfo.solvers['SHARPy']['route'] +
                                         SimInfo.solvers['SHARPy']['case'] +
                                         '.sharpy'])
--------------------------------------------------------------------------------
            ######  ##     ##    ###    ########  ########  ##    ##
           ##    ## ##     ##   ## ##   ##     ## ##     ##  ##  ##
           ##       ##     ##  ##   ##  ##     ## ##     ##   ####
            ######  ######### ##     ## ########  ########     ##
                 ## ##     ## ######### ##   ##   ##           ##
           ##    ## ##     ## ##     ## ##    ##  ##           ##
            ######  ##     ## ##     ## ##     ## ##           ##
--------------------------------------------------------------------------------
Aeroelastics Lab, Aeronautics Department.
    Copyright (c), Imperial College London.
    All rights reserved.
    License available at https://github.com/imperialcollegelondon/sharpy
Running SHARPy from /home/arturo/code/sharpy/docs/source/content/example_notebooks
SHARPy being run is in /home/arturo/code/sharpy
The branch being run is dev_setting_error
The version and commit hash are: v1.2.1-360-gc3031060-c3031060
SHARPy output folder set
     ./output//dynamic/
Generating an instance of BeamLoader
Generating an instance of AerogridLoader
Variable dx1 has no assigned value in the settings file.
    will default to the value: -1.0
Variable ndx1 has no assigned value in the settings file.
    will default to the value: 1
Variable r has no assigned value in the settings file.
    will default to the value: 1.0
Variable dxmax has no assigned value in the settings file.
    will default to the value: -1.0
The aerodynamic grid contains 1 surfaces
  Surface 0, M=4, N=20
     Wake 0, M=400, N=20
  In total: 80 bound panels
  In total: 8000 wake panels
  Total number of panels = 8080
Generating an instance of StaticCoupled
Generating an instance of NonLinearStatic
Generating an instance of StaticUvlm



|=====|=====|============|==========|==========|==========|==========|==========|==========|
|iter |step | log10(res) |    Fx    |    Fy    |    Fz    |    Mx    |    My    |    Mz    |
|=====|=====|============|==========|==========|==========|==========|==========|==========|
|  0  |  0  |  0.00000   | -0.0187  | -0.0006  |  0.6029  |  4.8229  |  0.1523  |  0.1495  |
|  1  |  0  |  -9.22874  | -0.0188  | -0.0006  |  0.6043  |  4.8366  |  0.1526  |  0.1504  |
Generating an instance of DynamicCoupled
Generating an instance of NonLinearDynamicPrescribedStep
Generating an instance of StepUvlm
Generating an instance of BeamPlot
Generating an instance of AerogridPlot



|=======|========|======|==============|==============|==============|==============|==============|
|  ts   |   t    | iter | struc ratio  |  iter time   | residual vel |  FoR_vel(x)  |  FoR_vel(z)  |
|=======|========|======|==============|==============|==============|==============|==============|
|   1   | 0.1250 |  4   |   0.422637   |   2.156250   |  -5.501499   | 0.000000e+00 | 0.000000e+00 |
|   2   | 0.2500 |  3   |   0.536941   |   1.912537   |  -5.442787   | 0.000000e+00 | 0.000000e+00 |
|   3   | 0.3750 |  3   |   0.524459   |   2.198519   |  -5.640521   | 0.000000e+00 | 0.000000e+00 |
|   4   | 0.5000 |  3   |   0.312450   |   1.014755   |  -5.645651   | 0.000000e+00 | 0.000000e+00 |
|   5   | 0.6250 |  3   |   0.516388   |   1.390178   |  -5.889684   | 0.000000e+00 | 0.000000e+00 |
|   6   | 0.7500 |  3   |   0.493723   |   1.473236   |  -5.914635   | 0.000000e+00 | 0.000000e+00 |
|   7   | 0.8750 |  3   |   0.364603   |   1.169983   |  -6.040009   | 0.000000e+00 | 0.000000e+00 |
|   8   | 1.0000 |  3   |   0.375979   |   1.130078   |  -5.925998   | 0.000000e+00 | 0.000000e+00 |
|   9   | 1.1250 |  3   |   0.422528   |   1.220274   |  -5.836958   | 0.000000e+00 | 0.000000e+00 |
|  10   | 1.2500 |  3   |   0.470494   |   1.508245   |  -5.632144   | 0.000000e+00 | 0.000000e+00 |
|  11   | 1.3750 |  3   |   0.518558   |   1.643736   |  -5.513670   | 0.000000e+00 | 0.000000e+00 |
|  12   | 1.5000 |  3   |   0.461596   |   1.443260   |  -5.471589   | 0.000000e+00 | 0.000000e+00 |
|  13   | 1.6250 |  3   |   0.382144   |   1.202683   |  -5.423647   | 0.000000e+00 | 0.000000e+00 |
|  14   | 1.7500 |  3   |   0.381228   |   1.303255   |  -5.451292   | 0.000000e+00 | 0.000000e+00 |
|  15   | 1.8750 |  3   |   0.488247   |   1.640878   |  -5.503924   | 0.000000e+00 | 0.000000e+00 |
|  16   | 2.0000 |  3   |   0.533105   |   2.012032   |  -5.521127   | 0.000000e+00 | 0.000000e+00 |
|  17   | 2.1250 |  3   |   0.488828   |   1.673044   |  -5.649248   | 0.000000e+00 | 0.000000e+00 |
|  18   | 2.2500 |  3   |   0.408699   |   1.435696   |  -5.852560   | 0.000000e+00 | 0.000000e+00 |
|  19   | 2.3750 |  3   |   0.549950   |   1.755136   |  -6.169248   | 0.000000e+00 | 0.000000e+00 |
|  20   | 2.5000 |  3   |   0.496495   |   1.671328   |  -6.501434   | 0.000000e+00 | 0.000000e+00 |
|  21   | 2.6250 |  3   |   0.388377   |   1.389508   |  -5.911316   | 0.000000e+00 | 0.000000e+00 |
|  22   | 2.7500 |  3   |   0.579859   |   2.018747   |  -5.844249   | 0.000000e+00 | 0.000000e+00 |
|  23   | 2.8750 |  3   |   0.418595   |   1.542469   |  -5.662014   | 0.000000e+00 | 0.000000e+00 |
|  24   | 3.0000 |  3   |   0.478950   |   1.563416   |  -5.623002   | 0.000000e+00 | 0.000000e+00 |
|  25   | 3.1250 |  3   |   0.414521   |   1.306833   |  -5.695734   | 0.000000e+00 | 0.000000e+00 |
|  26   | 3.2500 |  3   |   0.444346   |   1.431409   |  -5.679340   | 0.000000e+00 | 0.000000e+00 |
|  27   | 3.3750 |  3   |   0.468878   |   1.387275   |  -5.742054   | 0.000000e+00 | 0.000000e+00 |
|  28   | 3.5000 |  3   |   0.349114   |   1.171457   |  -5.934912   | 0.000000e+00 | 0.000000e+00 |
|  29   | 3.6250 |  3   |   0.347932   |   1.166252   |  -6.170404   | 0.000000e+00 | 0.000000e+00 |
|  30   | 3.7500 |  3   |   0.413979   |   1.302708   |  -6.498959   | 0.000000e+00 | 0.000000e+00 |
|  31   | 3.8750 |  3   |   0.365911   |   1.211784   |  -6.054012   | 0.000000e+00 | 0.000000e+00 |
|  32   | 4.0000 |  3   |   0.445476   |   1.360627   |  -6.023555   | 0.000000e+00 | 0.000000e+00 |
|  33   | 4.1250 |  3   |   0.413054   |   1.284355   |  -5.782342   | 0.000000e+00 | 0.000000e+00 |
|  34   | 4.2500 |  3   |   0.467896   |   1.423890   |  -5.673256   | 0.000000e+00 | 0.000000e+00 |
|  35   | 4.3750 |  3   |   0.380931   |   1.219211   |  -5.733463   | 0.000000e+00 | 0.000000e+00 |
|  36   | 4.5000 |  3   |   0.512592   |   1.547063   |  -5.705716   | 0.000000e+00 | 0.000000e+00 |
|  37   | 4.6250 |  3   |   0.444554   |   1.350007   |  -5.751720   | 0.000000e+00 | 0.000000e+00 |
|  38   | 4.7500 |  3   |   0.449910   |   1.374741   |  -5.851236   | 0.000000e+00 | 0.000000e+00 |
|  39   | 4.8750 |  3   |   0.444920   |   1.371475   |  -5.920499   | 0.000000e+00 | 0.000000e+00 |
|  40   | 5.0000 |  3   |   0.418596   |   1.348310   |  -6.297188   | 0.000000e+00 | 0.000000e+00 |
...Finished
FINISHED - Elapsed time = 69.6649866 seconds
FINISHED - CPU process time = 323.5800926 seconds

This is the plot of the wing at the end of the simulation

[35]:
pu.plot_timestep(sharpy_output, tstep=-1, minus_mstar=(wake_panels-6), plotly=True)
Postprocessing

As an example, we are going to plot the evolution of the tip position along time

[36]:
time = np.linspace(0, dt*time_steps, time_steps)
tip_pos = np.zeros((time_steps))
for it in range(time_steps):
    tip_pos[it] = sharpy_output.structure.timestep_info[it].pos[-1, 2]

fig, plots = plt.subplots(1, 1, figsize=(6, 3))

plots.grid()
plots.set_xlabel("time [s]")
plots.set_ylabel("tip position [m]")
plots.plot(time, tip_pos, '-')

plt.show()
_images/content_example_notebooks_cantilever_wing_66_0.svg
Conclusions

This notebook provides the big picture of the simulations with SHARPy. We recommend to go through the documentation with special attention to the SHARPy file description and the examples.

Downloadable files

Input data for wind turbine:

Input data for static cantilever:

Note: some of these examples may need additional files which would be located in the ./example_notebooks/ directory. It is recommended that you run these cases directly from there rather than downloading. If you download, make sure you replicate the folder structure such that the examples are capable of finding the required files.

Contributing to SHARPy

Bug fixes and features

SHARPy is a collaborative effort, and this means that some coding practices need to be encouraged so that the code is kept tidy and consistent. Any user is welcome to raise issues for bug fixes and feature proposals through Github.

If you are submitting a bug report:

  1. Make sure your SHARPy, xbeam and uvlm local copies are up to date and in the same branch.

  2. Double check that your python distribution is updated by comparing with the utils/environment_*.yml file.

  3. Try to assemble a minimal working example that can be run quickly and easily.

  4. Describe as accurately as possible your setup (OS, path, compilers…) and the problem.

  5. Raise an issue with all this information in the Github repo and label it potential bug.

Please bear in mind that we do not have the resources to provide support for user modifications of the code through Github. If you have doubts about how to modify certain parts of the code, contact us through email and we will help you as much as we can.

If you are fixing a bug:

  1. THANKS!

  2. Please create a pull request from your modified fork, and describe in a few lines which bug you are fixing, a minimal example that triggers the bug and how you are fixing it. We will review it ASAP and hopefully it will be incorporated in the code!

If you have an idea for new functionality but do not know how to implement it:

  1. We welcome tips and suggestions from users, as it allow us to broaden the scope of the code. The more people using it, the better!

  2. Feel free to fill an issue in Github, and tag it as feature proposal. Please understand that the more complete the description of the potential feature, the more likely it is that some of the developers will give it a go.

If you have developed new functionality and you want to share it with the world:

  1. AWESOME! Please follow the same instructions than for the bug fix submission. If you have some peer-reviewed references related to the new code, even better, as it will save us some precious time.

Code formatting

We try to follow the PEP8 standards (with spaces, no tabs please!) and Google Python Style Guide. We do not ask you to freak out over formatting, but please, try to keep it tidy and descriptive. A good tip is to run pylint https://www.pylint.org/ to make sure there are no obvious formatting problems.

Documentation

Contributing to SHARPy’s documentation benefits everyone. As a developer, writing documentation helps you better understand what you have done and whether your functions etc make logical sense. As a user, any documentation is better than digging through the code. The more we have documented, the easier the code is to use and the more users we can have.

If you want to contribute by documenting code, you have come to the right place.

SHARPy is documented using Sphinx and it extracts the documentation directly from the source code. It is then sorted into directories automatically and a human readable website generated. The amount of work you need to do is minimal. That said, the recipe for a successfully documented class, function, module is the following:

  1. Your documentation has to be written in ReStructuredText (rst). I know, another language… hence I will leave a few tips:

    • Inline code is written using two backticks ``

    • Inline math is written as :math:`1+\exp^{i\pi} = 0`. Don’t forget the backticks!

    • Math in a single or multiple lines is simple:

          .. math:: 1 + \exp{i\pi} = 0
      
    • Lists in ReStructuredText are tricky, I must admit. Therefore, I will link to some examples. The key resides in not forgetting the spaces, in particular when you go onto a second line!

    • The definite example list can be found here.

  2. Titles and docstrings, the bare minimum:

    • Start docstrings with r such that they are interpreted raw:

      r"""
      My docstring
      """
      
    • All functions, modules and classes should be given a title that goes in the first line of the docstring

    • If you are writing a whole package with an __init__.py file, even if it’s empty, give it a human readable docstring. This will then be imported into the documentation

    • For modules with several functions, the module docstring has to be at the very top of the file, prior to the import statements.

  3. We use the Google documentation style. A very good set of examples of Google style documentation for functions, modules, classes etc. can be found here.

  4. Function arguments and returns:

    • Function arguments are simple to describe:

      def func(arg1, arg2):
      """Summary line.
      
      Extended description of function.
      
      Args:
        arg1 (int): Description of arg1
        arg2 (str): Description of arg2
      
      Returns:
        bool: Description of return value
      
      """
          return True
      
  5. Solver settings:

    • If your code has a settings dictionary, with defaults and types then make sure that:

      • They are defined as class variables and not instance attributes.

      • Define a settings_types, settings_default and settings_description dictionaries.

      • After all your settings, update the docstring with the automatically generated settings table. You will need to import the sharpy.utils.settings module

        settings_types = dict()
        settings_default = dict()
        settings_description = dict()
        
        # keep adding settings
        
        settings_table = sharpy.utils.settings.SettingsTable()
        __doc__ += settings_table.generate(settings_types, settings_default ,settings_description)
        
  6. See how your docs looks like!

    • Once you are done, run the following SHARPy command:

    sharpy any_string -d
    
    • If you are making minor updates to docstrings (i.e. you are not documenting a previously undocumented function/class/module) you can simply change directory to sharpy/docs and run

    make html
    
    • Your documentation will compile and warnings will appear etc. You can check the result by opening

    docs/build/index.html
    

    and navigating to your recently created page.

    • Make sure that before committing any changes in the documentation you update the entire docs directory by running

    sharpy any_string -d
    

Thank you for reading through this and contributing to make SHARPy a better documented, more user friendly code!

Git branching model

For the development of SHARPy, we try to follow this branching model summarised by the schematic

https://nvie.com/img/git-model@2x.pngBranchingModel Credit: Vincent Driessen https://nvie.com/posts/a-successful-git-branching-model/

Therefore, attending to this model our branches have the following versions of the code:

  • master: latest stable release - paired with the appropriate tag.

  • develop: latest stable development build. Features get merged to develop.

  • rc-**: release candidate branch. Prior to releasing tests are performed on this branch.

  • dev_doc: documentation development branch. All work relating to documentation gets done here.

  • fix_**: hotfix branch.

  • dev_**: feature development branch.

If you contribute, please make sure you know what branch to work from. If in doubt please ask!

Commit names are also important since they are the backbone of the code’s change log. Please write concise commit titles and explain the main changes in the body of the commit message. An excellent guide on writing good commit messages can be found here.

For developers:

Releasing a new version

In the release candidate branch:

  • Update the version number in the docs configuration file docs/conf.py

  • Update version.json file

  • Update version in sharpy/__init__.py file

  • Commit, push and wait for tests to pass

  • Merge release candidate branch into master branch

In the master branch:

  • Run the github_changelog_generator tool locally with the following parameters:

    github_changelog_generator -u imperialcollegelondon -p sharpy -t <your_github_token> --future-release <new_release_version>
    
  • Create a release tag. IMPORTANT: ensure it is an annotated tag, otherwise the version and commit number in SHARPy will not display properly

    git tag -a <tagname>
    git push origin --tags -f
    

    where <tagname> is something like 2.0.

  • Create the GitHub release, choosing the newly created tag from the dropdown menu. Do not create a tag from the dropdown menu directly because it will not be an annotated tag

The SHARPy Case files

SHARPy takes as input a series of .h5 files that contain the numerical data and a .sharpy file that contains the settings for each of the solvers. How these files are generated is at the user’s discretion, though templates are provided, and all methods are valid as long as the required variables are provided with the appropriate format.

Modular Framework

SHARPy is built with a modular framework in mind. The following diagram shows the strutuctre of a nonlinear, time marching aeroelastic simulation

SHARPy's modular structure

Each of the blocks correspond to individual solvers with specific settings. How we choose which solvers to run, in which order and with what settings is done through the solver configuration file, explained in the next section.

Solver configuration file

The solver configuration file is the main input to SHARPy. It is a ConfigObj formatted file with the .sharpy extension. It contains the settings for each of the solvers and the order in which to run them.

A typical way to assemble the solver configuration file is to place all your desired settings in a dictionary and then convert to and write your ConfigObj. If a setting is not provided the default value will be used. The settings that each solver takes, its type and default value are explained in their relevant documentation pages.

import configobj
filename = '<case_route>/<case_name>.sharpy'
config = configobj.ConfigObj()
config.filename = filename
config['SHARPy'] = {'case': '<your SHARPy case name>',  # an example setting
                    # Rest of your settings for the PreSHARPy class
                    }
config['BeamLoader'] = {'orientation': [1., 0., 0.],  # an example setting
                        # Rest of settings for the BeamLoader solver
                        }
# Continue as above for the remainder of solvers that you would like to include

# finally, write the config file
config.write()

The resulting .sharpy file is a plain text file with your specified settings for each of the solvers.

Note that, therefore, if one of your settings is a np.array, it will get transformed into a string of plain text before being read by SHARPy. However, any setting with list(float) specified as its setting type will get converted into a np.array once it is read by SHARPy.

FEM file

The case.fem.h5 file has several components. We go one by one:

  • num_node_elem [int] : number of nodes per element.

    Always 3 in our case (3 nodes per structural elements - quadratic beam elements).

  • num_elem [int] : number of structural elements.

  • num_node [int] : number of nodes.

    For simple structures, it is num_elem*(num_node_elem - 1) - 1. For more complicated ones, you need to calculate it properly.

  • coordinates [num_node, 3]: coordinates of the nodes in body-attached FoR (A).

  • connectivites [num_elem, num_node_elem] : Beam element’s connectivities.

    Every row refers to an element, and the three integers in that row are the indices of the three nodes belonging to that elem. Now, the catch: the ordering is not as you’d think. Order them as [0, 2, 1]. That means, first one, last one, central one. The following image shows the node indices inside the circles representing the nodes, the element indices in blue and the resulting connectivities matrix next to it. Connectivities are tricky when considering complex configurations. Pay attention at the beginning and you’ll save yourself a lot of trouble.

    SHARPy Beam Element Connectivities
  • stiffness_db [:, 6, 6]: database of stiffness matrices.

    The first dimension has as many elements as different stiffness matrices are in the model.

  • elem_stiffness [num_elem] : array of indices (starting at 0).

    It links every element (index) to the stiffness matrix index in stiffness_db. For example elem_stiffness[0] = 0 ; elem_stiffness[2] = 1 means that the element 0 has a stiffness matrix equal to stiffness_db[0, :, :] , and the second element has a stiffness matrix equal to stiffness_db[1, :, :].

    The shape of a stiffness matrix, \(\mathrm{S}\) is:

    \[\begin{split}\mathrm{S} = \begin{bmatrix} EA & & & & & \\ & GA_y & & & & \\ & & GA_z & & & \\ & & & GJ & & \\ & & & & EI_y & \\ & & & & & EI_z \\ \end{bmatrix}\end{split}\]

    with the cross terms added if needed.

    mass_db and elem_mass follow the same scheme than the stiffness, but the mass matrix is given by:

    \[\begin{split}\mathrm{M} = \begin{bmatrix} m\mathbf{I} & -\tilde{\boldsymbol{\xi}}_{cg}m \\ \tilde{\boldsymbol{\xi}}_{cg}m & \mathbf{J}\\ \end{bmatrix}\end{split}\]

    where \(m\) is the distributed mass per unit length \(kg/m\) , \((\tilde{\bullet})\) is the skew-symmetric matrix of a vector and \(\boldsymbol{\xi}_{cg}\) is the location of the centre of gravity with respect to the elastic axis in MATERIAL (local) FoR. And what is the Material FoR? This is an important point, because all the inputs that move WITH the beam are in material FoR. For example: follower forces, stiffness, mass, lumped masses…

    SHARPy Frames of Reference

    The material frame of reference is noted as \(B\). Essentially, the \(x\) component is tangent to the beam in the increasing node ordering, \(z\) looks up generally and \(y\) is oriented such that the FoR is right handed.

    In the practice (vertical surfaces, structural twist effects…) it is more complicated than this. The only sure thing about \(B\) is that its \(x\) direction is tangent to the beam in the increasing node number direction. However, with just this, we have an infinite number of potential reference frames, with \(y\) and \(z\) being normal to \(x\) but rotating around it. The solution is to indicate a for_delta, or frame of reference delta vector (\(\Delta\)).

    Frame of Reference Delta Vector

    Now we can define unequivocally the material frame of reference. With \(x_B\) and \(\Delta\) defining a plane, \(y_b\) is chosen such that the \(z\) component is oriented upwards with respect to the lifting surface.

    From this definition comes the only constraint to \(\Delta\): it cannot be parallel to \(x_B\).

  • frame_of_reference_delta [num_elem, num_node_elem, 3]: rotation vector to FoR \(B\).

    contains the \(\Delta\) vector in body-attached (\(A\)) frame of reference.

    As a rule of thumb:

    \[\begin{split}\Delta = \begin{cases} [-1, 0, 0], \quad \text{if right wing} \\ [1, 0, 0], \quad \text{if left wing} \\ [0, 1, 0], \quad \text{if fuselage} \\ [-1, 0, 0], \quad \text{if vertical fin} \\ \end{cases}\end{split}\]

    These rules of thumb only work if the nodes increase towards the tip of the surfaces (and the tail in the case of the fuselage).

  • structural_twist [num_elem, num_node_elem]: Element twist.

    Technically not necessary, as the same effect can be achieved with FoR_delta.

  • boundary_conditions [num_node]: boundary conditions.

    An array of integers (np.zeros((num_node, ), dtype=int)) and contains all 0 except for

    • One node NEEDS to have a 1 , this is the reference node. Usually, the first node has 1 and is located in [0, 0, 0]. This makes things much easier.

    • If the node is a tip of a beam (is not attached to 2 elements, but just 1), it needs to have a -1.

  • beam_number [num_elem]: beam index.

    Is another array of integers. Usually you don’t need to modify its value. Leave it at 0.

  • app_forces [num_elem, 6]: applied forces and moments.

    Contains the applied forces app_forces[:, 0:3] and moments app_forces[:, 3:6] in a given node.

    Important points: the forces are given in Material FoR (check above). That means that in a symmetrical model, a thrust force oriented upstream would have the shape [0, T, 0, 0, 0, 0] in the right wing, while the left would be [0, -T, 0, 0, 0, 0]. Likewise, a torsional moment for twisting the wing leading edge up would be [0, 0, 0, M, 0, 0] for the right, and [0, 0, 0, -M, 0, 0] for the left. But careful, because an out-of-plane bending moment (wing tip up) has the same sign (think about it).

  • lumped_mass [:]: lumped masses.

    Is an array with as many masses as needed (in kg this time). Their order is important, as more information is required to implement them in a model.

  • lumped_mass_nodes [:]: Lumped mass nodes.

    Is an array of integers. It contains the index of the nodes related to the masses given in lumped_mass in order.

  • lumped_mass_inertia [:, 3, 3]: Lumped mass inertia.

    Is an array of 3x3 inertial tensors. The relationship is set by the ordering as well.

  • lumped_mass_position [:, 3]: Lumped mass position.

    Is the relative position of the lumped mass with respect to the node (given in lumped_masss_nodes ) coordinates. ATTENTION: the lumped mass is solidly attached to the node, and thus, its position is given in Material FoR.

Aerodynamics file

All the aerodynamic data is contained in case.aero.h5.

It is important to know that the input for aero is usually based on elements (and inside the elements, their nodes). This causes sometimes an overlap in information, as some nodes are shared by two adjacent elements (like in the connectivities graph in the previous section). The easier way of dealing with this is to make sure the data is consistent, so that the properties of the last node of the first element are the same than the first node of the second element.

Item by item:

  • airfoils: Airfoil group.

    In the aero.h5 file, there is a Group called airfoils. The airfoils are stored in this group (which acts as a folder) as a two-column matrix with \(x/c\) and \(y/c\) in each column. They are named '0', '1' , and so on.

  • chords [num_elem, num_node_elem]: Chord

    Is an array with the chords of every airfoil given in an element/node basis.

  • twist [num_elem, num_node_elem]: Twist.

    Has the twist angle in radians. It is implemented as a rotation around the local \(x\) axis.

  • sweep [num_elem, num_node_elem]: Sweep.

    Same here, just a rotation around \(z\).

  • airfoil_distribution [num_elem, num_node_elem]: Airfoil distribution.

    Contains the indices of the airfoils that you put previously in airfoils.

  • surface_distribution [num_elem]: Surface integer array.

    It contains the index of the surface the element belongs to. Surfaces need to be continuous, so please note that if your beam numbering is not continuous, you need to make a surface per continuous section.

  • surface_m [num_surfaces]: Chordwise panelling.

    Is an integer array with the number of chordwise panels for every surface.

  • m_distribution [string]: Discretisation method.

    Is a string with the chordwise panel distribution. In almost all cases, leave it at uniform.

  • aero_node [num_node]: Aerodynamic node definition.

    Is a boolean (True or False) array that indicates if that node has a lifting surface attached to it.

  • elastic_axis [num_elem, num_node_elem]: elastic axis.

    Indicates the elastic axis location with respect to the leading edge as a fraction of the chord of that rib. Note that the elastic axis is already determined, as the beam is fixed now, so this settings controls the location of the lifting surface wrt the beam.

  • control_surface [num_elem, num_node_elem]: Control surface.

    Is an integer array containing -1 if that section has no control surface associated to it, and 0, 1, 2 ... if the section belongs to the control surface 0, 1, 2 ... respectively.

  • control_surface_type [num_control_surface]: Control Surface type.

    Contains 0 if the control surface deflection is static, and 1 is it is dynamic.

  • control_surface_chord [num_control_surface]: Control surface chord.

    Is an INTEGER array with the number of panels belonging to the control surface. For example, if M = 4 and you want your control surface to be \(0.25c\), you need to put 1.

  • control_surface_hinge_coord [num_control_surface]: Control surface hinge coordinate.

    Only necessary for lifting surfaces that are deflected as a whole, like some horizontal tails in some aircraft. Leave it at 0 if you are not modelling this.

  • airfoil_efficiency [num_elem, num_node_elem, 2, 3]: Airfoil efficiency.

    This is an optional setting that introduces a user-defined efficiency and constant terms to the mapping between the aerodynamic forces calculated at the lattice grid and the structural nodes. The formatting of the 4-dimensional array is simple. The first two dimensions correspond to the element index and the local node index. The third index is whether the term is the multiplier to the force 0 or a constant term 1. The final term refers to, in the local, body-attached B frame, the factors and constant terms for: fy, fz, mx. For more information on how these factors are included in the mapping terms see sharpy.aero.utils.mapping.aero2struct_force_mapping().

  • polars Group (optional): Use airfoil polars to correct aerodynamic forces.

    This is an optional group to add if correcting the aerodynamic forces using airfoil polars is desired. A polar should be included for each airfoil defined. Each entry consists of a 4-column table. The first column corresponds to the angle of attack (in radians) and then the C_L, C_D and C_M.

Time-varying force input file (.dyn.h5)

The .dyn.h5 file is an optional input file that may contain force and acceleration inputs that vary with time. This is intended for use in dynamic problems. For SHARPy to look for and use this file the setting unsteady in the BeamLoader must be turned to on.

Appropriate data entries in the .dyn.h5 include:

  • dynamic_forces [num_t_steps, num_node, 6]: Dynamic forces in body attached B frame.

    Forces given at each time step, for each node and then for the 6 degrees of freedom (fx, fy, fz, mx, my, mz) in a body-attached (local) frame of reference B.

  • for_pos [num_t_steps, 6]: Body frame of reference (A FoR) position.

    Position of the reference frame A in time.

  • for_vel [num_t_steps, 6]: Body frame of reference (A FoR) velocity.

    Velocity of the reference frame A in time.

  • for_acc [num_t_steps, 6]: Body frame of reference (A FoR) acceleration.

    Acceleration of the reference frame A in time.

    If a case is restarted from a pickle file, the .dyn.h5 file should include the dynamic information for the previous simulation (that will be discarded) and the information for the new simulation.

SHARPy Solvers

The available SHARPy solvers are listed below. Attending to SHARPy’s modular structure, they can be run independently so the order in which you desire to run them is important.

The starting point is the PreSharpy loader. It contains the simulation configuration and which solvers are to be run and in the order that should happen.

Aero Solvers

DynamicUVLM
class sharpy.solvers.dynamicuvlm.DynamicUVLM[source]

Dynamic Aerodynamic Time Domain Simulation

Provides an aerodynamic only simulation in time by time stepping the solution. The type of aerodynamic solver is parsed as a setting.

To Do:

Clean timestep information for memory efficiency

Warning

Under development. Issues encountered when using the linear UVLM as the aerodynamic solver with integration order = 1.

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

print_info

bool

Write status to screen

True

structural_solver

str

Structural solver to use in the coupled simulation

None

structural_solver_settings

dict

Dictionary of settings for the structural solver

None

aero_solver

str

Aerodynamic solver to use in the coupled simulation

None

aero_solver_settings

dict

Dictionary of settings for the aerodynamic solver

None

n_time_steps

int

Number of time steps for the simulation

None

dt

float

Time step

None

include_unsteady_force_contribution

bool

If on, added mass contribution is added to the forces. This depends on the time derivative of the bound circulation. Check filter_gamma_dot in the aero solver

False

postprocessors

list(str)

List of the postprocessors to run at the end of every time step

[]

postprocessors_settings

dict

Dictionary with the applicable settings for every psotprocessor. Every postprocessor needs its entry, even if empty

{}

NoAero
class sharpy.solvers.noaero.NoAero[source]

Skip UVLM evaluation

Solver to be used with either StaticCoupled or DynamicCoupled when aerodynamics are not of interest.

An example would be running a structural-only simulation where you would like to keep an aerodynamic grid for visualisation purposes.

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

dt

float

Time step

0.1

update_grid

bool

Update aerodynamic grid as the structure deforms.

True

PrescribedUvlm
class sharpy.solvers.prescribeduvlm.PrescribedUvlm[source]

This class runs a prescribed rigid body motion simulation of a rigid aerodynamic body.

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

print_info

bool

Write status to screen

True

structural_solver

str

Structural solver to use in the coupled simulation

None

structural_solver_settings

dict

Dictionary of settings for the structural solver

None

aero_solver

str

Aerodynamic solver to use in the coupled simulation

None

aero_solver_settings

dict

Dictionary of settings for the aerodynamic solver

None

n_time_steps

int

Number of time steps for the simulation

None

dt

float

Time step

None

postprocessors

list(str)

List of the postprocessors to run at the end of every time step

[]

postprocessors_settings

dict

Dictionary with the applicable settings for every postprocessor. Every postprocessor needs its entry, even if empty

{}

cfl1

bool

If it is True, it assumes that the discretisation complies with CFL=1

True

vortex_radius

float

Distance between points below which induction is not computed

sharpy.utils.constants.vortex_radius_def

vortex_radius_wake_ind

float

Distance between points below which induction is not computed in the wake convection

sharpy.utils.constants.vortex_radius_def

StaticUvlm
class sharpy.solvers.staticuvlm.StaticUvlm[source]

StaticUvlm solver class, inherited from BaseSolver

Aerodynamic solver that runs a UVLM routine to solve the steady or unsteady aerodynamic problem. The aerodynamic problem is posed in the form of an Aerogrid object.

Parameters
  • data (PreSharpy) – object with problem data

  • custom_settings (dict) – custom settings that override the settings in the solver .txt file. None by default

settings

Name-value pair of settings employed by solver. See Notes for valid combinations

Type

dict

settings_types

Acceptable data types for entries in settings

Type

dict

settings_default

Default values for the available settings

Type

dict

data

object containing the information of the problem

Type

PreSharpy

velocity_generator

object containing the flow conditions information

Type

object

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

print_info

bool

Print info to screen

True

horseshoe

bool

Horseshoe wake modelling for steady simulations.

False

num_cores

int

Number of cores to use in the VLM lib

0

n_rollup

int

Number of rollup iterations for free wake. Use at least n_rollup > 1.1*m_star

1

rollup_dt

float

Controls when the AIC matrix is refreshed during the wake rollup

0.1

rollup_aic_refresh

int

1

rollup_tolerance

float

Convergence criterium for rollup wake

0.0001

iterative_solver

bool

Not in use

False

iterative_tol

float

Not in use

0.0001

iterative_precond

bool

Not in use

False

velocity_field_generator

str

Name of the velocity field generator to be used in the simulation

SteadyVelocityField

velocity_field_input

dict

Dictionary of settings for the velocity field generator

{}

rho

float

Air density

1.225

cfl1

bool

If it is True, it assumes that the discretisation complies with CFL=1

True

vortex_radius

float

Distance between points below which induction is not computed

sharpy.utils.constants.vortex_radius_def

vortex_radius_wake_ind

float

Distance between points below which induction is not computed in the wake convection

sharpy.utils.constants.vortex_radius_def

rbm_vel_g

list(float)

Rigid body velocity in G FoR

[0.0, 0.0, 0.0, 0.0, 0.0, 0.0]

centre_rot_g

list(float)

Centre of rotation in G FoR around which rbm_vel_g is applied

[0.0, 0.0, 0.0]

next_step()[source]

Updates de aerogrid based on the info of the step, and increases the self.ts counter

StepLinearUVLM
class sharpy.solvers.steplinearuvlm.StepLinearUVLM[source]

Time domain aerodynamic solver that uses a linear UVLM formulation to be used with the solvers.DynamicCoupled solver.

To use this solver, the solver_id = StepLinearUVLM must be given as the name for the aero_solver is the case of an aeroelastic solver, where the setting below would be parsed through aero_solver_settings.

Notes

The integr_order variable refers to the finite differencing scheme used to calculate the bound circulation derivative with respect to time \(\dot{\mathbf{\Gamma}}\). A first order scheme is used when integr_order == 1

\[\dot{\mathbf{\Gamma}}^{n+1} = \frac{\mathbf{\Gamma}^{n+1}-\mathbf{\Gamma}^n}{\Delta t}\]

If integr_order == 2 a higher order scheme is used (but it isn’t exactly second order accurate [1]).

\[\dot{\mathbf{\Gamma}}^{n+1} = \frac{3\mathbf{\Gamma}^{n+1}-4\mathbf{\Gamma}^n + \mathbf{\Gamma}^{n-1}} {2\Delta t}\]

If track_body is True, the UVLM is projected onto a frame U that is:

  • Coincident with G at the linearisation timestep.

  • Thence, rotates by the same quantity as the FoR A.

It is similar to a stability axes and is recommended any time rigid body dynamics are included.

See also

sharpy.sharpy.linear.assembler.linearuvlm.LinearUVLM

References

[1] Maraniello, S., & Palacios, R.. State-Space Realizations and Internal Balancing in Potential-Flow Aerodynamics with Arbitrary Kinematics. AIAA Journal, 57(6), 1–14. 2019. https://doi.org/10.2514/1.J058153

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

dt

float

Time step

0.1

integr_order

int

Integration order of the circulation derivative. Either 1 or 2.

2

ScalingDict

dict

Dictionary of scaling factors to achieve normalised UVLM realisation.

{}

remove_predictor

bool

Remove the predictor term from the UVLM equations

True

use_sparse

bool

Assemble UVLM plant matrix in sparse format

True

density

float

Air density

1.225

track_body

bool

UVLM inputs and outputs projected to coincide with lattice at linearisation

True

track_body_number

int

Frame of reference number to follow. If -1 track A frame.

-1

velocity_field_generator

str

Name of the velocity field generator to be used in the simulation

SteadyVelocityField

velocity_field_input

dict

Dictionary of settings for the velocity field generator

{}

vortex_radius

float

Distance between points below which induction is not computed

sharpy.utils.constants.vortex_radius_def

vortex_radius_wake_ind

float

Distance between points below which induction is not computed in the wake convection

sharpy.utils.constants.vortex_radius_def

cfl1

bool

If it is True, it assumes that the discretisation complies with CFL=1

True

The settings that ScalingDict accepts are the following:

Name

Type

Description

Default

length

float

Reference length to be used for UVLM scaling

1.0

speed

float

Reference speed to be used for UVLM scaling

1.0

density

float

Reference density to be used for UVLM scaling

1.0

initialise(data, custom_settings=None)[source]

Initialises the Linear UVLM aerodynamic solver and the chosen velocity generator.

Settings are parsed into the standard SHARPy settings format for solvers. It then checks whether there is any previous information about the linearised system (in order for a solution to be restarted without overwriting the linearisation).

If a linearised system does not exist, a linear UVLM system is created linearising about the current time step.

The reference values for the input and output are transformed into column vectors \(\mathbf{u}\) and \(\mathbf{y}\), respectively.

The information pertaining to the linear system is stored in a dictionary self.data.aero.linear within the main data variable.

Parameters
  • data (PreSharpy) – class containing the problem information

  • custom_settings (dict) – custom settings dictionary

pack_input_vector()[source]

Transform a SHARPy AeroTimestep instance into a column vector containing the input to the linear UVLM system.

\[[\zeta,\, \dot{\zeta}, u_{ext}] \longrightarrow \mathbf{u}\]

If the track_body option is on, the function projects all the input into a frame that:

  1. is equal to the FoR G at time 0 (linearisation point)

  2. rotates as the body frame specified in the track_body_number

Returns

Input vector

Return type

np.ndarray

static pack_state_vector(aero_tstep, aero_tstep_m1, dt, integr_order)[source]

Transform SHARPy Aerotimestep format into column vector containing the state information.

The state vector is of a different form depending on the order of integration chosen. If a second order scheme is chosen, the state includes the bound circulation at the previous timestep, hence the timestep information for the previous timestep shall be parsed.

The transformation is of the form:

  • If integr_order==1:

    \[\mathbf{x}_n = [\mathbf{\Gamma}^T_n,\, \mathbf{\Gamma_w}_n^T,\, \Delta t \,\mathbf{\dot{\Gamma}}_n^T]^T\]
  • Else, if integr_order==2:

    \[\mathbf{x}_n = [\mathbf{\Gamma}_n^T,\, \mathbf{\Gamma_w}_n^T,\, \Delta t \,\mathbf{\dot{\Gamma}}_n^T,\, \mathbf{\Gamma}_{n-1}^T]^T\]

For the second order integration scheme, if the previous timestep information is not parsed, a first order stencil is employed to estimate the bound circulation at the previous timestep:

\[\mathbf{\Gamma}^{n-1} = \mathbf{\Gamma}^n - \Delta t \mathbf{\dot{\Gamma}}^n\]
Parameters
Returns

State vector

Return type

np.ndarray

run(aero_tstep, structure_tstep, convect_wake=False, dt=None, t=None, unsteady_contribution=False)[source]

Solve the linear aerodynamic UVLM model at the current time step n. The step increment is solved as:

\[\begin{split}\mathbf{x}^n &= \mathbf{A\,x}^{n-1} + \mathbf{B\,u}^n \\ \mathbf{y}^n &= \mathbf{C\,x}^n + \mathbf{D\,u}^n\end{split}\]

A change of state is possible in order to solve the system without the predictor term. In which case the system is solved by:

\[\begin{split}\mathbf{h}^n &= \mathbf{A\,h}^{n-1} + \mathbf{B\,u}^{n-1} \\ \mathbf{y}^n &= \mathbf{C\,h}^n + \mathbf{D\,u}^n\end{split}\]

Variations are taken with respect to initial reference state. The state and input vectors for the linear UVLM system are of the form:

If integr_order==1:
\[\mathbf{x}_n = [\delta\mathbf{\Gamma}^T_n,\, \delta\mathbf{\Gamma_w}_n^T,\, \Delta t \,\delta\mathbf{\dot{\Gamma}}_n^T]^T\]
Else, if integr_order==2:
\[\mathbf{x}_n = [\delta\mathbf{\Gamma}_n^T,\, \delta\mathbf{\Gamma_w}_n^T,\, \Delta t \,\delta\mathbf{\dot{\Gamma}}_n^T,\, \delta\mathbf{\Gamma}_{n-1}^T]^T\]
And the input vector:
\[\mathbf{u}_n = [\delta\mathbf{\zeta}_n^T,\, \delta\dot{\mathbf{\zeta}}_n^T,\,\delta\mathbf{u_{ext}}^T_n]^T\]

where the subscript n refers to the time step.

The linear UVLM system is then solved as detailed in sharpy.linear.src.linuvlm.Dynamic.solve_step(). The output is a column vector containing the aerodynamic forces at the panel vertices.

To Do: option for impulsive start?

Parameters
  • aero_tstep (AeroTimeStepInfo) – object containing the aerodynamic data at the current time step

  • structure_tstep (StructTimeStepInfo) – object containing the structural data at the current time step

  • convect_wake (bool) – for backward compatibility only. The linear UVLM assumes a frozen wake geometry

  • dt (float) – time increment

  • t (float) – current time

  • unsteady_contribution (bool) – (backward compatibily). Unsteady aerodynamic effects are always included

Returns

updated self.data class with the new forces and circulation terms of the system

Return type

PreSharpy

unpack_ss_vectors(y_n, x_n, u_n, aero_tstep)[source]

Transform column vectors used in the state space formulation into SHARPy format

The column vectors are transformed into lists with one entry per aerodynamic surface. Each entry contains a matrix with the quantities at each grid vertex.

\[\mathbf{y}_n \longrightarrow \mathbf{f}_{aero}\]
\[\mathbf{x}_n \longrightarrow \mathbf{\Gamma}_n,\, \mathbf{\Gamma_w}_n,\, \mathbf{\dot{\Gamma}}_n\]

If the track_body option is on, the output forces are projected from the linearization frame, to the G frame. Note that the linearisation frame is:

  1. equal to the FoR G at time 0 (linearisation point)

  2. rotates as the body frame specified in the track_body_number

Parameters
  • y_n (np.ndarray) – Column output vector of linear UVLM system

  • x_n (np.ndarray) – Column state vector of linear UVLM system

  • u_n (np.ndarray) – Column input vector of linear UVLM system

  • aero_tstep (AeroTimeStepInfo) – aerodynamic timestep information class instance

Returns

Tuple containing:

forces (list):

Aerodynamic forces in a list with n_surf entries. Each entry is a (6, M+1, N+1) matrix, where the first 3 indices correspond to the components in x, y and z. The latter 3 are zero.

gamma (list):

Bound circulation list with n_surf entries. Circulation is stored in an (M+1, N+1) matrix, corresponding to the panel vertices.

gamma_dot (list):

Bound circulation derivative list with n_surf entries. Circulation derivative is stored in an (M+1, N+1) matrix, corresponding to the panel vertices.

gamma_star (list):

Wake (free) circulation list with n_surf entries. Wake circulation is stored in an (M_star+1, N+1) matrix, corresponding to the panel vertices of the wake.

Return type

tuple

StepUvlm
class sharpy.solvers.stepuvlm.StepUvlm[source]

StepUVLM is the main solver to use for unsteady aerodynamics.

The desired flow field is injected into the simulation by means of a generator. For a list of available velocity field generators see the documentation page on generators which can be found under SHARPy Source Code.

Typical generators could be:

amongst others.

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

Options

print_info

bool

Print info to screen

True

num_cores

int

Number of cores to use in the VLM lib

0

n_time_steps

int

Number of time steps to be run

100

convection_scheme

int

0: fixed wake, 2: convected with background flow;``3``: full force-free wake

3

0, 2, 3

dt

float

Time step

0.1

iterative_solver

bool

Not in use

False

iterative_tol

float

Not in use

0.0001

iterative_precond

bool

Not in use

False

velocity_field_generator

str

Name of the velocity field generator to be used in the simulation

SteadyVelocityField

velocity_field_input

dict

Dictionary of settings for the velocity field generator

{}

gamma_dot_filtering

int

Filtering parameter for the Welch filter for the Gamma_dot estimation. Used when unsteady_force_contribution is on.

0

rho

float

Air density

1.225

cfl1

bool

If it is True, it assumes that the discretisation complies with CFL=1

True

vortex_radius

float

Distance between points below which induction is not computed

sharpy.utils.constants.vortex_radius_def

vortex_radius_wake_ind

float

Distance between points below which induction is not computed in the wake convection

sharpy.utils.constants.vortex_radius_def

interp_coords

int

Coordinates to use for wake description: cartesian(0) or cylindrical_z(1)

0

0, 1

filter_method

int

Method to filter the points: no filter (0) moving average(2)

0

0, 2

interp_method

int

Method of interpolation: linear(0), parabolic(1), splines(2), slerp around z(3), slerp around yaw_slerp(4)

0

0, 1, 2, 3, 4

yaw_slerp

float

Yaw angle in radians to be used when interp_metod == 4

0

centre_rot

list(float)

Coordinates of the centre of rotation to perform slerp interpolation or cylindrical coordinates

[0.0, 0.0, 0.0]

quasi_steady

bool

Use quasi-steady approximation in UVLM

False

initialise(data, custom_settings=None)[source]

To be called just once per simulation.

run(aero_tstep=None, structure_tstep=None, convect_wake=True, dt=None, t=None, unsteady_contribution=False)[source]

Runs a step of the aerodynamics as implemented in UVLM.

Coupled Solvers

DynamicCoupled
class sharpy.solvers.dynamiccoupled.DynamicCoupled[source]

The DynamicCoupled solver couples the aerodynamic and structural solvers of choice to march forward in time the aeroelastic system’s solution.

Using the DynamicCoupled solver requires that an instance of the StaticCoupled solver is called in the SHARPy solution flow when defining the problem case.

Input data (from external controllers) can be received and data sent using the SHARPy network interface, specified through the setting network_settings of this solver. For more detail on how to send and receive data see the NetworkLoader documentation.

Changes to the structural properties or external forces that depend on the instantaneous situation of the system can be applied through runtime_generators. These runtime generators are parsed through dictionaries, with the key being the name of the generator and the value the settings for such generator. The currently available runtime_generators are ExternalForces and ModifyStructure.

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

Options

print_info

bool

Write status to screen

True

structural_solver

str

Structural solver to use in the coupled simulation

None

structural_solver_settings

dict

Dictionary of settings for the structural solver

None

aero_solver

str

Aerodynamic solver to use in the coupled simulation

None

aero_solver_settings

dict

Dictionary of settings for the aerodynamic solver

None

n_time_steps

int

Number of time steps for the simulation

None

dt

float

Time step

None

fsi_substeps

int

Max iterations in the FSI loop

70

fsi_tolerance

float

Convergence threshold for the FSI loop

1e-05

structural_substeps

int

Number of extra structural time steps per aero time step. 0 is a fully coupled simulation.

0

relaxation_factor

float

Relaxation parameter in the FSI iteration. 0 is no relaxation and -> 1 is very relaxed

0.2

final_relaxation_factor

float

Relaxation factor reached in relaxation_steps with dynamic_relaxation on

0.0

minimum_steps

int

Number of minimum FSI iterations before convergence

3

relaxation_steps

int

Length of the relaxation factor ramp between relaxation_factor and final_relaxation_factor with dynamic_relaxation on

100

dynamic_relaxation

bool

Controls if relaxation factor is modified during the FSI iteration process

False

postprocessors

list(str)

List of the postprocessors to run at the end of every time step

[]

postprocessors_settings

dict

Dictionary with the applicable settings for every postprocessor. Every postprocessor needs its entry, even if empty

{}

controller_id

dict

Dictionary of id of every controller (key) and its type (value)

{}

controller_settings

dict

Dictionary with settings (value) of every controller id (key)

{}

cleanup_previous_solution

bool

Controls if previous timestep_info arrays are reset before running the solver

False

include_unsteady_force_contribution

bool

If on, added mass contribution is added to the forces. This depends on the time derivative of the bound circulation. Check filter_gamma_dot in the aero solver

False

steps_without_unsteady_force

int

Number of initial timesteps that don’t include unsteady forces contributions. This avoids oscillations due to no perfectly trimmed initial conditions

0

pseudosteps_ramp_unsteady_force

int

Length of the ramp with which unsteady force contribution is introduced every time step during the FSI iteration process

0

correct_forces_method

str

Function used to correct aerodynamic forces. See sharpy.generators.polaraeroforces

EfficiencyCorrection, PolarCorrection

correct_forces_settings

dict

Settings for corrected forces evaluation

{}

network_settings

dict

Network settings. See NetworkLoader for supported entries

{}

runtime_generators

dict

The dictionary keys are the runtime generators to be used. The dictionary values are dictionaries with the settings needed by each generator.

{}

convergence(k, tstep, previous_tstep, struct_solver, aero_solver, with_runtime_generators)[source]

Check convergence in the FSI loop.

Convergence is determined as:

\[\epsilon_q^k = \frac{|| q^k - q^{k - 1} ||}{q^0}\]
\[\epsilon_\dot{q}^k = \frac{|| \dot{q}^k - \dot{q}^{k - 1} ||}{\dot{q}^0}\]

FSI converged if \(\epsilon_q^k < \mathrm{FSI\ tolerance}\) and \(\epsilon_\dot{q}^k < \mathrm{FSI\ tolerance}\)

get_g()[source]

Getter for g, the gravity value

get_rho()[source]

Getter for rho, the density value

initialise(data, custom_settings=None)[source]

Controls the initialisation process of the solver, including processing the settings and initialising the aero and structural solvers, postprocessors and controllers.

static interpolate_timesteps(step0, step1, out_step, coeff)[source]

Performs a linear interpolation between step0 and step1 based on coeff in [0, 1]. 0 means info in out_step == step0 and 1 out_step == step1.

Quantities interpolated: * steady_applied_forces * unsteady_applied_forces * velocity input in Lagrange constraints

process_controller_output(controlled_state)[source]

This function modified the solver properties and parameters as requested from the controller.

This keeps the main loop much cleaner, while allowing for flexibility

Please, if you add options in here, always code the possibility of that specific option not being there without the code complaining to the user.

If it possible, use the same Key for the new setting as for the setting in the solver. For example, if you want to modify the structural_substeps variable in settings, use that Key in the info dictionary.

As a convention: a value of None returns the value to the initial one specified in settings, while the key not being in the dict is ignored, so if any change was made before, it will stay there.

run()[source]

Run the time stepping procedure with controllers and postprocessors included.

set_g(new_g)[source]

Setter for g, the gravity value

set_rho(new_rho)[source]

Setter for rho, the density value

LinDynamicSim
class sharpy.solvers.lindynamicsim.LinDynamicSim[source]

Time-domain solution of Linear Time Invariant Systems

Uses the derived linear time invariant systems and solves it in time domain.

Requires a case_name.lininput.h5 file in the case root folder that contains:

  • x0 (optional): Initial state vector

  • input_vec: Input vector (n_tsteps, n_inputs).

Note

This solver is seldom used in SHARPy (its focus is on nonlinear time domain aeroelasticity) hence you may find this solver lacking in features. If you use it, you may need to make modifications. We would greatly appreciate that you contribute these modifications by means of a pull request!

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

write_dat

list(str)

List of vectors to write: x, y, u and/or t

[]

reference_velocity

float

Velocity to scale the structural equations when using a non-dimensional system

1.0

n_tsteps

int

Number of time steps to run

10

physical_time

float

Time to run

2.0

dt

float

Time increment for the solution of systems without a specified dt

0.001

postprocessors

list(str)

[]

postprocessors_settings

dict

{}

StaticCoupled
class sharpy.solvers.staticcoupled.StaticCoupled[source]

This class is the main FSI driver for static simulations. It requires a structural_solver and a aero_solver to be defined.

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

Options

print_info

bool

Write status to screen

True

structural_solver

str

Structural solver to use in the coupled simulation

None

structural_solver_settings

dict

Dictionary of settings for the structural solver

None

aero_solver

str

Aerodynamic solver to use in the coupled simulation

None

aero_solver_settings

dict

Dictionary of settings for the aerodynamic solver

None

max_iter

int

Max iterations in the FSI loop

100

n_load_steps

int

Length of ramp for forces and gravity during FSI iteration

0

tolerance

float

Convergence threshold for the FSI loop

1e-05

relaxation_factor

float

Relaxation parameter in the FSI iteration. 0 is no relaxation and -> 1 is very relaxed

0.0

correct_forces_method

str

Function used to correct aerodynamic forces. See sharpy.generators.polaraeroforces

EfficiencyCorrection, PolarCorrection

correct_forces_settings

dict

Settings for corrected forces evaluation

{}

runtime_generators

dict

The dictionary keys are the runtime generators to be used. The dictionary values are dictionaries with the settings needed by each generator.

{}

StaticCoupledRBM
class sharpy.solvers.staticcoupledrbm.StaticCoupledRBM[source]

Steady coupled solver including rigid body motions

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

Options

print_info

bool

Output run-time information

True

structural_solver

str

Name of the structural solver used in the computation

None

structural_solver_settings

dict

Dictionary os settings needed by the structural solver

None

aero_solver

str

Name of the aerodynamic solver used in the computation

None

aero_solver_settings

dict

Dictionary os settings needed by the aerodynamic solver

None

max_iter

int

Maximum numeber of FSI iterations

100

n_load_steps

int

Number of steps to ramp up the application of loads

1

tolerance

float

FSI tolerance

1e-05

relaxation_factor

float

Relaxation factor

0.0

correct_forces_method

str

Function used to correct aerodynamic forces. See sharpy.generators.polaraeroforces

EfficiencyCorrection, PolarCorrection

correct_forces_settings

dict

Settings for corrected forces evaluation

{}

Flight dynamics Solvers

StaticTrim
class sharpy.solvers.statictrim.StaticTrim[source]

The StaticTrim solver determines the longitudinal state of trim (equilibrium) for an aeroelastic system in static conditions. It wraps around the desired solver to yield the state of trim of the system, in most cases the StaticCoupled solver.

It calculates the required angle of attack, elevator deflection and thrust required to achieve longitudinal equilibrium. The output angles are shown in degrees.

The results from the trimming iteration can be saved to a text file by using the save_info option.

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

print_info

bool

Print info to screen

True

solver

str

Solver to run in trim routine

solver_settings

dict

Solver settings dictionary

{}

max_iter

int

Maximum number of iterations of trim routine

100

fz_tolerance

float

Tolerance in vertical force

0.01

fx_tolerance

float

Tolerance in horizontal force

0.01

m_tolerance

float

Tolerance in pitching moment

0.01

tail_cs_index

int

Index of control surfaces that move to achieve trim

0

thrust_nodes

list(int)

Nodes at which thrust is applied

[0]

initial_alpha

float

Initial angle of attack

0.0

initial_deflection

float

Initial control surface deflection

0.0

initial_thrust

float

Initial thrust setting

0.0

initial_angle_eps

float

Initial change of control surface deflection

0.05

initial_thrust_eps

float

Initial thrust setting change

2.0

relaxation_factor

float

Relaxation factor

0.2

save_info

bool

Save trim results to text file

False

trim_algorithm()[source]

Trim algorithm method

The trim condition is found iteratively.

Returns

array of trim values for angle of attack, control surface deflection and thrust.

Return type

np.array

Trim
class sharpy.solvers.trim.Trim[source]

Trim routine with support for lateral dynamics. It usually struggles much more than the StaticTrim (only longitudinal) solver.

We advise to start with StaticTrim even if you configuration is not totally symmetric.

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

print_info

bool

Print info to screen

True

solver

str

Solver to run in trim routine

solver_settings

dict

Solver settings dictionary

{}

max_iter

int

Maximum number of iterations of trim routine

100

tolerance

float

Threshold for convergence of trim

0.0001

initial_alpha

float

Initial angle of attack

0.0

initial_beta

float

Initial sideslip angle

0.0

initial_roll

float

Initial roll angle

0

cs_indices

list(int)

Indices of control surfaces to be trimmed

[]

initial_cs_deflection

list(float)

Initial deflection of the control surfaces in order.

[]

thrust_nodes

list(int)

Nodes at which thrust is applied

[0]

initial_thrust

list(float)

Initial thrust setting

[1.0]

thrust_direction

list(float)

Thrust direction setting

[0.0, 1.0, 0.0]

special_case

dict

Extra settings for specific cases such as differential thrust control

{}

refine_solution

bool

If True and the optimiser routine allows for it, the optimiser will try to improve the solution with hybrid methods

False

Linear Solvers

LinearAssembler
class sharpy.solvers.linearassembler.LinearAssembler[source]

Warning

Under development - please advise of new features and bugs!

Creates a workspace containing the different linear elements of the state-space.

The user specifies which elements to build sequentially via the linear_system setting.

The most common uses will be:

  • Aerodynamic: sharpy.linear.assembler.LinearUVLM solver

  • Structural: sharpy.linear.assembler.LinearBeam solver

  • Aeroelastic: sharpy.linear.assembler.LinearAeroelastic solver

The solver enables to load a user specific assembly of a state-space by means of the LinearCustom block.

See sharpy.sharpy.linear.assembler.LinearAssembler for a detailed description of each of the state-space assemblies.

Upon assembly of the linear system, the data structure data.linear will be created. The Linear contains the state-space as an attribute. This state space will be the one employed by postprocessors.

Important: running the linear routines requires information on the tangent mass, stiffness and gyroscopic structural matrices therefore the solver solvers.modal.Modal must have been run prior to linearisation. In addition, if the problem includes rigid body velocities, at least one timestep of solvers.DynamicCoupled must have run such that the rigid body velocity is included.

Example:

The typical flow setting used prior to using this solver for an aeroelastic simulation with rigid body dynamics will be similar to:

>>> flow = ['BeamLoader',
>>>        'AerogridLoader',
>>>        'StaticTrim',
>>>        'DynamicCoupled',  # a single time step will suffice
>>>        'Modal',
>>>        'LinearAssembler']

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

Options

linear_system

str

Name of chosen state space assembly type

None

linear_system_settings

dict

Settings for the desired state space assembler

{}

linearisation_tstep

int

Chosen linearisation time step number from available time steps

-1

modal_tstep

int

Timestep in which modal information is stored. Useful if the Modal solver is run at the start of the SHARPy flow.

-1

inout_coordinates

str

Input/output coordinates of the system. Nodal or modal space.

``, ``nodes, modes

retain_inputs

list(int)

List of input channels to retain in the chosen inout_coordinates.

[]

retain_outputs

list(int)

List of output channels to retain in the chosen inout_coordinates.

[]

Loader Solvers

PreSharpy
AerogridLoader
class sharpy.solvers.aerogridloader.AerogridLoader[source]

AerogridLoader class, inherited from BaseSolver

Generates aerodynamic grid based on the input data

The initial wake shape is now defined in SHARPy (instead of UVLM) through a wake shape generator wake_shape_generator and the required inputs wake_shape_generator_input. The supported wake generators are sharpy.generators.straightwake.StraighWake and sharpy.generators.helicoidalwake.HelicoidalWake.

The control_surface_deflection setting allows the user to use a time specific control surface deflection, should the problem include them. This setting takes a list of strings, each for the required control surface generator.

The control_surface_deflection_generator_settings setting is a list of dictionaries, one for each control surface. The dictionaries specify the settings for the generator DynamicControlSurface. If the relevant control surface is simply static, an empty string should be parsed. See the documentation for DynamicControlSurface generators for accepted key-value pairs as settings.

Parameters

data (PreSharpy) – ProblemData class structure

settings

Name-value pair of the settings employed by the aerodynamic solver

Type

dict

settings_types

Acceptable types for the values in settings

Type

dict

settings_default

Name-value pair of default values for the aerodynamic settings

Type

dict

data

class structure

Type

ProblemData

aero_file_name

name of the .aero.h5 HDF5 file

Type

str

aero

empty attribute

aero_data_dict

key-value pairs of aerodynamic data

Type

dict

wake_shape_generator

Wake shape generator

Type

class

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

Options

unsteady

bool

Unsteady effects

False

aligned_grid

bool

Align grid

True

freestream_dir

list(float)

Free stream flow direction

[1.0, 0.0, 0.0]

mstar

int

Number of chordwise wake panels

10

control_surface_deflection

list(str)

List of control surface generators for each control surface

[]

control_surface_deflection_generator_settings

dict

List of dictionaries with the settings for each generator

{}

wake_shape_generator

str

ID of the generator to define the initial wake shape

StraightWake

StraightWake, HelicoidalWake

wake_shape_generator_input

dict

Dictionary of inputs needed by the wake shape generator

{}

BeamLoader
class sharpy.solvers.beamloader.BeamLoader[source]

BeamLoader class solver inherited from BaseSolver

Loads the structural beam solver with the specified user settings.

Parameters

data (ProblemData) – class containing the problem information

settings

contains the specific settings for the solver

Type

dict

settings_types

Key value pairs of the accepted types for the settings values

Type

dict

settings_default

Dictionary containing the default solver settings, should none be provided.

Type

dict

data

class containing the data for the problem

Type

ProblemData

fem_file_name

name of the .fem.h5 HDF5 file

Type

str

dyn_file_name

name of the .dyn.h5 HDF5 file

Type

str

fem_data_dict

key-value pairs of FEM data

Type

dict

dyn_data_dict

key-value pairs of data for dynamic problems

Type

dict

structure

Empty attribute

Type

None

Notes

For further reference on Quaternions see: https://en.wikipedia.org/wiki/Quaternion

See also

class sharpy.utils.solver_interface.BaseSolver
class sharpy.structure.models.beam.Beam

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

unsteady

bool

If True it will be a dynamic problem and the solver will look for the .dyn.h5 file that contains the time varying input to the problem.

True

orientation

list(float)

Initial attitude of the structure given as the quaternion that parametrises the rotation from G to A frames of reference.

[1.0, 0, 0, 0]

for_pos

list(float)

Initial position of the A FoR.

[0.0, 0, 0]

Structural Solvers

NonLinearDynamic
class sharpy.solvers.nonlineardynamic.NonLinearDynamic[source]

Structural solver used for the dynamic simulation of free-flying structures.

This solver provides an interface to the structural library (xbeam) and updates the structural parameters for every time step of the simulation.

This solver is called as part of a standalone structural simulation.

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

print_info

bool

Print output to screen

True

max_iterations

int

Sets maximum number of iterations

100

num_load_steps

int

1

delta_curved

float

0.01

min_delta

float

Structural solver tolerance

1e-05

newmark_damp

float

Sets the Newmark damping coefficient

0.0001

gravity_on

bool

Flag to include gravitational forces

False

gravity

float

Gravitational acceleration

9.81

gravity_dir

list(float)

Direction in G where gravity applies

[0, 0, 1]

relaxation_factor

float

0.3

dt

float

Time step increment

0.01

num_steps

int

500

prescribed_motion

bool

None

NonLinearDynamicCoupledStep
class sharpy.solvers.nonlineardynamiccoupledstep.NonLinearDynamicCoupledStep[source]

Structural solver used for the dynamic simulation of free-flying structures.

This solver provides an interface to the structural library (xbeam) and updates the structural parameters for every k-th step in the FSI iteration.

This solver can be called as part of a standalone structural simulation or as the structural solver of a coupled aeroelastic simulation.

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

print_info

bool

Print output to screen

True

max_iterations

int

Sets maximum number of iterations

100

num_load_steps

int

1

delta_curved

float

0.01

min_delta

float

Structural solver tolerance

1e-05

newmark_damp

float

Sets the Newmark damping coefficient

0.0001

gravity_on

bool

Flag to include gravitational forces

False

gravity

float

Gravitational acceleration

9.81

gravity_dir

list(float)

Direction in G where gravity applies

[0.0, 0.0, 1.0]

relaxation_factor

float

0.3

dt

float

Time step increment

0.01

num_steps

int

500

balancing

bool

False

initial_velocity_direction

list(float)

Initial velocity of the reference node given in the inertial FOR

[-1.0, 0.0, 0.0]

initial_velocity

float

Initial velocity magnitude of the reference node

0

NonLinearDynamicMultibody
class sharpy.solvers.nonlineardynamicmultibody.NonLinearDynamicMultibody[source]

Nonlinear dynamic multibody

Nonlinear dynamic step solver for multibody structures.

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

print_info

bool

Print output to screen

True

max_iterations

int

Sets maximum number of iterations

100

num_load_steps

int

1

delta_curved

float

0.01

min_delta

float

Structural solver tolerance

1e-05

newmark_damp

float

Sets the Newmark damping coefficient

0.0001

gravity_on

bool

Flag to include gravitational forces

False

gravity

float

Gravitational acceleration

9.81

gravity_dir

list(float)

Direction in G where gravity applies

[0.0, 0.0, 1.0]

relaxation_factor

float

0.3

dt

float

Time step increment

0.01

num_steps

int

500

time_integrator

str

Method to perform time integration

NewmarkBeta

time_integrator_settings

dict

Settings for the time integrator

{}

write_lm

bool

Write lagrange multipliers

False

relax_factor_lm

float

Relaxation factor for Lagrange Multipliers. 0 no relaxation. 1 full relaxation

0.0

assembly_MB_eq_system(MB_beam, MB_tstep, ts, dt, Lambda, Lambda_dot, MBdict)[source]

This function generates the matrix and vector associated to the linear system to solve a structural iteration It usses a Newmark-beta scheme for time integration. Being M, C and K the mass, damping and stiffness matrices of the system:

\[MB_Asys = MB_K + MB_C\]

rac{gamma}{eta dt} + rac{1}{eta dt^2} MB_M

Args:

MB_beam (list(Beam)): each entry represents a body MB_tstep (list(StructTimeStepInfo)): each entry represents a body ts (int): Time step number dt(int): time step Lambda (np.ndarray): Lagrange Multipliers array Lambda_dot (np.ndarray): Time derivarive of Lambda MBdict (dict): Dictionary including the multibody information

Returns:

MB_Asys (np.ndarray): Matrix of the systems of equations MB_Q (np.ndarray): Vector of the systems of equations

compute_forces_constraints(MB_beam, MB_tstep, ts, dt, Lambda, Lambda_dot)[source]

This function computes the forces generated at Lagrange Constraints

Parameters
  • MB_beam (list(Beam)) – each entry represents a body

  • MB_tstep (list(StructTimeStepInfo)) – each entry represents a body

  • ts (int) – Time step number

  • dt (float) – Time step increment

  • Lambda (np.ndarray) – Lagrange Multipliers array

  • Lambda_dot (np.ndarray) – Time derivarive of Lambda

Warning

This function is underdevelopment and not fully functional

define_sys_size()[source]

This function defines the number of degrees of freedom in a multibody systems

Each body contributes with num_dof degrees of freedom and 10 more if the associated local FoR can move or has Lagrange Constraints associated

integrate_position(MB_beam, MB_tstep, dt)[source]

This function integrates the position of each local A FoR after the structural iteration has been solved.

It uses a Newmark-beta approximation.

Parameters
  • MB_beam (list(Beam)) – each entry represents a body

  • MB_tstep (list(StructTimeStepInfo)) – each entry represents a body

  • dt (int) – time step

NonLinearDynamicPrescribedStep
class sharpy.solvers.nonlineardynamicprescribedstep.NonLinearDynamicPrescribedStep[source]

Structural solver used for the dynamic simulation of clamped structures or those subject to a prescribed motion.

This solver provides an interface to the structural library (xbeam) and updates the structural parameters for every k-th step in the FSI iteration.

This solver can be called as part of a standalone structural simulation or as the structural solver of a coupled aeroelastic simulation.

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

print_info

bool

Print output to screen

True

max_iterations

int

Sets maximum number of iterations

100

num_load_steps

int

1

delta_curved

float

0.01

min_delta

float

Structural solver tolerance

1e-05

newmark_damp

float

Sets the Newmark damping coefficient

0.0001

gravity_on

bool

Flag to include gravitational forces

False

gravity

float

Gravitational acceleration

9.81

gravity_dir

list(float)

Direction in G where gravity applies

[0.0, 0.0, 1.0]

relaxation_factor

float

0.3

dt

float

Time step increment

0.01

num_steps

int

500

NonLinearStatic
class sharpy.solvers.nonlinearstatic.NonLinearStatic[source]

Structural solver used for the static simulation of free-flying structures.

This solver provides an interface to the structural library (xbeam) and updates the structural parameters for every k-th step of the FSI iteration.

This solver can be called as part of a standalone structural simulation or as the structural solver of a coupled static aeroelastic simulation.

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

print_info

bool

Print output to screen

True

max_iterations

int

Sets maximum number of iterations

100

num_load_steps

int

1

delta_curved

float

0.01

min_delta

float

Structural solver tolerance

1e-05

newmark_damp

float

Sets the Newmark damping coefficient

0.0001

gravity_on

bool

Flag to include gravitational forces

False

gravity

float

Gravitational acceleration

9.81

gravity_dir

list(float)

Direction in G where gravity applies

[0.0, 0.0, 1.0]

relaxation_factor

float

0.3

dt

float

Time step increment

0.01

num_steps

int

500

initial_position

list(float)

numpy.array

RigidDynamicCoupledStep
class sharpy.solvers.rigiddynamiccoupledstep.RigidDynamicCoupledStep[source]

Structural solver used for the dynamic simulation of free-flying rigid structures.

This solver provides an interface to the structural library (xbeam) and updates the structural parameters for every k-th step in the FSI iteration.

This solver can be called as part of a standalone structural simulation or as the structural solver of a coupled aeroelastic simulation.

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

print_info

bool

Print output to screen

True

max_iterations

int

Sets maximum number of iterations

100

num_load_steps

int

1

delta_curved

float

0.01

min_delta

float

Structural solver tolerance

1e-05

newmark_damp

float

Sets the Newmark damping coefficient

0.0001

gravity_on

bool

Flag to include gravitational forces

False

gravity

float

Gravitational acceleration

9.81

gravity_dir

list(float)

Direction in G where gravity applies

[0.0, 0.0, 1.0]

relaxation_factor

float

0.3

dt

float

Time step increment

0.01

num_steps

int

500

balancing

bool

False

RigidDynamicPrescribedStep
class sharpy.solvers.rigiddynamicprescribedstep.RigidDynamicPrescribedStep[source]

@modified Alfonso del Carre

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

print_info

bool

Print output to screen

True

max_iterations

int

Sets maximum number of iterations

100

num_load_steps

int

1

delta_curved

float

0.01

min_delta

float

Structural solver tolerance

1e-05

newmark_damp

float

Sets the Newmark damping coefficient

0.0001

gravity_on

bool

Flag to include gravitational forces

False

gravity

float

Gravitational acceleration

9.81

gravity_dir

list(float)

Direction in G where gravity applies

[0.0, 0.0, 1.0]

relaxation_factor

float

0.3

dt

float

Time step of simulation

0.01

num_steps

int

Number of timesteps to be run

500

Time_integrator Solvers

NewmarkBeta
GeneralisedAlpha

Post-Processing

AeroForcesCalculator

AerogridPlot

AsymptoticStability

BeamLoads

BeamPlot

class sharpy.postproc.beamplot.BeamPlot[source]

Plots beam to Paraview format

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

include_rbm

bool

Include frame of reference rigid body motion

True

include_FoR

bool

Include frame of reference variables

False

include_applied_forces

bool

Write beam applied forces

True

include_applied_moments

bool

Write beam applied moments

True

name_prefix

str

Name prefix for files

output_rbm

bool

Write csv file with rigid body motion data

True

Cleanup

FrequencyResponse

LiftDistribution

class sharpy.postproc.liftdistribution.LiftDistribution[source]

Calculates and exports the lift distribution on lifting surfaces

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

text_file_name

str

Text file name

lift_distribution.csv

coefficients

bool

Calculate aerodynamic lift coefficients

True

rho

float

Reference freestream density [kg/m³]

1.225

PickleData

PlotFlowField

class sharpy.postproc.plotflowfield.PlotFlowField[source]

Plots the flow field in Paraview and computes the velocity at a set of points in a grid.

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

Options

postproc_grid_generator

str

Generator used to create grid and plot flow field

GridBox

GridBox

postproc_grid_input

dict

Dictionary containing settings for postproc_grid_generator.

{}

velocity_field_generator

str

Chosen velocity field generator

SteadyVelocityField

velocity_field_input

dict

Dictionary containing settings for the selected velocity_field_generator.

{}

dt

float

Time step.

0.1

include_external

bool

Include external velocities.

True

include_induced

bool

Include induced velocities.

True

stride

int

Number of time steps between plots.

1

num_cores

int

Number of cores to use.

1

vortex_radius

float

Distance below which inductions are not computed.

sharpy.utils.constants.vortex_radius_def

SaveData

SaveParametricCase

StallCheck

UDPout

WriteVariablesTime

SHARPy Source Code

The core SHARPy documentation is found herein.

Note

The docs are still a work in progress and therefore, most functions/classes with which there is not much user interaction are not fully documented. We would appreciate any help by means of you contributing to our growing documentation!

If you feel that a function/class is not well documented and, hence, you cannot use it, feel free to raise an issue so that we can improve it.

Aerodynamic Packages

Models
Aerogrid

Aerogrid contains all the necessary routines to generate an aerodynamic grid based on the input dictionaries.

AeroTimeStepInfo
class sharpy.aero.models.aerogrid.AeroTimeStepInfo(dimensions, dimensions_star)[source]

Aerodynamic Time step class.

Contains the relevant aerodynamic attributes for a single time step. All variables should be expressed in G FoR unless otherwise stated.

ct_dimensions

Pointer to dimensions to interface the C++ library uvlmlib`

ct_dimensions_star

Pointer to dimensions_star to interface the C++ library uvlmlib`

dimensions

Matrix defining the dimensions of the vortex grid on solid surfaces [num_surf x chordwise panels x spanwise panels]

Type

np.ndarray

dimensions_star

Matrix defining the dimensions of the vortex grid on wakes [num_surf x streamwise panels x spanwise panels]

Type

np.ndarray

n_surf

Number of aerodynamic surfaces on solid bodies. Each aerodynamic surface on solid bodies will have an associted wake.

Type

int

zeta

Location of solid grid vertices [n_surf][3 x (chordwise nodes + 1) x (spanwise nodes + 1)]

Type

list(np.ndarray

zeta_dot

Time derivative of zeta

Type

list(np.ndarray)

normals

Normal direction to panels at the panel center [n_surf][3 x chordwise nodes x spanwise nodes]

Type

list(np.ndarray)

forces

Forces not associated to time derivatives on grid vertices [n_surf][3 x (chordwise nodes + 1) x (spanwise nodes + 1)]

Type

list(np.ndarray)

dynamic_forces

Forces associated to time derivatives on grid vertices [n_surf][3 x (chordwise nodes + 1) x (spanwise nodes + 1)]

Type

list(np.ndarray)

zeta_star

Location of wake grid vertices [n_surf][3 x (streamwise nodes + 1) x (spanwise nodes + 1)]

Type

list(np.ndarray

u_ext

Background flow velocity on solid grid nodes [n_surf][3 x (chordwise nodes + 1) x (spanwise nodes + 1)]

Type

list(np.ndarray)

u_ext_star

Background flow velocity on wake grid nodes [n_surf][3 x (streamwise nodes + 1) x (spanwise nodes + 1)]

Type

list(np.ndarray)

gamma

Circulation associated to solid panels [n_surf][3 x chordwise nodes x spanwise nodes]

Type

list(np.ndarray)

gamma_star

Circulation associated to wake panels [n_surf][3 x streamwise nodes x spanwise nodes]

Type

list(np.ndarray)

gamma_dot

Time derivative of gamma

Type

list(np.ndarray)

inertial_steady_forces

Total aerodynamic steady forces in G FoR [n_surf x 6]

Type

list(np.ndarray)

body_steady_forces

Total aerodynamic steady forces in A FoR [n_surf x 6]

Type

list(np.ndarray)

inertial_unsteady_forces

Total aerodynamic unsteady forces in G FoR [n_surf x 6]

Type

list(np.ndarray)

body_unsteady_forces

Total aerodynamic unsteady forces in A FoR [n_surf x 6]

Type

list(np.ndarray)

postproc_cell

Variables associated to cells to be postprocessed

Type

dict

postproc_node

Variables associated to nodes to be postprocessed

Type

dict

in_global_AFoR

True if the variables are stored in the global A FoR. False if they are stored in the local A FoR of each body. Always True for single-body simulations. Currently not used.

Type

bool

control_surface_deflection

Deflection of the control surfaces, in rad and if fitted.

Type

np.ndarray

Parameters
  • dimensions (np.ndarray) – Matrix defining the dimensions of the vortex grid on solid surfaces [num_surf x chordwise panels x spanwise panels]

  • dimensions_star (np.ndarray) – Matrix defining the dimensions of the vortex grid on wakes [num_surf x streamwise panels x spanwise panels]

copy()[source]

Returns a copy of a deepcopy of a AeroTimeStepInfo

generate_ctypes_pointers()[source]

Generates the pointers to aerodynamic variables used to interface the C++ library uvlmlib

remove_ctypes_pointers()[source]

Removes the pointers to aerodynamic variables used to interface the C++ library uvlmlib

Aerogrid
class sharpy.aero.models.aerogrid.Aerogrid[source]

Aerogrid is the main object containing information of the grid of panels

It is created by the solver sharpy.solvers.aerogridloader.AerogridLoader

static compute_gamma_dot(dt, tstep, previous_tsteps)[source]

Computes the temporal derivative of circulation (gamma) using finite differences.

It will use a first order approximation for the first evaluation (when len(previous_tsteps) == 1), and then second order ones.

\[\left.\frac{d\Gamma}{dt}\right|^n \approx \lim_{\Delta t \rightarrow 0}\frac{\Gamma^n-\Gamma^{n-1}}{\Delta t}\]

For the second time step and onwards, the following second order approximation is used:

\[\left.\frac{d\Gamma}{dt}\right|^n \approx \lim_{\Delta t \rightarrow 0}\frac{3\Gamma^n -4\Gamma^{n-1}+\Gamma^{n-2}}{2\Delta t}\]
Parameters
  • dt (float) – delta time for the finite differences

  • tstep (AeroTimeStepInfo) – tstep at time n (current)

  • previous_tsteps (list(AeroTimeStepInfo)) – previous tstep structure in order: [n-N,..., n-2, n-1]

Returns

first derivative of circulation with respect to time

Return type

float

See also

class sharpy.utils.datastructures.AeroTimeStepInfo
generate_strip

Returns a strip of panels in A frame of reference, it has to be then rotated to simulate angles of attack, etc

Aerodynamic Utilities
Polar
class sharpy.aero.utils.airfoilpolars.Polar[source]

Airfoil polar object

initialise(table)[source]

Initialise polar

Parameters

table (np.ndarray) – 4-column array containing aoa (rad), cl, cd and cm

Force Mapping Utilities
aero2struct_force_mapping

Maps the aerodynamic forces at the lattice to the structural nodes

The aerodynamic forces from the UVLM are always in the inertial G frame of reference and have to be transformed to the body or local B frame of reference in which the structural forces are defined.

Since the structural nodes and aerodynamic panels are coincident in a spanwise direction, the aerodynamic forces that correspond to a structural node are the summation of the M+1 forces defined at the lattice at that spanwise location.

\[\begin{split}\mathbf{f}_{struct}^B &= \sum\limits_{i=0}^{m+1}C^{BG}\mathbf{f}_{i,aero}^G \\ \mathbf{m}_{struct}^B &= \sum\limits_{i=0}^{m+1}C^{BG}(\mathbf{m}_{i,aero}^G + \tilde{\boldsymbol{\zeta}}^G\mathbf{f}_{i, aero}^G)\end{split}\]

where \(\tilde{\boldsymbol{\zeta}}^G\) is the skew-symmetric matrix of the vector between the lattice grid vertex and the structural node.

param aero_forces

Aerodynamic forces from the UVLM in inertial frame of reference

type aero_forces

list

param struct2aero_mapping

Structural to aerodynamic node mapping

type struct2aero_mapping

dict

param zeta

Aerodynamic grid coordinates

type zeta

list

param pos_def

Vector of structural node displacements

type pos_def

np.ndarray

param psi_def

Vector of structural node rotations (CRVs)

type psi_def

np.ndarray

param master

Unused

param conn

Connectivities matrix

type conn

np.ndarray

param cag

Transformation matrix between inertial and body-attached reference A

type cag

np.ndarray

param aero_dict

Dictionary containing the grid’s information.

type aero_dict

dict

returns

structural forces in an n_node x 6 vector

rtype

np.ndarray

total_forces_moments

Performs a summation of the forces and moments expressed at the structural nodes in the A frame of reference.

Note

If you need to transform forces and moments at the nodes from B to A, use the nodal_b_for_2_a_for() function.

param forces_nodes_a

n_node x 6 vector of forces and moments at the nodes in A

type forces_nodes_a

np.array

param pos_def

n_node x 3 vector of nodal positions in A

type pos_def

np.array

param ref_pos

Location in A about which to compute moments. Defaults to [0, 0, 0]

type ref_pos

np.array (optional)

returns

Vector of length 6 containing the total forces and moments expressed in A at the desired location.

rtype

np.array

Controllers

ControlSurfacePidController
class sharpy.controllers.controlsurfacepidcontroller.ControlSurfacePidController[source]

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

time_history_input_file

str

Route and file name of the time history of desired state

None

P

float

Proportional gain of the controller

None

I

float

Integral gain of the controller

0.0

D

float

Differential gain of the controller

0.0

input_type

str

Quantity used to define the reference state. Supported: pitch

None

dt

float

Time step of the simulation

None

controlled_surfaces

list(int)

Control surface indices to be actuated by this controller

None

controlled_surfaces_coeff

list(float)

Control surface deflection coefficients. For example, for antisymmetric deflections => [1, -1].

[1.0]

write_controller_log

bool

Write a time history of input, required input, and control

True

controller_log_route

str

Directory where the log will be stored

./output/

control(data, controlled_state)[source]

Main routine of the controller. Input is data (the self.data in the solver), and currrent_state which is a dictionary with [‘structural’, ‘aero’] time steps for the current iteration.

Parameters
  • data – problem data containing all the information.

  • controlled_statedict with two vars: structural and aero containing the timestep_info that will be returned with the control variables.

Returns

A dict with structural and aero time steps and control input included.

TakeOffTrajectoryController
class sharpy.controllers.takeofftrajectorycontroller.TakeOffTrajectoryController[source]

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

trajectory_input_file

str

Route and file name of the trajectory file given as a csv with columns: time, x, y, z

None

dt

float

Time step of the simulation

None

trajectory_method

str

Trajectory controller method. For now, “lagrange” is the supported option

lagrange

controlled_constraint

str

Name of the controlled constraint in the multibody context Usually, it is something like constraint_00.

None

controller_log_route

str

Directory where the log will be stored

./output/

write_controller_log

bool

Controls if the log from the controller is written or not.

True

free_trajectory_structural_solver

str

If different than and empty string, the structural solver will be changed after the end of the trajectory has been reached

free_trajectory_structural_substeps

int

Controls the structural solver structural substeps once the end of the trajectory has been reached

0

initial_ramp_length_structural_substeps

int

Controls the number of timesteps that are used to increase the structural substeps from 0

10

control(data, controlled_state)[source]

Main routine of the controller. Input is data (the self.data in the solver), and currrent_state which is a dictionary with [‘structural’, ‘aero’] time steps for the current iteration.

Parameters
  • data – problem data containing all the information.

  • controlled_statedict with two vars: structural and aero containing the timestep_info that will be returned with the control variables.

Returns

A dict with structural and aero time steps and control input included.

process_trajectory(dxdt=True)[source]

See https://docs.scipy.org/doc/scipy-0.15.1/reference/generated/scipy.interpolate.UnivariateSpline.html

Generators

Velocity field generators prescribe the flow conditions for your problem. For instance, you can have an aircraft at a prescribed fixed location in a velocity field towards the aircraft. Alternatively, you can have a free moving aircraft in a static velocity field.

Dynamic Control Surface generators enable the user to prescribe a certain control surface deflection in time.

BumpVelocityField
DynamicControlSurface
class sharpy.generators.dynamiccontrolsurface.DynamicControlSurface[source]

Dynamic Control Surface deflection Generator

The object generates a deflection in radians based on the time series given as a single vector in the input data. A first order finite-differences scheme is used to calculate the deflection rate based on the provided time step increment.

To call this generator, the generator_id = DynamicControlSurface key shall be used for the setting control_surface_deflection in the AerogridLoader solver.

One instance of this generator will be created for each control surface, thus, a group of settings should be defined for each control surface (cs0_settings, cs1_settings … in the example below). All of these groups of settings should be collected as values in a dictionary which keys are the associated control surface number in string format. This dictionary should be parsed to the variable

control_surface_deflection_generator_settings in AerogridLoader. This is shown better in the example below:

Examples:

Attributes:

deflection (np.array): Array of deflection of the control surface deflection_dot (np.array): Array of the time derivative of the cs deflection. Calculated using 1st order finite differences.

This generator takes the following inputs:

Name

Type

Description

Default

dt

float

Time step increment

None

deflection_file

str

Path to the file with the deflection information

None

FloatingForces
change_of_to_sharpy
compute_equiv_hd_added_mass
compute_jacobian
compute_xf_zf
jonswap_spectrum
matrix_from_rf
noise_freq_1s
quasisteady_mooring
rename_terms
response_freq_dep_matrix
rfval
time_wave_forces
wave_radiation_damping
GridBox
Gust Velocity Field Generators

These generators are used to create a gust velocity field. GustVelocityField is the main class that should be parsed as the velocity_field_input to the desired aerodynamic solver.

The remaining classes are the specific gust profiles and parsed as gust_shape.

Examples:

The typical input to the aerodynamic solver settings would therefore read similar to:

>>> aero_settings = {'<some_aero_settings>': '<some_aero_settings>',
>>>                  'velocity_field_generator': 'GustVelocityField',
>>>                  'velocity_field_input': {'u_inf': 1,
>>>                                           'gust_shape': '<desired_gust>',
>>>                                           'gust_parameters': '<gust_settings>'}}
DARPA
GustVelocityField
continuous_sin
lateral_one_minus_cos
one_minus_cos
span_sine
time_varying
time_varying_global
HelicoidalWake
class sharpy.generators.helicoidalwake.HelicoidalWake[source]

Helicoidal wake shape generator

HelicoidalWake class inherited from BaseGenerator

The object creates a helicoidal wake shedding from the trailing edge based on the time step dt, the incoming velocity magnitude u_inf, direction u_inf_direction, the rotation velocity rotation_velocity and the shear parameters

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

u_inf

float

Free stream velocity magnitude

None

u_inf_direction

list(float)

x, y and z relative components of the free stream velocity

None

dt

float

Time step

None

dphi1

float

Size of the first wake panel in radians

-1.0

ndphi1

int

Number of panels with size dphi1

1

r

float

Growth rate after ndphi1 panels

1.0

dphimax

float

Maximum panel size in radians

-1.0

shear_direction

list(float)

x, y and z relative components of the direction along which shear applies

numpy.array

shear_exp

float

Exponent of the shear law

0.0

h_ref

float

Reference height at which u_inf is defined

1.0

h_corr

float

Height to correct the shear law

1.0

rotation_velocity

list(float)

Rotation velocity

None

ChangeLumpedMass
ChangedVariable
LumpedMassControl
ModifyStructure
EfficiencyCorrection
class sharpy.generators.polaraeroforces.EfficiencyCorrection[source]

The efficiency and constant terms are introduced by means of the array airfoil_efficiency in the aero.h5

\[\mathbf{f}_{struct}^B &=\]

arepsilon^f_0 mathbf{f}_{i,struct}^B + arepsilon^f_1

mathbf{m}_{struct}^B &=

arepsilon^m_0 mathbf{m}_{i,struct}^B + arepsilon^m_1

Notice that the moment correction is applied on top of the force correction. As a consequence, the aerodynamic moments generated by the forces on the vertices are corrected sequentially by both efficiencies.

See Also:

The SHARPy case files documentation for a detailed overview on how to include the airfoil efficiencies.

Returns:

np.ndarray: corresponding aerodynamic force at the structural node from the force and moment at a grid vertex

generate(**params)[source]
Keyword Arguments
Returns

New corrected structural forces

Return type

np.array

PolarCorrection
class sharpy.generators.polaraeroforces.PolarCorrection[source]

This generator corrects the aerodynamic forces from UVLM based on the airfoil polars provided by the user in the aero.h5 file. Polars are entered for each airfoil, in a table comprising AoA (rad), CL, CD, CM.

This generator_id = 'PolarCorrection' and can be used in the coupled solvers through the correct_forces_method setting as:

These are the steps needed to correct the forces:

  1. The force coming from UVLM is divided into induced drag (parallel to the incoming flow velocity) and lift

(the remaining force).

If cd_from_cl == 'on'.
  1. The viscous drag and pitching moment are found at the computed lift coefficient. Then forces and moments are updated

Else, the angle of attack is computed:

  1. The angle of attack is computed based on that lift force and the angle of zero lift computed from the airfoil polar and assuming the potential flow lift curve slope of \(2 \pi\)

  1. The drag force is computed based on the angle of attack and the polars provided by the user

  2. If correct_lift == 'on', the lift coefficient is also corrected with the polar data. Else, only the UVLM results are used.

The pitching moment is added in a similar manner as the viscous drag. However, if moment_from_polar == 'on' and correct_lift == 'on', the total moment (the one used for the FSI) is computed just from polar data, overriding any moment computed in SHARPy. That is, the moment will include the polar pitching moment, and moments due to lift and drag computed from the polar data.

This generator takes in the following settings.

Name

Type

Description

Default

correct_lift

bool

Correct lift according to the polars

False

cd_from_cl

bool

Interpolate the C_D for the given C_L, as opposed to getting the C_D from the section AoA.

False

moment_from_polar

bool

If correct_lift is selected, it will compute the pitching moment simply from polar derived data, i.e. the polars Cm and the momentsarising from the lift and drag (derived from the polar) contribution. Else, it will add the polar Cm to the moment already computed by SHARPy.

False

generate(**params)[source]
Keyword Arguments
Returns

New corrected structural forces

Return type

np.array

get_aoacl0_from_camber

This section provies the angle of attach of zero lift for a thin airfoil which camber line is defined by ‘x’ and ‘y’ coordinates

Check Theory of wing sections. Abbott. pg 69

local_stability_axes

Rotates the body axes onto stability axes. This rotation is equivalent to the projection of a vector in S onto B.

The stability axes are defined as:

  • x_s: parallel to the free stream

  • z_s: perpendicular to the free stream and part of the plane formed by the local chord and the vertical body axis z_b.

  • y_s: completes the set

param dir_urel

Unit vector in the direction of the free stream velocity expressed in B frame.

type dir_urel

np.array

param dir_chord

Unit vector in the direction of the local chord expressed in B frame.

type dir_chord

np.array

returns

Rotation matrix from B to S, equivalent to the projection matrix \(C^{BS}\) that projects a vector from S onto B.

rtype

np.array

magnitude_and_direction_of_relative_velocity

Calculates the magnitude and direction of the relative velocity u_rel at a local section of the wing.

\[u_{rel, i}^G = \bar{U}_{\infty, i}^G - C^{GA}(\chi)(\dot{\eta}_i^A + v^A + \tilde{\omega}^A\eta_i^A\]

where \(\bar{U}_{\infty, i}^G\) is the average external velocity across all aerodynamic nodes at the relevant cross section.

param displacement

Unit vector in the direction of the free stream velocity expressed in A frame.

type displacement

np.array

param displacement_vel

Unit vector in the direction of the local chord expressed in A frame.

type displacement_vel

np.array

param for_vel

A frame of reference (FoR) velocity. Expressed in A FoR

type for_vel

np.array

param cga

Rotation vector from FoR G to FoR A

type cga

np.array

param uext

Background flow velocity on solid grid nodes

type uext

np.array

returns

u_rel, dir_u_rel expressed in the inertial, G frame.

rtype

tuple

span_chord

Retrieve the local span and local chord

param i_node_surf

Node index in aerodynamic surface

type i_node_surf

int

param zeta

Aerodynamic surface coordinates (3 x n_chord x m_span)

type zeta

np.array

returns

dir_span, span, dir_chord, chord

rtype

tuple

ShearVelocityField
class sharpy.generators.shearvelocityfield.ShearVelocityField[source]

Shear Velocity Field Generator

ShearVelocityField class inherited from BaseGenerator

The object creates a steady velocity field with shear

\[\hat{u} = \hat{u}\_\infty \left( \frac{h - h\_\mathrm{corr}}{h\_\mathrm{ref}} \right)^{\mathrm{shear}\_\mathrm{exp}}\]
\[h = \zeta \cdot \mathrm{shear}\_\mathrm{direction}\]

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

u_inf

float

Free stream velocity magnitude

None

u_inf_direction

list(float)

x, y and z relative components of the free stream velocity

numpy.array

shear_direction

list(float)

x, y and z relative components of the direction along which shear applies

numpy.array

shear_exp

float

Exponent of the shear law

0.0

h_ref

float

Reference height at which u_inf is defined

1.0

h_corr

float

Height to correct shear law

0.0

SteadyVelocityField
StraightWake
class sharpy.generators.straightwake.StraightWake[source]

Straight wake shape generator

This generator creates a straight wake shedding from the trailing edge based on the time step dt, the incoming velocity magnitude u_inf and direction u_inf_direction. It is to be used as wake_generator in

A wake where panels grow downstream is supported by using the settings dx1, ndx1, r and dxmax as described below. Note that the wake will always have m_star panels, as specified in AerogridLoader, thus these settings will modify the effective length of the wake. Once the maximum size of panel dxmax is achieved, all panels are size dxmax thereinafter until m_star panels are created.

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

u_inf

float

Free stream velocity magnitude

1.0

u_inf_direction

list(float)

x, y and z relative components of the free stream velocity

numpy.array

dt

float

Time step

0.1

dx1

float

Size of the first wake panel

-1.0

ndx1

int

Number of panels with size dx1

1

r

float

Growth rate after ndx1 panels

1.0

dxmax

float

Maximum panel size

-1.0

TrajectoryGenerator
TurbVelocityField
class sharpy.generators.turbvelocityfield.TurbVelocityField[source]

Turbulent Velocity Field Generator

TurbVelocitityField is a class inherited from BaseGenerator

The TurbVelocitityField class generates a velocity field based on the input from an [XDMF](http://www.xdmf.org) file. It supports time-dependant fields as well as frozen turbulence.

To call this generator, the generator_id = TurbVelocityField shall be used. This is parsed as the value for the velocity_field_generator key in the desired aerodynamic solver’s settings.

Supported files:
  • field_id.xdmf: Steady or Unsteady XDMF file

This generator also performs time interpolation between two different time steps. For now, only linear interpolation is possible.

Space interpolation is done through scipy.interpolate trilinear interpolation. However, turbulent fields are read directly from the binary file and not copied into memory. This is performed using np.memmap. The overhead of this procedure is ~18% for the interpolation stage, however, initially reading the binary velocity field (which will be much more common with time-domain simulations) is faster by a factor of 1e4. Also, memory savings are quite substantial: from 6Gb for a typical field to a handful of megabytes for the whole program.

Parameters

in_dict (dict) – Input data in the form of dictionary. See acceptable entries below:

Attributes:

See also

class sharpy.utils.generator_interface.BaseGenerator

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

print_info

bool

Output solver-specific information in runtime.

True

turbulent_field

str

XDMF file path of the velocity field

None

offset

list(float)

Spatial offset in the 3 dimensions

numpy.zeros

centre_y

bool

Flat for changing the domain to [-y_max/2, y_max/2]

True

periodicity

str

Axes in which periodicity is enforced

xy

frozen

bool

If True, the turbulent field will not be updated in time

True

store_field

bool

If True, the xdmf snapshots are stored in memory. Only two at a time for the linear interpolation

False

read_btl(in_file)[source]

Legacy function, not using the custom format based on HDF5 anymore.

read_grid(i_grid, i_cache=0)[source]

This function returns an interpolator list of size 3 made of scipy.interpolate.RegularGridInterpolator objects.

read_xdmf(in_file)[source]

Reads the xml file <case_name>.xdmf. Writes the self.grid_data data structure with all the information necessary.

Note: this function does not load any turbulence data (such as ux000, …), it only reads the header information contained in the xdmf file.

TurbVelocityFieldBts

UDP Input/Output

This package contains the routines for the SHARPy input and output via UDP.

The main interface is performed through the NetworkLoader

SetOfVariables
class sharpy.io.inout_variables.SetOfVariables[source]

Iterable class containing the input and output variables

variables

List of Variable

Type

list(Variable)

encode()[source]

Encode output variables in binary format with little-endian byte ordering.

The signal consists of a 5-byte header RREF0 followed by 8 bytes per variable. Of those 8 bytes allocated to each variable, the first 4 are the integer value of the variable index and the last 4 are the single precision float value.

Returns

Encoded message of length 5 + num_var * 8.

Return type

bytes

get_value(data, timestep_index=- 1)[source]

Gets the value from the data structure for output variables

Parameters
  • data (sharpy.presharpy.PreSharpy) – the standard SHARPy class

  • timestep_index (int (optional)) – Integer representing the time step value. Defaults to -1 i.e. the last one available.

set_value(values)[source]

Sets the values of the input variables.

Parameters

values (list(tuple)) – List of tuples containing the index and value of the respective input variables.

InNetwork
class sharpy.io.network_interface.InNetwork[source]

Input Network socket settings

Note

If sending/receiving data across the net or LAN, make sure that your firewall has the desired ports open, otherwise the signals will not make it through.

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

address

str

Own network address.

127.0.0.1

port

int

Own port for input network

65001

Network
class sharpy.io.network_interface.Network(host=None, port=None)[source]

Network Adapter

Contains the basic methods. See InNetwork and OutNetwork for specific settings pertaining to the input and output sockets.

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

address

str

Own network address.

127.0.0.1

port

int

Own port.

65000

set_client_list(list_of_clients)[source]

Set a client list for network.

Parameters

list_of_clients (list) – List of tuples containing (HOST, PORT), where HOST is a string and port and integer.

set_selector_events_mask(mode)[source]

Set selector to listen for events: mode is ‘r’, ‘w’, or ‘rw’.

NetworkLoader
class sharpy.io.network_interface.NetworkLoader[source]

SHARPy UDP data input and output interface.

The settings of this interface are to be used as the dictionary to the setting network_setting in the DynamicCoupled solver, which is the only one that is currently supported.

This interface allows for SHARPy to receive and send simulation data over the network using an UDP protocol.

The setting variables_filename is a filename to a YAML file that contains a list of the input or output variables. The example below shows an acceptable input

---
- name: 'control_surface_deflection' # variable name. those in the timestep_info are supported
  var_type: 'control_surface'
  inout: 'in'  # either `in`, `out` or `inout`
  position: 0  # control surface index
- name: 'pos'  # variable name
  var_type: 'node'  # type of variable. In this case a node variable. Others: `panel`, `control_surface`
  inout: 'out'
  position: 5  # node number
  index: 2  # vector index, in this case a 3d vector where the desired index is number 2
- name: 'gamma'
  inout: 'out'
  position: [0, 1, 2] # [i_surf, i_chordwise, i_spanwise]
  var_type: 'panel'
- name: 'psi'  # CRV
  inout: 'out'
  var_type: 'node'
  position: 3  # node id
  index: 2  # dimension index
...

All variables in the aero and structural timestep info classes datastructures are supported, with the addition of dt for the time increment and nt for the current time step number.

Note

If using a control surface input, make sure this control surface is given control_surface_type = 2 in the the case .aero.h5 file. Otherwise, the control surface will not move!

The relevant settings for the input and output sockets can be found in InNetwork and OutNetwork, respectively.

If the setting send_output_to_all_clients is True, then the clients from which the input signal is received will also be added to the destination client address book.

The input and output messages follow the example set by X-Plane RREF0 protocol. Thus, a message consists of a 5-byte header containing RREF0 followed by 8-bytes per variable, where the first 4-bytes correspond to the variable number (as ordered in the YAML file) as an integer and the latter 4-bytes correspond to the value of the variable in single precision float. The byte ordering is specified by the user.

A specific network log is created to detail the ins and outs of the communication protocol. The level of messages that are shown can be set in the settings.

Note

The SHARPy input and output sockets do not time out.

Note

The first time step in a simulation with UDP inputs takes particularly long. Make sure your client has a sufficient time out time to avoid issues. After the first time step, the UDP should not delay the simulation.

Warning

There is a limitation, for the moment, on just one control surface being supported for UDP input.

The NetworkLoader takes the following settings:

Name

Type

Description

Default

variables_filename

str

Path to YAML file containing input/output variables

None

byte_ordering

str

Desired endianness byte ordering

little

input_network_settings

dict

Settings for the input network.:class:~sharpy.io.network_interface.InNetwork.

{}

output_network_settings

dict

Settings for the output network OutNetwork.

{}

send_output_to_all_clients

bool

Send output to all clients, including those from where the input is received.

False

received_data_filename

str

If not empty, writes received input data to the specified file.

log_name

str

Network log file name

./network_output.log

console_log_level

str

Minimum logging level in console.

info

file_log_level

str

Minimum logging level in log file.

debug

OutNetwork
class sharpy.io.network_interface.OutNetwork(host=None, port=None)[source]

Output network socket settings

If send_on_demand is True, SHARPy will only output data when it receives a request for it. The request message can be any message under 1024 bytes. SHARPy will reply to the socket that sent the request with the latest time step information. Otherwise, it will send data at the end of each time step to the specified destination clients.

If the NetworkLoader setting send_output_to_all_clients is True, then the clients from which the input signal is received will also be added to the destination client address book.

Note

If sending/receiving data across the net or LAN, make sure that your firewall has the desired ports open, otherwise the signals will not make it through.

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

address

str

Own network address.

127.0.0.1

port

int

Own port for output network

65000

send_on_demand

bool

Waits for a signal demanding the output data. Else, sends to destination buffer

True

destination_address

list(str)

List of addresses to send output data. If send_on_demand is False this is a required setting.

[]

destination_ports

list(int)

List of ports number for the destination addresses.

[]

Linear SHARPy

The code included herein enables the assembly of linearised state-space systems based on the previous solution of a nonlinear problem that will be used as linearisation reference.

The code is structured in the following way:

  • Assembler: different state-spaces to assemble, from only structural/aerodynamic to fully coupled aeroelastic

  • Src: source code required for the linearisation and utilities for the manipulation of state-space elements

References:

Maraniello, S. , Palacios, R.. State-Space Realizations and Internal Balancing in Potential-Flow Aerodynamics with Arbitrary Kinematics. AIAA Journal, Vol. 57, No.6, June 2019

Assembler
Control surface deflector for linear systems

Control surface deflector for linear systems

LinControlSurfaceDeflector
class sharpy.linear.assembler.lincontrolsurfacedeflector.LinControlSurfaceDeflector[source]

Subsystem that deflects control surfaces for use with linear state space systems

The current version supports only deflections. Future work will include standalone state-space systems to model physical actuators.

generate()[source]

Generates a matrix mapping a linear control surface deflection onto the aerodynamic grid.

This generates two matrices:

  • Kzeta_delta maps the deflection angle onto displacements. It has as many columns as independent control surfaces.

  • Kdzeta_ddelta maps the deflection rate onto grid velocities. Again, it has as many columns as independent control surfaces.

Returns

Tuple containing Kzeta_delta and Kdzeta_ddelta.

Return type

tuple

der_R_arbitrary_axis_times_v

Linearised rotation vector of the vector v by angle theta about an arbitrary axis u.

The rotation of a vector \(\mathbf{v}\) about the axis \(\mathbf{u}\) by an angle \(\boldsymbol{\theta}\) can be expressed as

\[\mathbf{w} = \mathbf{R}(\mathbf{u}, \theta) \mathbf{v},\]

where \(\mathbf{R}\) is a \(\mathbb{R}^{3\times 3}\) matrix.

This expression can be linearised for it to be included in the linear solver as

\[\delta\mathbf{w} = \frac{\partial}{\partial\theta}\left(\mathbf{R}(\mathbf{u}, \theta_0)\right)\delta\theta\]

The matrix \(\mathbf{R}\) is

\[\begin{split}\mathbf{R} = \begin{bmatrix}\cos \theta +u_{x}^{2}\left(1-\cos \theta \right) & u_{x}u_{y}\left(1-\cos \theta \right)-u_{z}\sin \theta & u_{x}u_{z}\left(1-\cos \theta \right)+u_{y}\sin \theta \\ u_{y}u_{x}\left(1-\cos \theta \right)+u_{z}\sin \theta & \cos \theta +u_{y}^{2}\left(1-\cos \theta \right)& u_{y}u_{z}\left(1-\cos \theta \right)-u_{x}\sin \theta \\ u_{z}u_{x}\left(1-\cos \theta \right)-u_{y}\sin \theta & u_{z}u_{y}\left(1-\cos \theta \right)+u_{x}\sin \theta & \cos \theta +u_{z}^{2}\left(1-\cos \theta \right)\end{bmatrix},\end{split}\]

and its linearised expression becomes

\[\begin{split}\frac{\partial}{\partial\theta}\left(\mathbf{R}(\mathbf{u}, \theta_0)\right) = \begin{bmatrix} -\sin \theta +u_{x}^{2}\sin \theta \mathbf{v}_1 + u_{x}u_{y}\sin \theta-u_{z} \cos \theta \mathbf{v}_2 + u_{x}u_{z}\sin \theta +u_{y}\cos \theta \mathbf{v}_3 \\ u_{y}u_{x}\sin \theta+u_{z}\cos \theta\mathbf{v}_1 -\sin \theta +u_{y}^{2}\sin \theta\mathbf{v}_2 + u_{y}u_{z}\sin \theta-u_{x}\cos \theta\mathbf{v}_3 \\ u_{z}u_{x}\sin \theta-u_{y}\cos \theta\mathbf{v}_1 + u_{z}u_{y}\sin \theta+u_{x}\cos \theta\mathbf{v}_2 -\sin \theta +u_{z}^{2}\sin\theta\mathbf{v}_3\end{bmatrix}_{\theta=\theta_0}\end{split}\]

and is of dimension \(\mathbb{R}^{3\times 1}\).

param u

Arbitrary rotation axis

type u

numpy.ndarray

param theta

Rotation angle (radians)

type theta

float

param v

Vector to rotate

type v

numpy.ndarray

returns

Linearised rotation vector of dimensions \(\mathbb{R}^{3\times 1}\).

rtype

numpy.ndarray

LinearAeroelastic
class sharpy.linear.assembler.linearaeroelastic.LinearAeroelastic[source]

Assemble a linearised aeroelastic system

The aeroelastic system can be seen as the coupling between a linearised aerodynamic system (System 1) and a linearised beam system (System 2).

The coupled system retains inputs and outputs from both systems such that

\[\mathbf{u} = [\mathbf{u}_1;\, \mathbf{u}_2]\]

and the outputs are also ordered in a similar fashion

\[\mathbf{y} = [\mathbf{y}_1;\, \mathbf{y}_2]\]

Reference the individual systems for the particular ordering of the respective input and output variables.

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

aero_settings

dict

Linear UVLM settings

None

beam_settings

dict

Linear Beam settings

None

uvlm_filename

str

Path to .data.h5 file containing UVLM/ROM state space to load

track_body

bool

UVLM inputs and outputs projected to coincide with lattice at linearisation

True

use_euler

bool

Parametrise orientations in terms of Euler angles

True

assemble()[source]

Assembly of the linearised aeroelastic system.

The UVLM state-space system has already been assembled. Prior to assembling the beam’s first order state-space, the damping and stiffness matrices have to be modified to include the damping and stiffenning terms that arise from the linearisation of the aeordynamic forces with respect to the A frame of reference. See sharpy.linear.src.lin_aeroela.get_gebm2uvlm_gains() for details on the linearisation.

Then the beam is assembled as per the given settings in normalised time if the aerodynamic system has been scaled. The discrete time systems of the UVLM and the beam must have the same time step.

The UVLM inputs and outputs are then projected onto the structural degrees of freedom (obviously with the exception of external gusts and control surfaces). Hence, the gains \(\mathbf{K}_{sa}\) and \(\mathbf{K}_{as}\) are added to the output and input of the UVLM system, respectively. These gains perform the following relation:

\[\begin{split}\begin{bmatrix}\zeta \\ \zeta' \\ u_g \\ \delta \end{bmatrix} = \mathbf{K}_{as} \begin{bmatrix} \eta \\ \eta' \\ u_g \\ \delta \end{bmatrix} =\end{split}\]
\[\mathbf{N}_{nodes} = \mathbf{K}_{sa} \mathbf{f}_{vertices}\]

If the beam is expressed in modal form, the UVLM is further projected onto the beam’s modes to have the following input/output structure:

Returns:

get_gebm2uvlm_gains(data)[source]

Provides:

  • the gain matrices required to connect the linearised GEBM and UVLM

inputs/outputs

  • the stiffening and damping factors to be added to the linearised GEBM equations in order to account for non-zero aerodynamic loads at the linearisation point.

The function produces the gain matrices:

  • Kdisp: gains from GEBM to UVLM grid displacements

  • Kvel_disp: influence of GEBM dofs displacements to UVLM grid velocities.

  • Kvel_vel: influence of GEBM dofs displacements to UVLM grid displacements.

  • Kforces (UVLM->GEBM) dimensions are the transpose than the

    Kdisp and Kvel* matrices. Hence, when allocation this term, ii and jj indices will unintuitively refer to columns and rows,

    respectively.

And the stiffening/damping terms accounting for non-zero aerodynamic forces at the linearisation point:

  • Kss: stiffness factor (flexible dof -> flexible dof) accounting for non-zero forces at the linearisation point.

  • Csr: damping factor (rigid dof -> flexible dof)

  • Crs: damping factor (flexible dof -> rigid dof)

  • Crr: damping factor (rigid dof -> rigid dof)

Stiffening and damping related terms due to the non-zero aerodynamic forces at the linearisation point:

\[\mathbf{F}_{A,n} = C^{AG}(\mathbf{\chi})\sum_j \mathbf{f}_{G,j} \rightarrow \delta\mathbf{F}_{A,n} = C^{AG}_0 \sum_j \delta\mathbf{f}_{G,j} + \frac{\partial}{\partial\chi}(C^{AG}\sum_j \mathbf{f}_{G,j}^0)\delta\chi\]

The term multiplied by the variation in the quaternion, \(\delta\chi\), couples the forces with the rigid body equations and becomes part of \(\mathbf{C}_{sr}\).

Similarly, the linearisation of the moments results in expression that contribute to the stiffness and damping matrices.

\[\mathbf{M}_{B,n} = \sum_j \tilde{X}_B C^{BA}(\Psi)C^{AG}(\chi)\mathbf{f}_{G,j}\]
\[\delta\mathbf{M}_{B,n} = \sum_j \tilde{X}_B\left(C_0^{BG}\delta\mathbf{f}_{G,j} + \frac{\partial}{\partial\Psi}(C^{BA}\delta\mathbf{f}^0_{A,j})\delta\Psi + \frac{\partial}{\partial\chi}(C^{BA}_0 C^{AG} \mathbf{f}_{G,j})\delta\chi\right)\]

The linearised equations of motion for the geometrically exact beam model take the input term \(\delta \mathbf{Q}_n = \{\delta\mathbf{F}_{A,n},\, T_0^T\delta\mathbf{M}_{B,n}\}\), which means that the moments should be provided as \(T^T(\Psi)\mathbf{M}_B\) instead of \(\mathbf{M}_A = C^{AB}\mathbf{M}_B\), where \(T(\Psi)\) is the tangential operator.

\[\delta(T^T\mathbf{M}_B) = T^T_0\delta\mathbf{M}_B + \frac{\partial}{\partial\Psi}(T^T\delta\mathbf{M}_B^0)\delta\Psi\]

is the linearised expression for the moments, where the first term would correspond to the input terms to the beam equations and the second arises due to the non-zero aerodynamic moment at the linearisation point and must be subtracted (since it comes from the forces) to form part of \(\mathbf{K}_{ss}\). In addition, the \(\delta\mathbf{M}_B\) term depends on both \(\delta\Psi\) and \(\delta\chi\), therefore those terms would also contribute to \(\mathbf{K}_{ss}\) and \(\mathbf{C}_{sr}\), respectively.

The contribution from the total forces and moments will be accounted for in \(\mathbf{C}_{rr}\) and \(\mathbf{C}_{rs}\).

\[\delta\mathbf{F}_{tot,A} = \sum_n\left(C^{GA}_0 \sum_j \delta\mathbf{f}_{G,j} + \frac{\partial}{\partial\chi}(C^{AG}\sum_j \mathbf{f}_{G,j}^0)\delta\chi\right)\]

Therefore, after running this method, the beam matrices will be updated as:

>>> K_beam[:flex_dof, :flex_dof] += Kss
>>> C_beam[:flex_dof, -rigid_dof:] += Csr
>>> C_beam[-rigid_dof:, :flex_dof] += Crs
>>> C_beam[-rigid_dof:, -rigid_dof:] += Crr

Track body option

The track_body setting restricts the UVLM grid to linear translation motions and therefore should be used to ensure that the forces are computed using the reference linearisation frame.

The UVLM and beam are linearised about a reference equilibrium condition. The UVLM is defined in the inertial reference frame while the beam employs the body attached frame and therefore a projection from one frame onto another is required during the coupling process.

However, the inputs to the UVLM (i.e. the lattice grid coordinates) are obtained from the beam deformation which is expressed in A frame and therefore the grid coordinates need to be projected onto the inertial frame G. As the beam rotates, the projection onto the G frame of the lattice grid coordinates will result in a grid that is not coincident with that at the linearisation reference and therefore the grid coordinates must be projected onto the original frame, which will be referred to as U. The transformation between the inertial frame G and the U frame is a function of the rotation of the A frame and the original position:

\[C^{UG}(\chi) = C^{GA}(\chi_0)C^{AG}(\chi)\]

Therefore, the grid coordinates obtained in A frame and projected onto the G frame can be transformed to the U frame using

\[\zeta_U = C^{UG}(\chi) \zeta_G\]

which allows the grid lattice coordinates to be projected onto the original linearisation frame.

In a similar fashion, the output lattice vertex forces of the UVLM are defined in the original linearisation frame U and need to be transformed onto the inertial frame G prior to projecting them onto the A frame to use them as the input forces to the beam system.

\[\boldsymbol{f}_G = C^{GU}(\chi)\boldsymbol{f}_U\]

The linearisation of the above relations lead to the following expressions that have to be added to the coupling matrices:

  • Kdisp_vel terms:

    \[\delta\boldsymbol{\zeta}_U= C^{GA}_0 \frac{\partial}{\partial \boldsymbol{\chi}} \left(C^{AG}\boldsymbol{\zeta}_{G,0}\right)\delta\boldsymbol{\chi} + \delta\boldsymbol{\zeta}_G\]
  • Kvel_vel terms:

    \[\delta\dot{\boldsymbol{\zeta}}_U= C^{GA}_0 \frac{\partial}{\partial \boldsymbol{\chi}} \left(C^{AG}\dot{\boldsymbol{\zeta}}_{G,0}\right)\delta\boldsymbol{\chi} + \delta\dot{\boldsymbol{\zeta}}_G\]

The transformation of the forces and moments introduces terms that are functions of the orientation and are included as stiffening and damping terms in the beam’s matrices:

  • Csr damping terms relating to translation forces:

    \[C_{sr}^{tra} -= \frac{\partial}{\partial\boldsymbol{\chi}} \left(C^{GA} C^{AG}_0 \boldsymbol{f}_{G,0}\right)\delta\boldsymbol{\chi}\]
  • Csr damping terms related to moments:

    \[C_{sr}^{rot} -= T^\top\widetilde{\mathbf{X}}_B C^{BG} \frac{\partial}{\partial\boldsymbol{\chi}} \left(C^{GA} C^{AG}_0 \boldsymbol{f}_{G,0}\right)\delta\boldsymbol{\chi}\]

The track_body setting.

When track_body is enabled, the UVLM grid is no longer coincident with the inertial reference frame throughout the simulation but rather it is able to rotate as the A frame rotates. This is to simulate a free flying vehicle, where, for instance, the orientation does not affect the aerodynamics. The UVLM defined in this frame of reference, named U, satisfies the following convention:

  • The U frame is coincident with the G frame at the time of linearisation.

  • The U frame rotates as the A frame rotates.

Transformations related to the U frame of reference:

  • The angle between the U frame and the A frame is always constant and equal to \(\boldsymbol{\Theta}_0\).

  • The angle between the A frame and the G frame is \(\boldsymbol{\Theta}=\boldsymbol{\Theta}_0 + \delta\boldsymbol{\Theta}\)

  • The projection of a vector expressed in the G frame onto the U frame is expressed by:

    \[\boldsymbol{v}^U = C^{GA}_0 C^{AG} \boldsymbol{v}^G\]
  • The reverse, a projection of a vector expressed in the U frame onto the G frame, is expressed by

    \[\boldsymbol{v}^U = C^{GA} C^{AG}_0 \boldsymbol{v}^U\]

The effect this has on the aeroelastic coupling between the UVLM and the structural dynamics is that the orientation and change of orientation of the vehicle has no effect on the aerodynamics. The aerodynamics are solely affected by the contribution of the 6-rigid body velocities (as well as the flexible DOFs velocities).

update(u_infty)[source]

Updates the aeroelastic scaled system with the new reference velocity.

Only the beam equations need updating since the only dependency in the forward flight velocity resides there.

Parameters

u_infty (float) – New reference velocity

Returns

Updated aeroelastic state-space system

Return type

sharpy.linear.src.libss.ss

Linear State Beam Element Class

Linear State Beam Element Class

LinearBeam
class sharpy.linear.assembler.linearbeam.LinearBeam[source]

State space member

Define class for linear state-space realisation of GEBM flexible-body equations from SHARPy timestep_info class and with the nonlinear structural information.

State-space models can be defined in continuous or discrete time (dt required). Modal projection, either on the damped or undamped modal shapes, is also avaiable.

Notes on the settings:

  1. modal_projection={True,False}: determines whether to project the states

    onto modal coordinates. Projection over damped or undamped modal shapes can be obtained selecting:

    • proj_modes = {'damped','undamped'}

    while

    • inout_coords={'modes','nodal'}

    determines whether the modal state-space inputs/outputs are modal coords or nodal degrees-of-freedom. If modes is selected, the Kin and Kout gain matrices are generated to transform nodal to modal dofs

  2. dlti={True,False}: if true, generates discrete-time system.

    The continuous to discrete transformation method is determined by:

    discr_method={ 'newmark',  # Newmark-beta
                        'zoh',              # Zero-order hold
                        'bilinear'} # Bilinear (Tustin) transformation
    

    DLTIs can be obtained directly using the Newmark-\(\beta\) method

    discr_method='newmark' newmark_damp=xx with xx<<1.0

    for full-states descriptions (modal_projection=False) and modal projection over the undamped structural modes (modal_projection=True and proj_modes). The Zero-order holder and bilinear methods, instead, work in all descriptions, but require the continuous state-space equations.

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

Options

modal_projection

bool

Use modal projection

True

inout_coords

str

Beam state space input/output coordinates

nodes

nodes, modes

num_modes

int

Number of modes to retain

10

discrete_time

bool

Assemble beam in discrete time

True

dt

float

Discrete time system integration time step

0.001

proj_modes

str

Use undamped or damped modes

undamped

damped, undamped

discr_method

str

Discrete time assembly system method:

newmark

newmark, zoh, bilinear

newmark_damp

float

Newmark damping value. For systems assembled using newmark

0.0001

use_euler

bool

Use euler angles for rigid body parametrisation

False

print_info

bool

Display information on screen

True

gravity

bool

Linearise gravitational forces

False

remove_dofs

list(str)

Remove desired degrees of freedom

[]

eta, V, W, orient

remove_sym_modes

bool

Remove symmetric modes if wing is clamped

False

assemble(t_ref=None)[source]

Assemble the beam state-space system.

Parameters

t_ref (float) – Scaling factor to non-dimensionalise the beam’s time step.

Returns:

remove_symmetric_modes()[source]

Removes symmetric modes when the wing is clamped at the midpoint.

It will force the wing tip displacements in z to be postive for all modes.

Updates the mode shapes matrix, the natural frequencies and the number of modes.

unpack_ss_vector(x_n, u_n, struct_tstep)[source]

Warning

Under development. Missing:
  • Accelerations

  • Double check the cartesian rotation vector

  • Tangential operator for the moments

Takes the state \(x = [\eta, \dot{\eta}]\) and input vectors \(u = N\) of a linearised beam and returns a SHARPy timestep instance, including the reference values.

Parameters
  • x_n (np.ndarray) – Structural beam state vector in nodal space

  • y_n (np.ndarray) – Beam input vector (nodal forces)

  • struct_tstep (utils.datastructures.StructTimeStepInfo) – Reference timestep used for linearisation

Returns

new timestep with linearised values added to the reference value

Return type

utils.datastructures.StructTimeStepInfo

LinearGustGenerator
class sharpy.linear.assembler.lineargustassembler.LinearGustGenerator[source]

Reduces the entire gust field input to a user-defined set of more comprehensive inputs

Linear UVLM State Space System

Linear UVLM State Space System

LinearUVLM
class sharpy.linear.assembler.linearuvlm.LinearUVLM[source]

Linear UVLM System Assembler

Produces state-space model of the form

\[\begin{split}\mathbf{x}_{n+1} &= \mathbf{A}\,\mathbf{x}_n + \mathbf{B} \mathbf{u}_{n+1} \\ \mathbf{y}_n &= \mathbf{C}\,\mathbf{x}_n + \mathbf{D} \mathbf{u}_n\end{split}\]

where the state, inputs and outputs are:

\[\mathbf{x}_n = \{ \delta \mathbf{\Gamma}_n,\, \delta \mathbf{\Gamma_{w_n}},\, \Delta t\,\delta\mathbf{\Gamma}'_n,\, \delta\mathbf{\Gamma}_{n-1} \}\]
\[\mathbf{u}_n = \{ \delta\mathbf{\zeta}_n,\, \delta\mathbf{\zeta}'_n,\, \delta\mathbf{u}_{ext,n} \}\]
\[\mathbf{y} = \{\delta\mathbf{f}\}\]

with \(\mathbf{\Gamma}\in\mathbb{R}^{MN}\) being the vector of vortex circulations, \(\mathbf{\zeta}\in\mathbb{R}^{3(M+1)(N+1)}\) the vector of vortex lattice coordinates and \(\mathbf{f}\in\mathbb{R}^{3(M+1)(N+1)}\) the vector of aerodynamic forces and moments. Note that \((\bullet)'\) denotes a derivative with respect to time.

Note that the input is atypically defined at time n+1. If the setting remove_predictor = True the predictor term u_{n+1} is eliminated through the change of state[1]:

\[\begin{split}\mathbf{h}_n &= \mathbf{x}_n - \mathbf{B}\,\mathbf{u}_n \\\end{split}\]

such that:

\[\begin{split}\mathbf{h}_{n+1} &= \mathbf{A}\,\mathbf{h}_n + \mathbf{A\,B}\,\mathbf{u}_n \\ \mathbf{y}_n &= \mathbf{C\,h}_n + (\mathbf{C\,B}+\mathbf{D})\,\mathbf{u}_n\end{split}\]

which only modifies the equivalent \(\mathbf{B}\) and \(\mathbf{D}\) matrices.

The integr_order setting refers to the finite differencing scheme used to calculate the bound circulation derivative with respect to time \(\dot{\mathbf{\Gamma}}\). A first order scheme is used when integr_order == 1

\[\dot{\mathbf{\Gamma}}^{n+1} = \frac{\mathbf{\Gamma}^{n+1}-\mathbf{\Gamma}^n}{\Delta t}\]

If integr_order == 2 a higher order scheme is used (but it isn’t exactly second order accurate [1]).

\[\dot{\mathbf{\Gamma}}^{n+1} = \frac{3\mathbf{\Gamma}^{n+1}-4\mathbf{\Gamma}^n + \mathbf{\Gamma}^{n-1}} {2\Delta t}\]

References

[1] Franklin, GF and Powell, JD. Digital Control of Dynamic Systems, Addison-Wesley Publishing Company, 1980

[2] Maraniello, S., & Palacios, R.. State-Space Realizations and Internal Balancing in Potential-Flow Aerodynamics with Arbitrary Kinematics. AIAA Journal, 57(6), 1–14. 2019. https://doi.org/10.2514/1.J058153

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

Options

dt

float

Time step

0.1

integr_order

int

Integration order of the circulation derivative.

2

1, 2

ScalingDict

dict

Dictionary of scaling factors to achieve normalised UVLM realisation.

{}

remove_predictor

bool

Remove the predictor term from the UVLM equations

True

use_sparse

bool

Assemble UVLM plant matrix in sparse format

True

density

float

Air density

1.225

remove_inputs

list(str)

List of inputs to remove. u_gust to remove external velocity input.

[]

u_gust

gust_assembler

str

Selected linear gust assembler.

leading_edge

rom_method

list(str)

List of model reduction methods to reduce UVLM.

[]

rom_method_settings

dict

Dictionary with settings for the desired ROM methods, where the name of the ROM method is the key to the dictionary

{}

vortex_radius

float

Distance below which inductions are not computed

sharpy.utils.constants.vortex_radius_def

cfl1

bool

If it is True, it assumes that the discretisation complies with CFL=1

True

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

Options

length

float

Reference length to be used for UVLM scaling

1.0

speed

float

Reference speed to be used for UVLM scaling

1.0

density

float

Reference density to be used for UVLM scaling

1.0

assemble(track_body=False, wake_prop_settings=None)[source]

Assembles the linearised UVLM system, removes the desired inputs and adds linearised control surfaces (if present).

With all possible inputs present, these are ordered as

\[\mathbf{u} = [\boldsymbol{\zeta},\,\dot{\boldsymbol{\zeta}},\,\mathbf{w},\,\delta]\]

Control surface inputs are ordered last as:

\[[\delta_1, \delta_2, \dots, \dot{\delta}_1, \dot{\delta_2}]\]
remove_inputs(remove_list=<class 'list'>)[source]

Remove certain inputs from the input vector

To do:
  • Support for block UVLM

Parameters

remove_list (list) – Inputs to remove

unpack_input_vector(u_n)[source]

Unpacks the input vector into the corresponding grid coordinates, velocities and external velocities.

Parameters

u_n (np.ndarray) – UVLM input vector. May contain control surface deflections and external velocities.

Returns

Tuple containing zeta, zeta_dot and u_ext, accounting for the effect of control surfaces.

Return type

tuple

unpack_ss_vector(data, x_n, aero_tstep, track_body=False)[source]

Transform column vectors used in the state space formulation into SHARPy format

The column vectors are transformed into lists with one entry per aerodynamic surface. Each entry contains a matrix with the quantities at each grid vertex.

\[\mathbf{y}_n \longrightarrow \mathbf{f}_{aero}\]
\[\mathbf{x}_n \longrightarrow \mathbf{\Gamma}_n,\, \mathbf{\Gamma_w}_n,\, \mathbf{\dot{\Gamma}}_n\]

If the track_body option is on, the output forces are projected from the linearization frame, to the G frame. Note that the linearisation frame is:

  1. equal to the FoR G at time 0 (linearisation point)

  2. rotates as the body frame specified in the track_body_number

Parameters
  • y_n (np.ndarray) – Column output vector of linear UVLM system

  • x_n (np.ndarray) – Column state vector of linear UVLM system

  • u_n (np.ndarray) – Column input vector of linear UVLM system

  • aero_tstep (AeroTimeStepInfo) – aerodynamic timestep information class instance

Returns

Tuple containing:

forces (list):

Aerodynamic forces in a list with n_surf entries. Each entry is a (6, M+1, N+1) matrix, where the first 3 indices correspond to the components in x, y and z. The latter 3 are zero.

gamma (list):

Bound circulation list with n_surf entries. Circulation is stored in an (M+1, N+1) matrix, corresponding to the panel vertices.

gamma_dot (list):

Bound circulation derivative list with n_surf entries. Circulation derivative is stored in an (M+1, N+1) matrix, corresponding to the panel vertices.

gamma_star (list):

Wake (free) circulation list with n_surf entries. Wake circulation is stored in an (M_star+1, N+1) matrix, corresponding to the panel vertices of the wake.

Return type

tuple

Linearised System Source Code
Assembly of linearised UVLM system
  1. Maraniello, 25 May 2018

Includes:
  • Boundary conditions methods:
    • AICs: allocate aero influence coefficient matrices of multi-surfaces configurations

    • nc_dqcdzeta_Sin_to_Sout: derivative matrix of nc*dQ/dzeta where Q is the induced velocity at the bound collocation points of one surface to another.

    • nc_dqcdzeta_coll: assembles nc_dqcdzeta_coll_Sin_to_Sout matrices in multi-surfaces configurations

    • uc_dncdzeta: assemble derivative matrix dnc/dzeta*Uc at bound collocation points

AICs

Given a list of bound (Surfs) and wake (Surfs_star) instances of surface.AeroGridSurface, returns the list of AIC matrices in the format:

  • AIC_list[ii][jj] contains the AIC from the bound surface Surfs[jj] to

Surfs[ii]. - AIC_star_list[ii][jj] contains the AIC from the wake surface Surfs[jj] to Surfs[ii].

dfqsdgamma_vrel0

Assemble derivative of quasi-steady force w.r.t. gamma with fixed relative velocity - the changes in induced velocities due to gamma are not accounted for. The routine exploits the get_joukovski_qs method insude the AeroGridSurface class

dfqsduinput

Assemble derivative of quasi-steady force w.r.t. external input velocity.

dfqsdvind_gamma

Assemble derivative of quasi-steady force w.r.t. induced velocities changes due to gamma. Note: the routine is memory consuming but avoids unnecessary computations.

dfqsdvind_zeta

Assemble derivative of quasi-steady force w.r.t. induced velocities changes due to zeta.

dfqsdzeta_omega

Assemble derivative of quasi-steady force w.r.t. to zeta The contribution implemented is related with the omega x zeta term call: Der_list = dfqsdzeta_omega(Surfs,Surfs_star)

dfqsdzeta_vrel0

Assemble derivative of quasi-steady force w.r.t. zeta with fixed relative velocity - the changes in induced velocities due to zeta over the surface inducing the velocity are not accounted for. The routine exploits the available relative velocities at the mid-segment points

dfunstdgamma_dot

Computes derivative of unsteady aerodynamic force with respect to changes in circulation.

Note: the function also checks that the first derivative of the circulation at the linearisation point is null. If not, a further contribution to the added mass, depending on the changes in panel area and normal, arises and needs to be implemented.

dvinddzeta

Produces derivatives of induced velocity by Surf_in w.r.t. the zetac point. Derivatives are divided into those associated to the movement of zetac, and to the movement of the Surf_in vertices (DerVert).

If Surf_in is bound (IsBound==True), the circulation over the TE due to the wake is not included in the input.

If Surf_in is a wake (IsBound==False), derivatives w.r.t. collocation points are computed ad the TE contribution on DerVert. In this case, the chordwise paneling Min_bound of the associated input is required so as to calculate Kzeta and correctly allocate the derivative matrix.

The output derivatives are: - Dercoll: 3 x 3 matrix - Dervert: 3 x 3*Kzeta (if Surf_in is a wake, Kzeta is that of the bound)

Warning: zetac must be contiguously stored!

dvinddzeta_cpp
eval_panel_cpp
nc_domegazetadzeta

Produces a list of derivative matrix d(omaga x zeta)/dzeta, where omega is the rotation speed of the A FoR, ASSUMING constant panel norm.

Each list is such that: - the ii-th element is associated to the ii-th bound surface collocation point, and will contain a sub-list such that:

  • the j-th element of the sub-list is the dAIC_dzeta matrices w.r.t. the

zeta d.o.f. of the j-th bound surface.

Hence, DAIC*[ii][jj] will have size K_ii x Kzeta_jj

call: ncDOmegaZetavert = nc_domegazetadzeta(Surfs,Surfs_star)

nc_dqcdzeta

Produces a list of derivative matrix

\[\frac{\partial(\mathcal{A}\boldsymbol{\Gamma}_0)}{\partial\boldsymbol{\zeta}}\]

where \(\mathcal{A}\) is the aerodynamic influence coefficient matrix at the bound surfaces collocation point, assuming constant panel norm.

Each list is such that:

  • the ii-th element is associated to the ii-th bound surface collocation point, and will contain a sub-list such that:

    • the j-th element of the sub-list is the dAIC_dzeta matrices w.r.t. the zeta d.o.f. of the j-th bound surface.

Hence, DAIC*[ii][jj] will have size K_ii x Kzeta_jj

If Merge is True, the derivatives due to collocation points movement are added to Dvert to minimise storage space.

To do:

  • Dcoll is highly sparse, exploit?

nc_dqcdzeta_Sin_to_Sout
Computes derivative matrix of

nc*dQ/dzeta

where Q is the induced velocity induced by bound surface Surf_in onto bound surface Surf_out. The panel normals of Surf_out are constant.

The input/output are: - Der_coll of size (Kout,3*Kzeta_out): derivative due to the movement of collocation point on Surf_out. - Der_vert of size:

  • (Kout,3*Kzeta_in) if Surf_in_bound is True

  • (Kout,3*Kzeta_bound_in) if Surf_in_bound is False; Kzeta_bound_in is

the number of vertices in the bound surface of whom Surf_out is the wake.

Note that: - if Surf_in_bound is False, only the TE movement contributes to Der_vert. - if Surf_in_bound is False, the allocation of Der_coll could be speed-up by scanning only the wake segments along the chordwise direction, as on the others the net circulation is null.

test_wake_prop_term

Test allocation of single term of wake propagation matrix

uc_dncdzeta

Build derivative of

\[\boldsymbol{u}_c\frac{\partial\boldsymbol{n}_c}{\partial\boldsymbol{zeta}}\]

where \(\boldsymbol{u}_c\) is the total velocity at the collocation points.

param Surf

the input can also be a list of surface.AerogridSurface

type Surf

surface.AerogridSurface

References

wake_prop

Assembly of wake propagation matrices, in sparse or dense matrices format

Note

Wake propagation matrices are very sparse. Nonetheless, allocation in dense format (from numpy.zeros) or sparse does not have important differences in terms of cpu time and memory used as numpy.zeros does not allocate memory until this is accessed

param MS

MultiSurface instance

type MS

MultiSurface

param use_sparse

Use sparse matrices

type use_sparse

bool (optional)

param sparse_format

Use either csc or lil format

type sparse_format

str (optional)

param settings

Dictionary with aerodynamic settings containing: cfl1 (bool): Defines if the wake shape complies with CFL=1 dt (float): time step

type settings

dict (optional)

wake_prop_from_dimensions

Same as ``wake_prop’’ but using the dimensions directly

Mapping methods for bound surface panels
  1. Maraniello, 19 May 2018

AeroGridMap
class sharpy.linear.src.gridmapping.AeroGridMap(M: number of chord-wise, N: number of span-wise)[source]

Produces mapping between panels, segment and vertices of a surface. Grid elements are identified through the indices (m,n), where:

  • m: chordwise index

  • n: spanwise index

The same indexing is applied to panel, vertices and segments.

Elements: - panels=(M,N) - vertices=(M+1,N+1) - segments: these are divided in segments developing along the chordwise and spanwise directions.

  • chordwise: (M,N+1)

  • spanwise: (M+1,N)

Mapping structures: - Mpv: for each panel (mp,np) returns the chord/span-wise indices of its vertices, (mv,nv). This has size (M,N,4,2) - Mps: maps each panel (mp,np) to the ii-th segment. This has size (M,N,4,2)

# - Mps_extr: for each panel (m,n) returns the indices of the extrema of each side # of the panel.

Note: - mapping matrices are stored as np.int16 or np.int32 arrays

from_panel_to_segments(m: chordwise index, n: spanwise index)[source]

For each panel (m,n) it provides the ms,ns indices of each segment.

from_panel_to_vertices(m: chordwise index, n: spanwise index)[source]

From panel of indices (m,n) to indices of vertices

from_vertex_to_panel(m: chordwise index, n: spanwise index)[source]

Returns the panel for which the vertex is locally numbered as 0,1,2,3. Returns a (4,2) array such that its elements are:

[vv_local,(m,n) of panel]

where vv_local is the local verteix number.

Important: indices -1 are possible is the vertex does not have local index 0,1,2 or 3 with respect to any panel.

map_panels_to_segments()[source]

Mapping from panel of segments. self.Mpv is a (M,N,4,2) array such that:

[m, n, local_segment_number,

chordwise/spanwise index of segment,]

map_panels_to_vertices()[source]

Mapping from panel of vertices. self.Mpv is a (M,N,4,2) array such that its element are:

[m, n, local_vertex_number, spanwise/chordwise indices of vertex]

map_panels_to_vertices_1D_scalar()[source]

Mapping: - FROM: the index of a scalar quantity defined at panel collocation point and stored in 1D array. - TO: index of a scalar quantity defined at vertices and stored in 1D

The Mpv1d_scalar has size (K,4) where:

[1d index of panel, index of vertex 0,1,2 or 3]

map_vertices_to_panels()[source]

Maps from vertices to panels. Produces a (M+1,N+1,4,2) array, associating vertices to panels. Its elements are:

[m vertex,
n vertex,
vertex local index,

chordwise/spanwise panel indices]

map_vertices_to_panels_1D_scalar()[source]

Mapping: - FROM: the index of a scalar quantity defined at vertices and stored in 1D array. - TO: index of a scalar quantity defined at panels and stored in 1D

The Mpv1d_scalar has size (Kzeta,4) where:

[1d index of vertex, index of vertex 0,1,2 or 3 w.r.t. panel]

Defines interpolation methods (geometrically-exact) and matrices (linearisation)

Defines interpolation methods (geometrically-exact) and matrices (linearisation) S. Maraniello, 20 May 2018

get_Wnv_vector

Provide projection matrix from nodal velocities to normal velocity at collocation points

get_Wvc_scalar

Produce scalar interpolation matrix Wvc for state-space realisation.

Important: this will not work for coordinates extrapolation, as it would require information about the panel size. It works for other forces/scalar quantities extrapolation. It assumes the quantity at the collocation point is determined proportionally to the weight associated to each vertex and obtained through get_panel_wcv.

get_panel_wcv

Produces a compact array with weights for bilinear interpolation, where aN,aM in [0,1] are distances in the chordwise and spanwise directions such that:

  • (aM,aN)=(0,0) –> quantity at vertex 0

  • (aM,aN)=(1,0) –> quantity at vertex 1

  • (aM,aN)=(1,1) –> quantity at vertex 2

  • (aM,aN)=(0,1) –> quantity at vertex 3

Induced Velocity Derivatives

Calculate derivatives of induced velocity.

Methods:

  • eval_seg_exp and eval_seg_exp_loop: profide ders in format

    [Q_{x,y,z},ZetaPoint_{x,y,z}]

    and use fully-expanded analytical formula.

  • eval_panel_exp: iterates through whole panel

  • eval_seg_comp and eval_seg_comp_loop: profide ders in format

    [Q_{x,y,z},ZetaPoint_{x,y,z}]

    and use compact analytical formula.

Dvcross_by_skew3d
eval_panel_comp
eval_panel_cpp
eval_panel_exp
eval_panel_fast
eval_panel_fast_coll
eval_seg_comp_loop
eval_seg_exp
eval_seg_exp_loop
Induced Velocity Derivatives with respect to Panel Normal

Calculate derivative of

\[\boldsymbol{u}_c\frac{\partial\boldsymbol{n}_c}{\partial\boldsymbol{zeta}}\]

with respect to local panel coordinates.

eval

Returns a 4 x 3 array, containing the derivative of Wnc*Uc w.r.t the panel vertices coordinates.

Fitting Tools Library

@author: Salvatore Maraniello

@date: 15 Jan 2018

fitfrd

Wrapper for fitfrd (mag=0) and fitfrdmag (mag=1) functions in continuous and discrete time (if ds in input). Input:

kv,yv: frequency array and frequency response N: order for rational function approximation mag=1,0: Flag for determining method to use dt (optional): sampling time for DLTI systems

get_rfa_res

Returns magnitude of the residual Yfit-Yv of a RFA approximation at each point kv. The coefficients of the approximations are: - cnum=xv[:Nnum] - cdem=xv[Nnum:] where cnum and cden are as per the ‘rfa’ function.

get_rfa_res_norm

Define residual scalar norm of Pade approximation of coefficients cnum=xv[:Nnum] and cden[Nnum:] (see get_rfa_res and rfa function) and time-step ds (if discrete time).

poly_fit

Find best II order fitting polynomial from frequency response Yv over the frequency range kv for both continuous (ds=None) and discrete (ds>0) LTI systems.

Input: - kv: frequency points - Yv: frequency response - dyv,ddyv: frequency responses of I and II order derivatives - method=’leastsq’,’dev’: algorithm for minimisation - Bup (only ‘dev’ method): bounds for bv coefficients as per scipy.optimize.differential_evolution. This is a length 3 array.

Important: - this function attributes equal weight to each data-point!

rfa

Evaluates over the frequency range kv.the rational function approximation: [cnum[-1] + cnum[-2] z + … + cnum[0] z**Nnum ]/…

[cden[-1] + cden[-2] z + … + cden[0] z**Nden]

where the numerator and denominator polynomial orders, Nnum and Nden, are the length of the cnum and cden arrays and:

  • z=exp(1.j*kv*ds), with ds sampling time if ds is given (discrete-time

system) - z=1.*kv, if ds is None (continuous time system)

rfa_fit_dev

Find best fitting RFA approximation from frequency response Yv over the frequency range kv for both continuous (ds=None) and discrete (ds>0) LTI systems.

The RFA approximation is found through a 2-stage strategy:

a. an evolutionary algoryhtm is run to determine the optimal fitting coefficients b. the search is refined through a least squares algorithm.

and is stopped as soon as:

1. the maximum absolute error in frequency response of the RFA falls below TolAbs 2. the maximum number of iterations is reached.

Input: - kv: frequency range for approximation - Yv: frequency response vector over kv - TolAbs: maximum admissible absolute difference in frequency response between RFA and original system. - Nnum,Ndem: number of coefficients for Pade approximation. - ds: sampling time for DLTI systems - NtrialMax: maximum number of repetition of global and least square optimisations - Cfbouds: maximum absolute values of coeffieicnts (only for evolutionary algorithm) - OutFull: if False, only outputs optimal coefficients of RFA. Otherwise,

outputs cost and RFA coefficients of each trial.

Output: - cnopt: optimal coefficients (numerator) - cdopt: optimal coefficients (denominator)

Important: - this function has the same objective as fitfrd in matwrapper module. While generally slower, the global optimisation approach allows to verify the results from fitfrd.

rfa_mimo

Given the frequency response of a MIMO DLTI system, this function returns the A,B,C,D matrices associated to the rational function approximation of the original system.

Input: - Yfull: frequency response (as per libss.freqresp) of full size system over the frequencies kv. - kv: array of frequencies over which the RFA approximation is evaluated. - tolAbs: absolute tolerance for the rfa fitting - Nnum: number of numerator coefficients for RFA - Nden: number of denominator coefficients for RFA - NtrialMax: maximum number of attempts - method=[‘intependent’]. Method used to produce the system:

  • intependent: each input-output combination is treated separately. The

resulting system is a collection of independent SISO DLTIs

rfader

Evaluates over the frequency range kv.the derivative of order m of the rational function approximation: [cnum[-1] + cnum[-2] z + … + cnum[0] z**Nnum ]/…

[cden[-1] + cden[-2] z + … + cden[0] z**Nden]

where the numerator and denominator polynomial orders, Nnum and Nden, are the length of the cnum and cden arrays and:

  • z=exp(1.j*kv*ds), with ds sampling time if ds is given (discrete-time

system) - z=1.*kv, if ds is None (continuous time system)

Collect tools to manipulate sparse and/or mixed dense/sparse matrices.

Collect tools to manipulate sparse and/or mixed dense/sparse matrices.

author: S. Maraniello date: Dec 2018

Comment: manipulating large linear system may require using both dense and sparse matrices. While numpy/scipy automatically handle most operations between mixed dense/sparse arrays, some (e.g. dot product) require more attention. This library collects methods to handle these situations.

Classes: scipy.sparse matrices are wrapped so as to ensure compatibility with numpy arrays upon conversion to dense. - csc_matrix: this is a wrapper of scipy.csc_matrix. - SupportedTypes: types supported for operations - WarningTypes: due to some bugs in scipy (v.1.1.0), sum (+) operations between np.ndarray and scipy.sparse matrices can result in numpy.matrixlib.defmatrix.matrix types. This list contains such undesired types that can result from dense/sparse operations and raises a warning if required. (b) convert these types into numpy.ndarrays.

Methods: - dot: handles matrix dot products across different types. - solve: solves linear systems Ax=b with A and b dense, sparse or mixed. - dense: convert matrix to numpy array

Warning: - only sparse types into SupportedTypes are supported!

To Do: - move these methods into an algebra module?

block_dot

dot product between block matrices.

Inputs: A, B: are nested lists of dense/sparse matrices of compatible shape for block matrices product. Empty blocks can be defined with None. (see numpy.block)

block_matrix_dot_vector

dot product between block matrix and block vector

Inputs: A, v: are nested lists of dense/sparse matrices of compatible shape for block matrices product. Empty blocks can be defined with None. (see numpy.block)

block_sum

dot product between block matrices.

Inputs: A, B: are nested lists of dense/sparse matrices of compatible shape for block matrices product. Empty blocks can be defined with None. (see numpy.block)

csc_matrix
class sharpy.linear.src.libsparse.csc_matrix(*args: Any, **kwargs: Any)[source]

Wrapper of scipy.csc_matrix that ensures best compatibility with numpy.ndarray. The following methods have been overwritten to ensure that numpy.ndarray are returned instead of numpy.matrixlib.defmatrix.matrix.

  • todense

  • _add_dense

Warning: this format is memory inefficient to allocate new sparse matrices. Consider using: - scipy.sparse.lil_matrix, which supports slicing, or - scipy.sparse.coo_matrix, though slicing is not supported :(

todense()[source]

As per scipy.spmatrix.todense but returns a numpy.ndarray.

dense

If required, converts sparse array to dense.

dot
Method to compute

C = A*B ,

where * is the matrix product, with dense/sparse/mixed matrices.

The format (sparse or dense) of C is specified through ‘type_out’. If type_out==None, the output format is sparse if both A and B are sparse, dense otherwise.

The following formats are supported: - numpy.ndarray - scipy.csc_matrix

eye_as

Produces an identity matrix as per M, in shape and type

solve
Wrapper of

numpy.linalg.solve and scipy.sparse.linalg.spsolve

for solution of the linear system A x = b. - if A is a dense numpy array np.linalg.solve is called for solution. Note that if B is sparse, this requires convertion to dense. In this case, solution through LU factorisation of A should be considered to exploit the sparsity of B. - if A is sparse, scipy.sparse.linalg.spsolve is used.

zeros_as

Produces an identity matrix as per M, in shape and type

Linear Time Invariant systems

Linear Time Invariant systems author: S. Maraniello date: 15 Sep 2017 (still basement…)

Library of methods to build/manipulate state-space models. The module supports the sparse arrays types defined in libsparse.

The module includes:

Classes: - ss: provides a class to build DLTI/LTI systems with full and/or sparse

matrices and wraps many of the methods in these library. Methods include: - freqresp: wraps the freqresp function - addGain: adds gains in input/output. This is not a wrapper of addGain, as the system matrices are overwritten

Methods for state-space manipulation: - couple: feedback coupling. Does not support sparsity - freqresp: calculate frequency response. Supports sparsity. - series: series connection between systems - parallel: parallel connection between systems - SSconv: convert state-space model with predictions and delays - addGain: add gains to state-space model. - join2: merge two state-space models into one. - join: merge a list of state-space models into one. - sum state-space models and/or gains - scale_SS: scale state-space model - simulate: simulates discrete time solution - Hnorm_from_freq_resp: compute H norm of a frequency response - adjust_phase: remove discontinuities from a frequency response

Special Models: - SSderivative: produces DLTI of a numerical derivative scheme - SSintegr: produces DLTI of an integration scheme - build_SS_poly: build state-space model with polynomial terms.

Filtering: - butter

Utilities: - get_freq_from_eigs: clculate frequency corresponding to eigenvalues

Comments: - the module supports sparse matrices hence relies on libsparse.

to do:
  • remove unnecessary coupling routines

  • couple function can handle sparse matrices but only outputs dense matrices
    • verify if typical coupled systems are sparse

    • update routine

    • add method to automatically determine whether to use sparse or dense?

Hnorm_from_freq_resp

Given a frequency response over a domain kv, this funcion computes the H norms through numerical integration.

Note that if kv[-1]<np.pi/dt, the method assumed gv=0 for each frequency kv[-1]<k<np.pi/dt.

Warning: only use for SISO systems! For MIMO definitions are different

SSconv

Convert a DLTI system with prediction and delay of the form:

\[\begin{split}\mathbf{x}_{n+1} &= \mathbf{A\,x}_n + \mathbf{B_0\,u}_n + \mathbf{B_1\,u}_{n+1} + \mathbf{B_{m1}\,u}_{n-1} \\ \mathbf{y}_n &= \mathbf{C\,x}_n + \mathbf{D\,u}_n\end{split}\]

into the state-space form:

\[\begin{split}\mathbf{h}_{n+1} &= \mathbf{A_h\,h}_n + \mathbf{B_h\,u}_n \\ \mathbf{y}_n &= \mathbf{C_h\,h}_n + \mathbf{D_h\,u}_n\end{split}\]

If \(\mathbf{B_{m1}}\) is None, the original state is retrieved through

\[\mathbf{x}_n = \mathbf{h}_n + \mathbf{B_1\,u}_n\]

and only the \(\mathbf{B}\) and \(\mathbf{D}\) matrices are modified.

If \(\mathbf{B_{m1}}\) is not None, the SS is augmented with the new state

\[\mathbf{g}_{n} = \mathbf{u}_{n-1}\]

or, equivalently, with the equation

\[\mathbf{g}_{n+1} = \mathbf{u}_n\]

leading to the new form

\[\begin{split}\mathbf{H}_{n+1} &= \mathbf{A_A\,H}_{n} + \mathbf{B_B\,u}_n \\ \mathbf{y}_n &= \mathbf{C_C\,H}_{n} + \mathbf{D_D\,u}_n\end{split}\]

where \(\mathbf{H} = (\mathbf{x},\,\mathbf{g})\).

param A

dynamics matrix

type A

np.ndarray

param B0

input matrix for input at current time step n. Set to None if this is zero.

type B0

np.ndarray

param B1

input matrix for input at time step n+1 (predictor term)

type B1

np.ndarray

param C

output matrix

type C

np.ndarray

param D

direct matrix

type D

np.ndarray

param Bm1

input matrix for input at time step n-1 (delay term)

type Bm1

np.ndarray

returns

tuple packed with the state-space matrices \(\mathbf{A},\,\mathbf{B},\,\mathbf{C}\) and \(\mathbf{D}\).

rtype

tuple

References

Franklin, GF and Powell, JD. Digital Control of Dynamic Systems, Addison-Wesley Publishing Company, 1980

Warning

functions untested for delays (Bm1 != 0)

SSderivative

Given a time-step ds, and an single input time history u, this SS model returns the output y=[u,du/ds], where du/dt is computed with second order accuracy.

SSintegr

Builds a state-space model of an integrator.

  • method: Numerical scheme. Available options are:
    • 1tay: 1st order Taylor (fwd)

      I[ii+1,:]=I[ii,:] + ds*F[ii,:]

    • trap: I[ii+1,:]=I[ii,:] + 0.5*dx*(F[ii,:]+F[ii+1,:])

    Note: other option can be constructured if information on derivative of F is available (for e.g.)

addGain

Convert input u or output y of a SS DLTI system through gain matrix K. We have the following transformations: - where=’in’: the input dof of the state-space are changed

u_new -> Kmat*u -> SS -> y => u_new -> SSnew -> y

  • where=’out’: the output dof of the state-space are changed

    u -> SS -> y -> Kmat*u -> ynew => u -> SSnew -> ynew

  • where=’parallel’: the input dofs are changed, but not the output

    {u_1 -> SS -> y_1

    { u_2 -> y_2= Kmat*u_2 => u_new=(u_1,u_2) -> SSnew -> y=y_1+y_2
    {y = y_1+y_2

Warning: function not tested for Kmat stored in sparse format

adjust_phase

Modify the phase y of a frequency response to remove discontinuities.

build_SS_poly

Builds a discrete-time state-space representation of a polynomial system whose frequency response has from:

Ypoly[oo,ii](k) = -A2[oo,ii] D2(k) - A1[oo,ii] D1(k) - A0[oo,ii]

where C1,D2 are discrete-time models of first and second derivatives, ds is the time-step and the coefficient matrices are such that:

A{nn}=Acf[oo,ii,nn]

butter

build MIMO butterworth filter of order ord and cut-off freq over Nyquist freq ratio Wn. The filter will have N input and N output and N*ord states.

Note: the state-space form of the digital filter does not depend on the sampling time, but only on the Wn ratio. As a result, this function only returns the A,B,C,D matrices of the filter state-space form.

compare_ss

Assert matrices of state-space models are identical

couple

Couples 2 dlti systems ss01 and ss02 through the gains K12 and K21, where K12 transforms the output of ss02 into an input of ss01.

Other inputs: - out_sparse: if True, the output system is stored as sparse (not recommended)

disc2cont

Transform a discrete time system to a continuous time system using a bilinear (Tustin) transformation.

Given a discrete time system with time step \(\Delta T\), the equivalent continuous time system is given by:

\[\begin{split}\bar{A} &= \omega_0(A-I)(I + A)^{-1} \\ \bar{B} &= \sqrt{2\omega_0}(I+A)^{-1}B \\ \bar{C} &= \sqrt{2\omega_0}C(I+A)^{-1} \\ \bar{D} &= D - C(I+A)^{-1}B\end{split}\]

where \(\omega_0 = \frac{2}{\Delta T}\).

References

MIT OCW 6.245

param sys

SHARPy discrete-time state-space object.

type sys

libss.ss

returns

Converted continuous-time state-space object.

rtype

libss.ss

eigvals

Ordered eigenvalaues of a matrix.

param a

Matrix.

type a

np.ndarray

param dlti

If true, the eigenvalues are ordered by modulus, else by real part.

type dlti

bool

returns

ordered set of eigenvalues.

rtype

np.ndarray

freqresp

In-house frequency response function supporting dense/sparse types

Inputs: - SS: instance of ss class, or scipy.signal.StateSpace* - wv: frequency range - dlti: True if discrete-time system is considered.

Outputs: - Yfreq[outputs,inputs,len(wv)]: frequency response over wv

Warnings: - This function may not be very efficient for dense matrices (as A is not reduced to upper Hessenberg form), but can exploit sparsity in the state-space matrices.

get_freq_from_eigs

Compute natural freq corresponding to eigenvalues, eigs, of a continuous or discrete-time (dlti=True) systems.

Note: if dlti=True, the frequency is normalised by (1./dt), where dt is the DLTI time-step - i.e. the frequency in Hertz is obtained by multiplying fn by (1./dt).

join

Given a list of state-space models belonging to the ss class, creates a joined system whose output is the sum of the state-space outputs. If wv is not None, this is a list of weights, such that the output is:

y = sum( wv[ii] y_ii )

Ref: equation (4.22) of Benner, P., Gugercin, S. & Willcox, K., 2015. A Survey of Projection-Based Model Reduction Methods for Parametric Dynamical Systems. SIAM Review, 57(4), pp.483–531.

Warning: - system matrices must be numpy arrays - the function does not perform any check!

join2

Join two state-spaces or gain matrices such that, given:

\[\begin{split}\mathbf{u}_1 \longrightarrow &\mathbf{SS}_1 \longrightarrow \mathbf{y}_1 \\ \mathbf{u}_2 \longrightarrow &\mathbf{SS}_2 \longrightarrow \mathbf{y}_2\end{split}\]

we obtain:

\[\mathbf{u} \longrightarrow \mathbf{SS}_{TOT} \longrightarrow \mathbf{y}\]

with \(\mathbf{u}=(\mathbf{u}_1,\mathbf{u}_2)^T\) and \(\mathbf{y}=(\mathbf{y}_1,\mathbf{y}_2)^T\).

The output \(\mathbf{SS}_{TOT}\) is either a gain matrix or a state-space system according to the input \(\mathbf{SS}_1\) and \(\mathbf{SS}_2\)

param SS1

State space 1 or gain 1

type SS1

scsig.StateSpace or np.ndarray

param SS2

State space 2 or gain 2

type SS2

scsig.StateSpace or np.ndarray

returns

combined state space or gain matrix

rtype

scsig.StateSpace or np.ndarray

parallel

Returns the sum (or parallel connection of two systems). Given two state-space models with the same output, but different input:

u1 –> SS01 –> y u2 –> SS02 –> y

project

Given 2 transformation matrices, (WT,V) of shapes (Nk,self.states) and (self.states,Nk) respectively, this routine returns a projection of the state space ss_here according to:

Anew = WT A V Bnew = WT B Cnew = C V Dnew = D

The projected model has the same number of inputs/outputs as the original one, but Nk states.

random_ss

Define random system from number of states (Nx), inputs (Nu) and output (Ny).

scale_SS

Given a state-space system, scales the equations such that the original input and output, \(u\) and \(y\), are substituted by \(u_{AD}=\frac{u}{u_{ref}}\) and \(y_{AD}=\frac{y}{y_{ref}}\).

If the original system has form:

\[\begin{split}\mathbf{x}^{n+1} &= \mathbf{A\,x}^n + \mathbf{B\,u}^n \\ \mathbf{y}^{n} &= \mathbf{C\,x}^{n} + \mathbf{D\,u}^n\end{split}\]

the transformation is such that:

\[\begin{split}\mathbf{x}^{n+1} &= \mathbf{A\,x}^n + \mathbf{B}\,\frac{u_{ref}}{x_{ref}}\mathbf{u_{AD}}^n \\ \mathbf{y_{AD}}^{n+1} &= \frac{1}{y_{ref}}(\mathbf{C}\,x_{ref}\,\mathbf{x}^{n+1} + \mathbf{D}\,u_{ref}\,\mathbf{u_{AD}}^n)\end{split}\]

By default, the state-space model is manipulated by reference (byref=True)

param SSin

original state-space formulation

type SSin

scsig.dlti

param input_scal

input scaling factor \(u_{ref}\). It can be a float or an array, in which case the each element of the input vector will be scaled by a different factor.

type input_scal

float or np.ndarray

param output_scal

output scaling factor \(y_{ref}\). It can be a float or an array, in which case the each element of the output vector will be scaled by a different factor.

type output_scal

float or np.ndarray

param state_scal

state scaling factor \(x_{ref}\). It can be a float or an array, in which case the each element of the state vector will be scaled by a different factor.

type state_scal

float or np.ndarray

param byref

state space manipulation order

type byref

bool

returns

scaled state space formulation

rtype

scsig.dlti

series

Connects two state-space blocks in series. If these are instances of DLTI state-space systems, they need to have the same type and time-step. If the input systems are sparse, they are converted to dense.

The connection is such that:

\[u \rightarrow \mathsf{SS01} \rightarrow \mathsf{SS02} \rightarrow y \Longrightarrow u \rightarrow \mathsf{SStot} \rightarrow y\]
param SS01

State Space 1 instance. Can be DLTI/CLTI, dense or sparse.

type SS01

libss.ss

param SS02

State Space 2 instance. Can be DLTI/CLTI, dense or sparse.

type SS02

libss.ss

Returns

libss.ss: Combined state space system in series in dense format.

simulate

Routine to simulate response to generic input. @warning: this routine is for testing and may lack of robustness. Use

scipy.signal instead.

ss
class sharpy.linear.src.libss.ss(A, B, C, D, dt=None)[source]

Wrap state-space models allocation into a single class and support both full and sparse matrices. The class emulates

scipy.signal.ltisys.StateSpaceContinuous scipy.signal.ltisys.StateSpaceDiscrete

but supports sparse matrices and other functionalities.

Methods: - get_mats: return matrices as tuple - check_types: check matrices types are supported - freqresp: calculate frequency response over range. - addGain: project inputs/outputs - scale: allows scaling a system

addGain(K, where)[source]

Projects input u or output y the state-space system through the gain matrix K. The input ‘where’ determines whether inputs or outputs are projected as:

  • where=’in’: inputs are projected such that:

    u_new -> u=K*u_new -> SS -> y => u_new -> SSnew -> y

  • where=’out’: outputs are projected such that:

    u -> SS -> y -> y_new=K*y => u -> SSnew -> ynew

Warning: this is not a wrapper of the addGain method in this module, as the state-space matrices are directly overwritten.

disc2cont()[source]

Transform a discrete time system to a continuous time system using a bilinear (Tustin) transformation.

Wrapper of disc2cont()

eigvals()[source]
Returns

Eigenvalues of the system

Return type

np.ndarray

freqresp(wv)[source]

Calculate frequency response over frequencies wv

Note: this wraps frequency response function.

property inputs

Number of inputs \(m\) to the system.

max_eig()[source]

Returns most unstable eigenvalue

property outputs

Number of outputs \(p\) of the system.

project(WT, V)[source]

Given 2 transformation matrices, (WT,V) of shapes (Nk,self.states) and (self.states,Nk) respectively, this routine projects the state space model states according to:

Anew = WT A V Bnew = WT B Cnew = C V Dnew = D

The projected model has the same number of inputs/outputs as the original one, but Nk states.

scale(input_scal=1.0, output_scal=1.0, state_scal=1.0)[source]

Given a state-space system, scales the equations such that the original state, input and output, (x, u and y), are substituted by

xad=x/state_scal uad=u/input_scal yad=y/output_scal

The entries input_scal/output_scal/state_scal can be:
  • floats: in this case all input/output are scaled by the same value

  • lists/arrays of length Nin/Nout: in this case each dof will be scaled

by a different factor

If the original system has form:

xnew=A*x+B*u y=C*x+D*u

the transformation is such that:

xnew=A*x+(B*uref/xref)*uad yad=1/yref( C*xref*x+D*uref*uad )

property states

Number of states \(n\) of the system.

transfer_function_evaluation(s)[source]

Returns the transfer function of the system evaluated at \(s\in\mathbb{C}\).

Parameters

s (complex) – Point in the complex plane at which to evaluate the transfer function.

Returns

Transfer function evaluated at \(s\).

Return type

np.ndarray

truncate(N)[source]

Retains only the first N states.

ss_block
class sharpy.linear.src.libss.ss_block(A, B, C, D, S_states, S_inputs, S_outputs, dt=None)[source]

State-space model in block form. This class has the same purpose as “ss”, but the A, B, C, D are allocated in the form of nested lists. The format is similar to the one used in numpy.block but:

  1. Block matrices can contain both dense and sparse matrices

  2. Empty blocks are defined through None type

Methods: - remove_block: drop one of the blocks from the s-s model - addGain: project inputs/outputs - project: project state

addGain(K, where)[source]

Projects input u or output y the state-space system through the gain block matrix K. The input ‘where’ determines whether inputs or outputs are projected as:

  • where=’in’: inputs are projected such that:

    u_new -> u=K*u_new -> SS -> y => u_new -> SSnew -> y

  • where=’out’: outputs are projected such that:

    u -> SS -> y -> y_new=K*y => u -> SSnew -> ynew

Input: K must be a list of list of matrices. The size of K must be compatible with either B or C for block matrix product.

get_sizes(M)[source]

Get the size of each block in M.

project(WT, V, by_arrays=True, overwrite=False)[source]

Given 2 transformation matrices, (W,V) of shape (Nk,self.states), this routine projects the state space model states according to:

Anew = W^T A V Bnew = W^T B Cnew = C V Dnew = D

The projected model has the same number of inputs/outputs as the original one, but Nk states.

Inputs: - WT = W^T - V = V - by_arrays: if True, W, V are either numpy.array or sparse matrices. If

False, they are block matrices.

  • overwrite: if True, overwrites the A, B, C matrices

remove_block(where, index)[source]

Remove a block from either inputs or outputs.

Inputs: - where = {‘in’, ‘out’}: determined whether to remove inputs or outputs - index: index of block to remove

ss_to_scipy

Converts to a scipy.signal linear time invariant system

param ss

SHARPy state space object

type ss

libss.ss

returns

scipy.signal.dlti

sum_ss

Given 2 systems or gain matrices (or a combination of the two) having the same amount of input/output, the function returns a gain or state space model summing the two. Namely, given:

u -> SS1 -> y1 u -> SS2 -> y2

we obtain:

u -> SStot -> y1+y2 if negative=False

Linear aeroelastic model based on coupled GEBM + UVLM

Linear aeroelastic model based on coupled GEBM + UVLM S. Maraniello, Jul 2018

LinAeroEla
class sharpy.linear.src.lin_aeroelastic.LinAeroEla(data, custom_settings_linear=None, uvlm_block=False, chosen_ts=None)[source]
Future work:
  • settings are converted from string to type in __init__ method.

  • implement all settings of LinUVLM (e.g. support for sparse matrices)

When integrating in SHARPy:
  • define:
    • self.setting_types

    • self.setting_default

  • use settings.to_custom_types(self.in_dict, self.settings_types, self.settings_default) for conversion to type.

Parameters
  • data (sharpy.presharpy.PreSharpy) – main SHARPy data class

  • settings_linear (dict) – optional settings file if they are not included in the data structure

settings

solver settings for the linearised aeroelastic solution

Type

dict

lingebm

linearised geometrically exact beam model

Type

lingebm.FlexDynamic

num_dof_str

number of structural degrees of freedom

Type

int

num_dof_rig

number of rigid degrees of freedom

Type

int

num_dof_flex

number of flexible degrees of freedom (num_dof_flex+num_dof_rigid=num_dof_str)

Type

int

linuvl

linearised UVLM class

Type

linuvlm.Dynamic

tsaero

aerodynamic state timestep info

Type

sharpy.utils.datastructures.AeroTimeStepInfo

tsstr

structural state timestep info

Type

sharpy.utils.datastructures.StructTimeStepInfo

dt

time increment

Type

float

q

corresponding vector of displacements of dimensions [1, num_dof_str]

Type

np.array

dq

time derivative (\(\dot{\mathbf{q}}\)) of the corresponding vector of displacements with dimensions [1, num_dof_str]

Type

np.array

SS

state space formulation (discrete or continuous time), as selected by the user

Type

scipy.signal

assemble_ss(beam_num_modes=None, wake_prop_settings=None)[source]

Assemble State Space formulation

get_gebm2uvlm_gains()[source]
Provides:
  • the gain matrices required to connect the linearised GEBM and UVLM

inputs/outputs

  • the stiffening and damping factors to be added to the linearised

GEBM equations in order to account for non-zero aerodynamic loads at the linearisation point.

The function produces the gain matrices:

  • Kdisp: gains from GEBM to UVLM grid displacements

  • Kvel_disp: influence of GEBM dofs displacements to UVLM grid velocities.

  • Kvel_vel: influence of GEBM dofs displacements to UVLM grid displacements.

  • Kforces (UVLM->GEBM) dimensions are the transpose than the

Kdisp and Kvel* matrices. Hence, when allocation this term, ii and jj indices will unintuitively refer to columns and rows, respectively.

And the stiffening/damping terms accounting for non-zero aerodynamic forces at the linearisation point:

  • Kss: stiffness factor (flexible dof -> flexible dof) accounting

for non-zero forces at the linearisation point. - Csr: damping factor (rigid dof -> flexible dof) - Crs: damping factor (flexible dof -> rigid dof) - Crr: damping factor (rigid dof -> rigid dof)

Stiffening and damping related terms due to the non-zero aerodynamic forces at the linearisation point:

\[\mathbf{F}_{A,n} = C^{AG}(\mathbf{\chi})\sum_j \mathbf{f}_{G,j} \rightarrow \delta\mathbf{F}_{A,n} = C^{AG}_0 \sum_j \delta\mathbf{f}_{G,j} + \frac{\partial}{\partial\chi}(C^{AG}\sum_j \mathbf{f}_{G,j}^0)\delta\chi\]

The term multiplied by the variation in the quaternion, \(\delta\chi\), couples the forces with the rigid body equations and becomes part of \(\mathbf{C}_{sr}\).

Similarly, the linearisation of the moments results in expression that contribute to the stiffness and damping matrices.

\[\mathbf{M}_{B,n} = \sum_j \tilde{X}_B C^{BA}(\Psi)C^{AG}(\chi)\mathbf{f}_{G,j}\]
\[\delta\mathbf{M}_{B,n} = \sum_j \tilde{X}_B\left(C_0^{BG}\delta\mathbf{f}_{G,j} + \frac{\partial}{\partial\Psi}(C^{BA}\delta\mathbf{f}^0_{A,j})\delta\Psi + \frac{\partial}{\partial\chi}(C^{BA}_0 C^{AG} \mathbf{f}_{G,j})\delta\chi\right)\]

The linearised equations of motion for the geometrically exact beam model take the input term \(\delta \mathbf{Q}_n = \{\delta\mathbf{F}_{A,n},\, T_0^T\delta\mathbf{M}_{B,n}\}\), which means that the moments should be provided as \(T^T(\Psi)\mathbf{M}_B\) instead of \(\mathbf{M}_A = C^{AB}\mathbf{M}_B\), where \(T(\Psi)\) is the tangential operator.

\[\delta(T^T\mathbf{M}_B) = T^T_0\delta\mathbf{M}_B + \frac{\partial}{\partial\Psi}(T^T\delta\mathbf{M}_B^0)\delta\Psi\]

is the linearised expression for the moments, where the first term would correspond to the input terms to the beam equations and the second arises due to the non-zero aerodynamic moment at the linearisation point and must be subtracted (since it comes from the forces) to form part of \(\mathbf{K}_{ss}\). In addition, the \(\delta\mathbf{M}_B\) term depends on both \(\delta\Psi\) and \(\delta\chi\), therefore those terms would also contribute to \(\mathbf{K}_{ss}\) and \(\mathbf{C}_{sr}\), respectively.

The contribution from the total forces and moments will be accounted for in \(\mathbf{C}_{rr}\) and \(\mathbf{C}_{rs}\).

\[\delta\mathbf{F}_{tot,A} = \sum_n\left(C^{GA}_0 \sum_j \delta\mathbf{f}_{G,j} + \frac{\partial}{\partial\chi}(C^{AG}\sum_j \mathbf{f}_{G,j}^0)\delta\chi\right)\]

Therefore, after running this method, the beam matrices should be updated as:

>>> K_beam[:flex_dof, :flex_dof] += Kss
>>> C_beam[:flex_dof, -rigid_dof:] += Csr
>>> C_beam[-rigid_dof:, :flex_dof] += Crs
>>> C_beam[-rigid_dof:, -rigid_dof:] += Crr

Track body option

The track_body setting restricts the UVLM grid to linear translation motions and therefore should be used to ensure that the forces are computed using the reference linearisation frame.

The UVLM and beam are linearised about a reference equilibrium condition. The UVLM is defined in the inertial reference frame while the beam employs the body attached frame and therefore a projection from one frame onto another is required during the coupling process.

However, the inputs to the UVLM (i.e. the lattice grid coordinates) are obtained from the beam deformation which is expressed in A frame and therefore the grid coordinates need to be projected onto the inertial frame G. As the beam rotates, the projection onto the G frame of the lattice grid coordinates will result in a grid that is not coincident with that at the linearisation reference and therefore the grid coordinates must be projected onto the original frame, which will be referred to as U. The transformation between the inertial frame G and the U frame is a function of the rotation of the A frame and the original position:

\[C^{UG}(\chi) = C^{GA}(\chi_0)C^{AG}(\chi)\]

Therefore, the grid coordinates obtained in A frame and projected onto the G frame can be transformed to the U frame using

\[\zeta_U = C^{UG}(\chi) \zeta_G\]

which allows the grid lattice coordinates to be projected onto the original linearisation frame.

In a similar fashion, the output lattice vertex forces of the UVLM are defined in the original linearisation frame U and need to be transformed onto the inertial frame G prior to projecting them onto the A frame to use them as the input forces to the beam system.

\[\boldsymbol{f}_G = C^{GU}(\chi)\boldsymbol{f}_U\]

The linearisation of the above relations lead to the following expressions that have to be added to the coupling matrices:

  • Kdisp_vel terms:

    \[\delta\boldsymbol{\zeta}_U= C^{GA}_0 \frac{\partial}{\partial \boldsymbol{\chi}} \left(C^{AG}\boldsymbol{\zeta}_{G,0}\right)\delta\boldsymbol{\chi} + \delta\boldsymbol{\zeta}_G\]
  • Kvel_vel terms:

    \[\delta\dot{\boldsymbol{\zeta}}_U= C^{GA}_0 \frac{\partial}{\partial \boldsymbol{\chi}} \left(C^{AG}\dot{\boldsymbol{\zeta}}_{G,0}\right)\delta\boldsymbol{\chi} + \delta\dot{\boldsymbol{\zeta}}_G\]

The transformation of the forces and moments introduces terms that are functions of the orientation and are included as stiffening and damping terms in the beam’s matrices:

  • Csr damping terms relating to translation forces:

    \[C_{sr}^{tra} -= \frac{\partial}{\partial\boldsymbol{\chi}} \left(C^{GA} C^{AG}_0 \boldsymbol{f}_{G,0}\right)\delta\boldsymbol{\chi}\]
  • Csr damping terms related to moments:

    \[C_{sr}^{rot} -= T^\top\widetilde{\mathbf{X}}_B C^{BG} \frac{\partial}{\partial\boldsymbol{\chi}} \left(C^{GA} C^{AG}_0 \boldsymbol{f}_{G,0}\right)\delta\boldsymbol{\chi}\]

The track_body setting.

When track_body is enabled, the UVLM grid is no longer coincident with the inertial reference frame throughout the simulation but rather it is able to rotate as the A frame rotates. This is to simulate a free flying vehicle, where, for instance, the orientation does not affect the aerodynamics. The UVLM defined in this frame of reference, named U, satisfies the following convention:

  • The U frame is coincident with the G frame at the time of linearisation.

  • The U frame rotates as the A frame rotates.

Transformations related to the U frame of reference:

  • The angle between the U frame and the A frame is always constant and equal to \(\boldsymbol{\Theta}_0\).

  • The angle between the A frame and the G frame is \(\boldsymbol{\Theta}=\boldsymbol{\Theta}_0 + \delta\boldsymbol{\Theta}\)

  • The projection of a vector expressed in the G frame onto the U frame is expressed by:

    \[\boldsymbol{v}^U = C^{GA}_0 C^{AG} \boldsymbol{v}^G\]
  • The reverse, a projection of a vector expressed in the U frame onto the G frame, is expressed by

    \[\boldsymbol{v}^U = C^{GA} C^{AG}_0 \boldsymbol{v}^U\]

The effect this has on the aeroelastic coupling between the UVLM and the structural dynamics is that the orientation and change of orientation of the vehicle has no effect on the aerodynamics. The aerodynamics are solely affected by the contribution of the 6-rigid body velocities (as well as the flexible DOFs velocities).

reshape_struct_input()[source]

Reshape structural input in a column vector

Utilities functions for linear analysis

Utilities functions for linear analysis

Info
class sharpy.linear.src.lin_utils.Info(zeta, zeta_dot, u_ext, ftot, mtot, q, qdot, SSaero=None, SSbeam=None, Kas=None, Kftot=None, Kmtot=None, Kmtot_disp=None, Asteady_inv=None)[source]

Summarise info about a data point

comp_tot_force

Compute total force with exact displacements

extract_from_data

Extract relevant info from data structure. If assemble is True, it will also generate a linear UVLM and the displacements/velocities gain matrices

solve_linear

Given 2 Info() classes associated to a reference linearisation point Ref and a perturbed state Pert, the method produces in output the prediction at the Pert state of a linearised model.

The solution is carried on using both the aero and beam input

Linear beam model class

Linear beam model class

S. Maraniello, Aug 2018 N. Goizueta

FlexDynamic
class sharpy.linear.src.lingebm.FlexDynamic(tsinfo, structure=None, custom_settings={})[source]

Define class for linear state-space realisation of GEBM flexible-body equations from SHARPy``timestep_info`` class and with the nonlinear structural information.

The linearised beam takes the following arguments:

Parameters
  • tsinfo (sharpy.utils.datastructures.StructImeStepInfo) – Structural timestep containing the modal information

  • structure (sharpy.solvers.beamloader.Beam) – Beam class with the structural information

  • custom_settings (dict) – settings for the linearised beam

State-space models can be defined in continuous or discrete time (dt required). Modal projection, either on the damped or undamped modal shapes, is also avaiable. The rad/s array wv can be optionally passed for freq. response analysis

To produce the state-space equations:

  1. Set the settings:
    1. modal_projection={True,False}: determines whether to project the states

      onto modal coordinates. Projection over damped or undamped modal shapes can be obtained selecting:

      • proj_modes={'damped','undamped'}

      while

      • inout_coords={'modes','nodal'}

      determines whether the modal state-space inputs/outputs are modal coords or nodal degrees-of-freedom. If modes is selected, the Kin and Kout gain matrices are generated to transform nodal to modal dofs

    2. dlti={True,False}: if true, generates discrete-time system.

      The continuous to discrete transformation method is determined by:

      discr_method={ 'newmark',  # Newmark-beta
                          'zoh',              # Zero-order hold
                          'bilinear'} # Bilinear (Tustin) transformation
      

      DLTIs can be obtained directly using the Newmark-\(\beta\) method

      discr_method='newmark' newmark_damp=xx with xx<<1.0

      for full-states descriptions (modal_projection=False) and modal projection over the undamped structural modes (modal_projection=True and proj_modes). The Zero-order holder and bilinear methods, instead, work in all descriptions, but require the continuous state-space equations.

  2. Generate an instance of the beam

2. Run self.assemble(). The method accepts an additional parameter, Nmodes, which allows using a lower number of modes than specified in self.Nmodes

Examples

>>> beam_settings = {'modal_projection': True,
>>>             'inout_coords': 'modes',
>>>             'discrete_time': False,
>>>             'proj_modes': 'undamped',
>>>             'use_euler': True}
>>>
>>> beam = lingebm.FlexDynamic(tsstruct0, structure=data.structure, custom_settings=beam_settings)
>>>
>>> beam.assemble()

Notes

  • Modal projection will automatically select between damped/undamped modes shapes, based on the data available from tsinfo.

  • If the full system matrices are available, use the modal_sol methods to override mode-shapes and eigenvectors

assemble(Nmodes=None)[source]

Assemble state-space model

Several assembly options are available:

  1. Discrete-time, Newmark-\(\beta\):
    • Modal projection onto undamped modes. It uses the modal projection such that the generalised coordinates \(\eta\) are transformed into modal space by

      \[\mathbf{\eta} = \mathbf{\Phi\,q}\]

      where \(\mathbf{\Phi}\) are the first Nmodes right eigenvectors. Therefore, the equation of motion can be re-written such that the modes normalise the mass matrix to become the identity matrix.

      \[\mathbf{I_{Nmodes}}\mathbf{\ddot{q}} + \mathbf{\Lambda_{Nmodes}\,q} = 0\]

      The system is then assembled in Newmark-\(\beta\) form as detailed in newmark_ss()

    • Full size system assembly. No modifications are made to the mass, damping or stiffness matrices and the system is directly assembled by newmark_ss().

  2. Continuous time state-space

Parameters

Nmodes (int) – number of modes to retain

cont2disc(dt=None)[source]

Convert continuous-time SS model into

converge_modal(wv=None, tol=None, Yref=None, Print=False)[source]

Determine number of modes required to achieve a certain convergence of the modal solution in a prescribed frequency range wv. The H-infinity norm of the error w.r.t. Yref is used for assessing convergence.

Warning

if a reference freq. response, Yref, is not provided, the full- state continuous-time frequency response is used as reference. This requires the full-states matrices Mstr, Cstr, Kstr to be available.

euler_propagation_equations(tsstr)[source]

Introduce the linearised Euler propagation equations that relate the body fixed angular velocities to the Earth fixed Euler angles.

This method will remove the quaternion propagation equations created by SHARPy; the resulting system will have 9 rigid degrees of freedom.

Parameters

tsstr

Returns:

freqresp(wv=None, bode=True)[source]

Computes the frequency response of the current state-space model. If self.modal=True, the in/out are determined according to self.inout_coords

linearise_applied_forces(tsstr=None)[source]

Linearise externally applied follower forces given in the local B reference frame.

Updates the stiffness matrix with terms arising from this linearisation.

The linearised beam equations are expressed in the following frames of reference:

  • Nodal forces: \(\delta \mathbf{f}_A\)

  • Nodal moments: \(\delta(T^T \mathbf{m}_B)\)

  • Total forces (rigid body equations): \(\delta \mathbf{F}_A\)

  • Total moments (rigid body equations): \(\delta \mathbf{M}_A\)

Thus, when linearising externally applied follower forces projected onto the appropriate frame

\[\boldsymbol{f}_A^{ext} = C^{AB}(\boldsymbol{\psi})\boldsymbol{f}^{ext}_B\]

the following terms appear:

\[\delta\boldsymbol{f}_A^{ext} = \frac{\partial}{\partial\boldsymbol{\psi}} \left(C^{AB}(\boldsymbol{\psi})\boldsymbol{f}^{ext}_{0,B}\right)\delta\boldsymbol{\psi} + C^{AB}_0\delta\boldsymbol f_B^{ext}\]

where the \(\delta\boldsymbol{\psi}\) is a stiffenning term that needs to be included in the stiffness matrix. The terms will appear in the rows relating to the translational degrees of freedom and the columns that correspond to the cartesian rotation vector.

\[K_{ss}^{f,\Psi} \leftarrow -\frac{\partial}{\partial\boldsymbol{\psi}} \left(C^{AB}(\boldsymbol{\psi})\boldsymbol{f}^{ext}_{0,B}\right)\]

Externally applied moments in the material frame \(\boldsymbol{m}_B^{ext}\) result in the following linearised expression:

\[\delta(T^\top\boldsymbol{m}_B) = \frac{\partial}{\partial\boldsymbol{\psi}}\left( T^\top(\boldsymbol{\psi})\boldsymbol{m}^{ext}_{0,B}\right)\delta\boldsymbol{\psi} + T_0^\top \delta\boldsymbol{m}_B^{ext}\]

Which results in the following stiffenning term:

\[K_{ss}^{m,\Psi} \leftarrow -\frac{\partial}{\partial\boldsymbol{\psi}}\left( T^\top(\boldsymbol{\psi})\boldsymbol{m}^{ext}_{0,B}\right)\]

The total contribution of moments must be summed up for the rigid body equations, and include contributions due to externally applied forces as well as moments:

\[\boldsymbol{M}_A^{ext} = \sum_n \tilde{\boldsymbol{R}}_A C^{AB}(\boldsymbol{\psi}) \boldsymbol{f}_B^{ext} + \sum C^{AB}(\boldsymbol{\psi})\boldsymbol{m}_B^{ext}\]

The linearisation of this term becomes

\[\delta\boldsymbol{M}_A^{ext} = \sum\left(-\widetilde{C^{AB}_0 \boldsymbol{f}_{0,B}^{ext}}\delta \boldsymbol{R}_A + \widetilde{\boldsymbol{R}}\frac{\partial}{\partial\boldsymbol{\psi}}\left(C^{AB}\boldsymbol{f}_B\right) \delta \boldsymbol{\psi} + \widetilde{\boldsymbol{R}}C^{AB}\delta\boldsymbol{f}^{ext}_B\right) + \sum\left(\frac{\partial}{\partial\boldsymbol{\psi}}\left(C^{AB}\boldsymbol{m}_{0,B}\right) \delta\boldsymbol{\psi} + C^AB\delta\boldsymbol{m}_B^{ext}\right)\]

which gives the following stiffenning terms in the rigid-flex partition of the stiffness matrix:

\[K_{ss}^{M,R} \leftarrow +\sum\widetilde{C^{AB}_0 \boldsymbol{f}_{0,B}^{ext}}\]
\[K_{ss}^{M,\Psi} \leftarrow -\sum\widetilde{\boldsymbol{R}}\frac{\partial}{\partial\boldsymbol{\psi}} \left(C^{AB}\boldsymbol{f}_{0,B}\right)\]

and

\[K_{ss}^{M,\Psi} \leftarrow -\sum\frac{\partial}{\partial\boldsymbol{\psi}} \left(C^{AB}\boldsymbol{m}_{0,B}\right).\]
Parameters

tsstr (sharpy.utils.datastructures.StructTimeStepInfo) – Linearisation time step.

linearise_gravity_forces(tsstr=None)[source]

Linearises gravity forces and includes the resulting terms in the C and K matrices. The method takes the linearisation condition (optional argument), linearises and updates:

  • Stiffness matrix

  • Damping matrix

  • Modal damping matrix

The method works for both the quaternion and euler angle orientation parametrisation.

Parameters

tsstr (sharpy.utils.datastructures.StructTimeStepInfo) – Structural timestep at the linearisation point

Notes

The gravity forces are linearised to express them in terms of the beam formulation input variables:

  • Nodal forces: \(\delta \mathbf{f}_A\)

  • Nodal moments: \(\delta(T^T \mathbf{m}_B)\)

  • Total forces (rigid body equations): \(\delta \mathbf{F}_A\)

  • Total moments (rigid body equations): \(\delta \mathbf{M}_A\)

Gravity forces are naturally expressed in G (inertial) frame

\[\mathbf{f}_{G,0} = \mathbf{M\,g}\]

where the \(\mathbf{M}\) is the tangent mass matrix obtained at the linearisation reference.

To obtain the gravity forces expressed in A frame we make use of the projection matrices

\[\mathbf{f}_A = C^{AG}(\boldsymbol{\chi}) \mathbf{f}_{G,0}\]

that projects a vector in the inertial frame G onto the body attached frame A.

The projection of a vector can then be linearised as

\[\delta \mathbf{f}_A = C^{AG} \delta \mathbf{f}_{G,0} + \frac{\partial}{\partial \boldsymbol{\chi}}(C^{AG} \mathbf{f}_{G,0}) \delta\boldsymbol{\chi}.\]
  • Nodal forces:

    The linearisation of the gravity forces acting at each node is simply

    \[\delta \mathbf{f}_A = + \frac{\partial}{\partial \boldsymbol{\chi}}(C^{AG} \mathbf{f}_{G,0}) \delta\boldsymbol{\chi}\]

    where it is assumed that \(\delta\mathbf{f}_G = 0\).

  • Nodal moments:

    The gravity moments can be expressed in the local node frame of reference B by

    \[\mathbf{m}_B = \tilde{X}_{B,CG}C^{BA}(\Psi)C^{AG}(\boldsymbol{\chi})\mathbf{f}_{G,0}\]

    The linearisation is given by:

    \[\delta \mathbf{m}_B = \tilde{X}_{B,CG} \left(\frac{\partial}{\partial\Psi}(C^{BA}\mathbf{f}_{A,0})\delta\Psi + C^{BA}\frac{\partial}{\partial\boldsymbol{\chi}}(C^{AG}\mathbf{f}_{G,0})\delta\boldsymbol{\chi}\right)\]

    However, recall that the input moments are defined in tangential space \(\delta(T^\top\mathbf{m}_B)\) whose linearised expression is

    \[\delta(T^T(\Psi) \mathbf{m}_B) = T_0^T \delta \mathbf{m}_B + \frac{\partial}{\partial \Psi}(T^T \mathbf{m}_{B,0})\delta\Psi\]

    where the \(\delta \mathbf{m}_B\) term has been defined above.

  • Total forces:

    The total forces include the contribution from all flexible degrees of freedom as well as the gravity forces arising from the mass at the clamped node

    \[\mathbf{F}_A = \sum_n \mathbf{f}_A + \mathbf{f}_{A,clamped}\]

    which becomes

    \[\delta \mathbf{F}_A = \sum_n \delta \mathbf{f}_A + \frac{\partial}{\partial\boldsymbol{\chi}}\left(C^{AG}\mathbf{f}_{G,clamped}\right) \delta\boldsymbol{\chi}.\]
  • Total moments:

    The total moments, as opposed to the nodal moments, are expressed in A frame and again require the addition of the moments from the flexible structural nodes as well as the ones from the clamped node itself.

    \[\mathbf{M}_A = \sum_n \tilde{X}_{A,n}^{CG} C^{AG} \mathbf{f}_{n,G} + \tilde{X}_{A,clamped}C^{AG}\mathbf{f}_{G, clamped}\]

    where \(X_{A,n}^{CG} = R_{A,n} + C^{AB}(\Psi)X_{B,n}^{CG}\). Its linearised form is

    \[\delta X_{A,n}^{CG} = \delta R_{A,n} + \frac{\partial}{\partial \Psi}(C^{AB} X_{B,CG})\delta\Psi\]

    Therefore, the overall linearisation of the total moment is defined as

    \[\delta \mathbf{M}_A = \tilde{X}_{A,total}^{CG} \frac{\partial}{\partial \boldsymbol{\chi}}(C^{AG}\mathbf{F}_{G, total}) \delta \boldsymbol{\chi} -\sum_n \tilde{C}^{AG}\mathbf{f}_{G,0} \delta X_{A,n}^{CG}\]

    where \(X_{A, total}\) is the centre of gravity of the entire system expressed in A frame and \(\mathbf{F}_{G, total}\) are the gravity forces of the overall system in G frame, including the contributions from the clamped node.

The linearisation introduces damping and stiffening terms since the \(\delta\boldsymbol{\chi}\) and \(\delta\boldsymbol{\Psi}\) terms are found in the damping and stiffness matrices respectively.

Therefore, the beam matrices need updating to account for these terms:

  • Terms from the linearisation of the nodal moments will be assembled in the rows corresponding to moment equations and columns corresponding to the cartesian rotation vector

    \[K_{ss}^{m,\Psi} \leftarrow -T_0^T \tilde{X}_{B,CG} \frac{\partial}{\partial\Psi}(C^{BA}\mathbf{f}_{A,0}) -\frac{\partial}{\partial \Psi}(T^T \mathbf{m}_{B,0})\]
  • Terms from the linearisation of the translation forces with respect to the orientation are assembled in the damping matrix, the rows corresponding to translational forces and columns to orientation degrees of freedom

    \[C_{sr}^{f,\boldsymbol{\chi}} \leftarrow - \frac{\partial}{\partial \boldsymbol{\chi}}(C^{AG} \mathbf{f}_{G,0})\]
  • Terms from the linearisation of the moments with respect to the orientation are assembled in the damping matrix, with the rows correspondant to the moments and the columns to the orientation degrees of freedom

    \[C_{sr}^{m,\boldsymbol{\chi}} \leftarrow - T_0^T\tilde{X}_{B,CG}C^{BA}\frac{\partial}{\partial\boldsymbol{\chi}}(C^{AG}\mathbf{f}_{G,0})\]
  • Terms from the linearisation of the total forces with respect to the orientation correspond to the rigid body equations in the damping matrix, the rows to the translational forces and columns to the orientation

    \[C_{rr}^{F,\boldsymbol{\chi}} \leftarrow - \sum_n \frac{\partial}{\partial \boldsymbol{\chi}}(C^{AG} \mathbf{f}_{G,0})\]
  • Terms from the linearisation of the total moments with respect to the orientation correspond to the rigid body equations in the damping matrix, the rows to the moments and the columns to the orientation

    \[C_{rr}^{M,\boldsymbol{\chi}} \leftarrow - \sum_n\tilde{X}_{A,n}^{CG} \frac{\partial}{\partial \boldsymbol{\chi}}(C^{AG}\mathbf{f}_{G,0})\]
  • Terms from the linearisation of the total moments with respect to the nodal position \(R_A\) are included in the stiffness matrix, the rows corresponding to the moments in the rigid body equations and the columns to the nodal position

    \[K_{rs}^{M,R} \leftarrow + \sum_n \tilde{\mathbf{f}_{A,0}}\]
  • Terms from the linearisation of the total moments with respect to the cartesian rotation vector are included in the stiffness matrix, the rows corresponding to the moments in the rigid body equations and the columns to the cartesian rotation vector

    \[K_{rs}^{M, \Psi} \leftarrow + \sum_n \tilde{\mathbf{f}_{A,0}}\frac{\partial}{\partial \Psi}(C^{AB} X_{B,CG})\]
reshape_struct_input()[source]

Reshape structural input in a column vector

scale_system_normalised_time(time_ref)[source]

Scale the system with a normalised time step. The resulting time step is \(\Delta t = \Delta \bar{t}/t_{ref}\), where the over bar denotes dimensional time. The structural equations of motion are rescaled as:

\[\mathbf{M}\ddot{\boldsymbol{\eta}} + \mathbf{C} t_{ref} \dot{\boldsymbol{\eta}} + \mathbf{K} t_{ref}^2 \boldsymbol{\eta} = t_{ref}^2 \mathbf{N}\]

For aeroelastic applications, the reference time is usually defined using the semi-chord, \(b\), and the free stream velocity, \(U_\infty\).

\[t_{ref,ae} = \frac{b}{U_\infty}\]
Parameters

time_ref (float) – Normalisation factor such that \(t/\bar{t}\) is non-dimensional.

tune_newmark_damp(amplification_factor=0.999)[source]

Tune artifical damping to achieve a percent reduction of the lower frequency (lower damped) mode

update_modal()[source]

Re-projects the full-states continuous-time structural dynamics equations

\[\mathbf{M}\,\mathbf{\ddot{x}} +\mathbf{C}\,\mathbf{\dot{x}} + \mathbf{K\,x} = \mathbf{F}\]

onto modal space. The modes used to project are controlled through the self.proj_modes={damped or undamped} attribute.

Warning

This method overrides SHARPy timestep_info results and requires Mstr, Cstr, Kstr to be available.

update_truncated_modes(nmodes)[source]

Updates the system to the specified number of modes

Parameters

nmodes

Returns:

newmark_ss

Produces a discrete-time state-space model of the structural equations

\[\begin{split}\mathbf{\ddot{x}} &= \mathbf{M}^{-1}( -\mathbf{C}\,\mathbf{\dot{x}}-\mathbf{K}\,\mathbf{x}+\mathbf{F} ) \\ \mathbf{y} &= \mathbf{x}\end{split}\]

based on the Newmark-\(\beta\) integration scheme. The output state-space model has form:

\[\begin{split}\mathbf{X}_{n+1} &= \mathbf{A}\,\mathbf{X}_n + \mathbf{B}\,\mathbf{F}_n \\ \mathbf{Y} &= \mathbf{C}\,\mathbf{X} + \mathbf{D}\,\mathbf{F}\end{split}\]

with \(\mathbf{X} = [\mathbf{x}, \mathbf{\dot{x}}]^T\)

Note that as the state-space representation only requires the input force \(\mathbf{F}\) to be evaluated at time-step \(n\),the \(\mathbf{C}\) and \(\mathbf{D}\) matrices are, in general, fully populated.

The Newmark-\(\beta\) integration scheme is carried out following the modifications presented by Geradin [1] that render it unconditionally stable. The displacement and velocities are estimated as:

\[\begin{split}x_{n+1} &= x_n + \Delta t \dot{x}_n + \left(\frac{1}{2}-\theta_2\right)\Delta t^2 \ddot{x}_n + \theta_2\Delta t \ddot{x}_{n+1} \\ \dot{x}_{n+1} &= \dot{x}_n + (1-\theta_1)\Delta t \ddot{x}_n + \theta_1\Delta t \ddot{x}_{n+1}\end{split}\]

The stencil is unconditionally stable if the tuning parameters \(\theta_1\) and \(\theta_2\) are chosen as:

\[\begin{split}\theta_1 &= \frac{1}{2} + \alpha \\ \theta_2 &= \frac{1}{4} \left(\theta_1 + \frac{1}{2}\right)^2 \\ \theta_2 &= \frac{5}{80} + \frac{1}{4} (\theta_1 + \theta_1^2) \text{TBC SOURCE}\end{split}\]

where \(\alpha>0\) accounts for small positive algorithmic damping.

The following steps describe how to apply the Newmark-beta scheme to a state-space formulation. The original idea is based on [1].

The equation of a second order system dynamics reads:

\[M\mathbf{\ddot q} + C\mathbf{\dot q} + K\mathbf{q} = F\]

Applying that equation to the time steps \(n\) and \(n+1\), rearranging terms and multiplying by \(M^{-1}\):

\[\begin{split}\mathbf{\ddot q}_{n} = - M^{-1}C\mathbf{\dot q}_{n} - M^{-1}K\mathbf{q}_{n} + M^{-1}F_{n} \\ \mathbf{\ddot q}_{n+1} = - M^{-1}C\mathbf{\dot q}_{n+1} - M^{-1}K\mathbf{q}_{n+1} + M^{-1}F_{n+1}\end{split}\]

The relations of the Newmark-beta scheme are:

\[\begin{split}\mathbf{q}_{n+1} &= \mathbf{q}_n + \mathbf{\dot q}_n\Delta t + (\frac{1}{2}-\beta)\mathbf{\ddot q}_n \Delta t^2 + \beta \mathbf{\ddot q}_{n+1} \Delta t^2 + O(\Delta t^3) \\ \mathbf{\dot q}_{n+1} &= \mathbf{\dot q}_n + (1-\gamma)\mathbf{\ddot q}_n \Delta t + \gamma \mathbf{\ddot q}_{n+1} \Delta t + O(\Delta t^3)\end{split}\]

Substituting the former relation onto the later ones, rearranging terms, and writing it in state-space form:

\[\begin{split}\begin{bmatrix} I + M^{-1}K \Delta t^2\beta \quad \Delta t^2\beta M^{-1}C \\ (\gamma \Delta t M^{-1}K) \quad (I + \gamma \Delta t M^{-1}C) \end{bmatrix} \begin{Bmatrix} \mathbf{\dot q}_{n+1} \\ \mathbf{\ddot q}_{n+1} \end{Bmatrix} = \begin{bmatrix} (I - \Delta t^2(1/2-\beta)M^{-1}K \quad (\Delta t - \Delta t^2(1/2-\beta)M^{-1}C \\ (-(1-\gamma)\Delta t M^{-1}K \quad (I - (1-\gamma)\Delta tM^{-1}C \end{bmatrix} \begin{Bmatrix} \mathbf{q}_{n} \\ \mathbf{\dot q}_{n} \end{Bmatrix} + \begin{Bmatrix} (\Delta t^2(1/2-\beta) \\ (1-\gamma)\Delta t \end{Bmatrix} M^{-1}F_n+ \begin{Bmatrix} (\Delta t^2\beta) \\ (\gamma \Delta t) \end{Bmatrix}M^{-1}F_{n+1}\end{split}\]

To understand SHARPy code, it is convenient to apply the following change of notation:

\[\begin{split}\textrm{th1} = \gamma \\ \textrm{th2} = \beta \\ \textrm{a0} = \Delta t^2 (1/2 -\beta) \\ \textrm{b0} = \Delta t (1 -\gamma) \\ \textrm{a1} = \Delta t^2 \beta \\ \textrm{b1} = \Delta t \gamma \\\end{split}\]

Finally:

\[\begin{split}A_{ss1} \begin{Bmatrix} \mathbf{\dot q}_{n+1} \\ \mathbf{\ddot q}_{n+1} \end{Bmatrix} = A_{ss0} \begin{Bmatrix} \mathbf{\dot q}_{n} \\ \mathbf{\ddot q}_{n} \end{Bmatrix} + \begin{Bmatrix} (\Delta t^2(1/2-\beta) \\ (1-\gamma)\Delta t \end{Bmatrix} M^{-1}F_n+ \begin{Bmatrix} (\Delta t^2\beta) \\ (\gamma \Delta t) \end{Bmatrix}M^{-1}F_{n+1}\end{split}\]

To finally isolate the vector at \(n+1\), instead of inverting the \(A_{ss1}\) matrix, several systems are solved. Moreover, the output equation is simply \(y=x\).

param Minv

Inverse mass matrix \(\mathbf{M^{-1}}\)

type Minv

np.array

param C

Damping matrix \(\mathbf{C}\)

type C

np.array

param K

Stiffness matrix \(\mathbf{K}\)

type K

np.array

param dt

Timestep increment

type dt

float

param num_damp

Numerical damping. Default 1e-4

type num_damp

float

returns

the A, B, C, D matrices of the state space packed in a tuple with the predictor and delay term removed.

rtype

tuple

References

[1] - Geradin M., Rixen D. - Mechanical Vibrations: Theory and application to structural dynamics

sort_eigvals

sort by magnitude (frequency) and imaginary part if complex conj

Linear UVLM solver classes

Linear UVLM solver classes

Contains classes to assemble a linear UVLM system. The three main classes are:

  • Static: : for static VLM solutions.

  • Dynamic: for dynamic UVLM solutions.

  • DynamicBlock: a more efficient representation of Dynamic using lists for the different blocks in the UVLM equations

References:

Maraniello, S., & Palacios, R.. State-Space Realizations and Internal Balancing in Potential-Flow Aerodynamics with Arbitrary Kinematics. AIAA Journal, 57(6), 1–14. 2019. https://doi.org/10.2514/1.J058153

Dynamic
class sharpy.linear.src.linuvlm.Dynamic(tsdata, dt=None, dynamic_settings=None, integr_order=2, RemovePredictor=True, ScalingDict=None, UseSparse=True, for_vel=numpy.zeros)[source]

Class for dynamic linearised UVLM solution. Linearisation around steady-state are only supported. The class is built upon Static, and inherits all the methods contained there.

Input:
  • tsdata: aero timestep data from SHARPy solution

  • dt: time-step

  • integr_order=2: integration order for UVLM unsteady aerodynamic force

  • RemovePredictor=True: if true, the state-space model is modified so as to accept in input perturbations, u, evaluated at time-step n rather than n+1.

  • ScalingDict=None: disctionary containing fundamental reference units:

    {'length':  reference_length,
    'speed':   reference_speed,
    'density': reference density}
    

    used to derive scaling quantities for the state-space model variables. The scaling factors are stored in self.ScalingFact.

    Note that while time, circulation, angular speeds) are scaled accordingly, FORCES ARE NOT. These scale by \(q_\infty b^2\), where \(b\) is the reference length and \(q_\infty\) is the dynamic pressure.

  • UseSparse=False: builds the A and B matrices in sparse form. C and D are dense anyway so the sparse format cannot be applied to them.

- nondimss

normalises a dimensional state-space model based on the scaling factors in self.ScalingFact.

- dimss

inverse of nondimss.

- assemble_ss

builds state-space model. See function for more details.

- assemble_ss_profiling

generate profiling report of the assembly and saves it into self.prof_out. To read the report:

import pstats
p = pstats.Stats(self.prof_out)
- solve_steady

solves for the steady state. Several methods available.

- solve_step

solves one time-step

- freqresp

ad-hoc method for fast frequency response (only implemented) for remove_predictor=False

Nx

Number of states

Type

int

Nu

Number of inputs

Type

int

Ny

Number of outputs

Type

int

K

Number of paneles \(K = MN\)

Type

int

K_star

Number of wake panels \(K^*=M^*N\)

Type

int

Kzeta

Number of panel vertices \(K_\zeta=(M+1)(N+1)\)

Type

int

Kzeta_star

Number of wake panel vertices \(K_{\zeta,w} = (M^*+1)(N+1)\)

Type

int

To do: Upgrade to linearise around unsteady snapshot (adjoint)

property Nu

Number of inputs \(m\) to the system.

property Nx

Number of states \(n\) of the system.

property Ny

Number of outputs \(p\) of the system.

assemble_ss(wake_prop_settings=None)[source]

Produces state-space model of the form

\[\begin{split}\mathbf{x}_{n+1} &= \mathbf{A}\,\mathbf{x}_n + \mathbf{B} \mathbf{u}_{n+1} \\ \mathbf{y}_n &= \mathbf{C}\,\mathbf{x}_n + \mathbf{D} \mathbf{u}_n\end{split}\]

where the state, inputs and outputs are:

\[\mathbf{x}_n = \{ \delta \mathbf{\Gamma}_n,\, \delta \mathbf{\Gamma_{w_n}},\, \Delta t\,\delta\mathbf{\Gamma}'_n,\, \delta\mathbf{\Gamma}_{n-1} \}\]
\[\mathbf{u}_n = \{ \delta\mathbf{\zeta}_n,\, \delta\mathbf{\zeta}'_n,\, \delta\mathbf{u}_{ext,n} \}\]
\[\mathbf{y} = \{\delta\mathbf{f}\}\]

with \(\mathbf{\Gamma}\in\mathbb{R}^{MN}\) being the vector of vortex circulations, \(\mathbf{\zeta}\in\mathbb{R}^{3(M+1)(N+1)}\) the vector of vortex lattice coordinates and \(\mathbf{f}\in\mathbb{R}^{3(M+1)(N+1)}\) the vector of aerodynamic forces and moments. Note that \((\bullet)'\) denotes a derivative with respect to time.

Note that the input is atypically defined at time n+1, therefore by default self.remove_predictor = True and the predictor term u_{n+1} is eliminated through the change of state[1]:

\[\begin{split}\mathbf{h}_n &= \mathbf{x}_n - \mathbf{B}\,\mathbf{u}_n \\\end{split}\]

such that:

\[\begin{split}\mathbf{h}_{n+1} &= \mathbf{A}\,\mathbf{h}_n + \mathbf{A\,B}\,\mathbf{u}_n \\ \mathbf{y}_n &= \mathbf{C\,h}_n + (\mathbf{C\,B}+\mathbf{D})\,\mathbf{u}_n\end{split}\]

which only modifies the equivalent \(\mathbf{B}\) and \(\mathbf{D}\) matrices.

References

[1] Franklin, GF and Powell, JD. Digital Control of Dynamic Systems, Addison-Wesley Publishing Company, 1980

To do: - remove all calls to scipy.linalg.block_diag

assemble_ss_profiling()[source]

Generate profiling report for assembly and save it in self.prof_out.

To read the report:

import pstats p=pstats.Stats(self.prof_out)

balfreq(DictBalFreq, wake_prop_settings=None)[source]

Low-rank method for frequency limited balancing. The Observability ad controllability Gramians over the frequencies kv are solved in factorised form. Balancd modes are then obtained with a square-root method.

Details:

Observability and controllability Gramians are solved in factorised form through explicit integration. The number of integration points determines both the accuracy and the maximum size of the balanced model.

Stability over all (Nb) balanced states is achieved if:

  1. one of the Gramian is integrated through the full Nyquist range

  2. the integration points are enough.

Note, however, that even when stability is not achieved over the full balanced states, stability of the balanced truncated model with Ns<=Nb states is normally observed even when a low number of integration points is used. Two integration methods (trapezoidal rule on uniform grid and Gauss-Legendre quadrature) are provided.

Input:

  • DictBalFreq: dictionary specifying integration method with keys:

    • frequency: defines limit frequencies for balancing. The balanced model will be accurate in the range [0,F], where F is the value of this key. Note that F units must be consistent with the units specified in the self.ScalingFacts dictionary.

    • method_low: [‘gauss’,’trapz’] specifies whether to use gauss quadrature or trapezoidal rule in the low-frequency range [0,F]

    • options_low: options to use for integration in the low-frequencies. These depend on the integration scheme (See below).

    • method_high: method to use for integration in the range [F,F_N], where F_N is the Nyquist frequency. See ‘method_low’.

    • options_high: options to use for integration in the high-frequencies.

    • check_stability: if True, the balanced model is truncated to eliminate unstable modes - if any is found. Note that very accurate balanced model can still be obtained, even if high order modes are unstable. Note that this option is overridden if “”

    • get_frequency_response: if True, the function also returns the frequency response evaluated at the low-frequency range integration points. If True, this option also allows to automatically tune the balanced model.

Future options:

  • truncation_tolerance: if get_frequency_response is True, allows to truncate the balanced model so as to achieved a prescribed tolerance in the low-frequwncy range.

  • Ncpu: for parallel run

The following integration schemes are available:

  • trapz: performs integration over equally spaced points using trapezoidal rule. It accepts options dictionaries with keys:

    • points: number of integration points to use (including domain boundary)

  • gauss performs gauss-lobotto quadrature. The domain can be partitioned in Npart sub-domain in which the gauss-lobotto quadrature of order Ord can be applied. A total number of Npart*Ord points is required. It accepts options dictionaries of the form:

    • partitions: number of partitions

    • order: quadrature order.

Example:

The following dictionary

DictBalFreq={   'frequency': 1.2,
                'method_low': 'trapz',
                'options_low': {'points': 12},
                'method_high': 'gauss',
                'options_high': {'partitions': 2, 'order': 8},
                'check_stability': True }

balances the state-space model self.SS in the frequency range [0, 1.2] using

  1. 12 equally-spaced points integration of the Gramians in the low-frequency range [0,1.2] and

  2. a 2 Gauss-Lobotto 8-th order quadratures of the controllability Gramian in the high-frequency range.

A total number of 28 integration points will be required, which will result into a balanced model with number of states min{2*28* number_inputs, 2*28* number_outputs}

The model is finally truncated so as to retain only the first Ns stable modes.

balfreq_profiling(wake_prop_settings=None)[source]

Generate profiling report for balfreq function and saves it into self.prof_out. The function also returns a pstats.Stats object.

To read the report:
import pstats
p=pstats.Stats(self.prof_out).sort_stats('cumtime')
p.print_stats(20)
freqresp(kv, wake_prop_settings=None)[source]

Ad-hoc method for fast UVLM frequency response over the frequencies kv. The method, only requires inversion of a K x K matrix at each frequency as the equation for propagation of wake circulation are solved exactly. The algorithm implemented here can be used also upon projection of the state-space model.

Note: This method is very similar to the “minsize” solution option is the steady_solve.

get_Cw_cpx(zval, settings=None)[source]

Produces a sparse matrix

\[\bar{\mathbf{C}}(z)\]

where

\[z = e^{k \Delta t}\]

such that the wake circulation frequency response at \(z\) is

\[\bar{\boldsymbol{\Gamma}}_w = \bar{\mathbf{C}}(z) \bar{\mathbf{\Gamma}}\]
nondimss()[source]

Scale state-space model based of self.ScalingFacts

solve_steady(usta, method='direct')[source]

Steady state solution from state-space model.

Warning: these methods are less efficient than the solver in Static class, Static.solve, and should be used only for verification purposes. The “minsize” method, however, guarantees the inversion of a K x K matrix only, similarly to what is done in Static.solve.

solve_step(x_n, u_n, u_n1=None, transform_state=False)[source]

Solve step.

If the predictor term has not been removed (remove_predictor = False) then the system is solved as:

\[\begin{split}\mathbf{x}^{n+1} &= \mathbf{A\,x}^n + \mathbf{B\,u}^n \\ \mathbf{y}^{n+1} &= \mathbf{C\,x}^{n+1} + \mathbf{D\,u}^n\end{split}\]

Else, if remove_predictor = True, the state is modified as

\[\mathbf{h}^n = \mathbf{x}^n - \mathbf{B\,u}^n\]

And the system solved by:

\[\begin{split}\mathbf{h}^{n+1} &= \mathbf{A\,h}^n + \mathbf{B_{mod}\,u}^{n} \\ \mathbf{y}^{n+1} &= \mathbf{C\,h}^{n+1} + \mathbf{D_{mod}\,u}^{n+1}\end{split}\]

Finally, the original state is recovered using the reverse transformation:

\[\mathbf{x}^{n+1} = \mathbf{h}^{n+1} + \mathbf{B\,u}^{n+1}\]

where the modifications to the \(\mathbf{B}_{mod}\) and \(\mathbf{D}_{mod}\) are detailed in Dynamic.assemble_ss().

Notes

Although the original equations include the term \(\mathbf{u}_{n+1}\), it is a reasonable approximation to take \(\mathbf{u}_{n+1}\approx\mathbf{u}_n\) given a sufficiently small time step, hence if the input at time n+1 is not parsed, it is estimated from \(u^n\).

Parameters
  • x_n (np.array) – State vector at the current time step \(\mathbf{x}^n\)

  • u_n (np.array) – Input vector at time step \(\mathbf{u}^n\)

  • u_n1 (np.array) – Input vector at time step \(\mathbf{u}^{n+1}\)

  • transform_state (bool) – When the predictor term is removed, if true it will transform the state vector. If false it will be assumed that the state vector that is parsed is already transformed i.e. it is \(\mathbf{h}\).

Returns

Updated state and output vector packed in a tuple \((\mathbf{x}^{n+1},\,\mathbf{y}^{n+1})\)

Return type

Tuple

Notes

To speed-up the solution and use minimal memory:
  • solve for bound vorticity (and)

  • propagate the wake

  • compute the output separately.

unpack_state(xvec)[source]

Unpacks the state vector into physical constituents for full order models.

The state vector \(\mathbf{x}\) of the form

\[\mathbf{x}_n = \{ \delta \mathbf{\Gamma}_n,\, \delta \mathbf{\Gamma_{w_n}},\, \Delta t\,\delta\mathbf{\Gamma}'_n,\, \delta\mathbf{\Gamma}_{n-1} \}\]

Is unpacked into:

\[{\delta \mathbf{\Gamma}_n,\, \delta \mathbf{\Gamma_{w_n}},\, \,\delta\mathbf{\Gamma}'_n}\]
Parameters

xvec (np.ndarray) – State vector

Returns

Column vectors for bound circulation, wake circulation and circulation derivative packed in a tuple.

Return type

tuple

DynamicBlock
class sharpy.linear.src.linuvlm.DynamicBlock(tsdata, dt=None, dynamic_settings=None, integr_order=2, RemovePredictor=True, ScalingDict=None, UseSparse=True, for_vel=numpy.zeros)[source]

Class for dynamic linearised UVLM solution. Linearisation around steady-state are only supported.

The class is a low-memory implementation of Dynamic, and inherits most of the methods contained there. State-space models are allocated in list-block form (as per numpy.block) to minimise memory usage. This class provides lower memory / computational time assembly, frequency response and frequency limited balancing.

Input:

  • tsdata: aero timestep data from SHARPy solution

  • dt: time-step

  • integr_order=2: integration order for UVLM unsteady aerodynamic force

  • RemovePredictor=True: if true, the state-space model is modified so as to accept in input perturbations, u, evaluated at time-step n rather than n+1.

  • ScalingDict=None: disctionary containing fundamental reference units

    >>> {'length':  reference_length,
         'speed':   reference_speed,
         'density': reference density}
    

    used to derive scaling quantities for the state-space model variables. The scaling factors are stores in self.ScalingFact.

    Note that while time, circulation, angular speeds) are scaled accordingly, FORCES ARE NOT. These scale by qinf*b**2, where b is the reference length and qinf is the dinamic pressure.

  • UseSparse=False: builds the A and B matrices in sparse form. C and D are dense, hence the sparce format is not used.

- nondimss

normalises a dimensional state-space model based on the scaling factors in self.ScalingFact.

- dimss

inverse of nondimss.

- assemble_ss

builds state-space model. See function for more details.

- assemble_ss_profiling

generate profiling report of the assembly and saves it into self.prof_out. To read the report:

>>> import pstats
    p=pstats.Stats(self.prof_out)
- freqresp

ad-hoc method for fast frequency response (only implemented) for remove_predictor=False

To do: upgrade to linearise around unsteady snapshot (adjoint)

assemble_ss(wake_prop_settings=None)[source]

Produces block-form of state-space model

\[\begin{split}\mathbf{x}_{n+1} &= \mathbf{A}\,\mathbf{x}_n + \mathbf{B} \mathbf{u}_{n+1} \\ \mathbf{y}_n &= \mathbf{C}\,\mathbf{x}_n + \mathbf{D} \mathbf{u}_n\end{split}\]

where the state, inputs and outputs are:

\[\mathbf{x}_n = \{ \delta \mathbf{\Gamma}_n,\, \delta \mathbf{\Gamma_{w_n}},\, \Delta t\,\delta\mathbf{\Gamma}'_n,\, \delta\mathbf{\Gamma}_{n-1} \}\]
\[\mathbf{u}_n = \{ \delta\mathbf{\zeta}_n,\, \delta\mathbf{\zeta}'_n,\, \delta\mathbf{u}_{ext,n} \}\]
\[\mathbf{y} = \{\delta\mathbf{f}\}\]

with \(\mathbf{\Gamma}\) being the vector of vortex circulations, \(\mathbf{\zeta}\) the vector of vortex lattice coordinates and \(\mathbf{f}\) the vector of aerodynamic forces and moments. Note that \((\bullet)'\) denotes a derivative with respect to time.

Note that the input is atypically defined at time n+1, therefore by default self.remove_predictor = True and the predictor term u_{n+1} is eliminated through the change of state[1]:

\[\begin{split}\mathbf{h}_n &= \mathbf{x}_n - \mathbf{B}\,\mathbf{u}_n \\\end{split}\]

such that:

\[\begin{split}\mathbf{h}_{n+1} &= \mathbf{A}\,\mathbf{h}_n + \mathbf{A\,B}\,\mathbf{u}_n \\ \mathbf{y}_n &= \mathbf{C\,h}_n + (\mathbf{C\,B}+\mathbf{D})\,\mathbf{u}_n\end{split}\]

which only modifies the equivalent \(\mathbf{B}\) and \(\mathbf{D}\) matrices.

References

[1] Franklin, GF and Powell, JD. Digital Control of Dynamic Systems, Addison-Wesley Publishing Company, 1980

To do: - remove all calls to scipy.linalg.block_diag

balfreq(DictBalFreq, wake_prop_settings=None)[source]

Low-rank method for frequency limited balancing. The Observability ad controllability Gramians over the frequencies kv are solved in factorised form. Balancd modes are then obtained with a square-root method.

Details: Observability and controllability Gramians are solved in factorised form through explicit integration. The number of integration points determines both the accuracy and the maximum size of the balanced model.

Stability over all (Nb) balanced states is achieved if:
  1. one of the Gramian is integrated through the full Nyquist range

  2. the integration points are enough.

Note, however, that even when stability is not achieved over the full balanced states, stability of the balanced truncated model with Ns<=Nb states is normally observed even when a low number of integration points is used. Two integration methods (trapezoidal rule on uniform grid and Gauss-Legendre quadrature) are provided.

Input:

  • DictBalFreq: dictionary specifying integration method with keys:

    • ‘frequency’: defines limit frequencies for balancing. The balanced

    model will be accurate in the range [0,F], where F is the value of this key. Note that F units must be consistent with the units specified in the self.ScalingFacts dictionary.

    • ‘method_low’: [‘gauss’,’trapz’] specifies whether to use gauss

    quadrature or trapezoidal rule in the low-frequency range [0,F]

    • ‘options_low’: options to use for integration in the low-frequencies.

    These depend on the integration scheme (See below).

    • ‘method_high’: method to use for integration in the range [F,F_N],

    where F_N is the Nyquist frequency. See ‘method_low’.

    • ‘options_high’: options to use for integration in the high-frequencies.

    • ‘check_stability’: if True, the balanced model is truncated to

    eliminate unstable modes - if any is found. Note that very accurate balanced model can still be obtained, even if high order modes are unstable. Note that this option is overridden if “”

    • ‘get_frequency_response’: if True, the function also returns the

    frequency response evaluated at the low-frequency range integration points. If True, this option also allows to automatically tune the balanced model.

Future options:

  • ‘truncation_tolerance’: if ‘get_frequency_response’ is True, allows

to truncatethe balanced model so as to achieved a prescribed tolerance in the low-frequwncy range.

  • Ncpu: for parallel run

The following integration schemes are available:
  • ‘trapz’: performs integration over equally spaced points using

trapezoidal rule. It accepts options dictionaries with keys:
  • ‘points’: number of integration points to use (including

domain boundary)

  • ‘gauss’ performs gauss-lobotto quadrature. The domain can be

partitioned in Npart sub-domain in which the gauss-lobotto quadrature of order Ord can be applied. A total number of Npart*Ord points is required. It accepts options dictionaries of the form:

  • ‘partitions’: number of partitions

  • ‘order’: quadrature order.

Example: The following dictionary

DictBalFreq={ ‘frequency’: 1.2,

‘method_low’: ‘trapz’, ‘options_low’: {‘points’: 12}, ‘method_high’: ‘gauss’, ‘options_high’: {‘partitions’: 2, ‘order’: 8}, ‘check_stability’: True }

balances the state-space model self.SS in the frequency range [0, 1.2] using

  1. 12 equally-spaced points integration of the Gramians in

the low-frequency range [0,1.2] and

(b) a 2 Gauss-Lobotto 8-th order quadratures of the controllability Gramian in the high-frequency range.

A total number of 28 integration points will be required, which will result into a balanced model with number of states

min{ 2*28* number_inputs, 2*28* number_outputs }

The model is finally truncated so as to retain only the first Ns stable modes.

freqresp(kv, wake_prop_settings=None)[source]

Ad-hoc method for fast UVLM frequency response over the frequencies kv. The method, only requires inversion of a K x K matrix at each frequency as the equation for propagation of wake circulation are solved exactly. The algorithm implemented here can be used also upon projection of the state-space model.

Note: This method is very similar to the “minsize” solution option is the steady_solve.

nondimss()[source]

Scale state-space model based of self.ScalingFacts.

solve_step(x_n, u_n, u_n1=None, transform_state=False)[source]

Solve step.

If the predictor term has not been removed (remove_predictor = False) then the system is solved as:

\[\begin{split}\mathbf{x}^{n+1} &= \mathbf{A\,x}^n + \mathbf{B\,u}^n \\ \mathbf{y}^{n+1} &= \mathbf{C\,x}^{n+1} + \mathbf{D\,u}^n\end{split}\]

Else, if remove_predictor = True, the state is modified as

\[\mathbf{h}^n = \mathbf{x}^n - \mathbf{B\,u}^n\]

And the system solved by:

\[\begin{split}\mathbf{h}^{n+1} &= \mathbf{A\,h}^n + \mathbf{B_{mod}\,u}^{n} \\ \mathbf{y}^{n+1} &= \mathbf{C\,h}^{n+1} + \mathbf{D_{mod}\,u}^{n+1}\end{split}\]

Finally, the original state is recovered using the reverse transformation:

\[\mathbf{x}^{n+1} = \mathbf{h}^{n+1} + \mathbf{B\,u}^{n+1}\]

where the modifications to the \(\mathbf{B}_{mod}\) and \(\mathbf{D}_{mod}\) are detailed in Dynamic.assemble_ss().

Notes

Although the original equations include the term \(\mathbf{u}_{n+1}\), it is a reasonable approximation to take \(\mathbf{u}_{n+1}\approx\mathbf{u}_n\) given a sufficiently small time step, hence if the input at time n+1 is not parsed, it is estimated from \(u^n\).

Parameters
  • x_n (np.array) – State vector at the current time step \(\mathbf{x}^n\)

  • u_n (np.array) – Input vector at time step \(\mathbf{u}^n\)

  • u_n1 (np.array) – Input vector at time step \(\mathbf{u}^{n+1}\)

  • transform_state (bool) – When the predictor term is removed, if true it will transform the state vector. If false it will be assumed that the state vector that is parsed is already transformed i.e. it is \(\mathbf{h}\).

Returns

Updated state and output vector packed in a tuple \((\mathbf{x}^{n+1},\,\mathbf{y}^{n+1})\)

Return type

Tuple

Notes

Because in BlockDynamics the predictor is never removed when building ‘self.SS’, the implementation change with respect to Dynamic. However, formulas are consistent.

Frequency
class sharpy.linear.src.linuvlm.Frequency(tsdata, dt, integr_order=2, RemovePredictor=True, ScalingDict=None, UseSparse=True)[source]

Class for frequency description of linearised UVLM solution. Linearisation around steady-state are only supported. The class is built upon Static, and inherits all the methods contained there.

The class supports most of the features of Dynamics but has lower memory requirements of Dynamic, and should be preferred for:

  1. producing memory and computationally cheap frequency responses

  2. building reduced order models using RFA/polynomial fitting

Usage: Upon initialisation, the assemble method produces all the matrices required for the frequency description of the UVLM (see assemble for details). A state-space model is not allocated but:

  • Time stepping is also possible (but not implemented yet) as all the fundamental terms describing the UVLM equations are still produced (except the propagation of wake circulation)

  • ad-hoc methods for scaling, unscaling and frequency response are provided.

Input:

  • tsdata: aero timestep data from SHARPy solution

  • dt: time-step

  • integr_order=0,1,2: integration order for UVLM unsteady aerodynamic force. If 0, the derivative is computed exactly.

  • RemovePredictor=True: This flag is only used for the frequency response calculation. The frequency description, in fact, naturally arises without the predictor, but lags can be included during the frequency response calculation. See Dynamic documentation for more details.

  • ScalingDict=None: disctionary containing fundamental reference units

    {'length':  reference_length,
     'speed':   reference_speed,
     'density': reference density}
    

    used to derive scaling quantities for the state-space model variables. The scaling factors are stores in self.ScalingFact.

    Note that while time, circulation, angular speeds) are scaled accordingly, FORCES ARE NOT. These scale by qinf*b**2, where b is the reference length and qinf is the dinamic pressure.

  • UseSparse=False: builds the A and B matrices in sparse form. C and D are dense, hence the sparce format is not used.

- nondimss

normalises matrices produced by the assemble method based on the scaling factors in self.ScalingFact.

- dimss

inverse of nondimss.

- assemble

builds matrices for UVLM minimal size description.

- assemble_profiling

generate profiling report of the assembly and saves it into self.prof_out. To read the report:

import pstats
p=pstats.Stats(self.prof_out)
- freqresp

fast algorithm for frequency response.

Methods to implement:

  • solve_steady: runs freqresp at 0 frequency.

  • solve_step: solves one time-step

assemble()[source]

Assembles matrices for minumal size frequency description of UVLM. The state equation is represented in the form:

\[\mathbf{A_0} \mathbf{\Gamma} + \mathbf{A_{w_0}} \mathbf{\Gamma_w} = \mathbf{B_0} \mathbf{u}\]

While the output equation is as per the Dynamic class, namely:

\[\mathbf{y} = \mathbf{C} \mathbf{x} + \mathbf{D} \mathbf{u}\]

where

\[\mathbf{x} = [\mathbf{\Gamma}; \mathbf{\Gamma_w}; \Delta\mathbf(\Gamma)]\]

The propagation of wake circulation matrices are not produced as these are not required for frequency response analysis.

assemble_profiling()[source]

Generate profiling report for assembly and save it in self.prof_out.

To read the report:

import pstats p=pstats.Stats(self.prof_out)

freqresp(kv, wake_prop_settings=None)[source]

Ad-hoc method for fast UVLM frequency response over the frequencies kv. The method, only requires inversion of a K x K matrix at each frequency as the equation for propagation of wake circulation are solved exactly.

get_Cw_cpx(zval, settings=None)[source]

Produces a sparse matrix

\[\bar{\mathbf{C}}(z)\]

where

\[z = e^{k \Delta t}\]

such that the wake circulation frequency response at \(z\) is

\[\bar{\goldsymbol{\Gamma}}_w = \bar{\mathbf{C}}(z) \bar{\boldsymbol{\Gamma}}\]
nondimss()[source]

Scale state-space model based of self.ScalingFacts

Static
class sharpy.linear.src.linuvlm.Static(tsdata, custom_settings=None, for_vel=numpy.zeros)[source]

Static linear solver

assemble()[source]

Assemble global matrices

assemble_profiling()[source]

Generate profiling report for assembly and save it in self.prof_out.

To read the report:

import pstats p=pstats.Stats(self.prof_out)

get_rigid_motion_gains(zeta_rotation=numpy.zeros)[source]

Gains to reproduce rigid-body motion such that grid displacements and velocities are given by:

  • dzeta     = Ktra*u_tra         + Krot*u_rot

  • dzeta_dot = Ktra_vel*u_tra_dot + Krot*u_rot_dot

Rotations are assumed to happen independently with respect to the zeta_rotation point and about the x,y and z axes of the inertial frame.

get_sect_forces_gain()[source]

Gains to computes sectional forces. Moments are computed w.r.t. mid-vertex (chord-wise index M/2) of each section.

get_total_forces_gain(zeta_pole=numpy.zeros)[source]

Calculates gain matrices to calculate the total force (Kftot) and moment (Kmtot, Kmtot_disp) about the pole zeta_pole.

Being \(f\) and \(\zeta\) the force and position at the vertex (m,n) of the lattice these are produced as:

  • ftot=sum(f) -> dftot += df

  • mtot-sum((zeta-zeta_pole) x f) ->       dmtot +=  cross(zeta0-zeta_pole) df - cross(f0) dzeta

reshape()[source]

Reshapes state/output according to SHARPy format

solve()[source]

Solve for bound \(\\Gamma\) using the equation;

\[\begin{split}\\mathcal{A}(\\Gamma^n) = u^n\end{split}\]

# … at constant rotation speed self.Dfqsdzeta+=scalg.block_diag(*ass.dfqsdzeta_omega(MS.Surfs,MS.Surfs_star))

total_forces(zeta_pole=numpy.zeros)[source]

Calculates total force (Ftot) and moment (Mtot) (about pole zeta_pole).

get_Cw_cpx

Produces a sparse matrix

\[\bar{\mathbf{C}}(z)\]

where

\[z = e^{k \Delta t}\]

such that the wake circulation frequency response at \(z\) is

\[\bar{\boldsymbol{\Gamma}}_w = \bar{\mathbf{C}}(z) \bar{\mathbf{\Gamma}}\]
Generation of multiple aerodynamic surfaces
  1. Maraniello, 25 May 2018

MultiAeroGridSurfaces
class sharpy.linear.src.multisurfaces.MultiAeroGridSurfaces(tsdata, vortex_radius, for_vel=numpy.zeros)[source]

Creates and assembles multiple aerodynamic surfaces from data

get_ind_velocities_at_collocation_points()[source]

Computes normal induced velocities at collocation points.

get_ind_velocities_at_segments(overwrite=False)[source]

Computes induced velocities at mid-segment points.

get_ind_velocities_at_target_collocation_points(target)[source]

Computes normal induced velocities at target surface collocation points.

get_joukovski_qs(overwrite=False)[source]

Returns quasi-steady forces over

Warning: forces are stored in a NON-redundant format:

(3,4,M,N)

where the element

(:,ss,mm,nn)

is the contribution to the force over the ss-th segment due to the circulation of panel (mm,nn).

get_normal_ind_velocities_at_collocation_points()[source]

Computes normal induced velocities at collocation points.

Note: for state-equation both projected and not projected induced velocities are required at the collocation points. Hence, this method tries to first the u_ind_coll attribute in each surface.

verify_aic_coll(print_info=False)[source]

Verify aic at collocation points using non-penetration condition

verify_joukovski_qs(print_info=False)[source]

Verify quasi-steady contribution for forces matches against SHARPy.

verify_non_penetration(print_info=False)[source]

Verify state variables fulfill non-penetration condition at bound surfaces

Geometrical methods for bound surfaces

Geometrical methods for bound surfaces

  1. Maraniello, 20 May 2018

AeroGridGeo
class sharpy.linear.src.surface.AeroGridGeo(Map: gridmapping.AeroGridMap instance, zeta: Array of vertex coordinates at each surface, aM: chord-wise position of collocation point in panel = 0.5, aN: span-wise position of collocation point in panel = 0.5)[source]

Allows retrieving geometrical information of a surface. Requires a gridmapping.AeroGridMap mapping structure in input and the surface vertices coordinates.

Indices convention: each panel is characterised through the following indices: - m,n: chord/span-wise indices

Methods: - get_*: retrieve information of a panel (e.g. normal, surface area) - generate_*: apply get_* method to each panel and store info into array.

Interpolation matrices, W: - these are labelled as ‘Wba’, where ‘a’ defines the initial format, b the final. Hence, given the array vb, it holds va=Wab*vb

get_panel_collocation(zetav_here)[source]

Using bilinear interpolation, retrieves panel collocation point, where aN,aM in [0,1] are distances in the chordwise and spanwise directions such that:

  • (aM,aN)=(0,0) –> quantity at vertex 0

  • (aM,aN)=(1,0) –> quantity at vertex 1

  • (aM,aN)=(1,1) –> quantity at vertex 2

  • (aM,aN)=(0,1) –> quantity at vertex 3

get_panel_vertices_coords(m, n)[source]

Retrieves coordinates of panel (m,n) vertices.

get_panel_wcv()[source]

Produces a compact array with weights for bilinear interpolation, where aN,aM in [0,1] are distances in the chordwise and spanwise directions such that:

  • (aM,aN)=(0,0) –> quantity at vertex 0

  • (aM,aN)=(1,0) –> quantity at vertex 1

  • (aM,aN)=(1,1) –> quantity at vertex 2

  • (aM,aN)=(0,1) –> quantity at vertex 3

interp_vertex_to_coll(q_vert)[source]

Project a quantity q_vert (scalar or vector) defined at vertices to collocation points.

project_coll_to_normal(q_coll)[source]

Project a vector quantity q_coll defined at collocation points to normal.

AeroGridSurface
class sharpy.linear.src.surface.AeroGridSurface(Map, zeta, gamma, vortex_radius, u_ext=None, zeta_dot=None, gamma_dot=None, rho=1.0, aM=0.5, aN=0.5, for_vel=numpy.zeros)[source]

Contains geometric and aerodynamic information about bound/wake surface.

Compulsory input are those that apply to both bound and wake surfaces:
  • zeta: defines geometry

  • gamma: circulation

With respect to AeroGridGeo, the class contains methods to:
  • project prescribed input velocity at nodes (u_ext, zeta_dot) over collocation points.

  • compute induced velocity over ANOTHER surface.

  • compute AIC induced over ANOTHER surface

Parameters
  • Map (gridmapping.AeroGridMap) – Map of grid.

  • zeta (list(np.ndarray)) – Grid vertices coordinates in inertial (G) frame.

  • zeta_dot (list(np.ndarray)) – Grid vertices velocities in inertial (G) frame. Default is None.

  • vortex_radius (np.float) – Distance below which induction is not computed

  • u_ext (list(np.ndarray)) – Grid external velocities in inertial (G) frame. Default is None.

  • gamma_dot (list(np.ndarray)) – Panel circulation derivative. Default is None.

  • rho (float) – Air density. Default is 1.

  • aM (float) – Chordwise position in panel of collocation point. Default is 0.5

  • aN (float) – Spanwise position in panel of collocation point. Default is 0.5

  • for_vel (np.ndarray) – Frame of reference velocity (including rotational velocity) in the inertial frame.

To add:
  • project prescribed input velocity at nodes (u_ext, zeta_dot) over

mid-point segments

get_aic3(zeta_target)[source]

Produces influence coefficinet matrix to calculate the induced velocity at a target point. The aic3 matrix has shape (3,K)

get_aic_over_surface(Surf_target, target='collocation', Project=True)[source]

Produces influence coefficient matrices such that the velocity induced over the Surface_target is given by the product:

if target=='collocation':
    if Project:
        u_ind_coll_norm.rehape(-1)=AIC*self.gamma.reshape(-1,order='C')
    else:
        u_ind_coll_norm[ii,:,:].rehape(-1)=
                            AIC[ii,:,:]*self.gamma.reshape(-1,order='C')

where ii=0,1,2.

For the case where if target=='segments':

  • AIC has shape (3,self.maps.K,4,Mout,Nout), such that

    AIC[:,:,ss,mm,nn]

is the influence coefficient matrix associated to the induced velocity at segment ss of panel (mm,nn).

get_induced_velocity(zeta_target)[source]

Computes induced velocity at a point zeta_target.

get_induced_velocity_over_surface(Surf_target, target='collocation', Project=False)[source]

Computes induced velocity over an instance of AeroGridSurface, where target specifies the target grid (collocation or segments). If Project is True, velocities are projected onver panel normal (only available at collocation points).

Note: for state-equation, both projected and non-projected velocities at the collocation points are required. Hence, it is suggested to use this method with Projection=False, and project afterwards.

Warning: induced velocities at grid segments are stored in a redundant format:

(3,4,M,N)

where the element

(:,ss,mm,nn)

is the induced velocity over the ss-th segment of panel (mm,nn). A fast looping is implemented to re-use previously computed velocities

get_input_velocities_at_collocation_points()[source]

Returns velocities at collocation points from nodal values u_ext and zeta_dot of shape (3, M+1, N+1) at the collocation points.

Notes

\[\boldsymbol{u}_{c} = \mathcal{W}_{cv}(\boldsymbol(\nu)_0 - \boldsymbol{\zeta}_0)\]

is the input velocity at the collocation point, where \(\mathcal{W}_{cv}\) projects the velocity from the grid points onto the collocation point. This variable is referred to as u_input_coll=Wcv*(u_ext-zeta_dot) and depends on the coordinates zeta when the body is rotating.

get_input_velocities_at_segments()[source]

Returns velocities at mid-segment points from nodal values u_ext and zeta_dot of shape (3,M+1,N+1).

Warning: input velocities at grid segments are stored in a redundant format:

(3,4,M,N)

where the element

(:,ss,mm,nn)

is the induced velocity over the ss-th segment of panel (mm,nn). A fast looping is implemented to re-use previously computed velocities

2018/08/24: Include effects due to rotation (omega x zeta). Now it depends on the coordinates zeta

get_joukovski_qs(gammaw_TE=None, recompute_velocities=True)[source]

Returns quasi-steady forces evaluated at mid-segment points over the surface.

Important: the circulation at the first row of wake panel is required! Hence all

Warning: forces are stored in a NON-redundant format:

(3,4,M,N)

where the element

(:,ss,mm,nn)

is the contribution to the force over the ss-th segment due to the circulation of panel (mm,nn).

get_joukovski_unsteady()[source]

Returns added mass effects over lattive grid

get_normal_input_velocities_at_collocation_points()[source]

From nodal input velocity to normal velocities at collocation points.

get_aic3_cpp

Model Order Reduction

Balancing Methods

The following classes are available to reduce a linear system employing balancing methods.

The main class is Balanced and the other available classes:

correspond to the reduction algorithm.

Balanced
class sharpy.rom.balanced.Balanced[source]

Balancing ROM methods

Main class to load a balancing ROM. See below for the appropriate settings to be parsed in the algorithm_settings based on your selection.

Supported algorithms:

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

Options

print_info

bool

Write output to screen

True

algorithm

str

Balanced realisation method

Direct, Iterative, FrequencyLimited

algorithm_settings

dict

Settings for the desired algorithm

{}

Direct
class sharpy.rom.balanced.Direct[source]

Find balanced realisation of continuous (DLTI = False) and discrete (DLTI = True) time of LTI systems using scipy libraries.

The function proceeds to achieve balanced realisation of the state-space system by first solving the Lyapunov equations. They are solved using Barlets-Stewart algorithm for Sylvester equation, which is based on A matrix Schur decomposition.

\[\begin{split}\mathbf{A\,W_c + W_c\,A^T + B\,B^T} &= 0 \\ \mathbf{A^T\,W_o + W_o\,A + C^T\,C} &= 0\end{split}\]

to obtain the reachability and observability gramians, which are positive definite matrices.

Then, the gramians are decomposed into their Cholesky factors such that:

\[\begin{split}\mathbf{W_c} &= \mathbf{Q_c\,Q_c^T} \\ \mathbf{W_o} &= \mathbf{Q_o\,Q_o^T}\end{split}\]

A singular value decomposition (SVD) of the product of the Cholesky factors is performed

\[(\mathbf{Q_o^T\,Q_c}) = \mathbf{U\,\Sigma\,V^*}\]

The singular values are then used to build the transformation matrix \(\mathbf{T}\)

\[\begin{split}\mathbf{T} &= \mathbf{Q_c\,V\,\Sigma}^{-1/2} \\ \mathbf{T}^{-1} &= \mathbf{\Sigma}^{-1/2}\,\mathbf{U^T\,Q_o^T}\end{split}\]

The balanced system is therefore of the form:

\[\begin{split}\mathbf{A_b} &= \mathbf{T^{-1}\,A\,T} \\ \mathbf{B_b} &= \mathbf{T^{-1}\,B} \\ \mathbf{C_b} &= \mathbf{C\,T} \\ \mathbf{D_b} &= \mathbf{D}\end{split}\]

Warning

This function may be less computationally efficient than the balreal Matlab implementation and does not offer the option to bound the realisation in frequency and time.

Notes

  • Lyapunov equations are solved using Barlets-Stewart algorithm for Sylvester equation, which is based on A matrix Schur decomposition.

  • Notation above is consistent with Gawronski [2].

Parameters
  • A (np.ndarray) – Plant Matrix

  • B (np.ndarray) – Input Matrix

  • C (np.ndarray) – Output Matrix

  • DLTI (bool) – Discrete time state-space flag

  • Schur (bool) – Use Schur decomposition to solve the Lyapunov equations

Returns

Tuple of the form (S, T, Tinv) containing:
  • Singular values in diagonal matrix (S)

  • Transformation matrix (T).

  • Inverse transformation matrix(Tinv).

Return type

tuple of np.ndarrays

References

[1] Anthoulas, A.C.. Approximation of Large Scale Dynamical Systems. Chapter 7. Advances in Design and Control. SIAM. 2005.

[2] Gawronski, W.. Dynamics and control of structures. New York: Springer. 1998

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

Options

tune

bool

Tune ROM to specified tolerance

True

use_schur

bool

Use Schur decomposition during build

False

rom_tolerance

float

Absolute accuracy with respect to full order frequency response

0.01

rom_tune_freq_range

list(float)

Beginning and end of frequency range where to tune ROM

[0, 1]

convergence

str

ROM tuning convergence. If min attempts to find minimal number of states.If all it starts from larger size ROM until convergence to specified tolerance is found.

min

reduction_method

str

Desired reduction method

realisation

realisation, truncation

FrequencyLimited
class sharpy.rom.balanced.FrequencyLimited[source]

Method for frequency limited balancing.

The Observability and controllability Gramians over the frequencies kv are solved in factorised form. Balanced modes are then obtained with a square-root method.

Details:

  • Observability and controllability Gramians are solved in factorised form through explicit integration. The number of integration points determines both the accuracy and the maximum size of the balanced model.

  • Stability over all (Nb) balanced states is achieved if:

    1. one of the Gramian is integrated through the full Nyquist range

    2. the integration points are enough.

Input:

  • DictBalFreq: dictionary specifying integration method with keys:

    • frequency: defines limit frequencies for balancing. The balanced

      model will be accurate in the range [0,F], where F is the value of this key. Note that F units must be consistent with the units specified in the self.ScalingFacts dictionary.

    • method_low: ['gauss','trapz'] specifies whether to use gauss quadrature or trapezoidal rule in the low-frequency range [0,F].

    • options_low: options to use for integration in the low-frequencies. These depend on the integration scheme (See below).

    • method_high: method to use for integration in the range [F,F_N], where F_N is the Nyquist frequency. See ‘method_low’.

    • options_high: options to use for integration in the high-frequencies.

    • check_stability: if True, the balanced model is truncated to eliminate unstable modes - if any is found. Note that very accurate balanced model can still be obtained, even if high order modes are unstable. Note that this option is overridden if “”

    • get_frequency_response: if True, the function also returns the frequency response evaluated at the low-frequency range integration points. If True, this option also allows to automatically tune the balanced model.

Future options:
  • Ncpu: for parallel run

The following integration schemes are available:
  • trapz: performs integration over equally spaced points using trapezoidal rule. It accepts options dictionaries with keys:

    • points: number of integration points to use (including domain boundary)

  • gauss performs gauss-lobotto quadrature. The domain can be partitioned in Npart sub-domain in which the gauss-lobotto quadrature of order Ord can be applied. A total number of Npart*Ord points is required. It accepts options dictionaries of the form:

    • partitions: number of partitions

    • order: quadrature order.

Examples

The following dictionary

>>>   DictBalFreq={'frequency': 1.2,
>>>                'method_low': 'trapz',
>>>                'options_low': {'points': 12},
>>>                'method_high': 'gauss',
>>>                'options_high': {'partitions': 2, 'order': 8},
>>>                'check_stability': True }

balances the state-space model in the frequency range [0, 1.2] using:

  1. 12 equally-spaced points integration of the Gramians in the low-frequency range [0,1.2] and

  2. A 2 Gauss-Lobotto 8-th order quadratures of the controllability Gramian in the high-frequency range.

A total number of 28 integration points will be required, which will result into a balanced model with number of states

>>>    min{ 2*28* number_inputs, 2*28* number_outputs }

The model is finally truncated so as to retain only the first Ns stable modes.

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

Options

frequency

float

defines limit frequencies for balancing. The balanced model will be accurate in the range [0,F], where F is the value of this key. Note that F units must be consistent with the units specified in the in the self.ScalingFacts dictionary.

1.0

method_low

str

Specifies whether to use gauss quadrature or trapezoidal rule in the low-frequency range [0,F]

trapz

gauss, trapz

options_low

dict

Settings for the low frequency integration. See Notes.

{}

method_high

str

Specifies whether to use gauss quadrature or trapezoidal rule in the high-frequency range [F,FN]

trapz

gauss, trapz

options_high

dict

Settings for the high frequency integration. See Notes.

{}

check_stability

bool

if True, the balanced model is truncated to eliminate unstable modes - if any is found. Note that very accurate balanced model can still be obtained, even if high order modes are unstable.

True

get_frequency_response

bool

if True, the function also returns the frequency response evaluated at the low-frequency range integration points. If True, this option also allows to automatically tune the balanced model.

False

The parameters of integration take the following options:

Name

Type

Description

Default

points

int

Trapezoidal points of integration

12

partitions

int

Number of Gauss-Lobotto quadratures

2

order

int

Order of Gauss-Lobotto quadratures

2

Iterative
class sharpy.rom.balanced.Iterative[source]

Find balanced realisation of DLTI system.

Notes

Lyapunov equations are solved using iterative squared Smith algorithm, in its low or full rank version. These implementations are as per the low_rank_smith and smith_iter functions respectively but, for computational efficiency, the iterations are rewritten here so as to solve for the observability and controllability Gramians contemporary.

  • Exploiting sparsity:

    This algorithm is not ideal to exploit sparsity. However, the following strategies are implemented:

    • if the A matrix is provided in sparse format, the powers of A will be calculated exploiting sparsity UNTIL the number of non-zero elements is below 15% the size of A. Upon this threshold, the cost of the matrix multiplication rises dramatically, and A is hence converted to a dense numpy array.

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

lowrank

bool

Use low rank methods

True

smith_tol

float

Smith tolerance

1e-10

tolSVD

float

SVD threshold

1e-06

Krylov-subspaces model order reduction techniques
Krylov
class sharpy.rom.krylov.Krylov[source]

Model Order Reduction Methods for Single Input Single Output (SISO) and MIMO Linear Time-Invariant (LTI) Systems using moment matching (Krylov Methods).

Examples

General calling sequences for different systems

SISO single point interpolation:
>>> algorithm = 'one_sided_arnoldi'
>>> interpolation_point = np.array([0.0])
>>> krylov_r = 4
>>>
>>> rom = Krylov()
>>> rom.initialise(sharpy_data, FullOrderModelSS)
>>> rom.run(algorithm, krylov_r, interpolation_point)
2 by 2 MIMO with tangential, multipoint interpolation:
>>> algorithm = 'dual_rational_arnoldi'
>>> interpolation_point = np.array([0.0, 1.0j])
>>> krylov_r = 4
>>> right_vector = np.block([[1, 0], [0, 1]])
>>> left_vector = right_vector
>>>
>>> rom = Krylov()
>>> rom.initialise(sharpy_data, FullOrderModelSS)
>>> rom.run(algorithm, krylov_r, interpolation_point, right_vector, left_vector)
2 by 2 MIMO multipoint interpolation:
>>> algorithm = 'mimo_rational_arnoldi'
>>> interpolation_point = np.array([0.0])
>>> krylov_r = 4
>>>
>>> rom = Krylov()
>>> rom.initialise(sharpy_data, FullOrderModelSS)
>>> rom.run(algorithm, krylov_r, interpolation_point)

The settings that this solver accepts are given by a dictionary, with the following key-value pairs:

Name

Type

Description

Default

Options

print_info

bool

Write ROM information to screen and log

True

frequency

list(complex)

Interpolation points in the continuous time complex plane [rad/s]

[0]

algorithm

str

Krylov reduction method algorithm

r

int

Moments to match at the interpolation points

1

single_side

str

Construct the rom using a single side. Leave blank (or empty string) for both.

controllability, observability

tangent_input_file

str

Filepath to .h5 file containing tangent interpolation vectors

restart_arnoldi

bool

Restart Arnoldi iteration with r-=1 if ROM is unstable

False

check_stability(restart_arnoldi=False)[source]

Checks the stability of the ROM by computing its eigenvalues.

If the resulting system is unstable, the Arnoldi procedure can be restarted to eliminate the eigenvalues outside the stability boundary.

However, if this is the case, the ROM no longer matches the moments of the original system at the specific frequencies since now the approximation is done with respect to a system of the form:

\[\begin{split}\Sigma = \left(\begin{array}{c|c} \mathbf{A} & \mathbf{\bar{B}} \\ \hline \mathbf{C} & \ \end{array}\right)\end{split}\]

where \(\mathbf{\bar{B}} = (\mu \mathbf{I}_n - \mathbf{A})\mathbf{B}\)

Parameters

restart_arnoldi (bool) – Restart the relevant Arnoldi algorithm with the unstable eigenvalues removed.

dual_rational_arnoldi(frequency, r)[source]

Dual Rational Arnoli Interpolation for SISO sytems [1] and MIMO systems through tangential interpolation [2].

Effectively the same as the two_sided_arnoldi and the resulting V matrices for each interpolation point are concatenated

\[\begin{split}\bigcup\limits_{k = 1}^K\mathcal{K}_{b_k}((\sigma_i\mathbf{I}_n - \mathbf{A})^{-1}, (\sigma_i\mathbf{I}_n - \mathbf{A})^{-1}\mathbf{b})\subseteq\mathcal{V}&=\text{range}(\mathbf{V}) \\ \bigcup\limits_{k = 1}^K\mathcal{K}_{c_k}((\sigma_i\mathbf{I}_n - \mathbf{A})^{-T}, (\sigma_i\mathbf{I}_n - \mathbf{A})^{-T}\mathbf{c}^T)\subseteq\mathcal{Z}&=\text{range}(\mathbf{Z})\end{split}\]

For MIMO systems, tangential interpolation is used through the right and left tangential direction vectors \(\mathbf{r}_i\) and \(\mathbf{l}_i\).

\[\begin{split}\bigcup\limits_{k = 1}^K\mathcal{K}_{b_k}((\sigma_i\mathbf{I}_n - \mathbf{A})^{-1}, (\sigma_i\mathbf{I}_n - \mathbf{A})^{-1}\mathbf{Br}_i)\subseteq\mathcal{V}&=\text{range}(\mathbf{V}) \\ \bigcup\limits_{k = 1}^K\mathcal{K}_{c_k}((\sigma_i\mathbf{I}_n - \mathbf{A})^{-T}, (\sigma_i\mathbf{I}_n - \mathbf{A})^{-T}\mathbf{C}^T\mathbf{l}_i)\subseteq\mathcal{Z}&=\text{range}(\mathbf{Z})\end{split}\]
Parameters
  • frequency (np.ndarray) – Array containing the interpolation points \(\sigma = \{\sigma_1, \dots, \sigma_K\}\in\mathbb{C}\)

  • r (int) – Krylov space order \(b_k\) and \(c_k\). At the moment, different orders for the controllability and observability constructions are not supported.

  • right_tangent (np.ndarray) – Matrix containing the right tangential direction interpolation vector for each interpolation point in column form, i.e. \(\mathbf{r}\in\mathbb{R}^{m \times K}\).

  • left_tangent (np.ndarray) – Matrix containing the left tangential direction interpolation vector for each interpolation point in column form, i.e. \(\mathbf{l}\in\mathbb{R}^{p \times K}\).

Returns

The reduced order model matrices: \(\mathbf{A}_r\), \(\mathbf{B}_r\) and \(\mathbf{C}_r\).

Return type

tuple

References

[1] Grimme [2] Gallivan

mimo_rational_arnoldi(frequency, r)[source]

Construct full rank orthonormal projection basis \(\mathbf{V}\) and \(\mathbf{W}\).

The main issue that one normally encounters with MIMO systems is that the minimality assumption of the system does not guarantee the resulting Krylov space to be full rank, unlike in the SISO case. Therefore, the construction is performed vector by vector, where linearly dependent vectors are eliminated or deflated from the Krylov subspace.

If the number of inputs differs the number of outputs, both Krylov spaces will be built such that both are the same size, therefore one Krylov space may be of higher order than the other one.

Following the method for vector-wise construction in Gugercin [1].

Parameters
  • frequency (np.ndarray) – Array containing interpolation frequencies

  • r (int) – Krylov space order

Returns

Tuple of reduced system matrices A, B and C.

Return type

tuple

References

[1] Gugercin, S. Projection Methods for Model Reduction of Large-Scale Dynamical

Systems PhD Thesis. Rice University 2003.

one_sided_arnoldi(frequency, r)[source]

One-sided Arnoldi method expansion about a single interpolation point, \(\sigma\). The projection matrix \(\mathbf{V}\) is constructed using an order \(r\) Krylov space. The space for a single finite interpolation point known as a Pade approximation is described by:

\[\text{range}(\textbf{V}) = \mathcal{K}_r((\sigma\mathbf{I}_n - \mathbf{A})^{-1}, (\sigma\mathbf{I}_n - \mathbf{A})^{-1}\mathbf{b})\]

In the case of an interpolation about infinity, the problem is known as partial realisation and the Krylov space is

\[\text{range}(\textbf{V}) = \mathcal{K}_r(\mathbf{A}, \mathbf{b})\]

The resulting orthogonal projection leads to the following reduced order system:

\[\begin{split}\hat{\Sigma} : \left(\begin{array}{c|c} \hat{A} & \hat{B} \\ \hline \hat{C} & {D}\end{array}\right) \text{with } \begin{cases}\hat{A}=V^TAV\in\mathbb{R}^{k\times k},\,\\ \hat{B}=V^TB\in\mathbb{R}^{k\times m},\,\\ \hat{C}=CV\in\mathbb{R}^{p\times k},\,\\ \hat{D}=D\in\mathbb{R}^{p\times m}\end{cases}\end{split}\]
Parameters
  • frequency (complex) – Interpolation point \(\sigma \in \mathbb{C}\)

  • r (int) – Number of moments to match. Equivalent to Krylov space order and order of the ROM.

Returns

The reduced order model matrices: \(\mathbf{A}_r\), \(\mathbf{B}_r\) and \(\mathbf{C}_r\)

Return type

tuple

real_rational_arnoldi(frequency, r)[source]

When employing complex frequencies, the projection matrix can be normalised to be real Following Algorithm 1b in Lee(2006) :param frequency: :param r:

Returns:

restart()[source]

Implicitly Restarted Krylov Algorithm

run(ss)[source]

Performs Model Order Reduction employing Krylov space projection methods.

Supported methods include:

Algorithm

Interpolation Points

Systems

one_sided_arnoldi

1

SISO Systems

two_sided_arnoldi

1

SISO Systems

dual_rational_arnoldi

K

SISO systems and Tangential interpolation for MIMO systems

mimo_rational_arnoldi

K

MIMO systems. Uses vector-wise construction (more robust)

mimo_block_arnoldi

K

MIMO systems. Uses block Arnoldi methods (more efficient)

Parameters

ss (sharpy.linear.src.libss.ss) – State space to reduce

Returns

Reduced state space system

Return type

(libss.ss)

save(filename)[source]

Saves to an .h5 file of name filename the left and right projectors and the reduced order model

Parameters

filename (str) – path and filename to which to save the data

stable_realisation(*args, **kwargs)[source]

Remove unstable poles left after reduction

Using a Schur decomposition of the reduced plant matrix \(\mathbf{A}_m\in\mathbb{C}^{m\times m}\), the method removes the unstable eigenvalues that could have appeared after the moment-matching reduction.

The oblique projection matrices \(\mathbf{T}_L\in\mathbb{C}^{m \times p}\) and \(\mathbf{T}_R\in\mathbb{C}^{m \times p}\) result in a stable realisation

\[\mathbf{A}_s = \mathbf{T}_L^\top\mathbf{AT}_R \in \mathbb{C}^{p\times p}.\]
Parameters

A (np.ndarray) – plant matrix (if not provided self.ssrom.A will be used).

Returns

Left and right projection matrices \(\mathbf{T}_L\in\mathbb{C}^{m \times p}\) and

\(\mathbf{T}_R\in\mathbb{C}^{m \times p}\)

Return type

tuple

References

Jaimoukha, I. M., Kasenally, E. D.. Implicitly Restarted Krylov Subspace Methods for Stable Partial Realizations. SIAM Journal of Matrix Analysis and Applications, 1997.

two_sided_arnoldi(frequency, r)[source]

Two-sided projection with a single interpolation point following the Arnoldi procedure. Very similar to the one-sided method available, but it adds the projection \(\mathbf{W}\) built using the Krylov space for the \(\mathbf{c}\) vector:

\[\mathcal{K}_r((\sigma\mathbf{I}_n - \mathbf{A})^{-T}, (\sigma\mathbf{I}_n - \mathbf{A})^{-T}\mathbf{c}^T)\subseteq\mathcal{W}=\text{range}(\mathbf{W})\]

The oblique projection \(\mathbf{VW}^T\) matches twice as many moments as the single sided projection.

The resulting system takes the form:

\[\begin{split}\hat{\Sigma} : \left(\begin{array}{c|c} \hat{A} & \hat{B} \\ \hline \hat{C} & {D}\end{array}\right) \text{with } \begin{cases}\hat{A}=W^TAV\in\mathbb{R}^{k\times k},\,\\ \hat{B}=W^TB\in\mathbb{R}^{k\times m},\,\\ \hat{C}=CV\in\mathbb{R}^{p\times k},\,\\ \hat{D}=D\in\mathbb{R}^{p\times m}\end{cases}\end{split}\]
Parameters
  • frequency (complex) – Interpolation point \(\sigma \in \mathbb{C}\)

  • r (int) – Number of moments to match on each side. The resulting ROM will be of order \(2r\).

Returns

The reduced order model matrices: \(\mathbf{A}_r\), \(\mathbf{B}_r\) and \(\mathbf{C}_r\).

Return type

tuple

Utils
Krylov Model Reduction Methods Utilities
check_eye

Simple utility to verify matrix inverses

Asserts that

\[\mathbf{T}^{-1}\mathbf{T} = \mathbf{I}\]
param T

Matrix to test

type T

np.ndarray

param Tinv

Supposed matrix inverse

type Tinv

np.ndarray

param msg

Output error message if inverse check not satisfied

type msg

str

param eps

Error threshold (\(10^\varepsilon\))

type eps

float

raises AssertionError

if matrix inverse check is not satisfied

construct_krylov

Contructs a Krylov subspace in an iterative manner following the methods of Gugercin [1].

The construction of the Krylov space is focused on Pade and partial realisation cases for the purposes of model reduction. I.e. the partial realisation form of the Krylov space is used if approx_type = 'partial_realisation'

\[\text{range}(\textbf{V}) = \mathcal{K}_r(\mathbf{A}, \mathbf{b})\]

Else, it is replaced by the Pade approximation form:

\[\text{range}(\textbf{V}) = \mathcal{K}_r((\sigma\mathbf{I}_n - \mathbf{A})^{-1}, (\sigma\mathbf{I}_n - \mathbf{A})^{-1}\mathbf{b})\]

Note that no inverses are actually computed but rather a single LU decomposition is performed at the beginning of the algorithm. Forward and backward substitution is used thereinafter to calculate the required vectors.

The algorithm also builds the Krylov space for the \(\mathbf{C}^T\) matrix. It should simply replace B and side should be side = 'c'.

Examples

Partial Realisation:

>>> V = construct_krylov(r, A, B, 'partial_realisation', 'b')
>>> W = construct_krylov(r, A, C.T, 'partial_realisation', 'c')

Pade Approximation:

>>> V = construct_krylov(r, (sigma * np.eye(nx) - A), B, 'Pade', 'b')
>>> W = construct_krylov(r, (sigma * np.eye(nx) - A), C.T, 'Pade', 'c')

References

[1]. Gugercin, S. - Projection Methods for Model Reduction of Large-Scale Dynamical Systems. PhD Thesis. Rice University. 2003.

param r

Krylov space order

type r

int

param lu_A

For Pade approximations it should be the LU decomposition of \((\sigma I - \mathbf{A})\) in tuple form, as output from the scipy.linalg.lu_factor(). For partial realisations it is simply \(\mathbf{A}\).

type lu_A

np.ndarray

param B

If doing the B side it should be \(\mathbf{B}\), else \(\mathbf{C}^T\).

type B

np.ndarray

param approx_type

Type of approximation: partial_realisation or Pade.

type approx_type

str

param side

Side of the projection b or c.

returns

Projection matrix

rtype

np.ndarray

evec

j-th unit vector (in row format)

param j

Unit vector dimension

returns

j-th unit vector

rtype

np.ndarray

Examples

>>> evec(2)
np.array([0, 1])
>>> evec(3)
np.array([0, 0, 1])
lu_factor

LU Factorisation wrapper of:

\[LU = (\sigma \mathbf{I} - \mathbf{A})\]

In the case of A being a sparse matrix, the sparse methods in scipy are employed

param sigma

Expansion frequency

type sigma

float

param A

Dynamics matrix

type A

csc_matrix or np.ndarray

returns

tuple (dense) or SuperLU (sparse) objects containing the LU factorisation

rtype

tuple or SuperLU

lu_solve

LU solve wrapper.

Computes the solution to

\[\mathbf{Ax} = \mathbf{b}\]

or

\[\mathbf{A}^T\mathbf{x} = \mathbf{b}\]

if trans=1.

It uses the SuperLU.solve() method if the input is a SuperLU or else will revert to the dense methods in scipy.

param lu_A

object or tuple containing the information of the LU factorisation

type lu_A

SuperLU or tuple

param b

Right hand side vector to solve

type b

np.ndarray

param trans

0 or 1 for either solution option.

type trans

int

returns

Solution to the system.

rtype

np.ndarray

mgs_ortho

Modified Gram-Schmidt Orthogonalisation

Orthogonalises input matrix \(\mathbf{X}\) column by column.

param X

Input matrix of dimensions \(n\) by \(m\).

type X

np.ndarray

returns

Orthogonalised matrix of dimensions \(n\) by \(m\).

rtype

np.ndarray

Notes

This method is faster than scipy’s scipy.linalg.qr() method that returns an orthogonal matrix as part of the QR decomposition, albeit at a higher number of function calls.

remove_a12

Basis change to remove the (1, 2) block of the block-ordered real Schur matrix \(\mathbf{A}\)

Being \(\mathbf{A}_s\in\mathbb{R}^{m\times m}\) a matrix of the form

\[\begin{split}\mathbf{A}_s = \begin{bmatrix} A_{11} & A_{12} \\ 0 & A_{22} \end{bmatrix}\end{split}\]

the (1,2) block is removed by solving the Sylvester equation

\[\mathbf{A}_{11}\mathbf{X} - \mathbf{X}\mathbf{A}_{22} + \mathbf{A}_{12} = 0\]

used to build the change of basis

\[\begin{split}\mathbf{T} = \begin{bmatrix} \mathbf{I}_{s,s} & -\mathbf{X}_{s,u} \\ \mathbf{0}_{u, s} & \mathbf{I}_{u,u} \end{bmatrix}\end{split}\]

where \(s\) and \(u\) are the respective number of stable and unstable eigenvalues, such that

\[\begin{split}\mathbf{TA}_s\mathbf{T}^\top = \begin{bmatrix} A_{11} & \mathbf{0} \\ 0 & A_{22} \end{bmatrix}.\end{split}\]
param As

Block-ordered real Schur matrix (can be built using sharpy.rom.utils.krylovutils.schur_ordered()).

type As

np.ndarray

param n_stable

Number of stable eigenvalues in As.

type n_stable

int

returns

Basis transformation \(\mathbf{T}\in\mathbb{R}^{m\times m}\).

rtype

np.ndarray

References

Jaimoukha, I. M., Kasenally, E. D.. Implicitly Restarted Krylov Subspace Methods for Stable Partial Realizations SIAM Journal of Matrix Analysis and Applications, 1997.

schur_ordered

Returns block ordered complex Schur form of matrix \(\mathbf{A}\)

\[\begin{split}\mathbf{TAT}^H = \mathbf{A}_s = \begin{bmatrix} A_{11} & A_{12} \\ 0 & A_{22} \end{bmatrix}\end{split}\]

where \(A_{11}\in\mathbb{C}^{s\times s}\) contains the \(s\) stable eigenvalues of \(\mathbf{A}\in\mathbb{R}^{m\times m}\).

param A

Matrix to decompose.

type A

np.ndarray

param ct

Continuous time system.

type ct

bool

returns

Tuple containing the Schur decomposition of \(\mathbf{A}\), \(\mathbf{A}_s\); the transformation \(\mathbf{T}\in\mathbb{C}^{m\times m}\); and the number of stable eigenvalues of \(\mathbf{A}\).

rtype

tuple

Notes

This function is a wrapper of scipy.linalg.schur imposing the settings required for this application.

General ROM utilities
  1. Maraniello, 14 Feb 2018

balfreq

Method for frequency limited balancing.

The Observability and controllability Gramians over the frequencies kv are solved in factorised form. Balanced modes are then obtained with a square-root method.

Details:

  • Observability and controllability Gramians are solved in factorised form through explicit integration. The number of integration points determines both the accuracy and the maximum size of the balanced model.

  • Stability over all (Nb) balanced states is achieved if:

    1. one of the Gramian is integrated through the full Nyquist range

    2. the integration points are enough.

Input:

  • DictBalFreq: dictionary specifying integration method with keys:

    • frequency: defines limit frequencies for balancing. The balanced

      model will be accurate in the range [0,F], where F is the value of this key. Note that F units must be consistent with the units specified in the self.ScalingFacts dictionary.

    • method_low: ['gauss','trapz'] specifies whether to use gauss quadrature or trapezoidal rule in the low-frequency range [0,F].

    • options_low: options to use for integration in the low-frequencies. These depend on the integration scheme (See below).

    • method_high: method to use for integration in the range [F,F_N], where F_N is the Nyquist frequency. See ‘method_low’.

    • options_high: options to use for integration in the high-frequencies.

    • check_stability: if True, the balanced model is truncated to eliminate unstable modes - if any is found. Note that very accurate balanced model can still be obtained, even if high order modes are unstable. Note that this option is overridden if “”

    • get_frequency_response: if True, the function also returns the frequency response evaluated at the low-frequency range integration points. If True, this option also allows to automatically tune the balanced model.

Future options:
  • Ncpu: for parallel run

The following integration schemes are available:
  • trapz: performs integration over equally spaced points using trapezoidal rule. It accepts options dictionaries with keys:

    • points: number of integration points to use (including domain boundary)

  • gauss performs gauss-lobotto quadrature. The domain can be partitioned in Npart sub-domain in which the gauss-lobotto quadrature of order Ord can be applied. A total number of Npart*Ord points is required. It accepts options dictionaries of the form:

    • partitions: number of partitions

    • order: quadrature order.

Examples

The following dictionary

>>>   DictBalFreq={'frequency': 1.2,
>>>                'method_low': 'trapz',
>>>                'options_low': {'points': 12},
>>>                'method_high': 'gauss',
>>>                'options_high': {'partitions': 2, 'order': 8},
>>>                'check_stability': True }

balances the state-space model in the frequency range [0, 1.2] using:

  1. 12 equally-spaced points integration of the Gramians in the low-frequency range [0,1.2] and

  2. A 2 Gauss-Lobotto 8-th order quadratures of the controllability Gramian in the high-frequency range.

A total number of 28 integration points will be required, which will result into a balanced model with number of states

>>>    min{ 2*28* number_inputs, 2*28* number_outputs }

The model is finally truncated so as to retain only the first Ns stable modes.

balreal_direct_py

Find balanced realisation of continuous (DLTI = False) and discrete (DLTI = True) time of LTI systems using scipy libraries.

The function proceeds to achieve balanced realisation of the state-space system by first solving the Lyapunov equations. They are solved using Barlets-Stewart algorithm for Sylvester equation, which is based on A matrix Schur decomposition.

\[\begin{split}\mathbf{A\,W_c + W_c\,A^T + B\,B^T} &= 0 \\ \mathbf{A^T\,W_o + W_o\,A + C^T\,C} &= 0\end{split}\]

to obtain the reachability and observability gramians, which are positive definite matrices.

Then, the gramians are decomposed into their Cholesky factors such that:

\[\begin{split}\mathbf{W_c} &= \mathbf{Q_c\,Q_c^T} \\ \mathbf{W_o} &= \mathbf{Q_o\,Q_o^T}\end{split}\]

A singular value decomposition (SVD) of the product of the Cholesky factors is performed

\[(\mathbf{Q_o^T\,Q_c}) = \mathbf{U\,\Sigma\,V^*}\]

The singular values are then used to build the transformation matrix \(\mathbf{T}\)

\[\begin{split}\mathbf{T} &= \mathbf{Q_c\,V\,\Sigma}^{-1/2} \\ \mathbf{T}^{-1} &= \mathbf{\Sigma}^{-1/2}\,\mathbf{U^T\,Q_o^T}\end{split}\]

The balanced system is therefore of the form:

\[\begin{split}\mathbf{A_b} &= \mathbf{T^{-1}\,A\,T} \\ \mathbf{B_b} &= \mathbf{T^{-1}\,B} \\ \mathbf{C_b} &= \mathbf{C\,T} \\ \mathbf{D_b} &= \mathbf{D}\end{split}\]

Warning

This function may be less computationally efficient than the balreal Matlab implementation and does not offer the option to bound the realisation in frequency and time.

Notes

  • Lyapunov equations are solved using Barlets-Stewart algorithm for Sylvester equation, which is based on A matrix Schur decomposition.

  • Notation above is consistent with Gawronski [2].

param A

Plant Matrix

type A

np.ndarray

param B

Input Matrix

type B

np.ndarray

param C

Output Matrix

type C

np.ndarray

param DLTI

Discrete time state-space flag

type DLTI

bool

param Schur

Use Schur decomposition to solve the Lyapunov equations

type Schur

bool

returns
Tuple of the form (S, T, Tinv) containing:
  • Singular values in diagonal matrix (S)

  • Transformation matrix (T).

  • Inverse transformation matrix(Tinv).

rtype

tuple of np.ndarrays

References

[1] Anthoulas, A.C.. Approximation of Large Scale Dynamical Systems. Chapter 7. Advances in Design and Control. SIAM. 2005.

[2] Gawronski, W.. Dynamics and control of structures. New York: Springer. 1998

balreal_iter

Find balanced realisation of DLTI system.

Notes

Lyapunov equations are solved using iterative squared Smith algorithm, in its low or full rank version. These implementations are as per the low_rank_smith and smith_iter functions respectively but, for computational efficiency, the iterations are rewritten here so as to solve for the observability and controllability Gramians contemporary.

  • Exploiting sparsity:

    This algorithm is not ideal to exploit sparsity. However, the following strategies are implemented:

    • if the A matrix is provided in sparse format, the powers of A will be calculated exploiting sparsity UNTIL the number of non-zero elements is below 15% the size of A. Upon this threshold, the cost of the matrix multiplication rises dramatically, and A is hence converted to a dense numpy array.

balreal_iter_old

Find balanced realisation of DLTI system.

Notes: Lyapunov equations are solved using iterative squared Smith algorithm, in its low or full rank version. These implementations are as per the low_rank_smith and smith_iter functions respectively but, for computational efficiency,, the iterations are rewritten here so as to solve for the observability and controllability Gramians contemporary.

check_stability

Checks the stability of the system.

param A

System plant matrix

type A

np.ndarray

param dt

Discrete time system

type dt

bool

returns

True if the system is stable

rtype

bool

eigen_dec

Eigen decomposition of state-space model (either discrete or continuous time) defined by the A,B,C matrices. Eigen-states are organised in decreasing damping order or increased frequency order such that the truncation

A[:N,:N], B[:N,:], C[:,:N]

will retain the least N damped (or lower frequency) modes.

If the eigenvalues of A, eigs, are complex, the state-space is automatically convert into real by separating its real and imaginary part. This procedure retains the minimal number of states as only 2 equations are added for each pair of complex conj eigenvalues. Extra care is however required when truncating the system, so as to ensure that the chosen value of N does not retain the real part, but not the imaginary part, of a complex pair.

For this reason, the function also returns an optional output, Nlist, such that, for each N in Nlist, the truncation

A[:N,:N], B[:N,:], C[:,:N]

does guarantee that both the real and imaginary part of a complex conj pair is included in the truncated model. Note that if `order_by == None, the eigs and UR must be given in input and must be such that complex pairs are stored consecutively.

param A

state-space matrix

param B

state-space matrix

param C

matrices of state-space model

param dlti

specifies whether discrete (True) or continuous-time. This information is only required to order the eigenvalues in decreasing dmaping order

param N

number of states to retain. If None, all states are retained

param eigs

eigenvalues and right eigenvector of A matrix as given by: eigs,Ur=scipy.linalg.eig(A,b=None,left=False,right=True)

param Ur

eigenvalues and right eigenvector of A matrix as given by: eigs,Ur=scipy.linalg.eig(A,b=None,left=False,right=True)

param Urinv

inverse of Ur

param order_by={‘damp’

order according to increasing damping (damp)

param ‘freq’

order according to increasing damping (damp)

param ‘stab’}

order according to increasing damping (damp)

param or decreasing frequency

If None, the same order as eigs/UR is followed.

type or decreasing frequency

freq) or decreasing damping (stab

param tol

absolute tolerance used to identify complex conj pair of eigenvalues

param complex

if true, the system is left in complex form

Returns: (Aproj,Bproj,Cproj): state-space matrices projected over the first N (or N+1

if N removes the imaginary part equations of a complex conj pair of eigenvalues) related to the least damped modes

Nlist: list of acceptable truncation values

get_gauss_weights

Returns gauss-legendre frequency grid (kv of length Npart*order) and weights (wv) for Gramians integration.

The integration grid is divided into Npart partitions, and in each of them integration is performed using a Gauss-Legendre quadrature of order order.

Note: integration points are never located at k0 or kend, hence there is no need for special treatment as in (for e.g.) a uniform grid case (see get_unif_weights)

get_trapz_weights

Returns uniform frequency grid (kv of length Nk) and weights (wv) for Gramians integration using trapezoidal rule. If knyq is True, it is assumed that kend is also the Nyquist frequency.

low_rank_smith
Low-rank smith algorithm for Stein equation

A.T X A - X = -Q Q.T

The algorithm can only be used if T is symmetric positive-definite, but this is not checked in this routine for computational performance. The solution X is provided in its factorised form:

X=Z Z.T

As in the most general case, a solution X exists only if the eigenvalues of S are stricktly smaller than one, and the algorithm will not converge otherwise. The algorithm can not exploits parsity, hence, while convergence can be improved for very large matrices, it can not be employed if matrices are too large to be stored in memory.

Parameters: - tol: tolerance for stopping convergence of Smith algorithm - Square: if true the squared-Smith algorithm is used - tolSVD: tolerance for reduce Z matrix based on singular values - kmax: if given, the Z matrix is forced to have size kmax - tolAbs: if True, the tolerance - fullOut: not implemented - Convergence: ‘Zk’,’res’.

  • If ‘Zk’ the iteration is stopped when the inf norm of the incremental

matrix goes below tol. - If ‘res’ the residual of the Lyapunov equation is computed. This strategy may fail to converge if kmax is too low or tolSVD too large!

Ref. P. Benner, G.E. Khoury and M. Sadkane, “On the squared Smith method for large-scale Stein equations”, 2014.

modred

Produces a reduced order model with N states from balanced or modal system SSb. Both “truncation” and “residualisation” methods are employed.

Note: - this method is designed for small size systems, i.e. a deep copy of SSb is produced by default.

res_discrete_lyap
Provides residual of discrete Lyapunov equation:

A.T X A - X = -Q Q.T

If Factorised option is true,

X=Z*Z.T

otherwise X=Z is chosen.

Reminder: contr: A W A.T - W = - B B.T obser: A.T W A - W = - C.T C

smith_iter
Solves the Stein equation

S.T X S - X = -T

by mean of Smith or squared-Smith algorithm. Note that a solution X exists only if the eigenvalues of S are stricktly smaller than one, and the algorithm will not converge otherwise. The algorithm can not exploit sparsity, hence, while convergence can be improved for very large matrices, it can not be employed if matrices are too large to be stored in memory.

Ref. Penzt, “A cyclic low-rank Smith method for large sparse Lyapunov equations”, 2000.

tune_rom

Starting from a balanced DLTI, this function determines the number of states N required in a ROM (obtained either through ‘residualisation’ or ‘truncation’ as specified in method - see also librom.modred) to match the frequency response of SSb over the frequency array, kv, with absolute accuracy tol. gv contains the balanced system Hankel singular value, and is used to determine the upper bound for the ROM order N.

Unless kv does not conver the full Nyquist frequency range, the ROM accuracy is not guaranteed to increase monothonically with the number of states. To account for this, two criteria can be used to determine the ROM convergence:

  • convergence=’all’: in this case, the number of ROM states N is chosen

such that any ROM of order greater than N produces an error smaller than tol. To guarantee this the ROM frequency response is computed for all N<=Nb, where Nb is the number of balanced states. This method is numerically inefficient.

  • convergence=’min’: atempts to find the minimal number of states to

achieve the accuracy tol.

Note: - the input state-space model, SSb, must be balanced. - the routine in not implemented for numerical efficiency and assumes that SSb is small.

Methods for the interpolation of DLTI ROMs

This is library for state-space models interpolation. These routines are intended for small size state-space models (ROMs), hence some methods may not be optimised to exploit sparsity structures. For generality purposes, all methods require in input interpolatory weights.

The module includes the methods:

  • transfer_function(): returns an interpolatory state-space model based on the transfer function method [1]. This method is general and is, effectively, a wrapper of the sharpy.linear.src.libss.join() method.

  • BT_transfer_function(): evolution of transfer function methods. The growth of the interpolated system size is avoided through balancing.

References:

[1] Benner, P., Gugercin, S. & Willcox, K., 2015. A Survey of Projection-Based Model Reduction Methods for Parametric Dynamical Systems. SIAM Review, 57(4), pp.483–531.

Author: S. Maraniello

Date: Mar-Apr 2019

FLB_transfer_function

Returns an interpolatory state-space model based on the transfer function method [1]. This method is applicable to frequency limited balanced state-space models only.

Features:

  • stability preserved

  • the interpolated state-space model has the same size than the tabulated ones

  • all state-space models, need to have the same size and the same numbers of hankel singular values.

  • suitable for any ROM

param SS_list

List of state-space models instances of sharpy.linear.src.libss.ss class.

type SS_list

list

param wv

list of interpolatory weights.

type wv

list

param U_list

small size, thin SVD factors of Gramians square roots of each state space model (\(\mathbf{U}\)).

type U_list

list

param VT_list

small size, thin SVD factors of Gramians square roots of each state space model (\(\mathbf{V}^\top\)).

type VT_list

list

param hsv_list

small size, thin SVD factors of Gramians square roots of each state space model. If None, it is assumed that

U_list = [ U_i sqrt(hsv_i) ] VT_list = [ sqrt(hsv_i) V_i.T ]

where U_i and V_i.T are square matrices and hsv is an array.

type hsv_list

list

param M_list

for fast on-line evaluation. Small size product of Gramians factors of each state-space model. Each element of this list is equal to: M_i = U_i hsv_i V_i.T

type M_list

list

Notes

Message for future generations:

  • the implementation is divided into an offline and online part.

References:

Maraniello S. and Palacios R., Frequency-limited balanced truncation for parametric reduced-order modelling of the UVLM. Only in the best theaters.

See also

Frequency-Limited Balanced ROMs may be obtained from SHARPy using sharpy.rom.balanced.FrequencyLimited.

InterpROM
class sharpy.rom.utils.librom_interp.InterpROM(SS, VV=None, WWT=None, Vref=None, WTref=None, method_proj=None)[source]

State-space 1D interpolation class.

This class allows interpolating from a list of state-space models, SS.

State-space models are required to have the same number of inputs and outputs and need to have the same number of states.

For state-space interpolation, state-space models also need to be defined over the same set of generalised coordinates. If this is not the case, the projection matrices W and V used to produce the ROMs, ie

\[\mathbf{A}_{proj} = \mathbf{W}^\top \mathbf{A V}\]

where A is the full-states matrix, also need to be provided. This will allow projecting the state-space models onto a common set of generalised coordinates before interpoling.

For development purposes, the method currently creates a hard copy of the projected matrices into the self.AA, self.BB, self.CC lists

Inputs:

  • SS: list of state-space models (instances of libss.ss class)

  • VV: list of V matrices used to produce SS. If None, it is assumed that ROMs are defined over the same basis

  • WWT: list of W^T matrices used to derive the ROMs.

  • Vref, WTref: reference subspaces for projection. Some methods neglect this input (e.g. panzer)

  • method_proj: method for projection of state-space models over common coordinates. Available options are:

    • leastsq: find left/right projectors using least squares approx. Suitable for all basis.

    • strongMAC: strong Modal Assurance Criterion [4] enforcement for general basis. See Ref. [3], Eq. (7)

    • strongMAC_BT: strong Modal Assurance Criterion [4] enforcement for basis obtained by Balanced Truncation. Equivalent to strongMAC

    • maraniello_BT: this is equivalent to strongMAC and strongMAC_BT but avoids inversions. However, performance are the same as other strongMAC approaches - it works only when basis map the same subspaces

    • weakMAC_right_orth: weak MAC enforcement [1,3] for state-space models with right orthonoraml basis, i.e. V.T V = I. This is like Ref. [1], but implemented only on one side.

    • weakMAC: implementation of weak MAC enforcement for a general system. The method orthonormalises the right basis (V) and then solves the orthogonal Procrustes problem.

    • for orthonormal basis (V.T V = I): !!! These methods are not tested !!!

      • panzer: produces a new reference point based on svd [2]

      • amsallem: project over Vref,WTref [1]

References:

[1] D. Amsallem and C. Farhat, An online method for interpolating linear parametric reduced-order models, SIAM J. Sci. Comput., 33 (2011), pp. 2169–2198.

[2] Panzer, J. Mohring, R. Eid, and B. Lohmann, Parametric model order reduction by matrix interpolation, at–Automatisierungstechnik, 58 (2010), pp. 475–484.

[3] Mahony, R., Sepulchre, R. & Absil, P. -a., 2004. Riemannian Geometry of Grassmann Manifolds with a View on Algorithmic Computation. Acta Applicandae Mathematicae, 80(2), pp.199–220.

[4] Geuss, M., Panzer, H. & Lohmann, B., 2013. On parametric model order reduction by matrix interpolation. 2013 European Control Conference (ECC), pp.3433–3438.

project()[source]

Project the state-space models onto the generalised coordinates of state-space model IImap

transfer_function

Returns an interpolatory state-space model based on the transfer function method [1]. This method is general and is, effectively, a wrapper of the sharpy.linear.src.libss.join() method.

Features:

  • stability preserved

  • system size increases with interpolatory order, but can be optimised for fast on-line evaluation

param SS_list

List of state-space models instances of sharpy.linear.src.libss.ss class.

type SS_list

list

param wv

list of interpolatory weights.

type wv

list

Notes

For fast online evaluation, this routine can be optimised to return a class that handles each state-space model independently. See ref. [1] for more details.

References

[1] Benner, P., Gugercin, S. & Willcox, K., 2015. A Survey of Projection-Based Model Reduction Methods for Parametric Dynamical Systems. SIAM Review, 57(4), pp.483–531.

Structural Packages

Models
StructTimeStepInfo
class sharpy.structure.models.beam.StructTimeStepInfo(num_node, num_elem, num_node_elem=3, num_dof=None, num_bodies=1)[source]

Structural Time Step Class.

Contains the relevant attributes for the structural description of a single time step.

in_global_AFoR

True if the variables are stored in the global A FoR. False'' if they are stored in the local A FoR of each body. Always ``True for single-body simulations

Type

bool

num_node

Number of nodes

Type

int

num_elem

Number of elements

Type

int

num_node_elem

Number of nodes per element

Type

int

pos

Displacements. [num_node x 3] containing the vector of x, y and z coordinates (in A frame) of the beam nodes.

Type

np.ndarray

pos_dot

Velocities. Time derivative of pos.

Type

np.ndarray

pos_ddot

Accelerations. Time derivative of pos_dot

Type

np.ndarray

psi

Cartesian Rotation Vector. [num_elem x num_node_elem x 3] CRV for each node in each element.

Type

np.ndarray

psi_dot

Time derivative of psi.

Type

np.ndarray

psi_ddot

Time derivative of psi_dot.

Type

np.ndarray

quat

Quaternion expressing the transformation between the A and G frames.

Type

np.ndarray

for_pos

A frame of reference position (with respect to the G` frame of reference).

Type

np.ndarray

for_vel

A frame of reference velocity. Expressed in A FoR

Type

np.ndarray

for_acc

A frame of reference acceleration. Expressed in A FoR

Type

np.ndarray

steady_applied_forces

Forces applied to the structure not associated to time derivatives [num_nodes x 6]. Expressed in B FoR

Type

np.ndarray

unsteady_applied_forces

Forces applied to the structure associated to time derivatives [num_node x 6]. Expressed in B FoR

Type

np.ndarray

runtime_generated_forces

Forces generated at runtime through runtime generators [num_node x 6]. Expressed in B FoR

Type

np.ndarray

gravity_forces

Gravity forces at nodes [num_node x 6]. Expressed in A FoR

Type

np.ndarray

total_gravity_forces

Total gravity forces on the structure [6]. Expressed in A FoR

Type

np.ndarray

total_forces

Total forces applied to the structure [6]. Expressed in A FoR

Type

np.ndarray

q

State vector associated to the structural system of equations [num_dof + 10]

Type

np.ndarray

dqdt

Time derivative of q

Type

np.ndarray

dqddt

Time derivative of dqdt

Type

np.ndarray

postproc_cell

Variables associated to cells to be postprocessed

Type

dict

postproc_node

Variables associated to nodes to be postprocessed

Type

dict

mb_FoR_pos

Position of the local A FoR of each body [num_bodies x 6]

Type

np.ndarray

mb_FoR_vel

Velocity of the local A FoR of each body [num_bodies x 6]

Type

np.ndarray

mb_FoR_acc

Acceleration of the local A FoR of each body [num_bodies x 6]

Type

np.ndarray

mb_quat

Quaternion of the local A FoR of each body [num_bodies x 4]

Type

np.ndarray

mb_dquatdt

Time derivative of mb_quat

Type

np.ndarray

forces_constraints_nodes

Forces associated to Lagrange Constraints on nodes [num_node x 6]

Type

np.ndarray

forces_constraints_FoR

Forces associated to Lagrange Contraints on frames of reference [num_bodies x 10]

Type

np.ndarray

mb_dict

Dictionary with the multibody information. It comes from the file case.mb.h5

Type

np.ndarray

change_to_global_AFoR(for0_pos, for0_vel, quat0)[source]

Reference a StructTimeStepInfo to the global A frame of reference

Parameters
  • for0_pos (np.ndarray) – Position of the global A FoR

  • for0_vel (np.ndarray) – Velocity of the global A FoR

  • quat0 (np.ndarray) – Quaternion of the global A FoR

change_to_local_AFoR(for0_pos, for0_vel, quat0)[source]

Reference a StructTimeStepInfo to the local A frame of reference

Parameters
  • for0_pos (np.ndarray) – Position of the global A FoR

  • for0_vel (np.ndarray) – Velocity of the global A FoR

  • quat0 (np.ndarray) – Quaternion of the global A FoR

copy()[source]

Returns a copy of a deepcopy of a StructTimeStepInfo

euler_angles()[source]

Returns the 3 Euler angles (roll, pitch, yaw) for a given time step.

Returns

np.array (roll, pitch, yaw) in radians.

get_body(beam, num_dof_ibody, ibody)[source]

Extract the body number ibody from a multibody system

This function returns a StructTimeStepInfo class (ibody_StructTimeStepInfo) that only includes the body number ibody of the original multibody system self

Parameters
  • beam (Beam) – beam information of the multibody system

  • num_dof_ibody (int) – Number of degrees of freedom associated to the ibody

  • ibody (int) – body number to be extracted

Returns

timestep information of the isolated body

Return type

StructTimeStepInfo

glob_pos(include_rbm=True)[source]

Returns the position of the nodes in G FoR

whole_structure_to_global_AFoR(beam)[source]

Same as change_to_global_AFoR but for a multibody structure

Parameters

beam (sharpy.structure.models.beam.Beam) – Beam structure of PreSharpy

whole_structure_to_local_AFoR(beam)[source]

Same as change_to_local_AFoR but for a multibody structure

Parameters

beam (sharpy.structure.models.beam.Beam) – Beam structure of PreSharpy

Element
class sharpy.structure.models.beamstructures.Element(ielem, n_nodes, global_connectivities, coordinates, frame_of_reference_delta, structural_twist, num_mem, stiff_index, mass_index)[source]

This class stores all the required data for the definition of a linear or quadratic beam element.

get_triad()[source]

Generates two unit vectors in body FoR that define the local FoR for a beam element. These vectors are calculated using frame_of_reference_delta :return:

Utils
LagrangeConstraints library

LagrangeConstraints library

Library used to create the matrices associated to boundary conditions through the method of Lagrange Multipliers. The source code includes four different sections.

  • Basic structures: basic functions and variables needed to organise the library with different Lagrange Constraints to enhance the interaction with this library.

  • Auxiliar functions: basic queries that are performed repeatedly.

  • Equations: functions that generate the equations associated to the constraint of basic degrees of freedom.

  • Lagrange Constraints: different available Lagrange Constraints. They tipically use the basic functions in “Equations” to assembly the required set of equations.

Attributes:

dict_of_lc (dict): Dictionary including the available Lagrange Contraint identifier (_lc_id) and the associated BaseLagrangeConstraint class

Notes:

To use this library: import sharpy.structure.utils.lagrangeconstraints as lagrangeconstraints

Args:

lc_list (list): list of all the defined contraints MBdict (dict): dictionary with the MultiBody and LagrangeMultipliers information MB_beam (list): list of Beam of each of the bodies that form the system MB_tstep (list): list of StructTimeStepInfo of each of the bodies that form the system num_LM_eq (int): number of new equations needed to define the boundary boundary conditions sys_size (int): total number of degrees of freedom of the multibody system dt (float): time step Lambda (np.ndarray): list of Lagrange multipliers values Lambda_dot (np.ndarray): list of the first derivative of the Lagrange multipliers values dynamic_or_static (str): string defining if the computation is dynamic or static LM_C (np.ndarray): Damping matrix associated to the Lagrange Multipliers equations LM_K (np.ndarray): Stiffness matrix associated to the Lagrange Multipliers equations LM_Q (np.ndarray): Vector of independent terms associated to the Lagrange Multipliers equations

BaseLagrangeConstraint
class sharpy.structure.utils.lagrangeconstraints.BaseLagrangeConstraint[source]

Base class for LagrangeConstraints showing the methods required. They will be inherited by all the Lagrange Constraints

_n_eq

Number of equations required by a LagrangeConstraint

Type

int

_ieq

Number of the first equation associated to the Lagrange Constraint in the whole set of Lagrange equations

Type

int

abstract dynamicmat(LM_C, LM_K, LM_Q, MB_beam, MB_tstep, ts, num_LM_eq, sys_size, dt, Lambda, Lambda_dot)[source]

Generates the structural matrices (damping, stiffness) and the independent vector associated to the LagrangeConstraint in a dynamic simulation

abstract dynamicpost(lc_list, MB_beam, MB_tstep)[source]

Postprocess operations needed by the LagrangeConstraint in a dynamic simulation

abstract get_n_eq()[source]

Returns the number of equations required by the Lagrange Constraint

abstract initialise(MBdict_entry, ieq)[source]

Initialisation

abstract staticmat(LM_C, LM_K, LM_Q, MB_beam, MB_tstep, ts, num_LM_eq, sys_size, dt, Lambda, Lambda_dot)[source]

Generates the structural matrices (damping, stiffness) and the independent vector associated to the LagrangeConstraint in a static simulation

abstract staticpost(lc_list, MB_beam, MB_tstep)[source]

Postprocess operations needed by the LagrangeConstraint in a static simulation

constant_rot_vel_FoR
class sharpy.structure.utils.lagrangeconstraints.constant_rot_vel_FoR[source]

This constraint forces a constant rotation velocity of a FoR

See LagrangeConstraints for the description of variables

FoR_body

body number of the “FoR”

Type

int

dynamicmat(LM_C, LM_K, LM_Q, MB_beam, MB_tstep, ts, num_LM_eq, sys_size, dt, Lambda, Lambda_dot)[source]

Generates the structural matrices (damping, stiffness) and the independent vector associated to the LagrangeConstraint in a dynamic simulation

dynamicpost(lc_list, MB_beam, MB_tstep)[source]

Postprocess operations needed by the LagrangeConstraint in a dynamic simulation

get_n_eq()[source]

Returns the number of equations required by the Lagrange Constraint

initialise(MBdict_entry, ieq, print_info=True)[source]

Initialisation

staticmat(LM_C, LM_K, LM_Q, MB_beam, MB_tstep, ts, num_LM_eq, sys_size, dt, Lambda, Lambda_dot)[source]

Generates the structural matrices (damping, stiffness) and the independent vector associated to the LagrangeConstraint in a static simulation

staticpost(lc_list, MB_beam, MB_tstep)[source]

Postprocess operations needed by the LagrangeConstraint in a static simulation

constant_vel_FoR
class sharpy.structure.utils.lagrangeconstraints.constant_vel_FoR[source]

This constraint forces a constant velocity of a FoR

See LagrangeConstraints for the description of variables

FoR_body

body number of the “FoR”

Type

int

vel

6 components of the desired velocity

Type

np.ndarray

dynamicmat(LM_C, LM_K, LM_Q, MB_beam, MB_tstep, ts, num_LM_eq, sys_size, dt, Lambda, Lambda_dot)[source]

Generates the structural matrices (damping, stiffness) and the independent vector associated to the LagrangeConstraint in a dynamic simulation

dynamicpost(lc_list, MB_beam, MB_tstep)[source]

Postprocess operations needed by the LagrangeConstraint in a dynamic simulation

get_n_eq()[source]

Returns the number of equations required by the Lagrange Constraint

initialise(MBdict_entry, ieq, print_info=True)[source]

Initialisation

staticmat(LM_C, LM_K, LM_Q, MB_beam, MB_tstep, ts, num_LM_eq, sys_size, dt, Lambda, Lambda_dot)[source]

Generates the structural matrices (damping, stiffness) and the independent vector associated to the LagrangeConstraint in a static simulation

staticpost(lc_list, MB_beam, MB_tstep)[source]

Postprocess operations needed by the LagrangeConstraint in a static simulation

def_rot_axis_FoR_wrt_node_general

This function generates the stiffness and damping matrices and the independent vector associated to a joint that forces the rotation axis of a FoR to be parallel to a certain direction. This direction is defined in the B FoR of a node and, thus, might change along the simulation.

See LagrangeConstraints for the description of variables

param rot_axisB

Rotation axis with respect to the node B FoR

type rot_axisB

np.ndarray

param indep

Number of the equations that are used as independent

type indep

np.ndarray

param node_number

number of the “node” within its own body

type node_number

int

param node_body

body number of the “node”

type node_body

int

param node_FoR_dof

position of the first degree of freedom of the FoR to which the “node” belongs

type node_FoR_dof

int

param node_dof

position of the first degree of freedom associated to the “node”

type node_dof

int

param FoR_body

body number of the “FoR”

type FoR_body

int

param FoR_dof

position of the first degree of freedom associated to the “FoR”

type FoR_dof

int

def_rot_axis_FoR_wrt_node_xyz

This function generates the stiffness and damping matrices and the independent vector associated to a joint that forces the rotation axis of a FoR to be parallel to a certain direction. This direction is defined in the B FoR of a node and parallel to x, y or z

See LagrangeConstraints for the description of variables

param rot_axisB

Rotation axis with respect to the node B FoR

type rot_axisB

np.ndarray

param indep

Number of the equations that are used as independent

type indep

np.ndarray

param node_number

number of the “node” within its own body

type node_number

int

param node_body

body number of the “node”

type node_body

int

param node_FoR_dof

position of the first degree of freedom of the FoR to which the “node” belongs

type node_FoR_dof

int

param node_dof

position of the first degree of freedom associated to the “node”

type node_dof

int

param FoR_body

body number of the “FoR”

type FoR_body

int

param FoR_dof

position of the first degree of freedom associated to the “FoR”

type FoR_dof

int

def_rot_vect_FoR_wrt_node

This function fixes the rotation velocity VECTOR of a FOR equal to a velocity vector defined in the B FoR of a node This function is a new implementation that combines and simplifies the use of ‘def_rot_vel_FoR_wrt_node’ and ‘def_rot_axis_FoR_wrt_node’ together

def_rot_vel_FoR_wrt_node

This function generates the stiffness and damping matrices and the independent vector associated to a joint that forces the rotation velocity of a FoR with respect to a node

See LagrangeConstraints for the description of variables

param rot_axisB

Rotation axis with respect to the node B FoR

type rot_axisB

np.ndarray

param rot_vel

Rotation velocity

type rot_vel

float

param node_number

number of the “node” within its own body

type node_number

int

param node_body

body number of the “node”

type node_body

int

param node_FoR_dof

position of the first degree of freedom of the FoR to which the “node” belongs

type node_FoR_dof

int

param node_dof

position of the first degree of freedom associated to the “node”

type node_dof

int

param FoR_body

body number of the “FoR”

type FoR_body

int

param FoR_dof

position of the first degree of freedom associated to the “FoR”

type FoR_dof

int

define_FoR_dof

define_FoR_dof

Define the position of the first degree of freedom associated to a certain frame of reference

param MB_beam

list of Beam

type MB_beam

list

param node_body

body to which the node belongs

type node_body

int

param num_node

number os the node within the body

type num_node

int

returns

first degree of freedom associated to the node

rtype

node_dof(int)

define_node_dof

define_node_dof

Define the position of the first degree of freedom associated to a certain node

param MB_beam

list of Beam

type MB_beam

list

param node_body

body to which the node belongs

type node_body

int

param num_node

number os the node within the body

type num_node

int

returns

first degree of freedom associated to the node

rtype

node_dof(int)

define_num_LM_eq

define_num_LM_eq

Define the number of equations needed to define the boundary boundary conditions

param lc_list()

list of all the defined contraints

returns

number of new equations needed to define the boundary boundary conditions

rtype

num_LM_eq(int)

Examples

num_LM_eq = lagrangeconstraints.define_num_LM_eq(lc_list)

Notes:

equal_lin_vel_node_FoR

This function generates the stiffness and damping matrices and the independent vector associated to a constraint that imposes equal linear velocities between a node and a frame of reference

See LagrangeConstraints for the description of variables

param node_number

number of the “node” within its own body

type node_number

int

param node_body

body number of the “node”

type node_body

int

param node_FoR_dof

position of the first degree of freedom of the FoR to which the “node” belongs

type node_FoR_dof

int

param node_dof

position of the first degree of freedom associated to the “node”

type node_dof

int

param FoR_body

body number of the “FoR”

type FoR_body

int

param FoR_dof

position of the first degree of freedom associated to the “FoR”

type FoR_dof

int

equal_pos_node_FoR

This function generates the stiffness and damping matrices and the independent vector associated to a constraint that imposes equal positions between a node and a frame of reference

See LagrangeConstraints for the description of variables

param node_FoR_dof

position of the first degree of freedom of the FoR to which the “node” belongs

type node_FoR_dof

int

param node_dof

position of the first degree of freedom associated to the “node”

type node_dof

int

param FoR_body

body number of the “FoR”

type FoR_body

int

param FoR_dof

position of the first degree of freedom associated to the “FoR”

type FoR_dof

int

free
class sharpy.structure.utils.lagrangeconstraints.free[source]
dynamicmat(LM_C, LM_K, LM_Q, MB_beam, MB_tstep, ts, num_LM_eq, sys_size, dt, Lambda, Lambda_dot)[source]

Generates the structural matrices (damping, stiffness) and the independent vector associated to the LagrangeConstraint in a dynamic simulation

dynamicpost(lc_list, MB_beam, MB_tstep)[source]

Postprocess operations needed by the LagrangeConstraint in a dynamic simulation

get_n_eq()[source]

Returns the number of equations required by the Lagrange Constraint

initialise(MBdict_entry, ieq, print_info=True)[source]

Initialisation

staticmat(LM_C, LM_K, LM_Q, MB_beam, MB_tstep, ts, num_LM_eq, sys_size, dt, Lambda, Lambda_dot)[source]

Generates the structural matrices (damping, stiffness) and the independent vector associated to the LagrangeConstraint in a static simulation

staticpost(lc_list, MB_beam, MB_tstep)[source]

Postprocess operations needed by the LagrangeConstraint in a static simulation

fully_constrained_node_FoR
class sharpy.structure.utils.lagrangeconstraints.fully_constrained_node_FoR[source]

This constraint forces linear and angular displacements between a node and a FoR to be the same

See LagrangeConstraints for the description of variables

node_number

number of the “node” within its own body

Type

int

node_body

body number of the “node”

Type

int

FoR_body

body number of the “FoR”

Type

int

dynamicmat(LM_C, LM_K, LM_Q, MB_beam, MB_tstep, ts, num_LM_eq, sys_size, dt, Lambda, Lambda_dot)[source]

Generates the structural matrices (damping, stiffness) and the independent vector associated to the LagrangeConstraint in a dynamic simulation

dynamicpost(lc_list, MB_beam, MB_tstep)[source]

Postprocess operations needed by the LagrangeConstraint in a dynamic simulation

get_n_eq()[source]

Returns the number of equations required by the Lagrange Constraint

initialise(MBdict_entry, ieq, print_info=True)[source]

Initialisation

staticmat(LM_C, LM_K, LM_Q, MB_beam, MB_tstep, ts, num_LM_eq, sys_size, dt, Lambda, Lambda_dot)[source]

Generates the structural matrices (damping, stiffness) and the independent vector associated to the LagrangeConstraint in a static simulation

staticpost(lc_list, MB_beam, MB_tstep)[source]

Postprocess operations needed by the LagrangeConstraint in a static simulation

generate_lagrange_matrix

generate_lagrange_matrix

Generates the matrices associated to the Lagrange multipliers boundary conditions

param lc_list()

list of all the defined contraints

param MBdict

dictionary with the MultiBody and LagrangeMultipliers information

type MBdict

dict

param MB_beam

list of ‘beams’ of each of the bodies that form the system

type MB_beam

list

param MB_tstep

list of ‘StructTimeStepInfo’ of each of the bodies that form the system

type MB_tstep

list

param num_LM_eq

number of new equations needed to define the boundary boundary conditions

type num_LM_eq

int

param sys_size

total number of degrees of freedom of the multibody system

type sys_size

int

param dt

time step

type dt

float

param Lambda

list of Lagrange multipliers values

type Lambda

np.ndarray

param Lambda_dot

list of the first derivative of the Lagrange multipliers values

type Lambda_dot

np.ndarray

param dynamic_or_static

string defining if the computation is dynamic or static

type dynamic_or_static

str

returns

Damping matrix associated to the Lagrange Multipliers equations LM_K (np.ndarray): Stiffness matrix associated to the Lagrange Multipliers equations LM_Q (np.ndarray): Vector of independent terms associated to the Lagrange Multipliers equations

rtype

LM_C (np.ndarray)

hinge_FoR
class sharpy.structure.utils.lagrangeconstraints.hinge_FoR[source]

This constraint forces a hinge at a FoR

See LagrangeConstraints for the description of variables

body_FoR

body number of the “FoR”

Type

int

rot_axis_AFoR

Rotation axis with respect to the node A FoR

Type

np.ndarray

dynamicmat(LM_C, LM_K, LM_Q, MB_beam, MB_tstep, ts, num_LM_eq, sys_size, dt, Lambda, Lambda_dot)[source]

Generates the structural matrices (damping, stiffness) and the independent vector associated to the LagrangeConstraint in a dynamic simulation

dynamicpost(lc_list, MB_beam, MB_tstep)[source]

Postprocess operations needed by the LagrangeConstraint in a dynamic simulation

get_n_eq()[source]

Returns the number of equations required by the Lagrange Constraint

initialise(MBdict_entry, ieq, print_info=True)[source]

Initialisation

staticmat(LM_C, LM_K, LM_Q, MB_beam, MB_tstep, ts, num_LM_eq, sys_size, dt, Lambda, Lambda_dot)[source]

Generates the structural matrices (damping, stiffness) and the independent vector associated to the LagrangeConstraint in a static simulation

staticpost(lc_list, MB_beam, MB_tstep)[source]

Postprocess operations needed by the LagrangeConstraint in a static simulation

hinge_FoR_wrtG
class sharpy.structure.utils.lagrangeconstraints.hinge_FoR_wrtG[source]

This constraint forces a hinge at a FoR

See LagrangeConstraints for the description of variables

body_FoR

body number of the “FoR”

Type

int

rot_axis_AFoR

Rotation axis with respect to the node G FoR

Type

np.ndarray

dynamicmat(LM_C, LM_K, LM_Q, MB_beam, MB_tstep, ts, num_LM_eq, sys_size, dt, Lambda, Lambda_dot)[source]

Generates the structural matrices (damping, stiffness) and the independent vector associated to the LagrangeConstraint in a dynamic simulation

dynamicpost(lc_list, MB_beam, MB_tstep)[source]

Postprocess operations needed by the LagrangeConstraint in a dynamic simulation

get_n_eq()[source]

Returns the number of equations required by the Lagrange Constraint

initialise(MBdict_entry, ieq, print_info=True)[source]

Initialisation

staticmat(LM_C, LM_K, LM_Q, MB_beam, MB_tstep, ts, num_LM_eq, sys_size, dt, Lambda, Lambda_dot)[source]

Generates the structural matrices (damping, stiffness) and the independent vector associated to the LagrangeConstraint in a static simulation

staticpost(lc_list, MB_beam, MB_tstep)[source]

Postprocess operations needed by the LagrangeConstraint in a static simulation

hinge_node_FoR
class sharpy.structure.utils.lagrangeconstraints.hinge_node_FoR[source]

This constraint forces a hinge behaviour between a node and a FoR

See LagrangeConstraints for the description of variables

node_number

number of the “node” within its own body

Type

int

node_body

body number of the “node”

Type

int

FoR_body

body number of the “FoR”

Type

int

rot_axisB

Rotation axis with respect to the node B FoR

Type

np.ndarray

dynamicmat(LM_C, LM_K, LM_Q, MB_beam, MB_tstep, ts, num_LM_eq, sys_size, dt, Lambda, Lambda_dot)[source]

Generates the structural matrices (damping, stiffness) and the independent vector associated to the LagrangeConstraint in a dynamic simulation

dynamicpost(lc_list, MB_beam, MB_tstep)[source]

Postprocess operations needed by the LagrangeConstraint in a dynamic simulation

get_n_eq()[source]

Returns the number of equations required by the Lagrange Constraint

initialise(MBdict_entry, ieq, print_info=True)[source]

Initialisation

staticmat(LM_C, LM_K, LM_Q, MB_beam, MB_tstep, ts, num_LM_eq, sys_size, dt, Lambda, Lambda_dot)[source]

Generates the structural matrices (damping, stiffness) and the independent vector associated to the LagrangeConstraint in a static simulation

staticpost(lc_list, MB_beam, MB_tstep)[source]

Postprocess operations needed by the LagrangeConstraint in a static simulation

hinge_node_FoR_constant_vel
class sharpy.structure.utils.lagrangeconstraints.hinge_node_FoR_constant_vel[source]

This constraint forces a hinge behaviour between a node and a FoR and a constant rotation velocity at the join

See LagrangeConstraints for the description of variables

node_number

number of the “node” within its own body

Type

int

node_body

body number of the “node”

Type

int

FoR_body

body number of the “FoR”

Type

int

rot_vect

Rotation velocity vector in the node B FoR

Type

np.ndarray

dynamicmat(LM_C, LM_K, LM_Q, MB_beam, MB_tstep, ts, num_LM_eq, sys_size, dt, Lambda, Lambda_dot)[source]

Generates the structural matrices (damping, stiffness) and the independent vector associated to the LagrangeConstraint in a dynamic simulation

dynamicpost(lc_list, MB_beam, MB_tstep)[source]

Postprocess operations needed by the LagrangeConstraint in a dynamic simulation

get_n_eq()[source]

Returns the number of equations required by the Lagrange Constraint

initialise(MBdict_entry, ieq, print_info=True)[source]

Initialisation

staticmat(LM_C, LM_K, LM_Q, MB_beam, MB_tstep, ts, num_LM_eq, sys_size, dt, Lambda, Lambda_dot)[source]

Generates the structural matrices (damping, stiffness) and the independent vector associated to the LagrangeConstraint in a static simulation

staticpost(lc_list, MB_beam, MB_tstep)[source]

Postprocess operations needed by the LagrangeConstraint in a static simulation

initialise_lc

Initialises the Lagrange Constraints

lagrangeconstraint

Decorator used to create the dictionary (dict_of_lc) that links constraints id (_lc_id) to the associated BaseLagrangeConstraint class

lc_from_string

Returns the BaseLagrangeConstraint class associated to a constraint id (_lc_id)

lin_vel_node_wrtA
class sharpy.structure.utils.lagrangeconstraints.lin_vel_node_wrtA[source]

This constraint forces the linear velocity of a node to have a certain value with respect to the A FoR

See LagrangeConstraints for the description of variables

node_number

number of the “node” within its own body

Type

int

body_number

body number of the “node”

Type

int

vel

6 components of the desired velocity with respect to the A FoR

Type

np.ndarray

dynamicmat(LM_C, LM_K, LM_Q, MB_beam, MB_tstep, ts, num_LM_eq, sys_size, dt, Lambda, Lambda_dot)[source]

Generates the structural matrices (damping, stiffness) and the independent vector associated to the LagrangeConstraint in a dynamic simulation

dynamicpost(lc_list, MB_beam, MB_tstep)[source]

Postprocess operations needed by the LagrangeConstraint in a dynamic simulation

get_n_eq()[source]

Returns the number of equations required by the Lagrange Constraint

initialise(MBdict_entry, ieq, print_info=True)[source]

Initialisation

staticmat(LM_C, LM_K, LM_Q, MB_beam, MB_tstep, ts, num_LM_eq, sys_size, dt, Lambda, Lambda_dot)[source]

Generates the structural matrices (damping, stiffness) and the independent vector associated to the LagrangeConstraint in a static simulation

staticpost(lc_list, MB_beam, MB_tstep)[source]

Postprocess operations needed by the LagrangeConstraint in a static simulation

lin_vel_node_wrtG
class sharpy.structure.utils.lagrangeconstraints.lin_vel_node_wrtG[source]

This constraint forces the linear velocity of a node to have a certain value with respect to the G FoR

See LagrangeConstraints for the description of variables

node_number

number of the “node” within its own body

Type

int

body_number

body number of the “node”

Type

int

vel

6 components of the desired velocity with respect to the G FoR

Type

np.ndarray

dynamicmat(LM_C, LM_K, LM_Q, MB_beam, MB_tstep, ts, num_LM_eq, sys_size, dt, Lambda, Lambda_dot)[source]

Generates the structural matrices (damping, stiffness) and the independent vector associated to the LagrangeConstraint in a dynamic simulation

dynamicpost(lc_list, MB_beam, MB_tstep)[source]

Postprocess operations needed by the LagrangeConstraint in a dynamic simulation

get_n_eq()[source]

Returns the number of equations required by the Lagrange Constraint

initialise(MBdict_entry, ieq, print_info=True)[source]

Initialisation

staticmat(LM_C, LM_K, LM_Q, MB_beam, MB_tstep, ts, num_LM_eq, sys_size, dt, Lambda, Lambda_dot)[source]

Generates the structural matrices (damping, stiffness) and the independent vector associated to the LagrangeConstraint in a static simulation

staticpost(lc_list, MB_beam, MB_tstep)[source]

Postprocess operations needed by the LagrangeConstraint in a static simulation

postprocess

Run the postprocess of all the Lagrange Constraints in the system

print_available_lc

Prints the available Lagrange Constraints

remove_constraint

Removes a constraint from the list. This function is thought to release constraints at some point during a dynamic simulation

spherical_FoR
class sharpy.structure.utils.lagrangeconstraints.spherical_FoR[source]

This constraint forces a spherical join at a FoR

See LagrangeConstraints for the description of variables

body_FoR

body number of the “FoR”

Type

int

dynamicmat(LM_C, LM_K, LM_Q, MB_beam, MB_tstep, ts, num_LM_eq, sys_size, dt, Lambda, Lambda_dot)[source]

Generates the structural matrices (damping, stiffness) and the independent vector associated to the LagrangeConstraint in a dynamic simulation

dynamicpost(lc_list, MB_beam, MB_tstep)[source]

Postprocess operations needed by the LagrangeConstraint in a dynamic simulation

get_n_eq()[source]

Returns the number of equations required by the Lagrange Constraint

initialise(MBdict_entry, ieq, print_info=True)[source]

Initialisation

staticmat(LM_C, LM_K, LM_Q, MB_beam, MB_tstep, ts, num_LM_eq, sys_size, dt, Lambda, Lambda_dot)[source]

Generates the structural matrices (damping, stiffness) and the independent vector associated to the LagrangeConstraint in a static simulation

staticpost(lc_list, MB_beam, MB_tstep)[source]

Postprocess operations needed by the LagrangeConstraint in a static simulation

spherical_node_FoR
class sharpy.structure.utils.lagrangeconstraints.spherical_node_FoR[source]

This constraint forces a spherical join between a node and a FoR

See LagrangeConstraints for the description of variables

node_number

number of the “node” within its own body

Type

int

node_body

body number of the “node”

Type

int

FoR_body

body number of the “FoR”

Type

int

dynamicmat(LM_C, LM_K, LM_Q, MB_beam, MB_tstep, ts, num_LM_eq, sys_size, dt, Lambda, Lambda_dot)[source]

Generates the structural matrices (damping, stiffness) and the independent vector associated to the LagrangeConstraint in a dynamic simulation

dynamicpost(lc_list, MB_beam, MB_tstep)[source]

Postprocess operations needed by the LagrangeConstraint in a dynamic simulation

get_n_eq()[source]

Returns the number of equations required by the Lagrange Constraint

initialise(MBdict_entry, ieq, print_info=True)[source]

Initialisation

staticmat(LM_C, LM_K, LM_Q, MB_beam, MB_tstep, ts, num_LM_eq, sys_size, dt, Lambda, Lambda_dot)[source]

Generates the structural matrices (damping, stiffness) and the independent vector associated to the LagrangeConstraint in a static simulation

staticpost(lc_list, MB_beam, MB_tstep)[source]

Postprocess operations needed by the LagrangeConstraint in a static simulation

assert_modes_mass_normalised

Asserts the eigenvectors result in an identity modal mass matrix.

param phi

Eigenvector matrix

type phi

np.ndarray

param m

Mass matrix

type m

np.ndarray

param tolerance

Absolute tolerance.

type tolerance

float

param raise_error

Raise AssertionError if modes not mass normalised.

type raise_error

bool

returns

if raise_error == True it raises an error.

rtype

AssertionError

assert_orthogonal_eigenvectors

Checks orthogonality between eigenvectors

param u

Eigenvector 1.

type u

np.ndarray

param v

Eigenvector 2.

type v

np.ndarray

param decimal

Number of decimal points to compare

type decimal

int

param raise_error

Raise an error or print a warning

type raise_error

bool

raises AssertionError

if raise_error == True it raises an error.

free_modes_principal_axes

Transforms the rigid body modes defined at with the A frame as reference to the centre of mass position and aligned with the principal axes of inertia.

References

Marc Artola, 2020

get_mode_zeta

Retrieves the UVLM grid nodal displacements associated to the eigenvector eigvect

mode_sign_convention

When comparing against different cases, it is important that the modes share a common sign convention.

In this case, modes will be arranged such that the z-coordinate of the first free end is positive.

If the z-coordinate is 0, then the y-coordinate is forced to be positive, then x, followed by the CRV in y, x and z.

returns

Eigenvectors following the aforementioned sign convention.

rtype

np.ndarray

scale_mass_normalised_modes

Scales eigenvector matrix such that the modes are mass normalised:

\[\phi^\top\boldsymbol{M}\phi = \boldsymbol{I}\]

and

\[\phi^\top\boldsymbol{K}\phi = \mathrm{diag}(\omega^2)\]
param eigenvectors

Eigenvector matrix.

type eigenvectors

np.array

param mass_matrix

Mass matrix.

type mass_matrix

np.array

returns

Mass-normalised eigenvectors.

rtype

np.array

scale_mode
Scales the eigenvector such that:
  1. the maximum change in component of the beam cartesian rotation vector

is equal to rot_max_deg degrees.
  1. the maximum translational displacement does not exceed perc_max the

maximum nodal position.

Warning

If the eigenvector is in state-space form, only the first half of the eigenvector is scanned for determining the scaling.

write_modes_vtk

Writes a vtk file for each of the first NumLambda eigenvectors. When these are associated to the state-space form of the structural equations, only the displacement field is saved.

write_zeta_vtk

Given a list of arrays representing the coordinates of a set of n_surf UVLM lattices and organised as:

zeta[n_surf][3,M+1,N=1]

this function writes a vtk for each of the n_surf surfaces.

Input:
  • zeta: lattice coordinates to plot

  • zeta_ref: reference lattice used to compute the magnitude of displacements

  • filename_root: initial part of filename (full path) without file

extension (.vtk)

Xbopts
class sharpy.structure.utils.xbeamlib.Xbopts(*args: Any, **kwargs: Any)
cbeam3_asbly_dynamic
cbeam3_asbly_static
cbeam3_correct_gravity_forces
cbeam3_loads
cbeam3_solv_modal
cbeam3_solv_nlnstatic
xbeam3_asbly_dynamic

Utilities

Algebra package

Algebra package

Extensive library with geometrical and algebraic operations

Note:

Tests can be found in tests/utils/algebra_test

cross3

Computes the cross product of two vectors (v and w) with size 3

crv2quat

Converts a Cartesian rotation vector,

\[\vec{\psi} = \psi\,\mathbf{\hat{n}}\]

into a “minimal rotation” quaternion, i.e. being the quaternion, \(\vec{\chi}\), defined as:

\[\vec{\chi}= \left[\cos\left(\frac{\psi}{2}\right),\, \sin\left(\frac{\psi}{2}\right)\mathbf{\hat{n}}\right]\]

the rotation axis, \(\mathbf{\hat{n}}\) is such that the rotation angle, \(\psi\), is in \([-\pi,\,\pi]\) or, equivalently, \(\chi_0\ge0\).

param psi

Cartesian Rotation Vector, CRV: \(\vec{\psi} = \psi\,\mathbf{\hat{n}}\).

type psi

np.array

returns

equivalent quaternion \(\vec{\chi}\)

rtype

np.array

crv2rotation

Given a Cartesian rotation vector, \(\boldsymbol{\Psi}\), the function produces the rotation matrix required to rotate a vector according to \(\boldsymbol{\Psi}\).

The rotation matrix is given by

\[\mathbf{R} = \mathbf{I} + \frac{\sin||\boldsymbol{\Psi}||}{||\boldsymbol{\Psi}||} \tilde{\boldsymbol{\Psi}} + \frac{1-\cos{||\boldsymbol{\Psi}||}}{||\boldsymbol{\Psi}||^2}\tilde{\boldsymbol{\Psi}} \tilde{\boldsymbol{\Psi}}\]

To avoid the singularity when \(||\boldsymbol{\Psi}||=0\), the series expansion is used

\[\mathbf{R} = \mathbf{I} + \tilde{\boldsymbol{\Psi}} + \frac{1}{2!}\tilde{\boldsymbol{\Psi}}^2.\]
param psi

Cartesian rotation vector \(\boldsymbol{\Psi}\).

type psi

np.array

returns

equivalent rotation matrix

rtype

np.array

References

Geradin and Cardona, Flexible Multibody Dynamics: A finite element approach. Chapter 4

crv2tan

Returns the tangential operator, \(\mathbf{T}(\boldsymbol{\Psi})\), that is a function of the Cartesian Rotation Vector, \(\boldsymbol{\Psi}\).

\[\boldsymbol{T}(\boldsymbol{\Psi}) = \mathbf{I} + \left(\frac{\cos ||\boldsymbol{\Psi}|| - 1}{||\boldsymbol{\Psi}||^2}\right)\tilde{\boldsymbol{\Psi}} + \left(1 - \frac{\sin||\boldsymbol{\Psi}||}{||\boldsymbol{\Psi}||}\right) \frac{\tilde{\boldsymbol{\Psi}}\tilde{\boldsymbol{\Psi}}}{||\boldsymbol{\Psi}||^2}\]

When the norm of the CRV approaches 0, the series expansion expression is used in-lieu of the above expression

\[\boldsymbol{T}(\boldsymbol{\Psi}) = \mathbf{I} -\frac{1}{2!}\tilde{\boldsymbol{\Psi}} + \frac{1}{3!}\tilde{\boldsymbol{\Psi}}^2\]
param psi

Cartesian Rotation Vector, \(\boldsymbol{\Psi}\).

type psi

np.array

returns

Tangential operator

rtype

np.array

References

Geradin and Cardona. Flexible Multibody Dynamics: A Finite Element Approach. Chapter 4.

crv_bounds

Forces the Cartesian rotation vector norm, \(\|\vec{\psi}\|\), to be in the range \([-\pi,\pi]\), i.e. determines the rotation axis orientation, \(\mathbf{\hat{n}}\), so as to ensure “minimal rotation”.

param crv_ini

Cartesian rotation vector, \(\vec{\psi}\)

type crv_ini

np.array

returns

modified and bounded, equivalent Cartesian rotation vector

rtype

np.array

der_CcrvT_by_v

Being C=C(fv0) the rotation matrix depending on the Cartesian rotation vector fv0 and defined as C=crv2rotation(fv0), the function returns the derivative, w.r.t. the CRV components, of the vector dot(C.T,v), where v is a constant vector.

The elements of the resulting derivative matrix D are ordered such that:

\[d(C.T*v) = D*d(fv0)\]

where \(d(.)\) is a delta operator.

der_Ccrv_by_v

Being C=C(fv0) the rotational matrix depending on the Cartesian rotation vector fv0 and defined as C=crv2rotation(fv0), the function returns the derivative, w.r.t. the CRV components, of the vector dot(C,v), where v is a constant vector.

The elements of the resulting derivative matrix D are ordered such that:

\[d(C*v) = D*d(fv0)\]

where \(d(.)\) is a delta operator.

der_Ceuler_by_v

Provides the derivative of the product between the rotation matrix \(C^{AG}(\mathbf{\Theta})\) and a constant vector, \(\mathbf{v}\), with respect to the Euler angles, \(\mathbf{\Theta}=[\phi,\theta,\psi]^T\):

\[\frac{\partial}{\partial\Theta}(C^{AG}(\Theta)\mathbf{v}^G) = \frac{\partial \mathbf{f}}{\partial\mathbf{\Theta}}\]

where \(\frac{\partial \mathbf{f}}{\partial\mathbf{\Theta}}\) is the resulting 3 by 3 matrix.

Being \(C^{AG}(\Theta)\) the rotation matrix from the G frame to the A frame in terms of the Euler angles \(\Theta\) as:

\[\begin{split}C^{AG}(\Theta) = \begin{bmatrix} \cos\theta\cos\psi & -\cos\theta\sin\psi & \sin\theta \\ \cos\phi\sin\psi + \sin\phi\sin\theta\cos\psi & \cos\phi\cos\psi - \sin\phi\sin\theta\sin\psi & -\sin\phi\cos\theta \\ \sin\phi\sin\psi - \cos\phi\sin\theta\cos\psi & \sin\phi\cos\psi + \cos\phi\sin\theta\sin\psi & \cos\phi\cos\theta \end{bmatrix}\end{split}\]

the components of the derivative at hand are the following, where \(f_{1\theta} = \frac{\partial \mathbf{f}_1}{\partial\theta}\).

\[\begin{split}f_{1\phi} =&0 \\ f_{1\theta} = &-v_1\sin\theta\cos\psi \\ &+v_2\sin\theta\sin\psi \\ &+v_3\cos\theta \\ f_{1\psi} = &-v_1\cos\theta\sin\psi \\ &- v_2\cos\theta\cos\psi\end{split}\]
\[\begin{split}f_{2\phi} = &+v_1(-\sin\phi\sin\psi + \cos\phi\sin\theta\cos\psi) + \\ &+v_2(-\sin\phi\cos\psi - \cos\phi\sin\theta\sin\psi) + \\ &+v_3(-\cos\phi\cos\theta)\\ f_{2\theta} = &+v_1(\sin\phi\cos\theta\cos\psi) + \\ &+v_2(-\sin\phi\cos\theta\sin\psi) +\\ &+v_3(\sin\phi\sin\theta) \\ f_{2\psi} = &+v_1(\cos\phi\cos\psi - \sin\phi\sin\theta\sin\psi) + \\ &+v_2(-\cos\phi\sin\psi - \sin\phi\sin\theta\cos\psi)\end{split}\]
\[\begin{split}f_{3\phi} = &+v_1(\cos\phi\sin\psi+\sin\phi\sin\theta\cos\psi) + \\ &+v_2(\cos\phi\cos\psi - \sin\phi\sin\theta\sin\psi) + \\ &+v_3(-\sin\phi\cos\theta)\\ f_{3\theta} = &+v_1(-\cos\phi\cos\theta\cos\psi)+\\ &+v_2(\cos\phi\cos\theta\sin\psi) + \\ &+v_3(-\cos\phi\sin\theta)\\ f_{3\psi} = &+v_1(\sin\phi\cos\psi+\cos\phi\sin\theta\sin\psi) + \\ &+v_2(-\sin\phi\sin\psi + \cos\phi\sin\theta\cos\psi)\end{split}\]
param euler

Vector of Euler angles, \(\mathbf{\Theta} = [\phi, \theta, \psi]\), in radians.

type euler

np.ndarray

param v

3 dimensional vector in G frame.

type v

np.ndarray

returns

Resulting 3 by 3 matrix \(\frac{\partial \mathbf{f}}{\partial\mathbf{\Theta}}\).

rtype

np.ndarray

der_Ceuler_by_v_NED

Provides the derivative of the product between the rotation matrix \(C^{AG}(\mathbf{\Theta})\) and a constant vector, \(\mathbf{v}\), with respect to the Euler angles, \(\mathbf{\Theta}=[\phi,\theta,\psi]^T\):

\[\frac{\partial}{\partial\Theta}(C^{AG}(\Theta)\mathbf{v}^G) = \frac{\partial \mathbf{f}}{\partial\mathbf{\Theta}}\]

where \(\frac{\partial \mathbf{f}}{\partial\mathbf{\Theta}}\) is the resulting 3 by 3 matrix.

Being \(C^{AG}(\Theta)\) the rotation matrix from the G frame to the A frame in terms of the Euler angles \(\Theta\) as:

\[\begin{split}C^{AG}(\Theta) = \begin{bmatrix} \cos\theta\cos\psi & \cos\theta\sin\psi & -\sin\theta \\ -\cos\phi\sin\psi + \sin\phi\sin\theta\cos\psi & \cos\phi\cos\psi + \sin\phi\sin\theta\sin\psi & \sin\phi\cos\theta \\ \sin\phi\sin\psi + \cos\phi\sin\theta\cos\psi & -\sin\phi\cos\psi + \cos\psi\sin\theta\sin\psi & \cos\phi\cos\theta \end{bmatrix}\end{split}\]

the components of the derivative at hand are the following, where \(f_{1\theta} = \frac{\partial \mathbf{f}_1}{\partial\theta}\).

\[\begin{split}f_{1\phi} =&0 \\ f_{1\theta} = &-v_1\sin\theta\cos\psi \\ &-v_2\sin\theta\sin\psi \\ &-v_3\cos\theta \\ f_{1\psi} = &-v_1\cos\theta\sin\psi + v_2\cos\theta\cos\psi\end{split}\]
\[\begin{split}f_{2\phi} = &+v_1(\sin\phi\sin\psi + \cos\phi\sin\theta\cos\psi) + \\ &+v_2(-\sin\phi\cos\psi + \cos\phi\sin\theta\sin\psi) + \\ &+v_3(\cos\phi\cos\theta) \\ f_{2\theta} = &+v_1(\sin\phi\cos\theta\cos\psi) + \\ &+v_2(\sin\phi\cos\theta\sin\psi) +\\ &-v_3(\sin\phi\sin\theta) \\ f_{2\psi} = &+v_1(-\cos\phi\cos\psi - \sin\phi\sin\theta\sin\psi) + \\ &+v_2(-\cos\phi\sin\psi + \sin\phi\sin\theta\cos\psi)\end{split}\]
\[\begin{split}f_{3\phi} = &+v_1(\cos\phi\sin\psi-\sin\phi\sin\theta\cos\psi) + \\ &+v_2(-\cos\phi\cos\psi - \sin\phi\sin\theta\sin\psi) + \\ &+v_3(-\sin\phi\cos\theta) \\ f_{3\theta} = &+v_1(\cos\phi\cos\theta\cos\psi)+\\ &+v_2(\cos\phi\cos\theta\sin\psi) + \\ &+v_3(-\cos\phi\sin\theta) \\ f_{3\psi} = &+v_1(\sin\phi\cos\psi-\cos\phi\sin\theta\sin\psi) + \\ &+v_2(\sin\phi\sin\psi + \cos\phi\sin\theta\cos\psi)\end{split}\]

Note

This function is defined in a North East Down frame which is not the typically used one in SHARPy.

param euler

Vector of Euler angles, \(\mathbf{\Theta} = [\phi, \theta, \psi]\), in radians.

type euler

np.ndarray

param v

3 dimensional vector in G frame.

type v

np.ndarray

returns

Resulting 3 by 3 matrix \(\frac{\partial \mathbf{f}}{\partial\mathbf{\Theta}}\).

rtype

np.ndarray

der_CquatT_by_v

Returns the derivative with respect to quaternion components of a projection matrix times a constant vector.

Being \(\mathbf{C}=\mathbf{R}(\boldsymbol{\chi})^\top\) the projection matrix depending on the quaternion \(\boldsymbol{\chi}\) and obtained through the function defined as C=quat2rotation(q).T, this function returns the derivative with respect to the quaternion components, of the vector \((\mathbf{C\cdot v})\), where \(\mathbf{v}\) is a constant vector.

The derivative operation is defined as:

\[\delta(\mathbf{C}\cdot \mathbf{v}) = \frac{\partial}{\partial\boldsymbol{\chi}}\left(\mathbf{C\cdot v}\right)\delta\boldsymbol{\chi}\]

where, for simplicity, we define

\[\mathbf{D} = \frac{\partial}{\partial\boldsymbol{\chi}}\left(\mathbf{C\cdot v}\right) \in \mathbb{R}^{3\times4}\]

and \(\delta(\bullet)\) is a delta operator.

The members of \(\mathbf{D}\) are the following:

\[\begin{split}\mathbf{D}_{11} &= 2 (q_0 v_x - q_2 v_z + q_3 v_y)\\ \mathbf{D}_{12} &= 2 (q_1 v_x - q_2 v_y + q_3 v_z)\\ \mathbf{D}_{13} &= 2 (-q_0 v_z + q_1 v_y - q_2 v_x)\\ \mathbf{D}_{14} &= 2 (q_0 v_y + q_1 v_z - q_3 v_x)\end{split}\]
\[\begin{split}\mathbf{D}_{21} &= 2 (q_0 v_y + q_1 v_z - q_3 v_x)\\ \mathbf{D}_{22} &= 2 (q_0 v_z - q_1 v_y + q_2 v_x)\\ \mathbf{D}_{23} &= 2 (q_1 v_x + q_2 v_y + q_3 v_z)\\ \mathbf{D}_{24} &= 2 (-q_0 v_x + q_2 v_z - q_3 v_y)\end{split}\]
\[\begin{split}\mathbf{D}_{31} &= 2 (q_0 v_z - q_1 v_y + q_2 v_x)\\ \mathbf{D}_{32} &= 2 (-q_0 v_y - q_1 v_z + q_3 v_x)\\ \mathbf{D}_{33} &= 2 (q_0 v_x - q_2 v_z + q_3 v_y)\\ \mathbf{D}_{34} &= 2 (q_1 v_x + q_2 v_y + q_3 v_z)\\\end{split}\]
returns

\(\mathbf{D}\) matrix.

rtype

np.array

der_Cquat_by_v

Being C=C(quat) the rotational matrix depending on the quaternion q and defined as C=quat2rotation(q), the function returns the derivative, w.r.t. the quanternion components, of the vector dot(C,v), where v is a constant vector.

The elements of the resulting derivative matrix D are ordered such that:

\[d(C*v) = D*d(q)\]

where \(d(.)\) is a delta operator.

der_Peuler_by_v

Provides the derivative of the product between the projection matrix \(P^{AG}(\mathbf{\Theta})\) (that projects a vector in G frame onto A frame) and a constant vector expressed in G frame of reference, \(\mathbf{v}_G\), with respect to the Euler angles, \(\mathbf{\Theta}=[\phi,\theta,\psi]^T\):

\[\frac{\partial}{\partial\Theta}(P^{AG}(\Theta)\mathbf{v}^G) = \frac{\partial \mathbf{f}}{\partial\mathbf{\Theta}}\]

where \(\frac{\partial \mathbf{f}}{\partial\mathbf{\Theta}}\) is the resulting 3 by 3 matrix.

Being \(P^{AG}(\Theta)\) the projection matrix from the G frame to the A frame in terms of the Euler angles \(\Theta\) as \(P^{AG}(\Theta) = \tau_x(-\Phi)\tau_y(-\Theta)\tau_z(-\Psi)\), where the rotation matrix is expressed as:

\[\begin{split}C^{AG}(\Theta) = \begin{bmatrix} \cos\theta\cos\psi & -\cos\theta\sin\psi & \sin\theta \\ \cos\phi\sin\psi + \sin\phi\sin\theta\cos\psi & \cos\phi\cos\psi - \sin\phi\sin\theta\sin\psi & -\sin\phi\cos\theta \\ \sin\phi\sin\psi - \cos\phi\sin\theta\cos\psi & \sin\phi\cos\psi + \cos\phi\sin\theta\sin\psi & \cos\phi\cos\theta \end{bmatrix}\end{split}\]

and the projection matrix as:

\[\begin{split}P^{AG}(\Theta) = \begin{bmatrix} \cos\theta\cos\psi & \cos\theta\sin\psi & -\sin\theta \\ -\cos\phi\sin\psi + \sin\phi\sin\theta\cos\psi & \cos\phi\cos\psi + \sin\phi\sin\theta\sin\psi & \sin\phi\cos\theta \\ \sin\phi\sin\psi + \cos\phi\sin\theta\cos\psi & -\sin\phi\cos\psi + \cos\phi\sin\theta\sin\psi & \cos\phi\cos\theta \end{bmatrix}\end{split}\]

the components of the derivative at hand are the following, where \(f_{1\theta} = \frac{\partial \mathbf{f}_1}{\partial\theta}\).

\[\begin{split}f_{1\phi} =&0 \\ f_{1\theta} = &-v_1\sin\theta\cos\psi \\ &+v_2\sin\theta\sin\psi \\ &+v_3\cos\theta \\ f_{1\psi} = &-v_1\cos\theta\sin\psi \\ &- v_2\cos\theta\cos\psi\end{split}\]
\[\begin{split}f_{2\phi} = &+v_1(-\sin\phi\sin\psi + \cos\phi\sin\theta\cos\psi) + \\ &+v_2(-\sin\phi\cos\psi - \cos\phi\sin\theta\sin\psi) + \\ &+v_3(-\cos\phi\cos\theta)\\ f_{2\theta} = &+v_1(\sin\phi\cos\theta\cos\psi) + \\ &+v_2(-\sin\phi\cos\theta\sin\psi) +\\ &+v_3(\sin\phi\sin\theta)\\ f_{2\psi} = &+v_1(\cos\phi\cos\psi - \sin\phi\sin\theta\sin\psi) + \\ &+v_2(-\cos\phi\sin\psi - \sin\phi\sin\theta\cos\psi)\end{split}\]
\[\begin{split}f_{3\phi} = &+v_1(\cos\phi\sin\psi+\sin\phi\sin\theta\cos\psi) + \\ &+v_2(\cos\phi\cos\psi - \sin\phi\sin\theta\sin\psi) + \\ &+v_3(-\sin\phi\cos\theta)\\ f_{3\theta} = &+v_1(-\cos\phi\cos\theta\cos\psi)+\\ &+v_2(\cos\phi\cos\theta\sin\psi) + \\ &+v_3(-\cos\phi\sin\theta)\\ f_{3\psi} = &+v_1(\sin\phi\cos\psi+\cos\phi\sin\theta\sin\psi) + \\ &+v_2(-\sin\phi\sin\psi + \cos\phi\sin\theta\cos\psi)\end{split}\]
param euler

Vector of Euler angles, \(\mathbf{\Theta} = [\phi, \theta, \psi]\), in radians.

type euler

np.ndarray

param v

3 dimensional vector in G frame.

type v

np.ndarray

returns

Resulting 3 by 3 matrix \(\frac{\partial \mathbf{f}}{\partial\mathbf{\Theta}}\).

rtype

np.ndarray

der_TanT_by_xv

Being fv0 a cartesian rotation vector and Tan the corresponding tangential operator (computed through crv2tan(fv)), the function returns the derivative of dot(Tan^T,xv), where xv is a constant vector.

The elements of the resulting derivative matrix D are ordered such that:

\[d(Tan^T*xv) = D*d(fv)\]

where \(d(.)\) is a delta operator.

Note

The derivative expression has been derived symbolically and verified by FDs. A more compact expression may be possible.

der_Tan_by_xv

Being fv0 a cartesian rotation vector and Tan the corresponding tangential operator (computed through crv2tan(fv)), the function returns the derivative of dot(Tan,xv), where xv is a constant vector.

The elements of the resulting derivative matrix D are ordered such that:

\[d(Tan*xv) = D*d(fv)\]

where \(d(.)\) is a delta operator.

Note

The derivative expression has been derived symbolically and verified by FDs. A more compact expression may be possible.

der_Teuler_by_w

Calculates the matrix

\[\frac{\partial}{\partial\Theta}\left.\left(T^{GA}(\mathbf{\Theta}) \mathbf{\omega}^A\right)\right|_{\Theta_0,\omega^A_0}\]

from the linearised euler propagation equations

\[\delta\mathbf{\dot{\Theta}} = \frac{\partial}{\partial\Theta}\left.\left(T^{GA}(\mathbf{\Theta}) \mathbf{\omega}^A\right)\right|_{\Theta_0,\omega^A_0}\delta\mathbf{\Theta} + T^{GA}(\mathbf{\Theta_0}) \delta\mathbf{\omega}^A\]

where \(T^{GA}\) is the nonlinear relation between the euler angle rates and the rotational velocities and is provided by deuler_dt().

The concerned matrix is calculated as follows:

\[\begin{split}\frac{\partial}{\partial\Theta}\left.\left(T^{GA}(\mathbf{\Theta}) \mathbf{\omega}^A\right)\right|_{\Theta_0,\omega^A_0} = \\ \begin{bmatrix} q\cos\phi\tan\theta-r\sin\phi\tan\theta & q\sin\phi\sec^2\theta + r\cos\phi\sec^2\theta & 0 \\ -q\sin\phi - r\cos\phi & 0 & 0 \\ q\frac{\cos\phi}{\cos\theta}-r\frac{\sin\phi}{\cos\theta} & q\sin\phi\tan\theta\sec\theta + r\cos\phi\tan\theta\sec\theta & 0 \end{bmatrix}_{\Theta_0, \omega^A_0}\end{split}\]

Note

This function is defined in a North East Down frame which is not the typically used one in SHARPy.

param euler

Euler angles at the linearisation point \(\mathbf{\Theta}_0 = [\phi,\theta,\psi]\) or roll, pitch and yaw angles, respectively.

type euler

np.ndarray

param w

Rotational velocities at the linearisation point in A frame \(\omega^A_0\).

type w

np.ndarray

returns

Computed \(\frac{\partial}{\partial\Theta}\left.\left(T^{GA}(\mathbf{\Theta})\mathbf{\omega}^A\right)\right|_{\Theta_0,\omega^A_0}\)

rtype

np.ndarray

der_Teuler_by_w_NED

Warning

Based on a NED G frame

Calculates the matrix

\[\frac{\partial}{\partial\Theta}\left.\left(T^{GA}(\mathbf{\Theta}) \mathbf{\omega}^A\right)\right|_{\Theta_0,\omega^A_0}\]

from the linearised euler propagation equations

\[\delta\mathbf{\dot{\Theta}} = \frac{\partial}{\partial\Theta}\left.\left(T^{GA}(\mathbf{\Theta}) \mathbf{\omega}^A\right)\right|_{\Theta_0,\omega^A_0}\delta\mathbf{\Theta} + T^{GA}(\mathbf{\Theta_0}) \delta\mathbf{\omega}^A\]

where \(T^{GA}\) is the nonlinear relation between the euler angle rates and the rotational velocities and is provided by deuler_dt().

The concerned matrix is calculated as follows:

\[\begin{split}\frac{\partial}{\partial\Theta}\left.\left(T^{GA}(\mathbf{\Theta}) \mathbf{\omega}^A\right)\right|_{\Theta_0,\omega^A_0} = \\ \begin{bmatrix} q\cos\phi\tan\theta-r\sin\phi\tan\theta & q\sin\phi\sec^2\theta + r\cos\phi\sec^2\theta & 0 \\ -q\sin\phi - r\cos\phi & 0 & 0 \\ q\frac{\cos\phi}{\cos\theta}-r\frac{\sin\phi}{\cos\theta} & q\sin\phi\tan\theta\sec\theta + r\cos\phi\tan\theta\sec\theta & 0 \end{bmatrix}_{\Theta_0, \omega^A_0}\end{split}\]
param euler

Euler angles at the linearisation point \(\mathbf{\Theta}_0 = [\phi,\theta,\psi]\) or roll, pitch and yaw angles, respectively.

type euler

np.ndarray

param w

Rotational velocities at the linearisation point in A frame \(\omega^A_0\).

type w

np.ndarray

returns

Computed \(\frac{\partial}{\partial\Theta}\left.\left(T^{GA}(\mathbf{\Theta})\mathbf{\omega}^A\right)\right|_{\Theta_0,\omega^A_0}\)

rtype

np.ndarray

der_quat_wrt_crv

Provides change of quaternion, dquat, due to elementary rotation, dcrv, expressed as a 3 components Cartesian rotation vector such that

\[C(quat + dquat) = C(quat0)C(dw)\]

where C are rotation matrices.

Examples

Assume 3 FoRs, G, A and B where:
  • G is the initial FoR

  • quat0 defines te rotation required to obtain A from G, namely: Cga=quat2rotation(quat0)

  • dcrv is an inifinitesimal Cartesian rotation vector, defined in A components, which describes an infinitesimal rotation A -> B, namely:

    ..math :: Cab=crv2rotation(dcrv)

  • The total rotation G -> B is:

    Cga = Cga * Cab

  • As dcrv -> 0, Cga is equal to:

    \[algebra.quat2rotation(quat0 + dquat),\]

    where dquat is the output of this function.

der_skewp_skewp_v

rac{d}{doldsymbol{p}} ( ilde{oldsymbol{p}} ilde{oldsymbol{p}} v)

deuler_dt

Rate of change of the Euler angles in time for a given angular velocity in A frame \(\omega^A=[p, q, r]\).

\[\begin{split}\begin{bmatrix}\dot{\phi} \\ \dot{\theta} \\ \dot{\psi}\end{bmatrix} = \begin{bmatrix} 1 & \sin\phi\tan\theta & -\cos\phi\tan\theta \\ 0 & \cos\phi & \sin\phi \\ 0 & -\frac{\sin\phi}{\cos\theta} & \frac{\cos\phi}{\cos\theta} \end{bmatrix} \begin{bmatrix} p \\ q \\ r \end{bmatrix}\end{split}\]
param euler

Euler angles \([\phi, \theta, \psi]\) for roll, pitch and yaw, respectively.

type euler

np.ndarray

returns

Propagation matrix relating the rotational velocities to the euler angles.

rtype

np.ndarray

deuler_dt_NED

Warning

Based on a NED frame

Rate of change of the Euler angles in time for a given angular velocity in A frame \(\omega^A=[p, q, r]\).

\[\begin{split}\begin{bmatrix}\dot{\phi} \\ \dot{\theta} \\ \dot{\psi}\end{bmatrix} = \begin{bmatrix} 1 & \sin\phi\tan\theta & \cos\phi\tan\theta \\ 0 & \cos\phi & -\sin\phi \\ 0 & \frac{\sin\phi}{\cos\theta} & \frac{\cos\phi}{\cos\theta} \end{bmatrix} \begin{bmatrix} p \\ q \\ r \end{bmatrix}\end{split}\]

Note

This function is defined in a North East Down frame which is not the typically used one in SHARPy.

param euler

Euler angles \([\phi, \theta, \psi]\) for roll, pitch and yaw, respectively.

type euler

np.ndarray

returns

Propagation matrix relating the rotational velocities to the euler angles.

rtype

np.ndarray

euler2quat
param euler

Euler angles

returns

Equivalent quaternion.

rtype

np.ndarray

euler2rot

Transforms Euler angles (roll, pitch and yaw \(\Phi, \Theta, \Psi\)) into a 3x3 rotation matrix describing that rotates a vector in yaw pitch, and roll.

The rotations are performed successively, first in yaw, then in pitch and finally in roll.

\[\mathbf{T}_{AG} = \mathbf{\tau}_x(\Phi) \mathbf{\tau}_y(\Theta) \mathbf{\tau}_z(\Psi)\]

where \(\mathbf{\tau}\) represents the rotation about the subscripted axis.

param euler

1x3 array with the Euler angles in the form [roll, pitch, yaw] in radians

type euler

np.array

returns

3x3 transformation matrix describing the rotation by the input Euler angles.

rtype

np.array

get_transformation_matrix

Returns a projection matrix function between the desired frames of reference.

Examples

The projection matrix \(C^GA(\chi)\) expresses a vector in the body-attached reference frame A in the inertial frame G, which is a function of the quaternion.

cga_function = get_transformation_matrix('ga')
cga = cga_function(quat)  # The actual projection matrix between A and G for a known quaternion

If the projection involves the G and B frames, the output function will take both the quaternion and the CRV as arguments.

cgb_function = get_transformation_matrix('gb')
cgb = cgb_function(psi, quat)  # The actual projection matrix between B and G for a known CRV and quaternion
param transformation

Desired projection matrix function.

type transformation

str

returns
Function to obtain the desired projection matrix. The function will either take the CRV, the

quaternion, or both as arguments.

rtype

function

Note

If a rotation is desired, it can be achieved by transposing the resulting projection matrix.

get_triad

Generates two unit vectors in body FoR that define the local FoR for a beam element. These vectors are calculated using frame_of_reference_delta :return:

mat2quat

Rotation matrix to quaternion function.

Warning

This function is deprecated and now longer supported. Please use algebra.rotation2quat(rot.T) instead.

param rot

Rotation matrix

returns

equivalent quaternion

rtype

np.array

multiply_matrices

multiply_matrices

Multiply a series of matrices from left to right

param *argv

series of numpy arrays

returns

product of all the given matrices

rtype

sol(numpy array)

Examples

solution = multiply_matrices(A, B, C)

norm3d

Norm of a 3D vector

Notes

Faster than np.linalg.norm

param v

3D vector

type v

np.ndarray

returns

Norm of the vector

rtype

np.ndarray

normsq3d

Square of the norm of a 3D vector

param v

3D vector

type v

np.ndarray

returns

Square of the norm of the vector

rtype

np.ndarray

panel_area

Calculates the area of a quadrilateral panel from the corner points A,B,C, and D using Bertschneider’s formula

param A

Coordinates of point 1

type A

np.ndarray

param B

Coordinates of point 2

type B

np.ndarray

param C

Coordinates of point 3

type C

np.ndarray

param D

Coordinates of point 4

type D

np.ndarray

returns

Area of quadrilateral panel

rtype

float

quadskew

Generates the matrix needed to obtain the quaternion in the following time step through integration of the FoR angular velocity.

param vector

FoR angular velocity

type vector

np.array

Notes

The angular velocity is assumed to be constant in the time interval Equivalent to lib_xbeam function Quaternion ODE to compute orientation of body-fixed frame a See Shearer and Cesnik (2007) for definition

returns

matrix

rtype

np.array

quat2euler

Quaternion to Euler angles transformation.

Transforms a normalised quaternion \(\chi\longrightarrow[\phi, \theta, \psi]\) to roll, pitch and yaw angles respectively.

The transformation is valid away from the singularity present at:

\[\Delta = \frac{1}{2}\]

where \(\Delta = q_0 q_2 - q_1 q_3\).

The transformation is carried out as follows:

\[\begin{split}\psi &= \arctan{\left(2\frac{q_0q_3+q_1q_2}{1-2(q_2^2+q_3^2)}\right)} \\ \theta &= \arcsin(2\Delta) \\ \phi &= \arctan\left(2\frac{q_0q_1 + q_2q_3}{1-2(q_1^2+q_2^2)}\right)\end{split}\]
param quat

Normalised quaternion.

type quat

np.ndarray

returns

Array containing the Euler angles \([\phi, \theta, \psi]\) for roll, pitch and yaw, respectively.

rtype

np.ndarray

References

Blanco, J.L. - A tutorial on SE(3) transformation parameterizations and on-manifold optimization. Technical Report 012010. ETS Ingenieria Informatica. Universidad de Malaga. 2013.

quat2rotation

Calculate rotation matrix based on quaternions.

If B is a FoR obtained rotating a FoR A by an angle \(\phi\) about an axis \(\mathbf{n}\) (recall \(\mathbf{n}\) will be invariant during the rotation), and \(\mathbf{q}\) is the related quaternion, \(\mathbf{q}(\phi,\mathbf{n})\), the function will return the matrix \(C^{AB}\) such that:

  • \(C^{AB}\) rotates FoR A onto FoR B.

  • \(C^{AB}\) transforms the coordinates of a vector defined in B component to A components i.e. \(\mathbf{v}^A = C^{AB}(\mathbf{q})\mathbf{v}^B\).

\[\begin{split}C^{AB}(\mathbf{q}) = \begin{pmatrix} q_0^2 + q_1^2 - q_2^2 -q_3^2 & 2(q_1 q_2 - q_0 q_3) & 2(q_1 q_3 + q_0 q_2) \\ 2(q_1 q_2 + q_0 q_3) & q_0^2 - q_1^2 + q_2^2 - q_3^2 & 2(q_2 q_3 - q_0 q_1) \\ 2(q_1 q_3 - q_0 q_2) & 2(q_2 q_3 + q_0 q_1) & q_0^2 -q_1^2 -q_2^2 +q_3^2 \end{pmatrix}\end{split}\]

Notes

The inverse rotation is defined as the transpose of the matrix \(C^{BA} = C^{{AB}^T}\).

In typical SHARPy applications, the quaternion relation between the A and G frames is expressed as \(C^{GA}(\mathbf{q})\), and in the context of this function it corresponds to:

>>> C_ga = quat2rotation(q1)
>>> C_ag = quat2rotation.T(q1)
param q

Quaternion \(\mathbf{q}(\phi, \mathbf{n})\).

type q

np.ndarray

returns

\(C^{AB}\) rotation matrix from FoR B to FoR A.

rtype

np.ndarray

References

Stevens, L. Aircraft Control and Simulation. 1985. pg 41

quat_bound

Given a quaternion, \(\vec{\chi}\), associated to a rotation of angle \(\psi\) about an axis \(\mathbf{\hat{n}}\), the function “bounds” the quaternion, i.e. sets the rotation axis \(\mathbf{\hat{n}}\) such that \(\psi\) in \([-\pi,\pi]\).

Notes

As quaternions are defined as:

\[\vec{\chi}= \left[\cos\left(\frac{\psi}{2}\right),\, \sin\left(\frac{\psi}{2}\right)\mathbf{\hat{n}}\right]\]

this is equivalent to enforcing \(\chi_0\ge0\).

param quat

quaternion to bound

type quat

np.array

returns

bounded quaternion

rtype

np.array

rotation2crv

Given a rotation matrix \(C^{AB}\) rotating the frame A onto B, the function returns the minimal size Cartesian rotation vector, \(\vec{\psi}\) representing this rotation.

param Cab

rotation matrix \(C^{AB}\)

type Cab

np.array

returns

equivalent Cartesian rotation vector, \(\vec{\psi}\).

rtype

np.array

Notes

this is the inverse of algebra.crv2rotation for Cartesian rotation vectors associated to rotations in the range \([-\pi,\,\pi]\), i.e.:

fv == algebra.rotation2crv(algebra.crv2rotation(fv))

for each Cartesian rotation vector of the form \(\vec{\psi} = \psi\,\mathbf{\hat{n}}\) represented as fv=a*nv such that nv is a unit vector and the scalar a is in the range \([-\pi,\,\pi]\).

rotation2quat

Given a rotation matrix \(C^{AB}\) rotating the frame A onto B, the function returns the minimal “positive angle” quaternion representing this rotation, where the quaternion, \(\vec{\chi}\) is defined as:

\[\vec{\chi}= \left[\cos\left(\frac{\psi}{2}\right),\, \sin\left(\frac{\psi}{2}\right)\mathbf{\hat{n}}\right]\]
param Cab

rotation matrix \(C^{AB}\) from frame A to B

type Cab

np.array

returns

equivalent quaternion \(\vec{\chi}\)

rtype

np.array

Notes

This is the inverse of algebra.quat2rotation for Cartesian rotation vectors associated to rotations in the range \([-\pi,\pi]\), i.e.:

fv == algebra.rotation2crv(algebra.crv2rotation(fv))

where fv represents the Cartesian Rotation Vector, \(\vec{\psi}\) defined as:

\[\vec{\psi} = \psi\,\mathbf{\hat{n}}\]

such that \(\mathbf{\hat{n}}\) is a unit vector and the scalar \(\psi\) is in the range \([-\pi,\,\pi]\).

rotation3d_x

Rotation matrix about the x axis by the input angle \(\Phi\)

\[\begin{split}\mathbf{\tau}_x = \begin{bmatrix} 1 & 0 & 0 \\ 0 & \cos(\Phi) & -\sin(\Phi) \\ 0 & \sin(\Phi) & \cos(\Phi) \end{bmatrix}\end{split}\]
param angle

angle of rotation in radians about the x axis

type angle

float

returns

3x3 rotation matrix about the x axis

rtype

np.array

rotation3d_y

Rotation matrix about the y axis by the input angle \(\Theta\)

\[\begin{split}\mathbf{\tau}_y = \begin{bmatrix} \cos(\Theta) & 0 & -\sin(\Theta) \\ 0 & 1 & 0 \\ \sin(\Theta) & 0 & \cos(\Theta) \end{bmatrix}\end{split}\]
param angle

angle of rotation in radians about the y axis

type angle

float

returns

3x3 rotation matrix about the y axis

rtype

np.array

rotation3d_z

Rotation matrix about the z axis by the input angle \(\Psi\)

\[\begin{split}\mathbf{\tau}_z = \begin{bmatrix} \cos(\Psi) & -\sin(\Psi) & 0 \\ \sin(\Psi) & \cos(\Psi) & 0 \\ 0 & 0 & 1 \end{bmatrix}\end{split}\]
param angle

angle of rotation in radians about the z axis

type angle

float

returns

3x3 rotation matrix about the z axis

rtype

np.array

skew

Returns a skew symmetric matrix such that

\[\boldsymbol{v} \times \boldsymbol{u} = \tilde{\boldsymbol{v}}{\boldsymbol{u}\]

where

\[\begin{split}\tilde{\boldsymbol{v}} = \begin{bmatrix} 0 & -v_z & v_y \\ v_z & 0 & -v_x \\ -v_y & v_x & 0 \end{bmatrix}.\end{split}\]
param vector

3-dimensional vector

type vector

np.ndarray

returns

Skew-symmetric matrix.

rtype

np.array

tangent_vector

Tangent vector calculation for 2+ noded elements.

Calculates the tangent vector interpolating every dimension separately. It uses a (n_nodes - 1) degree polynomial, and the differentiation is analytical.

Calculation method:

  1. A n_nodes-1 polynomial is fitted through the nodes per dimension.

  2. Those polynomials are analytically differentiated with respect to the node index

  3. The tangent vector is given by:

\[\vec{t} = \frac{s_x'\vec{i} + s_y'\vec{j} + s_z'\vec{k}}{\left| s_x'\vec{i} + s_y'\vec{j} + s_z'\vec{k}\right|}\]

where \('\) notes the differentiation with respect to the index number

param in_coord

array of coordinates of the nodes. Dimensions = [n_nodes, ndim]

type in_coord

np.ndarray

Notes

Dimensions are treated independent from each other, interpolating polynomials are computed individually.

triad2rotation

If the input triad is the “b” coord system given in “a” frame, (the vectors of the triad are xb, yb, zb), this function returns Rab, ie the rotation matrix required to rotate the FoR A onto B. :param xb: :param yb: :param zb: :return: rotation matrix Rab

unit_vector

Transforms the input vector into a unit vector

\[\mathbf{\hat{v}} = \frac{\mathbf{v}}{\|\mathbf{v}\|}\]
param vector

vector to normalise

type vector

np.array

returns

unit vector

rtype

np.array

Analytical Functions

Analytical solutions for 2D aerofoil based on thin plates theory

Author: Salvatore Maraniello

Date: 23 May 2017

References:

  1. Simpson, R.J.S., Palacios, R. & Murua, J., 2013. Induced-Drag Calculations in the Unsteady Vortex Lattice Method. AIAA Journal, 51(7), pp.1775–1779.

  2. Gulcat, U., 2009. Propulsive Force of a Flexible Flapping Thin Airfoil. Journal of Aircraft, 46(2), pp.465–473.

flat_plate_analytical

Computes the analytical frequency response of a plat plate for the input output sequences in input_seq and output_seq over the frequency points kv, if available.

The output complex values array Yan has shape (Nout, Nin, Nk); if an analytical solution is not available, the response is assumed to be zero.

If plunge_deriv is True, the plunge response is expressed in terms of first derivative dh.

param kv

Frequency range of length Nk.

type kv

np.array

param x_ea_perc

Elastic axis location along the chord as chord length percentage.

type x_ea_perc

float

param x_fh_perc

Flap hinge location along the chord as chord length percentage.

type x_fh_perc

float

param input_seq

List of Nin number of inputs. Supported inputs include:

  • gust_sears: Response to a continuous sinusoidal gust.

  • pitch: Response to an oscillatory pitching motion.

  • plunge: Response to an oscillatory plunging motion.

type input_seq

list(str)

param output_seq

List of Nout number of outputs. Supported outputs include:

  • Fy: Vertical force.

  • Mz: Pitching moment.

type output_seq

list(str)

param output_scal

Array of factors by which to divide the desired outputs. Dimensions of Nout.

type output_scal

np.array

param plunge_deriv

If True expresses the plunge response in terms of the first derivative, i.e. the

type plunge_deriv

bool

:param rate of change of plunge \(d\dot{h}\).:

returns

A (Nout, Nin, Nk) array containing the scaled frequency response for the inputs and outputs specified.

rtype

np.array

See also

The lift coefficient due to pitch and plunging motions is calculated using sharpy.utils.analytical.theo_CL_freq_resp(). In turn, the pitching moment is found using sharpy.utils.analytical.theo_CM_freq_resp().

The response to the continuous sinusoidal gust is calculated using sharpy.utils.analytical.sears_CL_freq_resp().

garrick_drag_pitch

Returns Garrick solution for drag coefficient at a specific time. Ref.[1], eq.(9), (10) and (11)

The aerofoil pitching motion is assumed to be:

\[a(t)=A\sin(\omegat)=A\sin(ks)\]

The \(C_d\) is such that:

  • \(C_d>0\): drag

  • \(C_d<0\): suction

garrick_drag_plunge

Returns Garrick solution for drag coefficient at a specific time. Ref.[1], eq.(8) (see also eq.(1) and (2)) or Ref[2], eq.(2)

The aerofoil vertical motion is assumed to be:

\[h(t)=-H\cos(wt)\]

The \(C_d\) is such that:

  • \(C_d>0\): drag

  • \(C_d<0\): suction

nc_derivs

Provides non-circulatory aerodynamic lift and moment coefficients derivatives Ref. Palacios and Cesnik, Chap 3.

param x_ea_perc

position of axis of rotation in percentage of chord (measured from LE)

param x_fc_perc

position of flap axis of rotation in percentage of chord (measured from LE)

qs_derivs

Provides quasi-steady aerodynamic lift and moment coefficients derivatives Ref. Palacios and Cesnik, Chap 3.

param x_ea_perc

position of axis of rotation in percentage of chord (measured from LE)

param x_fc_perc

position of flap axis of rotation in percentage of chord (measured from LE)

sears_CL_freq_resp

Frequency response of lift coefficient according Sear’s solution. Ref. Palacios and Cesnik, Chap.3

sears_fun

Produces Sears function

sears_lift_sin_gust

Returns the lift coefficient for a sinusoidal gust (see set_gust.sin) as the imaginary part of the CL complex function defined below. The input gust must be the imaginary part of

\[wgust = w0*\exp(1.0j*C*(Ux*S.time[tt] - xcoord) )\]

with:

\[C=2\pi/L\]

and xcoord=0 at the aerofoil half-chord.

theo_CL_freq_resp

Frequency response of lift coefficient according Theodorsen’s theory.

The output is a 3 elements array containing the CL frequency response w.r.t. to pitch, plunge and flap motion, respectively. Sign conventions are as follows:

  • plunge: positive when moving upward

  • x_ea_perc: position of axis of rotation in percentage of chord (measured from LE)

  • x_fc_perc: position of flap axis of rotation in percentage of chord (measured from LE)

Warning

this function uses different input/output w.r.t. theo_lift

theo_CM_freq_resp

Frequency response of moment coefficient according Theodorsen’s theory.

The output is a 3 elements array containing the CL frequency response w.r.t. to pitch, plunge and flap motion, respectively.

theo_fun

Returns the value of Theodorsen’s function at a reduced frequency \(k\).

\[\mathcal{C}(jk) = \frac{H_1^{(2)}(k)}{H_1^{(2)}(k) + jH_0^{(2)}(k)}\]

where \(H_0^{(2)}(k)\) and \(H_1^{(2)}(k)\) are Hankel functions of the second kind.

param k

Reduced frequency/frequencies at which to evaluate the function.

type k

np.array

returns

Value of Theodorsen’s function evaluated at the desired reduced frequencies.

rtype

np.array

theo_lift

Theodorsen’s solution for lift of aerofoil undergoing sinusoidal motion.

Time histories are built assuming:

  • a(t)=+/- A cos(w t) ??? not verified

  • \(h(t)=-H\cos(w t)\)

param w

frequency (rad/sec) of oscillation

param A

amplitude of angle of attack change

param H

amplitude of plunge motion

param c

aerofoil chord

param rhoinf

flow density

param uinf

flow speed

param x12

distance of elastic axis from mid-point of aerofoil (positive if the elastic axis is ahead)

wagner_imp_start

Lift coefficient resulting from impulsive start solution.

Controller Utilities
PID
class sharpy.utils.control_utils.PID(gain_p, gain_i, gain_d, dt)[source]

Class implementing a classic PID controller

Instance attributes: :param gain_p: Proportional gain. :param gain_i: Integral gain. :param gain_d: Derivative gain. :param dt: Simulation time step.

The class should be used as:

pid = PID(100, 10, 0.1, 0.1) pid.set_point(target_point) control = pid(current_point)

Data Management Structures

These classes are responsible for storing the aerodynamic and structural time step information and relevant variables.

AeroTimeStepInfo
class sharpy.utils.datastructures.AeroTimeStepInfo(dimensions, dimensions_star)[source]

Aerodynamic Time step class.

Contains the relevant aerodynamic attributes for a single time step. All variables should be expressed in G FoR unless otherwise stated.

ct_dimensions

Pointer to dimensions to interface the C++ library uvlmlib`

ct_dimensions_star

Pointer to dimensions_star to interface the C++ library uvlmlib`

dimensions

Matrix defining the dimensions of the vortex grid on solid surfaces [num_surf x chordwise panels x spanwise panels]

Type

np.ndarray

dimensions_star

Matrix defining the dimensions of the vortex grid on wakes [num_surf x streamwise panels x spanwise panels]

Type

np.ndarray

n_surf

Number of aerodynamic surfaces on solid bodies. Each aerodynamic surface on solid bodies will have an associted wake.

Type

int

zeta

Location of solid grid vertices [n_surf][3 x (chordwise nodes + 1) x (spanwise nodes + 1)]

Type

list(np.ndarray

zeta_dot

Time derivative of zeta

Type

list(np.ndarray)

normals

Normal direction to panels at the panel center [n_surf][3 x chordwise nodes x spanwise nodes]

Type

list(np.ndarray)

forces

Forces not associated to time derivatives on grid vertices [n_surf][3 x (chordwise nodes + 1) x (spanwise nodes + 1)]

Type

list(np.ndarray)

dynamic_forces

Forces associated to time derivatives on grid vertices [n_surf][3 x (chordwise nodes + 1) x (spanwise nodes + 1)]

Type

list(np.ndarray)

zeta_star

Location of wake grid vertices [n_surf][3 x (streamwise nodes + 1) x (spanwise nodes + 1)]

Type

list(np.ndarray

u_ext

Background flow velocity on solid grid nodes [n_surf][3 x (chordwise nodes + 1) x (spanwise nodes + 1)]

Type

list(np.ndarray)

u_ext_star

Background flow velocity on wake grid nodes [n_surf][3 x (streamwise nodes + 1) x (spanwise nodes + 1)]

Type

list(np.ndarray)

gamma

Circulation associated to solid panels [n_surf][3 x chordwise nodes x spanwise nodes]

Type

list(np.ndarray)

gamma_star

Circulation associated to wake panels [n_surf][3 x streamwise nodes x spanwise nodes]

Type

list(np.ndarray)

gamma_dot

Time derivative of gamma

Type

list(np.ndarray)

inertial_steady_forces

Total aerodynamic steady forces in G FoR [n_surf x 6]

Type

list(np.ndarray)

body_steady_forces

Total aerodynamic steady forces in A FoR [n_surf x 6]

Type

list(np.ndarray)

inertial_unsteady_forces

Total aerodynamic unsteady forces in G FoR [n_surf x 6]

Type

list(np.ndarray)

body_unsteady_forces

Total aerodynamic unsteady forces in A FoR [n_surf x 6]

Type

list(np.ndarray)

postproc_cell

Variables associated to cells to be postprocessed

Type

dict

postproc_node

Variables associated to nodes to be postprocessed

Type

dict

in_global_AFoR

True if the variables are stored in the global A FoR. False if they are stored in the local A FoR of each body. Always True for single-body simulations. Currently not used.

Type

bool

control_surface_deflection

Deflection of the control surfaces, in rad and if fitted.

Type

np.ndarray

Parameters
  • dimensions (np.ndarray) – Matrix defining the dimensions of the vortex grid on solid surfaces [num_surf x chordwise panels x spanwise panels]

  • dimensions_star (np.ndarray) – Matrix defining the dimensions of the vortex grid on wakes [num_surf x streamwise panels x spanwise panels]

copy()[source]

Returns a copy of a deepcopy of a AeroTimeStepInfo

generate_ctypes_pointers()[source]

Generates the pointers to aerodynamic variables used to interface the C++ library uvlmlib

remove_ctypes_pointers()[source]

Removes the pointers to aerodynamic variables used to interface the C++ library uvlmlib

Linear
class sharpy.utils.datastructures.Linear(tsaero0, tsstruct0)[source]

This is the class responsible for the transfer of information between linear systems and can be accessed as data.linear. It stores as class attributes the following classes that describe the linearised problem.

ss

State-space system

Type

sharpy.linear.src.libss.ss

linear_system

Assemble system properties

Type

sharpy.linear.utils.ss_interface.BaseElement

tsaero0

Linearisation aerodynamic timestep

Type

sharpy.utils.datastructures.AeroTimeStepInfo

tsstruct0

Linearisation structural timestep

Type

sharpy.utils.datastructures.StructTimeStepInfo

timestep_info

Linear time steps

Type

list

LinearTimeStepInfo
class sharpy.utils.datastructures.LinearTimeStepInfo[source]

Linear timestep info containing the state, input and output variables for a given timestep

StructTimeStepInfo
class sharpy.utils.datastructures.StructTimeStepInfo(num_node, num_elem, num_node_elem=3, num_dof=None, num_bodies=1)[source]

Structural Time Step Class.

Contains the relevant attributes for the structural description of a single time step.

in_global_AFoR

True if the variables are stored in the global A FoR. False'' if they are stored in the local A FoR of each body. Always ``True for single-body simulations

Type

bool

num_node

Number of nodes

Type

int

num_elem

Number of elements

Type

int

num_node_elem

Number of nodes per element

Type

int

pos

Displacements. [num_node x 3] containing the vector of x, y and z coordinates (in A frame) of the beam nodes.

Type

np.ndarray

pos_dot

Velocities. Time derivative of pos.

Type

np.ndarray

pos_ddot

Accelerations. Time derivative of pos_dot

Type

np.ndarray

psi

Cartesian Rotation Vector. [num_elem x num_node_elem x 3] CRV for each node in each element.

Type

np.ndarray

psi_dot

Time derivative of psi.

Type

np.ndarray

psi_ddot

Time derivative of psi_dot.

Type

np.ndarray

quat

Quaternion expressing the transformation between the A and G frames.

Type

np.ndarray

for_pos

A frame of reference position (with respect to the G` frame of reference).

Type

np.ndarray

for_vel

A frame of reference velocity. Expressed in A FoR

Type

np.ndarray

for_acc

A frame of reference acceleration. Expressed in A FoR

Type

np.ndarray

steady_applied_forces

Forces applied to the structure not associated to time derivatives [num_nodes x 6]. Expressed in B FoR

Type

np.ndarray

unsteady_applied_forces

Forces applied to the structure associated to time derivatives [num_node x 6]. Expressed in B FoR

Type

np.ndarray

runtime_generated_forces

Forces generated at runtime through runtime generators [num_node x 6]. Expressed in B FoR

Type

np.ndarray

gravity_forces

Gravity forces at nodes [num_node x 6]. Expressed in A FoR

Type

np.ndarray

total_gravity_forces

Total gravity forces on the structure [6]. Expressed in A FoR

Type

np.ndarray

total_forces

Total forces applied to the structure [6]. Expressed in A FoR

Type

np.ndarray

q

State vector associated to the structural system of equations [num_dof + 10]

Type

np.ndarray

dqdt

Time derivative of q

Type

np.ndarray

dqddt

Time derivative of dqdt

Type

np.ndarray

postproc_cell

Variables associated to cells to be postprocessed

Type

dict

postproc_node

Variables associated to nodes to be postprocessed

Type

dict

mb_FoR_pos

Position of the local A FoR of each body [num_bodies x 6]

Type

np.ndarray

mb_FoR_vel

Velocity of the local A FoR of each body [num_bodies x 6]

Type

np.ndarray

mb_FoR_acc

Acceleration of the local A FoR of each body [num_bodies x 6]

Type

np.ndarray

mb_quat

Quaternion of the local A FoR of each body [num_bodies x 4]

Type

np.ndarray

mb_dquatdt

Time derivative of mb_quat

Type

np.ndarray

forces_constraints_nodes

Forces associated to Lagrange Constraints on nodes [num_node x 6]

Type

np.ndarray

forces_constraints_FoR

Forces associated to Lagrange Contraints on frames of reference [num_bodies x 10]

Type

np.ndarray

mb_dict

Dictionary with the multibody information. It comes from the file case.mb.h5

Type

np.ndarray

change_to_global_AFoR(for0_pos, for0_vel, quat0)[source]

Reference a StructTimeStepInfo to the global A frame of reference

Parameters
  • for0_pos (np.ndarray) – Position of the global A FoR

  • for0_vel (np.ndarray) – Velocity of the global A FoR

  • quat0 (np.ndarray) – Quaternion of the global A FoR

change_to_local_AFoR(for0_pos, for0_vel, quat0)[source]

Reference a StructTimeStepInfo to the local A frame of reference

Parameters
  • for0_pos (np.ndarray) – Position of the global A FoR

  • for0_vel (np.ndarray) – Velocity of the global A FoR

  • quat0 (np.ndarray) – Quaternion of the global A FoR

copy()[source]

Returns a copy of a deepcopy of a StructTimeStepInfo

euler_angles()[source]

Returns the 3 Euler angles (roll, pitch, yaw) for a given time step.

Returns

np.array (roll, pitch, yaw) in radians.

get_body(beam, num_dof_ibody, ibody)[source]

Extract the body number ibody from a multibody system

This function returns a StructTimeStepInfo class (ibody_StructTimeStepInfo) that only includes the body number ibody of the original multibody system self

Parameters
  • beam (Beam) – beam information of the multibody system

  • num_dof_ibody (int) – Number of degrees of freedom associated to the ibody

  • ibody (int) – body number to be extracted

Returns

timestep information of the isolated body

Return type

StructTimeStepInfo

glob_pos(include_rbm=True)[source]

Returns the position of the nodes in G FoR

whole_structure_to_global_AFoR(beam)[source]

Same as change_to_global_AFoR but for a multibody structure

Parameters

beam (sharpy.structure.models.beam.Beam) – Beam structure of PreSharpy

whole_structure_to_local_AFoR(beam)[source]

Same as change_to_local_AFoR but for a multibody structure

Parameters

beam (sharpy.structure.models.beam.Beam) – Beam structure of PreSharpy

Documentation Generator

Functions to automatically document the code.

Comments and complaints: N. Goizueta

check_folder_in_ignore

Checks whether a folder is in the ignore_list.

param folder

Absolute path to folder

type folder

str

param ignore_list

Ignore list

type ignore_list

list

returns

Bool whether file/folder is in ignore list.

rtype

bool

generate_documentation

Main routine that generates the documentation in ./docs/source/includes

output_documentation_module_page

Generates the documentation for a package with a single page per module in the desired folder Returns:

write_file

Writes the contents of a python file with one module per page.

Warning

If the function to be written does not have a docstring no output will be produced and a warning will be given.

param file

Absolute path to file

type file

str

write_folder

Creates the documentation for the contents in a folder.

It checks that the file folder is not in the ignore_list. If there is a subfolder in the folder, this gets opened, written and an index file is created.

param folder

Absolute path to folder

type folder

str

param ignore_list

List with filenames and folders to ignore and skip

type ignore_list

list

returns
Tuple containing the title and body of the docstring found for it to be added to the index of the

current folder.

rtype

tuple

SHARPy Exception Classes
DocumentationError
class sharpy.utils.exceptions.DocumentationError[source]

Error in documentation

NotConvergedSolver
class sharpy.utils.exceptions.NotConvergedSolver[source]

To be raised when the solver does not converge. Before this, SHARPy would add a pdb trace, but this causes problems when using SHARPy as a black box.

NotRecognisedSetting
class sharpy.utils.exceptions.NotRecognisedSetting(setting, value=None, message='')[source]

Raised when a setting is not recognised

NotValidSetting
class sharpy.utils.exceptions.NotValidSetting(setting, variable, options, value=None, message='')[source]

Raised when a user gives a setting an invalid value

Frequency Space Tools
find_limits

Returns the indices corresponding to the vmax and vmin key-word arguments parsed found in the ordered array wv.

param wv

Ordered range.

type wv

np.ndarray

keyword vmin

Lower bound value to find index in wv.

kwtype vmin

float

keyword vmax

Upper bound value to find index in wv.

kwtype vmax

float

returns

Index of vmin and index of vmax.

rtype

tuple

find_target_system

Finds target system aeroelastic, aerodynamic or structural.

param data

Object containing problem data

type data

sharpy.PreSharpy

param target_system

Desired target system.

type target_system

str

returns

State-space object of target system

rtype

sharpy.linear.src.libss.ss

freqresp_relative_error

Relative error between a reference signal and a second signal.

The error metric is defined as in [1] to be:

\[\varepsilon_{rel}[\mathbf{Y}_1, \mathbf{Y}_2] = \frac{\max_{i,j} (\sup_{w\in[0, \bar{w}]}[\mathbf{Y}_2 - \mathbf{Y}_1]_{i, j})}{\max_{i,j}(\sup_{w\in[0, \bar{w}]}[\mathbf{Y}_1]_{i,j})}.\]
param y1

Reference signal frequency response.

type y1

np.ndarray

param y2

Frequency response matrix.

type y2

np.ndarray

param wv

Array of frequencies. Required when specifying a max and min value

type wv

Optional [np.ndarray]

param **kwargs

Key word arguments for max and min frequencies. See below.

Keyword Args

vmin (float): Lower bound value to find index in wv. vmax (float): Upper bound value to find index in wv.

returns

Maximum relative error between frequency responses.

rtype

float

References

Maraniello, S. and Palacios, R. Parametric Reduced Order Modelling of the Unsteady Vortex Lattice Method. AIAA Journal. 2020

frobenius_norm

Frobenius norm. Also known as Schatten 2-norm or Hilbert-Schmidt norm.

\[||\mathbf{A}||_F = \sqrt{\mathrm{trace}(\mathbf{A^*A})}\]
param a

Complex matrix.

type a

np.ndarray

returns

Frobenius norm of the matrix a.

rtype

float

References

Antoulas, A. Approximation to Large Scale Dynamical Systems. SIAM 2005. Ch 3, Eq 3.5

h_infinity_norm

Returns H-infinity norm of a linear system using iterative methods.

The H-infinity norm of a MIMO system is traditionally calculated finding the largest SVD of the transfer function evaluated across the entire frequency spectrum. That can prove costly for a large number of evaluations, hence the iterative methods of [1] are employed.

In the case of a SISO system the H-infinity norm corresponds to the maximum frequency gain.

A scalar value is returned if the system is stable. If the system is unstable it returns np.Inf.

References

[1] Bruinsma, N. A., & Steinbuch, M. (1990). A fast algorithm to compute the H∞-norm of a transfer function matrix. Systems and Control Letters, 14(4), 287–293. https://doi.org/10.1016/0167-6911(90)90049-Z

param ss

Multi input multi output system.

type ss

sharpy.linear.src.libss.ss

param **kwargs

Key-word arguments.

keyword tol

Tolerance. Defaults to 1e-7.

kwtype tol

float (optional)

keyword tol_imag_eigs

Tolerance to find purely imaginary eigenvalues. Defaults to 1e-7.

kwtype tol_imag_eigs

float (optional)

keyword iter_max

Maximum number of iterations.

kwtype iter_max

int (optional)

keyword print_info

Print status and information. Defaults to False.

kwtype print_info

bool (optional)

returns

H-infinity norm of the system.

rtype

float

hamiltonian

Returns the Hamiltonian of a linear system as defined in [1].

References

[1] Bruinsma, N. A., & Steinbuch, M. (1990). A fast algorithm to compute the H∞-norm of a transfer function matrix. Systems and Control Letters, 14(4), 287–293. https://doi.org/10.1016/0167-6911(90)90049-Z

param gamma

Evaluation point.

type gamma

float

param ss

Linear system.

type ss

sharpy.linear.src.libss.ss

returns

Hamiltonian evaluated at gamma.

rtype

np.ndarray

l2norm

Computes the L-2 norm of a complex valued function.

\[\mathcal{L}_2 = \left(\int_{-\infty}^\infty ||\mathbf{F}(i\omega)||^2_{F2}\,d\omega\right)^{0.5}\]

where \(||\mathbf{F}(i\omega)||_{F2}\) refers to teh Frobenius norm calculated by sharpy.utils.frequencyutils.frobenius_norm().

param y_freq

Complex valued function.

type y_freq

np.ndarray

param wv

Frequency array.

type wv

np.ndarray

param **kwargs

Key word arguments for max and min frequencies. See below.

Keyword Args

vmin (float): Lower bound value to find index in wv. vmax (float): Upper bound value to find index in wv.

returns

L-2 norm of y_freq.

rtype

float

References

Antoulas, A. Approximation to Large Scale Dynamical Systems. SIAM 2005. Ch 5, Eq 5.10, pg 126

max_eigs

Returns the maximum of

\[\left|\frac{Im(\lambda_i)}{Re(\lambda_i)}\frac{1}{\lambda_i}\right|\]

for a given array of eigenvalues eigs.

Used as part of the computation of the H infinity norm

References

[1] Bruinsma, N. A., & Steinbuch, M. (1990). A fast algorithm to compute the H∞-norm of a transfer function matrix. Systems and Control Letters, 14(4), 287–293. https://doi.org/10.1016/0167-6911(90)90049-Z

param eigs

Array of eigenvalues.

type eigs

np.ndarray

returns

Maximum value of function.

rtype

complex

Generate cases

Generate cases

This library provides functions and classes to help in the definition of SHARPy cases

Examples:

tests in: tests/utils/generate_cases examples: test/coupled/multibody/fix_node_velocity_wrtG/test_fix_node_velocity_wrtG

test/coupled/multibody/fix_node_velocity_wrtA/test_fix_node_velocity_wrtA test/coupled/multibody/double_pendulum/test_double_pendulum_geradin test/coupled/prescribed/WindTurbine/test_rotor

Notes:

To use this library: import sharpy.utils.generate_cases as generate_cases

AerodynamicInformation
class sharpy.utils.generate_cases.AerodynamicInformation[source]

Aerodynamic information needed to build a case

Note

It should be defined after the StructuralInformation of the case

assembly_aerodynamics(*args)[source]

This function concatenates aerodynamic properties to be writen in the same h5 File

Parameters

*args – list of AerodynamicInformation() to be meged into ‘self’

change_airfoils_discretezation(airfoils, new_num_nodes)[source]

Changes the discretization of the matrix of airfoil coordinates

Parameters
  • airfoils (np.array) – Matrix with the x-y coordinates of all the airfoils to be modified

  • new_num_nodes (int) – Number of points that the output coordinates will have

Returns

Matrix with the x-y coordinates of all the airfoils with the new discretization

Return type

new_airfoils (np.array)

check_AerodynamicInformation(StructuralInformation)[source]

Check some properties of the AerodynamicInformation()

Notes

These conditions have to be to correctly define a case but they are not the only ones

copy()[source]

Returns a copy of the object

Returns

new object with the same properties

Return type

copied(AerodynamicInformation)

create_aerodynamics_from_vec(StructuralInformation, vec_aero_node, vec_chord, vec_twist, vec_sweep, vec_surface_m, vec_surface_distribution, vec_m_distribution, vec_elastic_axis, vec_airfoil_distribution, airfoils, user_defined_m_distribution=None)[source]

Defines the whole case from the appropiated variables in vector form (associated to nodes)

Parameters
  • StructuralInformation (StructuralInformation) – Structural infromation of the case

  • vec_aero_node (np.array) – defines if a node has aerodynamic properties or not

  • vec_chord (np.array) – chord of the nodes

  • vec_twist (np.array) – twist of the nodes

  • vec_sweep (np.array) – sweep of the nodes

  • vec_surface_m (np.array) – Number of panels in the chord direction

  • vec_surface_distribution (np.array) – Surface at which each element belongs

  • vec_m_distribution (np.array) – distribution of the panels along the chord

  • vec_elastic_axis (np.array) – position of the elastic axis in the chord

  • vec_airfoil_distribution (np.array) – airfoil at each element node

  • airfoils (np.array) – coordinates of the camber lines of the airfoils

create_one_uniform_aerodynamics(StructuralInformation, chord, twist, sweep, num_chord_panels, m_distribution, elastic_axis, num_points_camber, airfoil)[source]

Defines the whole case from the appropiated variables constant at every point

Parameters
  • StructuralInformation (StructuralInformation) – Structural infromation of the case

  • chord (float) – chord

  • twist (float) – twist

  • sweep (float) – sweep

  • num_chord_panels (int) – Number of panels in the chord direction

  • m_distribution (str) – distribution of the panels along the chord

  • elastic_axis (float) – position of the elastic axis in the chord

  • num_points_camber (int) – Number of points to define the camber line

  • airfoils (np.array) – coordinates of the camber lines of the airfoils

generate_aero_file(route, case_name, StructuralInformation)[source]

Writes the h5 file with the aerodynamic information

Parameters
  • route (string) – path of the case

  • case_name (string) – name of the case

generate_full_aerodynamics(aero_node, chord, twist, sweep, surface_m, surface_distribution, m_distribution, elastic_axis, airfoil_distribution, airfoils)[source]

Defines the whole case from the appropiated variables

Parameters
  • aero_node (np.array) – defines if a node has aerodynamic properties or not

  • chord (np.array) – chord of the elements

  • twist (np.array) – twist of the elements

  • sweep (np.array) – sweep of the elements

  • surface_m (np.array) – Number of panels in the chord direction

  • surface_distribution (np.array) – Surface at which each element belongs

  • m_distribution (str) – distribution of the panels along the chord

  • elastic_axis (np.array) – position of the elastic axis in the chord

  • airfoil_distribution (np.array) – airfoil at each element node

  • airfoils (np.array) – coordinates of the camber lines of the airfoils

interpolate_airfoils_camber(pure_airfoils_camber, r_pure_airfoils, r, n_points_camber)[source]

Create the camber of the airfoil at each node position from the camber of the pure airfoils present in the blade

Parameters
  • pure_airfoils_camber (np.array) – xy coordinates of the camber lines of the pure airfoils

  • r_pure_airfoils (np.array) – radial position of the pure airfoils

  • r (np.array) – radial positions to compute the camber lines through linear interpolation

Returns

camber lines at the new radial positions

Return type

airfoils_camber (np.array)

interpolate_airfoils_camber_thickness(pure_airfoils_camber, thickness_pure_airfoils, blade_thickness, n_points_camber)[source]

Create the camber of the airfoil at each node position from the camber of the pure airfoils present in the blade based on the thickness

Parameters
  • pure_airfoils_camber (np.array) – xy coordinates of the camber lines of the pure airfoils

  • thicknesss_pure_airfoils (np.array) – thickness of the pure airfoils

  • blade_thickness (np.array) – thickness of the blade positions

Returns

camber lines at the new radial positions

Return type

airfoils_camber (np.array)

set_to_zero(num_node_elem, num_node, num_elem, num_airfoils=1, num_surfaces=0, num_points_camber=100)[source]

Sets to zero all the variables

Parameters
  • num_node_elem (int) – number of nodes per element

  • num_node (int) – number of nodes

  • num_elem (int) – number of elements

  • num_airfoils (int) – number of different airfoils

  • num_surfaces (int) – number of aerodynamic surfaces

  • num_points_camber (int) – number of points to define the camber line of the airfoil

AeroelasticInformation
class sharpy.utils.generate_cases.AeroelasticInformation[source]

Structural and aerodynamic information needed to build a case

assembly(*args)[source]

This function concatenates structures and aerodynamic properties to be writen in the same h5 File

Parameters

*args – list of AeroelasticInformation() to be meged into ‘self’

Notes:

copy()[source]

Returns a copy of the object

Returns

new object with the same properties

Return type

copied(AeroelasticInformation)

generate(StructuralInformation, AerodynamicInformation)[source]

Generates an object from the structural and the aerodynamic information

Parameters
generate_h5_files(route, case_name)[source]

write_h5_files

Writes the structural and aerodynamic h5 files

remove_duplicated_points(tol, skip=[])[source]

Removes the points that are closer than ‘tol’ and modifies the aeroelastic information accordingly

Parameters
  • tol (float) – tolerance. Maximum distance between nodes to be merged

  • skip (list) – nodes to keep (do not remove)

Notes

This function will not work if an element or an aerdoynamic surface is completely eliminated This function only checks geometrical proximity, not aeroelastic properties as a merging criteria

SimulationInformation
class sharpy.utils.generate_cases.SimulationInformation[source]

Simulation information needed to build a case

define_num_steps(num_steps)[source]

Set the number of steps in the simulation for all the solvers

Parameters

num_steps (int) – number of steps

define_uinf(unit_vector, norm)[source]

Set the inflow velocity in the simulation for all the solvers

Parameters
  • unit_vector (np.array) – direction of the inflow velocity

  • norm (float) – Norm of the inflow velocity

generate_dyn_file(num_steps)[source]

Generates the dynamic file

Parameters
  • route (string) – path of the case

  • case_name (string) – name of the case

  • num_steps (int) – number of steps

generate_solver_file()[source]

Generates the solver file

Parameters
  • route (string) – path of the case

  • case_name (string) – name of the case

set_default_values()[source]

Set the default values for all the solvers

set_variable_all_dicts(variable, value)[source]

Defines the value of a variable in all the available solvers

Parameters
  • variable (str) – variable name

  • ) (value () – value

StructuralInformation
class sharpy.utils.generate_cases.StructuralInformation[source]

Structural information needed to build a case

assembly_structures(*args)[source]

This function concatenates structures to be writen in the same h5 File

Parameters

*args – list of StructuralInformation() to be meged into ‘self’

Notes

The structures does NOT merge any node (even if nodes are defined at the same coordinates)

check_StructuralInformation()[source]

Check some properties of the StructuralInformation()

Notes

These conditions have to be to correctly define a case but they are not the only ones

compute_basic_num_elem()[source]

It computes the number of elements when no nodes are shared between beams

compute_basic_num_node()[source]

It computes the number of nodes when no nodes are shared between beams

copy()[source]

Returns a copy of the object

Returns

new object with the same properties

Return type

copied(StructuralInformation)

create_frame_of_reference_delta(y_BFoR='y_AFoR')[source]

Define the coordinates of the yB axis in the AFoR

Parameters

y_BFoR (string) – Direction of the yB axis

create_mass_db_from_vector(vec_mass_per_unit_length, vec_mass_iner_x, vec_mass_iner_y, vec_mass_iner_z, vec_pos_cg_B, vec_mass_iner_yz=None)[source]

Create the mass matrices from the vectors of properties

Parameters
  • vec_mass_per_unit_length (np.array) – masses per unit length

  • vec_mass_iner_x (np.array) – inertias around the x axis

  • vec_mass_iner_y (np.array) – inertias around the y axis

  • vec_mass_iner_z (np.array) – inertias around the z axis

  • vec_pos_cg_B (np.array) – position of the masses

  • vec_mass_iner_yz (np.array) – inertias around the yz axis

create_simple_connectivities()[source]

Create the matrix of connectivities for one single beam with the nodes ordered in increasing xB direction

create_stiff_db_from_vector(vec_EA, vec_GAy, vec_GAz, vec_GJ, vec_EIy, vec_EIz, vec_EIyz=None)[source]

Create the stiffness matrices from the vectors of properties

Parameters
  • vec_EA (np.array) – Axial stiffness

  • vec_GAy (np.array) – Shear stiffness in the y direction

  • vec_GAz (np.array) – Shear stiffness in the z direction

  • vec_GJ (np.array) – Torsional stiffness

  • vec_EIy (np.array) – Bending stiffness in the y direction

  • vec_EIz (np.array) – Bending stiffness in the z direction

  • vec_EIyz (np.array) – Bending stiffness in the yz direction

generate_fem_file(route, case_name)[source]

Writes the h5 file with the structural information

Parameters
  • route (string) – path of the case

  • case_name (string) – name of the case

generate_full_structure(num_node_elem, num_node, num_elem, coordinates, connectivities, elem_stiffness, stiffness_db, elem_mass, mass_db, frame_of_reference_delta, structural_twist, boundary_conditions, beam_number, app_forces, lumped_mass_nodes=None, lumped_mass=None, lumped_mass_inertia=None, lumped_mass_position=None, lumped_mass_mat_nodes=None, lumped_mass_mat=None)[source]

Defines the whole case from the appropiated variables

Parameters
  • num_node_elem (int) – number of nodes per element

  • num_node (int) – number of nodes

  • num_elem (int) – number of elements

  • coordinates (np.array) – nodes coordinates

  • connectivities (np.array) – element connectivities

  • elem_stiffness (np.array) – element stiffness index

  • stiffness_db (np.array) – Stiffness matrices

  • elem_mass (np.array) – element mass index

  • mass_db (np.array) – Mass matrices

  • frame_of_reference_delta (np.array) – element direction of the y axis in the BFoR wrt the AFoR

  • structural_twist (np.array) – element based twist

  • boundary_conditions (np.array) – node boundary condition

  • beam_number (np.array) – node beam number

  • app_forces (np.array) – steady applied follower forces at the nodes

  • lumped_mass_nodes (np.array) – nodes with lumped masses

  • lumped_mass (np.array) – value of the lumped masses

  • lumped_mass_inertia (np.array) – inertia of the lumped masses

  • lumped_mass_position (np.array) – position of the lumped masses

  • lumped_mass_mat_nodes (np.array) – nodes with lumped masses given by matrices

  • lumped_mass_mat (np.array) – value of the lumped masses given by matrices

generate_uniform_beam(node_pos, mass_per_unit_length, mass_iner_x, mass_iner_y, mass_iner_z, pos_cg_B, EA, GAy, GAz, GJ, EIy, EIz, num_node_elem=3, y_BFoR='y_AFoR', num_lumped_mass=0, num_lumped_mass_mat=0)[source]

Generates the input data for SHARPy of a uniform beam

Parameters
  • node_pos (np.array) – coordinates of the nodes

  • mass_per_unit_length (float) – mass per unit length

  • mass_iner_x (float) – Inertia of the mass in the x direction

  • mass_iner_y (float) – Inertia of the mass in the y direction

  • mass_iner_z (float) – Inertia of the mass in the z direction

  • pos_cg_B (np.array) – position of the masses

  • EA (np.array) – Axial stiffness

  • GAy (np.array) – Shear stiffness in the y direction

  • GAz (np.array) – Shear stiffness in the z direction

  • GJ (np.array) – Torsional stiffness

  • EIy (np.array) – Bending stiffness in the y direction

  • EIz (np.array) – Bending stiffness in the z direction

  • num_node_elem (int) – number of nodes per element

  • y_BFoR (str) – orientation of the yB axis

  • num_lumped_mass (int) – number of lumped masses

  • num_lumped_mass_mat (int) – number of lumped masses given as matrices

generate_uniform_sym_beam(node_pos, mass_per_unit_length, mass_iner, EA, GA, GJ, EI, num_node_elem=3, y_BFoR='y_AFoR', num_lumped_mass=0, num_lumped_mass_mat=0)[source]

Generates the input data for SHARPy of a uniform symmetric beam

Parameters
  • node_pos (np.array) – coordinates of the nodes

  • mass_per_unit_length (float) – mass per unit length

  • mass_iner (float) – Inertia of the mass

  • EA (float) – Axial stiffness

  • GA (float) – Shear stiffness

  • GJ (float) – Torsional stiffness

  • EI (float) – Bending stiffness

  • num_node_elem (int) – number of nodes per element

  • y_BFoR (str) – orientation of the yB axis

  • num_lumped_mass (int) – number of lumped masses

rotate_around_origin(axis, angle)[source]

Rotates a structure

Parameters
  • axis (np.array) – axis of rotation

  • angle (float) – angle of rotation in radians

set_to_zero(num_node_elem, num_node, num_elem, num_mass_db=None, num_stiffness_db=None, num_lumped_mass=0, num_lumped_mass_mat=0)[source]

Sets to zero all the variables

Parameters
  • num_node_elem (int) – number of nodes per element

  • num_node (int) – number of nodes

  • num_elem (int) – number of elements

  • num_mass_db (int) – number of different mass matrices in the case

  • num_stiffness_db (int) – number of different stiffness matrices in the case

  • num_lumped_mass (int) – number of lumped masses in the case

  • num_lumped_mass_mat (int) – number of lumped masses given as matrices

clean_test_files

clean_test_files

Removes the previous h5 files

param route

path of the case

type route

string

param case_name

name of the case

type case_name

string

from_node_array_to_elem_matrix

from_node_array_to_elem_matrix

Same as the previous function but with an array as input

from_node_list_to_elem_matrix

from_node_list_to_elem_matrix

Convert list of properties associated to nodes to matrix of properties associated to elements based on the connectivities

The ‘ith’ value of the ‘node_list’ array stores the property of the ‘ith’ node. The ‘jth’ ‘kth’ value of the ‘elem_matrix’ array stores the property of the ‘kth’ node within the ‘jth’ element

param node_list

Properties of the nodes

type node_list

np.array

param connectivities

Connectivities between the nodes to form elements

type connectivities

np.array

returns

Properties of the elements

rtype

elem_matrix (np.array)

get_airfoil_camber

get_airfoil_camber

Define the camber of an airfoil based on its coordinates

param x

x coordinates of the airfoil surface

type x

np.array

param y

y coordinates of the airfoil surface

type y

np.array

param n_points_camber

number of points to define the camber line

type n_points_camber

int

returns

x coordinates of the camber line camber_y (np.array): y coordinates of the camber line

rtype

camber_x (np.array)

Notes

The x and y vectors are expected in XFOIL format: TE - suction side - LE - pressure side - TE

get_aoacl0_from_camber

This section provies the angle of attach of zero lift for a thin airfoil which camber line is defined by ‘x’ and ‘y’ coordinates

Check Theory of wing sections. Abbott. pg 69

get_factor_geometric_progression

This function provides the factor in a geometric series which first element is ‘a0’, has ‘n’ points and the sum of the spacings is ‘Sn_target’ approximately.

\[\sum_{k=1}^n a_0 r^{k-1} = \frac{a_0 (1 - r^n)}{1 - r}\]
get_mu0_from_camber

This funrcion provides the constant \(\mu_0\) for a thin airfoil which camber line is defined by ‘x’ and ‘y’ coordinates

Check Theory of wing sections. Abbott. pg 69

read_column_sheet_type01

read_column_sheet_type01

This function reads a column from an excel file with the following format:

  • First row: column_name

  • Second row: units (not read, not checked)

  • Third row: type of data (see below)

param excel_file_name

File name

type excel_file_name

string

param excel_sheet

Name of the sheet inside the excel file

type excel_sheet

string

param column_name

Name of the column

type column_name

string

returns

Data in the excel file according to the type of data defined in the third row

rtype

var

Generator Interface
output_documentation

Creates the .rst files for the generators that have a docstring such that they can be parsed to Sphinx

param route

Path to folder where generator files are to be created.

type route

str

Airfoil Geometry Utils
generate_naca_camber

Defines the x and y coordinates of a 4-digit NACA profile’s camber line (i.e no thickness).

The NACA 4-series airfoils follow the nomenclature: NACA MPTT where:
  • M indicates the maximum camber \(M = 100m\)

  • P indicates the position of the maximum camber \(P=10p\)

  • TT indicates the thickness to chord ratio \(TT=(t/c)*100\)

param M

maximum camber times 100 (i.e. the first of the 4 digits)

type M

float

param P

position of the maximum camber times 10 (i.e. the second of the 4 digits)

type P

float

returns

x and y coordinates of the chosen airfoil

rtype

(x_vec,y_vec)

Example

The NACA2400 airfoil would have 2% camber with the maximum at 40% of the chord and 0 thickness. To plot the camber line one would use this function as:

x_vec, y_vec = generate_naca_camber(M = 2, P = 4)

interpolate_naca_camber

Interpolate aerofoil camber at non-dimensional coordinate eta in (0,1), where (M00,P00) and (M01,P01) define the camber properties at eta=0 and eta=1 respectively.

Notes

For two surfaces, eta can be in (-1,1). In this case, the root is eta=0 and the tips are at eta=+-1.

H5 File Management Utilities

Set of utilities for opening/reading files

add_array_to_grp

Add numpy array (data) as dataset ‘name’ to the group grp. If compress is True, 64-bit float arrays are converted to 32-bit

add_as_grp

Given a class, dictionary, list or tuples instance ‘obj’, the routine adds it as a sub-group of name grpname to the parent group grpParent. An attribute _read_as, specifying the type of obj, is added to the group so as to allow reading correctly the h5 file.

Usage and Remarks:
  • if obj contains dictionaries, listes or tuples, these are automatically saved

  • if list only contains scalars or arrays of the same dimension, this will be saved as a numpy array

  • if obj contains classes, only those that are instances of the classes specified in ClassesToSave will be saved

  • If grpParent already contains a sub-group with name grpname, this will not be overwritten. However, pre-existing attributes of the sub-group will be overwritten if obj contains attrributes with the same names.

  • attributes belonging to SkipAttr will not be saved - This functionality needs improving

  • if compress_float is True, numpy arrays will be saved in single precisions.

check_file_exists

Checks if the file exists and throws a FileNotFoundError exception that includes the route to the non-existing file.

param file_name

path to the HDF5 file

type file_name

str

returns

if the file does not exist, an error is raised with path to the non-existent file

rtype

FileNotFoundError

read_group

Read an hdf5 group

readh5

Read the HDF5 file ‘filename’ into a class. Groups within the hdf5 file are by default loaded as sub classes, unless they include a _read_as attribute (see sharpy.postproc.savedata). In this case, group can be loaded as classes, dictionaries, lists or tuples.

filename: string to file location

GroupName = string or list of strings. Default is None: if given, allows reading a specific group h5 file.

Warning

Groups that need to be read as lists and tuples are assumed to conform to the format used in sharpy.postproc.savedata

save_list_as_array

Works for both lists and tuples. Returns True if the saving was successful.

saveh5

Creates h5filename and saves all the classes specified in class_inst

Args

savedir: target directory h5filename: file name class_inst: a number of classes to save permission=[‘a’,’w’]: append or overwrite, according to h5py.File ClassesToSave: if the classes in class_inst contain sub-classes, these will be saved only if instances of the classes in this list

Modelling Utilities

Modelling Utilities

mass_matrix_generator

This function takes the mass, position of the center of gravity wrt the elastic axis and the inertia matrix J (3x3) and returns the complete 6x6 mass matrix.

Multibody library

Multibody library

Library used to manipulate multibody systems

To use this library: import sharpy.utils.multibody as mb

disp_and_accel2state

disp2state

Fills the vector of states according to the displacements information

param MB_beam

each entry represents a body

type MB_beam

list(Beam)

param MB_tstep

each entry represents a body

type MB_tstep

list(StructTimeStepInfo)

param Lambda

Lagrange multipliers of holonomic constraints

type Lambda

np.ndarray

param Lambda_dot

Lagrange multipliers of non-holonomic constraints

type Lambda_dot

np.ndarray

param sys_size

number of degrees of freedom of the system of equations not accounting for lagrange multipliers

type sys_size

int

param num_LM_eq

Number of equations associated to the Lagrange Multipliers

type num_LM_eq

int

param q

Vector of states

type q

np.ndarray

param dqdt

Time derivatives of states

type dqdt

np.ndarray

param dqddt

Second time derivatives of states

type dqddt

np.ndarray

get_elems_nodes_list

get_elems_nodes_list

This function returns the elements (ibody_elements) and the nodes (ibody_nodes) that belong to the body number ibody

param beam

structural information of the multibody system

type beam

Beam

param ibody

Body number about which the information is required

type ibody

int

returns

List of elements that belong the ibody ibody_nodes (list): List of nodes that belong the ibody

rtype

ibody_elements (list)

merge_multibody

merge_multibody

This functions merges a series of bodies into a multibody system at a certain time step

Longer description

param MB_beam

each entry represents a body

type MB_beam

list(Beam)

param MB_tstep

each entry represents a body

type MB_tstep

list(StructTimeStepInfo)

param beam

structural information of the multibody system

type beam

Beam

param tstep

timestep information of the multibody system

type tstep

StructTimeStepInfo

param mb_data_dict

Dictionary including the multibody information

type mb_data_dict

dict

param dt

time step

type dt

int

returns

structural information of the multibody system tstep (StructTimeStepInfo): timestep information of the multibody system

rtype

beam (Beam)

split_multibody

split_multibody

This functions splits a structure at a certain time step in its different bodies

param beam

structural information of the multibody system

type beam

Beam

param tstep

timestep information of the multibody system

type tstep

StructTimeStepInfo

param mb_data_dict

Dictionary including the multibody information

type mb_data_dict

dict

param ts

time step number

type ts

int

returns

each entry represents a body MB_tstep (list(StructTimeStepInfo)): each entry represents a body

rtype

MB_beam (list(Beam))

state2disp_and_accel

state2disp

Recovers the displacements from the states

Longer description

param MB_beam

each entry represents a body

type MB_beam

list(Beam)

param MB_tstep

each entry represents a body

type MB_tstep

list(StructTimeStepInfo)

param q

Vector of states

type q

np.ndarray

param dqdt

Time derivatives of states

type dqdt

np.ndarray

param dqddt

Second time derivatives of states

type dqddt

np.ndarray

param num_LM_eq

Number of equations associated to the Lagrange Multipliers

type num_LM_eq

int

param Lambda

Lagrange multipliers of holonomic constraints

type Lambda

np.ndarray

param Lambda_dot

Lagrange multipliers of non-holonomic constraints

type Lambda_dot

np.ndarray

update_mb_dB_before_merge

update_mb_db_before_merge

Updates the FoR information database before merging bodies

param tstep

timestep information of the multibody system

type tstep

StructTimeStepInfo

param MB_tstep

each entry represents a body

type MB_tstep

list(StructTimeStepInfo)

Plotting utilities
plot_timestep

This function creates a simple plot with matplotlib of a timestep in SHARPy. Notice that this function is not efficient at all for large surfaces, it just aims to provide a simple way of generating simple quick plots.

Input:

data (sharpy.presharpy.presharpy.PreSharpy): Main data strucuture in SHARPy tstep (int): Time step to plot minus_mstar (int): number of wake panels to remove from the visuallisation (for efficiency)

returns

Can be matplotlib.pyplot.plt (plotly=False) or plotly.graph_objects.Figure() (plotly=True)

rtype

Plot object

set_axes_equal

Make axes of 3D plot have equal scale so that spheres appear as spheres, cubes as cubes, etc.. This is one possible solution to Matplotlib’s ax.set_aspect(‘equal’) and ax.axis(‘equal’) not working for 3D.

Input

ax: a matplotlib axis, e.g., as output from plt.gca().

Settings Generator Utilities

Settings Generator Utilities

SettingsTable
class sharpy.utils.settings.SettingsTable[source]

Generates the documentation’s setting table at runtime.

Sphinx is our chosen documentation manager and takes docstrings in reStructuredText format. Given that the SHARPy solvers contain several settings, this class produces a table in reStructuredText format with the solver’s settings and adds it to the solver’s docstring.

This table will then be printed alongside the remaining docstrings.

To generate the table, parse the setting’s description to a solver dictionary named settings_description, in a similar fashion to what is done with settings_types and settings_default. If no description is given it will be left blank.

Then, add at the end of the solver’s class declaration method an instance of the SettingsTable class and a call to the SettingsTable.generate() method.

Examples

The end of the solver’s class declaration should contain

# Generate documentation table
settings_table = settings.SettingsTable()
__doc__ += settings_table.generate(settings_types, settings_default, settings_description)

to generate the settings table.

generate(settings_types, settings_default, settings_description, settings_options={}, header_line=None)[source]

Returns a rst-format table with the settings’ names, types, description and default values

Parameters
  • settings_types (dict) – Setting types.

  • settings_default (dict) – Settings default value.

  • settings_description (dict) – Setting description.

  • header_line (str) – Header line description (optional)

Returns

.rst formatted string with a table containing the settings’ information.

Return type

str

check_settings_in_options

Checks that settings given a type str or int and allowable options are indeed valid.

param settings

Dictionary of processed settings

type settings

dict

param settings_types

Dictionary of settings types

type settings_types

dict

param settings_options

Dictionary of options (may be empty)

type settings_options

dict

raises exception.NotValidSetting

if the setting is not allowed.

load_config_file

This function reads the flight condition and solver input files.

param file_name

contains the path and file name of the file to be read by the configparser reader.

type file_name

str

returns

a ConfigParser object that behaves like a dictionary

rtype

config (dict)

SHARPy Test Cases

The following test cases are provided as a tutorial and introduction to SHARPy as well as for code validation purposes.

  • Geradin and Cardona Beam - See Installation and see test case in ./sharpy/tests/xbeam/

A Short Debugging Guide

We have put together a list of common traps you may fall into, hopefully you will find the tools here to get yourself out of them!

  • Did you forget conda activate sharpy_env and source bin/sharpy_vars.sh?

    • If you do in the terminal: which sharpy, do you get the one you want?

    • If you do which python, does the result point to anaconda3/envs/sharpy_env/bin (or similar)?

  • Wrong input (inconsistent connectivities, mass = 0…)

    • Sometimes not easy to detect. For the structural model, run BeamLoader and BeamPlot with no structural solver in between. Go over the structure in Paraview. Check the fem.h5 file with HDFView.

    • Remember that connectivities are ordered as $[0, 2, 1]$ (the central node goes last).

    • Make sure the num_elem and num_node variables are actually your correct number of elements and nodes.

  • Not running the actual case you want to.

    • Cleanup the folder and regenerate the case

  • Not running the SHARPy version you want.

    • Check at the beginning of the execution the path to the SHARPy folder.

  • Not running the correct branch of the code.

    • You probably want to use develop. Again, check the first few lines of SHARPy output.

  • Very different (I’m talking orders of magnitude) stiffnesses between nodes or directions?

  • Maybe the UVLM requires a smaller a smaller vortex core cutoff (only for linear UVLM simulations, as the nonlinear uses another vortex core model).

  • Newmark damping is not enough for this case?

  • Do you have an element with almost 0 mass or inertia?

  • Are you mass matrices consistent? Check that \(I_{xx} = I_{yy} + I_{zz}\).

  • Have a look at the \(\dot{\Gamma}\) filtering and numerical parameters in the settings of StepUvlm and DynamicCoupled.

  • Add more relaxation to the StaticCoupled or DynamicCoupled solvers.

  • The code has a bug (depending on where, it may be likely).

    • Go over the rest of the list. Plot the case in paraview. Go over the rest of the list again. Prepare the simplest example that reproduces the problem and raise an issue.

  • The code diverges because it has to (physical unstable behaviour)
    • Then don’t complain

  • Your model still doesn’t work and you don’t know why.
    • import pdb; pdb.set_trace() and patience

  • If nothing else works… get a rubber duck (or a very very patient good friend) and go over every step

A rubber duck could be a good friend

If your model doesn’t do what it is supposed to do:

  • Check for symmetric response where the model is symmetric.

    • If it is not, run the beam solver first and make sure your properties are correct. Make sure the matrices for mass and stiffness are rotated if they need to be (remember the Material FoR definition and the for_delta?)

    • Now run the aerodynamic solver only and double check that the forces are symmetric.

    • Make sure your tolerances are low enough so that at least 4 FSI iterations are performed in StaticCoupled or DynamicCoupled.

  • Make sure your inputs are correct. For example: a dynamic case can be run with \(u_\infty = 0\) and the plane moving forwards, or \(u_\infty = x\) whatever and the plane velocity = 0. It is very easy to mix both, and end up with double the effective incoming speed (or none).

  • Run simple stuff before coupling it. For example, if your wing tip deflections don’t match what you’d expect, calculate the deflection under a small tip force (not too small, make sure the deflection is > 1% of the length!) by hand, and compare.

  • It is more difficult to do the same with the UVLM, as you need a VERY VERY high aspect ratio to get close to the 2D potential solutions. You are going to have to take my word for it: the UVLM works.

  • But check the aero grid geometry in Paraview, including chords lengths and angles.

Frequently Asked Questions [FAQs]

Over the years, we have gathered a valuable experience running SHARPy so we would like to collect here a few of the most frequently asked questions we get here to hopefully help other users.

In addition to the questions listed below, do check the issues page in our GitHub repo as you may find useful information there. Do also check our Short Debugging Guide.

  • [Q] I get a ModuleNotFound Error when trying to run SHARPy.

    [A] Make sure you have loaded the SHARPy variables using the command source <path_to_sharpy>/bin_sharpy_var.sh.

  • [Q] When plotting the aerodynamic forces in Paraview from the UVLM, the forces at the boundary between two surfaces (for instance at the wing root) appears halved. Is my simulation incorrect?

    [A] This is most likely not an issue with your simulation. We have observed over time that Paraview actually only plots the result from one of the surfaces, hence why it appears half of what it should be. If you extract the forces without using Paraview using the WriteVariablesTime postprocessor you will get the correct result.

  • [Q] My time-domain simulation does not converge. I get a SolverNotConverged error. What can I do?

    [A] This is quite an open question and it could be for a wide variety of reasons. Things that should be in your First Aid kit for these situations:

    • Is your tolerance appropriate? If you raise the tolerance to something (maybe unreasonably) high does it converge?

    • Is your number of iterations sufficient? Increase the number of maximum allowed iterations.

    • Is there anything happening at all in your simulation? We have all fallen into the trap of trying to run a time domain simulation of something that is already in steady state. I.e. you calculate its static equilibrium and then try to advance in time. Since nothing is happening the convergence criteria in the solvers may not be triggered and reach the maximum number of iterations. Solution: make sure something happens in your time domain simulation: gusts, external forces, control surface deflections…

    • Are you giving your simulation too much of a “kick”? Sometimes we simulate things that dramatically change the state of the problem from one time step to another (like adding very large external forces at once) which may lead to trouble. You can choose to load the forces progressively by increasing the num_load_steps setting in our structural solvers.

Hopefully this list will grow over time with some of the common questions previous users encounter. If you cannot solve your problem please open an issue on Github and assign it the label label:question so we can keep track of it and others can benefit of the discussion.

Citing SHARPy

SHARPy has been published in the Journal of Open Source Software (JOSS) and the relevant paper can be found here.

If you are using SHARPy for your work, please remember to cite it using the paper in JOSS as:

del Carre et al., (2019). SHARPy: A dynamic aeroelastic simulation toolbox for very flexible aircraft and wind turbines. Journal of Open Source Software, 4(44), 1885, https://doi.org/10.21105/joss.01885

The bibtex entry for this citation is:

@Article{delCarre2019,
doi = {10.21105/joss.01885},
url = {https://doi.org/10.21105/joss.01885},
year = {2019},
month = dec,
publisher = {The Open Journal},
volume = {4},
number = {44},
pages = {1885},
author = {Alfonso del Carre and Arturo Mu{\~{n}}oz-Sim\'on and Norberto Goizueta and Rafael Palacios},
title = {{SHARPy}: A dynamic aeroelastic simulation toolbox for very flexible aircraft and wind turbines},
journal = {Journal of Open Source Software}
}

Indices and tables

Contact

SHARPy is developed at the Department of Aeronautics, Imperial College London. To get in touch, visit the Loads Control and Aeroelastics Lab website.