diff --git a/src/filament.jl b/src/filament.jl index 671f8410..3654ca61 100644 --- a/src/filament.jl +++ b/src/filament.jl @@ -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 @@ -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 """ diff --git a/src/kite_geometry.jl b/src/kite_geometry.jl index 93c2b557..92dd9cec 100644 --- a/src/kite_geometry.jl +++ b/src/kite_geometry.jl @@ -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 @@ -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 @@ -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} diff --git a/src/panel.jl b/src/panel.jl index d3c80bee..29a38a23 100644 --- a/src/panel.jl +++ b/src/panel.jl @@ -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] diff --git a/src/plotting.jl b/src/plotting.jl index 36e77e9c..f9ca5409 100644 --- a/src/plotting.jl +++ b/src/plotting.jl @@ -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 diff --git a/src/solver.jl b/src/solver.jl index 6ae5db09..720543d9 100644 --- a/src/solver.jl +++ b/src/solver.jl @@ -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 @@ -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, diff --git a/src/wing_aerodynamics.jl b/src/wing_aerodynamics.jl index eab45e73..f72a9b4b 100644 --- a/src/wing_aerodynamics.jl +++ b/src/wing_aerodynamics.jl @@ -129,7 +129,7 @@ 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. @@ -137,7 +137,7 @@ 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}[] diff --git a/src/wing_geometry.jl b/src/wing_geometry.jl index 8c81ee83..669479bc 100644 --- a/src/wing_geometry.jl +++ b/src/wing_geometry.jl @@ -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 @@ -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, @@ -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) @@ -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}) @@ -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) diff --git a/test/utils.jl b/test/utils.jl index 9203350f..4b58046f 100644 --- a/test/utils.jl +++ b/test/utils.jl @@ -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)) @@ -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 @@ -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 @@ -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