Phase-Field Fracture#
Input Class#
Input: Phase-Field Fracture#
- class phasefieldx.Element.Phase_Field_Fracture.Input.Input(E=210.0, nu=0.3, Gc=0.0027, l=0.015, degradation='isotropic', split_energy='no', degradation_function='quadratic', irreversibility='no', fatigue=False, fatigue_degradation_function='asymptotic', fatigue_val=0.05625, k=0, save_solution_xdmf=False, save_solution_vtu=True, results_folder_name='results')[source]#
Bases:
objectClass for managing phase-field fracture simulation parameters.
This class encapsulates parameters related to phase-field fracture simulations and provides methods for setting, logging, and exporting these parameters.
- Attributes:
- Efloat
Young’s modulus of the material.
- nufloat
Poisson’s ratio of the material.
- Gcfloat
Critical energy release rate.
- lfloat
Length scale parameter.
- lambda_float
Lame’s first parameter calculated from E and nu.
- mufloat
Shear modulus calculated from E and nu.
- degradationstr
Type of material degradation (isotropic or anisotropic).
- split_energystr
Type of energy splitting (spectral, deviatoric, or none).
- degradation_functionstr
Type of degradation function (e.g., quadratic).
- irreversibilitystr
Indication of irreversibility of damage.
- fatiguebool
Indicates if fatigue degradation is enabled.
- fatigue_degradation_functionstr
Fatigue degradation function type.
- fatigue_valfloat
Fatigue degradation value.
- kint
A numerical parameter.
- save_solution_xdmfbool
Indicates whether to save solutions in XDMF format.
- save_solution_vtubool
Indicates whether to save solutions in VTU format.
- results_folder_namestr
Name of the folder to save simulation results.
Methods
__init__(…)
Initialize the Input class with default parameters.
save_log_info(logger)
Log the simulation parameters using the provided logger.
save_parameters_to_csv(filename=”parameters.input”)
Save the simulation parameters to a two-column text file (tab-separated) for easy loading with pandas.
__str__()
Return a string representation of the simulation parameters.
\(g(\phi)\) Degradation functions#
Degradation Functions \(g(\phi)\)#
This module provides various degradation functions and their derivatives, which are used in phase field fracture models.
Energy Split#
Energy Decomposition#
Regarding energy degradation, there are two main descriptions of the constitutive free energy functional. The isotropic model degrades all the energy; in the other case, the anisotropic model only degrades the energy related to tension efforts, trying to account that cracks only are generated under tension efforts.
In the Isotropic constitutive free energy functional,
the degradation function \(g(\phi)\) degrades all the energy \(\psi(\boldsymbol \epsilon(\boldsymbol u))\). In the case of the anisotropic constitutive free energy functional,
the energy \(\psi(\boldsymbol \epsilon(\boldsymbol u))\) is split in two components, \(\psi=\psi_a+\psi_b\), in which the component \(\psi_a\) attains to the energy relative to tensions, so the degradation function only applied to it, avoiding the creation of crack due to compression effort.
There are several methods to carry out the energy slip. PhaseFieldX code implements the Spectral [Miehe] and volumetric-deviatoric [Amor] decomposition.
\(f(\bar{\alpha})\) Fatigue Degradation functions#
Fatigue Degradation Functions \(f(\bar{\alpha})\)#
This module provides functions to evaluate fatigue degradation. Fatigue degradation functions describe how the degradation evolves over time or under repeated loading conditions. The degradation is typically quantified using a parameter \(\bar{\alpha}\), which represents the accumulated variable.
Solvers#
Solver: Phase-field fracture/fatigue#
This module provides a solver for phase-field fracture and fatigue simulations using the Finite Element Method (FEM).
- phasefieldx.Element.Phase_Field_Fracture.solver.solver.solve(Data, msh, final_time, V_u, V_Φ, bc_list_u=[], bc_list_phi=[], update_boundary_conditions=None, f_list_u=None, T_list_u=None, update_loading=None, ds_bound=None, dt=1.0, path=None, bcs_list_u_names=None, min_stagger_iter=2, max_stagger_iter=10000, stagger_error_tol=1e-08)[source]#
Solve the phase-field fracture and fatigue problem.
- Parameters:
- Dataobject
An object containing the simulation parameters and settings.
- mshdolfinx.mesh
The computational mesh for the simulation.
- final_timefloat
The final simulation time.
- V_udolfinx.FunctionSpace
The function space for the displacement field.
- V_Φdolfinx.FunctionSpace
The function space for the phase-field.
- bc_list_ulist of dolfinx.DirichletBC, optional
List of Dirichlet boundary conditions for the displacement field.
- bc_list_philist of dolfinx.DirichletBC, optional
List of Dirichlet boundary conditions for the phase-field.
- update_boundary_conditionscallable, optional
A function to update boundary conditions dynamically.
- f_list_ulist, optional
List of body forces.
- T_list_ulist of tuple, optional
List of tuples containing traction forces and corresponding measures.
- update_loadingcallable, optional
A function to update loading conditions dynamically.
- ds_boundnumpy.ndarray, optional
Array of boundary measures for calculating reaction forces.
- dtfloat, optional
Time step size.
- pathstr, optional
Directory path for saving simulation results. Defaults to current working directory.
- min_stagger_iter: int
Minimum stagger iterations for numerical simulations.
- max_stagger_iter: int
Maximum stagger iterations for numerical simulations.
- stagger_error_tol: float
Tolerance for stagger error in simulations.
- Returns:
- None
Energy-controlled PFF solver: Variational scheme#
This module implements the variational solver for the phase-field fracture problem presented in Castillón et al.[1].
- phasefieldx.Element.Phase_Field_Fracture.solver.solver_ener_variational.solve(Data, msh, final_gamma, V_u, V_Φ, bc_list_u=[], bc_list_phi=[], f_list_u=None, T_list_u=None, ds_bound=None, dtau=0.0005, dtau_min=1e-12, dtau_max=0.1, path=None, bcs_list_u_names=None, c1=1.0, c2=1.0, threshold_gamma_save=None)[source]#
Solve the phase-field fracture problem.
- Parameters:
- Dataobject
Container for simulation parameters (material constants, Gc, l, degradation_function, save flags, results folder name, logging helpers, and methods like save_log_info).
- mshdolfinx.mesh.Mesh
The computational mesh.
- final_gammafloat
Target crack surface measure at which the simulation stops.
- V_udolfinx.FunctionSpace
Function space for the displacement field.
- V_Φdolfinx.FunctionSpace
Function space for the phase-field.
- bc_list_ulist, optional
List of dolfinx DirichletBC objects for the displacement DOFs (default: []).
- bc_list_philist, optional
List of dolfinx DirichletBC objects for the phase-field DOFs (default: []).
- f_list_ulist or None, optional
List of body forces (not required by this solver; default: None).
- T_list_ulist of tuple or None, optional
List of traction definitions as tuples (traction_vector, measure). The solver currently uses T_list_u[0] for external work and Lagrange coupling (default: None).
- ds_boundarray-like or None, optional
Boundary measure(s) for reaction force calculation (default: None).
- dtaufloat, optional
Initial pseudo-time increment / load parameter increment (default: 5e-4).
- dtau_minfloat, optional
Minimum allowed dtau before aborting (default: 1e-12).
- dtau_maxfloat, optional
Maximum allowed dtau (default: 0.1).
- pathstr or None, optional
Path where results folder will be created; if None uses current working dir (default: None).
- bcs_list_u_nameslist of str or None, optional
Names used when saving reaction files for displacement boundary conditions (default: None).
- c1float, optional
Coefficient multiplying the crack measure (default: 1.0).
- c2float, optional
Coefficient multiplying the external energy (default: 1.0).
- threshold_gamma_savefloat or None, optional
Threshold on change in gamma to trigger Paraview output. If None, treated as 0.0 (default: None).
Notes
The docstring parameters correspond to the function signature. Some inputs (like T_list_u) are accessed by index in the implementation and must be provided in that form.
Energy-controlled PFF solver: Non-variational scheme#
This module implements the non-variational solver for the phase-field fracture problem presented in Castillón et al.[1].
- phasefieldx.Element.Phase_Field_Fracture.solver.solver_ener_non_variational.solve(Data, msh, final_gamma, V_u, V_Φ, bc_list_u=[], bc_list_phi=[], f_list_u=None, T_list_u=None, ds_bound=None, dtau=0.0005, dtau_min=1e-12, dtau_max=0.1, path=None, bcs_list_u_names=None, c1=1.0, c2=1.0, threshold_gamma_save=None)[source]#
Solve the phase-field fracture problem.
- Parameters:
- Dataobject
Container for simulation parameters (material constants, Gc, l, degradation_function, save flags, results folder name, logging helpers, and methods like save_log_info).
- mshdolfinx.mesh.Mesh
The computational mesh.
- final_gammafloat
Target crack surface measure at which the simulation stops.
- V_udolfinx.FunctionSpace
Function space for the displacement field.
- V_Φdolfinx.FunctionSpace
Function space for the phase-field.
- bc_list_ulist, optional
List of dolfinx DirichletBC objects for the displacement DOFs (default: []).
- bc_list_philist, optional
List of dolfinx DirichletBC objects for the phase-field DOFs (default: []).
- f_list_ulist or None, optional
List of body forces (not required by this solver; default: None).
- T_list_ulist of tuple or None, optional
List of traction definitions as tuples (traction_vector, measure). The solver currently uses T_list_u[0] for external work and Lagrange coupling (default: None).
- ds_boundarray-like or None, optional
Boundary measure(s) for reaction force calculation (default: None).
- dtaufloat, optional
Initial pseudo-time increment / load parameter increment (default: 5e-4).
- dtau_minfloat, optional
Minimum allowed dtau before aborting (default: 1e-12).
- dtau_maxfloat, optional
Maximum allowed dtau (default: 0.1).
- pathstr or None, optional
Path where results folder will be created; if None uses current working dir (default: None).
- bcs_list_u_nameslist of str or None, optional
Names used when saving reaction files for displacement boundary conditions (default: None).
- c1float, optional
Coefficient multiplying the crack measure (default: 1.0).
- c2float, optional
Coefficient multiplying the external energy (default: 1.0).
- threshold_gamma_savefloat or None, optional
Threshold on change in gamma to trigger Paraview output. If None, treated as 0.0 (default: None).
Notes
The docstring parameters correspond to the function signature. Some inputs (like T_list_u) are accessed by index in the implementation and must be provided in that form.