Contents     Functions         Previous Next     PDF Index

feutilb, fe_caseg


Gateway functions for advanced FEM utilities in SDT.


This function is only used for internal SDT operation and actual implementation will vary over time. The following commands are documented to allow user calls and SDT source code understanding.


Optimized strategies for assembly are provided in SDT through the fe_caseg Assemble command. More details are given in section 4.8.8.


This command provides optimized operation when compared to the feutil equivalent and finer control.



Integrated combining of two separate models. This call aims at creating an assembly from two separate mechanical components. This command properly handles potential NodeId, EltId, ProId, or MatId overlaying by setting disjoint ID sets before assembly. Stack or Case entries with overlaying names are resolved, adding (1) to common names in the second model. Sets with identical names between both models are concatenated into a single set. The original node numbering matrix for mo2 is output as a second argument (r1 in the second example call). The original element numbering matrix for mo2 can also be output as a third argument.

mo1 is taken as the reference to which mo2 will be added, the Node/Elt appending is performed by feutilAddTest.


K = feutilb('dtkt',T,K) functional equivalent to diag(T'*k*T) but this call supports out of core and other optimized operations obtained through compiled functionalities. K may be a cell array of matrices, in which case one operates on each cell of the array.

GeoLineTopo, ...

 r2=feutilb('geolinetopo',model,struct('starts',RO.nodes(j1,1), ...

GeoLineTopo searches a topological line by following mesh edges.

Accepted fields are

GeoFindCircle packages the GeoLineTopo command to detect nodes on a quasi-circular mesh,

GeoFindCircle, ...

GeoFindCircle searches a topological circular line by following mesh edges. One can either provide three points one the circle, or one point with origin and axis.

 r2=feutilb('geofindcircle',model,struct('nodes',[n1 ...]);
struct('nodes',n1,'Origin',[x y z],'axis',[nx ny nz]);

where n1 is a NodeId, x,y,z are the coordinates of the circle origin, nx, ny, nz is the normal to the plane containing the circle.

The output r2 contains fields

The following example illustrates how one can exploit this feature to define a connection screw based on a hole in plates.

% use the demostration model for screw defintions with two plates
model=demosdt('demoscrew layer 0 40 20 3 3 layer 0 40 20 4');
% use 3D line pick to find three nodes on the hole
% fe_fmesh('3dlineinit') % acitvate option, and click on 3 nodes on the hole
nodes=[47 43 40]; % nodes picked on the hole
% detect hole
r1=feutilb('geofindcircle',model,struct('nodes',nodes)); r1=r1{1};
n1=feutil('getnodegroupall',model); n2=n1;
% define planes: need to detect plane altitudes
% 1- transform coordinates in the local hole basis for planes generation
% 2- use global altitudes for the elements detection
z2=n2(i1,7); % use type 1
r2=[num2cell([z1 1+0*z1]) ...
 cellfun(@(x) sprintf('z==%.15g',x),num2cell(z2),'uni',0)];
% 3- screw model, see sdtweb fe_case
r2=struct('Origin',r1.Origin,'axis',r1.normal','radius',r1.radius, ...
 'MatProId',[101 101],'rigid',[Inf abs('rigid')],...
% compute modes to test
def=fe_eig(model,[5 10 1e3]);
cf=feplot(model); cf.def=def;

GeomRB, ...

def=feutilb('geomrb',node,RefXYZ,adof,m) returns a geometric rigid body modes. If a mass matrix consistent with adof is provided the total mass, position of the center of gravity and inertia matrix at CG is computed. You can use def=feutilb('geomrb cg',Up) to force computation of rigid body mass properties.

def=feutilb('geomrbMass',model) returns the rigid body modes and mass, center of gravity and inertia matrix information. -bygroup, -bymat, -bypro can be used to detail results by subgroups. With no output argument, the results are shown in a table that can be copied to other software.

il=feutilb('GeomRBBeam1',mdl,RefXYZ) returns standard p_beam properties for a given model section where RefXYZ is the coordinates of the reference point from the gravity center.

feutilb('GeomRB',mdl,[0 0 0],sens) or feutilb('GeomRB',mdl,[0 0 0],Load) provide a rigid body check of the work generated by loads or loads collocated to sensors on rigid body motion. This provides a direction of application and moments around the origin. These are then used to estimate a point that would lead to the same moments. This point should be on a line of direction of force and containing the actual application point (xtrue=xest + α dx, ...)


Non conform mesh matching utilities. The objective is to return matching elements and local coordinates for a list of nodes.

Matching elements mean

A typical node matching call would be

model=femesh('test hexa8');
match=struct('Node',[.1 .1 .1;.5 .5 .5;1 1 1]);
match=feutilb('match -info radius .9 tol 1e-8',model,match)

Accepted command options are

The output structure contains the fields

.Nodeoriginal positions
.rstjposition in element coordinates and jacobian information.
.StickNodeorthogonal projection on element surface if the original node is not within the element, otherwise original position.
.Infoone row per matched node/element giving NodeId if exact match, number of nodes per element, and element type.
.matchobtained when calling the command with -info, typically for row by row post-processing of the match. A cell array with one row per matched node/element giving eltname, slave element row, rstj, sticknode


This command is used to build multiple point constraints from a match.

The solution retained for surfaces is to first project the arbitrarily located connection point P on the element surface onto a point Q on the neutral fiber used where element nodes are located. Then Q1 or P1 shape functions and their derivatives are used to define a linear relation between the 6 degree of freedom of point Q and the 3 or 4 nodes of the facing surface. Motion at P is then deduced using a linearized rigid PQ link. One chooses to ignore rotations at the nodes since their use is very dependent on the shell element formulation.

Figure 9.2: Non conform mesh handling

The local element coordinates are defined by xje,j=1:3 along the r coordinate line

xje = αx 
∂ Ni
∂ r
xij with   αx=1/⎪⎪
∂ Ni
∂ r

ye that is orthogonal to xe and in the xe, ∂ Ni/∂ sxij plane, and ze that defines an orthonormal basis.

The local rotations at point Q are estimated from rotations at the corner nodes using

Rj = xje 
∂ Ni
∂ ye
 uikzke − yje 
∂ Ni
∂ xe
 uikzke +

∂ Ni
∂ xe
 uik yke −
∂ Ni
∂ ye
 uik xke


with uik the translation at element nodes and j=1:3, i=1:Nnode, k=1:3. Displacement at Q is interpolated simply from shape functions, displacement at P is obtained by considering that the segment QP is rigid.

For volumes, displacement is interpolated using shape functions while rotations are obtained by averaging displacement gradients in orthogonal directions


/2 {u

/2 {u

/2 {u

You can check that the constraints generated do not constrain rigid body motion using fe_caseg('rbcheck',model) which builds the transformation associated to linear constraints and returns a list of DOFs where geometric rigid body modes do not coincide with the transformation.


def2 = feutilb('PlaceInDof',DOF,def) returns a structure with identical fields but with shapes ordered using the specified DOF. This is used to eliminate DOFs, add zeros for unused DOFs or simply reorder DOFs. See also fe_def SubDof.


The StressCut command is the gateway for dynamic stress observation commands. Typical steps of this command are

For the selection generation, accepted options are

The sel data structure is a standard selection (see feplot sel) with additional field .StressObs a structure with the following fields


The StressCut command typically returns all stress components (x, y, and z), for a relevant plot, it is useful to define a further post-treatment, using the sel.StressObs.CritFcn callback. This callback is called once the stress observation have been performed. The current result is stored in variable r1, and follows the dimensions declared in field .X of the observation. For example to extract stresses in the x direction, the callback is


The StressObserve command outputs the stress observation in an curve structure. You can provide a callback -crit "my_callback". The command option -trans allows observation of translations for selections that have this observation. If empty, all components are kept.

data=fe_caseg('StressObserve -crit""',cf.sel(2),def);
iiplot(data); % plot results


This command aims at extracting a functional model from a selection of an element subset. From a FindElt selection, this command

The following command options can be used not to clear some specific fields

% Call to extract a submodel from a model


K = feutilb('tkt',T,K) functional equivalent to T'*k*T but this call supports out of core and other optimized operations obtained through compiled functionalities. K may be a cell array of matrices, in which case one operates on each cell of the array.


feutilb('WriteFileName.m',model) writes a clean output of a model to a script. Without a file name, the script is shown in the command window.

feutilb('_writeil',model) writes properties. feutilb('_writepl',model) writes materials.


The command accessible through the axes context menu Clip, can now also be called from the command line fe_caseg('ZoomClip',,[xyz_left;xyz_right]).

©1991-2014 by SDTools
Previous Up Next