Object Classes, Properties, and Methods

Blade Class

class BladeDef

BladeDef A class definition for wind & water turbine blades.

Example

blade = BladeDef();

See also BladeDef_to_NuMADfile, xlsBlade, AirfoilDef, StationDef, ComponentDef, StackDef

Property Summary
aerocenter

Aerodynamic center of airfoil (used only by NuMAD->FAST)

chord

Chord distribution [m]

chordoffset

Chordwise offset (in addition to natural offset)

components

Blade components such as spar, panels, etc., refer to ComponentDef

degreestwist

Twist distribution [degrees]

ispan

Spanwise locations of interpolated output

leband

Location of keypoint a

materials

Material properties, refer to MaterialDef

mesh

Approximate element edge size for FE model [m]

naturaloffset

Integar : 1= offset by max thickness location, 0= do not offset to max thickness

percentthick

Percent thickness of airfoil [%]

prebend

Blade prebend, reference axis location along x2 [m]

rotorspin

Integar: Rotor Spin, 1= CW rotation looking downwind, -1= CCW rotation

span

Spanwise location of distributed properties [m]

sparcapoffset

1 × 2 array. (Does Nothing)

sparcapwidth

Locations of keypoints b & c, defines distance between keypoints b & c [mm]. First entry is the HP spar cap. Second entry is the LP spar cap

stations

