Skip to content
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

Third party mesh importing #89

Open
oliveroxtoby opened this issue Apr 1, 2023 · 4 comments
Open

Third party mesh importing #89

oliveroxtoby opened this issue Apr 1, 2023 · 4 comments

Comments

@oliveroxtoby
Copy link
Collaborator

In GitLab by @icojb25 on Apr 16, 2022, 04:00

It seems basic mesh importing from 3rd party sources (fluent, CGNS, Star etc) is something users want, and would be useful.

It seems at this stage, that it would be best to have either 1) mesh from part or 2) mesh import exclusive to one another, for the following reasons

  1. It seems it would be quite a stretch at this stage to build in extraction of existing geometry from imported meshes firstly, and then somehow work in the ability to do mesh refinements on imported meshes.
  2. It seems importing a mesh contrary to build your own geo and meshing that, is contrary to the idea of importing an existing mesh

It seems then that Mesh Import should only be available if no existing mesh is present, and no mesh from part option should be available if a mesh import has occured. Also then that the Import mesh object will not live under the Part Mesh object.

@linuxguy123
Copy link

linuxguy123 commented Apr 6, 2023

I've actually done a bit of work on this already as part of importing meshes from the FEM workbench.

As long as OpenFOAM has a way to use the imported mesh (ie Fluent to Foam, for example) it is pretty straightforward to do EXCEPT one needs to tie the patches used in the imported mesh into what is used in CfdOF.

What I did was add another meshing type called Import Fem to the list of available meshing engines. I then changed the Write Mesh button to Import Mesh.

CfdOF Import FEM Mesh

CfdOF with FEM tree

Import FEM Mesh Panel

@linuxguy123
Copy link

The biggest FreeCAD structural issue with importing meshes is that the meshing object should be changed to add an importing meshing engine for each kind of mesh that will be imported - FEM, Fluent, etc.

At the same time the mesh object could be modified to use remote hosts. As it sits right now the mesh object assumes everything is done locally.

@linuxguy123
Copy link

One more comment... I understand why users want to create their geometries and mesh them in external tools and then run them CfdOF. Especially now that we have CfdOF-RP.

But... I've been running the Real Thunder release of FreeCAD and it is fantastic. The only thing missing in FreeCAD to give the users on other platforms a total solution is a better meshing engine. cfmesh+ seems to be doing some fantastic things these days. And if gmsh did surface refinements in 3D, it would be good too.

So while I agree that importing external meshes would be neat, another approach to this problem is to improve the meshing capabilities of cfmesh and gmsh OR allow users to write plug ins to use external meshers like ANSYS, cfmesh+, etc. in FreeCAD.

@linuxguy123
Copy link

@oliveroxtoby probably already knows this, but here is the list of mesh conversion functions available for OpenFOAM for the rest of us.

Mesh conversion
--
  |  
ansysToFoam | Convert an ANSYS input mesh file (exported from I-DEAS) to OpenFOAM format
 
ccmToFoam | Reads CCM files as written by PROSTAR/STARCCM and writes an OPENOpenFOAM polyMesh
 
foamToCcm | Translates OPENOpenFOAM mesh and/or results to CCM format
 
cfx4ToFoam | Convert a CFX 4 mesh to OpenFOAM format
 
datToFoam | Reads in a datToFoam mesh file and outputs a points file. Used in conjunction with blockMesh
 
fireToFoam | Convert AVL/FIRE polyhedral mesh to OpenFOAM format
 
fluent3DMeshToFoam | Convert a Fluent mesh to OpenFOAM format
 
fluentMeshToFoam | Convert a Fluent mesh to OpenFOAM format, including multiple region and region boundary handling
 
foamMeshToFluent | Write an OpenFOAM mesh in Fluent mesh format
 
 
foamToFireMesh | Write an OpenFOAM mesh in AVL/FIRE fpma format
 
foamToStarMesh | Write an OpenFOAM mesh in STARCD/PROSTAR (v4) bnd/cel/vrt format
 
foamToSurface | Extract boundaries from an OpenFOAM mesh and write in a surface format
 
gambitToFoam | Convert a GAMBIT mesh to OpenFOAM format
 
gmshToFoam | Reads .msh file as written by Gmsh
 
ideasUnvToFoam | I-Deas unv format mesh conversion
 
kivaToFoam | Convert a KIVA grid to OpenFOAM
 
mshToFoam | Convert .msh file generated by the Adventure system
 
netgenNeutralToFoam | Convert a neutral file format (Netgen v4.4) to OpenFOAM
 
plot3dToFoam | Plot3d mesh (ascii/formatted format) converter
 
 
star4ToFoam | Convert a STARCD/PROSTAR (v4) mesh into OpenFOAM format
 
tetgenToFoam | Convert tetgen .ele and .node and .face files to an OpenFOAM mesh
 
vtkUnstructuredToFoam | Convert legacy VTK file (ascii) containing an unstructured grid to an OpenFOAM mesh without boundary information
 
writeMeshObj | For mesh debugging: writes mesh as three separate OBJ files

https://www.openfoam.com/documentation/user-guide/a-reference/a.2-standard-utilities

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants