CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [mesh manipulation] Best way to merge meshes? (https://www.cfd-online.com/Forums/openfoam-meshing/180614-best-way-merge-meshes.html)

Tensian November 27, 2016 07:07

Best way to merge meshes?
 
Dear all,

I have my geometry in a stl file (sorry, I cannot share it). I have meshed it succesfully with snappyHexMesh. For example, let us imagine abifurcated pipe, with two inlets and one outlet. My triSurface folder constains then in_left.stl, in_right.stl, out.stl and wall.stl). These are the final patches I need for my flow analysys.

Now I need to add a sphere to my mesh. This sphere has to enclose my two inlets, but not the whole stl geometry.

From my point of view I can try three things:

1. Create the sphere .stl (MeshLab for example), move it until it is placed where I want and later manually try to adjunst each vertex and delete the parts of the sphere that are inside the pipe (I would like to impose one BC at the sphere surface, but some parts of the sphere are now inside the pipe. If for example sphere is provided with a wall BC, I don't want that the part of the sphere that is inside my pipe to be a wall, so I have to removed the triangles on this zone or in some manner change it to interior cells later). When this is done, come back to snappy and mesh.

2. Use OF utilities to merge meshes. First create the stl of the sphere, move it to the desired place and mesh original geometry and sphere independently. When I have the two foam meshes, then try to merge them

3. Use searchableSphere in the snappyHExMeshDIct. I have tried this but I am not able to mesh the sphere and thhe original geometry. If the sphere is meshed, the original geometry dissapears, and if I change the locationInMesh, then the original geometry is meshed, but the sphere dissapears, and also the part of the original geometry that intersects the sphere (it is something like a substract tool!)

So I am not sure which strategy is better. From my point of view the best should be the use of searchableSphere, but I don't know how to mesh my geometry and the spehere togeteher.

Any help will be much appreciated. If you need more details please let me know. It seems not to be a complicated task, but I have not solved it so far.

Thanks in advance.


All times are GMT -4. The time now is 08:44.