CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [CAD formats] Can OpenFOAM convert foam mesh to stl? (https://www.cfd-online.com/Forums/openfoam-meshing/72553-can-openfoam-convert-foam-mesh-stl.html)

liying02ts February 9, 2010 23:48

Can OpenFOAM convert foam mesh to stl?
 
hello,everyone:
I want to convert the foam mesh to stl, it likes ICEM exporting stl file.
but, I don't know if OpenFOAM has the functions.

I find there is a utility named surfaceFeatureExtract, but it only used on surface mesh, but not a whole foam mesh.

I wonder if there a way to exporting stl file from the foam mesh by using OpenFOAM not a third soft.

thank you ~~

olesen February 10, 2010 02:29

Quote:

Originally Posted by liying02ts (Post 245547)
I wonder if there a way to exporting stl file from the foam mesh by using OpenFOAM not a third soft.

A "foamToSurface" doesn't seem to exist yet, but you can try the following:
  • foamToStarMesh -surface [-latestTime | -constant]
This should create surfExport.{cel,vrt} files
  • touch surfExport.inp
This creates a dummy file that identifies the grouping of files as proSTAR files.
  • surfaceMeshConvert surfExport.inp surfExport.stl
Convert to STL (or other) surface format.

eugene February 10, 2010 04:04

If you just want the outside of the FOAM mesh as an STL, there is a handy tool called "surfaceMeshTriangulate" that will do it for you.

liying02ts February 10, 2010 04:08

thank you for your reply:)

I tried it just now, but surfaceConvert can't read the .inp file.

The suppurted extensions are .ftr/.stl/.stlb/.gts/.obj/.ac/.off/.nas/.tri .

The OpenFOAM extension I use is OpenFOAM-1.6.




Quote:

Originally Posted by olesen (Post 245556)
A "foamToSurface" doesn't seem to exist yet, but you can try the following:
  • foamToStarMesh -surface [-latestTime | -constant]
This should create surfExport.{cel,vrt} files
  • touch surfExport.inp
This creates a dummy file that identifies the grouping of files as proSTAR files.
  • surfaceMeshConvert surfExport.inp surfExport.stl
Convert to STL (or other) surface format.


liying02ts February 10, 2010 04:11

Oh, It is just what I want.

Thank you very much:)


Quote:

Originally Posted by eugene (Post 245564)
If you just want the outside of the FOAM mesh as an STL, there is a handy tool called "surfaceMeshTriangulate" that will do it for you.


olesen February 11, 2010 03:34

Quote:

Originally Posted by liying02ts (Post 245565)
thank you for your reply:)

I tried it just now, but surfaceConvert can't read the .inp file.

Sure, but surfaceMeshConvert is what I use.

Sofia July 15, 2010 05:08

Hi everyone;

I have a .stl file which represent a body and I want to calcul a flow around it. I need to choose the dimension of my external box (in which there is my body) but I don't know how...Have you got an idea?
Thank you for your reply
Sofia

ordinary November 21, 2016 12:55

Quote:

Originally Posted by olesen (Post 245556)
A "foamToSurface" doesn't seem to exist yet, but you can try the following:
  • foamToStarMesh -surface [-latestTime | -constant]
This should create surfExport.{cel,vrt} files
  • touch surfExport.inp
This creates a dummy file that identifies the grouping of files as proSTAR files.
  • surfaceMeshConvert surfExport.inp surfExport.stl
Convert to STL (or other) surface format.

I tried this method. It did not work for my 3D surface body (zero volume) which is in MSH and MESHDAT file format from Ansys.

olesen October 10, 2017 04:26

Quote:

Originally Posted by ordinary (Post 626310)
I tried this method. It did not work for my 3D surface body (zero volume) which is in MSH and MESHDAT file format from Ansys.


The conversion utils only work to export from OpenFOAM format. In the meantime (since the first post), there is a foamToSurface utility to export the mesh boundaries directly.

wenhuicc December 5, 2018 06:58

Quote:

Originally Posted by olesen (Post 245556)
A "foamToSurface" doesn't seem to exist yet, but you can try the following:
  • foamToStarMesh -surface [-latestTime | -constant]
This should create surfExport.{cel,vrt} files
  • touch surfExport.inp
This creates a dummy file that identifies the grouping of files as proSTAR files.
  • surfaceMeshConvert surfExport.inp surfExport.stl
Convert to STL (or other) surface format.

I tried this on my 3D.msh. But the size of created surfExport.inp is zero and the created meshExport.stl showed nothing.
OpenFOAM i used is v5.
Can you please give some comments? thanks

olesen December 30, 2018 10:03

Did you try with surfaceMeshTriangulate? The name is misleading (will be updated soon). Exports OpenFOAM patches (all, or just some) to various surface formats, including stl, obj etc


All times are GMT -4. The time now is 01:14.