Code Monkey home page Code Monkey logo

flappingmav's Introduction

FlappingMAV

Optimizing the lift-to-drag ratio of flapping micro-air vehicles.

This repository aims to provide a guide to running an Unsteady Vortex Lattice Method Simulation on the kinematics of flapping wings on a micro-air vehicle The goal is to optimize the flapping motion to maximize the lift-to-drag ratio by using the VTDIRECT95 optimization algorithm.

We will attempt to replicate the results found in the study conducted by Mehdi Ghommem, Muhammad R. Hajj, Layne T. Watson, Dean T. Mook, Richard D. Snyder and Philip S. Beran titled Deterministic Global Optimization of Flapping Wing Motion for Micro Air Vehicles in 2010. DOI: https://arc.aiaa.org/doi/10.2514/6.2010-9355

Unfortunately, the study does not have accompanying code and therefore other software was found.

Dependencies

PteraSoftware

# if system offers pip or pip3
pip install pterasoftware

Delta

To run this project on Delta, you need to upload all the files from here and the PteraSoftware UVLM simulation files.

WARNING: Does not work on Delta

PteraSoftware

# download zip
wget https://github.com/camUrban/PteraSoftware/archive/refs/heads/release-3.0.0.zip

# unzip
unzip release-3.0.0.zip

Secure copy files from local machine to remote server.

# open a new terminal that is on your local machine
# flappingMAV files
scp -r /path/to/flappingMAV <username>@login.delta.ncsa.illinois.edu:~

# pterasoftware files
# pterasoftware is a directory inside PteraSoftware-release-3.0.0
scp -r /path/to/pterasoftware <username>@login.delta.ncsa.illinois.edu:~

Running project

# ssh into server
ssh <username>@login.delta.ncsa.illinois.edu

# go into directory with code
cd ~/flappingMAV/optimization

# request resources
srun -A bbrx-delta-gpu --time=00:30:00 --partition=gpuA40x4-interactive --nodes=1 --ntasks-per-node=16 --gpus-per-node=1 --mem=32g --pty /bin/bash

# run VTDIRECT95 on optimization problem
./run.sh

DIRECT Search Algorithm

A search algorithm that searches for coordinates (i.e. inputs) in a sample set that generates the minumun value from a function that has little to no randomness.

DIRECT is short for DIvide RECTangle and is named after the method of search that it uses. It uses a divide and conquer approach for finding the global minumun of a function.

General Algorithm

  1. Start with a sample search space.
  2. Select one of the rectangles.
  3. Divide into (3) rectangles.
  4. Sample center of rectangles.
  5. Repeat from step 2.

VTDIRECT95

VTDIRECT95 is an algorithm that is based off of the DIRECT algorithm and adds optimizations for faster and better performance.

An objective function is the function the DIRECT search algorithm will try to find the minumun value of. This algorithm is a black box algorithm, which means the algorithm only cares about inputs and outputs; the implementation of the function does not matter.

These algorithms are numerical solutions and are used in places where analytical solutions are difficult. In the case of finding the maximum lift-to-drag ratio based off of non-geometrical parameters of a wing, a numerical solution is needed because the complex aerodynamic equations make it difficult to use analytical solutions.

In this application, the objective function is the mean lift coeffecient generated by the wing's flapping motion of a micro-air vehicle. This application tries to find the maximum value of the lift coeffecient in the search space and to adjust the algorithm so that it finds the maximum instead of the minumun, we flip the signs of the output values.

Design parameters are the parameters to input values to that will generate the search space for the VTDIRECT95 algorithm. Design parameters are the coordinates of a location in the search space of the algorithm. Each coordinate is associated with a value outputed by the objective function and the algorithm finds the coordinates that generate the lowest value when inputted to the objective function.


The design parameters for maximizing the lift-to-drag ratio of a flapping wing that are considered are seven in total.

  1. The amplitude in the x direction of the flapping motion
  2. The amplitude in the y direction of the flapping motion
  3. The amplitude of the rotation of the flapping motion
  4. The phase angle in the x direction of the flapping motion
  5. The phase angle in the y direction of the flapping motion
  6. The phase angle of the rotation of the flapping motion
  7. The change of inclination of the wing as the flapping motion switches direction (not entirely sure)

The amplitude can be defined as the difference between the maximum point and the minimum point of the flapping motion.

The phase angle gives information about the timing and position of the flapping motion of the wing relative to the initial time and position (I don't know how to exactly define this)

The seventh parameter I'm still having trouble understanding and defining as well.

Giving reasonable lower and upper bounds to the parameters aids in keeping a reasonable search space. The paper provides the lower and upper bounds for the parameters which will also be used here:

Parameter Lower Upper
A_x 1 2
A_y 0 1
A_theta 20 70
phi_x 0 360
phi_y 0 360
phi_theta 0 360
kappa 1 4

How are we linking the UVLM simulation (implemented in python) with the VTDIRECT95 algorithm?

How does the professors code link the simulation with the VTDIRECT95 algorithm?

Unsteady Vortex Lattice Method

The Unsteady Vortex Lattice Method (UVLM) is a Computational Fluids Dynamic (CFD) simulation that models aerodynamic forces on an object, in this case, a wing. It is suitable to use the Unsteady Vortex Lattice Method over the Steady Vortex Lattice Method because the Unsteady Vortex Lattice Method accounts for time variation or motion of the wings. In our application, this is important because it allows for taking into account the flapping motion of our MAV.

The Unsteady term in the name of the method is referring to taking into account flapping motion of the wing vs. not taking it into account (i.e. steady)

The Vortex term in the name of the method is referring to using vortices along with the Biot-Savart Law to calculate forces on the object (wing).

The Lattice term in the name of the method is referring to the use of a lattice pattern (i.e. panels) to divide the surface of the object (wing) and calculate forces on the subdivisions. Each subdivision is represented by a thread that runs along the surface and the "flow field" that these threads create is the representation of the geometry and kinematics of the object.

What principles does it consider and use to run the simulation? What is the Biot-Savart Law and why is it important in this context? Biot-Savart Law relates the velocity of air at some point away from a vortex and the strength of the vortex. In this context it is important because this kind of simulation simulates vortices and the velocity of air around the wing affects the lift and drag generated by the wings

What is the no-slip boundary condition and why is it important in this context? No slip boundary condition is the assumption that the velocity of the air at the surface of the wings is zero. This creates vortices because the air is deflected off of the surface of the wing.

What kind of UVLM simulation was conducted in the paper? The kind of simulations conducted in the paper are Unsteady Line Vortex Lattice Method which represents the simulated vortices as lines perpendicular to the surface of the wing. There are other UVLM simulations that represent the vortices as rings or horseshoes. Those simulations are usually more computationally heavy but are give more accurate results.

What geometry for the wing was used in the study? The geometry of the wing is said to be a flat plate.

What kind of input does the simulation we are running take? attributes of the micro-air vehicle and the flapping motion of the wings can be changed in the ring_uvlm_solver_static_original.py file.

What kind of output does the simulation we are running give? Various kind, but we are concerned with the lift coeffecient.

flappingmav's People

Contributors

vcss7 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.