What Material Models Are Supported by PhaseFieldX?
PhaseFieldX supports a single mechanical material model: an isotropic linear-elastic constitutive law, complemented by conversion utilities that translate between common elastic constants (Young's modulus, Poisson's ratio, Lamé parameters, and bulk modulus).
The open-source repository castillonmiguel/phasefieldx implements this material model using UFL-based functions that compute strain, stress, and strain-energy density. These primitives power both standard elasticity analyses and phase-field fracture simulations throughout the library.
Core Material Model: Isotropic Linear Elasticity
The foundation of PhaseFieldX's material modeling resides in src/phasefieldx/Materials/elastic_isotropic.py. This module exposes three core functions that define the mechanical response for isotropic linear-elastic materials:
epsilon(u)– Computes the symmetric strain tensor from the displacement fieldu.psi(u, lambda_, mu)– Calculates the strain-energy density using the Lamé parameters.sigma(u, lambda_, mu)– Returns the Cauchy stress tensor.
Strain, Stress, and Energy Functions
The implementation handles both multi-dimensional and one-dimensional cases. For 2D and 3D problems, the strain tensor uses the symmetric gradient:
from phasefieldx.Materials.elastic_isotropic import epsilon, sigma, psi
# Given a displacement field u (UFL object)
strain = epsilon(u) # ε = sym(∇u)
# Compute stress using Lamé parameters
stress = sigma(u, lambda_, mu) # σ = λ tr(ε) I + 2με
# Calculate strain energy density
energy_density = psi(u, lambda_, mu) # ψ = ½ λ tr(ε)² + με:ε
In one-dimensional simulations, the functions simplify to scalar operations where epsilon(u) returns ∇u directly, and the stress reduces to (lambda_ + 2*mu) * epsilon(u).
Material Property Conversion Utilities
PhaseFieldX recognizes that users may possess material data in various formats. The src/phasefieldx/Materials/conversion.py module provides bidirectional translation between elastic constants, ensuring the isotropic model can accept inputs as Young's modulus (E), Poisson's ratio (ν), Lamé parameters (λ, μ), or bulk modulus (K).
Available Conversion Functions
The utility functions compute missing parameters from any provided pair:
from phasefieldx.Materials.conversion import (
get_lambda_lame, get_mu_lame, get_bulk_modulus,
get_youngs_modulus, get_poissons_ratio
)
# Convert from E and nu to Lamé parameters
E = 210e9 # Young's modulus [Pa]
nu = 0.3 # Poisson's ratio
lambda_ = get_lambda_lame(E, nu) # First Lamé parameter
mu = get_mu_lame(E, nu) # Shear modulus (second Lamé parameter)
# Reverse conversion
E_recovered = get_youngs_modulus(lambda_, mu)
nu_recovered = get_poissons_ratio(lambda_, mu)
These conversions are automatically invoked when parsing simulation inputs in src/phasefieldx/Element/Elasticity/Input.py and src/phasefieldx/Element/Phase_Field_Fracture/Input.py, creating a material-properties container that supplies lambda_ and mu to the constitutive functions.
Integration with Phase-Field Fracture Simulations
The isotropic linear-elastic model serves as the mechanical backbone for phase-field fracture analyses. In src/phasefieldx/Element/Phase_Field_Fracture/solver/solver_ener_variational.py, the stress and strain functions combine with degradation functions to model crack evolution.
Anisotropic Energy Splitting vs. Material Anisotropy
PhaseFieldX implements anisotropic energy splitting through src/phasefieldx/Element/Phase_Field_Fracture/split_energy_stress_tangent_functions.py. This feature distinguishes between tensile and compressive stress states to prevent crack healing under compression, but it does not constitute an anisotropic material model. The underlying elastic stiffness remains isotropic, governed by the sigma and psi functions from elastic_isotropic.py.
from phasefieldx.Element.Phase_Field_Fracture.g_degradation_functions import g
from phasefieldx.Materials.elastic_isotropic import sigma, epsilon
# Within the variational formulation
g_phi = g(phi, degradation_function) # Degradation function of phase field
stress_active = (g_phi + k) * sigma(u, lambda_, mu) # Degraded stress
Summary
PhaseFieldX provides a focused, robust material modeling layer built around a single constitutive framework:
- Isotropic linear-elastic material model implemented in
elastic_isotropic.pywith UFL-based functions for strain, stress, and energy density. - Material property conversion utilities in
conversion.pyenabling seamless translation between Young's modulus, Poisson's ratio, Lamé parameters, and bulk modulus. - Integration with fracture mechanics through energy degradation functions that utilize the isotropic elastic backbone while supporting tension-compression splitting.
Frequently Asked Questions
Does PhaseFieldX support anisotropic elastic materials?
No. PhaseFieldX currently implements only isotropic linear-elastic material behavior. While the library supports anisotropic energy splitting for phase-field fracture (distinguishing tensile from compressive damage), the underlying elastic stiffness tensor remains isotropic with no directional dependence in material properties.
How do I specify material properties in PhaseFieldX?
You can specify material properties using any pair of standard elastic constants in the JSON input files or Python scripts. The conversion.py module automatically converts Young's modulus (E) and Poisson's ratio (ν) into the required Lamé parameters (λ, μ) used internally by the isotropic model. Alternative conversions between bulk modulus, shear modulus, and Lamé parameters are also supported.
What is the difference between energy splitting and material anisotropy?
Energy splitting (implemented in split_energy_stress_tangent_functions.py) is a fracture mechanics technique that separates the elastic energy into tensile and compressive components to prevent crack healing under compression. This is a degradation strategy, not a material model. Material anisotropy would imply directionally dependent elastic constants (e.g., different Young's moduli in x vs y directions), which PhaseFieldX does not currently support.
Can I use custom constitutive laws with PhaseFieldX?
The library is designed around the isotropic linear-elastic functions in elastic_isotropic.py. While you could theoretically implement custom UFL expressions for stress and strain energy by following the same function signature (sigma(u, lambda_, mu) and psi(u, lambda_, mu)), the existing solver infrastructure in Element/Elasticity/ and Element/Phase_Field_Fracture/ expects the specific isotropic formulation. Extending to hyperelastic or plastic material models would require modifications to the core variational formulations.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →