CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Open Source Meshers: Gmsh, Netgen, CGNS, ...

STL file, Patch addition

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

Like Tree2Likes
  • 1 Post By mwaqas
  • 1 Post By cutter

Reply
 
LinkBack Thread Tools Display Modes
Old   July 11, 2014, 17:39
Default STL file, Patch addition
  #1
Member
 
Muhammad Waqas
Join Date: Jul 2014
Location: Germany
Posts: 53
Rep Power: 3
mwaqas is on a distinguished road
Send a message via Skype™ to mwaqas
Hi everyone

I am bigener in CFD. I am using SALOME 7.4 for stl file, which I wanted to use in OpenFoam for snappyHesMesh. I wanted to ask
How can I add different patches in stl file, e.g inlet, outlet and wall for a cylinder. For which later I could apply boundary condition in OpenFoam.
Thank you
nautilus88 likes this.
mwaqas is offline   Reply With Quote

Old   October 20, 2014, 20:10
Default
  #2
Senior Member
 
Join Date: Mar 2010
Location: Germany
Posts: 112
Rep Power: 7
cutter is on a distinguished road
Hi,

this is not straight forward, but it's been done many times. I think it's already been answerd in some other threads!

These are the main steps, feel free to ask follow-up questions when necessary. I'm writing this from my memories since I don't have Salome at this computer - you should get the point though.

1. Create your geometry.
2. Extract the surface of the geometry. This can be done by selecting the geometry and running 'Explode -> to type Surface'.
3. Group the newly created surface facets to patch groups (inlet, outlet, walls etc.). This can be done by selecting the parent geometry object, creating a new group (of type surface) and adding all neccessary surface facets. You should now have a set of groups containing the whole surface of your geometry.
4. Export the surface facet groups to ASCII STL. This is done by selecting the groups only and running 'Export - ASCII STL'. Each group will be written to a separate STL file (triangulation of a single facet).
5. You now need to add the group name in the header of each file (line starting with 'solid', for example: first line in INLET.stl needs to read 'solid INLET').
6. Put the contents of all the patch STL files into a single STL file (single file containing the named triangualtions of all surface patches). This can be done with the linux command cat: 'cat *.stl > surface_mesh.stl'. Check the result using paraview or your favourite CAD program.
7. Start the actual meshing workflow.

Steps 5. and 6. can easily be automated using simple shells scripts. If anyone knows a quicker way for the whole process: please let us know!

Good luck and have fun!

Cutter
mwaqas likes this.
cutter is offline   Reply With Quote

Old   October 21, 2014, 06:00
Default
  #3
Member
 
Muhammad Waqas
Join Date: Jul 2014
Location: Germany
Posts: 53
Rep Power: 3
mwaqas is on a distinguished road
Send a message via Skype™ to mwaqas
Thank you very much for your detailed reply. Problem is resolved
mwaqas is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compile OF 2.3 on Mac OS X .... the patch gschaider OpenFOAM Installation on Windows, Mac and other Unsupported Platforms 220 July 29, 2015 08:34
Trouble compiling utilities using source-built OpenFOAM Artur OpenFOAM Programming & Development 14 October 29, 2013 11:59
funkySetFields compilation error tayo OpenFOAM 39 December 3, 2012 06:18
2.0.x on Mac OSX niklas OpenFOAM Installation on Windows, Mac and other Unsupported Platforms 74 March 28, 2012 16:46
Problem with rhoSimpleFoam matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 07:51


All times are GMT -4. The time now is 00:02.