writeFemap (+FEA)


Purpose

Export functions, shapes, results, groups, and FEM geometry to a Femap Neutral file or directly to a Femap session through the COM interface.

Syntax

writeFemap('filename',f1,f2,...)
writeFemap(happ,f1,f2,...)
writeFemap('noprogbar','filename',f1,f2,...)
writeFemap('silent','filename',f1,f2,...)
writeFemap('append','filename',f1,f2,...)
writeFemap('filename','title',title,f1,f2,...)
writeFemap('*.neu','fnoffset',10,'outoffset',100,f,r,...)

Description

WRITEFEMAP writes the supplied entities to a Femap Neutral file or alternately directly to a Femap session. If the file already exists, it will be overwritten.

FILENAME is an optional string containing the filename to write. If it is not supplied, or it contains wildcards, the user will be given a standard file dialog to determine the output filename. The resulting filename is returned by WRITEFEMAP if outputs are requested.

If the user passes in a Femap COM object HAPP instead, the entities will be written directly to the Femap session instead of the Neutral file. You can create a new Femap session with the command

happ = actxserver('Femap.model')

Alternately, you can connect to an existing session with the command

happ = actxGetRunningServer('Femap.model')

Several optional input arguments are supported.

'silent' suppresses output when writing the file. 'noprogbar' disables the progress bar when writing.

'append' will write the new data to the end of the Neutral file if it exists. The default action is to overwrite the file.

'title' followed by a string TITLE overrides the default file dialog title.

'fnoffset' followed by an integer scalar will apply this offset to the function ID used when writing functions to the Neutral file. The default ID starts at 1 and increments by 1. This is important because if any functions already exist in the .mod file with the same IDs that are in the Neutral file, they will be overwritten by the Neutral file contents.

'outoffset' followed by an integer scalar will apply this offset to the output set ID used when writing functions to the Neutral file. The default ID starts at 1 and increments by 1. This is important because if any output sets already exist in the MODFEM file with the same IDs that are in the Neutral file, they will be overwritten by the Neutral file contents.

The following entities can be written. The dataset number is the Neutral file dataset if the output is a Neutral file.

imat_fn All records are written to dataset 420
imat_shp All shape records are written using datasets 450 and 451
imat_result All records are written using datasets 450 and 451
imat_fem object

Coordinate systems are written to dataset 405. Nodes are written to dataset 403. Elements are written to dataset 404.

imat_group object Groups are written to dataset 408. See below for specifics on the group object format and contents.


Important Notes

Use readnas with the Femap program mask (opt.global.Femap=true, or in Options | Program Mask: Femap) to read data from the OP2 file in a format suitable for Femap.

In general, results should be in the format stored in the OP2 file. This generally means that results are stored in local coordinates.

When reading the Neutral file into Femap, data (i.e. functions and output sets and output vectors) with the same IDs as the data in Femap will overwrite any data in Femap. Care must be taken when importing these results. WRITEFEMAP gives you control over the IDs written to the Neutral file.

Below are notes specific to the translation of each data type. In general WRITEFEMAP attempts to duplicate the Femap numbering convention for output results.

imat_fn

IMAT analyzes the imat_fn AbscissaDataType, AbscissaTypeQual, OrdNumDataType, and OrdNumTypeQual attributes to determine the function type. IDLine1 is used for the function title.

imat_shp

The output set title is derived from the OrdNumDataType, Frequency, and Damping attributes. WRITEFEMAP writes out the individual 3 or 6 component directions. It also calculates and writes the magnitude vectors for translation and also rotation where appropriate. These vectors are necessary for Femap to be able to animate the shapes.

WRITEFemap handles both real and complex shapes.

imat_result

Femap stores all results as individual vectors of components and data types. All of the vectors of all of the data types are stored under a specific output set that contains the overall title and notes for that result.

WRITEFEMAP writes each result to its own output set. Both real and complex results of this type are supported.

Data At Nodes results are written the same way as imat_shp output.

Data At Nodes On Elements results are much more difficult to write. Because Femap does not calculate derived results such as von Mises stress on the fly. Any results that need to be displayed must already exist as a specific output vector. WRITEFEMAP does not calculate derived results as it exports, so only the individual components will be available for display. Both centroidal and nodal results will be written.

Femap writes individual output vectors for spring, beam, shell, and solid results. It also writes vectors containing the shell top and bottom fiber distances. WRITEFEMAP uses the element type information to determine where to write the results. The element types follow NASTRAN Item Code convention. These are set correctly by readnas when importing Output2 results. If the imat_result came from a different source, you must ensure that this component is set correctly. Elements with layer=100 are assumed to be shell stress resultants. Elements with more than 2 layers are assumed to be composites. Midside node results are not used by Femap, so they must not be present when exporting.

Data On Elements results are fairly simple. Each data component in the result is written to a separate output vector. The output vector title is derived from the data type and component name. Vector ID's start at 9,000,000. The component number is added to this.

Each data component in the result is written to a separate output vector. The output vector title is derived from the data type and component name. Vector IDs start at 9,000,000. The component number is added to this.

The best performance will be achieved if the nodes are numbered 1-n for each element.

Data On Elements At Nodes results contain the grid point force balance results. The data is written in a similar form as Data At Nodes results, with one set for each type of result. Supported result types include Summed (TOTAL, "element" type -3), Applied (Applied Loads, "element" type -1), Constraint (SPC, "element" type 0), and Multipoint (MPC, "element" type -2). GPFB results for individual element types are not supported.

imat_fem object

Coordinate systems, nodes, and elements are supported. Nodes are first transformed to the global Cartesian system before writing. Colors are mapped from the I-deas color designation to the closest corresponding Femap color. User-defined colors are mapped to the default colors.

Femap requires that all spring elements have 2 nodes, even if they are springs to ground. When Femap imports a NASTRAN deck it actually creates a new fully SPC'd node for springs to ground. WRITEFEMAP simply uses the spring node twice.

Some element data is lost in translation. In particular, items such as end releases and beam rotation angles and end offsets are not carried over. This is because IMAT does not have a place to store this information. Geometry export to Femap is primarily intended so the FEM can be used for display purposes.

imat_group object

Entities currently supported by WRITEFEMAP are 1 = coordinate systems, 7 = nodes, and 8 = elements.

Examples

>> writeFemap('/users/testdata/run01_modified.neu',f,g,h);
>> writeFemap('*.neu','Select file to write','append','silent',f);

See Also

readneu, readnas, writenas, readunv, writeunv