fh

Classes

fh.PoolWaitbar

class fh.PoolWaitbar

Bases: handle

POOLWAITBAR implements a waitbar for parrallel process taken from Edric Ellis post in the forum https://uk.mathworks.com/ matlabcentral/answers/465911-parfor-waitbar-how-to-do-this-more-cleanly

Constructor Summary
PoolWaitbar(N, message)
Method Summary
delete()
increment()

fh.tpapSpline

class fh.tpapSpline

TPAPSPLINE Summary of this class goes here Detailed explanation goes here

Constructor Summary
tpapSpline(Xs, res_modeshape, GIDs, N_modes, smoothParam)
Property Summary
Nmodes
V
n
p
sts
Method Summary
get_G(Xs, DoFs, idx)
get_projection(Xs, opts)

Functions

fh.AddUntillFull

fh.AddUntillFull(vals, gap)

fh.LoadRun

fh.LoadRun(RunData, opts)

fh.LoadRunNumber

fh.LoadRunNumber(runNumber, opts)

fh.OneMinusCosine

fh.OneMinusCosine(f, delay, t)

fh.Wedge

fh.Wedge(v)

fh.atmos

fh.atmos(h, varargin)
ATMOS Find gas properties in the 1976 Standard Atmosphere.

[rho,a,T,P,nu,z,sigma] = ATMOS(h,varargin)

ATMOS by itself gives atmospheric properties at sea level on a standard day.

ATMOS(h) returns the properties of the 1976 Standard Atmosphere at geopotential altitude h, where h is a scalar, vector, matrix, or ND array.

The input h can be followed by parameter/value pairs for further control of ATMOS. Possible parameters are:

tOffset - Returns properties when the temperature is tOffset degrees

above or below standand conditions. h and tOffset must be the same size or else one must be a scalar. Default is no offset. Note that this is an offset, so when converting between Celsius and Fahrenheit, use only the scaling factor (dC/dF = dK/dR = 5/9).

tAbsolute - Similar to tOffest, but an absolute air temperature is

provided (°K or °R) instead of an offset from the standard temperature. Supersedes tOffset if both are provided.

altType - Specify type of input altitude, either ‘geopotential’ (h)

or ‘geometric’ (z). Default altType = ‘geopotential’.

structOutput - When set, ATMOS produces a single struct output with fields

rho, a, T, P, nu, and either z or h (whichever complements input altType). Default structOutput = false.

units - String for units of inputs and outpus, either ‘SI’

(default) or ‘US’. This is ignored if the provided input h is a DimVar, in which case all outputs are also DimVars and expected tOffset is either a DimVar or in °C/°K.

Description: SI: US:

Input: ————– —– —–

h | z Altitude or height m ft tOffset Temp. offset °C/°K °F/°R

Output: ————– —– —–

rho Density kg/m^3 slug/ft^3 a Speed of sound m/s ft/s T Temperature °K °R P Pressure Pa lbf/ft^2 nu Kinem. viscosity m^2/s ft^2/s z | h Height or altitude m ft sigma Density ratio - -

ATMOS returns properties the same size as h and/or tOffset (P does not vary with temperature offset and is always the size of h).

Example 1: Find atmospheric properties at every 100 m of geometric height for an off-standard atmosphere with temperature offset varying +/- 25°C sinusoidally with a period of 4 km.

z = 0:100:86000; [rho,a,T,P,nu,h,sigma] = atmos(z,’tOffset’,25*sin(pi*z/2000),…

‘altType’,’geometric’);

semilogx(sigma,h/1000) title(‘Density variation with sinusoidal off-standard atmosphere’) xlabel(‘Density ratio, sigma’); ylabel(‘Geopotential altitude (km)’)

Example 2: Create tables of atmospheric properties up to 30,000 ft for a cold (-20°C), standard, and hot (+20°C) day with columns [h(ft) z(ft) rho(slug/ft³) sigma a(ft/s) T(R) P(psf) µ(slug/ft-s) nu(ft²/s)] leveraging n-dimensional array capability.

[~,h,dT] = meshgrid(0,-5000:1000:30000,[-20 0 20]); [rho,a,T,P,nu,z,sigma] = atmos(h,’tOffset’,dT*9/5,’units’,’US’); t = [h z rho sigma a T P nu.*rho nu]; format short e varNames = {‘h’ ‘z’ ‘rho’ ‘sigma’ ‘a’ ‘T’ ‘P’ ‘mu’ ‘nu’}; ColdTable = array2table(t(:,:,1),’VariableNames’,varNames) StandardTable = array2table(t(:,:,2),’VariableNames’,varNames) HotTable = array2table(t(:,:,3),’VariableNames’,varNames)

Example 3: Use the unit consistency enforced by the DimVar class to find the SI dynamic pressure, Mach number, Reynolds number, and stagnation temperature of an aircraft flying at flight level FL500 (50000 ft) with speed 500 knots and characteristic length of 80 inches.

V = 500*u.kts; c = 80*u.in; o = atmos(50*u.kft,’structOutput’,true); Dyn_Press = 1/2*o.rho*V^2; M = V/o.a; Re = V*c/o.nu; T0 = o.T*(1+(1.4-1)/2*M^2);

This model is not recommended for use at altitudes above 86 km geometric height (84852 m / 278386 ft geopotential) but will attempt to extrapolate above 86 km (with a lapse rate of 0°/km) and below 0.

