Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/filament.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ abstract type Filament end

# Constants for all filament types
const ALPHA0 = 1.25643 # Oseen parameter
const NU = 1.48e-5 # Kinematic viscosity of air
const NU = 1.48e-5 # Kinematic viscosity of air

"""
BoundFilament
Expand Down Expand Up @@ -152,10 +152,10 @@ end
Represents a semi-infinite vortex filament.
"""
struct SemiInfiniteFilament <: Filament
x1::Vector{Float64} # Starting point
direction::Vector{Float64} # Direction vector
x1::MVec3 # Starting point
direction::MVec3 # Direction vector
vel_mag::Float64 # Velocity magnitude
filament_direction::Int # Direction indicator (-1 or 1)
filament_direction::Int64 # Direction indicator (-1 or 1)
end

"""
Expand Down
6 changes: 3 additions & 3 deletions src/kite_geometry.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function read_faces(filename)
elseif startswith(line, "f ")
parts = split(line)
# Handle both f v1 v2 v3 and f v1/vt1/vn1 v2/vt2/vn2 v3/vt3/vn3 formats
indices = map(p -> parse(Int, split(p, '/')[1]), parts[2:4])
indices = map(p -> parse(Int64, split(p, '/')[1]), parts[2:4])
push!(faces, indices)
end
end
Expand Down Expand Up @@ -175,7 +175,7 @@ Represents a curved wing that inherits from Wing with additional geometric prope

# Fields
- All fields from Wing:
- `n_panels::Int`: Number of panels in aerodynamic mesh
- `n_panels::Int64`: Number of panels in aerodynamic mesh
- `spanwise_panel_distribution::String`: Panel distribution type
- `spanwise_direction::Vector{Float64}`: Wing span direction vector
- `sections::Vector{Section}`: List of wing sections
Expand All @@ -188,7 +188,7 @@ Represents a curved wing that inherits from Wing with additional geometric prope
Same as Wing
"""
mutable struct KiteWing <: AbstractWing
n_panels::Int
n_panels::Int64
spanwise_panel_distribution::String
spanwise_direction::Vector{Float64}
sections::Vector{Section}
Expand Down
2 changes: 1 addition & 1 deletion src/panel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ function compute_lei_coefficients(section_1::Section, section_2::Section)
)

# Compute S values
S = Dict{Int,Float64}()
S = Dict{Int64,Float64}()
S[9] = C[20]*t^2 + C[21]*t + C[22]
S[10] = C[23]*t^2 + C[24]*t + C[25]
S[11] = C[26]*t^2 + C[27]*t + C[28]
Expand Down
2 changes: 1 addition & 1 deletion src/plotting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ function plot_polars(
)
push!(polar_data_list, polar_data)
# Update label with Reynolds number
label_list[i] = "$(label_list[i]) Re = $(round(Int, rey*1e-5))e5"
label_list[i] = "$(label_list[i]) Re = $(round(Int64, rey*1e-5))e5"
end

