Public API
Internal API
Aswing.aswsav
— Method.aswsav(file)
Saves ASWING geometry state to a file
Aswing.conadd
— Method.conadd(i,j,ls,gfac,c)
Sets up a proportional control law
Aswing.conclr
— Method.conclr()
Clears all control laws
Aswing.freeze
— Function.freeze(ipoint = 1)
Freezes geometry at current state
Aswing.geteigs
— Method.geteigs(neigen, zshift, ipnt; evmin = 1e-4, evtol = 1e-3)
Returns eigenvalues of the system
Aswing.getintervals
— Method.getintervals(ibeam::Integer)
Gets number of panels between each break point
Aswing.getstabilityderivatives
— Function.getstabilityderivatives(ipnt = 1, momref=Float64[])
Calculates stability derivatives
Aswing.getstaticmargin
— Function.getstaticmargin(ipnt::Integer=1)
Returns quasi-steady static margin, rigidized static margin, and a solution
failure flag. Assumes constraints are set up for trimmed flight and follows
the instructions in derivative_calc.txt. This function performs irreversible
changes so you will need to re-input the geometry afterwards.
Aswing.isinline
— Method.isinline(line, stringtofind, range)
checks for string within line, used in readasw
Aswing.nodeset
— Method.nodeset(intervals::AbstractArray{<:AbstractArray{<:Integer, 1},1})
Sets new number of nodes for ibeam. A custom number of panels can be used
between break points.
Aswing.parseblock
— Method.parseblock(f, line, nvalue, skip)
parses common input blocks, used in readasw
Aswing.pntsav
— Function.pntsav(file, ipnt1=1, ipnt2=ASWING.NPOINT)
Saves ASWING operating point state to a file
Aswing.readasw
— Function.readasw(filename::String)
Reads a .asw file
Aswing.readpnt
— Function.readpnt(filename::String)
Reads a .pnt file
Aswing.retainparam
— Method.retainparam()
retainparam(ipnt1::Integer)
retainparam(ipnt1::Integer, ipnt2::Integer)
Sets operating point parameters equivalent to those of the current state
Aswing.setcons
— Function.setcons(pnt::dotpnt,ipnt=1)
Inputs operating points contraints into ASWING
Aswing.setgeom
— Method.setgeom(asw::Configuration)
Inputs geometry into ASWING
Aswing.setgust
— Function.setgust(igust::Integer, params::AbstractArray{<:Real}=[-4.0,0.0,1.0,8.0,2.0,0.0])
Sets gust type and corresponding parameters
Aswing.setpars
— Function.setpars(parameters, ipnt::Integer=1)
Sets operating point parameters into ASWING
Aswing.setpnt
— Method.setpnt(point)
Inputs operating point(s) into ASWING
Aswing.setsav
— Method.setsav(file)
Saves ASWING operating point state to a file
Aswing.solvesteady
— Method.solvesteady(;repeat::Integer=0)
solvesteady(ipnt1::Integer; repeat::Integer=0)
solvesteady(ipnt1::Integer, ipnt2::Integer; repeat::Integer=0)
Quasi-steady ASWING solve. If no arguments are specified, all points are
solved.
Aswing.solveunsteady
— Function.solveunsteady(deltat::Real, ntimes::Integer)
Unsteady ASWING time-domain solve
Aswing.Beam
— Type.Beam(;number::Integer = 0, physical_index::Integer = 0, name::String = "",
spanwise_variables::SpanwiseVariables = SpanwiseVariables())
Returns struct defining a beam as defined in .asw file
Aswing.Configuration
— Type.Configuration
Returns struct containing contents of .asw configuration file
Aswing.Constants
— Type.Constants(;
sea_level_air_density::Real = 1.225,
sea_level_speed_of_sound::Real = 340.2778,
gravity::Real = 9.81)
Returns struct containing constants as defined in .asw file
Aswing.Constraints
— Type.Constraints(mode::String)
Constraints(;
linear_acceleration::AbstractArray{<:Integer,1} =
-[dparam["accel_x"],dparam["accel_y"],dparam["accel_z"]],
angular_acceleration::AbstractArray{<:Integer,1} =
-[dparam["ang_accel_x"],dparam["ang_accel_y"],dparam["ang_accel_z"]],
velocity::AbstractArray{<:Integer,1} =
-[dparam["velocity"],dparam["beta"],dparam["alpha"]],
rotation_rate::AbstractArray{<:Integer,1} =
-[dparam["ang_vel_x"],dparam["ang_vel_y"],dparam["ang_vel_z"]],
position::AbstractArray{<:Integer,1} =
-[dparam["position_x"],dparam["position_y"],dparam["position_z"]],
phi::Integer = -dparam["roll"],
theta::Integer = -dparam["pitch"],
psi::Integer = -dparam["yaw"],
flap_defl_ctrl_var::AbstractArray{<:Integer,1} =
-(dparam["flap_1"]:(dparam["flap_1"]-1+NFLPX)),
eng_pwr_ctrl_var::AbstractArray{<:Integer,1} =
-(dparam["eng_1"]:(dparam["eng_1"]-1+NENGX))
err_int_Vinf::Integer = dparam["velocity"],
err_int_beta::Integer = dparam["beta"],
err_int_alpha::Integer = dparam["alpha"],
err_int_phi::Integer = dparam["ang_vel_x"],
err_int_theta::Integer = dparam["ang_vel_y"],
err_int_psi::Integer = dparam["ang_vel_z"],
err_int_ROTxyz::AbstractArray{<:Integer,1} = [0,0,0],
err_int_VACxyz::AbstractArray{<:Integer,1} = [0,0,0])
Defines operating point constraints as done within ASWING.
Implemented modes: ["default", "anchored", "free", "static"]
Aswing.Engine
— Type.Engine(;Keng::Integer=0, IEtyp::Integer=0, Nbeam::Integer=0,
t::Real=0.0, location::AbstractArray{<:Real,1}=zeros(R,3),
thrust_direction::AbstractArray{<:Real,1}=zeros(R,3), dFdPe::Real=0.0,
dMdPe::Real=0.0, Rdisk::Real=0.0, Omega::Real=0.0, cdA::Real=0.0,
cl::Real=0.0, CLa::Real=0.0, S0::Real=0.0, C0::Real=0.0, S1::Real=0.0,
C1::Real=0.0, S2::Real=0.0, C2::Real=0.0, S3::Real=0.0, C3::Real=0.0)
Returns struct defining a single engine as defined in .asw file
Aswing.Ground
— Type.Ground(;Nbeam::Integer=0, t::Real=0.0, KGtype::Integer=0)
Returns struct defining a single ground as defined in .asw file
Aswing.Jangle
— Type.Jangle(;Njoint::Integer=0,
hinge_axis::AbstractArray{<:Real,1} = zeros(R, 3),
hinge_moment::AbstractArray{<:Real,1} = zeros(1),
hinge_angle::AbstractArray{<:Real,1} = zeros(1))
Returns struct defining a single jangle as defined in .asw file
Aswing.Joint
— Type.Joint(;Nbeam1::Integer=0, Nbeam2::Integer=0, t1::Real=0.0,
t2::Real=0.0, KJtype::Integer=0)
Returns struct defining a single joint as defined in .asw file
Aswing.OperatingPoint
— Type.OperatingPoint(;
constraints::Constraints=Constraints(),
mach_from_airspeed::Bool = false,
machpg::Real = 0.0,
ground_image::Real = 0,
parameters::Parameters = Parameters(),
wflap::AbstractArray{<:Real,1} = ones(R,NFLPX),
wpeng::AbstractArray{<:Real,1} = ones(R,NENGX))
contains operating point inputs
Aswing.Parameters
— Type.Parameters(;
linear_acceleration::AbstractArray{<:Real,1} = zeros(R,3),
angular_acceleration::AbstractArray{<:Real,1} = zeros(R,3),
velocity::Real = 0.0,
beta::Real = 0.0,
alpha::Real = 0.0,
rotation_rate::AbstractArray{<:Real,1} = zeros(R,3),
position::AbstractArray{<:Real,1} = zeros(R,3),
phi::Real = 0.0,
theta::Real = 0.0,
psi::Real = 0.0,
flap_defl_ctrl_var::AbstractArray{<:Real,1} = zeros(R,NFLPX),
eng_pwr_ctrl_var::AbstractArray{<:Real,1} = zeros(R,NENGX),
sum_force::AbstractArray{<:Real,1} = zeros(R,3),
sum_mom::AbstractArray{<:Real,1} = zeros(R,3),
lift::Real = 0.0,
climb_angle::Real = 0.0,
radial_acceleration::Real = 0.0,
usr1::Real = 0.0,
usr2::Real = 0.0,
least_squared::Real = 0.0)
Defines operating point parameters as done within ASWING.
Aswing.ReferenceValues
— Type.ReferenceValues(;area::Real = 1.0, chord::Real = 1.0, span::Real = 1.0,
momref::AbstractArray{<:Real,1} = zeros(R,3),
velref::AbstractArray{<:Real,1} = zeros(R,3),
accelref::AbstractArray{<:Real,1} = zeros(R,3))
Returns struct containing reference values as defined in .asw file
Aswing.Sensor
— Type.Sensor(;Ksens::Integer = 0, Nbeam::Integer = 0, t::Real=0.0,
location::AbstractArray{<:Real,1} = zeros(R,3),
V::AbstractArray{<:Real,1} = zeros(R,3),
A::AbstractArray{<:Real,1} = zeros(R,3))
Returns struct defining a single sensor as defined in .asw file
Aswing.SpanwiseVariables
— Type.SpanwiseVariables(; <keyword arguments>)
Returns struct defining the spanwise properties of a beam as defined in
.asw file
The first column of each variable is the t-value
The second column is the variable value corresponding to that t-value
Aswing.Strut
— Type.Strut(;Nbeam::Integer=0, t::Real=0.0,
location::AbstractArray{<:Real,1}=zeros(R,3),
anchor_location::AbstractArray{<:Real,1}=zeros(R,3), dLo::Real=0.0,
EAw::Real=0.0)
Returns struct defining a single strut as defined in .asw file
Aswing.Weight
— Type.Weight(;Nbeam::Integer=0, t::Real=0.0,
location::AbstractArray{<:Real,1}=zeros(R,3), weight::Real=0.0,
CDA::Real=0.0, vol::Real=0.0, Ho::AbstractArray{<:Real,1}=zeros(R,3),
Ixx::Real=0, Iyy::Real=0, Izz::Real=0, Ixy::Real=0, Ixz::Real=0, Iyz::Real=0)
Returns struct defining a single point mass as defined in .asw file