mni.bulk

Classes

mni.bulk.AeroPanel

class mni.bulk.AeroPanel

Bases: mni.bulk.BulkData

AeroPanel Describes a collection of aerodynamic panels.

The definition of the ‘AeroPanel’ object matches that of the CAERO1 bulk data type from MSC.Nastran.

Valid Bulk Data Types:
  • ‘CAERO1’

Constructor Summary
AeroPanel(varargin)

Initialise the bulk data sets

Property Summary
PanelForce
PanelPressure
XDir
Method Summary
assignH5BulkData(bulkNames, bulkData)

assignH5BulkData Assigns the object data during the import from a .h5 file.

drawElement(FEModel, hAx, varargin)

drawElement Draws the AeroPanel object as a single patch object and returns a single graphics handle for all AeroPanels in the collection.

getPanelData(X_dir, varargin)
get_pressure()
patchDelete(~, ~)
static pressure2color(p)
quiverDelete(~, ~)
updateElement(varargin)

Grab the panel data

mni.bulk.AeroelasticSpline

class mni.bulk.AeroelasticSpline

Bases: mni.bulk.BulkData

AeroelasticSpline

Constructor Summary
AeroelasticSpline(varargin)

Initialise the bulk data sets

Method Summary
drawElement(FEModel, hAx)

mni.bulk.AnalysisData

class mni.bulk.AnalysisData

Bases: mni.bulk.BulkData

AnalysisData Describes a bulk dat entry which specifies data for a finite element analysis.

Valid Bulk Data Types:
  • ‘AERO’

  • ‘EIGR’

  • ‘EIGRL’

  • ‘FLUTTER’

  • ‘FREQ1’

  • ‘RANDPS’

  • ‘MKAERO1’

Constructor Summary
AnalysisData(varargin)

Initialise the bulk data sets

Method Summary
assignH5BulkData(bulkNames, bulkData)

assignH5BulkData Assigns the object data during the import from a .h5 file.

parseH5DataGroup(h5Struct)

parseH5DataGroup Parse the data in the h5 data group ‘h5Struct’ and return the bulk names and data.

mni.bulk.Beam

class mni.bulk.Beam

Bases: mni.bulk.BulkData

Beam Describes a 1D element between 2 Nodes.

The definition of the ‘Beam’ object matches that of the CBEAM bulk data type from MSC.Nastran.

Valid Bulk Data Types:
  • ‘CBEAM’

  • ‘CBAR’

  • ‘CROD’

Constructor Summary
Beam(varargin)

Initialise the bulk data sets

Property Summary
ValidOffsetToken
Method Summary
assignH5BulkData(bulkNames, bulkData)

assignH5BulkData Assigns the object data during the import from a .h5 file.

drawElement(FEModel, hAx, varargin)

drawElement Draws the beam objects as a line object between the nodes and returns a single handle for all the beams in the collection.

updateElement(varargin)
validateOFFT(val, prpName, varargin)

mni.bulk.BeamProp

class mni.bulk.BeamProp

Bases: mni.bulk.BulkData

BeamProp Describes the properties of a bulk.Beam object.

The definition of the ‘BeamProp’ object matches that of the PBEAM bulk data type from MSC.Nastran.

Valid Bulk Data Types:
  • ‘PBEAM’

  • ‘PBAR’

  • ‘PROD’ - TODO

Constructor Summary
BeamProp(varargin)

Initialise the bulk data sets

Method Summary
assignH5BulkData(bulkNames, bulkData)

assignH5BulkData Assigns the object data during the import from a .h5 file.

assignPBeamData(propData, index, BulkMeta)

assignPBeamData Assigns data for a PBeam entry to the object.

Assumption: The PBEAM data is always fully populated i.e. has 48 sets of data and only one continuation entry.

mni.bulk.BulkData

class mni.bulk.BulkData

Bases: mni.mixin.Entity, mni.mixin.Dynamicable

BulkData Base-class of all bulk data objects.

TODO: Think about how to handle bulk data types where a particular row/column can have a different property name depending on the data type. e.g. ‘CQUAD4’ TODO: Think about adding another option to the BulkDataStructure which allows a bulk property to have a list of allowable characters, e.g. MASS, MAX, POINT for the EIGRL card

