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/)
-   -   [mesh manipulation] export mesh (https://www.cfd-online.com/Forums/openfoam-meshing/106272-export-mesh.html)

sukye August 23, 2012 11:53

export mesh
 
I have generated mesh via snappyHexMesh from a .stl geometry file. How can I export the mesh to other format, eg .hdf or .UNV?

Thanks,

wyldckat August 23, 2012 13:50

Hi Sukye,

Here are two lists of the ones currently catalogued at openfoamwiki.net:
Best regards,
Bruno

sukye August 23, 2012 14:07

Thank you Bruno,

Yes, I have noticed this and use FoamMeshToFluent to generate a msh file. But my salome did not recognize it...

Quote:

Originally Posted by wyldckat (Post 378403)
Hi Sukye,

Here are two lists of the ones currently catalogued at openfoamwiki.net:
Best regards,
Bruno


wyldckat August 23, 2012 14:30

I think the only solution is to create the utility foamToIdeasUnv :(
If so far such utility doesn't exist yet, it's because this isn't the usual need.

Or you could convert the surface mesh from OpenFOAM and then re-mesh in Salome... The utility is named surfaceMeshConvert.

sukye August 23, 2012 14:50

The valid types of surfaceMeshConvert do not include msh or hdf.

I think the problem lies in salome, not openfoam. I installed caelinux in which salome only reads hdf files.


Quote:

Originally Posted by wyldckat (Post 378414)
I think the only solution is to create the utility foamToIdeasUnv :(
If so far such utility doesn't exist yet, it's because this isn't the usual need.

Or you could convert the surface mesh from OpenFOAM and then re-mesh in Salome... The utility is named surfaceMeshConvert.


elvis August 29, 2012 03:53

Hi,

but I think that surfaceMeshConvert creates an STL that can be imported into salome and by saving your imported STL you have an HDF-file.
Do you want to do a Fluid Structure Interaction (FSI) simulation, otherwise I do not understand why you want to import from OF to Salome! If the mesh you used for snappy hex mesh did not deform during simulation you could use directly your original STL for Salome import STL-file save as HDF-File and mesh for FEM-simulation

sukye August 29, 2012 10:16

Thank you Elvis.

I use Salome in CAELinux where it can only read hdf files. weird!

Yes, you are right I dont have to export from OF. But I dont know how to define inlets and outlets in OF. There is no example of a pipe flow. Maybe I was wrong?


Quote:

Originally Posted by elvis (Post 379230)
Hi,

but I think that surfaceMeshConvert creates an STL that can be imported into salome and by saving your imported STL you have an HDF-file.
Do you want to do a Fluid Structure Interaction (FSI) simulation, otherwise I do not understand why you want to import from OF to Salome! If the mesh you used for snappy hex mesh did not deform during simulation you could use directly your original STL for Salome import STL-file save as HDF-File and mesh for FEM-simulation


elvis August 30, 2012 07:12

Hi,

you are looking for
setSet
Manipulate a cell/face/point/ set or zone interactively
setsToZones
Add pointZones/faceZones/cellZones to the mesh from similar named pointSets/faceSets/cellSets

wyldckat August 31, 2012 05:37

Greetings to all!

To complement Elvis' response - you can find several tutorials on creating patches after the mesh has been created!

Run the following command to see which ones they are:
Code:

find $FOAM_TUTORIALS -name createPatchDict
As for pipe, it really depends on what you're looking for. I know of a few tutorials that fit the description:
Code:

basic/scalarTransportFoam/pitzDaily
basic/potentialFoam/pitzDaily
compressible/rhoPimpleFoam/les/pitzDaily
combustion/XiFoam/les/pitzDaily3D
combustion/XiFoam/les/pitzDaily
incompressible/simpleFoam/pitzDaily
incompressible/simpleFoam/pitzDailyExptInlet
incompressible/pisoFoam/les/pitzDailyMapped
incompressible/pisoFoam/les/pitzDaily
incompressible/adjointShapeOptimizationFoam/pitzDaily

incompressible/icoFoam/elbow

incompressible/pimpleFoam/TJunction
incompressible/pimpleFoam/TJunctionFan

Best regards,
Bruno

sukye August 31, 2012 13:06

Thank you Elvis and Bruno.

Yes, setSet may do the job.

I also followed this link: http://openfoamwiki.net/index.php/SetSet.

But the inlets do not have their names under
Code:

foamJob -s checkMesh -allTopology -allGeometry
The reason is, I accept everything from the tutorial moterbike, and replace the bike geometry by my vessel model, whose mesh is generated by snappy via its stl file. So, the vessel only have one face in OF.

Should I generate mesh in another way?

Have a good holiday!

PS, if someone can help today, I will have a good one myself :)

Quote:

Originally Posted by elvis (Post 379479)
Hi,

you are looking for
setSet
Manipulate a cell/face/point/ set or zone interactively
setsToZones
Add pointZones/faceZones/cellZones to the mesh from similar named pointSets/faceSets/cellSets


sukye August 31, 2012 14:29

Thank you so much.

How can I transfer the mesh from current folder to the destination folder? Or I can generate mesh from stl file, but there is no triSurface folder for snappy in the tutorials you mentioned ...


Quote:

Originally Posted by wyldckat (Post 379663)
Greetings to all!

To complement Elvis' response - you can find several tutorials on creating patches after the mesh has been created!

Run the following command to see which ones they are:
Code:

find $FOAM_TUTORIALS -name createPatchDict
As for pipe, it really depends on what you're looking for. I know of a few tutorials that fit the description:
Code:

basic/scalarTransportFoam/pitzDaily
basic/potentialFoam/pitzDaily
compressible/rhoPimpleFoam/les/pitzDaily
combustion/XiFoam/les/pitzDaily3D
combustion/XiFoam/les/pitzDaily
incompressible/simpleFoam/pitzDaily
incompressible/simpleFoam/pitzDailyExptInlet
incompressible/pisoFoam/les/pitzDailyMapped
incompressible/pisoFoam/les/pitzDaily
incompressible/adjointShapeOptimizationFoam/pitzDaily

incompressible/icoFoam/elbow

incompressible/pimpleFoam/TJunction
incompressible/pimpleFoam/TJunctionFan

Best regards,
Bruno


wyldckat August 31, 2012 18:30

createPatch is meant to be used after the mesh has been created. Keep in mind that createPatch relies on sets created by setSet or topoSet.

You can also try surfaceToPatch, which is also meant to be applied after the mesh is done. For more:
Code:

surfaceToPatch -help


All times are GMT -4. The time now is 07:33.