[blockMesh] Curved or wavy geometry

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

 January 2, 2020, 12:38 Curved or wavy geometry #1 Member   Alex Join Date: May 2019 Posts: 36 Rep Power: 7 Hello everyone, I need to build a 2d mesh that is basically a vertical rectangle where 3 sides are straight but one (that one on the right) has the shape of a wave (or sine curve). My idea was to build a lot of blocks with blockmesh, like a puzzle, but I do not know if there is a faster way to generate a sinusoidal shape. If you have any suggestion or just a comment please help me. I am quite new in OpenFOAM and I do not know if blockmesh is the right tool for my purpose, in case let me know.

 January 3, 2020, 04:53 #2 Senior Member   Join Date: Aug 2013 Posts: 407 Rep Power: 15 Hi, When you mean 2D, with blockMesh, remember that you will need to have only 1 element in the 3rd direction.... As for creating sine curve, what you can do is to specify a spline between the two vertices in the edges subsection. For example, you could have something like this: Code: ```vertices ( (0 0 0) (1 0 0) (1 1 0) (0 1 0) (0 0 1) (1 0 1) (1 1 1) (0 1 1) ); blocks ( hex (0 1 2 3 4 5 6 7) (10 10 1) simpleGrading (1 1 1) ); edges ( spline 2 1 ((0.8 0.75 0) (1 0.5 0) (1.2 0.25 0)) spline 6 5 ((0.8 0.75 1) (1 0.5 1) (1.2 0.25 1)) );``` Hope this helps. Cheers, Antimony

 January 6, 2020, 18:43 #3 Member   Alex Join Date: May 2019 Posts: 36 Rep Power: 7 Using "spline" I very easily managed to make the sine curve I was looking for, thank you so much!

 Tags curve mesh, wavy channel, wavy fins