Code Monkey home page Code Monkey logo

rves's Introduction

RVEs 🚧 🚧 🚧 Work in progress 🚧 🚧 🚧

Stable Dev Build Status Coverage

Modelling of periodic RVEs using GMSH

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:

  1. Geometry Setup: Define geometric shapes using fundamental entities and boolean operations.
  2. Integration with Gmsh: Incorporate shapes into Gmsh, execute boolean operations, and define physical groups.
  3. Mesh Generation: Generate meshes with customizable refinement fields.
  4. 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.

MiniApps included

        Dark

Quick start

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()

Project funded by:

  • Grant PID2022-141957OA-C22 funded by MCIU/AEI/ 10.13039/501100011033 and by ''ERDF A way of making Europe''

        Dark

rves's People

Contributors

jmartfrut avatar

Stargazers

 avatar  avatar

Watchers

 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.