Material Points

Material points are the basic building blocks of the material point method. They are used to represent the material properties of a continuum. Furthermore, material points are used to store the material properties and state variables of a continuum at a specific location in space and time. Material points are used to compute the material response of the continuum and to transfer the material properties to the grid.

class edelweissmeshfree.materialpoints.base.mp.MaterialPointBase(formulation, number, coordinates, volume, material)[source]

A basic material point class. If you want to implement a new material point, you should inherit from this class.

Parameters:
  • formulation (str) – The string describing the formulation of the material point.

  • number (int) – The unique number (ID) of this material point.

  • coordinates (np.ndarray) – The coordinates of the material point.

  • volume (float) – The volume of the material point.

Attributes:
assignedCells

The list of currently assigned cells.

ensightType

The shape of the materialpoint in Ensight Gold notation.

number

The unique label (ID) of this material point.

Methods

acceptStateAndPosition()

Accept the computed state (in nonlinear iteration schemes) and the position.

assignCells(cells)

Assign the list of cells in which the material point is currently residing.

computeYourself(timeTotal, dT)

Compute the current material response.

getCenterCoordinates()

The location of the material point is defined by the coordinates of it's center.

getResultArray(result[, getPersistentView])

Get the array of a result, possibly as a persistent view which is continiously updated by a MaterialPoint.

getVertexCoordinates()

A material point's shape is defined by an arbitrary number of vertices.

getVolume()

A material point has distinct volume, which may change during a simulation.

initializeYourself()

Initalize the mateiral point to be ready for computing.

prepareTimestep(timeTotal, dT)

Prepare a new time step, i.e., before interpolation from the grid takes place.

setInitialCondition(stateType, values)

Assign initial conditions.

setMaterial(materialName, materialProperties)

Assign a material and material properties.

setProperties(propertyName, elementProperties)

Assign a set of properties to the element.

abstractmethod acceptStateAndPosition()[source]

Accept the computed state (in nonlinear iteration schemes) and the position.

abstractmethod assignCells(cells)[source]

Assign the list of cells in which the material point is currently residing.

Parameters:

cells (set)

abstractmethod computeYourself(timeTotal, dT)[source]

Compute the current material response.

Parameters:
  • timeTotal (float)

  • dT (float)

abstractmethod getCenterCoordinates()[source]

The location of the material point is defined by the coordinates of it’s center.

Returns:

The coordinates of the material point’s center of mass.

Return type:

np.ndarray

abstractmethod getResultArray(result, getPersistentView=True)[source]

Get the array of a result, possibly as a persistent view which is continiously updated by a MaterialPoint.

Parameters:
  • result (str) – The name of the result.

  • getPersistentView (bool) – If true, the returned array should be continiously updated by the element.

Returns:

The result.

Return type:

np.ndarray

abstractmethod getVertexCoordinates()[source]

A material point’s shape is defined by an arbitrary number of vertices.

Returns:

All coordinates for all bounding vertices.

Return type:

np.ndarray

abstractmethod getVolume()[source]

A material point has distinct volume, which may change during a simulation.

Returns:

The current volume occupied by this material point.

Return type:

float

abstractmethod initializeYourself()[source]

Initalize the mateiral point to be ready for computing.

abstractmethod prepareTimestep(timeTotal, dT)[source]

Prepare a new time step, i.e., before interpolation from the grid takes place.

Parameters:
  • timeTotal (float)

  • dT (float)

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 setProperties(propertyName, elementProperties)[source]

Assign a set of properties to the element.

Parameters:
  • propertyName (str) – The name of the property to be set.

  • elementProperties (ndarray) – A numpy array containing the element properties.

abstract property assignedCells: set

The list of currently assigned cells.

abstract property ensightType: str

The shape of the materialpoint in Ensight Gold notation.

abstract property number: int

The unique label (ID) of this material point.

MarmotMaterialPoint class

PythonMaterialPoint class

A pure Python material point implementation with linear elastic constitutive behavior.

This material point stores displacement, strain, and stress in Voigt notation for 2D plane strain problems. The constitutive tangent is computed from Young’s modulus and Poisson’s ratio.

class edelweissmeshfree.materialpoints.pythonmaterialpoint.mp.PythonMaterialPoint(formulation, number, coordinates, volume, material)[source]

A pure Python material point with linear elastic constitutive behavior.

Supports 2D plane strain problems with Voigt notation: [sigma_xx, sigma_yy, sigma_zz, sigma_xy] for stress, [eps_xx, eps_yy, eps_zz, gamma_xy] for strain.

Parameters:
  • formulation (str) – The formulation string (e.g., “PlaneStrain”).

  • number (int) – The unique material point ID.

  • coordinates (ndarray) – The initial coordinates of the material point.

  • volume (float) – The initial volume.

  • material – A dict with keys “material” (str) and “properties” (array-like: [E, nu]).

Attributes:
assignedCells

The list of currently assigned cells.

ensightType

The shape of the materialpoint in Ensight Gold notation.

number

The unique label (ID) of this material point.

Methods

acceptStateAndPosition()

Accept the current state after a converged increment.

assignCells(cells)

Assign the list of cells in which the material point is currently residing.

computeYourself(timeTotal, dT)

Compute material response: update stress from strain increment using linear elasticity.

getAlgorithmicTangent()

Return the algorithmic (elastic) tangent matrix.

getCenterCoordinates()

The location of the material point is defined by the coordinates of it's center.

getResultArray(result[, getPersistentView])

Get a result array by name.

