SDT-base         Contents     Functions         Previous Next     PDF Index

7.9  Curves and data sets

Curves are used to specify Inputs (for time or frequency domain simulation) and store results from simulations. The basic formats are the Multi-dim curve and FEM result def. For experimental modal analysis, Response data and Shapes at IO pairs are also used.

All these formats can be displayed using the iiplot interface. For extraction see fe_def SubCh.

Multi-dim curve

A curve is a data structure with fields


.Xaxis data. A cell array with as many entries as dimensions of .Y. Contents of each cell can be
  • a vector (for example vector of frequencies or time steps),
  • a matrix with as many rows a steps in curve.Y. Each column then corresponds to a different definition of the same data (time and position for example) and you can have as many rows in curve.Xlab{i} as colums.
  • a cell array describing data vectors in .Y (for example response labels) with as many rows as elements in corresponding dimension of .Y. In such a cell array, column 2 is for units and 3 for unit type (see fe_curve datatype). To use a specific curve.X{i} to generate labels for the data, specify the index of the associated dimension in curve.Ylab.
 .X giving x-axis data as a vector is obsolete and should be avoided.
.Xlaba cell array giving the meaning of each entry in .X. Each cell can be a string (giving the dimension name) or itself a cell array with columns giving {'name','UnitString',unitcode,'fmt'}. Typical entries are obtained using the fe_curve datatypecell command. Multiple rows can be used to describe multiple columns in the .X entry (matrix input for curve.X{i}).
 fmt, if provided, gives a formatting instruction for example 'length=%i m'. If more intricate formatting is needed a callback can be obtained with '#st3{j2}=sprintf(''PK=%.2fkm'',r2(j2)*1e-3);'.
 unitcode=struct('coef',1,'DispUnit','val') can be used to distinguish the unit for curve display without modifying the underlying data. The unit code can apply to a column and be stored in .X{i}{j,3} (attention it is then necessary to have a numeric .Ylab=i), to a full set of columns and be stored in .Xlab{i}{1,3}, or possibly a whole data set and be stored in .Ylab{1,3}.
.Yresponse data with as many dimensions as the length of curve.X and curve.Xlab. If a 2D matrix rows correspond to .X{1} values and columns are called channels described by .X{2}.
.Ylabdescribes content of .Y data. It can be a string, a 1x3 unit type cell array (see the .Xlab format), or a number that indicates which dimension (index in .X{i} field cell array) describes the .Y unit.
.IDOptional. It can be used to generate automatically vertical lines in iiplot. See ii_plp Call from iiplot for more details.
.namename of the curve used for legend generation.
.dofOptional description of input/output pairs, see .dof.
.typeOptional. 'fe_curve'.
.Interpoptional interpolation method. Available interpolations are linear, log, stair, periodic.
.Extrapoptional extrapolation method. Available extrapolations are flat, zero (default for fe_load) and exp.
.PlotInfoindications for automated plotting, see iiplot PlotInfo
.DimPosorder of dimensions to be shown by iiplot.

The following gives a basis generation example.

 t=linspace(0,10,100)';lab={'ux';'uy'};
 C1=struct('X',{{t,lab}},'Xlab',{{'Time','DOF'}}, ...
  'Y',[sin(t) cos(t)],'name','Test');
 iicom('curveinit',C1.name,C1);iicom('ch1:2');

tdof (outputs), DOF, dof (input/output pair)

SDT identifies quantities involved in FEM and test. Different fields are used for different context.

FEM Result

See section 7.8 or sdtweb('def'), uses the .def, .DOF, .data fields.

Inputs

Inputs for time or frequency simulations are stored as entries {'curve', Name, data} in the model stack or in the case of inputs in the load.curve cell array.

A curve can be used to define a time (or frequency) dependent load {F}=[B]{u}. [B] defines the spatial distribution of the load on DOFs and its unit is the same as F. [B] is defined by a DOFLoad entry in the Case. {u} defines the time (or frequency) dependency as a unitless curve. There should be as many curves as columns in the matrix of a given load def. If a single curve is defined for a multi-load entry, it will affect all the loads of this entry.

