CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[CAD formats] Exporting OpenFOAM mesh as STL with boundary values

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By bmercer

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 13, 2017, 12:31
Default Exporting OpenFOAM mesh as STL with boundary values
  #1
New Member
 
Join Date: Jan 2017
Posts: 7
Rep Power: 9
bmercer is on a distinguished road
Hi all,

I am interested in exporting the boundary of the OpenFOAM mesh as an STL file, with the additional information of the values of variables (such as temperature and pressure) on each external cell face.

The utility surfaceMeshTriangulate works well for me to export the mesh in STL - basically, what I'm hoping for is a similar tool, but with the ability to access (and probably write to a separate file) variable values on each cell face. Conversion to STL will result in the triangulation of each patch face, so assigning the same variable value to each new triangular patch within a given cell face would be sufficient for my purposes.

Is there a tool available that can accomplish this, and if not, would anyone be able to offer guidance on how I might make modifications to the surfaceMeshTriangulate utility for doing this? Thank you!
bmercer is offline   Reply With Quote

Old   February 16, 2017, 06:49
Default
  #2
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by bmercer View Post
Hi all,

I am interested in exporting the boundary of the OpenFOAM mesh as an STL file, with the additional information of the values of variables (such as temperature and pressure) on each external cell face.

The utility surfaceMeshTriangulate works well for me to export the mesh in STL - basically, what I'm hoping for is a similar tool, but with the ability to access (and probably write to a separate file) variable values on each cell face. Conversion to STL will result in the triangulation of each patch face, so assigning the same variable value to each new triangular patch within a given cell face would be sufficient for my purposes.

Is there a tool available that can accomplish this, and if not, would anyone be able to offer guidance on how I might make modifications to the surfaceMeshTriangulate utility for doing this? Thank you!
You may want to take a look at using sample surfaces for this, sample on the patches and write as VTK/Ensight/Nastran etc, which would be easier that doing it yourself. AFAIK there aren't currently any tutorials demonstrating exactly want you want, but grep for libsampling.so to see some other examples, which should get you started. Maybe some can provide to you an example.
/mark
olesen is offline   Reply With Quote

Old   March 8, 2017, 17:00
Default
  #3
New Member
 
Join Date: Jan 2017
Posts: 7
Rep Power: 9
bmercer is on a distinguished road
Thank you for your reply, Mark.

I figured out that the boundary condition externalCoupled does a good chunk of what I want for my purposes, namely writing boundary values for each external cell face to a file.

With that functionality discovered, I think my problem reduces to creating an STL mesh from an OpenFoam boundary, and creating a mapping (basically look-up table) which specifies the original OpenFoam boundary face from which each STL face was originally triangulated.

Since surfaceMeshTriangulate can create the desired STL mesh, I figure that's a good place to start. I have looked at the source code but am having trouble figuring out where it triangulates individual boundary faces, and how I can modify the code to tabulate the original boundary faces from which STL faces are created. If anyone has any insight on how this could be done, I would be grateful. Thanks!
krikre likes this.
bmercer is offline   Reply With Quote

Reply

Tags
stl format

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mesh Boundary Assignment Question Wandadars Mesh Generation & Pre-Processing 1 June 13, 2016 18:19
Problem in setting Boundary Condition Madhatter92 CFX 12 January 12, 2016 05:39
[snappyHexMesh] No layers in a small gap bobburnquist OpenFOAM Meshing & Mesh Conversion 6 August 26, 2015 10:38
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 07:20
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 12:55


All times are GMT -4. The time now is 10:53.