woo.fem

Inheritance diagram of woo.fem

Bo1_Tetra_Aabb

ObjectFunctorBoundFunctorBo1_Tetra_Aabb

class woo.fem.Bo1_Tetra_Aabb

Creates/updates an Aabb of a Tetra.

object __init__(tuple args, dict kwds)

[ pkg/fem/Tetra.hpp , pkg/fem/Tetra.cpp ]

In2_Tet4_ElastMat

ObjectFunctorIntraFunctorIn2_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, read-only 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

ObjectFunctorIntraFunctorIn2_FacetIn2_Membrane_ElastMat

digraph In2_Membrane_ElastMat {
        rankdir=LR;
        margin=.2;
        "In2_Membrane_ElastMat" [shape="box",fontsize=8,style="setlinewidth(0.5),solid",height=0.2,URL="woo.fem.html#woo.fem.In2_Membrane_ElastMat"];
        "In2_Membrane_FrictMat" [shape="box",fontsize=8,style="setlinewidth(0.5),solid",height=0.2,URL="woo.fem.html#woo.fem.In2_Membrane_ElastMat"];
        "In2_Membrane_ElastMat" -> "In2_Membrane_FrictMat" [arrowsize=0.5,style="setlinewidth(0.5)"]
}
class woo.fem.In2_Membrane_ElastMat

Apply contact forces and compute internal response of a Membrane. Forces are distributed according to barycentric coordinates when bending 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 setting applyBary, 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]

bendThickness(= nan)

Thickness for DKT stiffness computation; if NaN, use thickness.

[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

ObjectFunctorIntraFunctorIn2_FacetIn2_Membrane_ElastMatIn2_Membrane_FrictMat

class woo.fem.In2_Membrane_FrictMat

Workaround for current dispatching mechanism limitations so that membrane with woo.dem.FrictMat is not matched by woo.dem.In2_Facet.

object __init__(tuple args, dict kwds)

[ pkg/fem/Membrane.hpp ]

Membrane

ObjectShapeFacetMembrane

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 as KKcst.
  • The DKT element is implemented following the original paper by Batoz, Bathe and Ho A Study of three-node triangular plate bending elmenets, section 3.1. DKT displacement vector (with $z$-displacements condensed away) is stored in phiXy, the stiffness matrix in KKdkt.
  • Local coordinate system is established using Best Fit CD Frame in a non-incremental 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 non-viscous damping.

The element is assumed to be under plane-stress 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 and DemData.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>, read-only 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>, read-only in python]

refPos(= Vector6(0, 0, 0, 0, 0, 0))

Nodal coordinates in the local coordinate system, in the reference configuration

[type: Vector6, read-only in python]

uXy(= Vector6(0, 0, 0, 0, 0, 0))

Nodal displacements, stored as ux0, uy0, ux1, uy1, ux1, uy2.

[type: Vector6, read-only 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 in-plane rotations (drilling DOF not yet implemented)

[type: Vector6, read-only 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 and DBdkt when stiffness matricess are being computed. After than, using sigCST and sigDKT will return stresses.

[type: bool]

EBcst(= MatrixX())

CST displacement-stress matrix, for computation of stress tensor (see stressCst).

[type: MatrixX, read-only in python]

DBdkt(= MatrixX())

DKT displacement-stress matrix, for computation of stress tensor (see stressDkt.

Warning

This matrix is not computed correctly, therefore also stressDkt returns garbage.

[type: MatrixX, read-only 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 and uXy), provided that EBcst was computed previously by setting enableStress 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 and phiXy), see stressCst 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.

Tetra

ObjectShapeTetra

digraph Tetra {
        rankdir=LR;
        margin=.2;
        "Tetra" [shape="box",fontsize=8,style="setlinewidth(0.5),solid",height=0.2,URL="woo.fem.html#woo.fem.Tetra"];
        "Tet4" [shape="box",fontsize=8,style="setlinewidth(0.5),solid",height=0.2,URL="woo.fem.html#woo.fem.Tetra"];
        "Tetra" -> "Tet4" [arrowsize=0.5,style="setlinewidth(0.5)"]
}
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

ObjectShapeTetraTet4

class woo.fem.Tet4

4-node linear interpolation tetrahedron element with best-fit co-rotated coordinates.

object __init__(tuple args, dict kwds)

[ pkg/fem/Tetra.hpp , pkg/fem/Tetra.cpp ]

node(= None)

Local coordinate system

[type: shared_ptr<Node>, read-only in python]

refPos(= MatrixX())

Reference nodal positions in local coordinates

[type: MatrixX, read-only in python]

uXyz(= VectorX())

Nodal displacements in local coordinates

[type: VectorX, read-only in python]

KK(= MatrixX())

Stiffness matrix

[type: MatrixX, not shown in the UI, read-only in python]

EB(= MatrixX())

\(E B\) matrix, used to compute stresses from displacements.

[type: MatrixX, not shown in the UI, read-only 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.