Contents     Functions         Previous Next     PDF Index

nasread

Purpose

Read results from outputs of the MSC/NASTRAN finite element code. This function is part of FEMLink.

Syntax

 out = nasread('FileName','Command')

Description

nasread reads bulk data deck (NASTRAN input), direct reading of model and result information in OUTPUT2 and OUTPUT4 files generated using NASTRAN PARAM,POST,-i cards. This is the most efficient and accurate method to import NASTRAN results for post-processing (visualization with feplot, normal model handling with nor2ss, ...) or parameterized model handling with upcom. Results in the .f06 text file (no longer supported).

Available commands are

Bulk file

model=nasread('FileName','bulk') reads NASTRAN bulk files for nodes (grid points), element description matrix, material and element properties, and coordinate transformations, MPC, SPC, DMIG, SETS, ...

Use 'BulkNo' for a file with no BEGIN BULK card. Unsupported cards are displayed to let you know what was not read. You can omit the 'bulk' command when the file name has the .dat or .bdf extension.

Each row of the bas.bas output argument contains the description of a coordinate system.

The following table gives a partial conversion list. For an up to date table use nas2up('convlist')


NASTRANSDT
CELAS1, CELAS2, RBARcelas
RBE2rigid
RBE3rbe3 in Case
CONRODbar1
CBAR, CBEAM, CRODbeam1
CBUSHcbush
CSHEARquad4
CONM1, CONM2mass2
CHEXAhexa8, hexa20
CPENTApenta6, penta15
CTETRAtetra4, tetra10
CTRIA3, CTRIARtria3
CTRIA6tria6
CQUAD4, CQUADRquad4
CQUAD8quadb

Details on properties are given under naswrite WritePLIL. NASTRAN Scalar points are treated as standard SDT nodes with the scalar DOF being set to DOF .01 (this has been tested for nodes, DMIG and MPC).

OUTPUT2 binary

model=nasread('FileName','output2') reads output2 binary output format for tables, matrices and labels. You can omit the output2 command if the file names end with 2. The output model is a model data structure described in section 7.6. If deformations are present in the binary file, the are saved OUG(i) entries in the stack (see section 7.8). With no output argument, the result is shown in feplot.

Warning: do not use the FORM = FORMATTED in the eventual ASSIGN OUTPUT2 statement.

The optional out argument is a cell array with fields the following fields


.nameHeader data block name (table, matrix) or label (label)
.dnameData block name (table, matrix) or NASTRAN header (label)
.datacell array with logical records (tables), matrix (matrix), empty (label)
.trlTrailer (7 integers) followed by record 3 data if any (for table and matrix), date (for label)

Translation is provided for the following tables


GEOM1nodes with support for local coordinates and output of nodes in global coordinates
GEOM2elements with translation to SDT model description matrix (see bulk command).
GEOM4translates constraints (MPC, OMIT, SPC) and rigid links (RBAR, RBE1, RBE2, RBE3, RROD, ...) to SDT model description matrix
GPDTwith use of GPL and CSTM to obtain nodes in global coordinates
KDICTreading of element mass (MDICT, MELM) and stiffness (KDICT, KELM) matrix dictionaries and transformation of a type 3 superelement handled by upcom. This is typically obtained from NASTRAN with PARAM,POST,-4. To choose the file name use Up.file='FileName';Up=nasread(Up,'Output2.op2');
MPTmaterial property tables
OUGtransformation of shapes (modes, time response, static response, ...) as curve entries in the stack (possibly multiple if various outputs are requested).
 Note : by default deformations are in the SDT global coordinate system (basic in NASTRAN terminology). You may switch to output in the local (global in NASTRAN terminology) using PARAM,OUGCORD,GLOBAL.
 To avoid Out of Memory errors when reading deformations, you can set use a smaller buffer sdtdef('OutOfCoreBufferSize',10) (in MB). When too large, def.def is left in the file and read as a v_handle object that lets you access deformations with standard indexing commands. Use def.def=def.def(:,:) to load all.
 To get the deformation in the stack use calls of the form def=stack_get(model,'curve','OUG(1)','get')
OEEtables of element energy
OEStables of element stresses or strains.

This translation allows direct reading/translation of output generated with NASTRAN PARAM,POST commands simply using out=nasread('FileName.op2'). For model and modeshapes, use PARAM,POST,-1. For model and element matrices use PARAM,POST,-4 or PARAM,POST,-5 (see BuildUp command below).

BuildUp,BuildOrLoad

A standard use of FEMLink is to import a model including element matrices to be used later with upcom. You must first run NASTRAN SOL103 with PARAM,POST,-4 to generate the appropriate .op2 file (note that you must include the geometry in the file, that is not use PARAM,OGEOM,NO). Assuming that you have saved the bulk file and the .op2 result in the same directory with the same name (different extension), then

 Up=nasread('FileName.blk','buildup')

reads the bulk and .op2 file to generate a superelement saved in FileName.mat.

It is necessary to read the bulk because linear constraints are not saved in the .op2 file during the NASTRAN run. If you have no such constraints, you can read the .op2 only with Up=upcom('load FileName);Up=nasread(Up,'FileName.op2').

The BuildOrLoad command is used to generate the upcom file on the first run and simply load it if it already exists.

 nasread('FileName.blk','BuildOrLoad') % result in global variable Up

OUTPUT4 binary

out=nasread('FileName','output4') reads output4 binary output format for matrices. The result out is a cell array containing matrix names and values stored as MATLAB sparse matrices.

All double precision matrix types are now supported. If you encounter any problem, ask for a patch which will be provided promptly.

Output4 text files are also supported with less performance and no support for non sequential access to data with the SDT v_handle object.

Supported options

.f06 output (obsolete)

ASCII reading in .f06 files is slow and often generates round-off errors. You should thus consider reading binary OUTPUT2 and OUTPUT4 files, which is now the only supported format. You may try reading matrices with nasread('FileName','matprt'), tables with nasread('F','tabpt') and real modes with

 [vector,mdof]=nasread('filename','vectortype')

Supported vectors are displacement (displacement), applied load vector (oload) and grid point stress (gpstress).

See also

naswrite, FEMLink


©1991-2016 by SDTools
Previous Up Next