Skip to content

Commit 735c136

Browse files
authored
Merge pull request #11 from Albatross-Kite-Transport/controlplots
replace Plots with ControlPlots
2 parents 9fef3b2 + 7db754a commit 735c136

File tree

17 files changed

+443
-254
lines changed

17 files changed

+443
-254
lines changed

.github/workflows/CI.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ jobs:
3434
arch: x64
3535
version: 1
3636
steps:
37+
- name: Install matplotlib
38+
run: if [ "$RUNNER_OS" = "Linux" ]; then sudo apt-get install -y python3-matplotlib; fi
39+
shell: bash
3740
- uses: actions/checkout@v4
3841
- uses: julia-actions/setup-julia@v2
3942
with:

CITATION.cff

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
1-
cff-version: 0.1.0
1+
cff-version: 1.2.0
22
message: "If you are using this software, please cite it as shown below."
33
authors:
4-
-
5-
family-names: "Cayon"
4+
- family-names: "Cayon"
65
given-names: "Oriol"
76
orcid: "https://orcid.org/0000-0002-2065-8673"
8-
family-names: "Poland"
7+
- family-names: "Poland"
98
given-names: "Jelle Agatho Wilhelm"
109
orcid: "https://orcid.org/0000-0003-3164-5648"
11-
title: "VortexStepMethod"
10+
title: "VortexStepMethod.jl"
1211
keywords:
13-
- Airborne Wind Energy
14-
version: 0.1.0
12+
- Airborne Wind Energy, AWE, AWES, Vortex step methods
13+
version: 1.0.0
1514
# doi: "11.1111/11111"
1615
# date-released: YYYY-MM-DD
1716
license: MIT
18-
url: "https://github.com/ocayon/Vortex-Step-Method"
17+
url: "https://github.com/Albatross-Kite-Transport/VortexStepMethod.jl"
1918
preferred-citation:
2019
type: article
2120
authors:
@@ -31,4 +30,3 @@ preferred-citation:
3130
issue: 7
3231
volume: 16
3332
year: 2023
34-
article-number: 3061

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@ version = "0.1.0"
66
[deps]
77
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
88
Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"
9+
ControlPlots = "23c2ee80-7a9e-4350-b264-8e670f12517c"
910
DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"
1011
LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f"
1112
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1213
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
1314
Measures = "442fdcdd-2543-5da2-b0f3-8c86c306513e"
14-
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
1515
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
1616
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
1717
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
1818

1919
[compat]
20+
ControlPlots = "0.2.5"
2021
Measures = "0.3"
2122
StaticArrays = "1"
22-
Plots = "1"
2323
Statistics = "1"
2424
DelimitedFiles = "1"
2525
BenchmarkTools = "1"

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
[![Build Status](https://github.com/Albatross-Kite-Transport/VortexStepMethod.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/Albatross-Kite-Transport/VortexStepMethod.jl/actions/workflows/CI.yml?query=branch%3Amain) [![Coverage](https://codecov.io/gh/Albatross-Kite-Transport/VortexStepMethod.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/Albatross-Kite-Transport/VortexStepMethod.jl)
22

3+
=======
4+
35
# Simulation of a 3D airfoil using the Vortex Step Method
46

57
The Vortex Step Method (VSM) is an enhanced lifting line method that improves upon the classic approach by solving the
@@ -116,7 +118,7 @@ Surfplan files can be converted to an input for `VortexStepMethod.jl` using the
116118
## Output
117119
- CL, CD, CS (side force coefficient)
118120
- the spanwise distribution of forces
119-
--> moment coefficients (not yet implemented)
121+
--> moment coefficients (will be implemented in release 1.1)
120122

121123
## Citation
122124
If you use this project in your research, please consider citing it.

Spanwise Distributions.pdf

-87 KB
Binary file not shown.

docs/geometry.png

180 KB
Loading

examples/rectangular_wing.jl

Lines changed: 23 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using LinearAlgebra
2-
using Plots
2+
using ControlPlots
33
using VortexStepMethod
44

55
# Step 1: Define wing parameters
@@ -55,36 +55,33 @@ println("Projected area = $(round(results_vsm["projected_area"], digits=4)) m²"
5555
# Step 6: Plot geometry
5656
plot_geometry(
5757
wa,
58-
"rectangular_wing_geometry";
58+
"Rectangular_wing_geometry";
5959
data_type=".pdf",
6060
save_path=".",
6161
is_save=false,
6262
is_show=true,
6363
)
64+
nothing
6465

65-
# # Step 7: Plot spanwise distributions
66-
# y_coordinates = [panel.aerodynamic_center[2] for panel in wa.panels]
66+
# Step 7: Plot spanwise distributions
67+
y_coordinates = [panel.aerodynamic_center[2] for panel in wa.panels]
6768

68-
# plot_distribution(
69-
# [y_coordinates, y_coordinates],
70-
# [results_vsm, results_llt],
71-
# ["VSM", "LLT"],
72-
# title="Spanwise Distributions"
73-
# )
74-
75-
# # Step 8: Plot polar curves
76-
# angle_range = range(0, 20, 20)
77-
# plot_polars(
78-
# [llt_solver, vsm_solver],
79-
# [wa, wa],
80-
# ["LLT", "VSM"],
81-
# angle_range=angle_range,
82-
# angle_type="angle_of_attack",
83-
# Umag=Umag,
84-
# title="Rectangular Wing Polars"
85-
# )
69+
plot_distribution(
70+
[y_coordinates, y_coordinates],
71+
[results_vsm, results_llt],
72+
["VSM", "LLT"],
73+
title="Spanwise Distributions"
74+
)
8675

87-
# Save plots if needed
88-
# savefig("geometry.pdf")
89-
# savefig("distributions.pdf")
90-
# savefig("polars.pdf")
76+
# Step 8: Plot polar curves
77+
angle_range = range(0, 20, 20)
78+
plot_polars(
79+
[llt_solver, vsm_solver],
80+
[wa, wa],
81+
["LLT", "VSM"],
82+
angle_range=angle_range,
83+
angle_type="angle_of_attack",
84+
Umag=Umag,
85+
title="Rectangular Wing Polars"
86+
)
87+
nothing

examples/testing_stall_model.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ using VortexStepMethod
33
using CSV
44
using DataFrames
55
using LinearAlgebra
6-
using Plots
76

87
# Find root directory
98
root_dir = dirname(@__DIR__)
572 KB
Binary file not shown.

src/VortexStepMethod.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ using Logging
66
using Statistics
77
using Colors
88
using DelimitedFiles
9-
using Plots
9+
using ControlPlots
1010
using Measures
1111
using LaTeXStrings
1212

@@ -18,6 +18,7 @@ export calculate_results, solve_circulation_distribution
1818
export add_section!, set_va!
1919
export calculate_span, calculate_projected_area
2020
export plot_wing, plot_circulation_distribution, plot_geometry, plot_distribution, plot_polars
21+
export show_plot
2122

2223
"""
2324
const MVec3 = MVector{3, Float64}
@@ -31,8 +32,8 @@ const MVec3 = MVector{3, Float64}
3132
3233
Position vector, either a `MVec3` or a `Vector` for use in function signatures.
3334
"""
34-
const PosVector=Union{MVec3, Vector}
35-
const VelVector=Union{MVec3, Vector}
35+
const PosVector=Union{MVec3, Vector, SizedVector{3, Float64, Vector{Float64}}}
36+
const VelVector=Union{MVec3, Vector, SizedVector{3, Float64, Vector{Float64}}}
3637

3738
# Include core functionality
3839
include("wing_geometry.jl")

0 commit comments

Comments
 (0)