if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to 'RelWithDebInfo' as none was specified.")
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel." FORCE)
This file attempts to include all licenses that apply within Marblesbag (this program) source tree, in particular any that are supposed to be exposed to the end user for credit requirements for instance.
This file attempts to include all licenses that apply within MigFlow (this program) source tree, in particular any that are supposed to be exposed to the end user for credit requirements for instance.
Marblesbag General
MigFlow General
-----------------------------------------
Marblesbag is a fluid-particules flow simulation software
MigFlow is a fluid-particules flow simulation software
Copyright (C) <2015-2018> <Universite catholique de Louvain (UCL), Belgium
Copyright (C) <2015-2018> Universite de Montpellier, France>
...
...
@@ -23,9 +23,9 @@ GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
The list of the contributors to the development of Marblesbag is given in the AUTHORS file (all authors are or were affiliate to the Universite catholique de Louvain, UCL or the Univeristy of Montpellier, when they developed Marblesbag).
The list of the contributors to the development of MigFlow is given in the AUTHORS file (all authors are or were affiliate to the Universite catholique de Louvain, UCL or the Univeristy of Montpellier, when they developed MigFlow).
Website of Marblesbag: https://git.immc.ucl.ac.be/fluidparticles/marblesbag
Website of MigFlow: https://git.immc.ucl.ac.be/fluidparticles/MigFlow
Contact: Jonathan Lambrechts <jonathan.lambrechts@uclouvain.be>
This program has dependencies on other libraries and Website depedencies which are or not under GPL and that are commonly distributed with this program core libraries.
MigFlow is a free and open source software dedicated to the simulations, in complex geometry, of immersed granular flows (mixture fluid-grains) presenting a large discrepancy in the solid volume fraction going from pure fluid to porous media. The fluid is solved using the finite element method at a greater scale than the grain scale while the grains are solved using the discrete element method to obtain accurate representation of the local effects due to the grains configuration.
The test cases are in the TheGoodPath/migflow/testcases directory. You have to generate meshes using *.geo files as it is described in the section __Run test cases__.
- depot-2d:
* _dep.py_ --> simple deposit of grains with different densities
- sablier-2d:
* _depot-fluid.py_ --> 2d simulation of grains falling in an hourglass. Example using lmgc to add some friction
- shaker:
* _shaker.py_ --> Sorting grains with sinusoidal inflow conditions
- couette-2d:
* _melangeur.py_ --> couette flow with grains without gravity, simple example of rotating boundary conditions
* _betonlmgc.py_ --> Mixing grains with respect to their size + possibility to use lmgc90 to add friction
- drop-2d/drop-3d:
+ SimpleDrop:
+ _drop.py_ --> Drop falling in a viscous fluid with parameters of [Metzger et al.](https://doi.org/10.1017/S0022112007005381)
+ _dropReload.py_ --> Example to reload simulation (only drop-3d)
+ InteractingDrops:
+ Vert:
* _2VertDrops.py_ --> Two vertically aligned interacting drops with parameters of [Machu et al.](https://doi.org/10.1017/S0022112001005882)
+ Diag:
* _2DiagDrops.py_ --> Interacting drops with an horizontal offset with parameters of [Machu et al.](https://doi.org/10.1017/S0022112001005882)
- depot-3d:
This case stages more than 500000 grains. This is not a basic case that could be used to get acquainted with the implementation
* _depot.py_ --> deposit of grains with radius distribution given in [Andre et al.](https://doi.org/10.1016/j.powtec.2010.08.020)
Test cases structure:
---------------------
Test cases are build using the same pattern:
1. Initialization of the particles objects container and placement of the grains. This is usually done in documented examples by the function __genInitialPosition__ in which the properties of each grain are set by the function:
p = scontact2.ParticleProblem() \\Initialization of the container
p.load_msh_boundaries("mesh.msh", ["tag1", "tag2",...]) \\Load the physical boundaries the grains cannot cross
p.add_particle((x,y),r,m) \\Add a grain at position (x,y) with radius r and mass m
These statements correspond to a 2D case. For a 3D case, replace sctontact2 by scontact3 and add a z-coordinate
1. Set the boundary conditions applied on the fluid
Using the contacts solver require to specify a tolerance _tol_ and the number of sub-time steps _nsub_:
p.iterate(dt/nsub, forces, tol)
The tolerance represents the order of magnitude of the error made on the interpenetration during the resolution. This tolerance has to be adapted according to the radii of the grains. If a small tolerance has to be imposed due to the small size of the grains, it slows down a lot the resolution. It is possible to speed up the computation by increasing the number of sub-time steps so that the number of contacts solved at each time iteration is much smaller.
Run test cases:
---------------
1. Use the [GMSH](http://gmsh.info/) software to create the file __mesh.msh__ from the file __mesh.geo__. If you are using a newer version of GMSH than GMSH 2, please insert the following command line at the end of the __mesh.geo__ file
Mesh.MshFileFormat = 2;
Using the GMSH interface you can create the __mesh.msh__ file:
Modules-->Mesh-->2D/3D
File-->Save Mesh
or using your terminal (replace -3 by -2 for 2D meshes):
gmsh -3 mesh.geo mesh.msh
1. Launch the python file without any arguments:
python run.py
Visualisation:
--------------
Output files have format *.vtk, *.vtp, *.vtm that are compatible with the application [ParaView](https://www.paraview.org/). The results can be viewed in [ParaView](https://www.paraview.org/) using the state file __view.pvsm__ included in each test case directory.
For some test cases, the __view.pvsm__ file requires the add of a plugin to show the contacts between the grains.
This plugin is provided in the directory __marblesbag/paraview_utils__:
1. Open [ParaView](https://www.paraview.org/)
2. Tools-->Manage Plugins-->Load New
3. Select the marblesbag.xml file in the marblesbag/paraview_util directory
4. Check the Auto Load option
A macro is given in the directory __marblesbag/paraview_utils__ to update automatically the output files during simulations:
1. Open [ParaView](https://www.paraview.org/)
2. Macros-->Add new macro
3. Select the refresh_mb_output.py file in the marblesbag/paraview_utils directory
Visualise the output files:
1. Open [ParaView](https://www.paraview.org/)
2. File-->Load State-->view.pvsm
# MigFlow
MigFlow is a free and open source software dedicated to the simulations, in complex geometry, of immersed granular flows (mixture fluid-grains) presenting a large discrepancy in the solid volume fraction going from pure fluid to porous media. The fluid is solved using the finite element method at a greater scale than the grain scale while the grains are solved using the discrete element method to obtain accurate representation of the local effects due to the grains configuration.
If you use MigFlow, please cite the following reference in your work:
Constant, M., Dubois, F., Lambrechts, J. and Legat, V. (2018). Implementation of an unresolved stabilised FEM-DEM model to solve immersed granular flows. _Computational Particle Mechanics_. [doi:10.1007/s40571-018-0209-4](https://doi.org/10.1007/s40571-018-0209-4).
See the [wiki](https://git.immc.ucl.ac.be/fluidparticles/migflow/wikis/home) for documented examples and installation instructions.