Simulation model

class app.simulation.fem_mechanics.FEMMechanics(matrix_materials)[source]

This class supports the Mechanic FEM Simulation matrix_materials = initial matrix materials (numpy objetc array, array of class Material)


This function uses the LinearBarElementStiffness to create the stiffness matrix (ki) for each Finite Element to create regarding the matrix materials (MM) it also configures each FE element with their Young’s Modulus and their transversal area


This function initialices the conectivity_matrix object using the matrix materials (MM) size for reference, additionally, this method declares the lists where the top and bottom nodes will be

_LinearBarElementForces(k, u)[source]

This function returns the element nodalforce vector given the element stiffness matrix k and the element nodal displacement vector u.

_LinearBarElementStresses(k, u, A)[source]

This function returns the element nodal stress vector given the element stiffness matrix k, the element nodal displacement vector u, and the cross-sectional area A.

_LinearBarElementStiffness(E, A, L)[source]

This function returns the Finite Element stiffness considering the material Young’s modulus (E), the transversal area of the FE (A) and the length of the FE (L)


k= \begin{bmatrix} \frac{EA}{L}  & -\frac{EA}{L} \\ -\frac{EA}{L}
    & \frac{EA}{L} \end{bmatrix}


Assembles the General Stiffness Matrix (K) using the size of the matrix materials (MM) as reference. It also uses the conectivity matrix (conectivity_matrix) to asseble the FE for every material on the matrix materials (MM) by using the function _LinearBarAssemble order to locate all the FE in place for simulation

_LinearBarAssemble(K, k, i, j)[source]

This function assembles the element stiffness matrix k of the linear bar with nodes i and j into the global stiffness matrix K.This function returns the global stiffness matrix K after the element stiffness matrix k is assembled.

_ElementConectivityMatrix(width, height)[source]

This function create the nodes and set positions for all elements on a stiffness matrix. It also it also aggregate the top and bottom elements to their own list declared at the function _CreateConectivityMatrix


Set the force parameter to apply over the top elements of the FE General Stiffness Matrix (K)


Run the simulation with all the configured parameters, the output will be a displacements map handled by the results module. Once the global stiffness matrix K is obtained we have the following structure equation:



where U is the global nodal displacement vector and F is the global nodal force vector.At this step the boundary conditions are applied manually to the vectors U and F.

Then the matrix is solved by partitioning and Gaussian elimination. Finally once the unknown displacements and reactions are found, the element forces are obtained for each element as follows:

\left [ f \right ]  = \left [ k \right ] \left \{ u \right \}

where f is the 2x1 element force vector and u is the 2x1 element displacement vector. The element stresses are obtained by dividing the element forces by the crosssectional area A.

_abc_cache = <_weakrefset.WeakSet object>
_abc_negative_cache = <_weakrefset.WeakSet object>
_abc_negative_cache_version = 29
_abc_registry = <_weakrefset.WeakSet object>