See also ATMOSISA, ATMOSNONSTD, TROPOS, DENSITYALT ,

U - http://www.mathworks.com/matlabcentral/fileexchange/38977.

[rho,a,T,P,nu,z,sigma] = ATMOS(h,varargin) Copyright 2015 Sky Sartorius www.mathworks.com/matlabcentral/fileexchange/authors/101715

References: ESDU 77022; www.pdas.com/atmos.html

User-customizable defaults:

fh.ax2norm

fh.ax2norm(x, y)

fh.calibrated_airspeed

fh.calibrated_airspeed(Mach, P, P_s, a_s, gamma)

CAS get the calibrated airspeed for a given Mach and pressure INPUTS: - Mach: Mach number to calculate calibrated airspeed at - P: ambient pressure to calculate airspeed at - P_s: reference pressure (sea level) - gamma: specfic heat ratio

fh.combvec

fh.combvec(varargin)

COMBVEC Summary of this function goes here Detailed explanation goes here

fh.customcolormap

fh.customcolormap(positions, colors, m)

Error detection and defaults

fh.customcolormap_preset

fh.customcolormap_preset(preset_name)

fh.equivelent_true_airspeed

fh.equivelent_true_airspeed(p, rho, p_0, rho_0, gamma, CAS)

EQUIVELENT_TRUE_AIRSPEED Summary of this function goes here Detailed explanation goes here

fh.gem

fh.gem(fold, u, root_aoa, beta, flare, sweep, dihedral, hinge_setting_angle)

fh.gen_1MC

fh.gen_1MC(f, A, tStart, t)

GEN_1MC Summary of this function goes here Detailed explanation goes here

fh.get_flutter_speed

fh.get_flutter_speed(data, opts)

fh.lbmap

fh.lbmap(n, scheme)

LBMAP Returns specified Light-Bertlein colormap.

LBMAP(N,SCHEME) returns an Nx3 colormap. SCHEME can be one of the following strings:

‘Blue’ Single-hue progression to purlish-blue (default) ‘BlueGray’ Diverging progression from blue to gray ‘BrownBlue’ Orange-white-purple diverging scheme ‘RedBlue’ Modified spectral scheme

If N is not specified, the size of the colormap is determined by the current figure. If no figure exists, MATLAB creates one.

Example 1: 7-color single-hue blue (default)

load penny imagesc(P) colormap(lbmap(7)) colorbar

Example 2: 11-color modified spectrum

load penny imagesc(P) colormap(lbmap(11,’RedBlue’)) colorbar

See also HSV, GRAY, HOT, BONE, COPPER, PINK, FLAG, COLORMAP, RGBPLOT.

fh.linspaceConstrained

fh.linspaceConstrained(xs, N)

fh.mode_tracking

fh.mode_tracking(data, opts)

fh.naca4gen

fh.naca4gen(iaf)

“naca4gen” Generates the NACA 4 digit airfoil coordinates with desired no. of panels (line elements) on it.

Author : Divahar Jayaraman (j.divahar@yahoo.com)

INPUTS——————————————————————-
iaf.designation = NACA 4 digit iaf.designation (eg. ‘2412’) - STRING !

iaf.n = no of panels (line elements) PER SIDE (upper/lower)

iaf.HalfCosineSpacing = 1 for “half cosine x-spacing”

= 0 to give “uniform x-spacing”

iaf.wantFile = 1 for creating airfoil data file (eg. ‘naca2412.dat’)

= 0 to suppress writing into a file

iaf.datFilePath = Path where the data file has to be created

(eg. ‘af_data_folder/naca4digitAF/’) use only forward slash ‘/’ (Just for OS portability)

OUTPUTS—————————————————————— Data::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

     af.x = x cordinate (nx1 array)
     af.z = z cordinate (nx1 array)
    af.xU = x cordinate of upper surface (nx1 array)
    af.zU = z cordinate of upper surface (nx1 array)
    af.xL = x cordinate of lower surface (nx1 array)
    af.zL = z cordinate of lower surface (nx1 array)
    af.xC = x cordinate of camber line (nx1 array)
    af.zC = z cordinate of camber line (nx1 array)
  af.name = Name of the airfoil
af.header = Airfoil name ; No of panels ; Type of spacing
            (eg. 'NACA4412 : [50 panels,Uniform x-spacing]')

File::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: First line : Header eg. ‘NACA4412 : [50 panels,Half cosine x-spacing]’ Subsequent lines : (2*iaf.n+1) rows of x and z values

Typical Inputs::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: iaf.designation=’2312’; iaf.n=56; iaf.HalfCosineSpacing=1; iaf.wantFile=1; iaf.datFilePath=’./’; % Current folder iaf.is_finiteTE=0;

fh.parsave

fh.parsave(filename, res)

fh.print_decimal

fh.print_decimal(x)

fh.pubFig

fh.pubFig(opts)

fh.send_mail_outlook

fh.send_mail_outlook(to, subject, body, attachments)

fh.signal_damping

fh.signal_damping(x, env_win, mean_win, Fs)

SIGNAL_DAMPING Summary of this function goes here Detailed explanation goes here

fh.true_airspeed

fh.true_airspeed(M, a, T, T_s)

CAS get the true airspeed for a given Mach and pressure INPUTS: - Mach: Mach number to calculate calibrated airspeed at - T: ambient tempeture to calculate airspeed at - T_s: reference temperature (sea level) - gamma: specfic heat ratio