SDT-base         Contents     Functions         Previous Next     PDF Index

7.13  Defining fields trough tables, expressions, ...

Finite element fields are used in four main formats

The VectFromDir structure has fields

data.dira cell array specifying the value of various fields. Each cell of data.dir can give a constant value, a position dependent value defined by a string FcnName that is evaluated using
 fv(:,jDir)=eval(FcnName) or fv(:,jDir)=feval(FcnName,node) if the first fails. Note that node corresponds to nodes of the model in the global coordinate system and you can use the coordinates x,y,z for your evaluation.
data.labcell array giving label for each field of an InfoAtNode or gstate structure.
data.DOFa vector defining the DOF associated with each .dir entry. The transformation to a vector defined at model.DOF is done using vect=elem0('VectFromDirAtDof',model,data,model.DOF).

For example

 % Analytical expression for a displacement field
 data=struct('dir',{{'ones(size(x))','y','1*x.^3'}}, ...

 % Orientation field at nodes
 data=struct('dir',{{'x./sqrt(x.^2+y.^2)','y./sqrt(x.^2+y.^2)',0}}, ...
 feplot(model);fecom('showMap','WithMap') % display map

 % Material field at node

©1991-2024 by SDTools
Previous Up Next