Library

Public API

Internal API

Aswing.aswsavMethod.
aswsav(file)
Saves ASWING geometry state to a file
source
Aswing.conaddMethod.
conadd(i,j,ls,gfac,c)
Sets up a proportional control law
source
Aswing.conclrMethod.
conclr()
Clears all control laws
source
Aswing.freezeFunction.
freeze(ipoint = 1)
Freezes geometry at current state
source
Aswing.geteigsMethod.
geteigs(neigen, zshift, ipnt; evmin = 1e-4, evtol = 1e-3)
Returns eigenvalues of the system
source
getintervals(ibeam::Integer)
Gets number of panels between each break point
source
getstabilityderivatives(ipnt = 1, momref=Float64[])
Calculates stability derivatives
source
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.
source
Aswing.isinlineMethod.
isinline(line, stringtofind, range)

checks for string within line, used in readasw
source
Aswing.nodesetMethod.
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.
source
Aswing.parseblockMethod.
parseblock(f, line, nvalue, skip)

parses common input blocks, used in readasw
source
Aswing.pntsavFunction.
pntsav(file, ipnt1=1, ipnt2=ASWING.NPOINT)
Saves ASWING operating point state to a file
source
Aswing.readaswFunction.
readasw(filename::String)

Reads a .asw file
source
Aswing.readpntFunction.
readpnt(filename::String)

Reads a .pnt file
source
Aswing.retainparamMethod.
retainparam()
retainparam(ipnt1::Integer)
retainparam(ipnt1::Integer, ipnt2::Integer)
Sets operating point parameters equivalent to those of the current state
source
Aswing.setconsFunction.
setcons(pnt::dotpnt,ipnt=1)
Inputs operating points contraints into ASWING
source
Aswing.setgeomMethod.
setgeom(asw::Configuration)

Inputs geometry into ASWING
source
Aswing.setgustFunction.
setgust(igust::Integer, params::AbstractArray{<:Real}=[-4.0,0.0,1.0,8.0,2.0,0.0])
Sets gust type and corresponding parameters
source
Aswing.setparsFunction.
setpars(parameters, ipnt::Integer=1)
Sets operating point parameters into ASWING
source
Aswing.setpntMethod.
setpnt(point)
Inputs operating point(s) into ASWING
source
Aswing.setsavMethod.
setsav(file)
Saves ASWING operating point state to a file
source
Aswing.solvesteadyMethod.
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.
source
Aswing.solveunsteadyFunction.
solveunsteady(deltat::Real, ntimes::Integer)
Unsteady ASWING time-domain solve
source
Aswing.BeamType.
Beam(;number::Integer = 0, physical_index::Integer = 0, name::String = "",
    spanwise_variables::SpanwiseVariables = SpanwiseVariables())

Returns struct defining a beam as defined in .asw file
source
Configuration

Returns struct containing contents of .asw configuration file
source
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
source
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"]
source
Aswing.EngineType.
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
source
Aswing.GroundType.
Ground(;Nbeam::Integer=0, t::Real=0.0, KGtype::Integer=0)

Returns struct defining a single ground as defined in .asw file
source
Aswing.JangleType.
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
source
Aswing.JointType.
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
source
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
source
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.
source
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
source
Aswing.SensorType.
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
source
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
source
Aswing.StrutType.
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
source
Aswing.WeightType.
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
source