woo.fem
¶
Bo1_Tetra_Aabb¶
In2_Tet4_ElastMat¶
Object
→ Functor
→ IntraFunctor
→ In2_Tet4_ElastMat

class
woo.fem.
In2_Tet4_ElastMat
¶ Apply contact forces and compute internal response of a
Tet4
.object __init__(tuple args, dict kwds)
[ pkg/fem/Tetra.hpp , pkg/fem/Tetra.cpp ]

contacts
(= False)¶ Apply contact forces to
Tetra
nodes (not yet implemented)[type: bool, readonly in python]

nu
(= 0.25)¶ Poisson’s ratio used for assembling the \(E\) matrix (Young’s modulus is taken from
ElastMat
). Will be moved to the material class at some point.[type: Real]

In2_Membrane_ElastMat¶
Object
→ Functor
→ IntraFunctor
→ In2_Facet
→ In2_Membrane_ElastMat

class
woo.fem.
In2_Membrane_ElastMat
¶ Apply contact forces and compute internal response of a
Membrane
. Forces are distributed according to barycentric coordinates whenbending
is enabled; otherwise forces are distributed equally (thirds) to all nodes, to avoid contacts punching through the mesh which has no bending resistance. This can be overridden by settingapplyBary
, in which case forces will be always applied weighted by barycentric coords.Note
If your particles are made of ~:obj:woo.dem.FrictMat, use
In2_Membrane_FrictMat
instead, if you run into ambiguous dipatch errors.object __init__(tuple args, dict kwds)
[ pkg/fem/Membrane.hpp , pkg/fem/Membrane.cpp ]

contacts
(= True)¶ Apply contact forces to facet’s nodes (FIXME: very simply distributed in thirds now)
[type: bool]

nu
(= 0.25)¶ Poisson’s ratio used for assembling the \(E\) matrix (Young’s modulus is taken from
ElastMat
). Will be moved to the material class at some point.[type: Real]

thickness
(= nan)¶ Thickness for CST stiffness computation; if NaN, try to use the double of
Facet.halfThick
.[type: Real]

bending
(= False)¶ Consider also bending stiffness of elements (DKT)
[type: bool]

applyBary
(= False)¶ Distribute force according to barycentric coordinate of the contact point; this is done normally with
bending
enabled, this forces the same also for particles without bending.[type: bool]

rotIncr
(= False)¶ Compute nodal rotation incrementally (by integration of angular velocities) rather than by subtracting from reference rotations (the advantage of incremental is that it is numerically stable even for huge rotations, but perhaps less precise).
[type: bool]

In2_Membrane_FrictMat¶
Object
→ Functor
→ IntraFunctor
→ In2_Facet
→ In2_Membrane_ElastMat
→ In2_Membrane_FrictMat

class
woo.fem.
In2_Membrane_FrictMat
¶ Workaround for current dispatching mechanism limitations so that membrane with
woo.dem.FrictMat
is not matched bywoo.dem.In2_Facet
.object __init__(tuple args, dict kwds)
Membrane¶
Object
→ Shape
→ Facet
→ Membrane

class
woo.fem.
Membrane
¶ Facet as triangular element, with 2 translational and 2 rotational degrees of freedom in each node.
 The CST element is implemented using the formulation found in Felippa’s Introduction to FEM, chapter 15 (the $mat{B}$ matrix is given in (eq. 15.17)). The displacement vector is accessible as
uXy
, the stiffness matrix asKKcst
.  The DKT element is implemented following the original paper by Batoz, Bathe and Ho A Study of threenode triangular plate bending elmenets, section 3.1. DKT displacement vector (with $z$displacements condensed away) is stored in
phiXy
, the stiffness matrix inKKdkt
.  Local coordinate system is established using Best Fit CD Frame in a nonincremental manner (with a slight improvement), and in the same way, nodal displacements and rotations are computed.
Since positions of nodes determine the element’s plane, the $z$ degrees of freedom have zero displacements and are condensed away from the
KKdkt
matrix (force reaction, however, is nonzero in that direction, so the matrix is not square).Drilling rotations can be computed, but are ignored; this can lead to instability in some cases – wobbly rotation of nodes which does not decrease due to nonviscous damping.
The element is assumed to be under planestress conditions.
Mass of the element is lumped in to nodes, but this is not automatized in any way; it is your responsibility to assign proper values of
DemData.mass
andDemData.inertia
.object __init__(tuple args, dict kwds)
[ pkg/fem/Membrane.hpp , pkg/fem/Membrane.cpp ]

node
(= <Node @ 0x1ad03f0, at (0, 0, 0)>)¶ Local coordinate system
[type: shared_ptr<
Node
>, readonly in python]

