diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml index f7ecba80220..15b031686bb 100644 --- a/.github/workflows/build_docs.yml +++ b/.github/workflows/build_docs.yml @@ -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: | @@ -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 @@ -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/dynamic-badges-action@v1.1.0 with: auth: ${{ secrets.GIST_TOKEN }} @@ -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/github-pages-deploy-action@4.1.4 with: branch: gh-pages diff --git a/README.md b/README.md index 01d004cbd74..0ec3945bdc5 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/doc/content/bib/raccoon.bib b/doc/content/bib/raccoon.bib new file mode 100644 index 00000000000..1d52b1a7f7c --- /dev/null +++ b/doc/content/bib/raccoon.bib @@ -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} +} diff --git a/doc/content/index.md b/doc/content/index.md index d291629bc52..0c701d5aaf3 100644 --- a/doc/content/index.md +++ b/doc/content/index.md @@ -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! diff --git a/doc/content/media/3pb.gif b/doc/content/media/3pb.gif deleted file mode 100644 index 9496a9a8510..00000000000 Binary files a/doc/content/media/3pb.gif and /dev/null differ diff --git a/doc/content/media/3pb.mp4 b/doc/content/media/3pb.mp4 new file mode 100644 index 00000000000..cc9af733649 Binary files /dev/null and b/doc/content/media/3pb.mp4 differ diff --git a/doc/content/media/ci_in_progress.png b/doc/content/media/ci_in_progress.png deleted file mode 100644 index 87645d3cb98..00000000000 Binary files a/doc/content/media/ci_in_progress.png and /dev/null differ diff --git a/doc/content/media/kalthoff.gif b/doc/content/media/kalthoff.gif deleted file mode 100644 index 47ad024a432..00000000000 Binary files a/doc/content/media/kalthoff.gif and /dev/null differ diff --git a/doc/content/media/kalthoff.mp4 b/doc/content/media/kalthoff.mp4 new file mode 100644 index 00000000000..d3a76b14ff0 Binary files /dev/null and b/doc/content/media/kalthoff.mp4 differ diff --git a/doc/content/media/matrix_fiber_bcs.png b/doc/content/media/matrix_fiber_bcs.png new file mode 100644 index 00000000000..01f81264b02 Binary files /dev/null and b/doc/content/media/matrix_fiber_bcs.png differ diff --git a/doc/content/media/mode1.gif b/doc/content/media/mode1.gif deleted file mode 100644 index 7fe610969ee..00000000000 Binary files a/doc/content/media/mode1.gif and /dev/null differ diff --git a/doc/content/media/mode1.mp4 b/doc/content/media/mode1.mp4 new file mode 100644 index 00000000000..4c62a4a6d70 Binary files /dev/null and b/doc/content/media/mode1.mp4 differ diff --git a/doc/content/media/mode1_bcs.png b/doc/content/media/mode1_bcs.png index ebf47341bd5..c829633bb9d 100644 Binary files a/doc/content/media/mode1_bcs.png and b/doc/content/media/mode1_bcs.png differ diff --git a/doc/content/media/mode2.gif b/doc/content/media/mode2.gif deleted file mode 100644 index bfdc1bbc411..00000000000 Binary files a/doc/content/media/mode2.gif and /dev/null differ diff --git a/doc/content/media/mode2.mp4 b/doc/content/media/mode2.mp4 new file mode 100644 index 00000000000..18b3e9851c3 Binary files /dev/null and b/doc/content/media/mode2.mp4 differ diff --git a/doc/content/media/mode2_bcs.png b/doc/content/media/mode2_bcs.png index f07b8c32c9b..980b4606fee 100644 Binary files a/doc/content/media/mode2_bcs.png and b/doc/content/media/mode2_bcs.png differ diff --git a/doc/content/media/soil.gif b/doc/content/media/soil.gif deleted file mode 100644 index cdfed63ea7e..00000000000 Binary files a/doc/content/media/soil.gif and /dev/null differ diff --git a/doc/content/media/soil.mp4 b/doc/content/media/soil.mp4 new file mode 100644 index 00000000000..f54f971f55c Binary files /dev/null and b/doc/content/media/soil.mp4 differ diff --git a/doc/content/media/stochastic.gif b/doc/content/media/stochastic.gif deleted file mode 100644 index f182dfb232b..00000000000 Binary files a/doc/content/media/stochastic.gif and /dev/null differ diff --git a/doc/content/media/stochastic.mp4 b/doc/content/media/stochastic.mp4 new file mode 100644 index 00000000000..97e967ddcd3 Binary files /dev/null and b/doc/content/media/stochastic.mp4 differ diff --git a/doc/content/tutorials/01_small_deformation_elasticity.md b/doc/content/tutorials/01_small_deformation_elasticity.md index 205e45dd4e8..05a508161b4 100644 --- a/doc/content/tutorials/01_small_deformation_elasticity.md +++ b/doc/content/tutorials/01_small_deformation_elasticity.md @@ -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: @@ -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 diff --git a/doc/content/tutorials/02_mode1_brittle_fracture.md b/doc/content/tutorials/02_mode1_brittle_fracture.md index eba0993ac3f..9ce7da3699a 100644 --- a/doc/content/tutorials/02_mode1_brittle_fracture.md +++ b/doc/content/tutorials/02_mode1_brittle_fracture.md @@ -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 diff --git a/doc/content/tutorials/03_mode2_brittle_fracture.md b/doc/content/tutorials/03_mode2_brittle_fracture.md index aea275d2b20..3a5b58a2de5 100644 --- a/doc/content/tutorials/03_mode2_brittle_fracture.md +++ b/doc/content/tutorials/03_mode2_brittle_fracture.md @@ -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 diff --git a/doc/content/tutorials/04_fiber_reinforced_matrix.md b/doc/content/tutorials/04_fiber_reinforced_matrix.md index 5d9a50abb8b..a7c3bcdb6ea 100644 --- a/doc/content/tutorials/04_fiber_reinforced_matrix.md +++ b/doc/content/tutorials/04_fiber_reinforced_matrix.md @@ -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