# Load literature data if provided
Expand Down
4 changes: 2 additions & 2 deletions src/solver.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ struct Solver
# General settings
aerodynamic_model_type::String
density::Float64
max_iterations::Int
max_iterations::Int64
allowed_error::Float64
tol_reference_error::Float64
relaxation_factor::Float64
Expand All @@ -26,7 +26,7 @@ struct Solver
function Solver(;
aerodynamic_model_type::String="VSM",
density::Float64=1.225,
max_iterations::Int=1500,
max_iterations::Int64=1500,
allowed_error::Float64=1e-5,
tol_reference_error::Float64=0.001,
relaxation_factor::Float64=0.03,
Expand Down
4 changes: 2 additions & 2 deletions src/wing_aerodynamics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,15 @@ struct PanelProperties
end

"""
calculate_panel_properties(section_list::Vector{Section}, n_panels::Int,
calculate_panel_properties(section_list::Vector{Section}, n_panels::Int64,
aero_center_loc::Float64, control_point_loc::Float64)

Calculate geometric properties for each panel.

Returns:
PanelProperties containing vectors for each property
"""
function calculate_panel_properties(section_list::Vector{Section}, n_panels::Int,
function calculate_panel_properties(section_list::Vector{Section}, n_panels::Int64,
aero_center_loc::Float64, control_point_loc::Float64)
# Initialize arrays
aero_centers = Vector{Float64}[]
Expand Down
14 changes: 7 additions & 7 deletions src/wing_geometry.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ end
Represents a wing composed of multiple sections with aerodynamic properties.

# Fields
- `n_panels::Int`: Number of panels in aerodynamic mesh
- `n_panels::Int64`: Number of panels in aerodynamic mesh
- `spanwise_panel_distribution::String`: Panel distribution type
- `spanwise_direction::Vector{Float64}`: Wing span direction vector
- `sections::Vector{Section}`: List of wing sections
Expand All @@ -45,12 +45,12 @@ Represents a wing composed of multiple sections with aerodynamic properties.
- "unchanged": Keep original sections
"""
mutable struct Wing <: AbstractWing
n_panels::Int
n_panels::Int64
spanwise_panel_distribution::String
spanwise_direction::PosVector
sections::Vector{Section}

function Wing(n_panels::Int;
function Wing(n_panels::Int64;
spanwise_panel_distribution::String="linear",
spanwise_direction::PosVector=MVec3([0.0, 1.0, 0.0]))
new(n_panels,
Expand Down Expand Up @@ -183,14 +183,14 @@ end

"""
calculate_new_aero_input(aero_input::Vector{Any},
section_index::Int,
section_index::Int64,
left_weight::Float64,
right_weight::Float64)

Interpolate aerodynamic input between two sections.
"""
function calculate_new_aero_input(aero_input,
section_index::Int,
section_index::Int64,
left_weight::Float64,
right_weight::Float64)

Expand Down Expand Up @@ -266,7 +266,7 @@ end
"""
refine_mesh_for_linear_cosine_distribution(
spanwise_panel_distribution::String,
n_sections::Int,
n_sections::Int64,
LE::Matrix{Float64},
TE::Matrix{Float64},
aero_input::Vector{Any})
Expand All @@ -285,7 +285,7 @@ Returns:
"""
function refine_mesh_for_linear_cosine_distribution(
spanwise_panel_distribution::String,
n_sections::Int,
n_sections::Int64,
LE,
TE,
aero_input)
Expand Down
8 changes: 4 additions & 4 deletions test/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ include("thesis_oriol_cayon.jl")
"""
Create an array with cosine spacing, from min to max values, with n points
"""
function cosspace(min_val::Real, max_val::Real, n_points::Int)
function cosspace(min_val::Real, max_val::Real, n_points::Int64)
mean_val = (max_val + min_val) / 2
amp = (max_val - min_val) / 2
return mean_val .+ amp .* cos.(range(π, 0, length=n_points))
Expand All @@ -22,7 +22,7 @@ Generate 3D coordinates of a rectangular wing with twist and dihedral.
- `span::Float64`: Total wing span
- `twist::Vector{Float64}`: Twist angles in radians
- `beta::Vector{Float64}`: Dihedral angles in radians
- `N::Int`: Number of spanwise panels
- `N::Int64`: Number of spanwise panels
- `dist::String`: Distribution type ("cos" or "lin")

# Returns
Expand Down Expand Up @@ -61,7 +61,7 @@ Generate 3D coordinates of a curved wing.
- `span::Float64`: Wing span
- `theta::Float64`: Angular extent of curvature (radians)
- `R::Float64`: Radius of curvature
- `N::Int`: Number of spanwise panels
- `N::Int64`: Number of spanwise panels
- `dist::String`: Distribution type ("cos", "lin", or "cos2")

# Returns
Expand Down Expand Up @@ -94,7 +94,7 @@ Generate 3D coordinates of an elliptical wing.
# Arguments
- `max_chord::Float64`: Maximum chord length
- `span::Float64`: Wing span
- `N::Int`: Number of spanwise panels
- `N::Int64`: Number of spanwise panels
- `dist::String`: Distribution type ("cos" or "lin")

# Returns
Expand Down