Multiplying a mesh n times
Hello all,
I have the mesh of a segment of a geometry that I want to calculate. I want to multiply this mesh several times to create my final geometry. Additionally, the nodes at the patches where the parts are joining needs to be merged and switched from patches to internal faces. MirrorMesh does what I want as long as the geometry is symmetric, but is there something similar for geometries where I need to duplicate the mesh without mirroring? I did not find anything for this. |
Hi,
I hope I got got your problem right: I suppose you're trying to simulate something like a pipe or channel consisting of multiple identical segments. You could create a copy of the original mesh for each segment and use moveMesh or transformPoints in order to put them at the correct place. Afterwards you need to use mergeMeshes and stitchMesh to connect them to one large mesh consisting of all the parts. Hope that helps. Cutter |
Hello,
yes you got my problem right. The way you are describing may work but it is not so straightforward. I would be happy to have a utility similar to mirrorMesh, maybe multiplyMesh to perform such tasks. |
Ok I tried the proposed way. It works smooth up to stitchMesh. Thsi fails. I guess the problem is that the boundary faces to be stitched are in one patch (because of running mirrorMesh and copying the mesh before). therefore I can't address the patches to be stitched.
|
Well, you're almost at the finish line.
Rename the patches of the segments and use indices (for example inlet_part1, outlet_part1 and so on). Afterwards you'll be able to address them during the stitchMesh step. Renaming the patches can be done by simply editing the patch names within the dictionary constant/polyMesh/boundary. This can also be automated using simple shell scripts. |
Its not that easy... I used mirrorMesh before since the geometry I need several times is symmetric itself. Mirrormesh mirrored the patch and therefore the "in" and "out" patch of the starting geometry are one. I need to split them of before copy. How can this be done?
|
Use topoSet to select the faces that need to added to a separate patch (slightly larger box around them) and put them into a new face set. This face set can then be used to create a new patch using createPatch.
|
3 Attachment(s)
Hi
I would really use Salome for this as it is much faster and does what you want in the same program. Just made a simple geo with mesh and copy the mesh. You can also rotate or use symmetry with a normal vector to make the mirror effect. At the end make a compound mesh and tick "merge coincident nodes". Export the mesh to UNV and use ideasUnvToFoam to convert the mesh. You need to fiddle with the BC's at the end, but that is easy compared to what you are trying to accomplish. |
I'm not entirely sure how it works, but OpenFOAM includes the extrudeMesh utility, which probably dies just what you want.
An example can be found in tutorials/multiphase/interFoam/ras/waterChannel It might take some code reading to figure out all possible options, or a couple of bananas.. but this way you can avoid the mergeMesh and stichMesh action. |
hello,
i am facing the same type of geometry and would like how you got to achive it at the end? thanks a lot |
All times are GMT -4. The time now is 14:17. |