Skip to content

Development of an MSH import tool #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
2 of 6 tasks
nikoscham opened this issue Dec 12, 2024 · 5 comments
Open
2 of 6 tasks

Development of an MSH import tool #5

nikoscham opened this issue Dec 12, 2024 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@nikoscham
Copy link
Member

nikoscham commented Dec 12, 2024

Overview

This thread will monitor the development of a new tool for importing MSH files (created by Gmsh)

Tasks

  • Import of 2D mesh with quadrilateral elements
  • Import of 2D mesh triangular elements
  • Handle boundary conditions import from GMSH to FEAScript
  • Update nodal numbering process for 2D meshes with triangular elements
  • Update boundary conditions for 2D meshes with triangular elements
  • Create new tutorials with quadrilateral and triangular meshes
@nikoscham nikoscham added the enhancement New feature or request label Dec 12, 2024
@nikoscham nikoscham self-assigned this Dec 12, 2024
@nikoscham
Copy link
Member Author

Want a clarification whether that is the best mesh format for FEA.

Originally posted by @sridhar-mani in #10

@sridhar-mani are you working on tetrahedral 3D cells? 3D cases are not yet implemented on FEAScript. It's on the future plans for sure. I think it would be better to start with simpler 2D quadrilateral cells. In addition, quadrilateral cells are generally more accurate compared to triangular (both are 2D cases). Triangular however are useful in the case of a complex geometry. I have made a similar module in the past for a Fortran FEM code. See the e.g. the readmeshEL function in https://github.com/nikoscham/DropS/blob/main/Source/coord.f90, where I import 2D meshes either from Gmsh or from Triangle. I think it may be helpful.

@sridhar-mani
Copy link
Collaborator

sridhar-mani commented Apr 7, 2025

I have implemented a 2d quad cell reader for now from .msh v4.1 file. I am looking more into the format as i had previously worked on openfoam meshing and not used to this. Also want a confirmation if the current output is good to go with the sim.

Update - Have now implement the reader to read both quad and triangle comprising gmsh file.

@nikoscham
Copy link
Member Author

nikoscham commented Apr 8, 2025

I have implemented a 2d quad cell reader for now from .msh v4.1 file. I am looking more into the format as i had previously worked on openfoam meshing and not used to this. Also want a confirmation if the current output is good to go with the sim.

Update - Have now implement the reader to read both quad and triangle comprising gmsh file.

Thanks for the update and for all the work on this! Give me some time to perform some tests

@nikoscham
Copy link
Member Author

I have created the following mesh (both triangular and quadrilateral mesh versions) in Gmsh for testing purposes.

rect_mesh.zip

@sridhar-mani
Copy link
Collaborator

sridhar-mani commented Apr 9, 2025

I have created the following mesh (both triangular and quadrilateral mesh versions) in Gmsh for testing purposes.

rect_mesh.zip

BTW - Also made a gpu branch where fully webgpu offloading has been implemented. Implement more precise reading of both triangle and quadrilateral elements from the .msh file.

Doubt - What format do you want the final output mesh to be if i include reading the boundary conditions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants