Phyth v0.1.0
A dimensional safe C++ header-only mechanics and electromagnetics simulation library.
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Phyth::IsotropicMaterial Class Reference

Linear elastic isotropic material model. More...

#include <IsotropicMaterial.hpp>

Collaboration diagram for Phyth::IsotropicMaterial:
Collaboration graph
[legend]

Public Member Functions

 IsotropicMaterial ()=default
 Default constructor.
 
 IsotropicMaterial (const Quantity< Pascal > youngs_modulus, const Scalar poisson_ratio)
 Construct from Young's modulus and Poisson's ratio.
 
 IsotropicMaterial (const Quantity< Pascal > shear_modulus, const Quantity< Pascal > bulk_modulus)
 Construct from shear modulus and bulk modulus.
 
Quantity< Pascal > GetYoungsModulus () const
 Get Young's modulus.
 
Scalar GetPoissonRatio () const
 Get Poisson's ratio.
 
Quantity< Pascal > GetShearModulus () const
 Get shear modulus.
 
Quantity< Pascal > GetBulkModulus () const
 Get bulk modulus.
 
Quantity< Pascal > GetLameLambda () const
 Get Lame's first parameter.
 
Matrix3x3< Quantity< Pascal > > ComputeStress (const Matrix3x3< Scalar > &strain) const
 Compute stress tensor from strain tensor.
 
Matrix3x3< Scalar > ComputeStrain (const Matrix3x3< Quantity< Pascal > > &stress) const
 Compute strain tensor from stress tensor.
 

Private Member Functions

void UpdateDerivedParameters ()
 Update derived parameters from (E, nu)
 
void UpdateDerivedParametersFromGK ()
 Update derived parameters from (G, K)
 

Private Attributes

Quantity< Pascal > youngs_modulus_
 
Scalar poisson_ratio_
 
Quantity< Pascal > shear_modulus_
 
Quantity< Pascal > bulk_modulus_
 
Quantity< Pascal > lame_lambda_
 

Detailed Description

Linear elastic isotropic material model.

IsotropicMaterial implements the constitutive relationship for linear elastic materials with direction-independent mechanical properties. The material is fully defined by any two independent elastic constants, with automatic derivation of all other parameters.

The stress-strain relationship follows Hooke's law: sigma_ij = lambda * delta_ij * epsilon_kk + 2 * mu * epsilon_ij

where lambda is Lame's first parameter and mu is the shear modulus.

Supported material parameter pairs for construction:

All quantities maintain physical dimensions through the Quantity system, ensuring dimensional consistency at compile time.

Example: // Steel-like material IsotropicMaterial steel(210.0e9_Pa, 0.3);

// Compute stress from strain Matrix3x3<Scalar> strain = ...; auto stress = steel.ComputeStress(strain);

Definition at line 39 of file IsotropicMaterial.hpp.

Constructor & Destructor Documentation

◆ IsotropicMaterial() [1/3]

Phyth::IsotropicMaterial::IsotropicMaterial ( )
default

Default constructor.

Creates an uninitialized material. All elastic moduli are zero. Use this only when the material will be assigned later.

◆ IsotropicMaterial() [2/3]

Phyth::IsotropicMaterial::IsotropicMaterial ( const Quantity< Pascal >  youngs_modulus,
const Scalar  poisson_ratio 
)
inline

Construct from Young's modulus and Poisson's ratio.

