Gmsh: Gmsh stands as an open-source 3D finite element mesh generator equipped with an integrated CAD engine and post-processor. It's designed for speed, efficiency, and user-friendliness, featuring parametric input and adaptable visualization capabilities. The software architecture revolves around four core modules: geometry, mesh, solver, and post-processing. These modules offer flexible control options, including a graphical interface, command-line interface, dedicated .geo files, and support for APIs in C++, C, Python, Julia, and Fortran.
RVEs Package: The RVEs package serves as a versatile tool for mesh generation, leveraging the Gmsh-Julia-API for seamless integration. It provides a robust framework for automating mesh generation for custom model types, enabling users to automate the creation of intricate structures such as representative volume elements (RVEs). RVEs simplifies the mesh modeling process into several key stages:
- Geometry Setup: Define geometric shapes using fundamental entities and boolean operations.
- Integration with Gmsh: Incorporate shapes into Gmsh, execute boolean operations, and define physical groups.
- Mesh Generation: Generate meshes with customizable refinement fields.
- Export and Visualization: Export meshes into various formats and visualize the results.
Current Focus and Future Expansion: At present, RVEs excels in automating the generation of representative volume elements containing multiple inclusion objects. However, its capabilities can be extended by adding support for additional geometric shapes and model types. It's essential to clarify that RVEs does not aim to replace the Gmsh scripting language. Instead, it acts as a facilitator, simplifying the automation of complex meshing tasks within a user-friendly programming environment such as Julia.
using RVEs
startGmsh()
myRVE = RVE( [1.0, 1.0, 1.0], [1,1,1], [0.0, 0.0, 0.0], 0.1)
myInclusions = (Sphere([0.0, 0.5, 0.5], 0.25, 2),
Sphere([0.5, 0.0, 0.5], 0.25, 2),
Sphere([0.5, 0.5, 0.0], 0.25, 2),
Sphere([1.0, 1.0, 1.0], 0.25, 2))
model, tagvol=createGmshModel(myRVE,myInclusions,"RVE")
createMesh!(model,myRVE,myInclusions,tagvol)
output_file = joinpath(dirname(@__FILE__), "RVE.msh")
saveMesh(output_file)
stopGmsh()
using RVEs
startGmsh()
myRVE = RVE( [1.0, 1.0, 1.0], [1,1,1], [0.0, 0.0, 0.0], 0.1)
geo1=Cylinder([-0.1, 0.5, 0.5],[2.0,0.0,0.0], 0.1, 2)
geo2=Cylinder([0.5, -0.1, 0.5],[0.0,2.0,0.0], 0.1, 2)
geo3=Cylinder([0.5, 0.5,-0.1],[0.0,0.0,2.0], 0.1, 2)
geo4=Fuse([geo1,geo2,geo3],2)
geo5=Sphere([0.5, 0.5, 0.5], 0.25, 2)
L=0.38
geo6=Box([L, L, L], [0.5-L/2, 0.5-L/2, 0.5-L/2], 2)
geo7=Intersect(geo5,geo6,2)
geo8=Cut(geo7,geo4,2)
myInclusions=(geo8,)
model, tagvol=createGmshModel(myRVE,myInclusions,"RVE")
createMesh!(model,myRVE,myInclusions,tagvol)
output_file = joinpath(dirname(@__FILE__), "RVE.msh")
saveMesh(output_file)
stopGmsh()
- Grant PID2022-141957OA-C22 funded by MCIU/AEI/ 10.13039/501100011033 and by ''ERDF A way of making Europe''