woo.fem
¶
In2_Membrane_ElastMat¶
Object
→ Functor
→ IntraFunctor
→ In2_Facet
→ In2_Membrane_ElastMat

class
woo.fem.
In2_Membrane_ElastMat
(*args, **kwargs)¶ 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.Overloaded function.
__init__(self: woo.fem.In2_Membrane_ElastMat) > None
__init__(self: woo.fem.In2_Membrane_ElastMat, *args, **kwargs) > None

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
(*args, **kwargs)¶ Workaround for current dispatching mechanism limitations so that membrane with
woo.dem.FrictMat
is not matched bywoo.dem.In2_Facet
.Overloaded function.
Tetra¶

class
woo.fem.
Tetra
(*args, **kwargs)¶ Tetra (triangle in 3d) particle.
Overloaded function.

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

getCentroid
(self: woo.fem.Tetra) → _wooEigen11.Vector3¶ Return centroid of the tetrahedron

getVolume
(self: woo.fem.Tetra) → float¶ Return volume of the tetrahedron.

static
make
(vertices, fixed=True, wire=True, color=None, highlight=False, mat=<function defaultMaterial>, visible=True, mask=3, __class=<class 'woo.fem.Tetra'>)¶ Create tetrahedral particle

Tet4¶

class
woo.fem.
Tet4
(*args, **kwargs)¶ 4node linear interpolation tetrahedron element with bestfit corotated coordinates.
Overloaded function.

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

uXyz
(= VectorX())¶ Nodal displacements in local coordinates
[type: VectorXr, readonly in python]

KK
(= MatrixX())¶ Stiffness matrix
[type: MatrixXr, not shown in the UI, readonly in python]

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

ensureStiffnessMatrix
(self: woo.fem.Tet4, young: float, nu: float) → 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
(self: woo.fem.Tet4) → _wooEigen11.Matrix3¶

reset
(self: woo.fem.Tet4) → None¶

setRefConf
(self: woo.fem.Tet4) → None¶ Set the current configuration as the reference one

update
(self: woo.fem.Tet4) → None¶ Update current configuration; creates reference configuration if not existing

Bo1_Tetra_Aabb¶
Membrane¶
Object
→ Shape
→ Facet
→ Membrane

class
woo.fem.
Membrane
(*args, **kwargs)¶ 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
.Overloaded function.

node
(= <Node @ 0x17e4760, 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: Vector6r, readonly in python]

uXy
(= Vector6(0, 0, 0, 0, 0, 0))¶ Nodal displacements, stored as ux0, uy0, ux1, uy1, ux1, uy2.
[type: Vector6r, 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: Vector6r, readonly in python]

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

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

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: MatrixXr, 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: MatrixXr, readonly in python]

noWarnExcessRot
(= False)¶ Set to disable warning about excessive inplane rotation. Only do this if you know what you’re doing.
[type: bool]

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

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

stressCst
(self: woo.fem.Membrane, glob: bool = 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
(self: woo.fem.Membrane) → _wooEigen11.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
(self: woo.fem.Membrane, dt: float, rotIncr: bool = False) → None¶ Update current configuration; create reference configuration if it does not exist.
In2_Tet4_ElastMat¶
Object
→ Functor
→ IntraFunctor
→ In2_Tet4_ElastMat

class
woo.fem.
In2_Tet4_ElastMat
(*args, **kwargs)¶ Apply contact forces and compute internal response of a
Tet4
.Overloaded function.
__init__(self: woo.fem.In2_Tet4_ElastMat) > None
__init__(self: woo.fem.In2_Tet4_ElastMat, *args, **kwargs) > None

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]
Tip
Report issues or inclarities to github.