Skip to content

Commit 5e0c3eb

Browse files
committed
use SVec3 instead MVec3
1 parent e24edc0 commit 5e0c3eb

File tree

7 files changed

+57
-57
lines changed

7 files changed

+57
-57
lines changed

docs/src/types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ CurrentModule = VortexStepMethod
33
```
44
## Basic Vectors
55
```@docs
6-
MVec3
6+
SVec3
77
PosVector
88
VelVector
99
```

src/VortexStepMethod.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,25 @@ export plot_wing, plot_circulation_distribution, plot_geometry, plot_distributio
2525
export show_plot, save_plot, menu
2626

2727
"""
28-
const MVec3 = MVector{3, Float64}
28+
const SVec3 = MVector{3, Float64}
2929
3030
Basic 3-dimensional vector, stack allocated, mutable.
3131
"""
32-
const MVec3 = MVector{3, Float64}
32+
const SVec3 = MVector{3, Float64}
3333

3434
"""
35-
const PosVector=Union{MVec3, Vector}
35+
const PosVector=Union{SVec3, Vector}
3636
37-
Position vector, either a `MVec3` or a `Vector` for use in function signatures.
37+
Position vector, either a `SVec3` or a `Vector` for use in function signatures.
3838
"""
39-
const PosVector=Union{MVec3, Vector, SizedVector{3, Float64, Vector{Float64}}}
39+
const PosVector=Union{SVec3, Vector, SizedVector{3, Float64, Vector{Float64}}}
4040

4141
"""
42-
const VelVector=Union{MVec3, Vector}
42+
const VelVector=Union{SVec3, Vector}
4343
44-
Velocity vector, either a `MVec3` or a `Vector` for use in function signatures.
44+
Velocity vector, either a `SVec3` or a `Vector` for use in function signatures.
4545
"""
46-
const VelVector=Union{MVec3, Vector, SizedVector{3, Float64, Vector{Float64}}}
46+
const VelVector=Union{SVec3, Vector, SizedVector{3, Float64, Vector{Float64}}}
4747

4848
@enum Model VSM LLT
4949

src/body_aerodynamics.jl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Main structure for calculating aerodynamic properties of bodies.
66
# Fields
77
- panels::Vector{Panel}: Vector of Panel structs
88
- wings::Vector{AbstractWing}: a vector of wings; a body can have multiple wings
9-
- `_va`::Union{Nothing, Vector{Float64}, Tuple{MVec3, Float64}}: A vector of the apparent wind speed,
9+
- `_va`::Union{Nothing, Vector{Float64}, Tuple{SVec3, Float64}}: A vector of the apparent wind speed,
1010
or a tuple of the v_a vector and yaw rate (rad/s).
1111
- `gamma_distribution`::Union{Nothing, Vector{Float64}}: unclear, please defined
1212
- `alpha_uncorrected`::Union{Nothing, Vector{Float64}}: unclear, please define
@@ -16,7 +16,7 @@ Main structure for calculating aerodynamic properties of bodies.
1616
mutable struct BodyAerodynamics
1717
panels::Vector{Panel}
1818
wings::Vector{AbstractWing} # can be a vector of Wings, or of KiteWings
19-
_va::Union{Nothing, Vector{Float64}, Tuple{MVec3, Float64}}
19+
_va::Union{Nothing, Vector{Float64}, Tuple{SVec3, Float64}}
2020
gamma_distribution::Union{Nothing, Vector{Float64}}
2121
alpha_uncorrected::Union{Nothing, Vector{Float64}}
2222
alpha_corrected::Union{Nothing, Vector{Float64}}
@@ -105,20 +105,20 @@ end
105105
Structure to hold calculated panel properties.
106106
107107
# Fields
108-
- `aero_centers`::Vector{MVec3}
109-
- `control_points`::Vector{MVec3}
110-
- `bound_points_1`::Vector{MVec3}
111-
- `bound_points_2`::Vector{MVec3}
108+
- `aero_centers`::Vector{SVec3}
109+
- `control_points`::Vector{SVec3}
110+
- `bound_points_1`::Vector{SVec3}
111+
- `bound_points_2`::Vector{SVec3}
112112
- `x_airf`::Vector{Vector{Float64}}: unclear, please define
113113
- `y_airf`::Vector{Vector{Float64}}: unclear, please define
114114
- `z_airf`::Vector{Vector{Float64}}: unclear, please define
115115
116116
"""
117117
struct PanelProperties
118-
aero_centers::Vector{MVec3}
119-
control_points::Vector{MVec3}
120-
bound_points_1::Vector{MVec3}
121-
bound_points_2::Vector{MVec3}
118+
aero_centers::Vector{SVec3}
119+
control_points::Vector{SVec3}
120+
bound_points_1::Vector{SVec3}
121+
bound_points_2::Vector{SVec3}
122122
x_airf::Vector{Vector{Float64}}
123123
y_airf::Vector{Vector{Float64}}
124124
z_airf::Vector{Vector{Float64}}

src/filament.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ const NU = 1.48e-5 # Kinematic viscosity of air
1414
Represents a bound vortex filament defined by two points.
1515
1616
# Fields
17-
- x1::MVec3: First point
18-
- x2::MVec3: Second point
17+
- x1::SVec3: First point
18+
- x2::SVec3: Second point
1919
- length: Filament length
20-
- r0::MVec3: Vector from x1 to x2
20+
- r0::SVec3: Vector from x1 to x2
2121
"""
2222
struct BoundFilament <: Filament
23-
x1::MVec3 # First point
24-
x2::MVec3 # Second point
23+
x1::SVec3 # First point
24+
x2::SVec3 # Second point
2525
length::Float64 # Filament length
26-
r0::MVec3 # Vector from x1 to x2
26+
r0::SVec3 # Vector from x1 to x2
2727

2828
function BoundFilament(x1::PosVector, x2::PosVector)
2929
new(x1, x2, norm(x2 - x1), x2 - x1)
@@ -152,8 +152,8 @@ end
152152
Represents a semi-infinite vortex filament.
153153
"""
154154
struct SemiInfiniteFilament <: Filament
155-
x1::MVec3 # Starting point
156-
direction::MVec3 # Direction vector
155+
x1::SVec3 # Starting point
156+
direction::SVec3 # Direction vector
157157
vel_mag::Float64 # Velocity magnitude
158158
filament_direction::Int64 # Direction indicator (-1 or 1)
159159
end

src/kite_geometry.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ Represents a curved wing that inherits from Wing with additional geometric prope
177177
- All fields from Wing:
178178
- `n_panels::Int`: Number of panels in aerodynamic mesh
179179
- `spanwise_panel_distribution::String`: Panel distribution type
180-
- `spanwise_direction::MVec3`: Wing span direction vector
180+
- `spanwise_direction::SVec3`: Wing span direction vector
181181
- `sections::Vector{Section}`: List of wing sections
182182
- Additional fields:
183183
- `center_of_mass::Vector{Float64}`: Center of mass coordinates
@@ -190,7 +190,7 @@ Same as Wing
190190
mutable struct KiteWing <: AbstractWing
191191
n_panels::Int64
192192
spanwise_panel_distribution::String
193-
spanwise_direction::MVec3
193+
spanwise_direction::SVec3
194194
sections::Vector{Section}
195195

196196
# Additional fields for KiteWing

src/panel.jl

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,44 +6,44 @@ using LinearAlgebra
66
Represents a panel in a vortex step method simulation.
77
88
# Fields
9-
- `TE_point_1::MVec3`: First trailing edge point
10-
- `LE_point_1::MVec3`: First leading edge point
11-
- `TE_point_2::Vector{MVec3}`: Second trailing edge point
12-
- `LE_point_2::Vector{MVec3}`: Second leading edge point
9+
- `TE_point_1::SVec3`: First trailing edge point
10+
- `LE_point_1::SVec3`: First leading edge point
11+
- `TE_point_2::Vector{SVec3}`: Second trailing edge point
12+
- `LE_point_2::Vector{SVec3}`: Second leading edge point
1313
- `chord::Float64`: Panel chord length
14-
- `va::Union{Nothing, MVec3}`: Panel velocity
14+
- `va::Union{Nothing, SVec3}`: Panel velocity
1515
- `corner_points::Matrix{Float64}`: Panel corner points
1616
- `aero_model::String`: Aerodynamic model type
1717
- `aerodynamic_center::Vector{Float64}`: Panel aerodynamic center
18-
- `control_point::Vector{MVec3}`: Panel control point
19-
- `bound_point_1::Vector{MVec3}`: First bound point
20-
- `bound_point_2::Vector{MVec3}`: Second bound point
21-
- `x_airf::MVec3`: Unit vector perpendicular to chord line
22-
- `y_airf::MVec3`: Unit vector parallel to chord line
23-
- `z_airf::MVec3`: Unit vector in spanwise direction
18+
- `control_point::Vector{SVec3}`: Panel control point
19+
- `bound_point_1::Vector{SVec3}`: First bound point
20+
- `bound_point_2::Vector{SVec3}`: Second bound point
21+
- `x_airf::SVec3`: Unit vector perpendicular to chord line
22+
- `y_airf::SVec3`: Unit vector parallel to chord line
23+
- `z_airf::SVec3`: Unit vector in spanwise direction
2424
- `width::Float64`: Panel width
2525
- `filaments::Vector{BoundFilament}`: Panel filaments
2626
"""
2727
mutable struct Panel{P}
28-
TE_point_1::MVec3
29-
LE_point_1::MVec3
30-
TE_point_2::MVec3
31-
LE_point_2::MVec3
28+
TE_point_1::SVec3
29+
LE_point_1::SVec3
30+
TE_point_2::SVec3
31+
LE_point_2::SVec3
3232
chord::Float64
33-
va::Union{Nothing, MVec3}
33+
va::Union{Nothing, SVec3}
3434
corner_points::Matrix{Float64}
3535
aero_model::String
3636
cl_coefficients::Union{Nothing,Vector{Float64}}
3737
cd_coefficients::Union{Nothing,Vector{Float64}}
3838
cm_coefficients::Union{Nothing,Vector{Float64}}
3939
polar_data::P
40-
aerodynamic_center::MVec3
41-
control_point::MVec3
42-
bound_point_1::MVec3
43-
bound_point_2::MVec3
44-
x_airf::MVec3
45-
y_airf::MVec3
46-
z_airf::MVec3
40+
aerodynamic_center::SVec3
41+
control_point::SVec3
42+
bound_point_1::SVec3
43+
bound_point_2::SVec3
44+
x_airf::SVec3
45+
y_airf::SVec3
46+
z_airf::SVec3
4747
width::Float64
4848
filaments::Vector{Union{BoundFilament, SemiInfiniteFilament}}
4949

src/wing_geometry.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
Represents a wing section with leading edge, trailing edge, and aerodynamic properties.
66
77
# Fields
8-
- `LE_point::MVec3`: Leading edge point coordinates
9-
- `TE_point::MVec3`: Trailing edge point coordinates
8+
- `LE_point::SVec3`: Leading edge point coordinates
9+
- `TE_point::SVec3`: Trailing edge point coordinates
1010
- `aero_input::Vector{Any}`: Aerodynamic input data for the section:
1111
- `("inviscid")`: Inviscid aerodynamics
1212
- `("polar_data", [alpha_column,CL_column,CD_column,CM_column])`: Polar data aerodynamics
1313
- `("lei_airfoil_breukels", [d_tube,camber])`: LEI airfoil with Breukels parameters
1414
"""
1515
struct Section{T}
16-
LE_point::MVec3
17-
TE_point::MVec3
16+
LE_point::SVec3
17+
TE_point::SVec3
1818
aero_input::T
1919

2020
function Section(
@@ -52,7 +52,7 @@ mutable struct Wing <: AbstractWing
5252

5353
function Wing(n_panels::Int;
5454
spanwise_panel_distribution::String="linear",
55-
spanwise_direction::PosVector=MVec3([0.0, 1.0, 0.0]))
55+
spanwise_direction::PosVector=SVec3([0.0, 1.0, 0.0]))
5656
new(n_panels,
5757
spanwise_panel_distribution,
5858
spanwise_direction,

0 commit comments

Comments
 (0)