Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phase-field model for fracture using MPI and AMR #203

Merged
merged 35 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
8753b85
Added my project
WasimNiyazMunshi Oct 16, 2024
190843d
README.md
WasimNiyazMunshi Oct 16, 2024
0ebc782
README.md
WasimNiyazMunshi Oct 16, 2024
94a21d6
Fix file names.
bangerth Nov 1, 2024
5590f6d
Fix line endings.
bangerth Nov 1, 2024
9f027db
Make sure all files end with a newline.
bangerth Nov 1, 2024
11f66e1
Remove .avi, add .mp4.
bangerth Nov 1, 2024
6b9e4db
Minor edits to a few places in the README file.
bangerth Nov 1, 2024
886f14f
Rename the source file to avoid hopelessly confusing doxygen.
bangerth Nov 1, 2024
cfb987c
Add necessary endline.
bangerth Nov 1, 2024
be8e7d0
Update author email
WasimNiyazMunshi Nov 1, 2024
6aa5cc0
Merge pull request #1 from bangerth/wasims-program
WasimNiyazMunshi Nov 2, 2024
07d920a
Update phase_field.cc
WasimNiyazMunshi Dec 2, 2024
fdba6fc
Make the use of template arguments look more uniform.
bangerth Dec 3, 2024
cba1d49
Merge pull request #2 from bangerth/uniform
WasimNiyazMunshi Dec 3, 2024
016e7c5
Use LA::MPI::Vector instead of TrilinosWrappers.
bangerth Dec 3, 2024
a5739df
Merge pull request #3 from bangerth/uniform-2
WasimNiyazMunshi Dec 3, 2024
3a17d9c
Use FEValues::get_function_values().
bangerth Dec 4, 2024
c96796b
Merge pull request #4 from bangerth/get_function_values
WasimNiyazMunshi Dec 4, 2024
7a467b4
Fixed the issue so that cell iterator and fe_values_object belong to …
WasimNiyazMunshi Dec 6, 2024
e89d52a
Require deal.II 9.5.
WasimNiyazMunshi Dec 6, 2024
801ca84
Added DOI
WasimNiyazMunshi Dec 6, 2024
38064db
Minor changes to incorporate the feedback from reviewers
WasimNiyazMunshi Dec 6, 2024
30589a7
Use inline double instead of double for lambda(), mu(), gc(), use ter…
WasimNiyazMunshi Dec 6, 2024
2fc90fd
Adding checks for requirement of p4est, Trilinos, Petsc
WasimNiyazMunshi Dec 7, 2024
2351ea5
Changed namespace from step854 to PhaseField
WasimNiyazMunshi Dec 7, 2024
bdbc063
Changed namespace from step854 to PhaseField
WasimNiyazMunshi Dec 7, 2024
15eebb7
Changed namespace PhaseField to PF as the class is already named Phas…
WasimNiyazMunshi Dec 7, 2024
85dbd38
Create namespace Domain so that domain variables like x_max etc can b…
WasimNiyazMunshi Dec 8, 2024
574f562
Forgot to use ternary conditional statement at some places in H_plus()
WasimNiyazMunshi Dec 8, 2024
8aa72c5
Declare load_values_x etc as member variables instead of static local…
WasimNiyazMunshi Dec 10, 2024
546b311
Use relative tolerance for the SolverControl objects
WasimNiyazMunshi Dec 10, 2024
3708594
Add license header
WasimNiyazMunshi Dec 13, 2024
7c7421e
Move transfer of current solution to old solution from check_converge…
WasimNiyazMunshi Dec 13, 2024
12964be
Renaming the namespace to avoid conflicts
WasimNiyazMunshi Jan 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions Phase_field_fracture_model_in_3D/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
##
# CMake script for the step-854 tutorial program:
WasimNiyazMunshi marked this conversation as resolved.
Show resolved Hide resolved
##

# Set the name of the project and target:
SET(TARGET "phase_field")

# Declare all source files the target consists of. Here, this is only
# the one step-X.cc file, but as you expand your project you may wish
# to add other source files as well. If your project becomes much larger,
# you may want to either replace the following statement by something like
# FILE(GLOB_RECURSE TARGET_SRC "source/*.cc")
# FILE(GLOB_RECURSE TARGET_INC "include/*.h")
# SET(TARGET_SRC ${TARGET_SRC} ${TARGET_INC})
# or switch altogether to the large project CMakeLists.txt file discussed
# in the "CMake in user projects" page accessible from the "User info"
# page of the documentation.
SET(TARGET_SRC
${TARGET}.cc
)

# Usually, you will not need to modify anything beyond this point...

CMAKE_MINIMUM_REQUIRED(VERSION 3.3.0)