This is the most common construction method for engineering materials. All other elastic constants (shear modulus G, bulk modulus K, and Lame's first parameter lambda) are derived automatically.

Valid range: -1 < nu < 0.5 for thermodynamic stability

  • nu > 0.5: material becomes incompressible or auxetic
  • nu < -1: violates stability criteria
Parameters
youngs_modulusYoung's modulus E (Pa)
poisson_ratioPoisson's ratio nu (dimensionless)

Definition at line 63 of file IsotropicMaterial.hpp.

◆ IsotropicMaterial() [3/3]

Phyth::IsotropicMaterial::IsotropicMaterial ( const Quantity< Pascal >  shear_modulus,
const Quantity< Pascal >  bulk_modulus 
)
inline

Construct from shear modulus and bulk modulus.

This construction method is useful when the material properties are derived from wave propagation measurements or high-pressure experiments.

All other constants (Young's modulus E, Poisson's ratio nu, and Lame's first parameter lambda) are derived automatically.

Parameters
shear_modulusShear modulus G (Pa), must be positive
bulk_modulusBulk modulus K (Pa), must be positive

Definition at line 81 of file IsotropicMaterial.hpp.

Member Function Documentation

◆ ComputeStrain()

Matrix3x3< Scalar > Phyth::IsotropicMaterial::ComputeStrain ( const Matrix3x3< Quantity< Pascal > > &  stress) const
inline

Compute strain tensor from stress tensor.

Implements the inverse form of Hooke's law: epsilon_ij = (1 + nu) / E * sigma_ij - nu / E * trace(sigma) * delta_ij

This is the compliance form of the constitutive relationship, useful for displacement-based formulations.

Parameters
stressStress tensor in pascals (symmetric)
Returns
Strain tensor (dimensionless, symmetric)

Example: Matrix3x3<Quantity<Pascal>> stress; stress(0, 0) = 100.0e6_Pa; // uniaxial tension auto strain = material.ComputeStrain(stress);

Definition at line 166 of file IsotropicMaterial.hpp.

◆ ComputeStress()

Matrix3x3< Quantity< Pascal > > Phyth::IsotropicMaterial::ComputeStress ( const Matrix3x3< Scalar > &  strain) const
inline

Compute stress tensor from strain tensor.

Implements the generalized Hooke's law for isotropic materials: sigma_ij = lambda * trace(epsilon) * delta_ij + 2 * mu * epsilon_ij

The strain tensor is expected to represent infinitesimal strain (small deformation theory). For finite strain, use appropriate hyperelastic models instead.

Parameters
strainStrain tensor (dimensionless, symmetric)
Returns
Stress tensor in pascals (symmetric)

Example: Matrix3x3<Scalar> strain; strain(0, 0) = 0.001; // 0.1% axial strain auto stress = material.ComputeStress(strain);

Definition at line 134 of file IsotropicMaterial.hpp.

◆ GetBulkModulus()

Quantity< Pascal > Phyth::IsotropicMaterial::GetBulkModulus ( ) const
inline

Get bulk modulus.

Returns
Bulk modulus K in pascals

Definition at line 108 of file IsotropicMaterial.hpp.

◆ GetLameLambda()

Quantity< Pascal > Phyth::IsotropicMaterial::GetLameLambda ( ) const
inline

Get Lame's first parameter.

Returns
Lame's first parameter lambda in pascals

Definition at line 114 of file IsotropicMaterial.hpp.

◆ GetPoissonRatio()

Scalar Phyth::IsotropicMaterial::GetPoissonRatio ( ) const
inline

Get Poisson's ratio.

Returns
Poisson's ratio nu (dimensionless)

Definition at line 96 of file IsotropicMaterial.hpp.

◆ GetShearModulus()

Quantity< Pascal > Phyth::IsotropicMaterial::GetShearModulus ( ) const
inline

Get shear modulus.

Returns
Shear modulus G in pascals

Definition at line 102 of file IsotropicMaterial.hpp.

◆ GetYoungsModulus()

Quantity< Pascal > Phyth::IsotropicMaterial::GetYoungsModulus ( ) const
inline

Get Young's modulus.

Returns
Young's modulus E in pascals

Definition at line 90 of file IsotropicMaterial.hpp.

◆ UpdateDerivedParameters()

void Phyth::IsotropicMaterial::UpdateDerivedParameters ( )
inlineprivate

Update derived parameters from (E, nu)

Relations: G = E / (2 * (1 + nu)) K = E / (3 * (1 - 2 * nu)) lambda = E * nu / ((1 + nu) * (1 - 2 * nu))

Note: These formulas are singular for nu = 0.5 (incompressible limit) and nu = -1 (stability limit).

Definition at line 202 of file IsotropicMaterial.hpp.

◆ UpdateDerivedParametersFromGK()

void Phyth::IsotropicMaterial::UpdateDerivedParametersFromGK ( )
inlineprivate

Update derived parameters from (G, K)

Relations: E = 9 * G * K / (3 * K + G) nu = (3 * K - 2 * G) / (2 * (3 * K + G)) lambda = K - 2/3 * G

This formulation is more stable near the incompressible limit.

Definition at line 218 of file IsotropicMaterial.hpp.

Member Data Documentation

◆ bulk_modulus_

Quantity<Pascal> Phyth::IsotropicMaterial::bulk_modulus_
private

Definition at line 188 of file IsotropicMaterial.hpp.

◆ lame_lambda_

Quantity<Pascal> Phyth::IsotropicMaterial::lame_lambda_
private

Definition at line 189 of file IsotropicMaterial.hpp.

◆ poisson_ratio_

Scalar Phyth::IsotropicMaterial::poisson_ratio_
private

Definition at line 185 of file IsotropicMaterial.hpp.

◆ shear_modulus_

Quantity<Pascal> Phyth::IsotropicMaterial::shear_modulus_
private

Definition at line 187 of file IsotropicMaterial.hpp.

◆ youngs_modulus_

Quantity<Pascal> Phyth::IsotropicMaterial::youngs_modulus_
private

Definition at line 184 of file IsotropicMaterial.hpp.


The documentation for this class was generated from the following file: