Skip to content

Latest commit

 

History

History
142 lines (107 loc) · 5.21 KB

CaribouMass.rst

File metadata and controls

142 lines (107 loc) · 5.21 KB

<CaribouMass />

doxy-label

Doxygen: :cppSofaCaribou::mass::CaribouMass

Implementation of a consistent Mass matrix. The assembly of this mass matrix takes the form of


MIK = ∫Ωeρ0NINKdΩI

where I and K are a pair of indices of the element K nodes. Here, ρ0 is the mass density as the mass per volume unit (ie $\frac{m}{v}$) at the undeformed configuration. Finally, NI(Ψ) is the shape function of the $I`th element's node evaluated at local coordinates :math:$boldsymbol{Psi}` relative to the reference (canonical) element.

A diagonal consistent mass matrix is also constructed by scaling down the diagonal terms in a way that the mass is constant within the element. The procedure is the following:


MIIdiag = seMIII with MII = ∫eρ0NI2dΩ

With the scaling factor being

$$s_e = \frac{M_e}{\sum_I M_{II}} ~\text{, }~ M_e = \int_{e} \rho_0 d\Omega$$

See the following book for more information:

Peter Wriggers, Nonlinear finite element methods (2008), DOI: 10.1007/978-3-540-71001-1_2

Requires a mechanical object. Requires a topology container.

Attribute Format Default Description
printLog bool false Output informative messages at the initialization and during the simulation.
lumped bool false Whether or not the mass matrix should be lumped by scaling the diagonal entries such that the mass is constant per element. Note that the lumped matrix is always computed. But this parameter will determine if it (the lumped) matrix should be used to solve the acceleration (a = M^(-1).f).
density double 1 Mass density of the material at the undeformed state formulated as the mass per volume unit, ie ρ0 = m/v.
topology path Path to a either a SOFA mesh topology container (such as an HexahedronSetTopologyContainer or TetrahedronSetTopologyContainer) or a CaribouTopology component that contains the elements.
template option

The template argument is used to specified the element type on which to compute the mass. By default, the component will try to deduce its element type from the given topology.

  • Tetrahedron - 4 nodes tetrahedral elements
  • Tetrahedron10 - 10 nodes tetrahedral elements
  • Hexahedron - 8 nodes hexahedral elements
  • Hexahedron20 - 20 nodes hexahedral elements

Quick example

tab1

<Node>
    <RegularGridTopology name="grid" min="-7.5 -7.5 0" max="7.5 7.5 80" n="9 9 21" />
    <MechanicalObject src="@grid" />
    <HexahedronSetTopologyContainer name="topology" src="@grid" />
    <CaribouMass density="2.5" lumped="true" topology="@topology" />
</Node>

tab2

node.addObject("RegularGridTopology", name="grid", min=[-7.5, -7.5, 0], max=[7.5, 7.5, 80], n=[9, 9, 21])
node.addObject("MechanicalObject", src="@grid")
node.addObject("HexahedronSetTopologyContainer", name="topology", src="@grid")
node.addObject("CaribouMass", density=2.5, lumped=True, topology="@topology")

Available python bindings