# What is the easiest way to create a 2D blockMesh with a triangular cut-out?

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

 June 7, 2018, 15:37 What is the easiest way to create a 2D blockMesh with a triangular cut-out? #1 Member   Axel Join Date: May 2016 Location: Augsburg, Germany Posts: 46 Rep Power: 10 Hi everybody! I am trying to get a rather simple 2D mesh, that is basically a rectangular 2D fluid domain with a triangular cut-out in the middle of it, where I can easily change the coordinates of the triangle's points. How can I create such a mesh? I thought about using a topoSet but I couldn't find an option for triangular sets there. Best regards, Axel

 June 8, 2018, 02:21 #2 Senior Member   Join Date: Jun 2012 Location: Germany, Bochum Posts: 230 Rep Power: 15 Not sure if this is what you are looking for, but you could use a variable at the top of blockMeshDict for the location of the points of the triangle to conveniently change the geometry of the triangle quickly. If the size of the rectangle is also depending on the triangle it is also possible to make their location dependent on the triangle size etc.

 June 8, 2018, 02:49 #3 Member   Axel Join Date: May 2016 Location: Augsburg, Germany Posts: 46 Rep Power: 10 Hi Bazinga, thanks for your reply! Yes this is part of the solution I am looking for. However right now I was not even able to get a blockMesh for 3 fixed points. So first I would need some advice on how to get the cut-out with a fixed triangle, then I would take your advice to use the variables in blockMeshDict. Best regards, Axel

 June 8, 2018, 03:45 #4 Senior Member   Join Date: Jun 2012 Location: Germany, Bochum Posts: 230 Rep Power: 15 I did not try a triangle yet, but blockMesh should be capable of doing it as you can create blocks with fewer than 8 vertices (check in the user guide "5.3.5 Creating blocks with fewer than 8 vertices").

 June 8, 2018, 03:54 #5 Member   Axel Join Date: May 2016 Location: Augsburg, Germany Posts: 46 Rep Power: 10 Ok, but how would I use the triangle blockMesh to make a cut-out inside a rectangular blockMesh?

June 8, 2018, 04:00
#6
Senior Member

Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 339
Rep Power: 28
Go the extra mile, if you're blockMesh-masochistic enough.

In that case, you can use moveMesh to rotate the red mesh region into any orientation you like. Afterwards, use AMI or stitchMesh to create single mesh region.
Attached Images
 triangleDragBlockStructure.png (11.5 KB, 53 views)

June 8, 2018, 04:02
#7
Senior Member

Join Date: Jun 2012
Location: Germany, Bochum
Posts: 230
Rep Power: 15
Is this maybe working? (see attachement)
Attached Images
 Selection_013.png (17.1 KB, 60 views)

 June 8, 2018, 04:04 #8 Member   Axel Join Date: May 2016 Location: Augsburg, Germany Posts: 46 Rep Power: 10 Hello Gerhard, this is not exactly what I need as I believe in your case the shape of the triangle would be fixed, right? Best regards, Axel

 June 8, 2018, 04:05 #9 Member   Axel Join Date: May 2016 Location: Augsburg, Germany Posts: 46 Rep Power: 10 Hi Bazinga! That looks very promising! I will try something like this as soon as I come home. Best regards, Axel