Property Summary
BulkDataProps

Properties related to the bulk data entry

CardName

Name of the MSC.Nastran bulk data entry - mask for ‘Name’ property

CurrentBulkDataDefaults

Current list of bulk data default values

CurrentBulkDataProps

Current list of bulk data properties

CurrentBulkDataStruct

Structure containing current bulk data meta

CurrentBulkDataTypes

Current list of bulk data formats

DrawMode

Defines whether the model will be drawn in a deformed or undeformed state.

NumBulk

Number of bulk data entries in this object

ValidBulkNames

List of valid bulk data names

Method Summary
assignCardData(propData, index, BulkMeta)

assignCardData Assigns the card data for the object by converting the raw text input to numeric/char as necessary.

Detailed Description:
  • This function is called in a loop during the method for importing bulk data from a text file (.bdf, .dat). The variable ‘index’ indicates which element of the object bulk data will be assigned during this function.

assignH5BulkData(bulkNames, bulkData)

assignH5BulkData Assigns the object data during the import from a .h5 file.

assignListCardData(propData, index, BulkMeta)

assignListCardData Assigns card data of an arbitrary length to the object by converting the raw text input to numeric/char as necessary.

Detailed Description:
  • This function is called in a loop during the method for importing bulk data from a text file (.bdf, .dat). The variable ‘index’ indicates which element of the object bulk data will be assigned during this function.

  • The property data is split into three sections:
    • Prelist: Data that occurs before list variables

    • List: The list data that can be of arbitrary length

    • Postlist: Data that occurs after the list variables

combine()

combine Combines the bulk data from an array of ‘bulk.BulkData’ objects into a single object.

drawElement(~, ~, ~, varargin)

drawElement Plots the object in the parent graphics object specified by ‘ht’.

Default method just returns an empty matrix.

getBulkMeta()

getBulkMeta Returns the meta information for this bulk data entry based on the current card name.

static parseH5Data(H5Struct, groupset)

