GithubHelp home page GithubHelp logo

uekerman / coupled-brittle-fracture Goto Github PK

View Code? Open in Web Editor NEW
12.0 2.0 3.0 80 KB

A phase field brittle fracture code coupled to a dummy place-holder FEniCS script providing material parameters

License: MIT License

Shell 3.25% Python 66.25% CMake 9.43% C++ 14.09% Dockerfile 6.97%
precice dolfin fracture-mechanics fenics nutils

coupled-brittle-fracture's Introduction

Coupled Phase-Field Brittle Fracture Simulation

A phase-field brittle fracture mechanics code written in Nutils is coupled to a Poisson equation in FEniCS or DOLFIN. The FEniCS code is a place-holder for a proper corrosion model. The coupling is realized with preCICE. The purpose of this code is to showcase how preCICE could be used to volume-couple between an electro-chemistry model (here the FEniCS code) and a fracture mechanics model. Currently, meaningless data is exchanged.

The original fracture mechanics code was developed by Clemens Verhoosel. The model is documented in this publication:

Singh, N., Verhoosel, C.V., De Borst, R. and Van Brummelen, E.H., 2016. A fracture-controlled path-following technique for phase-field modeling of brittle fracture. Finite Elements in Analysis and Design, 113, pp.14-29.

The coupling prototype was developed by Benjamin Uekermann. Contact Benjamin for questions about this code. Furthermore, the following support channels might be helpful: Nutils matrix chat room, preCICE forum.

Dependencies

Docker

Instead of installing all dependencies on your system you can run the simulation in a docker container.

$ docker build -t brittle-fracture:1.0 -f brittle-fracture.dockerfile .
$ docker run -it --name bf brittle-fracture:1.0

Building the docker image will take some time.

Then, just clone this repository again within the container.

git clone https://github.com/uekerman/Coupled-Brittle-Fracture.git

and continue below.

Folder structure

  • Allclean: a bash script to clean the case (incl. build artifacts)
  • corrosion.py: the dummy corrosion model, implemented with FEniCS, using the FEniCS-preCICE adapter for coupling
  • precice-adapter-config.json: the FEniCS-preCICE adapter configuration file
  • corrosion.cpp: a similar dummy corrosion model, implemented with DOLFIN, directly using preCICE for coupling
  • Poisson.ufl: the corresponding DOLFIN unified form language file
  • CMakeLists: cmake specification to build the DOLFIN code
  • dummy.py: an alternative dummy code, which can also provide material parameters
  • fracture.py: the fracture mechanics, implemented with Nutils
  • precice-config.xml: the preCICE configuration file, describing the coupled setup
  • README.md

Building

The DOLFIN code is the only one that needs building

ffc -l dolfin Poisson.ufl
cmake .
make

Be sure to use the same ffc version as used for the linked libdolfin.

How to run

Open two terminals and start one program in each directly from the root directory:

  • Either python3 corrosion.py (the FEniCS variant) or ./demo_corrosion (the DOLFIN variant)
  • python3 fracture.py

If you only have one terminal (e.g. in an interactive docker container):

./demo_corrosion & python3 fracture.py

Visualization

Both codes write vtk data, which can be visualized for example with Paraview.

On the characteristic length scale l0

l0 acts as a numerical regularization parameter for the phase field model. It controls the width of the smooth approximation of the crack. In the limit case of l0 going to zero, the phase-field approximation converges to the discrete fracture surface. The parameter could, however, also be regarded as a model parameter: the critical stress for which crack nucleation occurs depends on it. For smaller l0, the critical stress increases. For the limit case, fracture nucleation is impossible in the absence of stress singularities. For too large values of l0, on the other hand, the complete damage field is already above the critical damage value. Whatever happens then could be regarded as unphysical model artifacts. In particular, fractures cannot be localized properly. Given the total load, the Lamé parameters, and the fracture toughness, l0 needs to be tuned such that the initial virgin damage field is below the critical damage value (approximately 0.25, better below 0.1). Additionally, l0 still needs to be larger than the local mesh size.

Please see section 2 (in particular section 2.3.1) of: Borden, M.J., Verhoosel, C.V., Scott, M.A., Hughes, T.J. and Landis, C.M., 2012. A phase-field description of dynamic brittle fracture. Computer Methods in Applied Mechanics and Engineering, 217, pp.77-95. PDF

coupled-brittle-fracture's People

Contributors

uekerman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.