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

[blockMesh] blockMeshDict

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

Reply
 
LinkBack Thread Tools Search this Thread 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: 15
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
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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: Germany
Posts: 1,377
Rep Power: 29
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.
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: 15
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: 15
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 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
[blockMesh] Creating an axisymmetric piston cylinder in blockMeshDict foadsf OpenFOAM Meshing & Mesh Conversion 9 August 23, 2018 08:54
[blockMesh] 2:1 refined 2D blockMeshDict with mergePatchPairs? chrisb2244 OpenFOAM Meshing & Mesh Conversion 0 December 2, 2014 00:52
[Other] blockMeshDict not Matching Boundary HassanDarian OpenFOAM Meshing & Mesh Conversion 0 March 19, 2014 14:30
[blockMesh] OpenFOAM blockMeshDict sihaqqi OpenFOAM Meshing & Mesh Conversion 2 February 1, 2013 04:49
PLease somebody help:problem while changing blockMeshDict file vivek070176 OpenFOAM Installation 1 June 11, 2010 18:51


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