As an illustration, let us consider ways to define a time dependent load by defining a .curve field in the load data structure. This field may contain a string referring to an existing curve (name is 'input' here)

 model=fe_time('demo bar');fe_case(model,'info')

 % Define input curve structure (single input step) 
 % For examples see: sdtweb fe_curve#Test 
 model=fe_curve(model,'set','input','TestStep t1=1e-3');

 % define load.curve{1} to use that input
 model=fe_case(model,'setcurve','Point load 1','input');

 % Run a simulation
 TimeOpt=fe_time('timeopt newmark .25 .5 0 1e-4 100');
 model=stack_set(model,'info','TimeOpt',TimeOpt);
 def=fe_time(model); feplot(model,def); fecom ColorDataAll

It is also possible to directly define the .curve field associated with a load

 model=fe_time('demo bar');fe_case(model,'info')
 model=fe_case(model,'remove','fd'); % loads at both ends
 data=struct('DOF',[1.01;2.01],'def',1e6*eye(2),...
             'curve',{{'test ricker dt=1e-3 A=1',...
                       'test ricker dt=2e-3 A=1'}});
 model = fe_case(model,'DOFLoad','Point load 1',data);

 TimeOpt=fe_time('timeopt newmark .25 .5 0 1e-4 100');
 model=stack_set(model,'info','TimeOpt',TimeOpt);
 def=fe_time(model); feplot(model,def); fecom ColorDataAll

Response data associated with inputs and outputs

Response data sets xfstruct correspond to groups of universal files of type UFF58 that have the same properties (type of measurement, abscissa, units, ...). They are used for identification with idcom while the newer curve format is used for simulation results. They are characterized by the following fields


.wabscissa values
.xfresponse data, one column per response, see section 5.8
.dofIO characteristics of individual responses (one row per column in the response data as detailed in .dof). To extract response at sensors, .tdof field, use id_rm.
.fungeneral data set options, contain [FunType DFormat NPoints XSpacing Xmin XStep ZValue] as detailed in ufread 58.
.idoptoptions used for identification related routines (see idopt)
.headerheader (5 text lines with a maximum of 72 characters)
.xabscissa description (see xfopt('_datatype'))
.ynnumerator description (see xfopt('_datatype'))
.yddenominator description (see xfopt('_datatype'))
.zthird axis description (see xfopt('_datatype'))
.group(optional) cell array containing DOF group names. Get label with c.group(c.dof(:,4)) for response and c.group(c.dof(:,5)) for excitation.
.load(optional) loading patterns used in the data set

The .w and .xf fields contain the real data while other fields give more precision on its nature.

The idopt field is used to point to identification options used on the data set. These should point to the figure options ci.IDopt.

The .group field is used to associate a name to the group identification numbers RespGroupID ExciGroupID defined in the .dof columns 4 and 5. These names are saved by ufwrite and used for geometry identification.

The load field describes loading cases by giving addresses of applied loads in odd columns and the corresponding coefficients in even columns. This field is used in test cases with multiple correlated inputs.

Shapes at IO pairs

Shapes at DOFs is used to store modeshapes, time responses defined at all nodes, ... and are written to universal file format 55 (response at nodes) by ufwrite. The fields used for such data sets are

.popole values, time steps, frequency values ...

For poles, see ii_pof which allows conversions between the different pole formats.

.resresidues / shapes (one row per shape). Residue format is detailed in section 5.6.
.dofIO description, see .dof. To extract response at sensors, .tdof field, use id_rm.
.funfunction characteristics (see UFF58)
.headerheader (5 text lines with a maximum of 72 characters)
.idoptidentification options. This is filled when the data structure is obtained as the result of an idcom call.
.labelstring describing the content
.lab_inoptional cell array of names for the inputs
.lab_outoptional cell array of names for the outputs
.groupoptional cell group names

©1991-2024 by SDTools
Previous Up Next