Material Models

1d Models

class sigmaepsilon.solid.model.bernoulli.section.BeamSection(*args, wrap=None, shape=None, mesh_params=None, material: Optional[Material] = None, **kwargs)[source]

Wraps an instance of sectionproperties.analysis.section.Section and adds a little here and there to make some of the functionality more accessible.

Parameters
  • *args (tuple, Optional) – The first parameter can be a string referring to a section type, or an instance of sectionproperties.analysis.section.Section. In the former case, parameters of the section can be provided as keyword arguments, which are then forwarded to get_section(), see its documentation for further details.

  • **kwargs (dict, Optional) – The parameters of a section as keyword arguments, only if the first positional argument is a string (see above).

  • mesh_params (dict, Optional) – A dictionary controlling the density of the mesh of the section. Default is None.

  • material (sectionproperties.pre.pre.Material, Optional) – The material of the section. If not specified, a default material is used. Default is None.

  • wrap (sectionproperties.analysis.section.Section) – A section object to be wrapped. It can also be provided as the first positional argument.

Notes

The implementation here only covers homogeneous cross sections. If you want to define an inhomogeneous section, it must be explicity given either as the first position argument, or with the keyword argument wrap.

Examples

>>> from sigmaepsilon.solid import BeamSection
>>> section = BeamSection(get_section('CHS', d=1.0, t=0.1, n=64))

or simply provide the shape as the first argument and everything else with keyword arguments:

>>> section = BeamSection('CHS', d=1.0, t=0.1, n=64)

Plot a section with Matplotlib using 6-noded triangles:

>>> import matplotlib.pyplot as plt
>>> from dewloosh.mpl import triplot
>>> section = BeamSection('CHS', d=1.0, t=0.3, n=32,
>>>                       mesh_params=dict(n_max=20))
>>> triobj = section.trimesh(T6=True).to_triobj()
>>> fig, ax = plt.subplots(figsize=(4, 2))
>>> triplot(triobj, fig=fig, ax=ax, lw=0.1)
property A

Returns the cross-sectional area.

property Ix

Returns the second moment of inertia around ‘x’.

property Iy

Returns the second moment of inertia around ‘y’.

property Iz

Returns the second moment of inertia around ‘z’.

calculate_section_properties(separate=False)[source]

Calculates all properties of the section.

calculate_stresses(forces: ndarray) ndarray[source]

Returns stresses for all points of the mesh. The internal forces are expected in the order Fx, Fy, Fz, Mx, My, Mz, where x, y and z denote the local axes of the section, the stress components are returned in the order s11, s22, s33, s12, s13, s23.

Parameters

forces (numpy.ndarray) –

It can be either

A 1d float array representing all internal forces of a beam.

A 2d float array. In this case it is assumed, that the provided data has the shape (nX, nSTRE), where ‘nX’ is the number of records in the data.

A 3d float array. In this case it is assumed, that the provided data has the shape (nE, nP, nSTRE), representing all internal forces (nSTRE) for multiple elements(nE) and evaluation points (nP).

A 4d float array of shape (nE, nP, nSTRE, nRHS), representing all internal forces (nSTRE) for multiple elements(nE), load cases(nRHS) and evaluation points (nP).

Returns

A numpy float array that can be

A 2d array of shape (nPS, nS),

A 5d array of shape (nE, nP, nPS, nS, nRHS),

where

nPS : the number of points of the mesh of the section

nS : the number of stress components

nE : the number of finite elements

nP : the number of evaluation points for an element

nRHS : the number of right hand sides (possibly load cases)

Return type

numpy.ndarray

Notes

This only covers homogeneous cross sections.

coords() ndarray[source]

Returns centralized vertex coordinates of the supporting point cloud as a numpy array.

extrude(*args, length=None, frame=None, N=None, **kwargs) TetMesh[source]

Creates a 3d tetragonal mesh from the section.

Parameters
  • length (float) – Length of the beam.

  • N (int) – Number of subdivisions along the length of the beam.

  • frame (numpy.ndarray) – A 3x3 matrix representing an orthonormal coordinate frame.

property geometric_properties

Returns the geometric properties of the section.

get_section_properties()[source]

Returns all properties of the section.

model_stiffness_matrix(E=None, nu=None) ndarray[source]

