fe_caseg
Purpose
Gateway functions for advanced FEM utilities in SDT, regarding assembly, integrated case definition and post-treatments.
Description
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.
Assemble
Optimized strategies for assembly are provided in SDT through the fe_caseg Assemble command. More details are given in section 4.8.8.
StressCut
The StressCut command is the gateway for dynamic stress observation commands. Typical steps of this command are
-
View mesh generation, see section 4.7.1.
- Generate a selection sel=fe_caseg('stresscut -selout',VIEW,model);
- Display the selection in feplot using fe_caseg('stresscut',sel,cf)
- Observe the result using curve=fe_caseg('StressObserve',cf.sel(2),def)
For the selection generation, accepted options are
-
VIEW can be a mesh so that feutilb Match is used to find elements associated with viewing positions. A structure struct('type','Gauss') to return selection at Gauss points. A structure struct('type','BeamGauss') to return selection at beam Gauss points.
- a model or feplot handle cf can be provided as third argument.
- -SelOut requires selection output.
- -Radiusval provides a search radius for the feutilb Match call.
The sel data structure is a standard selection (see feplot sel) with additional field .StressObs a structure with the following fields
-
.cta observation matrix for stress components. The expected sort is to have all components at first node, all at second node, ...
- .DOF expected DOF needed for the observation.
- .X,.Xlab labels for the observation, see Multi-dim curve for details.
- .CritFcn callback to be evaluated, see fe_stress CritFcn.
- .Node,.Elt nodes and elements for the view mesh.
- .trans structure for the observation of interpolated displacement (needed when view mesh nodes are not nodes of the original mesh).
Par[Mat,Pro,SE,Init,Set,2Case]
Advanced parameter declaration in models. Lower level declaration can be found in fe_case par. Model parametrization framework can be found in XXX.
The following commands are available to declare SDT parameters
-
ParMat Support to declare as parameter and possibly split a material property. Warning: Some formulations and parameter classes cannot directly be split from the constitutive law, in such case the resulting assembled matrices may not be computable. Advances material splitting features are available in the Viscoelastic toolbox [31]. Syntax is model=fe_caseg('ParMat',model,'p1 .... -matid i',par); with model a SDT model, p1 is a constitutive law parameter as declared in the corresponding m_ function, and par is a parameter entry. The working material is defined by the token -matid. The output model can have a split material featuring varying parameters, and will have a Case par entry declaring the parameter and a entry in Stack,Range0 providing its variation.
- ParPro Support to declare as parameter and possibly split an integration property, this is designed for discrete structural elements such as celas, cbush, mass1elements. Syntax is model=fe_caseg('ParPro',model,'p1 .... -proid i',par); with model a SDT model, p1 is a constitutive law parameter as declared in the corresponding p_ function, and par is a parameter entry. The working property is defined by the token -proid. The output model can have duplicated elements featuring varying parameters, and will have a Case par entry declaring the parameter and a entry in Stack,Range0 providing its variation.
- ParSE Support to declare as parameter a superelement, or a subset of superelement matrices. One can identify the SE of interest either by its SeName or its ProId. If necessary one can identify matrices of interest either by Klab or matdes, or property name in the p_superentry.
model=fe_caseg('ParSE',model,' -SeName"se1"',par);
model=fe_caseg('ParSE',model,'coef1 -proid1001',par);
model=fe_caseg('ParSE',model,' matdes3 -proid1001',par);
The output model can have duplicated elements featuring varying parameters, and will have a Case par entry declaring the parameter and a entry in Stack,Range0 providing its variation.
The following commands are available to declare and handle broader parameter definitions, to be used in dedicated routines
-
ParInit Instantiate .param entries in supported model features. model=fe_caseg('ParInit',model,par); par is here a parameter or a cell array of parameters to be implemented. Implementation or the feature to be affected is provided through the .info field of the parameter. It is a string following the format type>entry TokenId.
-
type is optionnal (> is then omitted) and provides a way of defining field .type of the parameter usual types are double, pop, but other custom types can be defined for dedicated applications.
- entry defines the parameter effect, the value depends on the type of feature to be parametered, defined by the TokenId
- TokenId defines the feature on which the parameter is applied. The following features are supported
-
Materials, either defined by -matname or -matidi. Acceptable entries as then any declared constitutive law in the corresponding m_ function.
- Structural properties, either defined by -proname or -proidi. Acceptable entries as then any declared constitutive law in the corresponding p_ function. Properties in NLdata are supported, in such case the entry must start with nldata.val to affect field .val of field .NLdata.
- Loads, defined by their type and name typename (e.g. -dofLoad''ExForce''). entry is then the impacted field name.
- Boundary conditions, defined by their type and name typename (e.g. -rigid''conn''). entry is then the impacted field name.
- ParSet Applies a current parameter set (or design point) to a model for which fe_caseg ParInit has been applied. Given an SDT model and a Range structure with field .jPar, the procedure loops over supported features having a .param field, and applies the current values. model=fe_caseg('ParSet',model,Range);.
- Par2Case XXX Loads and ParPro at the moment
StressObserve
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
sel.StressObs.CritFcn='r1=r1(1,:,:);';
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);
ZoomClip
The command accessible through the axes context menu Clip, can now also be called from the command line fe_caseg('ZoomClip',cf.ga,[xyz_left;xyz_right]).
©1991-2019 by SDTools