ufwrite
Purpose
Write to a Universal File.
Syntax
ufwrite(FileName,UFS,i)
ufwrite(FileName,model)
Description
You can export to UFF using the feplot and iiplot export menus.
ufwrite(FileName,UFS,i) appends the dataset i from a curve stack UFS to the file FileName. For details on curve stacks see section 3.1.2. ufwrite(FileName,model) can be used to export FEM models.
For datasets representing
-
models, ufwrite writes a UFF of type 15 for the nodes and a trace line (UFF 82) for test wire frames (all EGID negative) or without FEMLink. With FEMLink, nodes are written in UFF 2411 format and elements in UFF 2412.
- response data, ufwrite writes a response at DOF (UFF 58) for each column of the response set.
- shape data, ufwrite writes a data at nodal DOF (UFF 55) for each row in the shape data set.
Starting from scratch, you define an curve stack DB=xfopt('empty'). You can then copy data sets from the stack XF (previously initialized by iiplot or xfopt) using DB(i)=XF(j). You can also build a new data set by giving its fields (see xfopt for the fields for the three supported dataset types). The following would be a typical example
UF=xfopt('empty')
UF(1)={'node',FEnode,'elt',FEelt};
UF(2)={'w',IIw,'xf',IIxf};
UF(3)={'po',IIres,'res',IIres,'dof',XFdof};
Once the curve stack built, ufwrite('NewFile',UF,1:3) will
write the three datasets.
With iiplot, you can use the standard database wrapper XF to change properties as needed then write selected datasets to a file. For example,
[ci,XF]=iicom('curveload','gartid');
XF(1).x='frequency'; % modify data set properties
XF(1).yn='accele';
iicom('sub'); % reinitialize plot to check
tname=nas2up('tempname .uf');
ufwrite(tname,XF,1);
XF(7)=demosdt('demo gartte');
ufwrite(tname,XF,7);
UFS=ufread(tname); % reread the UFF to check result
Note that you can edit these properties graphically in the iiplot properties ... figure.
See also
ufread, iiplot, nasread
©1991-2007 by SDTools