getVertexCoordinates()

A material point's shape is defined by an arbitrary number of vertices.

getVolume()

A material point has distinct volume, which may change during a simulation.

initializeYourself()

Initialize the material point.

interpolateFieldsFromCell(dU, dStrain)

Receive interpolated displacement increment and strain increment from the cell.

prepareTimestep(timeTotal, dT)

Prepare for a new timestep.

prepareYourself(timeTotal, dT)

Prepare for a new timestep (alias used by solvers).

resetToLastValidStateAndPosition()

Reset to the last converged state.

setInitialCondition(stateType, values)

Assign initial conditions.

setMaterial(materialName, materialProperties)

Assign a material and material properties.

setProperties(propertyName, elementProperties)

Assign element-level properties (unused for this implementation).

acceptStateAndPosition()[source]

Accept the current state after a converged increment.

assignCells(cells)[source]

Assign the list of cells in which the material point is currently residing.

computeYourself(timeTotal, dT)[source]

Compute material response: update stress from strain increment using linear elasticity.

Parameters:
  • timeTotal (float)

  • dT (float)

getAlgorithmicTangent()[source]

Return the algorithmic (elastic) tangent matrix.

Returns:

The (4, 4) material tangent matrix.

Return type:

np.ndarray

getCenterCoordinates()[source]

The location of the material point is defined by the coordinates of it’s center.

Returns:

The coordinates of the material point’s center of mass.

Return type:

np.ndarray

getResultArray(result, getPersistentView=True)[source]

Get a result array by name.

Parameters:
  • result (str) – One of “displacement”, “stress”, “strain”.

  • getPersistentView (bool) – If True, return a view that is continuously updated.

Returns:

The requested result array.

Return type:

np.ndarray

getVertexCoordinates()[source]

A material point’s shape is defined by an arbitrary number of vertices.

Returns:

All coordinates for all bounding vertices.

Return type:

np.ndarray

getVolume()[source]

A material point has distinct volume, which may change during a simulation.

Returns:

The current volume occupied by this material point.

Return type:

float

initializeYourself()[source]

Initialize the material point.

interpolateFieldsFromCell(dU, dStrain)[source]

Receive interpolated displacement increment and strain increment from the cell.

Parameters:
  • dU (ndarray) – Displacement increment at the material point (2,).

  • dStrain (ndarray) – Strain increment at the material point in Voigt notation (4,).

prepareTimestep(timeTotal, dT)[source]

Prepare for a new timestep.

Parameters:
  • timeTotal (float)

  • dT (float)

prepareYourself(timeTotal, dT)[source]

Prepare for a new timestep (alias used by solvers).

Parameters:
  • timeTotal (float)

  • dT (float)

resetToLastValidStateAndPosition()[source]

Reset to the last converged state.

setInitialCondition(stateType, values)[source]

Assign initial conditions.

Parameters:
  • stateType (str) – The type of initial state (e.g., “stress”, “strain”).

  • values (ndarray) – The initial state values.

setMaterial(materialName, materialProperties)[source]

Assign a material and material properties.

Parameters:
  • materialName (str) – The material name (e.g., “LinearElastic”).

  • materialProperties (ndarray) – Array [E, nu] for linear elastic.

setProperties(propertyName, elementProperties)[source]

Assign element-level properties (unused for this implementation).

Parameters:
  • propertyName (str)

  • elementProperties (ndarray)

property assignedCells: list

The list of currently assigned cells.

property ensightType: str

The shape of the materialpoint in Ensight Gold notation.

property number: int

The unique label (ID) of this material point.

edelweissmeshfree.materialpoints.pythonmaterialpoint.mp._compute_plane_strain_tangent(E, nu)[source]

Compute the 2D plane strain elastic tangent matrix (4x4 Voigt).

Voigt ordering: [eps_xx, eps_yy, eps_zz, gamma_xy]

Parameters:
  • E – Young’s modulus.

  • nu – Poisson’s ratio.

Returns:

(4, 4) elastic tangent matrix.

Return type:

C

Theory (small-strain linear elasticity in plane strain)

The Python material point stores kinematics and stress in Voigt form:

\[\boldsymbol{\varepsilon} = \begin{bmatrix} \varepsilon_{xx} & \varepsilon_{yy} & \varepsilon_{zz} & \gamma_{xy} \end{bmatrix}^\mathsf{T}, \qquad \boldsymbol{\sigma} = \begin{bmatrix} \sigma_{xx} & \sigma_{yy} & \sigma_{zz} & \sigma_{xy} \end{bmatrix}^\mathsf{T}.\]

For each increment, the temporary state is updated as:

\[\boldsymbol{\varepsilon}^{n+1} = \boldsymbol{\varepsilon}^{n} + \Delta\boldsymbol{\varepsilon}, \qquad \boldsymbol{\sigma}^{n+1} = \mathbf{C}\,\boldsymbol{\varepsilon}^{n+1}.\]

The plane-strain elastic tangent for isotropic material parameters Young’s modulus \(E\) and Poisson ratio \(\nu\) is:

\[\begin{split}\mathbf{C} = \frac{E}{(1+\nu)(1-2\nu)} \begin{bmatrix} 1-\nu & \nu & \nu & 0 \\ \nu & 1-\nu & \nu & 0 \\ \nu & \nu & 1-\nu & 0 \\ 0 & 0 & 0 & \frac{1-2\nu}{2} \end{bmatrix}.\end{split}\]

After convergence, the temporary state is accepted as persistent state for the next increment.