pyxfem.solidmechanics.elasticity module

Tools for Elasticity

class pyxfem.solidmechanics.elasticity.ElasticField[source]

Bases: ABC

base class for elastic field : thing thah can evaluate displacement and stress (and strain ..) at each point xy

abstractmethod displacement(xy)[source]

return the displacement vector at points xy

abstractmethod strain(xy)[source]

return the strain tensor at points xy

abstractmethod stress(xy)[source]

return the stress tensor at points xy

class pyxfem.solidmechanics.elasticity.LinearIsotropeElasticMaterial(E: float = 1.0, nu: float = 0.3, hyp2d: MaterialHypothesis = MaterialHypothesis.PLANESTRAIN, elastic_limit: float = 1.0)[source]

Bases: object

Linear isotrope elastic material

class pyxfem.solidmechanics.elasticity.MaterialHypothesis(*values)[source]

Bases: Enum

Enum class to define the avalaible Material hypothesis

DIM3 = 3
PLANESTRAIN = 2
PLANESTRESS = 1
class pyxfem.solidmechanics.elasticity.P1FemElasticfield(xy, t2v, vdisp, estress, trifinder=None)[source]

Bases: ElasticField

implementation of ElasticField that use the classical P1 Fem interpolation (over triangles)

displacement(xy)[source]

return the displacement vector at points xy

strain(xy)[source]

return the strain tensor at points xy

stress(xy)[source]

return the stress tensor at points xy

class pyxfem.solidmechanics.elasticity.Tensor2222CSR[source]

Bases: object

grouping CSR matrix repesentation of order 4 tensor with base space of dimension 2

For now we have, for A a second order tensor (repesented as a 2d matrix in rowmajor storage)
  • ISym: .5 (AT + A) = ISym: A -> ISym.dot(A.flatten()).reshape((2, 2))

  • IxI I*trace(A) = IxI: A -> IxI.dot(A.flatten()).reshape((2, 2))

ISym = <Compressed Sparse Row sparse array of dtype 'float64' with 6 stored elements and shape (4, 4)>
IxI = <Compressed Sparse Row sparse array of dtype 'float64' with 4 stored elements and shape (4, 4)>
pyxfem.solidmechanics.elasticity.VonMises(stress2d, sigmazz)[source]

return the von mises stress

pyxfem.solidmechanics.elasticity.YoungPoisson2LambdaMu(E, nu)[source]

Return Lame coefficients (Lambda, mu) from Young Modulus (E) and poisson ration nu

pyxfem.solidmechanics.elasticity.planeStrainC2222CSR(*, lam: float | None = None, mu: float | None = None, mat: LinearIsotropeElasticMaterial | None = None)[source]

Compute the C operator (tensor 4) for isotropic material such as sigma = C:eps, for plane strain isotrope assumption

input : lambda and mu Lamé’s coefficient or a linearIsotropeElasticMaterial instance.

pyxfem.solidmechanics.elasticity.stress_from_strain(strain, lamb, mu)[source]

compute stress from plane deformation Strain. return sigma2d in voigt format and sigmazz

pyxfem.solidmechanics.elasticity.to_tensor2d(s11, s22, s12)[source]

stack the 3 stress component in 2d tenso2r format

pyxfem.solidmechanics.elasticity.to_voigt2d(s11, s22, s12)[source]

stack the 3 stress component in voigt format