fe_case
Purpose
UI function to handle FEM computation cases
Syntax
Case = fe_case(Case,'EntryType','Entry Name',Data)
fe_case(model,'command' ...)
Description
FEM computation cases contain information other than nodes and elements used to describe a FEM computation. Currently supported entries in the case stack are
| cyclic |
(SDT) used to support cyclic symmetry conditions |
| DofLoad |
loads defined on DOFs (handled by fe_load) |
| DofSet |
(SDT) imposed displacements on DOFs |
| FixDof |
used to eliminated DOFs specified by the stack data |
| FSurf |
surface load defined on element faces (handled by fe_load). This will be phased out since surface load elements assicated with volume loads entries are more general. |
| FVol |
volume loads defined on elements (handled by fe_load) |
| info |
used to stored non standard entries |
| KeepDof |
used to eliminated DOFs not specified by the stack data. These entries are less general than FixDof and should be avoided. |
| map |
field of normals at nodes |
| mpc |
multiple point constraints |
| rbe3 |
a flavor of MPC that enforce motion of a node a weighted average |
| par |
are used to define physical parameters (see upcom par commands |
| rigid |
linear constraints associated with rigid links |
| SensDof |
(SDT) Sensor definitions |
fe_case is called by the user to initialize (when Case is not provided as first argument) or modify cases (Case is provided).
Accepted commands are
- Assemble[...] calls used to assemble the matrices of a model. Accepted formats for matrix assembly are
[m,k,model,Case]=fe_case(model,'assemble mk');
[k,model,Case] = fe_case(model,'assemble k');
[ ... ] = fe_case(model,'assemble ...',Case);
Note that constraints are eliminated from the resulting matrices (see section 7.13).
- Auto-SPC analyses the rank of the stiffnes matrix at each node and generates a fixdof case entry for DOFs found to be singular:
model = fe_case(model,'autospc')
- [Case,CaseName]=fe_case(model,'GetCase') returns the current case.
GetCasei returns case number i (order in the model stack). GetCaseName returns a case with name Name and creates it does not exist necessary. Note that the Case name cannot start with Case.
- data=fe_case(model,'GetData EntryName') returns data associated with the case entry EntryName.
- model=fe_case(model,'SetData EntryName',data) sets data associated with the case entry EntryName.
- GetT returns a congruent transformation matrix which verifies constraints. The nominal calling format is Case = fe_case(model,'gett',Case) which fills in the Case.T and Case.DOF fields.
For a DofSet entry, one defines the enforced motion in Case.TIn and associated DOFs in Case.DofIn. The DOFs specified in Case.DofIn are then fixed in Case.T.
- model=fe_case(model,'Remove',EntryName) removes the entry with name EntryName.
- Reset empties all information in the case stored in a
model structure :
model = fe_case(model,'reset')
Commands for advanced constraint generation
Build Sec epsl d
model = fe_cyclic('build (N) epsl (d)',model,LeftNodeSelect) is used to append a cyclic constraint entry in the current case.
fe_caseg('Connection EqualDOF',model,'name',DOF1,DOF2) generates a set of MPC connecting each DOF of the vector DOF1 to corresponding DOF in DOF2. DOF1 and DOF2 can be a list of NodeId, in that case all corresponding DOF are connected, or only DOF given as a -dof DOFs command modifier.
Following example defines 2 disjointed cubes and connects them with a set of MPC between DOFs of the given nodes:
cf1=feplot; cf1.mdl=femesh('testhexa8');
cf1.mdl=feutil('repeatsel 2 0.0 0.0 1.5',cf1.mdl);
cf1.mdl=fe_caseg('Connection EqualDOF -id56',cf1.mdl, ...
'link1',[5:8]',[9:12]');
fecom(cf1,'promodelviewon');fecom(cf1,'curtab Cases','link1');
The string -id value can be added to the command to specify a MPC ID for export to other software.
ConnectionPivot
This command generates a set of MPC defining a pivot connection between two sets of nodes. The command specifies the DOFs contraint at the pivot (in the example DOF 6 is free), the local z direction and the location of the pivot node. One then gives the model, the connection name, and node selections for the two sets of nodes.
model=demosdt('demoTwoPlate');
model=fe_caseg('Connection Pivot 12345 0 0 1 .5 .5 -3 -id 1111', ...
model,'pivot','group1','group2');
def=fe_eig(model);feplot(model,def)
The string -id value can be added to the command to specify a MPC ID for export to other software.
fe_caseg('Connection surface DOFs',model,'name',NodeSel1,Eltsel2) generates a set of MPC connecting of DOFs of a set of nodes selected by NodeSel1 (this is a string that will be passed to feutil as a horzcat('GetNode',NodeSel1) command) to a surface selected by EltSel2 (this is a string that will be passed to feutil as a horzcat('SelElt',EltSel2) command). The following example links x and z translations of two plates
model=demosdt('demoTwoPlate');
model=fe_caseg('Connection surface 13 -id 1111',model,'surface', ...
'z==0', ... % Selection of nodes to connect
'withnode {z==.1}'); % Selection of elements for matching
def=fe_eig(model);feplot(model,def)
The string -id value can be added to the command to specify a MPC ID for export to other software.
Warning volume matching requires that nodes are within the element. To allow exterior nodes, you should add a & selface at the end of the element selection string for matching.
Entries
The following paragraphs list available entries not handled by fe_load or upcom.
cyclic (SDT)
cyclic entries are used to define sector edges for cyclic symmetry computations. They are generated using the fe_cyclic Build command.
FixDof
FixDof entries correspond to rows of the Case.Stack cell array giving {Type, Name, Data}. Type is either 'KeepDof' or 'FixDof'. Name is a string identifying the entry. data is a column DOF definition vector (see section 7.10) or a string defining a node selection command. You can also use
data=struct('data',DataStringOrDof,'ID',ID) to specify a identifier.
You can now add DOF and ID specifications to the findnode command. For example x==0 -dof 1 2 -ID 101 fixes DOFs x and y on the x==0 plane and generates an data.ID field equal to 101 (for use in other software).
The following syntax is used in the final example of the section:
model = fe_case(model,'FixDof','clamped dofs','z==0');
KeepDof
KeepDof entries correspond to rows of the Case.Stack cell array giving {Type, Name, Data}. Type is either 'KeepDof' or 'FixDof'. Name is a string identifying the entry. data is a column DOF definition vector (see section 7.10) or a string defining a node selection command.
The following syntax is used in the final example of the section:
model=fe_case(model,'KeepDof','3-D motion',[.01 .02 .03]');
map
map entries are used to define maps for normals at nodes. These entries are typically used by shell elements or by meshing tools. Data is a structure with fields
-
.normal a N by 3 matrix giving the normal at each node or element
- .ID a N by 1 vector giving identifiers. For normals at integration points, element coordinates can be given as two or three additional columns.
- .opt an option vector. opt(1) gives the type of map (1 for normals at element centers, 2 for normals at nodes, 3 normals at integration points specified as additional columns of Data.ID).
- .vertex an optional N by 3 matrix giving the location of each vector specified in .normal. This can be used for plotting.
MPC (multiple point constraint) entries are rows of the Case.Stack cell array giving {'MPC', Name, Data}. Name is a string identifying the entry. Data is a structure with fields Data.ID positive integer for identification. Data.c is a sparse matrix whose columns correspond to DOFs in Data.DOF. c is the constraint matrix such that [c] {q} = {0} for q defined on DOF.
Data.slave is an optional vector of slave DOFs in Data.DOF. If the vector does not exist, it is filled by feutil FixMpcMaster.
Note that the current implementation has no provision for using local coordinates in the definition of MPC (they are assumed to be defined using global coordinates).
par (SDT)
Parameter entries are used to define variable coefficients in element selections. It is nominally used through upcom Par commands but other routines may also use it [44].
RBE3 (SDT)
rbe3 constraints enforce the motion of a slave node as a weighted average of master nodes. The each row of data.data codes an set of constraints following the format
Rbe3ID NodeIdSlave DofSlave Weight1 DofMaster1 NodeId1 ...
DofMaster and DofSlave code which DOFs are used (123 for translations, 123456 for both translations and rotations). There are known robustness problems with the current implementation of this constraint.
rigid
See details under rigid which also illustrates the RigidAppend command.
Sens ... (SDT)
SensDof entries are detailed in section 5.4. They are stored as rows of the Case.Stack cell array giving {'SensDof', Name, data}. SensStrain entries have been replaced with strain sensors in SensDof.
un=0
model=fe_case(model,'un=0','Normal motion',map); where map gives normals at nodes generates an mpc case entry that enforces the condition {u}T{n}=0 at each node of the map.
Example
Here is an example combining various fe_case commands
femesh('reset');
model = femesh('test ubeam plot');
% creating Case1 with 3D-motion (KeepDof)
model=fe_case(model,'KeepDof',...
'3-D motion',[.01 .02 .03]');
% specifying clamped dofs (FixDof)
model = fe_case(model,'FixDof','clamped dofs','z==0');
% creating a volumic load
data = struct('sel','GroupAll','dir',[1 0 0]);
model = fe_case(model,'FVol','Volumic load',data);
% assemble active DOFs and matrices
model=fe_mknl(model);
% assemble RHS (volumic load)
Load = fe_load(model,'Case1');
% compute static response
kd=ofact(model.K{2});def.def= kd\Load.def; ofact('clear',kd)
Case=fe_case(model,'gett'); def.DOF=Case.DOF;
% plot displacements
feplot('initdef',def);
fecom(';undef;triax;showpatch;promodelinit');
See also
fe_mk, fe_case
©1991-2007 by SDTools