Returns the model stiffness matrix of the section.

Parameters
  • E (float, Optional) – Young’s modulus. If not provided, the value is obtained from the associated material of the section, if there is one. Default is None.

  • nu (float, Optional) – Poisson’s ratio. If not provided, the value is obtained from the associated material of the section, if there is one. Default is None.

Returns

The 4x4 elastic ABDS matrix of the section.

Return type

numpy.ndarray

property section_properties

Returns all properties of the section.

topology() ndarray[source]

Returns vertex indices of T6 triangles as a numpy array.

trimesh(subdivide=False, T6=False, **kwargs) TriMesh[source]

Returns the mesh of the section as a collection of T3 triangles. Keyword arguments are forwarded to the constructor of polymesh.tri.trimesh.TriMesh.

Parameters
  • T6 (boolean, Optional) – If False, the original T6 trinagles are transformed into T3 triangles. Default is False.

  • subdivide (boolean, Optional) – Controls how the T6 triangles are transformed into T3 triangles, if the argument ‘T6’ is False. If True, the T6 triangles are subdivided into 4 T3 triangles. If False, T3 triangles are formed by the corners of T6 triangles only, and all the remaining nodes are neglected.

See also

polymesh.tri.trimesh.TriMesh

Examples

>>> from sigmaepsilon.solid import BeamSection
>>> section = BeamSection(get_section('CHS', d=1.0, t=0.1, n=64))
>>> trimesh = section.trimesh()
sigmaepsilon.solid.model.bernoulli.section.generate_mesh(geometry: Geometry, *, l_max: Optional[float] = None, a_max: Optional[float] = None, n_max: Optional[int] = None) Geometry[source]

Calculates a float describing the maximum mesh element area to be used for the finite-element mesh of the section.

Parameters
  • geometry (sectionproperties.pre.geometry.Geometry) – Describes the shape of the section, i.e. ‘I’, ‘H’, ‘RHS’, etc.

  • l_max (float, Optional) – Maximum element edge length. Default is None.

  • a_max (float, Optional) – Maximum element area. Default is None.

  • n_max (int, Optional) – Maximum number of elements. Default is None.

Note

The value of the mesh size is derived from the assumption of a perfectly regular mesh of equilateral triangles.

Returns

The geometry object provided with a finite element mesh.

Return type

sectionproperties.pre.geometry.Geometry

sigmaepsilon.solid.model.bernoulli.section.get_section(shape, *args, mesh_params: Optional[dict] = None, material: Optional[Material] = None, **section_params) Section[source]

Returns a sectionproperties.analysis.section.Section instance.

The parameters in section_params are forwarded to the appropriate constructor of the sectionproperties library. For the available parameters, see their documentation:

Parameters
  • shape (str) – Describes the shape of the section. The currently supported section types are ‘I’, ‘CHS’, ‘RHS’, ‘TFI’, ‘PFC’, ‘TFC’, ‘T’.

  • mesh_params (dict, Optional) – A dictionary of parameters controlling mesh generation. Default is None. For the possible keys and values see generate_mesh(), to which these parameters are forwarded to. Default is None.

  • material (sectionproperties.pre.pre.Material, Optional) – The material of the section. If not specified, a default material is used. Default is None.

  • **section_params (dict) – Parameters required for a given section. See the documentation of the sectionproperties library for more details. The parameters are only required, if the first argument is a string.

Note

Specification of a material is only necessary, if stresses are to be calculated. If the reason of creating the section is the calculation of geometrical properties of a section, the choice of material is irrelevant.

Returns

An object representing a cross-section of a beam.

Return type

sectionproperties.analysis.section.Section

Examples

>>> from sigmaepsilon.solid.model.bernoulli import get_section
>>> mesh_params = dict(n_min=100, n_max=500)
>>> section = get_section('CHS', d=1.0, t=0.1, n=64, mesh_params=mesh_params)

2d Models

class sigmaepsilon.solid.model.metashell.MetaSurface(*args, parent: Optional[LinkedDeepDict] = None, root: Optional[LinkedDeepDict] = None, locked: Optional[bool] = None, **kwargs)[source]

Base object implementing methods that both a folder (a shell) and a file (a layer) can posess.

property angle

Returns the angle of a layer or a laminate.

