Skip to content

dilekguzel/Merope

 
 

Repository files navigation

drawing

⚠️ The use of Mérope is subjected to a licence, available in French and in English.

⚠️ Unfortunately, some hyperlinks will not work properly for people without access to the internal resources of the CEA. We are sorry for this inconvenience.

Mérope : What for ?

Core business : simulation of random heterogeneous materials

Mérope is a code devoted to the design and discretization of microstructures of random heterogeneous materials. In turn, these microstructures are studied from the point of view of homogenization, with the paradigm of Representative Volume Elements (see e.g. Kanit et al., 2003). From this perspective, the effective behaviour of a heterogeneous material may be obtained by simulating it in a sufficiently large box. From that simulation, relevant quantities are extracted (mostly by some averaging rules).

The core functionalities of Mérope are devoted to the microstructure generation and its voxelation. However, it is also intended to provide simplified interfaces to mesh generation and solvers. Two approaches are possible :

  • Fast Fourier Transform (FFT) approaches, using the FFT algorithm to speed up computation on large boxes. However, it requires a regular voxelation grid.
  • Finite Element Methods (FEM) approaches. These are usually slower for the same Degrees of Freedom (DoF) number and require a mesh, which may be non-structured. However, they allow for finer representations of the microstructures.
graph TB
  subgraph "Mérope"
    Gauss(Fields)-->Microstructure;
    SdB(Random spheres)-->Microstructure;
    Microstructure-->Voxelation;
    Microstructure-->Mesh_Conf(Mesh configuration);
  end

  Mesh;
  
  simFFT(FFT simulation);
  simEF(FEM simulation);

  Voxelation--TMFFT, AMITEX-FFTP-->simFFT;
  Mesh_Conf--gmsh-->Mesh;
  Mesh--Cast3M, Manta-->simEF;

Loading

Remark : The above scheme is the objective ; some parts are not achieved yet.

Additional applications

Mérope's core functionalities can be used in various contexts. In particular :

  • voxelation of configurations of Discrete Element Method (DEM),
  • initialization of DEM configurations by random spheres,
  • computation of view factors in thermal radiative transfer (Tara),
  • gaz relocation (Ribaudequin).
graph TB
  subgraph "Mérope"
    Gauss(Fields)-->Microstructure;
    SdB(Random spheres)-->Microstructure;
    Microstructure-->Voxelation;
  end
  Microstructure--Tara-->Tara(Thermal Radiative Transfer);
  Voxelation-->DEM(DEM/Rockable);
  SdB-->DEM;
  SdB--Ribaudequin-->Gaz(Gas relocation);
Loading

OS and language

Mérope is implemented in C++ (and uses features of C++17). Nevertheless, this language is not intended to be used in order to writing scripts (although it works). On the contrary, Python3 plays the role of an API, and is used as well as a pre- and post-processing tool. For that reason, we exclusively describe the Python3 API, and not the C++ code. Nevertheless, the developper may generate a doxygen documentation related to the latter.

Mérope is meant to compile on Linux OS, and continuous integration tests show that non-regression tests are successful as well on Debian 10 (Buster) and 11 (Bullseye), and on Ubuntu Jammy.

Quick start

Install and use

Main functionalities

Seeds generation

See Sac_de_billes, the module of Mérope for packing spheres into a given shape (in particular, a periodic cuboid).

Microstructure

This section is only introductory and roughly exposes the philosophy of Mérope for building microstructures.
For impatient reader searching for :

  • precise features, please follow the hyperlinks below to reach more specialized documentation,
  • examples, please have a look at the gallery.

Phase-field representation

The microstructure is conceptualized by means of phase fields $\mathcal{M}:={\rho_i}$ on the periodic cuboid. Namely, fields $\rho_i(x)$ represent the concentration for phase $i$ at point $x$ (by default, $i=0$ corresponds to the matrix phase).

It is always assumed that $\sum_i \rho_i(x)=1$. In case this is not satisfied, the functions $\rho_i$ are corrected by the following procedure :

  • if $\sum_i \rho_i(x)=C<1$ then we replace $\rho_0 \rightsquigarrow \rho_0 +(1-C)$ (favoring the matrix phase),
  • if $\sum_i \rho_i(x)=C>1$ then we renormalize $\rho_i \rightsquigarrow \rho_i/C$.

For turning this representation into a .vtk file amenable to computation with tmfft or amitex_fftp, we basically evaluate the functions $\rho_i$, by means of various strategies. In our perspective, combining microstructures amounts to defining rules to combine phase fields representations $\mathcal{M}_0, \mathcal{M}_1, \cdots $ into another phase field representation $\mathcal{M}$.

Specific microstructures

There are two main families of microstructures implemented in Mérope (see MicroStructuresManual) :

  • the first one is based on non-intersecting inclusions and polycrystals. More specifically, one may build
    • polycrystals modelled by means of Laguerre tesselation,
    • polyhedral inclusions inside a matrix,
    • spheropolyhedrons inside a matrix,
    • spherical inclusions inside a matrix, Surface layers may be defined inside any inclusion.
  • the second one is based on real scalar fields. These may be deterministic or stochastic (anamorphosed gaussian fields).

Microstructures simulated by Merope share the following features :

  • They are 2D as well as 3D (By changing the postfix _3D by _2D in each Python class, the user may change the dimension).
  • They are periodic in all directions, and defined inside a periodic cuboidal cell (=torus for mathematicians).
  • They can be combined recursively (as long as it makes sense) by means of Boolean operations. This allows for a large variety of microstructures.

Voxelation

All the microstructures can be discretized by voxelation (i.e. on a Cartesian grid). Voxels may contain pure or composite phases (see Schneider, 2021). See VoxellationManual.md.

Mesh (tetrahedric)

Simple Inclusion-based Structures can be meshed using tetrahedric meshes. Special care should be dedicated to periodic boundaries of the mesh. See MeshManual.md.

Physics and solvers

FE solvers and FFT solvers can be used in order to solve mechanics and thermics.

Additional resources

Credit

If you are using Mérope, please consider citing it, for example:

Miscellaneous

To-do list

To-do list

About

Microstructure generator.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • GLSL 51.7%
  • C++ 39.0%
  • Python 7.9%
  • CMake 1.0%
  • Shell 0.2%
  • ReScript 0.1%
  • C 0.1%