|
| 1 | +```@meta |
| 2 | +CurrentModule = VortexStepMethod |
| 3 | +``` |
| 4 | + |
| 5 | +# Simulation of a 3D airfoil using the Vortex Step Method |
| 6 | + |
| 7 | +The Vortex Step Method (VSM) is an enhanced lifting line method that improves upon the classic approach by solving the circulation system at the three-quarter chord position, among the most important details. This adjustment allows for more accurate calculations of lift and drag forces, particularly addressing the shortcomings in induced drag prediction. |
| 8 | +VSM is further refined by coupling it with 2D viscous airfoil polars, making it well-suited for complex geometries, |
| 9 | +including low aspect ratio wings, as well as configurations with sweep, dihedral, and anhedral angles. |
| 10 | + |
| 11 | +The software presented here includes a couple of examples: a rectangular wing, a leading-edge inflatable kite and a ram-air kite. |
| 12 | + |
| 13 | +This package was translated from the Python code version 1.0.0 available at https://github.com/ocayon/Vortex-Step-Method with some extensions as documented in [News.md](https://github.com/Albatross-Kite-Transport/VortexStepMethod.jl/blob/main/NEWS.md). |
| 14 | + |
| 15 | +## Installation |
| 16 | +Install [Julia 1.10](https://ufechner7.github.io/2024/08/09/installing-julia-with-juliaup.html) or later, |
| 17 | +if you haven't already. On Linux, make sure that Python3, Matplotlib and LaTeX are installed: |
| 18 | +``` |
| 19 | +sudo apt install python3-matplotlib |
| 20 | +sudo apt install texlive-full texlive-fonts-extra cm-super |
| 21 | +``` |
| 22 | + |
| 23 | +Before installing this software it is suggested to create a new project, for example like this: |
| 24 | +```bash |
| 25 | +mkdir test |
| 26 | +cd test |
| 27 | +julia --project=. |
| 28 | +``` |
| 29 | +Then add VortexStepMethod from Julia's package manager, by typing: |
| 30 | +```julia |
| 31 | +using Pkg |
| 32 | +pkg"add https://github.com/Albatross-Kite-Transport/VortexStepMethod.jl" |
| 33 | +``` |
| 34 | +at the Julia prompt. You can run the unit tests with the command: |
| 35 | +```julia |
| 36 | +pkg"test VortexStepMethod" |
| 37 | +``` |
| 38 | + |
| 39 | +## Running the examples |
| 40 | +If you have git installed, check out this repo because it makes it easier to understand the code: |
| 41 | +```bash |
| 42 | +mkdir repos |
| 43 | +cd repos |
| 44 | +git clone https://github.com/Albatross-Kite-Transport/VortexStepMethod.jl |
| 45 | +cd VortexStepMethod.jl |
| 46 | +``` |
| 47 | +You can launch Julia with: |
| 48 | +```bash |
| 49 | +julia --project |
| 50 | +``` |
| 51 | +or with: |
| 52 | +```bash |
| 53 | +./bin/run_julia |
| 54 | +``` |
| 55 | +In Julia, first update the packages: |
| 56 | +```julia |
| 57 | +using Pkg |
| 58 | +Pkg.update() |
| 59 | +``` |
| 60 | +and then you can execute the first example: |
| 61 | +```julia |
| 62 | +include("examples/rectangular_wing.jl") |
| 63 | +``` |
| 64 | +To browse the code, it is suggested to use [VSCode](https://code.visualstudio.com/) with the Julia plugin. |
| 65 | + |
| 66 | +## Input |
| 67 | +Three kinds of input data is needed: |
| 68 | + |
| 69 | +- The wing geometry, defined by section: |
| 70 | + - rec wing two section, two point + polars |
| 71 | + - kite: model of polars included, n sections to define |
| 72 | + |
| 73 | +- The airflow: |
| 74 | + - v_app vector |
| 75 | + |
| 76 | +- The configuration: |
| 77 | + - how many panels |
| 78 | + --> two sections make a panel. |
| 79 | + |
| 80 | +Apart from the wing geometry there is no input file yet, the input has to be defined in the code. |
| 81 | + |
| 82 | +### Example for defining the required input: |
| 83 | +```julia |
| 84 | + |
| 85 | +# Step 1: Define wing parameters |
| 86 | +n_panels = 20 # Number of panels |
| 87 | +span = 20.0 # Wing span [m] |
| 88 | +chord = 1.0 # Chord length [m] |
| 89 | +v_a = 20.0 # Magnitude of inflow velocity [m/s] |
| 90 | +density = 1.225 # Air density [kg/m³] |
| 91 | +alpha_deg = 30.0 # Angle of attack [degrees] |
| 92 | +alpha = deg2rad(alpha_deg) |
| 93 | + |
| 94 | +# Step 2: Create wing geometry with linear panel distribution |
| 95 | +wing = Wing(n_panels, spanwise_panel_distribution="linear") |
| 96 | + |
| 97 | +# Add wing sections - defining only tip sections with inviscid airfoil model |
| 98 | +add_section!(wing, |
| 99 | + [0.0, span/2, 0.0], # Left tip LE |
| 100 | + [chord, span/2, 0.0], # Left tip TE |
| 101 | + "inviscid") |
| 102 | +add_section!(wing, |
| 103 | + [0.0, -span/2, 0.0], # Right tip LE |
| 104 | + [chord, -span/2, 0.0], # Right tip TE |
| 105 | + "inviscid") |
| 106 | + |
| 107 | +# Step 3: Initialize aerodynamics |
| 108 | +wa = WingAerodynamics([wing]) |
| 109 | + |
| 110 | +# Set inflow conditions |
| 111 | +vel_app = [cos(alpha), 0.0, sin(alpha)] .* v_a |
| 112 | +set_va!(wa, (vel_app, 0.0)) # Second parameter is yaw rate |
| 113 | +``` |
| 114 | +It is possible to import the wing geometry using an `.obj` file as shown in the example `ram_air_kite.jl`. |
| 115 | + |
| 116 | +Surfplan files can be converted to an input for `VortexStepMethod.jl` using the [SurfplanAdapter](https://github.com/jellepoland/SurfplanAdapter). |
| 117 | + |
| 118 | +## Output |
| 119 | +- CL, CD, CS (side force coefficient) |
| 120 | +- the spanwise distribution of forces |
| 121 | + --> moment coefficients (will be implemented in release 1.1) |
| 122 | + |
| 123 | +## Citation |
| 124 | +If you use this project in your research, please consider citing it. |
| 125 | +Citation details can be found in the [CITATION.cff](https://github.com/Albatross-Kite-Transport/VortexStepMethod.jl/blob/main/CITATION.cff) file included in this repository. |
| 126 | + |
| 127 | +## License |
| 128 | +This project is licensed under the MIT License - see the [LICENSE](https://github.com/Albatross-Kite-Transport/VortexStepMethod.jl/blob/main/LICENSE) file for details. |
| 129 | + |
| 130 | +### Copyright |
| 131 | +Copyright (c) 2022 Oriol Cayon |
| 132 | + |
| 133 | +Copyright (c) 2024 Oriol Cayon, Jelle Poland, TU Delft |
| 134 | + |
| 135 | +Copyright (c) 2025 Oriol Cayon, Jelle Poland, Bart van de Lint |
| 136 | + |
0 commit comments