Elements
Relevant module: edelweissfe.config.elementlibrary
EdelweissFE currently supports finite element implementations provided by the Marmot library. In future, elements by other providers or elements directly implemented in EdelweissFE may be added here.
*element, type=C3D8, provider=marmot
** el_label, node1, node2, node3, node4, ...
1000, 1, 2, 3, 4, ...
- edelweissfe.config.elementlibrary.getElementClass(elType, provider=None)[source]
Return the class implementing element type
elTypefor the givenprovider.providerselects a namespace, not a variant of one lookup, and is dispatched via an explicit table rather than the registry:marmotandmarmotsingleqpelementignoreelTypeentirely and return a single wrapper class that resolves the type at the Marmot boundary.The
edelweissprovider is resolved through the registry (elementcategory), keyed by element type, which lets a third party contribute an element type through an entry point.- Parameters:
elType (str) – A string identifying the requested element formulation.
provider (str) – The name of the element provider to load.
- Returns:
The element provider class type.
- Return type:
type
- Raises:
edelweissfe.config.registry.RegistryLookupError – If
providerisedelweissand no element is registered underelType.
Provider marmot
Relevant module: edelweissfe.elements.marmotelement.element
- class edelweissfe.elements.marmotelement.element.MarmotElementWrapper
This element serves as a wrapper for MarmotElements.
For the documentation of MarmotElements, please refer to Marmot.
- Parameters:
elementType – The Marmot element which should be represented, e.g., CPE4.
elNumber – The number of the element.
- Attributes:
couplesAllItsDofsTrue: the block is the densenDof x nDofmatrix, column-major.- dofIndicesPermutation
- elNumber
- elType
- ensightType
- fields
hasKernelsTrue: a Marmot element carries a material and a state; see BaseElement.hasKernels.
- hasMaterial
- nDof
- nNodes
- nSpatialDimensions
- nodeCoordinates
- nodes
propertyNamesGet the names of all the valid properties of the element.
- visualizationNodes
Methods
Accept the computed state (in nonlinear iteration schemes).
assignProperty(propertyName, properties)Assign a single property of the element by name.
computeBodyForce(P, K, load, U, time, dTime)Add the residual contribution of a body force, the negative of the external load, and its tangent.
Compute the consistent (full) mass matrix of the underlying MarmotElement.
Compute the critical time step for explicit dynamics of the underlying MarmotElement
computeDistributedLoad(loadType, P, K, ...)Add the residual contribution of a surface load, the negative of the external load, and its tangent.
Compute the internal energy of the underlying MarmotElement
computeKernels(Ke, Pe, U, dU, time, dTime)Evaluate residual and stiffness for given time, field, and field increment.
computeKernelsExplicit(Pe, U, dU, time, dTime)Evaluate residual and stiffness for given time, field, and field increment.
Compute the lumped damping of the underlying MarmotElement
Compute the lumped mass matrix of the underlying MarmotElement
Compute the underlying MarmotElement centroid coordinates.
Compute the underlying MarmotElement qp coordinates.
Compute the underlying MarmotElement qp coordinates.
Get the names of all the valid properties of the element.
getResultArray(result, quadraturePoint[, ...])Get the array of a result, possibly as a persistent view which is continiously updated by the underlying MarmotElement.
getStateVarSlice(name)Locate a named state variable within one per-quadrature-point state block.
Return a copy of the converged quadrature-point state-variable buffer.
Return the number of entries this entity contributes to the VIJ (COO) system matrix.
Let the underlying MarmotElement initialize itself
initializeVIJContribution(idcs, I_, J_, offset)Initialize the I and J arrays for the VIJ (COO) system matrix assembly.
Reset to the last valid state.
setInitialCondition(stateType, values)Assign initial conditions to the underlying Marmot element
setMaterial(materialName, materialProperties)Assign a material and material properties to the underlying MarmotElement.
setNodes(nodes)Assign the nodes coordinates to the underyling MarmotElement
setProperties(elementProperties)Assign a set of properties to the underyling MarmotElement
setStateVars(values)Overwrite the converged and trial state-variable buffers in place (so the MarmotElement's assigned pointer to the trial buffer stays valid).
shapeVIJContribution(flat_view)Keep the view flat for Cython 1-D memoryview compatibility.
updateMaterialProperty(index, value)Change one entry of the property vector of the material, keeping the state.
- acceptLastState()
Accept the computed state (in nonlinear iteration schemes).
- assignProperty(propertyName, properties)
Assign a single property of the element by name.
- computeBodyForce(P, K, load, U, time, dTime)
Add the residual contribution of a body force, the negative of the external load, and its tangent.
Marmot adds the external load itself, so it integrates into a buffer of its own, which is then subtracted: only this load’s contribution changes sign, whatever
Pholds already.
- computeConsistentInertia(M)
Compute the consistent (full) mass matrix of the underlying MarmotElement.
Written into
Min the element’s flatnDof * nDoflayout – the same layoutcomputeKernelswrites the stiffness into, so an entity slice of a VIJ system matrix can be handed over directly and the assembled mass shares the stiffness’ sparsity pattern.
- computeCriticalTimeStepForExplicitDynamics(Q)
Compute the critical time step for explicit dynamics of the underlying MarmotElement
- computeDistributedLoad(loadType, P, K, faceID, load, U, time, dTime)
Add the residual contribution of a surface load, the negative of the external load, and its tangent.
Marmot adds the external load itself, so it integrates into a buffer of its own, which is then subtracted: only this load’s contribution changes sign, whatever
Pholds already.
- computeInternalEnergy()
Compute the internal energy of the underlying MarmotElement
- computeKernels(Ke, Pe, U, dU, time, dTime)
Evaluate residual and stiffness for given time, field, and field increment.
- computeKernelsExplicit(Pe, U, dU, time, dTime)
Evaluate residual and stiffness for given time, field, and field increment.
- computeLumpedDamping(C)
Compute the lumped damping of the underlying MarmotElement
- computeLumpedInertia(M)
Compute the lumped mass matrix of the underlying MarmotElement
- getCoordinatesAtCenter()
Compute the underlying MarmotElement centroid coordinates.
- getCoordinatesAtQuadraturePoints()
Compute the underlying MarmotElement qp coordinates.
- getNumberOfQuadraturePoints()
Compute the underlying MarmotElement qp coordinates.
- getPropertyNames()
Get the names of all the valid properties of the element.
- getResultArray(result, quadraturePoint, getPersistentView=True)
Get the array of a result, possibly as a persistent view which is continiously updated by the underlying MarmotElement.
- getStateVarSlice(name)
Locate a named state variable within one per-quadrature-point state block.
Returns the (offset, size) of the named variable relative to the start of a per-quadrature- point block, computed from the pointer the MarmotElement hands out for quadrature point 0. Used by adaptive refinement to route different state variables to different transfer strategies (copy / project / reset).
- getStateVars()
Return a copy of the converged quadrature-point state-variable buffer.
- getVIJContributionSize()
Return the number of entries this entity contributes to the VIJ (COO) system matrix.
- Return type:
int
- initializeElement()
Let the underlying MarmotElement initialize itself
- initializeVIJContribution(idcs, I_, J_, offset)
Initialize the I and J arrays for the VIJ (COO) system matrix assembly.
- Parameters:
idcs (ndarray)
I_ (ndarray)
J_ (ndarray)
offset (int)
- Return type:
None
- resetToLastValidState()
Reset to the last valid state.
- setInitialCondition(stateType, values)
Assign initial conditions to the underlying Marmot element
- setMaterial(materialName, materialProperties)
Assign a material and material properties to the underlying MarmotElement. Furthermore, create two sets of state vars:
the actual set,
and a temporary set for backup in nonlinear iteration schemes.
- setNodes(nodes)
Assign the nodes coordinates to the underyling MarmotElement
- setProperties(elementProperties)
Assign a set of properties to the underyling MarmotElement
- setStateVars(values)
Overwrite the converged and trial state-variable buffers in place (so the MarmotElement’s assigned pointer to the trial buffer stays valid). Used by adaptive refinement to transfer history to child elements.
- shapeVIJContribution(flat_view)
Keep the view flat for Cython 1-D memoryview compatibility.
- Parameters:
flat_view (ndarray)
- Return type:
ndarray
- updateMaterialProperty(index, value)
Change one entry of the property vector of the material, keeping the state.
The underlying MarmotElement creates its materials anew from the modified property vector, which they keep a pointer to, and is handed the very same state variable arrays again. The state is neither reset nor re-initialized, and the arrays stay the same objects, so persistent result views remain valid.
- Parameters:
index – The index of the property in the material’s property vector.
value – The new value of the property.
- couplesAllItsDofs
the block is the dense
nDof x nDofmatrix, column-major.- Type:
True
- hasKernels
a Marmot element carries a material and a state; see BaseElement.hasKernels.
- Type:
True
- propertyNames
Get the names of all the valid properties of the element.
Provider marmotsingleqpelement
Relevant module: edelweissfe.elements.marmotsingleqpelement.element
- class edelweissfe.elements.marmotsingleqpelement.element.MarmotMaterialWrappingElement(materialType, elNumber)[source]
This element serves as a driver for MarmotMaterials, cf. Marmot.
It has a single quadrature point, and one (dummy) node. For interfacing with the different Marmot material base classes, specialized material drivers are used.
The element allows to run quadrature point simulations investigating materials for development purposes.
- Parameters:
materialType (str) – The Marmot material base class which should be driven, e.g., MarmotMaterialHypoElastic.
elNumber (int) – The number of the element.
- Attributes:
couplesAllItsDofsWhether the entity’s block couples every one of its degrees of freedom with every other one.
dofIndicesPermutationIf the provides computes residual vectors and stiffness matrices not nodewise, but e.g., fieldwise, this permutation pattern is used to aggregate all entries in order to resemble the defined fields nodewise.
elNumberThe unique number of this element
elTypeThe material driven at the single quadrature point stands for the element type.
ensightTypeThe shape of the element in Ensight Gold notation.
fieldsThe list of fields per node which this entity couples.
hasKernelsWhether this entity contributes to the internal force and carries a state of its own.
hasMaterialFlag to check if a material was assigned to this element.
initialVelocityThe element’s initial velocity, in DOF order, applied once as an initial condition at the start of an explicit simulation.
nDofThe total number of degrees of freedom this entity has.
nNodesThe number of nodes this entity couples.
- nSpatialDimensions
nodesThe list of nodes this currently entity holds.
propertyNamesGet the names of all the valid properties of the element.
visualizationNodesThe nodes for visualization.
Methods
Accept the computed state.
assignProperty(propertyName, properties)Assign a property of the element by name.
computeBodyForce(P, K, load, U, time, dTime)Not implemented for this driver.
computeConsistentInertia(M)Evaluate the consistent (full) inertia matrix of the element, over every field it carries.
Not implemented for this driver.
computeDistributedLoad(loadType, P, K, ...)Not implemented for this driver.
Not implemented for this driver.
computeKernels(Ke, Pe, U, dU, time, dTime)Add the internal forces to the residual, and their tangent, for given time, field, and field increment.
computeKernelsExplicit(Pe, U, dU, time, dTime)Evaluate the material for explicit dynamics, computing and discarding the tangent.
computeLumpedDamping(C)Evaluate the diagonal of the lumped damping of the element, over every field it carries.
Not implemented for this driver.
Return the only node's coordinates.
Return the only qp's coordinates.
Return the only qp's coordinates.
getPropertyNames()Get the names of all the valid properties of the element.
getResultArray(result, quadraturePoint[, ...])Get the array of a result, possibly as a persistent view which is continiously updated by the element.
getStateVarSlice(name)Locate a named state variable within a single per-quadrature-point state block.
Return a copy of the converged state-variable buffer.
getVIJContributionSize()Return the number of entries this entity contributes to the VIJ (COO) system matrix.
Not used by this driver
initializeVIJContribution(idcs, I_, J_, offset)Fill the global
IandJindex arrays for this constraint's VIJ contribution.Rest to the last valid state.
setInitialCondition(stateType, values)Assign initial conditions.
setMaterial(materialNameOrInstance[, ...])Assign a material to the underlying driver, either a Marmot material by name and properties, or an already constructed one (e.g. a native EdelweissFE material, honoring the same interface as its Marmot point-wise counterpart).
setNodes(nodes)Assign the nodes.
setProperties(elementProperties)Not used by this driver
setStateVars(values)Overwrite the converged and trial state-variable buffers in place (so the Marmot material wrapper's assigned pointer to the trial buffer stays valid).
shapeVIJContribution(flat_view)Shape the flat VIJ values slice for this entity.
updateMaterialProperty(index, value)Change one entry of the property vector of the driven material, keeping the state.
- computeBodyForce(P, K, load, U, time, dTime)[source]
Not implemented for this driver.
- Parameters:
P (ndarray)
K (ndarray)
load (ndarray)
U (ndarray)
time (float)
dTime (float)
- computeCriticalTimeStepForExplicitDynamics(Q)[source]
Not implemented for this driver.
- Parameters:
Q (ndarray)
- computeDistributedLoad(loadType, P, K, faceID, load, U, time, dTime)[source]
Not implemented for this driver.
- Parameters:
loadType (str)
P (ndarray)
K (ndarray)
faceID (int)
load (ndarray)
U (ndarray)
time (float)
dTime (float)
- computeKernels(Ke, Pe, U, dU, time, dTime)[source]
Add the internal forces to the residual, and their tangent, for given time, field, and field increment.
- Parameters:
K – The tangent
dP/dUto augment, the stiffness matrix.P – The residual contribution to augment, the internal forces \(\boldsymbol{f}_\mathrm{int}\).
U (ndarray) – The current solution vector.
dU (ndarray) – The current solution vector increment.
time (float) – The current time.
dTime (float) – The time increment.
Ke (ndarray)
Pe (ndarray)
- computeKernelsExplicit(Pe, U, dU, time, dTime)[source]
Evaluate the material for explicit dynamics, computing and discarding the tangent.
Unlike the native
MarmotElementWrapper, none of Marmot’s point-wisecomputeStress/computePlaneStress/computeUniaxialStressroutines this driver calls offer a tangent-free variant – the tangent is always computed as part of the same call that produces the stress, so there is currently no cheaper path available here.- Parameters:
Pe (ndarray)
U (ndarray)
dU (ndarray)
time (float)
dTime (float)
- getCoordinatesAtCenter()[source]
Return the only node’s coordinates.
- Returns:
The node’s coordinates.
- Return type:
np.ndarray
- getCoordinatesAtQuadraturePoints()[source]
Return the only qp’s coordinates.
- Returns:
The qp’s coordinates.
- Return type:
np.ndarray
- getNumberOfQuadraturePoints()[source]
Return the only qp’s coordinates.
- Returns:
The qp’s coordinates.
- Return type:
np.ndarray
- getResultArray(result, quadraturePoint, getPersistentView=True)[source]
Get the array of a result, possibly as a persistent view which is continiously updated by the element.
- Parameters:
result (str) – The name of the result.
quadraturePoint (int) – The number of the quadrature point.
getPersistentView (bool) – If true, the returned array should be continiously updated by the element.
- Returns:
The result.
- Return type:
np.ndarray
- setInitialCondition(stateType, values)[source]
Assign initial conditions.
- Parameters:
stateType – The type of initial state.
values – The numpy array describing the initial state.
- setMaterial(materialNameOrInstance, materialProperties=None)[source]
Assign a material to the underlying driver, either a Marmot material by name and properties, or an already constructed one (e.g. a native EdelweissFE material, honoring the same interface as its Marmot point-wise counterpart). Furthermore, create two sets of state vars:
the actual set,
and a temporary set for backup in nonlinear iteration schemes
- Parameters:
materialNameOrInstance – The name of the requested Marmot material, or an already constructed material.
materialProperties (ndarray) – The properties for the requested Marmot material; omitted when passing an already constructed material.
- Raises:
TypeError – If
materialNameOrInstanceis astrandmaterialPropertiesis missing, or if it is an already constructed material andmaterialPropertiesis given anyway – dispatching on type rather than only on whethermaterialPropertiesisNonecatches a caller passing a bare material name and forgetting the properties immediately, instead of silently storing the string as the “material” and failing much later with a confusingAttributeErrorout ofcomputeKernels.
- setNodes(nodes)[source]
Assign the nodes.
Only the first node is considered.
- Parameters:
nodes (list) – The list of node instances.
- setStateVars(values)[source]
Overwrite the converged and trial state-variable buffers in place (so the Marmot material wrapper’s assigned pointer to the trial buffer stays valid).
- Parameters:
values (ndarray)
- updateMaterialProperty(index, value)[source]
Change one entry of the property vector of the driven material, keeping the state.
The material is rebuilt from its modified property vector and handed the very same state variable arrays again, which are neither reset nor re-initialized. A characteristic element length communicated before is communicated to the rebuilt material again.
- Parameters:
index (int) – The index of the property in the material’s property vector.
value (float) – The new value of the property.
- property dofIndicesPermutation
If the provides computes residual vectors and stiffness matrices not nodewise, but e.g., fieldwise, this permutation pattern is used to aggregate all entries in order to resemble the defined fields nodewise.
For performance reasons, this is computed once and stored for later use.
- property elNumber
The unique number of this element
- property elType: str
The material driven at the single quadrature point stands for the element type.
- property ensightType
The shape of the element in Ensight Gold notation. Valid types are: point bar2 bar3 tria3 tria6 quad4 quad8 tetra4 tetra10 pyramid5 pyramid13 penta6 penta15 hexa8 hexa20 nsided nfaced
- property fields
The list of fields per node which this entity couples.
- property hasMaterial
Flag to check if a material was assigned to this element.
- property nDof
The total number of degrees of freedom this entity has. Not that this information is redundent, as it results from the list of fields on nodes, but we keep this redundant information for the sake of performance.
- property nNodes
The number of nodes this entity couples.
- property nodes
The list of nodes this currently entity holds.
testfiles/marmot/QPMarmotMaterialHypoElastic/test.inp*material, name=LinearElastic, id=myMaterial
**Isotropic
**E | nu |
1.8e4, 0.22
*section, name=section1, material=myMaterial, type=solid
all
*node
** this is our single dummy node, which carries the strain 'field'
1, 0, 0, 0
*element, provider=MarmotSingleQpElement, type=MarmotMaterialHypoElastic
** This is our mateiral wrapping element. It needs a dummy node to be attached
** to a spatial position.
** The type of the element actually specifies the type of requested MarmotMaterial
1, 1
*job, name=mySingleElementJob, domain=3d
*solver, solver=NIST, name=theSolver
*step, solver=theSolver
maxInc=1e0, minInc=1e0, maxNumInc=100, maxIter=25, stepLength=1
>>setinitialconditions, property=characteristic element length, values='100,'
>>dirichlet, name=prescribed_strain, nSet=all, field=strain symmetric, components='[ 0, x, x, 0, 0, 0 ]',
>>nodeforces, name=prescribed_stress, nSet=all, field=strain symmetric, components='[ x, 0, 0, x, x, x ]'
*step, solver=theSolver
maxInc=1e-1, minInc=1e0, maxNumInc=10, maxIter=25, stepLength=1
>>dirichlet, name=prescribed_strain, components='[ -0.2, x, x, 0, 0, 0 ]'
>>nodeforces, name=prescribed_stress, components='[ x, .1, .2, x, x, x ]'
*fieldOutput
>>perElement, name=stress, elSet=all, result=stress, quadraturePoint=0, saveHistory=True
>>perElement, name=strain, elSet=all, result=strain, quadraturePoint=0, saveHistory=True
>>perElement, name=dStress_dStrain, elSet=all, result=dStress_dStrain, quadraturePoint=0, saveHistory=True, f(x)="np.reshape(x, (6,-1), order='F')"
*output, type=monitor
fieldOutput=stress, f(x)="'\n' + np.array2string(x, formatter={'float_kind':'{:>8.2f}'.format})"
fieldOutput=strain, f(x)="'\n' + np.array2string(x, formatter={'float_kind':'{:>8.2f}'.format})"
fieldOutput=dStress_dStrain, f(x)="'\n' + np.array2string(x, formatter={'float_kind':'{:>8.2f}'.format})"
Provider edelweiss
The element type definition has to be of the following form:
Elements
One of the following element types needs to be included in the definition (type in .inp file).
CPE4 - quadrilateral 2D element with 4 nodes and plane strain.
CPE8 - quadrilateral 2D element with 8 nodes and plane strain.
CPS4 - quadrilateral 2D element with 4 nodes and plane stress.
CPS8 - quadrilateral 2D element with 8 nodes and plane stress.
C3D8 - hexahedron 3D element with 8 nodes.
C3D20 - hexahedron 3D element with 20 nodes.
Note
C3D8/C3D20 (and their TL counterparts) use the standard Abaqus node ordering
(corner ring 1-4 at \(\zeta=-1\), ring 5-8 at \(\zeta=+1\)), matching the marmot
provider’s elements – there is only one node-ordering convention across the framework.
additional Parameters
The following optional Parameters are also included in the element type definition:
R - reduced integration for element, at the end of elementType.
E - extended integration for element, at the end of elementType.
N - (optional) regular integration, at the end of elementType.
TL - use the total Lagrangian element, before integration type.
Common base
Both elements below share everything that does not depend on the kinematics – geometry and quadrature, material and quadrature-point state, loads, mass and result access – in a common base class. Each element adds only how strain and stress follow from the nodal displacements.
Relevant module: edelweissfe.elements.base.displacementelementbase
- class edelweissfe.elements.base.displacementelementbase.DisplacementElementBase(elementType, elNumber)[source]
Finite elements in EdelweissFE should be derived from this base class in order to follow the general interface.
Every method that computes a residual contribution
Pwith its tangentK = dP/dUfollows one rule (see The residual and the tangent):computeKernels()adds the internal forces, the load methodscomputeDistributedLoad()andcomputeBodyForce()add the negative of the external load. EdelweissFE expects the layout ofP(and ofK) to be of the form[ node 1 - dofs field 1, node 1 - dofs field 2, node 1 - ... , node 1 - dofs field n, node 2 - dofs field 1, ... , node N - dofs field n].
- Parameters:
elementType (str) – A string identifying the requested element formulation.
elNumber (int) – A unique integer label used for all kinds of purposes.
- Attributes:
couplesAllItsDofsWhether the entity’s block couples every one of its degrees of freedom with every other one.
dofIndicesPermutationThe permutation pattern for the residual vector and the stiffness matrix to aggregate all entries in order to resemble the defined fields nodewise.
elNumberThe unique number of this element
elTypeThe type of this element.
ensightTypeThe shape of the element in Ensight Gold notation.
fieldsThe list of fields per nodes.
hasKernelsWhether this entity contributes to the internal force and carries a state of its own.
hasMaterialFlag to check if a material was assigned to this element.
initialVelocityThe element’s initial velocity, in DOF order, applied once as an initial condition at the start of an explicit simulation.
nDofThe total number of degrees of freedom this element has
nNodesThe number of nodes this element requires
nodesThe list of nodes this element holds
propertyNamesGet the names of all the valid properties of the element.
visualizationNodesThe nodes for visualization.
Methods
Accept the computed state (in nonlinear iteration schemes).
assignProperty(propertyName, properties)Assign a property of the element by name.
computeBodyForce(P, K, load, U, time, dTime)Add the residual contribution of a body force, the negative of the external load \(-\int \boldsymbol{N}^T \boldsymbol{b} \, \mathrm{d}V\); a dead load, so its tangent is zero.
computeConsistentInertia(M)Evaluate the consistent (full) inertia matrix of the element, over every field it carries.
Compute the consistent mass matrix.
computeCriticalTimeStepForExplicitDynamics(Q)Evaluate the critical time step for explicit dynamics.
computeDistributedLoad(loadType, P, K, ...)Add the residual contribution of a surface load, the negative of the external load, and its tangent.
computeInternalEnergy()Evaluate the internal energy of the element.
computeKernels(K, P, U, dU, time, dT)Add the internal forces to the residual, and their tangent, for given time, field, and field increment.
computeKernelsExplicit(P, U, dU, time, dT)Add the internal forces to the residual for given time, field, and field increment, without a tangent.
computeLumpedDamping(C)Evaluate the diagonal of the lumped damping of the element, over every field it carries.
Compute the lumped mass matrix with simple row summing of the consistent mass matrix.
Compute the characteristic element length.
Compute the underlying MarmotElement centroid coordinates.
Compute the coordinates of the quadrature points.
Get the number of Quadrature points the element has.
Get the names of all the valid properties of the element.
getResultArray(result, quadraturePoint[, ...])Get the array of a result, possibly as a persistent view which is continiously updated by the element.
getStateVarSlice(name)Locate a named state variable within a single per-quadrature-point state block.
Return a copy of the converged quadrature-point state-variable buffer.
getVIJContributionSize()Return the number of entries this entity contributes to the VIJ (COO) system matrix.
initializeElement()Initalize the element to be ready for computing.
initializeVIJContribution(idcs, I_, J_, offset)Fill the global
IandJindex arrays for this constraint's VIJ contribution.Reset to the last valid state.
setInitialCondition(stateType, values)Assign initial conditions.
setMaterial(material)Assign a material.
setNodes(nodes)Assign the nodes to the element.
setProperties(elementProperties)Assign a set of properties to the element.
setStateVars(values)Overwrite the converged quadrature-point state-variable buffer in place, so the
_stateVarsper-quadrature-point views (stress/strain/materialstate) stay valid.shapeVIJContribution(flat_view)Shape the flat VIJ values slice for this entity.
updateMaterialProperty(index, value)Change one entry of the property vector of the assigned material, keeping the state.
- assignProperty(propertyName, properties)[source]
Assign a property of the element by name.
- Parameters:
propertyName (str)
properties (ndarray)
- computeBodyForce(P, K, load, U, time, dTime)[source]
Add the residual contribution of a body force, the negative of the external load \(-\int \boldsymbol{N}^T \boldsymbol{b} \, \mathrm{d}V\); a dead load, so its tangent is zero.
- Parameters:
P (ndarray) – The residual contribution to augment, \(-\boldsymbol{f}_\mathrm{ext}\).
K (ndarray) – The tangent
dP/dUto augment.load (ndarray) – The magnitude (or vector) describing the load.
U (ndarray) – The current solution vector.
time (float) – The current time.
dTime (float) – The time increment.
- computeConsistentMassMatrix(M)[source]
Compute the consistent mass matrix.
- Parameters:
M (ndarray) – The mass matrix to be defined.
- computeDistributedLoad(loadType, P, K, faceID, load, U, time, dTime)[source]
Add the residual contribution of a surface load, the negative of the external load, and its tangent.
- Parameters:
loadType (str) – The type of load.
P (ndarray) – The residual contribution to augment, \(-\boldsymbol{f}_\mathrm{ext}\).
K (ndarray) – The tangent
dP/dUto augment.faceID (int) – The number of the elements face this load acts on.
load (ndarray) – The magnitude (or vector) describing the load.
U (ndarray) – The current solution vector.
time (float) – The current time.
dTime (float) – The time increment.
- computeLumpedInertia(M)[source]
Compute the lumped mass matrix with simple row summing of the consistent mass matrix.
- Parameters:
M (ndarray) – The mass matrix to be defined.
- getCharacteristicElementLength(qp=0)[source]
Compute the characteristic element length. :param qp: The number of the quadrature point for which the characteristic element length should be computed. If not given, it is computed for the first quadrature point.
- Returns:
The characteristic element length.
- Return type:
l
- Parameters:
qp (int)
- getCoordinatesAtCenter()[source]
Compute the underlying MarmotElement centroid coordinates.
- Returns:
The element’s central coordinates.
- Return type:
np.ndarray
- getCoordinatesAtQuadraturePoints()[source]
Compute the coordinates of the quadrature points.
- Returns:
The coordinates, one row per quadrature point: shape
(nInt, nSpatialDimensions).- Return type:
np.ndarray
- getNumberOfQuadraturePoints()[source]
Get the number of Quadrature points the element has.
- Returns:
The number of Quadrature points.
- Return type:
nInt
- getPropertyNames()[source]
Get the names of all the valid properties of the element.
- Return type:
list[str]
- getResultArray(result, quadraturePoint, getPersistentView=True)[source]
Get the array of a result, possibly as a persistent view which is continiously updated by the element.
- Parameters:
result (str) – The name of the result.
quadraturePoint (int) – The number of the quadrature point.
getPersistentView (bool) – If true, the returned array should be continiously updated by the element.
- Returns:
The result.
- Return type:
np.ndarray
- getStateVars()[source]
Return a copy of the converged quadrature-point state-variable buffer.
- Return type:
ndarray
- setInitialCondition(stateType, values)[source]
Assign initial conditions.
- Parameters:
stateType (str) – The type of initial state.
values (ndarray) – The numpy array describing the initial state.
- setMaterial(material)[source]
Assign a material.
- Parameters:
material (type) – An initalized instance of a material.
- setNodes(nodes)[source]
Assign the nodes to the element.
- Parameters:
nodes (list[Node]) – A list of nodes.
- setProperties(elementProperties)[source]
Assign a set of properties to the element.
- Parameters:
elementProperties (ndarray) – A numpy array containing the element properties.
- thickness
Thickness of 2D elements.
- setStateVars(values)[source]
Overwrite the converged quadrature-point state-variable buffer in place, so the
_stateVarsper-quadrature-point views (stress/strain/materialstate) stay valid.The working buffer is seeded from it as well.
acceptLastState()copies_stateVarsTempover_stateVarsRef, and it can run before any element computation has populated that working buffer: both explicit solvers process a zero increment first, for whichcomputeYourself()is never called, and then accept it. On a resumed run that copied a freshly allocated buffer of zeros over the state just restored, silently discarding the whole quadrature-point history. A cold start never noticed, because there_stateVarsRefis zero anyway.- Parameters:
values (ndarray)
- updateMaterialProperty(index, value)[source]
Change one entry of the property vector of the assigned material, keeping the state.
The material instance is rebuilt from its modified property vector; the state lives in the arrays of this element, not in the material, and is handed to the material before every evaluation, so it is preserved as is.
- Parameters:
index (int) – The index of the property in the material’s property vector.
value (float) – The new value of the property.
- property dofIndicesPermutation: ndarray
The permutation pattern for the residual vector and the stiffness matrix to aggregate all entries in order to resemble the defined fields nodewise. In this case it stays the same because we use the nodes exactly like they are.
- property elNumber: int
The unique number of this element
- property elType: str
The type of this element.
- property ensightType: str
The shape of the element in Ensight Gold notation.
- property fields: list[list[str]]
The list of fields per nodes.
- property hasMaterial: str
Flag to check if a material was assigned to this element.
- property nDof: int
The total number of degrees of freedom this element has
- property nNodes: int
The number of nodes this element requires
- property nodes: int
The list of nodes this element holds
- property visualizationNodes: str
The nodes for visualization.
Geometrically linear element
This element uses a geometrically linear approach for the computation.
Relevant module: edelweissfe.elements.displacementelement.element
- class edelweissfe.elements.displacementelement.element.DisplacementElement(elementType, elNumber)[source]
Finite elements in EdelweissFE should be derived from this base class in order to follow the general interface.
Every method that computes a residual contribution
Pwith its tangentK = dP/dUfollows one rule (see The residual and the tangent):computeKernels()adds the internal forces, the load methodscomputeDistributedLoad()andcomputeBodyForce()add the negative of the external load. EdelweissFE expects the layout ofP(and ofK) to be of the form[ node 1 - dofs field 1, node 1 - dofs field 2, node 1 - ... , node 1 - dofs field n, node 2 - dofs field 1, ... , node N - dofs field n].
- Parameters:
elementType (str) – A string identifying the requested element formulation.
elNumber (int) – A unique integer label used for all kinds of purposes.
- Attributes:
couplesAllItsDofsWhether the entity’s block couples every one of its degrees of freedom with every other one.
dofIndicesPermutationThe permutation pattern for the residual vector and the stiffness matrix to aggregate all entries in order to resemble the defined fields nodewise.
elNumberThe unique number of this element
elTypeThe type of this element.
ensightTypeThe shape of the element in Ensight Gold notation.
fieldsThe list of fields per nodes.
hasKernelsWhether this entity contributes to the internal force and carries a state of its own.
hasMaterialFlag to check if a material was assigned to this element.
initialVelocityThe element’s initial velocity, in DOF order, applied once as an initial condition at the start of an explicit simulation.
nDofThe total number of degrees of freedom this element has
nNodesThe number of nodes this element requires
nodesThe list of nodes this element holds
propertyNamesGet the names of all the valid properties of the element.
visualizationNodesThe nodes for visualization.
Methods
acceptLastState()Accept the computed state (in nonlinear iteration schemes).
assignProperty(propertyName, properties)Assign a property of the element by name.
computeBodyForce(P, K, load, U, time, dTime)Add the residual contribution of a body force, the negative of the external load \(-\int \boldsymbol{N}^T \boldsymbol{b} \, \mathrm{d}V\); a dead load, so its tangent is zero.
computeConsistentInertia(M)Evaluate the consistent (full) inertia matrix of the element, over every field it carries.
computeConsistentMassMatrix(M)Compute the consistent mass matrix.
Evaluate the critical time step for explicit dynamics.
computeDistributedLoad(loadType, P, K, ...)Add the residual contribution of a surface load, the negative of the external load, and its tangent.
Evaluate the internal energy of the element.
computeKernels(K_, P, U, dU, time, dTime)Evaluate the residual and stiffness matrix for given time, field, and field increment due to a displacement or load.
computeKernelsExplicit(P, U, dU, time, dTime)Evaluate the residual for given time, field, and field increment due to a displacement or load.
computeLumpedDamping(C)Evaluate the diagonal of the lumped damping of the element, over every field it carries.
computeLumpedInertia(M)Compute the lumped mass matrix with simple row summing of the consistent mass matrix.
getCharacteristicElementLength([qp])Compute the characteristic element length.
getCoordinatesAtCenter()Compute the underlying MarmotElement centroid coordinates.
getCoordinatesAtQuadraturePoints()Compute the coordinates of the quadrature points.
getNumberOfQuadraturePoints()Get the number of Quadrature points the element has.
getPropertyNames()Get the names of all the valid properties of the element.
getResultArray(result, quadraturePoint[, ...])Get the array of a result, possibly as a persistent view which is continiously updated by the element.
getStateVarSlice(name)Locate a named state variable within a single per-quadrature-point state block.
getStateVars()Return a copy of the converged quadrature-point state-variable buffer.
getVIJContributionSize()Return the number of entries this entity contributes to the VIJ (COO) system matrix.
Initalize the element to be ready for computing.
initializeVIJContribution(idcs, I_, J_, offset)Fill the global
IandJindex arrays for this constraint's VIJ contribution.resetToLastValidState()Reset to the last valid state.
setInitialCondition(stateType, values)Assign initial conditions.
setMaterial(material)Assign a material and allocate the small-strain material tangent dStress/dStrain.
setNodes(nodes)Assign the nodes to the element.
setProperties(elementProperties)Assign a set of properties to the element.
setStateVars(values)Overwrite the converged quadrature-point state-variable buffer in place, so the
_stateVarsper-quadrature-point views (stress/strain/materialstate) stay valid.shapeVIJContribution(flat_view)Shape the flat VIJ values slice for this entity.
updateMaterialProperty(index, value)Change one entry of the property vector of the assigned material, keeping the state.
- computeCriticalTimeStepForExplicitDynamics(Q)[source]
Evaluate the critical time step for explicit dynamics. :param Q: The current solution vector, which might be needed to compute the critical time step due to nonlinearities.
- Returns:
The critical time step.
- Return type:
float
- Parameters:
Q (ndarray)
- computeInternalEnergy()[source]
Evaluate the internal energy of the element.
- Returns:
The internal energy.
- Return type:
float
- computeKernels(K_, P, U, dU, time, dTime)[source]
Evaluate the residual and stiffness matrix for given time, field, and field increment due to a displacement or load.
- Parameters:
P (ndarray) – The residual contribution to augment, the internal forces.
K – The stiffness matrix gets calculated.
U (ndarray) – The current solution vector.
dU (ndarray) – The current solution vector increment.
time (float) – The current time.
dTime (float) – The time increment.
K_ (ndarray)
- computeKernelsExplicit(P, U, dU, time, dTime)[source]
Evaluate the residual for given time, field, and field increment due to a displacement or load.
- Parameters:
P (ndarray) – The residual contribution to augment, the internal forces.
U (ndarray) – The current solution vector.
dU (ndarray) – The current solution vector increment.
time (float) – The current time.
dTime (float) – The time increment.
Note
If R or E is not given by the user, we assume regular integration.
Example of the usage of a quadrilateral element with 4 nodes, regular integration and plane strain.
examples/CantileverBeam/test4.inp** cantilever beam, steel, l=10000mm, h=100mm, b=40mm, calculation in [N/mm²]
*material, name=linearelastic, id=linearelastic, provider=edelweiss
** elasticity module and poisson's ratio
210000.0, 0.15
*section, name=section1, thickness=40.0, material=linearelastic, type=plane
** assign section with 40mm thickness and linear elastic to all elements
all
** make job
*job, name=cps4job, domain=2d
** choose solver
*solver, solver=NIST, name=theSolver
*fieldOutput
>>perNode, nSet=gen_bottom, result=P, field=displacement, name=RF
** displacement output for all elements
>>perNode, elSet=all, field=displacement, result=U, name=displacement
*modelGenerator, generator=planeRectQuad, name=gen
** create model: length 10000mm, height 100mm with 300 elements in l direction and 4 in h direction
x0=0, l=10000
y0=0, h=100
elType=CPE4
** quadrilateral element with 4 nodes, normal integration and plane strain
** set provider
elProvider=edelweiss
nX=300
nY=4
*output, type=monitor
fieldOutput=RF, f(x)='mean(x[:,1])'
** create output data to open with paraview
*output, type=ensight, name=esExport
>>configuration, overwrite=yes
>>perNode, fieldOutput=displacement
** set steps with size between 1 and 1e-8, 1000 iterations and max 25 iterations
*step, solver=theSolver
maxInc=1e-0, minInc=1e-8, maxNumInc=1000, maxIter=25, stepLength=100
** fix one side (fixed support)
>>dirichlet, name=left, nSet=gen_left, field=displacement, 2=0, 1=0
** set load -1000N in one point down
>>nodeforces, name=cloadTop, nSet=gen_rightTop, components='0,-1000', field=displacement
Example of the usage of a quadrilateral element with 8 nodes, regular integration and plane strain for the same example.
examples/CantileverBeam/test8.inp** cantilever beam, steel, l=10000mm, h=100mm, b=40mm, calculation in [N/mm²]
*material, name=linearelastic, id=linearelastic, provider=edelweiss
** elasticity module and poisson's ratio
210000.0, 0.15
*section, name=section1, thickness=40.0, material=linearelastic, type=plane
** assign section with 40mm thickness and linear elastic to all elements
all
** make job
*job, name=cps4job, domain=2d
** choose solver
*solver, solver=NIST, name=theSolver
*fieldOutput
>>perNode, nSet=gen_bottom, result=P, field=displacement, name=RF
** displacement output for all elements
>>perNode, elSet=all, field=displacement, result=U, name=displacement
*modelGenerator, generator=planeRectQuad, name=gen
** create model: length 10000mm, height 100mm with 300 elements in l direction and 4 in h direction
x0=0, l=10000
y0=0, h=100
elType=CPE8N
** quadrilateral element with 4 nodes, normal integration and plane strain
** set provider
elProvider=edelweiss
nX=300
nY=4
*output, type=monitor
fieldOutput=RF, f(x)='mean(x[:,1])'
** create output data to open with paraview
*output, type=ensight, name=esExport
>>configuration, overwrite=yes
>>perNode, fieldOutput=displacement
** set steps with size between 1 and 1e-8, 1000 iterations and max 25 iterations with step length 100
*step, solver=theSolver
maxInc=1e-0, minInc=1e-8, maxNumInc=1000, maxIter=25, stepLength=100
** fix one side (fixed support)
>>dirichlet, name=left, nSet=gen_left, field=displacement, 2=0, 1=0
** set load -1000N in one point down
>>nodeforces, name=cloadTop, nSet=gen_rightTop, components='0,-1000', field=displacement
Example of the usage of a 3D hexahedron element with 8 nodes.
examples/CantileverBeam/test3D.inp*material, name=LinearElastic, id=linearelastic, provider=edelweiss
**Isotropic material
**E nu -> elasticity module and poisson's ratio
1.8e4, 0.22
** make job
*job, name=c3d8job, domain=3d
** choose solver
*solver, solver=NIST, name=theSolver
*modelGenerator, generator=boxGen, name=gen
** set number of elements for directions: 400, 4, 4
nX =400
nY =4
nZ =4
** create model: length 500mm, with section of 5mm x 5mm
lX =500
lY =5
lZ =5
** use provider: edelweiss
elProvider =edelweiss
** use hexahedron element with 8 nodes and normal integration
elType =C3D8
*section, name=section1, material=linearelastic, type=solid
** assign linear elastic section to all elements
all
** displacement output for all elements
*fieldOutput
>>perNode, elSet=all, field=displacement, result=U, name=displacement
** create output data to open with paraview
*output, type=ensight, name=test
>>perNode, fieldOutput=displacement
>>configuration, overwrite=yes
** set step size between 1 and 1e-9, 1000 iterations, 25 max iterations and step length 1
*step, solver=theSolver
maxInc=1e0, minInc=1e-9, maxNumInc=1000, maxIter=25, stepLength=1
>>options, name=theSolver, extrapolation=off
** fix one side (fixed support)
>>dirichlet, name=Left, nSet=gen_left, field=displacement, 1=0.0, 2=0.0, 3=.0
** set load in z to 0.012N for all the points on right back
>>nodeforces, name=cloadTop, nSet=gen_rightBack, components='0, 0, .012', field=displacement
Note
This element is only compatible with the material provider edelweiss!
Note
This element works with the Cauchy stress \(\sigma\) and the tangent \(\frac{d\sigma}{d\varepsilon}\), where \(\varepsilon\) stands for the linearized strain tensor!
Total Lagrange element
This element is geometrically nonlinear and uses the total Lagrange algorithm for finite strain.
Relevant module: edelweissfe.elements.displacementtlelement.element
- class edelweissfe.elements.displacementtlelement.element.DisplacementTLElement(elementType, elNumber)[source]
Finite elements in EdelweissFE should be derived from this base class in order to follow the general interface.
Every method that computes a residual contribution
Pwith its tangentK = dP/dUfollows one rule (see The residual and the tangent):computeKernels()adds the internal forces, the load methodscomputeDistributedLoad()andcomputeBodyForce()add the negative of the external load. EdelweissFE expects the layout ofP(and ofK) to be of the form[ node 1 - dofs field 1, node 1 - dofs field 2, node 1 - ... , node 1 - dofs field n, node 2 - dofs field 1, ... , node N - dofs field n].
- Parameters:
elementType (str) – A string identifying the requested element formulation.
elNumber (int) – A unique integer label used for all kinds of purposes.
- Attributes:
couplesAllItsDofsWhether the entity’s block couples every one of its degrees of freedom with every other one.
dofIndicesPermutationThe permutation pattern for the residual vector and the stiffness matrix to aggregate all entries in order to resemble the defined fields nodewise.
elNumberThe unique number of this element
elTypeThe type of this element.
ensightTypeThe shape of the element in Ensight Gold notation.
fieldsThe list of fields per nodes.
hasKernelsWhether this entity contributes to the internal force and carries a state of its own.
hasMaterialFlag to check if a material was assigned to this element.
initialVelocityThe element’s initial velocity, in DOF order, applied once as an initial condition at the start of an explicit simulation.
nDofThe total number of degrees of freedom this element has
nNodesThe number of nodes this element requires
nodesThe list of nodes this element holds
propertyNamesGet the names of all the valid properties of the element.
visualizationNodesThe nodes for visualization.
Methods
Accept the computed state (in nonlinear iteration schemes), including the Green-Lagrange strain.
assignProperty(propertyName, properties)Assign a property of the element by name.
computeBodyForce(P, K, load, U, time, dTime)Add the residual contribution of a body force, the negative of the external load \(-\int \boldsymbol{N}^T \boldsymbol{b} \, \mathrm{d}V\); a dead load, so its tangent is zero.
computeConsistentInertia(M)Evaluate the consistent (full) inertia matrix of the element, over every field it carries.
computeConsistentMassMatrix(M)Compute the consistent mass matrix.
Evaluate the critical time step for explicit dynamics.
computeDistributedLoad(loadType, P, K, ...)Add the residual contribution of a surface load, the negative of the external load, and its tangent.
Compute the internal energy of the element.
computeKernels(K_, P, U, dU, time, dTime)Evaluate the residual and stiffness matrix for given time, field, and field increment due to a displacement or load.
computeKernelsExplicit(P, U, dU, time, dTime)Evaluate the residual for given time, field, and field increment due to a displacement or load.
computeLumpedDamping(C)Evaluate the diagonal of the lumped damping of the element, over every field it carries.
computeLumpedInertia(M)Compute the lumped mass matrix with simple row summing of the consistent mass matrix.
getCharacteristicElementLength([qp])Compute the characteristic element length.
getCoordinatesAtCenter()Compute the underlying MarmotElement centroid coordinates.
getCoordinatesAtQuadraturePoints()Compute the coordinates of the quadrature points.
getNumberOfQuadraturePoints()Get the number of Quadrature points the element has.
getPropertyNames()Get the names of all the valid properties of the element.
getResultArray(result, quadraturePoint[, ...])Get the array of a result, possibly as a persistent view which is continiously updated by the element.
getStateVarSlice(name)Locate a named state variable within a single per-quadrature-point state block.
Return a copy of the converged quadrature-point state-variable buffer, including the converged Green-Lagrange strain (
_Eold) needed to resume the total-Lagrangian incremental-strain computation.getVIJContributionSize()Return the number of entries this entity contributes to the VIJ (COO) system matrix.
Initalize the element to be ready for computing.
initializeVIJContribution(idcs, I_, J_, offset)Fill the global
IandJindex arrays for this constraint's VIJ contribution.resetToLastValidState()Reset to the last valid state.
setInitialCondition(stateType, values)Assign initial conditions.
setMaterial(material)Assign a material and allocate its material tangent: dStress/dDeformationGradient for a hyperelastic material, dStress/dStrain otherwise.
setNodes(nodes)Assign the nodes to the element.
setProperties(elementProperties)Assign a set of properties to the element.
setStateVars(values)Overwrite the converged quadrature-point state-variable buffer and
_Eoldin place.shapeVIJContribution(flat_view)Shape the flat VIJ values slice for this entity.
updateMaterialProperty(index, value)Change one entry of the property vector of the assigned material, keeping the state.
- acceptLastState()[source]
Accept the computed state (in nonlinear iteration schemes), including the Green-Lagrange strain.
- computeCriticalTimeStepForExplicitDynamics(Q)[source]
Evaluate the critical time step for explicit dynamics. :param Q: The current solution vector, which might be needed to compute the critical time step due to nonlinearities.
- Returns:
The critical time step.
- Return type:
float
- Parameters:
Q (ndarray)
- computeInternalEnergy()[source]
Compute the internal energy of the element.
- Returns:
The internal energy of the element.
- Return type:
energy
- computeKernels(K_, P, U, dU, time, dTime)[source]
Evaluate the residual and stiffness matrix for given time, field, and field increment due to a displacement or load.
- Parameters:
P (ndarray) – The residual contribution to augment, the internal forces.
K – The stiffness matrix gets calculated.
U (ndarray) – The current solution vector.
dU (ndarray) – The current solution vector increment.
time (float) – The current time.
dTime (float) – The time increment.
K_ (ndarray)
- computeKernelsExplicit(P, U, dU, time, dTime)[source]
Evaluate the residual for given time, field, and field increment due to a displacement or load.
- Parameters:
P (ndarray) – The residual contribution to augment, the internal forces.
U (ndarray) – The current solution vector.
dU (ndarray) – The current solution vector increment.
time (float) – The current time.
dTime (float) – The time increment.
- getStateVars()[source]
Return a copy of the converged quadrature-point state-variable buffer, including the converged Green-Lagrange strain (
_Eold) needed to resume the total-Lagrangian incremental-strain computation.- Return type:
ndarray
- setMaterial(material)[source]
Assign a material and allocate its material tangent: dStress/dDeformationGradient for a hyperelastic material, dStress/dStrain otherwise.
- Parameters:
material (type) – An initalized instance of a material.
- setStateVars(values)[source]
Overwrite the converged quadrature-point state-variable buffer and
_Eoldin place.The working buffers are seeded from them as well.
acceptLastState()copies_stateVarsTempover_stateVarsRefand_Eover_Eold, and it can run before any element computation has populated either: both explicit solvers process a zero increment first, for whichcomputeYourself()is never called, and then accept it. On a resumed run that copied freshly allocated buffers of zeros over the state just restored, discarding both the quadrature-point history and the converged Green-Lagrange strain the total-Lagrangian incremental-strain computation resumes from. A cold start never noticed, because there both buffers are zero anyway.- Parameters:
values (ndarray)
Note
This element is only compatible with the material provider edelweiss!
Note
For hyperelastic materials, this element works with the second Piola-Kirchhoff stress \(\mathbf{S}\) and the tangent \(\frac{d\mathbf{S}}{d\mathbf{E}}\), where \(\mathbf{E}\) stands for the Green-Lagrange strain tensor!
For other materials, this element works with the Kirchhoff stress \(\tau\) and the tangent \(\frac{d\tau}{d\mathbf{F}}\), where \(\mathbf{F}\) stands for the deformation gradient!
Contact facet elements
Relevant module: edelweissfe.elements.contactsurfaceelement
Thin, material-less, volume-less elements (Tria3ContactFacet/Line2ContactFacet) sharing the
ordinary displacement DOFs of a deformable body’s boundary nodes, used as the master side of
node-to-deformable-surface contact. Not user-constructed directly – see the
surfaceElementGenerator generator.
Because a facet has neither a material nor a state, its kernels, its internal energy and its state
acceptance are all no-ops, and it reports hasKernels = False. Solvers that would otherwise call
into every entry of the element container on every increment – the explicit dynamic solver does –
use that to leave the facets out of the element loop rather than calling into them for nothing.
An element of your own needs to do nothing here: BaseElement
reports True, which is right for any element that carries a material.
- class edelweissfe.elements.contactsurfaceelement.Tria3ContactFacet(elementType, elNumber)[source]
Finite elements in EdelweissFE should be derived from this base class in order to follow the general interface.
Every method that computes a residual contribution
Pwith its tangentK = dP/dUfollows one rule (see The residual and the tangent):computeKernels()adds the internal forces, the load methodscomputeDistributedLoad()andcomputeBodyForce()add the negative of the external load. EdelweissFE expects the layout ofP(and ofK) to be of the form[ node 1 - dofs field 1, node 1 - dofs field 2, node 1 - ... , node 1 - dofs field n, node 2 - dofs field 1, ... , node N - dofs field n].
- Parameters:
elementType (str) – A string identifying the requested element formulation.
elNumber (int) – A unique integer label used for all kinds of purposes.
- Attributes:
couplesAllItsDofsWhether the entity’s block couples every one of its degrees of freedom with every other one.
dofIndicesPermutationIf the provides computes residual vectors and stiffness matrices not nodewise, but e.g., fieldwise, this permutation pattern is used to aggregate all entries in order to resemble the defined fields nodewise.
elNumberThe unique number of this element
elTypeThe type of this element.
ensightTypeThe shape of the element in Ensight Gold notation.
fieldsThe list of fields per node which this entity couples.
hasKernelsWhether this entity contributes to the internal force and carries a state of its own.
hasMaterialFlag to check if a material was assigned to this element.
initialVelocityThe element’s initial velocity, in DOF order, applied once as an initial condition at the start of an explicit simulation.
nDofThe total number of degrees of freedom this entity has.
nNodesThe number of nodes this entity couples.
nodalAreaSharesPer-node tributary area shares of this facet (aligned with
nodes); summing them over all facets of a surface yields each node’s consistent tributary area for a uniform pressure.nodesThe list of nodes this currently entity holds.
parentFaceNodesThe parent face’s nodes in canonical order, or None if this facet was never stamped.
parentFaceTypeThe parent face’s canonical type, or None if this facet was never stamped.
propertyNamesGet the names of all the valid properties of the element.
vertexParametricCoordsThis facet’s own nodes’ parametric coordinates in the parent face, aligned with
nodes; a quadrature point at barycentricbsits atb @ vertexParametricCoords.visualizationNodesThe nodes for visualization.
weightTransformThe linear map applied to this facet’s contact-point interpolation weights before they distribute a slave force to this facet’s nodes, or
Nonefor the plain (barycentric) distribution.
Methods
acceptLastState()Accept the computed state (in nonlinear iteration schemes).
assignProperty(propertyName, properties)Assign a property of the element by name.
computeBodyForce(P, K, load, U, time, dTime)Add the residual contribution of a body force, the negative of the external load \(-\boldsymbol{f}_\mathrm{ext}\), and its tangent, which is zero for a dead load.
computeConsistentInertia(M)Evaluate the consistent (full) inertia matrix of the element, over every field it carries.
computeCriticalTimeStepForExplicitDynamics(Q)Evaluate the critical time step for explicit dynamics.
computeDistributedLoad(loadType, P, K, ...)Add the residual contribution of a surface load, the negative of the external load \(-\boldsymbol{f}_\mathrm{ext}\), and its tangent, which is nonzero only for a load that follows the deformation (e.g. a pressure on the current surface).
computeInternalEnergy()Evaluate the internal energy of the element.
computeKernels(K, P, U, dU, time, dT)Add the internal forces to the residual, and their tangent, for given time, field, and field increment.
computeKernelsExplicit(P, U, dU, time, dT)Add the internal forces to the residual for given time, field, and field increment, without a tangent.
computeLumpedDamping(C)Evaluate the diagonal of the lumped damping of the element, over every field it carries.
computeLumpedInertia(M)Evaluate the diagonal of the lumped inertia of the element, over every field it carries.
getCoordinatesAtCenter()Compute the underlying MarmotElement centroid coordinates.
getCoordinatesAtQuadraturePoints()Compute the underlying MarmotElement qp coordinates.
getNumberOfQuadraturePoints()Compute the underlying MarmotElement qp coordinates.
getPropertyNames()Get the names of all the valid properties of the element.
getResultArray(result, quadraturePoint[, ...])Only reference-configuration diagnostics are available here (this element never updates any state from the current solution) -- the contact constraint itself computes current-configuration normals/positions directly from the live solution vector.
getStateVarSlice(name)Locate a named state variable within a single per-quadrature-point state block.
getStateVars()This element carries no state from one increment to the next.
getVIJContributionSize()Return the number of entries this entity contributes to the VIJ (COO) system matrix.
initializeElement()Initalize the element to be ready for computing.
initializeVIJContribution(idcs, I_, J_, offset)Fill the global
IandJindex arrays for this constraint's VIJ contribution.resetToLastValidState()Rest to the last valid state.
setInitialCondition(stateType, values)Assign initial conditions.
setMaterial(materialName, materialProperties)Assign a material and material properties.
setNodes(nodes)Assign the nodes to the element.
setParentFace(faceType, parentFaceNodes, ...)Record the element face this facet was cut from.
setProperties(elementProperties)Assign a set of properties to the element.
setStateVars(values)Nothing to restore: this element carries no state.
setWeightTransform(transform)Install (or clear, with
None) this facet's weight transform.shapeVIJContribution(flat_view)Shape the flat VIJ values slice for this entity.
updateMaterialProperty(index, value)Change one entry of the property vector of the assigned material, during an analysis.
setNodalAreaShares
- class edelweissfe.elements.contactsurfaceelement.Line2ContactFacet(elementType, elNumber)[source]
Finite elements in EdelweissFE should be derived from this base class in order to follow the general interface.
Every method that computes a residual contribution
Pwith its tangentK = dP/dUfollows one rule (see The residual and the tangent):computeKernels()adds the internal forces, the load methodscomputeDistributedLoad()andcomputeBodyForce()add the negative of the external load. EdelweissFE expects the layout ofP(and ofK) to be of the form[ node 1 - dofs field 1, node 1 - dofs field 2, node 1 - ... , node 1 - dofs field n, node 2 - dofs field 1, ... , node N - dofs field n].
- Parameters:
elementType (str) – A string identifying the requested element formulation.
elNumber (int) – A unique integer label used for all kinds of purposes.
- Attributes:
couplesAllItsDofsWhether the entity’s block couples every one of its degrees of freedom with every other one.
dofIndicesPermutationIf the provides computes residual vectors and stiffness matrices not nodewise, but e.g., fieldwise, this permutation pattern is used to aggregate all entries in order to resemble the defined fields nodewise.
elNumberThe unique number of this element
elTypeThe type of this element.
ensightTypeThe shape of the element in Ensight Gold notation.
fieldsThe list of fields per node which this entity couples.
hasKernelsWhether this entity contributes to the internal force and carries a state of its own.
hasMaterialFlag to check if a material was assigned to this element.
initialVelocityThe element’s initial velocity, in DOF order, applied once as an initial condition at the start of an explicit simulation.
nDofThe total number of degrees of freedom this entity has.
nNodesThe number of nodes this entity couples.
nodalAreaSharesPer-node tributary area shares of this facet (aligned with
nodes); summing them over all facets of a surface yields each node’s consistent tributary area for a uniform pressure.nodesThe list of nodes this currently entity holds.
parentFaceNodesThe parent face’s nodes in canonical order, or None if this facet was never stamped.
parentFaceTypeThe parent face’s canonical type, or None if this facet was never stamped.
propertyNamesGet the names of all the valid properties of the element.
vertexParametricCoordsThis facet’s own nodes’ parametric coordinates in the parent face, aligned with
nodes; a quadrature point at barycentricbsits atb @ vertexParametricCoords.visualizationNodesThe nodes for visualization.
weightTransformThe linear map applied to this facet’s contact-point interpolation weights before they distribute a slave force to this facet’s nodes, or
Nonefor the plain (barycentric) distribution.
Methods
acceptLastState()Accept the computed state (in nonlinear iteration schemes).
assignProperty(propertyName, properties)Assign a property of the element by name.
computeBodyForce(P, K, load, U, time, dTime)Add the residual contribution of a body force, the negative of the external load \(-\boldsymbol{f}_\mathrm{ext}\), and its tangent, which is zero for a dead load.
computeConsistentInertia(M)Evaluate the consistent (full) inertia matrix of the element, over every field it carries.
computeCriticalTimeStepForExplicitDynamics(Q)Evaluate the critical time step for explicit dynamics.
computeDistributedLoad(loadType, P, K, ...)Add the residual contribution of a surface load, the negative of the external load \(-\boldsymbol{f}_\mathrm{ext}\), and its tangent, which is nonzero only for a load that follows the deformation (e.g. a pressure on the current surface).
computeInternalEnergy()Evaluate the internal energy of the element.
computeKernels(K, P, U, dU, time, dT)Add the internal forces to the residual, and their tangent, for given time, field, and field increment.
computeKernelsExplicit(P, U, dU, time, dT)Add the internal forces to the residual for given time, field, and field increment, without a tangent.
computeLumpedDamping(C)Evaluate the diagonal of the lumped damping of the element, over every field it carries.
computeLumpedInertia(M)Evaluate the diagonal of the lumped inertia of the element, over every field it carries.
getCoordinatesAtCenter()Compute the underlying MarmotElement centroid coordinates.
getCoordinatesAtQuadraturePoints()Compute the underlying MarmotElement qp coordinates.
getNumberOfQuadraturePoints()Compute the underlying MarmotElement qp coordinates.
getPropertyNames()Get the names of all the valid properties of the element.
getResultArray(result, quadraturePoint[, ...])Only reference-configuration diagnostics are available here (this element never updates any state from the current solution) -- the contact constraint itself computes current-configuration normals/positions directly from the live solution vector.
getStateVarSlice(name)Locate a named state variable within a single per-quadrature-point state block.
getStateVars()This element carries no state from one increment to the next.
getVIJContributionSize()Return the number of entries this entity contributes to the VIJ (COO) system matrix.
initializeElement()Initalize the element to be ready for computing.
initializeVIJContribution(idcs, I_, J_, offset)Fill the global
IandJindex arrays for this constraint's VIJ contribution.resetToLastValidState()Rest to the last valid state.
setInitialCondition(stateType, values)Assign initial conditions.
setMaterial(materialName, materialProperties)Assign a material and material properties.
setNodes(nodes)Assign the nodes to the element.
setParentFace(faceType, parentFaceNodes, ...)Record the element face this facet was cut from.
setProperties(elementProperties)Assign a set of properties to the element.
setStateVars(values)Nothing to restore: this element carries no state.
setWeightTransform(transform)Install (or clear, with
None) this facet's weight transform.shapeVIJContribution(flat_view)Shape the flat VIJ values slice for this entity.
updateMaterialProperty(index, value)Change one entry of the property vector of the assigned material, during an analysis.
setNodalAreaShares
Implementing your own elements
Relevant module: edelweissfe.elements.base.baseelement
An element follows the rule every entity of the equation system follows (see
The residual and the tangent): each method adds a residual contribution P and its tangent
K = dP/dU. computeKernels(K, P, U, dU, time, dT) adds the internal forces and the stiffness matrix – the
tangent comes first in its arguments; the load methods computeDistributedLoad and computeBodyForce add the
negative of the external load, and its tangent if the load follows the deformation.
An element carrying a material should also implement
updateMaterialProperty(), through which the
changeMaterialProperty step action changes a material property during an
analysis. Unlike setMaterial, it must keep the element’s state: neither reset nor re-initialize the
state variables, and keep the arrays holding them, which field outputs keep viewing.
Implementing your own finite elements can be done easily by subclassing from
the abstract base class BaseElement.
- class edelweissfe.elements.base.baseelement.BaseElement(elementType, elNumber)[source]
Finite elements in EdelweissFE should be derived from this base class in order to follow the general interface.
Every method that computes a residual contribution
Pwith its tangentK = dP/dUfollows one rule (see The residual and the tangent):computeKernels()adds the internal forces, the load methodscomputeDistributedLoad()andcomputeBodyForce()add the negative of the external load. EdelweissFE expects the layout ofP(and ofK) to be of the form[ node 1 - dofs field 1, node 1 - dofs field 2, node 1 - ... , node 1 - dofs field n, node 2 - dofs field 1, ... , node N - dofs field n].
- Parameters:
elementType (str) – A string identifying the requested element formulation.
elNumber (int) – A unique integer label used for all kinds of purposes.
- Attributes:
couplesAllItsDofsWhether the entity’s block couples every one of its degrees of freedom with every other one.
dofIndicesPermutationIf the provides computes residual vectors and stiffness matrices not nodewise, but e.g., fieldwise, this permutation pattern is used to aggregate all entries in order to resemble the defined fields nodewise.
elNumberThe unique number of this element
elTypeThe type of this element.
ensightTypeThe shape of the element in Ensight Gold notation.
fieldsThe list of fields per node which this entity couples.
hasKernelsWhether this entity contributes to the internal force and carries a state of its own.
hasMaterialFlag to check if a material was assigned to this element.
initialVelocityThe element’s initial velocity, in DOF order, applied once as an initial condition at the start of an explicit simulation.
nDofThe total number of degrees of freedom this entity has.
nNodesThe number of nodes this entity couples.
nodesThe list of nodes this currently entity holds.
propertyNamesGet the names of all the valid properties of the element.
visualizationNodesThe nodes for visualization.
Methods
Accept the computed state (in nonlinear iteration schemes).
assignProperty(propertyName, properties)Assign a property of the element by name.
computeBodyForce(P, K, load, U, time, dTime)Add the residual contribution of a body force, the negative of the external load \(-\boldsymbol{f}_\mathrm{ext}\), and its tangent, which is zero for a dead load.
Evaluate the consistent (full) inertia matrix of the element, over every field it carries.
Evaluate the critical time step for explicit dynamics.
computeDistributedLoad(loadType, P, K, ...)Add the residual contribution of a surface load, the negative of the external load \(-\boldsymbol{f}_\mathrm{ext}\), and its tangent, which is nonzero only for a load that follows the deformation (e.g. a pressure on the current surface).
Evaluate the internal energy of the element.
computeKernels(K, P, U, dU, time, dT)Add the internal forces to the residual, and their tangent, for given time, field, and field increment.
computeKernelsExplicit(P, U, dU, time, dT)Add the internal forces to the residual for given time, field, and field increment, without a tangent.
Evaluate the diagonal of the lumped damping of the element, over every field it carries.
Evaluate the diagonal of the lumped inertia of the element, over every field it carries.
Compute the underlying MarmotElement centroid coordinates.
Compute the underlying MarmotElement qp coordinates.
Compute the underlying MarmotElement qp coordinates.
Get the names of all the valid properties of the element.
getResultArray(result, quadraturePoint[, ...])Get the array of a result, possibly as a persistent view which is continiously updated by the element.
getStateVarSlice(name)Locate a named state variable within a single per-quadrature-point state block.
Return a copy of the element's flat (converged) quadrature-point state-variable buffer.
getVIJContributionSize()Return the number of entries this entity contributes to the VIJ (COO) system matrix.
Initalize the element to be ready for computing.
initializeVIJContribution(idcs, I_, J_, offset)Fill the global
IandJindex arrays for this constraint's VIJ contribution.Rest to the last valid state.
setInitialCondition(stateType, values)Assign initial conditions.
setMaterial(materialName, materialProperties)Assign a material and material properties.
setNodes(nodes)Assign the nodes to the element.
setProperties(elementProperties)Assign a set of properties to the element.
setStateVars(values)Overwrite the element's (converged and trial) state-variable buffer.
shapeVIJContribution(flat_view)Shape the flat VIJ values slice for this entity.
updateMaterialProperty(index, value)Change one entry of the property vector of the assigned material, during an analysis.
- abstractmethod acceptLastState()[source]
Accept the computed state (in nonlinear iteration schemes).
- assignProperty(propertyName, properties)[source]
Assign a property of the element by name.
- Parameters:
propertyName (str) – The name of the property.
properties (ndarray) – A numpy array containing the property values.
- abstractmethod computeBodyForce(P, K, load, U, time, dTime)[source]
Add the residual contribution of a body force, the negative of the external load \(-\boldsymbol{f}_\mathrm{ext}\), and its tangent, which is zero for a dead load.
- Parameters:
P (ndarray) – The residual contribution to augment, \(-\boldsymbol{f}_\mathrm{ext}\).
K (ndarray) – The tangent
dP/dUto augment.load (ndarray) – The magnitude (or vector) describing the load.
U (ndarray) – The current solution vector.
time (float) – The current time.
dTime (float) – The time increment.
- computeConsistentInertia(M)[source]
Evaluate the consistent (full) inertia matrix of the element, over every field it carries.
The counterpart of
computeLumpedInertia()for an implicit dynamic solver, which assembles a sparse global mass matrix rather than dividing by a diagonal: the coefficient matrix of each field’s SECOND time derivative, \(\int_\Omega \rho N^T N \, dV\) on the displacement block. Written intoMin the same layout the element uses for its stiffness incomputeKernels, so that a slice of the VIJ system matrix can be handed over directly and the assembled mass shares the stiffness’ sparsity pattern.Not abstract: an element formulation without one is refused at assembly time by the solver that needs it, rather than every element being forced to implement a matrix only the implicit dynamic solver reads.
- Parameters:
M (ndarray) – The consistent inertia to be defined, in the element’s stiffness layout.
- Raises:
NotImplementedError – If the element does not provide a consistent inertia.
- abstractmethod computeCriticalTimeStepForExplicitDynamics(Q)[source]
Evaluate the critical time step for explicit dynamics. :param Q: The current solution vector, which might be needed to compute the critical time step due to nonlinearities.
- Returns:
The critical time step.
- Return type:
float
- Parameters:
Q (ndarray)
- abstractmethod computeDistributedLoad(loadType, P, K, faceID, load, U, time, dT)[source]
Add the residual contribution of a surface load, the negative of the external load \(-\boldsymbol{f}_\mathrm{ext}\), and its tangent, which is nonzero only for a load that follows the deformation (e.g. a pressure on the current surface).
- Parameters:
loadType (str) – The type of load.
P (ndarray) – The residual contribution to augment, \(-\boldsymbol{f}_\mathrm{ext}\).
K (ndarray) – The tangent
dP/dUto augment.faceID (int) – The number of the elements face this load acts on.
load (ndarray) – The magnitude (or vector) describing the load.
U (ndarray) – The current solution vector.
time (float) – The current time.
dTime – The time increment.
dT (float)
- abstractmethod computeInternalEnergy()[source]
Evaluate the internal energy of the element.
- Returns:
The internal energy.
- Return type:
float
- abstractmethod computeKernels(K, P, U, dU, time, dT)[source]
Add the internal forces to the residual, and their tangent, for given time, field, and field increment.
- Parameters:
K (ndarray) – The tangent
dP/dUto augment, the stiffness matrix.P (ndarray) – The residual contribution to augment, the internal forces \(\boldsymbol{f}_\mathrm{int}\).
U (ndarray) – The current solution vector.
dU (ndarray) – The current solution vector increment.
time (float) – The current time.
dTime – The time increment.
dT (float)
- abstractmethod computeKernelsExplicit(P, U, dU, time, dT)[source]
Add the internal forces to the residual for given time, field, and field increment, without a tangent.
- Parameters:
P (ndarray) – The residual contribution to augment, the internal forces \(\boldsymbol{f}_\mathrm{int}\).
U (ndarray) – The current solution vector.
dU (ndarray) – The current solution vector increment.
time (float) – The current time.
dTime – The time increment.
dT (float)
- computeLumpedDamping(C)[source]
Evaluate the diagonal of the lumped damping of the element, over every field it carries.
The coefficient of each field’s FIRST time derivative: zero on the displacement block, and the non-local viscosity on a non-local block – always, whether or not that field also carries a micro-inertia. A first-order field is integrated by this term alone; a second-order one is damped by it. Carrying none is the ordinary case, so the default leaves the buffer alone.
- Parameters:
C (ndarray) – The diagonal of the lumped damping, supplied zero-initialised and written in place. Entries left untouched are read as “no damping here”.
- abstractmethod computeLumpedInertia(M)[source]
Evaluate the diagonal of the lumped inertia of the element, over every field it carries.
The coefficient of each field’s SECOND time derivative: mass on the displacement block, and a micro-inertia on a non-local block that has been given one. A parabolic gradient-enhanced field reports none, which is what tells the solver it is first order in time; see computeLumpedDamping() for what integrates it then.
- Parameters:
M (ndarray) – The diagonal of the lumped inertia to be defined.
- abstractmethod getCoordinatesAtCenter()[source]
Compute the underlying MarmotElement centroid coordinates.
- Returns:
The element’s central coordinates.
- Return type:
np.ndarray
- abstractmethod getCoordinatesAtQuadraturePoints()[source]
Compute the underlying MarmotElement qp coordinates.
- Returns:
The element’s qp coordinates.
- Return type:
np.ndarray
- abstractmethod getNumberOfQuadraturePoints()[source]
Compute the underlying MarmotElement qp coordinates.
- Returns:
The element’s qp coordinates.
- Return type:
np.ndarray
- getPropertyNames()[source]
Get the names of all the valid properties of the element.
- Returns:
A list of valid property names.
- Return type:
list[str]
- abstractmethod getResultArray(result, quadraturePoint, getPersistentView=True)[source]
Get the array of a result, possibly as a persistent view which is continiously updated by the element.
- Parameters:
result (str) – The name of the result.
quadraturePoint (int) – The number of the quadrature point.
getPersistentView (bool) – If true, the returned array should be continiously updated by the element.
- Returns:
The result.
- Return type:
np.ndarray
- getStateVarSlice(name)[source]
Locate a named state variable within a single per-quadrature-point state block.
Enables per-state-variable routing of adaptive-refinement state transfer (see
PerStateVarStateTransfer).- Parameters:
name (str) – The state-variable name (as understood by the underlying material / element).
- Returns:
(offset, size)of the named variable within one per-quadrature-point block.- Return type:
tuple
- getStateVars()[source]
Return a copy of the element’s flat (converged) quadrature-point state-variable buffer.
The buffer is laid out as
nQuadraturePointscontiguous per-point blocks. Used by adaptive mesh refinement to hand history down to child elements. Override in concrete elements that carry a state buffer.- Returns:
A copy of the converged state-variable buffer.
- Return type:
np.ndarray
- abstractmethod setInitialCondition(stateType, values)[source]
Assign initial conditions.
- Parameters:
stateType (str) – The type of initial state.
values (ndarray) – The numpy array describing the initial state.
- abstractmethod setMaterial(materialName, materialProperties)[source]
Assign a material and material properties.
- Parameters:
materialName (str) – The name of the requested material.
materialProperties (ndarray) – The numpy array containing the material properties.
- abstractmethod setNodes(nodes)[source]
Assign the nodes to the element.
- Parameters:
nodes (list[Node]) – A list of nodes.
- abstractmethod setProperties(elementProperties)[source]
Assign a set of properties to the element.
- Parameters:
elementProperties (ndarray) – A numpy array containing the element properties.
- setStateVars(values)[source]
Overwrite the element’s (converged and trial) state-variable buffer.
- Parameters:
values (ndarray) – The new state-variable buffer, same size as
getStateVars().
- updateMaterialProperty(index, value)[source]
Change one entry of the property vector of the assigned material, during an analysis.
Unlike
setMaterial(), this keeps the state of the element: the state variables (e.g. stress, plastic strain, damage) are neither reset nor re-initialized, and the arrays holding them stay the same objects, so persistent result views (field outputs) remain valid. All other properties, including any assigned per element (e.g.materialParameterFromField), are kept.Elements without a material do not support this.
- Parameters:
index (int) – The index of the property in the material’s property vector.
value (float) – The new value of the property.
- abstract property elNumber: int
The unique number of this element
- abstract property elType: str
The type of this element.
- property hasKernels: bool
Whether this entity contributes to the internal force and carries a state of its own.
Not every entity in the element container is a finite element. A contact facet is kept there for its nodes and its geometry alone: it has no material and no state, and its kernels, its internal energy and its state acceptance are all no-ops. A solver that touches every element on every increment may leave those out instead of calling into them for nothing.
- Returns:
True for a finite element proper, False for an entity that carries geometry only.
- Return type:
bool
- abstract property hasMaterial: str
Flag to check if a material was assigned to this element.
- property initialVelocity: ndarray
The element’s initial velocity, in DOF order, applied once as an initial condition at the start of an explicit simulation.
Elements do not take part in the per-step momentum remap (that is a particle/cell concern); a mass-bearing element such as
PointMassinstead declares its initial velocity here, which the explicit solver seeds into the grid velocity vector once. The default is rest.- Returns:
The initial velocity of the element’s DOFs (size
nDof).- Return type:
np.ndarray
- property propertyNames: list[str]
Get the names of all the valid properties of the element.
- Returns:
A list of valid property names.
- Return type:
list[str]