property hooke

Returns the Hooke model of a layer or a laminate.

property t

Returns the thickness of a layer.

class sigmaepsilon.solid.model.metashell.Layer(*args, **kwargs)[source]

Helper base class for layers of a laminate.

loc_to_z(loc) float[source]

Returns height of a local point by linear interpolation. Local coordinate is expected between -1 and 1.

class sigmaepsilon.solid.model.metashell.Surface(*args, parent: Optional[LinkedDeepDict] = None, root: Optional[LinkedDeepDict] = None, locked: Optional[bool] = None, **kwargs)[source]

Helper base class for laminates.

Layer(*args, **kwargs)[source]

Returns a Layer compatible with the model.

iterlayers()[source]

Returns the layers of the laminate as a generator.

layers() Iterable[source]

Returns the layers of the laminate.

stiffness_matrix() ndarray[source]

Assembles and returns the stiffness matrix.

Membranes

class sigmaepsilon.solid.model.membrane.Membrane(*args, parent: Optional[LinkedDeepDict] = None, root: Optional[LinkedDeepDict] = None, locked: Optional[bool] = None, **kwargs)[source]

Helper object for the stress analysis of a membrane.

Example

>>> from sigmaepsilon.solid.model import Membrane as Model
>>> model = {
>>>     '0' : {
>>>         'hooke' : Model.Hooke(E=2100000, nu=0.3),
>>>         'angle' : 0.,
>>>         'thickness' : 0.1
>>>         },
>>>     }
>>> C = Model.from_dict(model).stiffness_matrix()
classmethod Hooke(*args, symbolic=False, **kwargs) Union[MutableDenseMatrix, ndarray][source]

Returns a Hooke matrix appropriate for membranes.

Parameters

symbolic (bool, Optional) – If Truem a symbolic matrix is returned.

Returns

The matrix in symbolic or numeric form.

Return type

Union[sy.Matrix, np.ndarray]

Examples

>>> from sigmaepsilon.solid.model import Membrane as Model
>>> Model.Hooke(E=2100000, nu=0.3)
>>> Model.Hooke(symbolic=True)
stiffness_matrix() ndarray[source]

Returns the stiffness matrix of the membrane.

Returns

The ABDS matrix of the membrane.

Return type

ndarray

class sigmaepsilon.solid.model.membrane.MembraneLayer(*args, **kwargs)[source]

Helper object for the stress analysis of a layer of a membrane.

approxfunc(data)[source]

Returns a function that can be used for approximations thorugh the thickness.

material_stiffness_matrix() ndarray[source]

Returns and stores the transformed material stiffness matrix.

rotation_matrix() ndarray[source]

Returns the transformation matrix.

stiffness_matrix() ndarray[source]

Returns the stiffness contribution of the layer.

Plates

class sigmaepsilon.solid.model.mindlin.mindlin.MindlinPlateLayer(*args, **kwargs)[source]

Helper object for the stress analysis of a layer of a plate.

stiffness_matrix() ndarray[source]

Returns the uncorrected stiffness contribution to the layer.

class sigmaepsilon.solid.model.mindlin.mindlin.MindlinPlate(*args, **kwargs)[source]

Helper object for the stress analysis of a membrane.

Example

>>> from sigmaepsilon.solid.model import MindlinPlate as Model
>>> model = {
>>>     '0' : {
>>>         'hooke' : Model.Hooke(E=2100000, nu=0.3),
>>>         'angle' : 0.,
>>>         'thickness' : 0.1
>>>         },
>>>     }
>>> C = Model.from_dict(model).stiffness_matrix()
stiffness_matrix() ndarray[source]

Returns the stiffness matrix of the plate.

Returns

The ABDS matrix of the plate.

Return type

numpy.ndarray

Shells

class sigmaepsilon.solid.model.mindlin.mindlin.MindlinShellLayer(*args, **kwargs)[source]

Helper object for the stress analysis of a layer of a shell.

compile_shear_factors()[source]

Prepares data for continuous interpolation of shear factors. Should be called if shear factors are already set.

loc_to_shear_factors(loc: float)[source]

Returns shear factor for local z direction by quadratic interpolation. Local coordinate is expected between -1 and 1.

material_stiffness_matrices() Tuple[ndarray, ndarray][source]

