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

blockMeshDict

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

Reply
 
LinkBack Thread Tools Display Modes
Old   January 27, 2012, 18:07
Default blockMeshDict
  #1
New Member
 
Yu
Join Date: May 2010
Location: Cambridge, MA
Posts: 11
Rep Power: 7
Ruehri is on a distinguished road
Dear Foamers,

I have an OpenFOAM mesh (polyMesh folder) which was created by another department. Unfortunately that mesh-file got lost and all I have left is the OpenFOAM mesh, in which I would like to introduce some changes. It would be possible to simply edit some coordinates if I had a blockMeshDict file, so my question is if there is a way to convert a polyMesh mesh back into a blockMeshDict file?

Thanks!
Ruehri is offline   Reply With Quote

Old   January 28, 2012, 04:19
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,301
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings Ruehri,

AFAIK, there is no automated way to convert an already generated mesh back to "blockMeshDict". You might be able to re-create it manually, if the mesh is simple enough.

By what I know, you have a few possibilities:
  1. You can extract the surface mesh, manipulate it a proper geometry editing tool and then generate a new mesh based on the previous mesh. For example:
    1. Code:
      foamToSurface -time 0 test.a
      This command will show you the supported file extensions. For me, with OpenFOAM 2.1.x, it gave:
      Code:
      Valid types: ( ac gts inp obj off ofs smesh stl stlb tri vtk wrl x3d )
    2. If for example, I needed to do this, I would export to STL:
      Code:
      foamToSurface -time 0 test.stl
      And manipulate the surface using Blender.
    3. Then I would do a new mesh using enGrid or snappyHexMesh.
  2. If you only need to either remove parts of the mesh or add more refinement in certain zones, then you can use setSet and refineMesh.
Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   January 29, 2012, 08:15
Default
  #3
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 919
Rep Power: 17
akidess will become famous soon enough
Is foamMeshToFluent of any use?
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
*Help define the OpenFOAM stackexchange Q&A site: http://area51.stackexchange.com/prop...oam-technology
akidess is offline   Reply With Quote

Old   January 30, 2012, 10:50
Default
  #4
New Member
 
Yu
Join Date: May 2010
Location: Cambridge, MA
Posts: 11
Rep Power: 7
Ruehri is on a distinguished road
Thanks a lot you two for the quick response!

Since the mesh already has its own refinements and grid density distributions, using a stl would result in a lot of workload, but I agree that this could be a good way for creating a suitable new mesh.

I just tried the foamMeshToFluent tool and everything looks awesome. I got some error warnings about cell shapes needing to be converted to polyhedrals, but the mesh looks good.
I will try to convert that mesh back into foam (unmodified) and see if anything got messed up during forth-and-back conversion. If yes, I will switch over and do the diligence work with stls, otherwise I'd be happy to use akidess solution.

Anyways thanks you two!
Ruehri is offline   Reply With Quote

Old   February 7, 2012, 19:18
Default
  #5
New Member
 
Yu
Join Date: May 2010
Location: Cambridge, MA
Posts: 11
Rep Power: 7
Ruehri is on a distinguished road
Just to report back, foamMeshToFluent worked for my case. There seemed to be some weirdly shaped cells when I inspected the mesh manually in paraFoam, but those were in a rather coarse region and rerunning after back-conversion yielded the same result. Thanks again for all the help!
Ruehri 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
Allclean deletes blockMeshDict file! musahossein OpenFOAM 6 April 1, 2013 08:26
precedence of boundary file over blockMeshDict bfiedler OpenFOAM 2 January 22, 2013 11:52
PLease somebody help:problem while changing blockMeshDict file vivek070176 OpenFOAM Installation 1 June 11, 2010 17:51
Cube in cube with blockMeshDict shangzung OpenFOAM 3 October 28, 2009 09:45
A script for combining two blockMeshDict yingfeng OpenFOAM Native Meshers: blockMesh 0 August 26, 2009 16:05


All times are GMT -4. The time now is 09:48.