Symbolic Material

class mechpy.core.symbolic.material.SymbolicComplianceTensor(data, name=None)

Bases: SymbolicSixBySixTensor

Represents the compliance tensor used in elasticity calculations.

Parameters:
  • data – The tensor data.

  • name – The name of the tensor.

class mechpy.core.symbolic.material.SymbolicStiffnessTensor(data, name=None)

Bases: SymbolicSixBySixTensor

Represents the stiffness tensor used in elasticity calculations.

Parameters:
  • data – The tensor data.

  • name – The name of the tensor.

class mechpy.core.symbolic.material.SymbolicMaterial(**material_props)

Bases: object

Represents a general material with symbolic properties.

Parameters:

material_props – Arbitrary keyword arguments representing material properties.

class mechpy.core.symbolic.material.SymbolicElasticMaterial(**material_props)

Bases: SymbolicMaterial

Represents an elastic material with methods to compute stiffness and compliance tensors.

Parameters:

material_props – Arbitrary keyword arguments representing material properties.

stiffness_tensor()

Computes the stiffness tensor for the material.

Raises:

NotImplementedError – This method should be implemented by subclasses.

compliance_tensor() SymbolicComplianceTensor

Computes the compliance tensor for the material.

Returns:

The computed compliance tensor.

class mechpy.core.symbolic.material.SymbolicIsotropicMaterial(**material_props)

Bases: SymbolicElasticMaterial

Represents an isotropic elastic material with properties such as Young’s modulus and Poisson’s ratio.

Parameters:

material_props – Arbitrary keyword arguments representing material properties.

static lame_params(E, nu)

Converts Young’s modulus and Poisson’s ratio to Lamé parameters.

Parameters:
  • E – Young’s modulus.

  • nu – Poisson’s ratio.

Returns:

Tuple of Lamé parameters (lambda, mu).

static youngs_params(lamda, mu)

Converts Lamé parameters to Young’s modulus and Poisson’s ratio.

Parameters:
  • lamda – First Lamé parameter.

  • mu – Second Lamé parameter (shear modulus).

Returns:

Tuple of Young’s modulus and Poisson’s ratio (E, nu).

stiffness_tensor(lames_param=True) SymbolicStiffnessTensor

Computes the stiffness tensor for the isotropic material.

Parameters:

lames_param – If True, use Lamé parameters; otherwise, use Young’s modulus and Poisson’s ratio.

Returns:

The computed stiffness tensor.

compliance_tensor() SymbolicComplianceTensor

Computes the compliance tensor for the isotropic material.

Returns:

The computed compliance tensor.

class mechpy.core.symbolic.material.SymbolicTransverseIsotropicMaterial(**material_props)

Bases: SymbolicElasticMaterial

Represents a transverse isotropic material with specific elastic properties.

Parameters:

material_props – Arbitrary keyword arguments representing material properties.

props_keys = {'E_L', 'E_T', 'G_L', 'G_T', 'nu'}
stiffness_tensor() SymbolicStiffnessTensor

Computes the stiffness tensor for the transverse isotropic material.

Returns:

The computed stiffness tensor.

class mechpy.core.symbolic.material.SymbolicOrthotropicMaterial(**material_props)

Bases: SymbolicElasticMaterial

Represents an orthotropic material with specific elastic properties.

Parameters:

material_props – Arbitrary keyword arguments representing material properties.

props_keys = {'E1', 'E2', 'E3', 'G12', 'G23', 'G31', 'nu12', 'nu23', 'nu31'}
stiffness_tensor() SymbolicStiffnessTensor

Computes the stiffness tensor for the orthotropic material.

Returns:

The computed stiffness tensor.