refRot
(= [])¶ Rotation applied to nodes to obtain the local coordinate system, computed in the reference configuration. If this array is empty, it means that reference configuration has not yet been evaluated.
[type: vector<Quaternionr>, readonly in python]

refPos
(= Vector6(0, 0, 0, 0, 0, 0))¶ Nodal coordinates in the local coordinate system, in the reference configuration
[type:
Vector6
, readonly in python]

uXy
(= Vector6(0, 0, 0, 0, 0, 0))¶ Nodal displacements, stored as ux0, uy0, ux1, uy1, ux1, uy2.
[type:
Vector6
, readonly in python]

surfLoad
(= 0.0)¶ Normal load applied to this facet (positive in the direction of the local normal); this value is multiplied by the current facet’s area and equally distributed to nodes.
[type: Real, unit: Pa]

phiXy
(= Vector6(0, 0, 0, 0, 0, 0))¶ Nodal rotations, only including inplane rotations (drilling DOF not yet implemented)
[type:
Vector6
, readonly in python]

KKcst
(= MatrixX())¶ Stiffness matrix of the element (assembled from the reference configuration when needed for the first time)
[type:
MatrixX
]

KKdkt
(= MatrixX())¶ Bending stiffness matrix of the element (assembled from the reference configuration when needed for the first time).
[type:
MatrixX
]

enableStress
(= False)¶ Set to evaluate
EBcst
andDBdkt
when stiffness matricess are being computed. After than, usingsigCST
andsigDKT
will return stresses.[type: bool]

EBcst
(= MatrixX())¶ CST displacementstress matrix, for computation of stress tensor (see
stressCst
).[type:
MatrixX
, readonly in python]

DBdkt
(= MatrixX())¶ DKT displacementstress matrix, for computation of stress tensor (see
stressDkt
.Warning
This matrix is not computed correctly, therefore also
stressDkt
returns garbage.[type:
MatrixX
, readonly in python]

reset
((Membrane)arg1) → None :¶ Reset reference configuration; this forces using the current config as reference when
update
is called again.

setRefConf
((Membrane)arg1) → None :¶ Set the current configuration as the reference one.

stressCst
((Membrane)arg1[, (bool)glob=False]) → object :¶ Return CST stresses (product of
EBcst
anduXy
), provided thatEBcst
was computed previously by settingenableStress
when building stiffness matrices. The value returned is either \((\sigma_x,\sigma_y,\sigma_{xy})\) (local stresses), or Matrix3 representing stress tensor in global coordinates (with glob=True).

stressDkt
((Membrane)arg1) → Vector6 :¶ Return Vector6 of DKT stresses (product of
DBdkt
andphiXy
), seestressCst
for conditions; additionaly, bending must have been enabled.Warning
This function returns nonsense currently and must be fixed!

update
((Membrane)arg1, (float)dt[, (bool)rotIncr=False]) → None :¶ Update current configuration; create reference configuration if it does not exist.
 The CST element is implemented using the formulation found in Felippa’s Introduction to FEM, chapter 15 (the $mat{B}$ matrix is given in (eq. 15.17)). The displacement vector is accessible as
Tetra¶

class
woo.fem.
Tetra
¶ Tetra (triangle in 3d) particle.
object __init__(tuple args, dict kwds)
[ pkg/fem/Tetra.hpp , pkg/fem/Tetra.cpp ]

canonicalizeVertexOrder
((Tetra)arg1) → None :¶ Order vertices so that signed volume is positive.

getCentroid
((Tetra)arg1) → Vector3 :¶ Return centroid of the tetrahedron

getVolume
((Tetra)arg1) → float :¶ Return volume of the tetrahedron.

Tet4¶

class
woo.fem.
Tet4
¶ 4node linear interpolation tetrahedron element with bestfit corotated coordinates.
object __init__(tuple args, dict kwds)
[ pkg/fem/Tetra.hpp , pkg/fem/Tetra.cpp ]

refPos
(= MatrixX())¶ Reference nodal positions in local coordinates
[type:
MatrixX
, readonly in python]

EB
(= MatrixX())¶ \(E B\) matrix, used to compute stresses from displacements.
[type:
MatrixX
, not shown in the UI, readonly in python]

ensureStiffnessMatrix
((Tet4)arg1, (float)young, (float)nu) → None :¶ Ensure that stiffness matrix is initialized; internally also sets reference configuration. The young parameter should match
woo.dem.ElastMat.young
attached to the particle.

getStressTensor
((Tet4)arg1) → Matrix3¶

reset
((Tet4)arg1) → None¶

setRefConf
((Tet4)arg1) → None :¶ Set the current configuration as the reference one

update
((Tet4)arg1) → None :¶ Update current configuration; creates reference configuration if not existing

Tip
Got questions? Ask at ask.woodem.org. Report issues to github.