Blade Stations, define the camber and thickness along the blade, refer to StationDef`

sweep

Blade Sweep, Reference axis location along x1 [m]

swtwisted

Integar : Shear Web, 0 = planar shear webs, 1= shear webs twisted by blade twist

teband

Location of keypoint d

idegreestwist

(read-only) interpolated twist

ichord

(read-only) interpolated chord

ipercentthick

(read-only) interpolated thickness

ichordoffset

(read-only) interpolated offset

iaerocenter

(read-only) interpolated aerocenter

isweep

(read-only) interpolated sweep

iprebend

(read-only) interpolated prebend

xoffset

(read-only) natural offset

profiles

(read-only) normalized airfoil profiles

geometry

(read-only) actual x,y,z geometry

arclength

(read-only) surface distance from L.E.

cpos

(read-only) chordwise position

Method Summary
checkNaturalOffset()

This method checks naturaloffset values

checkRotorSpin()

This method checks rotorspin values

checkSwtwisted()

This method checks swtwisted values

addStation(af, spanlocation)

This method adds a station

Example

blade.addStation(af,spanlocation) where af = airfoil filename or AirfoilDef object

addComponent(comp)

This method adds a Component

Example

blade.addComponent(comp_struct) where comp_struct = input structure used by ComponentDef

addMaterial(mat)

This method adds Material

Example

blade.addMaterial(mat_struct) where mat_struct = input structure used by MaterialDef

updateBlade()

This method updates the BladeDef model

updateGeometry()

This method updates the interpolated blade parameters

updateKeypoints()

This method updates the keypoints (a,b,c,…) which define the blade regions.

Example

blade.updateKeypoints

updateBOM()

This method updates the Bill-of-Materials Cell array columns of blade.bom: 1. Layer # 2. Material ID 3. Component or region name 4. Begin station (m) 5. End station (m) 6. Max width (m) 7. Average width (m) 8. 3D area (m^2) 9. Layer thickness (mm) 10. Computed dry layer weight (g)

readYAML(file)

This method calls a separate matlab function, sends the YAML file (‘file’) and blade object (‘obj’), and returns the blade object generated using the YAML file converter

writeYAML(file)

This method calls a separate matlab function to write the the Blade Object (‘obj’) to a YAML file (‘file’)

generateBeamModel()

This method generates blade sectional properties used for aeroelastic analyses

shellMeshGeneral(forSolid, includeAdhesive)

This method generates a finite element shell mesh for the blade, based on what is stored in blade.geometry, blade.keypoints, and blade.profiles. Element sets are returned corresponding to blade.stacks and blade.swstacks

getSolidMesh(layerNumEls)

Edit stacks to be usable for 3D solid mesh

generateShellModel(feaCode, includeAdhesive, varargin)

This method generates a shell FEA model in one of the supported FEA codes; w/ or w/o adhesieve

writeBOMxls(file)

This method writes the bill-of-materials out to a spreadsheet.

Example

bladeDef.writeBOMxls('bom.xlsx')

writePlot3D(file, breakpoints)

Write the current blade geometry in Plot3D format. breakpoints is a list of chord fractions at which the surface geometry is divided into blocks

Examples

BladeDef.writePlot3D(filename,[breakpoints])

BladeDef.writePlot3D('file.p3d',[-.3, .3]);

downsampleProfile(k, n_points)

ble: can this be deleted?? Doesn’t precisely control the number of points. replace with resampleAirfoil_ble currently used by BladeDef_to_NuMADfile and develop__write_shell7

plotprofile(k)

This method plots profiles

Examples

blade.plotprofile(1);

blade.plotprofile(1:N);

findLayerExtents(layerDist, layerN)

This method…

findRegionExtents(keylabels, comp)

This method…

getTEtype(xy)

This method…

fprintf_matrix(fid, matrixData, columnsPerLine)

This method…

Material Class

class MaterialDef(mat)

MaterialDef A class definition for blade materials.

Examples

mat_obj = ComponentDef();

See also xlsBlade, BladeDef, BladeDef.addMaterial

Property Summary
name

User selected name of the material

type

Two options: ‘isotropic’ or ‘orthotropic’

layerthickness

Layer thickness [mm]

ex

Longitudinal elastic modulus [Pa]

ey

Transverse elastic modulus [Pa]

ez

Through-the-thickness elastic modulus in the principal material coordinates [Pa]

gxy

In-plane shear modulus [Pa]

gyz

Transverse shear modulus [Pa]

gxz

Transverse shear modulus [Pa]

prxy

In-plane Poisson ratio [ ]

pryz

Transverse Poisson ratio [ ]

prxz

Transverse Poisson ratio [ ]

density

Cured mass density [kg/m2]

drydensity

Density of fabric

uts

1 × 3 array of ultimate tensile strength design values. Sequence: SL , ST, Sz, 1 × 1 for isotropic.

ucs

1 × 3 array of ultimate compressive strength design values. Sequence: SL , ST, Sz, 1 × 1 for isotropic.

uss

1 × 3 array of ultimate shear strength design values. Sequence: SLT , STz, SLz, 1 × 1 for isotropic.

xzit

Lz tensile inclination parameter for Puck failure index

xzic

Lz compressive inclination parameter for Puck failure index

yzit

Tz tensile inclination parameter for Puck failure index

yzic

Tz compressive inclination parameter for Puck failure index

g1g2

Fracture toughness ratio between GI (mode I) and GII (mode II) [ ]

alp0

Fracture angle under pure transverse compression [degrees]

etat

Transverse friction coefficient for Larc [ ]

etal

Longitudinal friction coefficient for Larc [ ]

m

Fatigue slope exponent [ ]

gamma_mf

from DNL-GL standard, fatigue strength reduction factor

gamma_ms

from DNV-GL standard, short term strength reduction factor

reference

Station Class

class StationDef(af)

StationDef A class definition for blade stations.

Examples

sta = StationDef();

sta = StationDef(af); where af = airfoil filename or AirfoilDef object

See also xlsBlade, BladeDef, BladeDef.addStation

Property Summary
airfoil

AirfoilDef object

spanlocation

Spanwise location where station is defined [m]

Component Class

class ComponentDef(comp)

ComponentDef A class definition for blade components.

Examples

comp_obj = ComponentDef();

comp_obj = ComponentDef(comp_struct);

See also xlsBlade, BladeDef, BladeDef.addComponent

Property Summary
group

Integar: 0 = blade, 1 = first shear web, 2 = second shear web, etc.

name

String: Name, such as ‘spar’

materialid

String: Material id number from blade.materials

fabricangle

Float: Fiber angle

hpextents

String Array: Array of keypoints such as {‘b’,’c’}

lpextents

String Array: Array of keypoints such as {‘b’,’c’}

cp

control points defining layer distribution

imethod

String: imethod

Airfoil Class

class AirfoilDef(filename)

AirfoilDef A class definition for airfoil profiles.

Examples

af = AirfoilDef();

af = AirfoilDef(FILENAME); where FILENAME is the file containing airfoil profile data in various

2-column formats including NuMAD-xml

See also AirfoilDef.resample, AirfoilDef.writeAirfoil, AirfoilDef.convertAirfoil, AirfoilDef.plot xlsBlade, BladeDef, StationDef

Property Summary
name

String: User selected airfoil name

reference

Header info in file

coordinates

Profile data in two columns

c

Computed by NuAMD

camber

Camber line as a function of x. Distance in percent chord between LP and HP curves. Computed by NuAMD.

thickness

Float: Relative thickness as a function of the x coordinate. Values between 0 and 1, where 1 corresponds to maximum thickness. Computed by NuAMD.

percentthick

Float: Maximum airfoil thickness as a percentage of chord length [%]

maxthick

Float: Airfoil thickness as a percentage of chord. Values between 0 and 1.

TEtype

String: Options, ‘round', 'sharp', or 'flat'

x

Horizontal axis of Airfoil shape coordinates Working clockwise starting from the TE to the LE and back to the TE. LE must be at (1,0) and TE at (0,0). Needed only by AirfoilDef.plot

y

Vertical axis of Airfoil shape coordinates Working clockwise starting from the TE to the LE and back to the TE. LE must be at (1,0) and TE at (0,0). Needed only by AirfoilDef.plot

Method Summary
resample(n_samples, spacing)
af.resample(n_samples,spacing)

spacing = ‘auto’ | ‘half-cosine’ | ‘cosine’

af.resample(200,’half-cosine’);

adjustTE(tet, tes, onset)
af.adjustTE(TE_thick,[TE_slope],[onset])

TE_thick is the amount of TE thickness to add TE_slope is the slope of the added thickness profile at TE,

defaults to 5/3 * TE_thick

onset is the chord fraction where adjustment begins,

defaults to location of max thickness

af.adjustTE(0.02); af.adjustTE(0.02,0); af.adjustTE(0.02,[],0.8);

writeAirfoil(filename, fileformat)
af.writeAirfoil(FILENAME,fileformat)
fileformat = ‘xfoil’ | ‘rfoil’ | ‘selig’

= ‘xfoil-reverse’ | ‘rfoil-reverse’ = ‘numad’ = ‘lednicer’

af.writeAirfoil(‘af-test.txt’,’xfoil’);

plot()

plot(af) Plots an AirfoilDef object (or an array of them)

static convertAirfoil(INFILE, OUTFILE, fileformat)
fileformat = ‘xfoil’ | ‘rfoil’ | ‘selig’

= ‘xfoil-reverse’ | ‘rfoil-reverse’ = ‘numad’ = ‘lednicer’

AirfoilDef.convertAirfoil(‘airfoils/e205.dat’,’af-test.txt’,’xfoil’)

Stack Class

class StackDef

StackDef A class definition for a stack of composite layers.

Examples

stack = StackDef();

See also xlsBlade, BladeDef, BladeDef.updateBOM

Property Summary
name

String: Name of the stack or composite material used by NuMAD, e.g. '000000_HP_LE_PANEL'

plygroups

Array: Array of ply structures, one for each ply, plygroups = struct('component','','materialid',[],'thickness',[],'angle',[],'nPlies',[])

indices

Indices of stack, [in board station, out board station, 1st kepoint, 2nd keypoint], e.g. [ibSta,obSta,keypt1,keypt2]

Method Summary
addply(ply)

This method adds ply to Stack

Example

StackDef.addply(ply)

where

ply = struct('component','',...  % parent component

'materialid',[],... % materialid of ply

'thickness',[],...  % thickness [mm] of single ply

'angle',[],...      % ply angle

'nPlies',[]);       % number of plies

IEC Class

class IECDef(fileName)

IECDef A class definition for IEC input parameters

Example

IEC = IECDef(inputFile);

Constructor Summary
IECDef(fileName)

This method initilizes IECDef and creates a IEC object. :returns: IEC – IECDef object :rtype: obj

Property Summary
avgws

Average wind speed, Default = [] (m/s)

BldGagNd

Vector of length 7; blade gage nodes (corresponding to aerodyn nodes) for moment (strain) gages in FAST computations

combinedStrain

perform fatigue calculations on combined bending and normal strain for spar, Default = 1

seeds

random seeds

simulate

On/Off flag, Options: 1 = call FAST and perform simulations, 0 = process existing data, Default = []

Class

Turbine Class, Options: 1, 2, 3, Default = 3

delay

Simulation delay, discardedsimulated data at the beginning of each simulation (turbulent and otherwise), Default = 29 (s)

designLife

Years of life

fastsim

Fast simulation, Options: ‘fast’, ‘fast simulink’, ‘adams’, Default: ‘fast’

fatigueCriterion

Fatigue Criteria, Options: ‘Shifted Goodman’

fatigueStress

stress to use for fatigue failure

fstfn

FAST path, Default = “NOT DEFINED”

fullLoads

Perform full loads analysis, Options: 1 = On, 0 = Off, Default = 1

gageSetCase

Gage set case, Options= ‘set1’, ‘set 2’, Default = ‘set1’

lin

Range of steady wind speeds for linearizations, Default = 10

matData

List of material objects, with properties relavent to IEC fatigue analysis

momentMaxRotation

Angular discretization for coordinate rotation and maxima moment calculation (used for fatigue and ultimate) (deg)

nondimFlag

Flag indicating non-dimensionality in plotCampbell() function

numadfn

NuMAD path, including extension, Default = “NOT DEFINED”

NumGrid

Number of grid points in turbsim 4-D wind field, Default = 10

numSeeds

Number of seeds - number of 10-minute simulations - for turbulent simulations

operatingPoints

Operating Points: [Cutin RatedSpeed CutOut], Defaults = [0 0 0]

parDir

Directory, Default = ‘’;

ratedSpeed

Rated speed (rpm)

sf_fat

Total fatigue safety factor, Default = 0

sf_uts

Total ultimate strength safety factor, Default = 0

sf_tow

Total tower clearance safety factor, Default = 0

SimTime

Total simulation time, for a given run Default = 600 (s)

simtime

Total simulation time for a set of seeds, for rain-cycle counting

simulinkModel

Simulink model file, Default = “NOT DEFINED”

simulinkModelFolder

Simulink model directory, Default = “NOT DEFINED”

TurbClass

Turbulence Class, Options: ‘A’, ‘B’, ‘C’, Default = ‘C’

ws

Range of mean wind speeds for turbulent simulations (m/s)

wd

Range of “wind direction” bias for look-up table simulations - programmed as yaw position (units)

yaw

Intentional yaw misalignment, degrees (for DLC 1.1)

Method Summary
checkInputs()

This method checks NuMAD user inputs and generates error messages if parameters are not properly defined.

setAvgWindSpeed()

This method sets the average wind speed based on the obj.Class

setSimFlag(simFlag)

This method sets the simulate flag

setBladeGageCoordinateRotation(simFlag)

This method sets the blade gage coordinate roation

setGageLabels(fst, ad)

This method sets the blade gage labels

runFullLoads()

This methods runs the full loads analysis if specified

setRandomSeeds()

This method setd random seeds

saveOuput()

consider moving runIEC scripts to save output to this method

Polar Class

class PolarDef(filedescrip, fileformat)

PolarDef A class definition for airfoil polar data.

Examples

pol = PolarDef();

pol = PolarDef(FILENAME);

Where FILENAME is the file containing airfoil polar data

pol.rawlist is the data column names

pol.param is groups of Key=Value parameter structures

See also AirfoilDef, xlsBlade, BladeDef, StationDef

Constructor Summary
PolarDef(filedescrip, fileformat)

Initialize the “intrisic” properties structure

Property Summary
file

stucture describing data file

source

source of data (cell array of strings)

titleLine

title line from file

notes

notes from file; user may add more cells manually

param

grouped parameters (source, AeroDyn, …)

rawlist

data column names for rawdata

rawdata

polar data, raw from source

modopts

options used to modify polar data

modlist

data column names for moddata

moddata

polar data, modified

Method Summary
getRawData(xvar)

x = obj.getRawData(VARNAME); where 'VARNAME' is a string from obj.rawlist and matching is not case sensitive (‘CL’==’cl’)

Example

x = obj.getRawData('alpha');

getModData(xvar)

x = obj.getModData(VARNAME); where 'VARNAME' is a string from obj.modlist and matching is not case sensitive (‘CL’==’cl’)

Example

x = obj.getModData('alpha');

plotRaw(xvar, yvar, varargin)

obj.plotRaw(XVAR,YVAR); where 'XVAR' and 'YVAR' are strings from obj.rawlist

Example

obj.plotRaw('alpha','CL');

plotMod(xvar, yvar, varargin)

obj.plotMod(XVAR,YVAR); where 'XVAR' and 'YVAR' are strings from obj.modlist

Example

obj.plotMod('alpha','CL');

addModOpts(varargin)

OPTIONS for '3DStall':

ModType = '3DStall'

RPM = rotor speed in rpm

R = rotor radius R

V = wind speed

rOverR = r/R location of airfoil section

Chord = chord at r/R

AlphaEnd = end of correction

AlphaTrend = [minAlpha maxAlpha] for CL slope calc

OPTIONS for 'Extrap':

ModType = 'Extrap'

CDMax = maximum drag coefficient in extrapolation

UseCM = use CM data (if available)

AlphaFP = (optional) Get CD from flat-plate theory for abs(angle) > AlphaFP. Viterna method (recommended) used when AlphaFP not set or empty [].

OPTIONS for 'DynStall':

ModType = 'DynStall'

StallAngle = stall angle in degrees

NegStallCn = Cn at stall for negative angle of attack

AlphaTrend = [minAlpha maxAlpha] for CN slope calc

OPTIONS for 'Resample':

ModType = 'Resample'

Alpha = array of Alpha values

method = interpolation method: 'linear', 'spline', 'pchip'

apply3DStall(mopts)

obj.apply3DStall(mopts)

Example

mopts = struct('RPM',12,'R',35,'V',8,'rOverR',0.9,'Chord',1.2,'AlphaEnd',14,'AlphaTrend',[0 5])

interp1(X, Xq, alpha1, alpha3)

X: interpolation variable (one for each airfoil) Xq: query points at which polars are to be interpolated

static recolorplot(StackIndex, ColorOrder)

recolorplot(StackIndex,ColorOrder) where StackIndex specifies which axes children to change (Note that the last child to be added shows up first on the “stack”) ColorOrder is the list of colors to use Modify last six axes children (top six on stack):

Example

recolorplot(1:6,jet(6));