FIND_PACKAGE(deal.II 9.4.0
WasimNiyazMunshi marked this conversation as resolved.
Show resolved Hide resolved
HINTS ${deal.II_DIR} ${DEAL_II_DIR} ../ ../../ $ENV{DEAL_II_DIR}
)
IF(NOT ${deal.II_FOUND})
MESSAGE(FATAL_ERROR "\n"
"*** Could not locate a (sufficiently recent) version of deal.II. ***\n\n"
"You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake\n"
"or set an environment variable \"DEAL_II_DIR\" that contains this path."
)
ENDIF()

WasimNiyazMunshi marked this conversation as resolved.
Show resolved Hide resolved
DEAL_II_INITIALIZE_CACHED_VARIABLES()
PROJECT(${TARGET})
DEAL_II_INVOKE_AUTOPILOT()
59 changes: 59 additions & 0 deletions Phase_field_fracture_model_in_3D/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Phase-field Fracture in 3D

## Motivation
This program implements the hybrid phase-field model of Ambati et al. [1] in deal.II using adaptive mesh refinement and parallel computing capabilities.
Phase-field models have been proven to be effective in modeling complicated fractures because of their ability to model crack branching, merging, and fragmentation.
Despite this, these models are mostly limited to 2D because of the high computational cost, as these models require very fine meshes to resolve the diffused representation of the crack.
This code explores the use of parallel computing and adaptive mesh refinement to model fracture propagation using the hybrid phase-field model.

## Governing equations

The model this program solves is that of Ambati et al. [1], see there for more information. In short,
the model describes the growth of a crack as an object is successively strained. The deformation
of the solid is described by the usual force balance appropriate for quasi-static deformation:

@f{align*}{
\nabla\cdot\boldsymbol{\sigma}
(\boldsymbol{\varepsilon}(\boldsymbol{u}),d) = \mathbf{0}
@f}
with Dirichlet boundary conditions
@f{align*}{
\boldsymbol{u} = \boldsymbol{u}_D \text{ on } \Gamma_D
@f}

The crack is tracked by a "damage field" $d$ that is a smoothed version of a history field $\mathcal{H}^{+}$
that corresponds to accumulated strain at a quadrature point:
@f{align*}{
-l^2 \nabla^2 d+d=\frac{2 l}{G_c}(1-d) \mathcal{H}^{+}
@f} with the boundary condition
@f{align*}{
\left(G_{c} l\right) \nabla d \cdot \boldsymbol{n}=\mathbf{0}.
@f}
Here, $\boldsymbol{u}, d$ represent the displacement and damage(crack) fields, $l$ is the length scale parameter, $G_c$ is the critical energy release rate and $\mathcal{H}^{+}$ is the history field variable.

## To run the Code
After running `cmake .`, run `make release` or `make debug` to switch between `release` and `debug`mode. Compile using `make`.
Run the executable by using `make run` on the command line.
WasimNiyazMunshi marked this conversation as resolved.
Show resolved Hide resolved

## Numerical example
The program currently models fracture propagation in a 3-layered material subjected to equibiaxial loading along $+x$ and $+y$ directions. The problem setup is shown in the following picture:
![Setup](./doc/polyhedral_setup.png)
Results are compared for two different initial meshes, the finer $80\times80\times40$ mesh and the coarser $20\times20\times10$ mesh. The following picture shows results for the fracture patterns and the load-displacement curves for the 2 meshes:
![Load displacement curves](./doc/load_displacement_curves.png)

An animation of how the crack system in this setup evolves can be found as `./doc/polyhedral_cracks.mp4` in the code gallery source directory (left: coarse mesh; right: fine mesh).
WasimNiyazMunshi marked this conversation as resolved.
Show resolved Hide resolved


## References
[1]
```
@article{Ambati2015,
title={A review on phase-field models of brittle fracture and a new fast hybrid formulation},
author={Ambati, Marreddy and Gerasimov, Tymofiy and De Lorenzis, Laura},
journal={Computational Mechanics},
volume={55},
pages={383--405},
year={2015},
publisher={Springer}
WasimNiyazMunshi marked this conversation as resolved.
Show resolved Hide resolved
}
```
4 changes: 4 additions & 0 deletions Phase_field_fracture_model_in_3D/doc/author
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Wasim Niyaz Munshi <[email protected]>
Chandrasekhar Annavarapu <[email protected]>
Wolfgang Bangerth <[email protected]>
Marc Fehling <[email protected]>
1 change: 1 addition & 0 deletions Phase_field_fracture_model_in_3D/doc/builds-on
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
step-8 step-40
1 change: 1 addition & 0 deletions Phase_field_fracture_model_in_3D/doc/dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DEAL_II_WITH_TRILINOS DEAL_II_WITH_MPI
WasimNiyazMunshi marked this conversation as resolved.
Show resolved Hide resolved
1 change: 1 addition & 0 deletions Phase_field_fracture_model_in_3D/doc/entry-name
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Phase-field fracture model in 3D
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
WasimNiyazMunshi marked this conversation as resolved.
Show resolved Hide resolved
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions Phase_field_fracture_model_in_3D/doc/tooltip
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Phase-field fracture model in 3D with adaptive mesh refinement and a parallel solver
Loading