TrussME-FEM Documentation
A Toolbox for Symbolic-Numerical Analysis and Solution of Structures
This is the documentation for the TrussME-FEM package. This package is a mixed symbolic-numerical Finite Element Method (FEM) structural analysis tool. The solution of the FEM system is based on the Direct Stiffness Method (DSM). The package is designed to be used in the Maple environment for the symbolic manipulation of the FEM system, and Matlab for the numerical solution of the system. Code generation is available for translating the symbolic FEM system into Matlab code.
1 Installation
Download the package from the GitHub repository, release the zip file, and follow the instructions below. Optionally, you can clone the repository using the following command:
git clone https://github.com/StoccoDavide/TrussMe-FEM.git1.1 Maple
To install the module you must have first installed Maple (2020 or later). Then open the PackAndGo.mw file and use the !!! button to execute the entire worksheet.
Then test the module in a Maple worksheet or document by executing TrussMe_FEM:-Info() or Describe(TrussMe_FEM). Alternatively, you can use one of the test files provided in the maple/tests folder. If the module is loaded without errors, it is done!
LEM and LAST Packages
LEM and LAST packages are not mandatory for the TrussME-FEM module to work. However, they are highly recommended to facilitate the symbolic manipulation of the FEM system.. These packages are not included in the maple folder and must be downloaded separately from the LEM GitHub repository and LAST GitHub repository. Similarly as before, you can clone the repositories using the following command:
git clone https://github.com/StoccoDavide/LEM.git
git clone https://github.com/StoccoDavide/LAST.gitThe installation of these optinal packages is similar to the one described above and requires the execution of the PackAndGo.mw file in the respective library folders.
đ§ Attention! đ§
Both LEM and LAST packages are written to work in an object-oriented programming style. Please note that Maple object-oriented programming features have slightly changed in 2021, which online documentation states:
As of Maple 2021, if the method has a formal parameter named
_self, references to its objectâs local or exported variables may be written without prefixing them. That is,_self:-variablemay be written as justvariable. Maple will add theself:-prefix internally when the method is simplified.
As of Maple 2021, a message-passing form of method call can be used, which will automatically pass the object as an argument if the method has a formal parameter named
_self.
Another way to invoke a method, similar to that used in other object-oriented languages, was introduced in Maple 2021. In this form, the object name is qualified by the method name,
object_name:-method_name(argument)just as it can be in the function mechanism described above. However, the object can be omitted from the argument sequence.
For further information please refer to the following link.
1.2 Matlab
To install the Matlab toolbox, you must have first installed Matlab (R2020a or later). Then open the TrussMe-FEM.mtlbx file and follow the instructions. Alternatively, you can include the TrussMe_FEM folder in your Matlab path. Again, you can use one of the test files provided in the matlab/tests folder to check if the module is working correctly.
2 License
BSD 3-Clause License
Copyright (c) 2023, Davide Stocco and Matteo Larcher.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS âAS ISâ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3 Usage
In case you have no time to read through all the APIs and realize how the toolbox should or should not work, refer to the files prensent in maple/tests and matlab/tests folders. These contain usage examples in both Maple and Matlab environments with increasing complexity and detail.
4 Maple API
4.1 Module Utilities
Info
Print module information.
- Inputs: None.
- Optional inputs: None.
- Returns:
NULL.
Proto: Info()
ModuleLoad
Module load procedure.
- Inputs: None.
- Optional inputs: None.
- Returns:
NULL.
Proto: ModuleLoad()
ModuleUnload
Module unload procedure.
- Inputs: None.
- Optional inputs: None.
- Returns:
NULL.
Proto: ModuleLoad()
SetModuleOptions
Set the module options: verbose mode VerboseMode, warning mode WarningMode, time limit TimeLimit, id code length IdLength, node color NodeColor, support color SupportColor, element color ElementColor, shell (2+ nodes) color ShellColor, force color ForceColor, moment color MomentColor, node token NodeToken, support token SupportToken.
- Inputs: None.
- Optional inputs:
ElementColor::{nothing, string} := NULL,ForceColor::{nothing, string} := NULL,IdLength::{nothing, positive} := NULL,MomentColor::{nothing, string} := NULL,NodeColor::{nothing, string} := NULL,NodeToken::{nothing, string} := NULL,ShellColor::{nothing, string} := NULL,SupportColor::{nothing, string} := NULL,SupportToken::{nothing, string} := NULL,TimeLimit::{nothing, nonnegative} := NULL,VerboseMode::{boolean, nothing} := NULL,WarningMode::{boolean, nothing} := NULL. - Returns:
NULL.
Proto: SetModuleOptions(ElementColor = NULL, ForceColor = NULL, IdLength = NULL, MomentColor = NULL, NodeColor = NULL, NodeToken = NULL, ShellColor = NULL, SupportColor = NULL, SupportToken = NULL, TimeLimit = NULL, VerboseMode = NULL, WarningMode = NULL)
GetObjByName
Get object which field name is name from a list or set of objects objs.
- Inputs:
objs::list(anything),name::string. - Returns:
anything.
Proto: GetObjByName(objs, name)
GetObjById
Get object which field id is equal to id_fld, between the objects objs.
- Inputs:
objs::list(anything),id_fld::string. - Optional inputs:
position::boolean := false. - Returns:
anything.
Proto: GetObjById(objs, id_fld, position = false)
GetObjsByType
Get objects which field type is equal to type_fld, between the objects objs.
- Inputs:
objs::list(anything),type_fld::{symbol, list(symbol), set(symbol)}. - Optional inputs:
position::boolean := false. - Returns:
list(anything).
Proto: GetObjsByType(objs, type_fld, position = false)
Simplify
Try to simplify an algebraic expression var with optional simplification options opt. The simplification is performed within the internal or indexed time limit.
- Inputs:
var::anything,opt::anything := NULL. - Optional inputs: None.
- Returns:
anything.
Proto: Simplify(var, opt = NULL)
Norm2
Compute the Euclidean norm of list or vector x.
- Inputs:
x::{Vector, list}. - Optional inputs: None.
- Returns:
algebraic.
Proto: Norm2(x)
GenerateId
Generate a random string id of length size with options opts.
- Inputs: None.
- Optional inputs:
opts::symbol := 'alnum',size::positive := m_IdLength. - Returns:
string.
Proto: GenerateId(opts = 'alnum', size = m_IdLength)
Spy
Plot of non-zero values of matrix A.
- Inputs:
A::Matrix. - Optional inputs: None.
- Returns:
anything.
Proto: Spy(A)
4.2 Reference Frames, Points and Vectors
IsFRAME
Check if the variable var is of FRAME type.
- Inputs:
var::anything. - Optional inputs: None.
- Returns:
boolean.
Proto: IsFRAME(var)
GenerateFrameXY
Generate a reference frame matrix from three points or vectors p_1, p_2 and vector vec orthogonal to XY-plane vec. Optional nodes distance distance can be specified.
- Inputs:
p_1::{POINT, VECTOR, Vector, list},p_2::{POINT, VECTOR, Vector, list},vec::{VECTOR, Vector, list}. - Optional inputs:
distance::algebraic := -1. - Returns:
FRAME.
Proto: GenerateFrameXY(p_1, p_2, vec)
GenerateFrameXZ
Generate a reference frame matrix from three points or vectors p_1, p_2 and vector vec orthogonal to XZ-plane vec. Optional nodes distance distance can be specified.
- Inputs:
p_1::{POINT, VECTOR, Vector, list},p_2::{POINT, VECTOR, Vector, list},vec::{VECTOR, Vector, list}. - Optional inputs:
distance::algebraic := -1. - Returns:
FRAME.
Proto: GenerateFrameXZ(p_1, p_2, vec)
GenerateGenericFrame
Generate a generic reference frame matrix from a string label label. Optional arguments e, p, x, y, z and s are used to customize the output, e.g., âexx := e||s||x||xâ.
- Inputs:
label::string := "". - Optional inputs:
e::string := "e",p::string := "p",s::string := "__",x::string := "x",y::string := "y",z::string := "z". - Returns:
FRAME.
Proto: GenerateGenericFrame(label, e = "e", p = "p", s = "__", x = "x", y = "y", z = "z")
InverseFrame
Inverse affine transformation matrix RF.
- Inputs:
RF::FRAME. - Optional inputs: None.
- Returns:
FRAME.
Proto: InverseFrame(RF)
Translate
Affine transformation matrix corresponding to a translation x, y, z.
- Inputs:
x::algebraic,y::algebraic,z::algebraic. - Optional inputs: None.
- Returns:
FRAME.
Proto: Translate(x, y, z)
Translation
Extract the translation vector of the reference frame RF.
- Inputs:
RF::FRAME. - Optional inputs: None.
- Returns:
Vector.
Proto: Translation(RF)
Rotate
Affine transformation matrix corresponding to the rotation angle around the given axis.
- Inputs:
axis::{string, symbol},angle::algebraic. - Optional inputs: None.
- Returns:
FRAME.
Proto: Rotate(axis, angle)
Rotation
Extract the rotation matrix of the reference frame RF.
- Inputs:
RF::FRAME. - Optional inputs: None.
- Returns:
Matrix.
Proto: Rotation(RF)
IsVECTOR
Check if the variable var is of VECTOR type.
- Inputs:
var::anything. - Optional inputs: None.
- Returns:
boolean.
Proto: IsVECTOR(var)
IsPOINT
Check if the variable var is of POINT type.
- Inputs:
var::anything. - Optional inputs: None.
- Returns:
boolean.
Proto: IsPOINT(var)
Origin
Extract the origin point of the reference frame RF.
- Inputs:
RF::FRAME. - Optional inputs: None.
- Returns:
POINT.
Proto: Origin(RF)
CompX
Extract the x-axis component of the vector or point x.
- Inputs:
x::{POINT, VECTOR}. - Optional inputs: None.
- Returns:
algebraic.
Proto: CompX(x)
CompY
Extract the y-axis component of the vector or point x.
- Inputs:
x::{POINT, VECTOR}. - Optional inputs: None.
- Returns:
algebraic.
Proto: CompY(x)
CompZ
Extract the z-axis component of the vector or point x.
- Inputs:
x::{POINT, VECTOR}. - Optional inputs: None.
- Returns:
algebraic.
Proto: CompZ(x)
CompXYZ
Extract the x, y and z-axis components of the vector or point x.
- Inputs:
x::{POINT, VECTOR}. - Optional inputs: None.
- Returns:
algebraic.
Proto: CompXYZ(x)
UvecX
Extract the x-axis unit vector of the reference frame RF.
- Inputs:
RF::FRAME := Matrix(4,shape = identity). - Optional inputs: None.
- Returns:
VECTOR.
Proto: UvecX(RF)
UvecY
Extract the y-axis unit vector of the reference frame RF.
- Inputs:
RF::FRAME. - Optional inputs: None.
- Returns:
VECTOR.
Proto: UvecY(RF)
UvecZ
Extract the z-axis unit vector of the reference frame RF.
- Inputs:
RF::FRAME := Matrix(4,shape = identity). - Optional inputs: None.
- Returns:
VECTOR.
Proto: UvecZ(RF)
UvecXYZ
Extract the x, y and z-axis unit vectors of the reference frame RF.
- Inputs:
RF::FRAME := Matrix(4,shape = identity). - Optional inputs: None.
- Returns:
VECTOR.
Proto: UvecXYZ(RF)
Project
Project the vector or point x from reference frame RF_ini to reference frame RF_end.
- Inputs:
x::{POINT, VECTOR},RF_ini::FRAME,RF_end::FRAME. - Optional inputs: None.
- Returns:
{POINT, VECTOR}.
Proto: Project(x, RF_ini, RF_end)
4.3 Differentiation Utilities
DoDiff
Differentiate an expression with respect to a function.
- Inputs: None.
- Optional inputs: None.
- Returns:
anything.
Proto: DoDiff()
DoGradient
Differentiate a scalar expression fnc with respect to a list of functions lst.
- Inputs:
fnc::algebraic,lst::{Vector, list}. - Optional inputs: None.
- Returns:
Vector.
Proto: DoGradient(fnc, lst)
DoHessian
Differentiate a vector of expressions (gradient) fnc with respect to a list lst of functions.
- Inputs:
fnc::algebraic,lst::{Vector, list}. - Optional inputs: None.
- Returns:
Matrix.
Proto: DoHessian(fnc, lst)
DoJacobian
Differentiate a vector of expressions fnc with respect to a list lst of functions.
- Inputs:
fnc::Vector,lst::{Vector, list}. - Optional inputs: None.
- Returns:
Matrix.
Proto: DoJacobian(fnc, lst)
DoTensor
Differentiate a matrix mat with respect to a list of functions lst.
- Inputs:
mat::Matrix,lst::{Vector, list}. - Optional inputs: None.
- Returns:
Array.
Proto: DoTensor(mat, lst)
4.4 External Loads
IsLOAD
Check if the variable var is of LOAD type.
- Inputs:
var::anything. - Optional inputs: None.
- Returns:
boolean.
Proto: IsLOAD(var)
IsCOMPONENTS
Check if the variable var is of COMPONENTS type.
- Inputs:
var::anything. - Optional inputs: None.
- Returns:
boolean.
Proto: IsCOMPONENTS(var)
MakeLoad
Create a load with name name acting on the node (or its id) node on the frame frame with components components.
- Inputs:
name::string,node::NODE,components::COMPONENTS. - Optional inputs:
frame::{FRAME, string} := node["id"]. - Returns:
LOAD.
Proto: MakeLoad(name, node, components, frame = node["id"])
IsLOADS
Check if the variable var is of LOADS type.
- Inputs:
var::anything. - Optional inputs: None.
- Returns:
boolean.
Proto: IsLOADS(var)
GetNodalLoads
Get the vector of nodal loads loads of nodes nodes.
- Inputs:
nodes::NODES,loads::LOADS. - Optional inputs: None.
- Returns:
Vector.
Proto: GetNodalLoads(nodes, loads)
4.5 Materials
IsMATERIAL
Check if the variable var is of MATERIAL type.
- Inputs:
var::anything. - Optional inputs: None.
- Returns:
boolean.
Proto: IsMATERIAL(var)
MakeMaterial
Define material with inputs: name name, elastic modulus elastic_modulus, Poissonâs ratio poisson_ratio, shear modulus shear_modulus (default = E/(2*(1+nu))), and density density.
- Inputs: None.
- Optional inputs:
density::algebraic := 0,elastic_modulus::algebraic := 0,name::string := "Undefined",poisson_ratio::algebraic := 0,shear_modulus::algebraic := elastic_modulus/(2+2*poisson_ratio). - Returns:
MATERIAL.
Proto: MakeMaterial(density = 0, elastic_modulus = 0, name = "Undefined", poisson_ratio = 0, shear_modulus = elastic_modulus/(2+2*poisson_ratio))
MakeCarbonSteel
Get default steel material with CarbonSteel name, elastic modulus E = 210.0e+09 (Pa), Poissonâs ratio nu = 0.3 (-), shear modulus E/(2*(1+nu), density rho = 7850.0 (kg/m^3).
- Inputs: None.
- Optional inputs: None.
- Returns:
MATERIAL.
Proto: MakeCarbonSteel()
MakeInoxSteel
Get default steel material with InoxSteel name, elastic modulus E = 200.0e+09 (Pa), Poissonâs ratio nu = 0.3 (-), shear modulus E/(2*(1+nu), density rho = 8000.0 (kg/m^3).
- Inputs: None.
- Optional inputs: None.
- Returns:
MATERIAL.
Proto: MakeInoxSteel()
MakeTitanium
Get default titanium material with Titanium name, elastic modulus E = 110.0e+09 (Pa), Poissonâs ratio nu = 0.33 (-), shear modulus E/(2*(1+nu), density rho = 4500.0 (kg/m^3).
- Inputs: None.
- Optional inputs: None.
- Returns:
MATERIAL.
Proto: MakeTitanium()
MakeCopper
Get default copper material with Copper name, elastic modulus E = 110.0e+09 (Pa), Poissonâs ratio nu = 0.33 (-), shear modulus E/(2*(1+nu), density rho = 4500.0 (kg/m^3).
- Inputs: None.
- Optional inputs: None.
- Returns:
MATERIAL.
Proto: MakeCopper()
MakeBrass
Get default brass material with Brass name, elastic modulus E = 110.0e+09 (Pa), Poissonâs ratio nu = 0.33 (-), shear modulus E/(2*(1+nu), density rho = 4500.0 (kg/m^3).
- Inputs: None.
- Optional inputs: None.
- Returns:
MATERIAL.
Proto: MakeBrass()
MakeBronze
Get default bronze material with Bronze name, elastic modulus E = 110.0e+09 (Pa), Poissonâs ratio nu = 0.33 (-), shear modulus E/(2*(1+nu), density rho = 4500.0 (kg/m^3).
- Inputs: None.
- Optional inputs: None.
- Returns:
MATERIAL.
Proto: MakeBronze()
MakeLead
Get default lead material with Lead name, elastic modulus E = 110.0e+09 (Pa), Poissonâs ratio nu = 0.33 (-), shear modulus E/(2*(1+nu), density rho = 4500.0 (kg/m^3).
- Inputs: None.
- Optional inputs: None.
- Returns:
MATERIAL.
Proto: MakeLead()
MakeZinc
Get default zinc material with Zinc name, elastic modulus E = 110.0e+09 (Pa), Poissonâs ratio nu = 0.33 (-), shear modulus E/(2*(1+nu), density rho = 4500.0 (kg/m^3).
- Inputs: None.
- Optional inputs: None.
- Returns:
MATERIAL.
Proto: MakeZinc()
MakeMagnesium
Get default magnesium material with Magnesium name, elastic modulus E = 45.0e+09 (Pa), Poissonâs ratio nu = 0.33 (-), shear modulus E/(2*(1+nu), density rho = 1800.0 (kg/m^3).
- Inputs: None.
- Optional inputs: None.
- Returns:
MATERIAL.
Proto: MakeMagnesium()
MakeAlluminium
Get default alluminium material with Alluminium name, elastic modulus E = 69.0e+09 (Pa), Poissonâs ratio nu = 0.33 (-), shear modulus E/(2*(1+nu), density rho = 8000.0 (kg/m^3).
- Inputs: None.
- Optional inputs: None.
- Returns:
MATERIAL.
Proto: MakeAlluminium()
MakeAvional
Get default avional material with Avional name, elastic modulus E = 70.0e+09 (Pa), Poissonâs ratio nu = 0.33 (-), shear modulus E/(2*(1+nu), density rho = 2690.0 (kg/m^3).
- Inputs: None.
- Optional inputs: None.
- Returns:
MATERIAL.
Proto: MakeAvional()
MakePeraluman
Get default peraluman material with Peraluman name, elastic modulus E = 70.0e+09 (Pa), Poissonâs ratio nu = 0.33 (-), shear modulus E/(2*(1+nu), density rho = 2690.0 (kg/m^3).
- Inputs: None.
- Optional inputs: None.
- Returns:
MATERIAL.
Proto: MakePeraluman()
MakeAnticorodal
Get default anticorodal material with Anticorodal name, elastic modulus E = 69.0e+09 (Pa), Poissonâs ratio nu = 0.33 (-), shear modulus E/(2*(1+nu), density rho = 2700.0 (kg/m^3).
- Inputs: None.
- Optional inputs: None.
- Returns:
MATERIAL.
Proto: MakeAnticorodal()
MakeCarpental
Get default carpental material with Carpental name, elastic modulus E = 72.0e+09 (Pa), Poissonâs ratio nu = 0.33 (-), shear modulus E/(2*(1+nu), density rho = 2780.0 (kg/m^3).
- Inputs: None.
- Optional inputs: None.
- Returns:
MATERIAL.
Proto: MakeCarpental()
MakeErgal
Get default ergal material with Ergal name, elastic modulus E = 72.0e+09 (Pa), Poissonâs ratio nu = 0.33 (-), shear modulus E/(2*(1+nu), density rho = 2780.0 (kg/m^3).
- Inputs: None.
- Optional inputs: None.
- Returns:
MATERIAL.
Proto: MakeErgal()
4.6 Plotting
ObjectColor
Return the color of the object obj.
- Inputs:
obj::{ELEMENT, LOAD, NODE, SUPPORT}. - Optional inputs: None.
- Returns:
string.
Proto: ObjectColor(obj)
StructureGraph
Return the graph of the structure given a list of nodes nodes and elements elements.
- Inputs:
fem::FEM. - Optional inputs:
disp::boolean := true,id::boolean := false. - Returns:
function.
Proto: StructureGraph(fem, disp = true, id = false)
DrawFrame
Draw a reference frame frame given a list of substitution data data, an axes scaling factor scaling, and axes colors colors.
- Inputs:
frame::FRAME. - Optional inputs:
colors::list(string) := ["Red", "Green", "Blue"],data::{list('='), set('=')} := [],scaling::numeric := 1.0. - Returns:
function.
Proto: DrawFrame(frame, colors = ["Red", "Green", "Blue"], data = [], scaling = 1.0)
PlotNode
Plot the node (or support) at point p given a list or set of data for substitution data, a display token token and a display color color.
- Inputs:
p::{Vector(algebraic), list(algebraic)}. - Optional inputs:
color::string := TrussMe_FEM:-m_NodeColor,data::{list('='), set('=')} := [],token::symbol := TrussMe_FEM:-m_NodeToken`. - Returns:
function.
Proto: PlotNode(p, color = TrussMe_FEM:-m_NodeColor, data = [], token = TrussMe_FEM:-m_NodeToken)
PlotElement
Plot the element from point p_1 and p_2 given a list or set of data for substitution data and a display color color.
- Inputs:
p_1::{Vector(algebraic), list(algebraic)},p_2::{Vector(algebraic), list(algebraic)}. - Optional inputs:
color::string := TrussMe_FEM:-m_ElementColor,data::{list('='), set('=')} := []. - Returns:
function.
Proto: PlotElement(p_1, p_2, color = TrussMe_FEM:-m_ElementColor, data = [])
PlotDeformedElement
Plot the element from diplacements d_1 and d_2 given a list or set of data for substitution data and a display color color.
- Inputs:
p_1::{Vector(algebraic), list(algebraic)},p_2::{Vector(algebraic), list(algebraic)},d_1::{Vector(algebraic), list(algebraic)},d_2::{Vector(algebraic), list(algebraic)}. - Optional inputs:
color::string := TrussMe_FEM:-m_ElementColor,data::{list('='), set('=')} := [],scaling::nonnegative := 1.0. - Returns:
function.
Proto: PlotDeformedElement(p_1, p_2, d_1, d_2, color = TrussMe_FEM:-m_ElementColor, data = [], scaling = 1.0)
PlotLoad
Plot the load arrow from point p_1 and p_2 given a list or set of data for substitution data and a display color color.
- Inputs:
p_1::{Vector(algebraic), list(algebraic)},p_2::{Vector(algebraic), list(algebraic)}. - Optional inputs:
color::string := TrussMe_FEM:-m_LoadColor,data::{list('='), set('=')} := [],scaling::nonnegative := 1.0. - Returns:
function.
Proto: PlotLoad(p_1, p_2, color = TrussMe_FEM:-m_LoadColor, data = [], scaling = 1.0)
PlotStructure
Plot the undeformed fem structure given a list or set of substitution data data, a frame scaling factor frame_scaling or nodes_scaling, elements_scaling, and a loads scaling factor scaling.
- Inputs:
fem::FEM. - Optional inputs:
data::{list('='), set('=')} := [],frame_scaling::{numeric, list(numeric)} := 0.,load_scaling::numeric := 1.0. - Returns:
{function, list(function)}.
Proto: PlotStructure(fem, data = [], frame_scaling = 0., load_scaling = 1.0)
PlotDeformedStructure
Plot the deformed fem structure given a list or set of substitution data data, a frame scaling factor frame_scaling or nodes_scaling, elements_scaling, a loads scaling factor load_scaling, and a deformation magnification factor deformation_scaling.
- Inputs:
fem::FEM. - Optional inputs:
data::{list('='), set('=')} := [],deformation_scaling::numeric := 1.0,frame_scaling::{numeric, list(numeric)} := 0.,interpolate::boolean := true,load_scaling::numeric := 1.0. - Returns:
{function, list(function)}.
Proto: PlotDeformedStructure(fem, data = [], deformation_scaling = 1.0, frame_scaling = 0.0, interpolate = true, load_scaling = 1.0)
4.7 Nodes and Supports
IsNODE
Check if the variable var is of NODE type.
- Inputs:
var::anything. - Optional inputs: None.
- Returns:
boolean.
Proto: IsNODE(var)
IsNODES
Check if the variable var is of NODES type.
- Inputs:
var::anything. - Optional inputs: None.
- Returns:
boolean.
Proto: IsNODES(var)
IsSUPPORT
Check if the variable var is of SUPPORT type.
- Inputs:
var::anything. - Optional inputs: None.
- Returns:
boolean.
Proto: IsSUPPORT(var)
IsSUPPORTS
Check if the variable var is of SUPPORTS type.
- Inputs:
var::anything. - Optional inputs: None.
- Returns:
boolean.
Proto: IsSUPPORTS(var)
IsDOFS
Check if the variable var is of DOFS type.
- Inputs:
var::anything. - Optional inputs: None.
- Returns:
boolean.
Proto: IsDOFS(var)
MakeNode
Create a node with name name at coordinates coordinates in the reference frame frame. The constraints on dofs are specified by dofs, where 1 means free and 0 means that the dof is constrained in the direction given from (global to local) frame.
- Inputs:
name::string,coordinates::{POINT, VECTOR, Vector}. - Optional inputs:
displacements::Vector(algebraic) := <0, 0, 0, 0, 0, 0>,dofs::DOFS := <1, 1, 1, 1, 1, 1>,frame::FRAME := Matrix(4,shape = identity). - Returns:
NODE.
Proto: MakeNode(name, coordinates, displacements = <0, 0, 0, 0, 0, 0>, dofs = <1, 1, 1, 1, 1, 1>, frame = Matrix(4,shape = identity))
MakeCompliantNode
Create a node with name name at coordinates coordinates in the reference frame frame. The constraints on dofs are specified by dofs, where 1 means free and 0 means that the dof is constrained in the direction given from (global to local) frame. The node is also connected to a compliant spring element with traslational stiffness K and torsional stiffness T.
- Inputs:
name::string,coordinates::{POINT, VECTOR, Vector}. - Optional inputs:
K::{algebraic, list(algebraic)} := 0,T::{algebraic, list(algebraic)} := 0,displacements::Vector(algebraic) := <0, 0, 0, 0, 0, 0>,dofs::DOFS := <1, 1, 1, 1, 1, 1>,frame::FRAME := Matrix(4,shape = identity). - Returns:
NODE.
Proto: MakeCompliantNode(name, coordinates, K = 0, T = 0, displacements = <0, 0, 0, 0, 0, 0>, dofs = <1, 1, 1, 1, 1, 1>, frame = Matrix(4,shape = identity))
4.8 Stiffness Matrices
IsSTIFFNESS
Check if the variable var is of STIFFNESS type.
- Inputs:
var::anything. - Optional inputs: None.
- Returns:
boolean.
Proto: IsSTIFFNESS(var)
GetSpringStiffness
Get the stiffness matrix of a spring given the translational stiffnesses K or K_x, K_y, K_z, and the torsional stiffnesses T or T_x, T_y, T_z.
- Inputs:
K::{algebraic, list(algebraic)},T::{algebraic, list(algebraic)}. - Optional inputs: None.
- Returns:
STIFFNESS.
Proto: GetSpringStiffness(K, T)
GetRodStiffness
Get the stiffness matrix of a rod (only axial-stiffness) given the cross-section area A, the Youngâs modulus E, the shear modulus G, the length L, and the cross-section inertia I_x, I_y and I_z.
- Inputs:
A::algebraic,E::algebraic,G::algebraic,L::algebraic,I_x::algebraic,I_y::algebraic,I_z::algebraic. - Optional inputs: None.
- Returns:
STIFFNESS.
Proto: GetRodStiffness(A, E, G, L, I_x, I_y, I_z)
GetBeamStiffness
Get the stiffness matrix of a lean beam given the cross-section area A, the Youngâs modulus E, the shear modulus G, the length L, and the inertia of the cross-section I_x, I_y and I_z.
- Inputs:
A::algebraic,E::algebraic,G::algebraic,L::algebraic,I_x::algebraic,I_y::algebraic,I_z::algebraic. - Optional inputs: None.
- Returns:
STIFFNESS.
Proto: GetBeamStiffness(A, E, G, L, I_x, I_y, I_z)
GetTimoshenkoBeamStiffness
Get the stiffness matrix of a Timoshenkoâs (thick) beam given the cross-section area A, the Youngâs modulus E, the shear modulus G, the length L, and the inertia of the cross-section I_x, I_y and I_z.
- Inputs:
A::algebraic,E::algebraic,G::algebraic,L::algebraic,I_x::algebraic,I_y::algebraic,I_z::algebraic. - Optional inputs: None.
- Returns:
STIFFNESS.
Proto: GetTimoshenkoBeamStiffness(A, E, G, L, I_x, I_y, I_z)
4.9 Elements
IsELEMENT
Check if the variable var is of ELEMENT type.
- Inputs:
var::anything. - Optional inputs: None.
- Returns:
boolean.
Proto: IsELEMENT(var)
IsELEMENTS
Check if the variable var is of ELEMENTS type.
- Inputs:
var::anything. - Optional inputs: None.
- Returns:
boolean.
Proto: IsELEMENTS(var)
MakeElement
Make an element with name name on reference frame frame, connecting the dofs Ni_dofs on i-th node i [Ni, Ni_dofs], connecting with stiffness K.
- Inputs:
name::string,frame::FRAME := Matrix(4,shape = identity). - Optional inputs: None.
- Returns:
ELEMENT.
Proto: MakeElement(name, frame = Matrix(4,shape = identity))
MakeSpring
Make a spring element with name name on reference frame frame, connecting the dofs N1_dofs on node 1 [N1, N1_dofs], connecting the dofs N2_dofs on node 2 [N2, N2_dofs] with translational stiffnesses K or K_x, K_y, K_z, and torsional stiffnesses T or T_x, T_y, T_z. Optional nodes distance distance can be specified.
- Inputs:
name::string,N1::{NODE, list({DOFS, NODE})},N2::{NODE, list({DOFS, NODE})}. - Optional inputs:
K::{algebraic, list(algebraic)} := 0,T::{algebraic, list(algebraic)} := 0,distance::algebraic := 0,frame::FRAME := Matrix(4,shape = identity). - Returns:
ELEMENT.
Proto: MakeSpring(name, N1, N2, K = 0, T = 0, distance = 0, frame = Matrix(4,shape = identity))
MakeRod
Make a rod element with name name on reference frame frame, connecting the dofs N1_dofs on node 1 [N1, N1_dofs] and the dofs N2_dofs on node 2 [N2, N2_dofs], with material material, cross-section area area and inertia inertia. Optional nodes distance distance can be specified.
- Inputs:
name::string,N1::{NODE, Vector({DOFS, NODE}), list({DOFS, NODE})},N2::{NODE, Vector({DOFS, NODE}), list({DOFS, NODE})}. - Optional inputs:
area::algebraic := 0,distance::algebraic := -1,frame::FRAME := Matrix(4,shape = identity),inertia::list(algebraic) := [0, 0, 0],material::MATERIAL := TrussMe_FEM:-MakeCarbonSteel(). - Returns:
ELEMENT.
Proto: MakeRod(name, N1, N2, area = 0, distance = -1, frame = Matrix(4,shape = identity), inertia = [0, 0, 0], material = TrussMe_FEM:-MakeCarbonSteel())
MakeBeam
Make a beam element with name name on reference frame frame, connecting the dofs N1_dofs on node 1 [N1, N1_dofs], connecting the dofs N2_dofs on node 2 [N2, N2_dofs] with material material and cross-section area area and inertia inertia. Optional nodes distance distance and Timoshenkoâs beam boolean timoshenko can be specified.
- Inputs:
name::string,N1::{NODE, Vector({DOFS, NODE}), list({DOFS, NODE})},N2::{NODE, Vector({DOFS, NODE}), list({DOFS, NODE})}. - Optional inputs:
area::algebraic := 0,distance::algebraic := -1,frame::FRAME := Matrix(4,shape = identity),inertia::list(algebraic) := [0, 0, 0],material::MATERIAL := TrussMe_FEM:-MakeCarbonSteel(),timoshenko::boolean := false. - Returns:
ELEMENT.
Proto: MakeBeam(name, N1, N2, area = 0, distance = -1, frame = Matrix(4,shape = identity), inertia = [0, 0, 0], material = TrussMe_FEM:-MakeCarbonSteel(), timoshenko = false)
4.10 FEM Structure
IsSTRUCTURE
Check if the variable var is of STRUCTURE type.
- Inputs:
var::anything. - Optional inputs: None.
- Returns:
boolean.
Proto: IsSTRUCTURE(var)
GetNodalDofs
Get nodal dofs of nodes nodes.
- Inputs:
nodes::NODES. - Optional inputs: None.
- Returns:
Vector.
Proto: GetNodalDofs(nodes)
GetNodalDisplacements
Get the vector of nodal displacements of nodes nodes.
- Inputs:
nodes::NODES. - Optional inputs: None.
- Returns:
Vector.
Proto: GetNodalDisplacements(nodes)
StiffnessTransformation
Compute the transformation matrix of the nodes nodes.
- Inputs:
nodes::NODES. - Optional inputs: None.
- Returns:
Matrix.
Proto: StiffnessTransformation(nodes)
GlobalStiffness
Compute the global stiffness matrix of the nodes nodes and elements elements.
- Inputs:
nodes::NODES,elements::ELEMENTS. - Optional inputs: None.
- Returns:
Matrix.
Proto: GlobalStiffness(nodes, elements)
RecastStiffness
Recast the stiffness matrix K according to the constrained negated dofs d of the element name e.
- Inputs:
K::STIFFNESS,d::Vector,e::string. - Optional inputs: None.
- Returns:
Matrix.
Proto: RecastStiffness(K, d, e)
GlobalStiffnessPrime
Compute the global stiffness matrix of the nodes nodes and elements elements.
- Inputs:
nodes::NODES,elements::ELEMENTS. - Optional inputs: None.
- Returns:
Matrix.
Proto: GlobalStiffnessPrime(nodes, elements)
IsFEM
Check if the variable var is of FEM type.
- Inputs:
var::anything. - Optional inputs: None.
- Returns:
boolean.
Proto: IsFEM(var)
SplitFEM
Split the FEM structure fem in free and constrained dofs.
- Inputs:
fem::FEM. - Optional inputs: None.
- Returns:
NULL.
Proto: SplitFEM(fem)
RecastFEM
Recast the system fem to avoid singularities.
- Inputs:
fem::FEM. - Optional inputs: None.
- Returns:
NULL.
Proto: RecastFEM(fem)
GenerateFEM
Generate a FEM structure from the nodes nodes, elements elements, and loads loads. If tryhard is enabled, the stiffness matrix will be recasted to avoid singularities.
- Inputs:
nodes::NODES,elements::ELEMENTS,loads::LOADS. - Optional inputs:
tryhard::boolean := false. - Returns:
FEM.
Proto: GenerateFEM(nodes, elements, loads, tryhard = false)
NumericalSolveFEM
Solve numerically the FEM structure fem provided with optional data data.
- Inputs:
fem::FEM. - Optional inputs:
data::list := []. - Returns:
NULL.
Proto: NumericalSolveFEM(fem, data = [])
SolveFEM
Solve the FEM structure fem and optionally use LAST LU decompostion use_LAST and veil the expressions use_LEM with label label. The optional data data can be specified to perform a mixed numerically informed pivoting. Factorization method factorization can be choosen between âLUâ, fraction-free âFFLUâ, âQRâ, and Gauss-Jordan âGJâ. Time limit time_limit and maximum veiling cost maxcost can be specified.
- Inputs:
fem::FEM. - Optional inputs:
factorization::string := "LU",label::string := "V",data::{list, set} := [],maxcost::nonnegint := 15,time_limit::positive := 1.0,use_LAST::boolean := false,use_LEM::boolean := true. - Returns:
NULL.
Proto: SolveFEM(fem, factorization = "LU", label = "V", data = [], maxcost = 15, time_limit = 1.0, use_LAST = false, use_LEM = true)
StoreFEM
Store the FEM structure fem in the nodes nodes.
- Inputs:
fem::FEM. - Optional inputs: None.
- Returns:
NULL.
Proto: StoreFEM(fem)
4.11 Output Data
GetOutputDisplacements
Get the output displacements of a solved and stored fem structure.
- Inputs:
fem::FEM. - Optional inputs: None.
- Returns:
Matrix.
Proto: GetOutputDisplacements(fem)
GetOutputReactions
Get the output reactions of a solved and stored fem structure.
- Inputs:
fem::FEM. - Optional inputs: None.
- Returns:
Matrix.
Proto: GetOutputReactions(fem)
4.12 Code Generation and Export
GenerateFile
Generate a file named fname with the content str.
- Inputs:
fname::string,str::string. - Optional inputs: None.
- Returns:
NULL.
Proto: GenerateFile(fname, str)
ClearFile
Procedure that creates an empty file fname.
- Inputs:
fname::string. - Optional inputs: None.
- Returns:
NULL.
Proto: ClearFile(fname)
SetCodegenOptions
Set options for code generation optimization.
- Inputs: None.
- Optional inputs:
coercetypes::boolean := m_CodegenOptions[parse("coercetypes")],deducereturn::boolean := m_CodegenOptions[parse("deducereturn")],deducetypes::boolean := m_CodegenOptions[parse("deducetypes")],defaulttype::symbol := m_CodegenOptions[parse("defaulttype")],digits::posint := m_CodegenOptions[parse("digits")],functionprecision::symbol := m_CodegenOptions[parse("functionprecision")],optimize::boolean := m_CodegenOptions[parse("optimize")],reduceanalysis::boolean := m_CodegenOptions[parse("reduceanalysis")]. - Returns:
NULL.
Proto: SetCodegenOptions(coercetypes = m_CodegenOptions[parse("coercetypes")], deducereturn = m_CodegenOptions[parse("deducereturn")], deducetypes = m_CodegenOptions[parse("deducetypes")], defaulttype = m_CodegenOptions[parse("defaulttype")], digits = m_CodegenOptions[parse("digits")], functionprecision = m_CodegenOptions[parse("functionprecision")], optimize = m_CodegenOptions[parse("optimize")], reduceanalysis = m_CodegenOptions[parse("reduceanalysis")])
GetCodegenOptions
Get options for code generation.
- Inputs: None.
- Optional inputs:
field::string := "all". - Returns:
anything.
Proto: GetCodegenOptions(field = "all")
TranslateToMatlab
Convert a list of expressions expr_list into Matlab code.
- Inputs:
expr_list::list. - Optional inputs: None.
- Returns:
NULL.
Proto: TranslateToMatlab(expr_list)
ApplyIndent
Apply indentation ind to string str.
- Inputs:
ind::string,str::string. - Optional inputs: None.
- Returns:
string.
Proto: ApplyIndent(ind, str)
GenerateProperties
Generate properties code from a list of data data and optional indentation indent.
- Inputs:
data::list(symbol). - Optional inputs:
indent::string := " ". - Returns:
string.
Proto: GenerateProperties(data, indent = " ")
GenerateInputs
Generate inputs code from a list of variables vars and optional indentation indent and skip null inputs skipnull flag.
- Inputs:
vars::list(list({string, symbol})). - Optional inputs:
indent::string := " ",skipnull::boolean := true. - Returns:
string.
Proto: GenerateInputs(vars, indent = " ", skipnull = true)
ExtractElements
Extract elements for a n-dimensional function func with name name, dimensions dims, and optional veiling label label, indentation indent and skip null inputs skipnull flag.
- Inputs:
name::string,func::{Array, Matrix, Vector, list},dims::list(nonnegint). - Optional inputs:
indent::string := " ",label::string := "out",skipnull::boolean := true. - Returns:
list.
Proto: ExtractElements(name, func, dims, indent = " ", label = "out", skipnull = true)
GenerateHeader
Generate a function header for a function name with variables vars, optional description info and indentation indent and skip class object input skipthis.
- Inputs:
name::string,vars::list(list(symbol)). - Optional inputs:
indent::string := " ",info::string := "No description provided.",skipthis::boolean := false. - Returns:
string.
Proto: GenerateHeader(name, vars, indent = " ", info = "No description provided.", skipthis = false)
GenerateElements
Generate code for elements func with optional indentation indent.
- Inputs:
func::{Array, Matrix, Vector, list}. - Optional inputs:
indent::string := " ". - Returns:
string.
Proto: GenerateElements(func, indent = " ")
GenerateBody
Generate code for function body for a function name with dimensions dims, optional header header, properties properties, inputs inputs, veils veils, elements elements, indentation indent, outputs outputs and vector type typestr.
- Inputs:
name::string,dims::list(nonnegint). - Optional inputs:
elements::string := "No elements",header::string := "No header",indent::string := " ",inputs::string := "No inputs",outputs::string := "No outputs",properties::string := "No properties",typestr::string := "zeros",veils::string := "No veils". - Returns:
string.
Proto: GenerateBody(name, dims, elements = "No elements", header = "No header", indent = " ", inputs = "No inputs", outputs = "No outputs", properties = "No properties", typestr = "zeros", veils = "No veils")
VectorToMatlab
Translate the vector vec with variables vars into a Matlab function named name and return it as a string. The optional arguments and class properties data, function description info, veiling label label, and indentation string indent.
- Inputs:
name::string,vars::list(list(symbol)),vec::Vector. - Optional inputs:
data::list(symbol) := [],indent::string := " ",info::string := "No info",label::string := "out",skipnull::boolean := true. - Returns:
string.
Proto: VectorToMatlab(name, vars, vec, data = [], indent = " ", info = "No info", label = "out", skipnull = true)
MatrixToMatlab
Translate the vector vec with variables vars into a Matlab function named name and return it as a string. The optional arguments and class properties data, function description info, veiling label label, and indentation string indent.
- Inputs:
name::string,vars::list(list(symbol)),mat::Matrix. - Optional inputs:
data::list(symbol) := [],indent::string := " ",info::string := "No info",label::string := "out",skipnull::boolean := true. - Returns:
string.
Proto: MatrixToMatlab(name, vars, mat, data = [], indent = " ", info = "No info", label = "out", skipnull = true)
GetVeilSubs
Get the substitutions to transform veils veil from (v[j])(f) to v_j.
- Inputs:
veil::{Vector(algebraic), list(algebraic)}. - Optional inputs: None.
- Returns:
NULL.
Proto: GetVeilSubs(veil)
GenerateConstructor
Generate a constructor for a system named name system data data, description info and indentation indent.
- Inputs:
name::string. - Optional inputs:
data::list(symbol := algebraic) := [],indent::string := " ",info::string := "Class constructor.". - Returns:
string.
Proto: GenerateConstructor(name, data = [], indent = " ", info = "Class constructor.")
SystemToMatlab
Generate a FEM system fem with name name, with optional data data, description info, output label label and indentation indent.
- Inputs:
name::string,fem::FEM. - Optional inputs:
data::list(symbol := algebraic) := [],indent::string := " ",info::string := "No class description provided.",label::string := "out",vars::list(symbol) := []. - Returns:
string.
Proto: SystemToMatlab(name, fem, data = [], indent = " ", info = "No class description provided.", label = "out", vars = [])
GenerateMatlabCode
Generate Matlab code for the FEM system fem with name name, with optional data data, description info, output label label and indentation indent, variables vars and output path path.
- Inputs:
name::string,fem::FEM. - Optional inputs:
data::list(symbol := algebraic) := [],indent::string := " ",info::string := "No class description provided.",label::string := "out",path::string := "./",vars::list(symbol) := []. - Returns:
NULL.
Proto: GenerateMatlabCode(name, fem, data = [], indent = " ", info = "No class description provided.", label = "out", path = "./", vars = [])
5 Matlab API
5.1 Class Methods
System
Class constructor for a system.
- Parameters:
t_data: The system data
- Returns:
- The system object
Proto: obj = System(t_data)
get_data
Get the system data.
- Parameters: None
- Returns:
- The system data
Proto: out = obj.get_data()
set_data
Set the system data field.
- Parameters:
t_data: The system data
- Returns: None
Proto: obj.set_data(t_data)
get_data_field
Get the system data field.
- Parameters:
field: The system data field
- Returns:
- The system data field value
Proto: out = obj.get_data_field(field)
set_data_field
Set the system data field.
- Parameters:
field: The system data fieldvalue: The system data field value
- Returns: None
Proto: obj.set_data_field(field, value)
compute_K
Compute the system stiffness matrix \(\mathbf{K}\) as:
\[ \mathbf{K} = \left[ \begin{array}{cc} \mathbf{K}_{ff} & \mathbf{K}_{fs} \\ \mathbf{K}_{sf} & \mathbf{K}_{ss} \end{array} \right] \]
- Parameters:
x: States \(\mathbf{x}\).v: Veils \(\mathbf{v}\).
- Returns:
- The system stiffness matrix \(\mathbf{K}\).
Proto: out = obj.compute_K(x, v)
compute_d_f
Compute the system deformation vector of free dofs \(\mathbf{d}_{f}\) as:
\[ \mathbf{d}_{f} = \mathbf{K}_{ff}^{-1} \left( \mathbf{f}_{f} - \mathbf{K}_{fs} \mathbf{d}_{s} \right) \]
- Parameters:
x: States \(\mathbf{x}\).v: Veils \(\mathbf{v}\).tol[optional]: Tolerance for the iterative solver.itr[optional]: Maximum number of solver iterations.
- Returns:
- The system deformation vector \(\mathbf{d}_{f}\).
Proto: out = obj.compute_d_f(x, v, tol, itr)
compute_d
Compute the system deformation vector \(\mathbf{d}\) as:
\[ \mathbf{d} = \left[ \begin{array}{c} \mathbf{d}_{f} \\ \mathbf{d}_{s} \end{array} \right] \]
- Parameters:
x: States \(\mathbf{x}\).v: Veils \(\mathbf{v}\).tol[optional]: Tolerance for the iterative solver.itr[optional]: Maximum number of solver iterations.
- Returns:
- The system deformation vector \(\mathbf{d}\).
Proto: out = obj.compute_d(x, v, tol, itr)
compute_f_s
Compute the system force vector of specified dofs \(\mathbf{f}_{s}\) as:
\[ \mathbf{f}_{s} = \mathbf{K}_{sf} \mathbf{d}_{f} + \mathbf{K}_{ss} \mathbf{d}_{s} - \mathbf{f}_{r} \]
- Parameters:
x: States \(\mathbf{x}\).v: Veils \(\mathbf{v}\).tol[optional]: Tolerance for the iterative solver.itr[optional]: Maximum number of solver iterations.
- Returns:
- The system force vector \(\mathbf{f}_{s}\).
Proto: out = obj.compute_f_s(x, v, tol, itr)
compute_f
Compute the system force vector \(\mathbf{f}\) as:
\[ \mathbf{f} = \left[ \begin{array}{c} \mathbf{f}_{f} \\ \mathbf{f}_{s} \end{array} \right] \]
- Parameters:
x: States \(\mathbf{x}\).v: Veils \(\mathbf{v}\).tol[optional]: Tolerance for the iterative solver.itr[optional]: Maximum number of solver iterations.
- Returns:
- The system force vector \(\mathbf{f}\).
Proto: out = obj.compute_f(x, v, tol, itr)
sanity_check
Internal structure sanity check.
- Parameters:
x: States \(\mathbf{x}\).v: Veils \(\mathbf{v}\).tol[optional]: Tolerance for the iterative solver.itr[optional]: Maximum number of solver iterations.
- Returns:
- An error is thrown if the sizes are not correct.
Proto: obj.sanity_check(x, v, tol, itr)
check_symmetry
Check symmetry of stiffness matrices.
- Parameters:
x: States \(\mathbf{x}\).v: Veils \(\mathbf{v}\).
- Returns:
- An error is thrown if the matrices are not symmetric.
Proto: obj.check_symmetry(x, v)
5.2 Abstract Methods
K
Evaluate the system stiffness matrix \(\mathbf{K}\).
- Parameters:
x: States \(\mathbf{x}\).v: Veils \(\mathbf{v}\).
- Returns:
- The system stiffness matrix \(\mathbf{K}\).
Proto: out = obj.K(x, v)
K_ff
Evaluate the system stiffness matrix of free-free dofs \(\mathbf{K}_{ff}\).
- Parameters:
x: States \(\mathbf{x}\).v: Veils \(\mathbf{v}\).
- Returns:
- The system stiffness matrix \(\mathbf{K}_{ff}\).
Proto: out = obj.K_ff(x, v)
K_fs
Evaluate the system stiffness matrix of free-specified dofs \(\mathbf{K}_{fs}\).
- Parameters:
x: States \(\mathbf{x}\).v: Veils \(\mathbf{v}\).
- Returns:
- The system stiffness matrix \(\mathbf{K}_{fs}\).
Proto: out = obj.K_fs(x, v)
K_sf
Evaluate the system stiffness matrix of specified-free dofs \(\mathbf{K}_{sf}\).
- Parameters:
x: States \(\mathbf{x}\).v: Veils \(\mathbf{v}\).
- Returns:
- The system stiffness matrix \(\mathbf{K}_{sf}\).
Proto: out = obj.K_sf(x, v)
K_ss
Evaluate the system stiffness matrix of specified-specified dofs \(\mathbf{K}_{ss}\).
- Parameters:
x: States \(\mathbf{x}\).v: Veils \(\mathbf{v}\).
- Returns:
- The system stiffness matrix \(\mathbf{K}_{ss}\).
Proto: out = obj.K_ss(x, v)
d
Evaluate the system deformation vector \(\mathbf{d}\).
- Parameters:
x: States \(\mathbf{x}\).v: Veils \(\mathbf{v}\).
- Returns:
- The system deformation vector \(\mathbf{d}\).
Proto: out = obj.d(x, v)
d_f
Evaluate the system deformation vector of free dofs \(\mathbf{d}_{f}\).
- Parameters:
x: States \(\mathbf{x}\).v: Veils \(\mathbf{v}\).
- Returns:
- The system deformation vector \(\mathbf{d}_{f}\).
Proto: out = obj.d_f(x, v)
d_s
Evaluate the system deformation vector of specified dofs \(\mathbf{d}_{s}\).
- Parameters:
x: States \(\mathbf{x}\).v: Veils \(\mathbf{v}\).
- Returns:
- The system deformation vector \(\mathbf{d}_{s}\).
Proto: out = obj.d_s(x, v)
f
Evaluate the system force vector \(\mathbf{f}\).
- Parameters:
x: States \(\mathbf{x}\).v: Veils \(\mathbf{v}\).
- Returns:
- The system force vector \(\mathbf{f}\).
Proto: out = obj.f(x, v)
f_f
Evaluate the system force vector of free dofs \(\mathbf{f}_{f}\).
- Parameters:
x: States \(\mathbf{x}\).v: Veils \(\mathbf{v}\).
- Returns:
- The system force vector \(\mathbf{f}_{f}\).
Proto: out = obj.f_f(x, v)
f_s
Evaluate the system force vector of specified dofs \(\mathbf{f}_{s}\).
- Parameters:
x: States \(\mathbf{x}\).v: Veils \(\mathbf{v}\).
- Returns:
- The system force vector \(\mathbf{f}_{s}\).
Proto: out = obj.f_s(x, v)
f_r
Evaluate the system remainder force vector \(\mathbf{f}_{r}\).
- Parameters:
x: States \(\mathbf{x}\).v: Veils \(\mathbf{v}\).
- Returns:
- The system remainder force vector \(\mathbf{f}_{r}\).
Proto: out = obj.f_r(x, v)
perm
Get the system permutation vector.
- Parameters: None
- Returns:
- The permutation vector.
Proto: out = obj.perm()
unperm
Get the unpermutation vector.
- Parameters: None
- Returns:
- The unpermutation vector.
Proto: out = obj.unperm()
v
Evaluate the veils \(\mathbf{v}\).
- Parameters:
x: States \(\mathbf{x}\).
- Returns:
- The Veils \(\mathbf{v}\)..
Proto: out = obj.v(x)