tensormesh.material

Isotropic linear-elastic material model and a small set of preset instances used throughout the solid-mechanics examples.

IsotropicMaterial

class IsotropicMaterial(name: str, E: float, nu: float, rho: float, sigma_y: float = None, H: float = 0.0)[源代码]

基类:object

name: str
E: float
nu: float
rho: float
sigma_y: float = None
H: float = 0.0
property lame_params
__init__(name: str, E: float, nu: float, rho: float, sigma_y: float | None = None, H: float = 0.0) None

Preset materials

The module also ships ready-to-use IsotropicMaterial instances with literature values. Import directly:

from tensormesh.material import Steel, Aluminum, Rubber, Glass

Preset

Young's modulus \(E\)

Poisson's ratio \(\nu\)

Density \(\rho\)

Notes

Steel

210 GPa

0.30

7850 kg/m³

\(\sigma_y = 250\) MPa

Aluminum

70 GPa

0.33

2700 kg/m³

\(\sigma_y = 100\) MPa, \(H = 700\) MPa

Rubber

10 MPa

0.48

1100 kg/m³

near-incompressible

Glass

70 GPa

0.20

2500 kg/m³

FrictionalMaterial

Pressure-dependent (Drucker-Prager / Mohr-Coulomb) soil and weak-rock material consumed by DruckerPragerPlasticity and the drucker_prager_return_mapping() primitive. Only E, nu, cohesion and friction_angle are required; a dilatancy_angle of None selects associated plastic flow.

class FrictionalMaterial(E: float, nu: float, cohesion: float, friction_angle: float, dilatancy_angle: float | None = None, H: float = 0.0, rho: float | None = None, name: str = 'Custom', description: str = '')[源代码]

基类:object

Pressure-dependent (Drucker-Prager / Mohr-Coulomb) soil or rock material.

Holds the parameters consumed by the Drucker-Prager constitutive primitive and the DruckerPragerPlasticity assembler. Angles are in degrees.

The required fields are E, nu, cohesion and friction_angle; dilatancy_angle, H, rho and name are optional, so a one-off soil can be built directly:

soil = FrictionalMaterial(E=50e6, nu=0.30, cohesion=5e3, friction_angle=35.0)

A dilatancy_angle of None selects associated plastic flow (the friction angle is used). Named presets are loaded from a small CSV table:

soil = FrictionalMaterial.from_preset("DenseSand")
参数:
  • E (float) -- Young's modulus in Pa.

  • nu (float) -- Poisson's ratio.

  • cohesion (float) -- Cohesion in Pa.

  • friction_angle (float) -- Mohr-Coulomb friction angle in degrees.

  • dilatancy_angle (float or None, optional) -- Dilatancy angle in degrees; None (default) means associated flow.

  • H (float, optional) -- Linear isotropic hardening modulus in Pa. Default 0.0.

  • rho (float or None, optional) -- Density in kg/m^3 (metadata; not used by the constitutive update).

  • name (str, optional) -- Label for the material. Default "Custom".

  • description (str, optional) -- Free-text note (set for presets).

E: float
nu: float
cohesion: float
friction_angle: float
dilatancy_angle: float | None = None
H: float = 0.0
rho: float | None = None
name: str = 'Custom'
description: str = ''
property lame_params
classmethod preset_names() Tuple[str, ...][源代码]

Return the names of the available frictional-material presets.

classmethod from_preset(name: str) FrictionalMaterial[源代码]

Build a FrictionalMaterial from a named preset in the CSV table.

The preset values are illustrative example presets, not design-grade soil/rock parameters.

抛出:

KeyError -- If name is not one of preset_names().

__init__(E: float, nu: float, cohesion: float, friction_angle: float, dilatancy_angle: float | None = None, H: float = 0.0, rho: float | None = None, name: str = 'Custom', description: str = '') None

Named presets are loaded from a small CSV table shipped as package data:

from tensormesh.material import FrictionalMaterial

print(FrictionalMaterial.preset_names())
soil = FrictionalMaterial.from_preset("DenseSand")

备注

The frictional-material presets below are illustrative example presets for reproducing the geomechanics examples, not design-grade soil/rock parameters.

Preset

\(E\)

\(\nu\)

cohesion

friction angle

dilatancy angle

DenseSand

50 MPa

0.30

5 kPa

35°

LooseSand

25 MPa

0.30

1 kPa

30°

SoftClay

10 MPa

0.35

15 kPa

22°

StiffClay

30 MPa

0.32

40 kPa

25°

WeatheredRock

300 MPa

0.25

100 kPa

38°