writeunv


Purpose

Export data to a Universal file.

Syntax

writeunv('filename',f1,f2,...)
writeunv('binary','filename','dialogtitle',f1,f2,...)
writeunv('noprogbar','filename',f1,f2,...)
writeunv('silent','filename',f1,f2,...)
writeunv('append','filename',f1,f2,...)
writeunv('binary','filename',f1,f2,...)
writeunv('femsi','filename',f1,...)
writeunv('filename','dataset15',f1,f1,...)
writeunv('filename','dialogtitle',f1,f2,...)
fname=writeunv(...)

Description

The WRITEUNV function is used to write functions, mode shapes, coordinate traces, and FEM geometry to a Universal file.

The filename argument is a string specifying the file to be written. If a wildcard is present in the filename, then a standard file dialog will be presented to allow the user to choose the output file. The filename may be omitted, in which case '*.unv' will be assumed.

If a dialog title is provided, it will be used to title the standard file dialog.

If you pass the string 'binary' into WRITEUNV , functions will be written in binary format. If you pass in 'append', the new data will be appended to the end of the UNV file if it already exists. Otherwise a new UNV file will be created. Passing in 'dataset15' will cause WRITEUNV to export nodes to dataset 15, rather than the default dataset 2411. Passing in 'silent' will suppress output. The optional input string 'noprogbar' will suppress the progress bar.

Passing in the string 'femsi' causes WRITEUNV to write the FEM coordinate systems and nodes in SI units. To be consistent with I-deas, the default is to write coordinate systems in SI units and nodes in the current units system. Using 'femsi' will break compatibility with I-deas and IMAT, but will make the units consistent in the Universal file. To write out coordinate systems in units other than SI, use SETUNITS to change the units system temporarily to SI, call WRITEUNV, then change it back to your current system.

IF an output argument is requested, it will return the fully qualified filename of the file written.

The variables f1, f2, ... to be written can be any of the following:

Variable type

Description Datasets written
imat_fn Function or time history 58 (or 58b)
imat_shp Mode shape 55
imat_ctrace Coordinate trace 1802
imat_cs Coordinate systems 2420
imat_node Nodes 2411 or 15
imat_elem Elements 2412
imat_tl Tracelines 82
imat_group Groups 2477

 

For function or shape arrays, WRITEUNV will write all functions or shapes to the corresponding dataset.

The universal file will be prefaced with a dataset 164 (units), and the data will be written in the currently selected unit system.

By convention, mode shape coefficients in universal files are assumed to be in the basic coordinate system. If any of the shapes you have supplied to WRITEUNV have the .CSType property set to anything but 'Basic', WRITEUNV will issue a warning about this convention.

Note that the FEM global Cartesian coordinate system 0 will be renumbered to 1 prior to export, to be consistent with I-deas. If the FEM already contains a coordinate system 1, it will be renumbered to the maximum ID + 1. Nodes that reference either of these will be renumbered accordingly.

Examples

>> writeunv('/users/testdata/run01_modified.unv',f);
>> writeunv('binary','*.unv','Select binary file to write',f);
>> filename = writeunv('*.unv','Select file to write','append','silent',f);

See Also

readunv, writesubst, setunits