Skip to content

Commit

Permalink
complete doc/content/tutorial 03 & 04 (#110)
Browse files Browse the repository at this point in the history
* complete doc/content/tutorial 03 & 04
refs #46

* Improve tutorials
* Modify badge creation workflow
  • Loading branch information
lyyc199586 authored Oct 3, 2021
1 parent c548fee commit 1038739
Show file tree
Hide file tree
Showing 25 changed files with 86 additions and 12 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,18 @@ jobs:
mamba install moose-tools moose-libmesh lcov
conda list | grep moose
- name: Compile RACCOON
- name: Compile RACCOON (with coverage)
if: ${{ github.event_name == 'push' }}
shell: bash -l {0}
run: |
coverage=true make -j 2
- name: Compile RACCOON (without coverage)
if: ${{ github.event_name == 'pull_request' }}
shell: bash -l {0}
run: |
make -j 2
- name: Build documentation
shell: bash -l {0}
run: |
Expand All @@ -46,6 +53,7 @@ jobs:
./moosedocs.py build --destination ../gh-pages/
- name: Extract coverage data
if: ${{ github.event_name == 'push' }}
shell: bash -l {0}
run: |
mkdir gh-pages/coverage
Expand All @@ -64,6 +72,7 @@ jobs:
echo "COVERAGE_PCT="$(python extract_coverage_percentage.py $COVERAGE_DIR/genhtml.out)"" >> $GITHUB_ENV
- name: Create coverage badge
if: ${{ github.event_name == 'push' }}
uses: schneegans/[email protected]
with:
auth: ${{ secrets.GIST_TOKEN }}
Expand All @@ -72,9 +81,9 @@ jobs:
label: coverage
message: ${{ env.COVERAGE_PCT }}
color: lightgrey

- name: Deploy to GitHub Pages
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
if: ${{ github.event_name == 'push' }}
uses: JamesIves/[email protected]
with:
branch: gh-pages
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
RACCOON

[![Tests](https://github.com/hugary1995/raccoon/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/hugary1995/raccoon/actions/workflows/tests.yml) [![Documentation](https://github.com/hugary1995/raccoon/actions/workflows/build_docs.yml/badge.svg?branch=master)](https://github.com/hugary1995/raccoon/actions/workflows/build_docs.yml) [![clang-format](https://github.com/hugary1995/raccoon/actions/workflows/clang_format.yml/badge.svg?branch=master)](https://github.com/hugary1995/raccoon/actions/workflows/clang_format.yml) [![coverage](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/hugary1995/b7cdef2b415e50a4f549807ab7848bdf/raw/RACCOON_coverage.json)](https://hugary1995.github.io/raccoon/coverage/)
[![Tests](https://github.com/hugary1995/raccoon/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/hugary1995/raccoon/actions/workflows/tests.yml) [![Documentation](https://github.com/hugary1995/raccoon/actions/workflows/build_docs.yml/badge.svg?branch=master)](https://github.com/hugary1995/raccoon/actions/workflows/build_docs.yml) [![clang-format](https://github.com/hugary1995/raccoon/actions/workflows/clang_format.yml/badge.svg?branch=master)](https://github.com/hugary1995/raccoon/actions/workflows/clang_format.yml) [![coverage](https://raw.githubusercontent.com/hugary1995/raccoon/master/doc/content/media/coverage.svg)](https://hugary1995.github.io/raccoon/coverage/)
=======

RACCOON is built on MOOSE, a massively parallel object-oriented framework for finite element.
Expand Down
9 changes: 9 additions & 0 deletions doc/content/bib/raccoon.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@article{bourdin2007numerical,
title={Numerical implementation of the variational formulation for quasi-static brittle fracture},
author={Bourdin, Blaise},
journal={Interfaces and free boundaries},
volume={9},
number={3},
pages={411--430},
year={2007}
}
12 changes: 6 additions & 6 deletions doc/content/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,29 @@

!gallery! large=6

!card! media/mode1.gif title=Mode I crack propagation
!card! media/mode1.mp4 title=Mode I crack propagation
The standard benchmark problem of a notched plate in tension. The notch is either "meshed-in" or represented using an initial damage field. A Mode-I type of crack emanates from the notch.
!card-end!

!card! media/mode2.gif title=Mode II crack propagation
!card! media/mode2.mp4 title=Mode II crack propagation
The standard benchmark problem of a notched plate under shear load. The notch is either "meshed-in" or represented using an initial damage field. A Mode-II type of crack emanates from the notch.
!card-end!

!card! media/soil.gif title=Soil desiccation
!card! media/soil.mp4 title=Soil desiccation
Row 1: Three dimensional soil desiccation simulations in a film-substrate system.

Row 2: Two dimensional crack morphologies obtained with different constructions of stochastic fracture properties.
!card-end!

!card! media/kalthoff.gif title=The Kalthoff-Winkler experiment
!card! media/kalthoff.mp4 title=The Kalthoff-Winkler experiment
The Kalthoff-Winkler experiment simulated using the phase-field cohesive fracture model. The elastodynamics problem is solved using an explicit central-difference operator. The phase-field is shown on the left, and the field of maximum principal stress is shown on the right.
!card-end!

!card! media/stochastic.gif title=Non-intrusive stochastic FEM
!card! media/stochastic.mp4 title=Non-intrusive stochastic FEM
The stochastic random field is decomposed using the Karhunen-Loeve expansion. The first 10 eigenvectors with the largest eigenvalues are shown on the left. The crack propagation with random fracture properties constructed using the KL-expansion is shown on the right.
!card-end!

!card! media/3pb.gif title=Three-point bending of a ductile specimen
!card! media/3pb.mp4 title=Three-point bending of a ductile specimen
The simulation result of a ductile aluminum-alloy specimen. The compressible Neo-Hookean hyperelasticity model and the $J_2$ plasticity model are used. The fracture toughness is coupled with the effective plastic strain by introducing a novel coalescence dissipation in the total potential. The resulting load-deflection curve is also reasonable close to the experimental data after calibration.
!card-end!
!gallery-end!
Binary file removed doc/content/media/3pb.gif
Binary file not shown.
Binary file added doc/content/media/3pb.mp4
Binary file not shown.
Binary file removed doc/content/media/ci_in_progress.png
Binary file not shown.
Binary file removed doc/content/media/kalthoff.gif
Binary file not shown.
Binary file added doc/content/media/kalthoff.mp4
Binary file not shown.
Binary file added doc/content/media/matrix_fiber_bcs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed doc/content/media/mode1.gif
Binary file not shown.
Binary file added doc/content/media/mode1.mp4
Binary file not shown.
Binary file modified doc/content/media/mode1_bcs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed doc/content/media/mode2.gif
Binary file not shown.
Binary file added doc/content/media/mode2.mp4
Binary file not shown.
Binary file modified doc/content/media/mode2_bcs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed doc/content/media/soil.gif
Binary file not shown.
Binary file added doc/content/media/soil.mp4
Binary file not shown.
Binary file removed doc/content/media/stochastic.gif
Binary file not shown.
Binary file added doc/content/media/stochastic.mp4
Binary file not shown.
4 changes: 3 additions & 1 deletion doc/content/tutorials/01_small_deformation_elasticity.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ This tutorial covers the basic usage of RACCOON.

Consider a two-dimensional square plate with a notch (the commonly used geometry for Mode-I fracture) under stretch, we would like to solve for the displacements and visualize its strains and stresses everywhere.

!media media/mode1_bcs.png style=display:block;margin:auto;width:60%; caption=Geometry and boundary conditions of the Mode-I crack propagation problem. id=mode1_schematics

## Global expressions and parameters

It is always good practice to define parameters using expressions at the top of the input file. Here, we first define two expressions for Young's modulus and Poisson's ratio:
Expand Down Expand Up @@ -84,7 +86,7 @@ We are solving a vector-valued equation, and the two kernels correspond to the t

## Boundary conditions

In this problem, there is a symmetry boundary condition on the bottom nodeset called "noncrack", and a displacement-controlled Dirichlet boundary condition on the top. The boundary conditions are defined as
Boundary conditions are shown in [mode1_schematics]: only the top half of the domain is modeled utilizing symmetry. On the bottom of the computational domain, i.e. a nodeset named "noncrack" is generated and used to define the symmetry condition. A displacement-controlled Dirichlet boundary condition is applied on the top. In the input file, these boundary conditions correspond to

!listing tutorials/small_deformation/elasticity.i
block=BCs
Expand Down
2 changes: 2 additions & 0 deletions doc/content/tutorials/02_mode1_brittle_fracture.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ In this tutorial, we will set up the model for Mode-I crack propagation.

The geometry and boundary conditions are the same as those in [Tutorial 1](tutorials/01_small_deformation_elasticity.md).

!media media/mode1_bcs.png style=display:block;margin:auto;width:60%; caption=Geometry and boundary conditions of the Mode-I crack propagation problem. id=mode1_schematics

At each time step, the alternative minimization scheme first solves the displacements with a fixed phase-field, then solves the phase-field with the updated displacements. This scheme is realized using MOOSE's MultiApp system. We will set up two input files. One for the displacement subproblem, and the other one for the phase-field subproblem.

## `elasticity.i`: The displacement subproblem
Expand Down
29 changes: 29 additions & 0 deletions doc/content/tutorials/03_mode2_brittle_fracture.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,34 @@

# Tutorial 3: Mode-II crack propagation

In this tutorial, we will set up the model for Mode-II crack propagation. This problem is almost identical to [Tutorial 2](tutorials/02_mode1_brittle_fracture.md) except for its mesh and boundary conditions.

!media media/mode2_bcs.png style=display:block;margin:auto;width:60%; caption=Geometry and boundary conditions of the Mode-II crack propagation problem. id=mode2_schematics

## Mesh generators

Since we can no longer utilize half symmetry in the Mode-II problem, we will have to mesh the full computational domain. There are many ways of generating the mesh. Here, we demonstrate the use of first-class [`MeshGenerator`](MeshGenerator.md)s to generate the mesh:

!listing tutorials/mode2_brittle_fracture/elasticity.i
block=Mesh
language=python

First, the top half of the domain is meshed using the [`GeneratedMeshGenerator`](GeneratedMeshGenerator.md), and a node set named "top_stitch" is identified using the [`BoundingBoxNodeSetGenerator`](BoundingBoxNodeSetGenerator.md). Next, similarly, the bottom half of the domain is meshed and a node set named "bottom_stitch" is identified. Finally, the top half and the bottom half meshes are "stitched" together by merging the "top_stitch" and the "bottom_stitch" node sets using the [`StitchedMeshGenerator`](StitchedMeshGenerator.md). The parameter `construct_side_list_from_node_list` is set to true to construct side sets from all of the node sets.

## `elasticity.i`: The displacement subproblem

The displacement subproblem is almost identical to that in the previous tutorial, except for the boundary conditions [mode2_schematics]:

!listing tutorials/mode2_brittle_fracture/elasticity.i
block=BCs
language=python

The bottom boundary of the bottom half of the mesh is fixed in both x- and y- directions, while the top boundary of the top half of the mesh is subject to x-displacement with roller support.

## The complete input files

- [elasticity.i](tutorials/mode2_brittle_fracture/elasticity.i)
- [fracture.i](tutorials/mode2_brittle_fracture/fracture.i)

!content pagination previous=tutorials/02_mode1_brittle_fracture.md
next=tutorials/04_fiber_reinforced_matrix.md
23 changes: 23 additions & 0 deletions doc/content/tutorials/04_fiber_reinforced_matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,28 @@

# Tutorial 4: Fiber-reinforced matrix

In this tutorial, we benchmark the fiber-reinforced matrix problem proposed in [!cite](bourdin2007numerical).

!media media/matrix_fiber_bcs.png style=display:block;margin:auto;width:60%; caption=Geometry and boundary conditions of the fiber-reinforced matrix problem. id=matrix_fiber_schematics

The boundary conditions are defined as

!listing tutorials/matrix_fiber/elasticity.i
block=BCs
language=python

The fiber is assumed to be rigid, hence displacements are fixed on the fiber-matrix interface. The top of the matrix is under displacement control.

For benchmarking purposes, the volumetric-deviatoric decomposition of the strain is required. Such decomposition, along with several other options, are available in [`SmallDeformationIsotropicElasticity`](SmallDeformationIsotropicElasticity.md) and can be specified using the parameter `decomposition`.

!listing tutorials/matrix_fiber/elasticity.i
block=Materials/elasticity
language=python

## The complete input files

- [elasticity.i](tutorials/matrix_fiber/elasticity.i)
- [fracture.i](tutorials/matrix_fiber/fracture.i)

!content pagination previous=tutorials/03_mode2_brittle_fracture.md
next=tutorials/05_soil_desiccation.md
2 changes: 1 addition & 1 deletion moose
Submodule moose updated 6742 files

0 comments on commit 1038739

Please sign in to comment.