Skip to content

Commit

Permalink
Merge pull request #73 from kumiori/andres-joss-review
Browse files Browse the repository at this point in the history
Andres joss review
  • Loading branch information
kumiori authored Aug 16, 2024
2 parents 1d73ef1 + 834eca3 commit 52bbe50
Show file tree
Hide file tree
Showing 78 changed files with 3,415 additions and 3,567 deletions.
72 changes: 42 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,61 +1,72 @@
# Crack Propagation in Brittle Materials
## 2024

From little or nothing, to experimental verification of a complex fracture experiment.
We solve the following (difficult) problem:
`Irrevolutions` is a computational stability analysis toolkit designed to solve nonlinear and nonconvex evolutionary problems using advanced numerical methods. It provides efficient algorithms for computing solutions constrained minimum problems with application to irreversible evolutions (hence its name). In particular, this framework is relevant in the context of fracture and damage mechanics.

**Evolution of Damage (irreversible)**
**Irreversible Evolution of Damage**

Let $y=(\alpha, u)$ be an admissible state of a brittle system where $\alpha: \Omega \mapsto [0, 1]$ is a smooth damage field which identifies cracks (where $\alpha =1$) and $u$ is a displacement field. Provided a material model (an energy) $E_\ell$, given a time horizon $T$, let's find a map $t \in [0, T]\mapsto y_t$ such that: damage is non-decreasing and the observed state $y_t$ is energy-minimal, among admissible variations.

## How to contribute

#### Feature branch workflow
### Reporting bugs
If you find a bug in `irrevolutions`, please report it on the GitHub issue tracker.

For each new feature you wish to implement, create a branch named ```{yourname}-{feature}```,
as in ```andres-meshes```.
## Suggesting enhancements
If you wish to suggest a new feature or an improvement of a current feature, you can submit this on the issue tracker.

https://docs.gitlab.com/ee/gitlab-basics/feature_branch_workflow.html
## Contributing code (submitting a pull request)
To contribute code `irrevolutions`, create a pull request. If you want to contribute, but are unsure where to start, get in touch with the authors.

- Create your feature branch:`git checkout -b username-feature`
- To push your branch: `git push -u origin feature_branch_name`
- Create a pull request on the main branch for merging. Somebody should approve the pull-request. -
On opening a pull request, unit tests will run on GitHub Continuous Integration. You can click on these in the pull request to see where (if anywhere) the tests are failing.

### Weekly updates (merge from main)
For more details on the pull request workflow, check
https://docs.godotengine.org/en/3.1/community/contributing/pr_workflow.html



### Installation

Before installing `irrevolutions`, ensure you have `dolfinx` and other dependencies installed. You can install `dolfinx` using one of the following methods:

- Using conda
```
git checkout main
git pull
git checkout yourname-branch
git merge main
conda create -n fenicsx-env -c conda-forge fenics-dolfinx=0.7.2 mpich pyvista
conda activate fenicsx-env
```

Asymmetrically, feature-work is `rebased`.
- Using Spack
see https://github.com/FEniCS/dolfinx/blob/main/README.md#spack

### To run the code (on Docker)
- Using Apt (ubuntu)
```
add-apt-repository ppa:fenics-packages/fenics
apt update
apt install fenicsx=1:0.7.3-3~ppa1~lunar1
```

For detailed instructions, see https://github.com/FEniCS/dolfinx/blob/main/README.md#installation

First, run the container, attaching an interactive session and sharing data space
(the current dir) between the host and the container (the syntax is origin:target).
- Using a Docker container

On an ARM-based machine:
For an ARM-based machine:
```
docker run --rm -ti -v "$(pwd)":/home/numerix -w /home/numerix kumiori3/numerix:stable
```
On an AMD64 machine:
For an AMD64 machine:
```
docker run --rm -ti -v "$(pwd)":/home/numerix -w /home/numerix kumiori3/numerix:stable-amd64
```

On a windows box:
For a windows box:
```
docker run --rm -ti -v "C:/...":/home/numerix" -w /home/numerix kumiori3\numerix:stable-amd64
```

### Installation

To install the software, run DOLFINx through the aforementioned docker container and install the irrevolutions-package with
Finally, to install `irrevolutions` head to the package root directory and run

```python3 -m pip install .```

from the root of this repository


----
Expand All @@ -66,8 +77,11 @@ This code was initially conceived as a support for the teaching course MEC647,

### Acknowledgements


To all the students for their effort, participation, and motivation.

This project contains code from the DOLFINy project (https://github.com/fenics-dolfiny/dolfiny), which is licensed under the LGPLv3 license. We acknowledge and thank the DOLFINy contributors for their work.

See paper.md

### License
Expand All @@ -76,9 +90,7 @@ See `LICENSE` file.

Each file should have at least the "copyright" line and a pointer to where the full notice is found.

<Irrevolutions is scientific software, it is conceived to compute evolution paths
upon a general notion of (unilateral) stability. It applies to fracture and, maybe,
not only.>
<Irrevolutions is scientific software, it is conceived to compute evolution paths upon a general notion of (unilateral) stability. It applies to fracture and, maybe, not only.>

Copyright or copyLeft (C) <~0> <ALB/83252>

Expand All @@ -97,7 +109,7 @@ Each file should have at least the "copyright" line and a pointer to where the f
book for further abstraction.

You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
along with `irrevolution`. If not, see <https://www.gnu.org/licenses/>.



Expand Down
21 changes: 11 additions & 10 deletions contributed/DIC_CT_35/export_msh.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
# coding: utf-8


from dolfin import *
import os

from dolfin import *

filename = "mesh/DIC_running"


Expand All @@ -13,7 +14,7 @@
os.remove(filename + ".msh")
# xml to h5 (1-3)
mesh = Mesh(filename + ".xml")
#boundaries = MeshFunction("size_t", mesh, "mesh4_facet_region.xml")
# boundaries = MeshFunction("size_t", mesh, "mesh4_facet_region.xml")
subdomains = MeshFunction("size_t", mesh, filename + "_physical_region.xml")
boundaries = MeshFunction("size_t", mesh, filename + "_facet_region.xml")

Expand All @@ -30,13 +31,13 @@
os.remove(filename + ".xml")


#mesh = Mesh()
#hdf = HDF5File(mesh.mpi_comm(), filename + ".h5", "r")
#hdf.read(mesh, "/mesh", False)
#ndim = mesh.topology().dim()
# mesh = Mesh()
# hdf = HDF5File(mesh.mpi_comm(), filename + ".h5", "r")
# hdf.read(mesh, "/mesh", False)
# ndim = mesh.topology().dim()

#boundaries = MeshFunction("size_t", mesh,1)
#hdf.read(boundaries, "/boundaries")
# boundaries = MeshFunction("size_t", mesh,1)
# hdf.read(boundaries, "/boundaries")

#subdomains = MeshFunction("size_t", mesh,2)
#hdf.read(subdomains, "/subdomains")
# subdomains = MeshFunction("size_t", mesh,2)
# hdf.read(subdomains, "/subdomains")
Loading

0 comments on commit 52bbe50

Please sign in to comment.