CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

How to combine (merge?) meshes

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 4, 2023, 15:51
Default How to combine (merge?) meshes
  #1
Senior Member
 
Alan w
Join Date: Feb 2021
Posts: 288
Rep Power: 6
boffin5 is on a distinguished road
My question concerns the functionality of snappyHexMesh, but with a twist.
I modelled a wheel in Salome, and have imported it into OpenFoam via a unv file.
When I use ideasUnvToFoam on that file, I get a polyMesh that defines the tire.

Now, I need to create a domain for it. If I use blockMesh, is it not true that I will get a polyMesh, which will overwrite the one previously created with ideasUnvToFoam?
Note that I don't have an stl file for the wheel which would ordinarily be used by snappyHexMesh.

There are other cases with rotating and non-rotating MRF zones, which are dealt with by using mergeMeshes, but these are set up for adjacent meshes, whereas in my case, if I merged the domain and the wheel, the meshes would overlap. Not what is needed.
How to deal with this?
boffin5 is offline   Reply With Quote

Old   February 6, 2023, 04:40
Default
  #2
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
Hello Alan,

What is the geometry in your unv file? A surface mesh of the wheel ? A volume mesh of the inside of the wheel ? Or a volume mesh of the outside of the wheel ?

Regards,
Yann
Yann is offline   Reply With Quote

Old   February 6, 2023, 13:58
Default Solved! Using foamToSurface
  #3
Senior Member
 
Alan w
Join Date: Feb 2021
Posts: 288
Rep Power: 6
boffin5 is on a distinguished road
Hi Yann!

My query was in regard to the use of snappyHexMesh to cut a body, using a .unv file as input for the body, and blockMesh to create the domain. The .unv file was of a wheel, fully meshed in Salome.

I had no idea of how to do it, but I discovered an answer soon after I posted my query. So I'm sorry to trouble people with a query that was quickly overtaken by events, but it often seems that if I don't post a query, I usually spend inordinate amounts of time groping for an answer. Somehow this reminds me of quantum theory.

Anyway, using a temporary case folder for the body, I ran ideasUnvToFoam to get a polyyMesh, and then foamToSurface (this was the key), which created an stl file of the body, in this case the wheel. Then I copied the stl file to the primary case folder in which I ran blockMesh, and then snappyHexMesh.

So thank you for your response, and don't go away, for it is inevitable that I will again myself completely stumped.
boffin5 is offline   Reply With Quote

Reply


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 manipulation] How to combine intersecting complex meshes? BrandonS OpenFOAM Meshing & Mesh Conversion 1 June 25, 2020 22:30
[ICEM] merge meshes between hexa and prism jjz2013 ANSYS Meshing & Geometry 39 February 12, 2019 11:38
Merge Meshes in parallel DominicTNC OpenFOAM 0 September 4, 2017 23:39
[ICEM] Smoothing before merge meshes FJSJ ANSYS Meshing & Geometry 0 May 20, 2013 12:30
Merge 2 unstructured meshes vinc ANSYS Meshing & Geometry 0 May 19, 2011 17:14


All times are GMT -4. The time now is 21:35.