Returns and stores transformed material stiffness matrices.

rotation_matrices() Tuple[ndarray, ndarray][source]

Produces transformation matrices T_126 and T_45.

stiffness_matrix() ndarray[source]

Returns the uncorrected stiffness contribution to the layer.

class sigmaepsilon.solid.model.mindlin.mindlin.MindlinShell(*args, **kwargs)[source]

Helper object for the stress analysis of a shell.

Example

>>> from sigmaepsilon.solid.model import MindlinShell as Model
>>> model = {
>>>     '0' : {
>>>         'hooke' : Model.Hooke(E=2100000, nu=0.3),
>>>         'angle' : 0.,
>>>         'thickness' : 0.1
>>>         },
>>>     }
>>> C = Model.from_dict(model).stiffness_matrix()
classmethod Hooke(*args, symbolic=False, **kwargs) Union[MutableDenseMatrix, ndarray][source]

Returns a Hooke matrix appropriate for shells.

Parameters

symbolic (bool, Optional) – If Truem a symbolic matrix is returned.

Returns

The matrix in symbolic or numeric form.

Return type

Union[sympy.Matrix, numpy.ndarray]

Examples

>>> from sigmaepsilon.solid.model import MindlinShell as Model
>>> Model.Hooke(E=2100000, nu=0.3)
>>> Model.Hooke(symbolic=True)
stiffness_matrix() ndarray[source]

Returns the stiffness matrix of the shell.

Returns

The ABDS matrix of the shell.

Return type

numpy.ndarray

Utility Routines

sigmaepsilon.solid.model.utils.material_stiffness_matrices_126(C_126: ndarray, angles: ndarray)[source]

Returns the components of the material stiffness matrix C_126 in the global system.

sigmaepsilon.solid.model.utils.material_stiffness_matrices_45(C_45: ndarray, angles: ndarray)[source]

Returns the components of the material stiffness matrix C_45 in the global system.

sigmaepsilon.solid.model.utils.rotation_matrices_126(angles: ndarray)[source]

Returns transformation matrmatrixices T_126 for each angle. Angles are expected in radians.

sigmaepsilon.solid.model.utils.rotation_matrices_45(angles: ndarray)[source]

Returns transformation matrix T_45 for each angle. Angles are expected in radians.

exception sigmaepsilon.solid.material.hooke.utils.HookeError[source]
sigmaepsilon.solid.material.hooke.utils.get_iso_params(*args, **kwargs)[source]

Returns all 12 orthotropic engineering constants for an isotropic material. Requires 2 independent constants to be provided.

sigmaepsilon.solid.material.hooke.utils.get_ortho_params(*args, **kwargs) dict[source]

Returns all 12 orthotropic engineering constants for an orthotropic material. From the total of 12 constants, 9 must to be provided, from which 3 must be shear moduli. The remaining 6 necessary constants can be provided in any combination.

sigmaepsilon.solid.material.hooke.utils.get_triso_params(*args, **kwargs) dict[source]

Returns all 12 orthotropic engineering constants for a transversely isotropic material. From the total of 12 constants, exactly 5 must to be provided, from which 1 must be the out-of-plane shear moduli. The remaining 4 necessary constants can be provided in any combination.

sigmaepsilon.solid.material.hooke.utils.group_mat_params(**params) tuple[source]

Groups and returns all input material parameters as a 3-tuple of dictionaries.

Returns

3 dictionaries for Young’s moduli, Poisson’s ratios and shear moduli.

Return type

tuple

sigmaepsilon.solid.material.hooke.utils.has_all_params_ortho(**params) bool[source]

Returns True, if all 12 keys of an orthotropic material are provided.

sigmaepsilon.solid.material.hooke.utils.has_std_params_ortho(**params) bool[source]

Returns True, if all 9 standard keys are provided. Standard keys are the 3 Young’s moduli, the 3 shear moduli and the minor Poisson’s ratios.

sigmaepsilon.solid.material.hooke.utils.missing_params_ortho(**params)[source]

Returns the ones missing from the 12 orthotropic parameters.

sigmaepsilon.solid.material.hooke.utils.missing_std_params_ortho(**params)[source]

Returns the ones missing from the 9 standard orthotropic parameters.