Materials#
Elastic isotropic#
Elactic isotropic#
This module provides functions for calculating various mechanical properties of materials based on displacement vectors and material parameters. The focus is on determining strain, strain energy density, and stress, which are fundamental to understanding the mechanical behavior of materials under load. These calculations are essential for simulations and analyses in computational mechanics.
- phasefieldx.Materials.elastic_isotropic.epsilon(u)[source]#
Calculate the symmetric strain tensor.
- Parameters:
u (ufl.Expr): The displacement vector.
- Returns:
ufl.Expr: The symmetric strain tensor calculated from the displacement vector.
- phasefieldx.Materials.elastic_isotropic.psi(u, lambda_, mu)[source]#
Calculate the strain energy density.
This function calculates the strain energy density of a material using the given displacement vector, Lame’s first parameter (lambda_), and shear modulus (mu).
- Parameters:
u (ufl.Expr): The displacement vector. lambda_ (ufl.Expr): Lame’s first parameter. mu (ufl.Expr): Shear modulus.
- Returns:
ufl.Expr: The strain energy density calculated from the given parameters.
- phasefieldx.Materials.elastic_isotropic.sigma(u, lambda_, mu)[source]#
Calculate the stress tensor.
This function calculates the stress tensor of a material using the given displacement vector, Lame’s first parameter (lambda_), and shear modulus (mu).
- Parameters:
u (ufl.Expr): The displacement vector. lambda_ (ufl.Expr): Lame’s first parameter. mu (ufl.Expr): Shear modulus.
- Returns:
ufl.Expr: The stress tensor calculated from the given parameters.
Conversion#
Conversion#
This module provides functions to convert between different material properties used in continuum mechanics. The conversions involve Young’s modulus (E), Poisson’s ratio (ν), Lame’s parameters (λ and μ), and the bulk modulus (K). These functions are essential for understanding the mechanical behavior of materials and performing various engineering calculations. Each function includes validation to ensure the input parameters are within valid ranges, raising appropriate errors if they are not.
- phasefieldx.Materials.conversion.get_bulk_modulus(E, nu)[source]
Calculate the bulk modulus using Young’s modulus (E) and Poisson’s ratio (nu).
- The bulk modulus (K) is calculated using the formula:
K = E / (3 * (1 - 2 * nu))
- Parameters:
E (float): Young’s modulus of the material. nu (float): Poisson’s ratio of the material.
- Returns:
float: Bulk modulus (K).
- Raises:
ValueError: If the value of Poisson’s ratio (nu) is outside the valid range (-1 < nu < 0.5).
- phasefieldx.Materials.conversion.get_bulk_modulus_lame(lambda_, mu)[source]
Calculate the bulk modulus (K) using Lame’s parameters (lambda and mu).
- The bulk modulus (K) is calculated using the formula:
K = lambda + (2/3) * mu
- Parameters:
lambda_ (float): Lame’s first parameter. mu (float): Lame’s second parameter.
- Returns:
float: Bulk modulus (K).
- Raises:
ValueError: If the combination of Lame’s parameters results in an invalid value for bulk modulus.
- phasefieldx.Materials.conversion.get_lambda_lame(E, nu)[source]
Calculate the Lame’s first parameter (lambda) using Young’s modulus (E) and Poisson’s ratio (nu).
- Lame’s first parameter (lambda) is calculated using the formula:
lambda = E * nu / ((1.0 - 2.0 * nu) * (1.0 + nu))
- Parameters:
E (float): Young’s modulus of the material. nu (float): Poisson’s ratio of the material.
- Returns:
float: Lame’s first parameter (lambda).
- Raises:
ValueError: If the value of Poisson’s ratio (nu) is outside the valid range (-1 < nu < 0.5).
- phasefieldx.Materials.conversion.get_mu_lame(E, nu)[source]
Calculate the Lame’s second parameter (mu) using Young’s modulus (E) and Poisson’s ratio (nu).
- Lame’s second parameter (mu) is calculated using the formula:
mu = E / (2.0 * (1.0 + nu))
- Parameters:
E (float): Young’s modulus of the material. nu (float): Poisson’s ratio of the material.
- Returns:
float: Lame’s second parameter (mu).
- Raises:
ValueError: If the value of Poisson’s ratio (nu) is outside the valid range (-1 < nu < 0.5).
- phasefieldx.Materials.conversion.get_poissons_ratio(lambda_, mu)[source]
Calculate Poisson’s ratio (nu) using Lame’s parameters (lambda and mu).
- Poisson’s ratio (nu) is calculated using the formula:
nu = lambda / (2 * (lambda + mu))
- Parameters:
lambda_ (float): Lame’s first parameter. mu (float): Lame’s second parameter.
- Returns:
float: Poisson’s ratio (nu).
- Raises:
ValueError: If the combination of Lame’s parameters results in an invalid value for Poisson’s ratio.
- phasefieldx.Materials.conversion.get_youngs_modulus(lambda_, mu)[source]
Calculate Young’s modulus (E) using Lame’s parameters (lambda and mu).
- Young’s modulus (E) is calculated using the formula:
E = mu * (3 * lambda + 2 * mu) / (lambda + mu)
- Parameters:
lambda_ (float): Lame’s first parameter. mu (float): Lame’s second parameter.
- Returns:
float: Young’s modulus (E).
- Raises:
ValueError: If the value of Lame’s second parameter (mu) is not positive.