parseH5Data Parses a MATLAB structure which has been generated by ‘h5read(filename, grpname’. It is expected that the hdf5 file matches the MSC.Nastran schema.

parseH5DataGroup(h5Struct)

parseH5DataGroup Parse the data in the h5 data group ‘h5Struct’ and return the bulk names and data.

updateElement(~, varargin)

updateElement updates any graphics associated with this object.

Default method does nothing.

validateDOF(val, prpName, varargin)

validateDOF Checks that ‘val’ is a valid Degree-of-Freedom (DOF) entry.

In MSC.Nastran a DOF is defined as any non-repeating combination of the numbers [1,2,3,4,5,6].

validateID(val, prpName, varargin)
validateLabel(val, prpName, varargin)

validateLabel Checks that the value of the label with property name ‘prpName’ matches the expected format.

Each label must be a character row vector of less than 8 characters.

validateReal(val, prpName, extraargs)

validateReal Checks that ‘val’ is a matrix of real numbers

mni.bulk.Constraint

class mni.bulk.Constraint

Bases: mni.bulk.BulkData

Constraint Describes a constraint applied to a node.

The definition of the ‘Constraint’ object matches that of the SPC1 bulk data type from MSC.Nastran.

Valid Bulk Data Types:
  • ‘SPC’

  • ‘SPC1’

Constructor Summary
Constraint(varargin)

Initialise the bulk data sets

Method Summary
drawElement(~, hAx, varargin)

drawElement Draws the constraint objects as a discrete marker at the specified nodes and returns a single handle for all the beams in the collection.

parseH5DataGroup(h5Struct)

parseH5DataGroup Parse the data in the h5 data group ‘h5Struct’ and return the bulk names and data.

The list data can be specified in the ‘G’ field or in the ‘IDENTITY’ field using the “THRU” notation.

mni.bulk.CoordSystem

class mni.bulk.CoordSystem

Bases: mni.bulk.BulkData

CoordSystem Describes a rectangular coordinate system.

The definition of the ‘CoordSys’ object matches that of the CORD2R bulk data type from MSC.Nastran.

Valid Bulk Data Types:
  • ‘CORD1R’ TODO

  • ‘CORD2R’

Constructor Summary
CoordSystem(varargin)

Initialise the bulk data sets

Method Summary
assignH5BulkData(bulkNames, bulkData)

assignH5BulkData Assigns the object data during the import from a .h5 file.

drawElement(~, hAx, varargin)
getOrigin(cid)

getOrigin Calculates the (x,y,z) coordinates of the origin of the coordinates system in the local frame.

getPosition(X, cid, varargin)

GETPOSITION returns the {x,y,z} location of position X ( defined in the local coordinate system cid) in the global coordinate system

getRotationMatrix(cid)

getRotationMatrix Calculates the 3x3 rotation matrix for each coordinate system.

getVector(X, cid)

GETVECTOR returns the orientation of vector X ( defined in the local coordinate system cid) in the global coordinate system

mni.bulk.FEModel

class mni.bulk.FEModel

Bases: mni.mixin.Collector

FEModel Describes a collection of bulk data objects to which results sets can be attached to.

Detailed Description:

See also: mni.mixin.Collector

TODO - Add a method for tidying up the PBEAM/PBAR entries and defining default values.

Constructor Summary
FEModel()

Update collection parameters

Property Summary
BulkDataNames

Names of the bulk data properties in the collection

StopAnimation
TransformationMatrices

Cell array of transformation matrices from local-to-basic coordinate system and associated CoordSys ID numbers

Method Summary
animate(opts)
combine()

combine Combines the bulk data from an array of ‘mni.bulk.FEModel’ objects into a single model.

draw(hF, varargin)

draw Method for plotting the content of a FEModel.

makeCoordSys()

makeCoordSys Constructs the coordinate system transformation matrices for all non-basic coordinate systems in the FEModel.

makeIndices()

makeIndices Builds the connections between different bulk data objects in the model.

Detailed Description:
  • In order for this method to work the ‘BulkDataStructure’ must be set correctly during the object constructor.

printSummary(varargin)

printSummary Prints a summary of the model.

Syntax:
  • Print a summary of the model to the command window

    >> printSummary(obj)

  • Print a summary of the model to the command window and provide a reference to the parent file where the data was imported from.

    >> printSummary(obj, ‘RootFile’, ‘sample_file.bdf’);

  • Print a summary of the model to an external file by providing a file identifier.

    >> fid = fopen(‘file.txt’, ‘w’); >> printSummary(obj, ‘FileID’, fid);

  • Print a summary of the model using a user supplied log function.

    >> log_fcn = @(s) fprintf(fid, ‘%s’, s); >> printSummary(obj, ‘LogFcn’, log_fcn);

Parameters:
  • data. ('LogFcn'   - Function handle for writing the)

  • data.

  • data.

summarise()

summarise Generates a summary of all of the bulk data objects in the model.

update(varargin)

Run ‘updateElement’ method for each bulk object in the model

mni.bulk.List

class mni.bulk.List

Bases: mni.bulk.BulkData

List Describes a set of bulk data that can have an arbitrary number of data points.

Valid Bulk Data Types:
  • RBE2

  • AEFACT

  • SET1

  • ASET1

  • PAERO1

  • FLFACT

  • TABDMP1

  • TABLED1

  • TABRND1

Constructor Summary
List(varargin)

Initialise the bulk data sets

Property Summary
ValidAxisType
ValidDampingType
Method Summary
assignH5BulkData(bulkNames, bulkData)

assignH5BulkData Assigns the object data during the import from a .h5 file.

validateAxisType(val, prpName, varargin)
validateTYPE(val, prpName, varargin)
validateThenSetString(val, prpName, toks)

mni.bulk.Mass

class mni.bulk.Mass

Bases: mni.bulk.BulkData

Mass Describes a mass element in the model which is associated with a Node.

Valid Bulk Data Types:
  • CONM1

  • CONM2

Constructor Summary
Mass(varargin)

Initialise the bulk data sets

Method Summary
assignH5BulkData(bulkNames, bulkData)

assignH5BulkData Assigns the object data during the import from a .h5 file.

drawElement(~, hAx, varargin)
get_drawCoords(varargin)
updateElement(varargin)

mni.bulk.Material

class mni.bulk.Material

Bases: mni.bulk.BulkData

Material Describes the properties of a bulk.Beam object.

The definition of the ‘BeamProp’ object matches that of the PBEAM bulk data type from MSC.Nastran.

Valid Bulk Data Types:
  • ‘MAT1’

Constructor Summary
Material(varargin)

Initialise the bulk data sets

mni.bulk.Node

class mni.bulk.Node

Bases: mni.bulk.BulkData

Node Describes a point in 3D-space for use in a finite element model.

The definition of the ‘Node’ object matches that of the GRID bulk data type from MSC.Nastran.

Valid Bulk Data Types:
  • ‘GRID’

  • ‘SPOINT’

  • ‘EPOINT’

Constructor Summary
Node(varargin)

Initialise the bulk data sets

Property Summary
Deformation
Method Summary
assignListCardData(propData, index, BulkMeta)
drawElement(~, hAx, varargin)

drawElement Draws the node objects as a discrete marker and returns a single graphics handle for all the nodes in the collection.

getDrawCoords(varargin)

getDrawCoords Returns the coordinates of the node in the global (MSC.Nastran Basic) coordinate system based on the current ‘DrawMode’ of the object.

Accepts object arrays.

nodeDelete(~, ~, ~)
updateElement(varargin)

drawElement Draws the node objects as a discrete marker and returns a single graphics handle for all the nodes in the collection.

mni.bulk.Plotel

class mni.bulk.Plotel

Bases: mni.bulk.BulkData

PLOTEL Describes a 1D element between 2 Nodes. To Aid plotting

The definition of the ‘plotel’ object matches that of the PLOTEL bulk data type from MSC.Nastran.

Constructor Summary
Plotel(varargin)

Initialise the bulk data sets

Method Summary
assignH5BulkData(bulkNames, bulkData)

assignH5BulkData Assigns the object data during the import from a .h5 file.

drawElement(~, hAx, varargin)

drawElement Draws the beam objects as a line object between the nodes and returns a single handle for all the beams in the collection.

updateElement(varargin)

mni.bulk.Property

class mni.bulk.Property

Bases: mni.bulk.BulkData

Property Describes the properties of a bulk data element.

Valid Bulk Data Types:
  • PSHELL

Constructor Summary
Property(varargin)

Initialise the bulk data sets

mni.bulk.ScalarElement

class mni.bulk.ScalarElement

Bases: mni.bulk.BulkData

ScalarElement Describes an element that connects to two nodes or to one node and the ground.

The defintion of the ‘ScalarElement’ matches the various scalar elements in MSC.Nastran such as CMASS, CELAS, CDAMP.

Valid Bulk Data Types:
  • CMASS1

  • CMASS2

  • CMASS3

  • CMASS4

Constructor Summary
ScalarElement(varargin)

Initialise the bulk data sets

Method Summary
drawElement(~, hAx, varargin)

mni.bulk.Shell

class mni.bulk.Shell

Bases: mni.bulk.BulkData

Shell Describes a 2D or 3D element connected to an arbitrary number of Nodes.

The definition of the ‘Shell’ object matches that of the CQUAD4 bulk data type (and other similar types) from MSC.Nastran.

Valid Bulk Data Types:
  • ‘CPENTA’ -> TODO

  • ‘CQUAD’ -> TODO

  • ‘CQUAD4’

  • ‘CQUAD8’ -> TODO

  • ‘CQUADR’ -> TODO

  • ‘CQUADX’ -> TODO

  • ‘CRAC2D’ -> TODO

  • ‘CRAC3D’ -> TODO

  • ‘CTETRA’ -> TODO

  • ‘CTRIA3’

  • ‘CTRIA6’ -> TODO

  • ‘CTRIAR’ -> TODO

  • ‘CTRIAX’ -> TODO

  • ‘CTRIAX6’ -> TODO

Constructor Summary
Shell(varargin)

Initialise the bulk data sets

Method Summary
drawElement(~, hAx, varargin)

drawElement Draws the Shell objects as a patch object between the nodes and returns a single handle for all the patches in the collection.

Functions

mni.bulk.drawLines

mni.bulk.drawLines()

The type of the None singleton.

mni.bulk.drawNodes

mni.bulk.drawNodes()

The type of the None singleton.

mni.bulk.padCoordsWithNaN

mni.bulk.padCoordsWithNaN()

The type of the None singleton.