Skip to content

Commit

Permalink
clean up that hack
Browse files Browse the repository at this point in the history
  • Loading branch information
askprash committed Jan 8, 2025
1 parent 83fb419 commit 0f2839c
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions src/misc/wing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ Wing Structure:
$TYPEDFIELDS
"""
@kwdef mutable struct Wing <: AbstractWing
@kwdef mutable struct Wing{air<:aerodynamics.airfoil} <: AbstractWing
"""Wing Weight [N] """
weight::Float64 = 0
weight::Float64 = 0.0
"""Aircraft pitching moment contribution from the weight distribution of the wing [Nm]"""
dxW::Float64 = 0
dxW::Float64 = 0.0
"""Wing Layout """
layout::WingLayout = WingLayout()
"""Wing Planform (0: wing catilever, plain; 1: wing cantilever with engine"""
Expand All @@ -62,9 +62,7 @@ $TYPEDFIELDS
material::StructuralAlloy = StructuralAlloy("TASOPT-Al")

"""Airfoil data"""
airsection::aerodynamics.airfoil{Float64, Vector{Float64}, Array{Float64, 4}} =
aerodynamics.airtable(joinpath(__TASOPTroot__,"airfoil_data/C.air"))
#kinda dirty hack to force type stability but I don't like it.
airsection::air = aerodynamics.airtable(joinpath(__TASOPTroot__,"airfoil_data/C.air"))

"""Inboard Wing Section (at wing root)"""
inboard::WingSection = WingSection() # at wing root
Expand All @@ -79,26 +77,26 @@ $TYPEDFIELDS
tip_lift_loss::Float64 = 0.0

"""Mean Aerodynamic Chord"""
mean_aero_chord::Float64 = 0
mean_aero_chord::Float64 = 0.0

"""Wing Strut"""
has_strut::Bool = false
strut::Strut = Strut()

"""Wing flap weight fraction"""
weight_frac_flap::Float64 = 0
weight_frac_flap::Float64 = 0.0
"""Wing slats weight fraction"""
weight_frac_slat::Float64 = 0
weight_frac_slat::Float64 = 0.0
"""Wing ailerons weight fraction"""
weight_frac_ailerons::Float64 = 0
weight_frac_ailerons::Float64 = 0.0
"""Wing leading_trailing_edge weight fraction"""
weight_frac_leading_trailing_edge::Float64 = 0
weight_frac_leading_trailing_edge::Float64 = 0.0
"""Wing ribs weight fraction"""
weight_frac_ribs::Float64 = 0
weight_frac_ribs::Float64 = 0.0
"""Wing spoilers weight fraction"""
weight_frac_spoilers::Float64 = 0
weight_frac_spoilers::Float64 = 0.0
"""Wing attachments weight fraction"""
weight_frac_attachments::Float64 = 0
weight_frac_attachments::Float64 = 0.0

end

Expand Down

0 comments on commit 0f2839c

Please sign in to comment.