# blockMesh

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

September 30, 2011, 06:37
blockMesh
#1
Senior Member

Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 520
Rep Power: 18
Dear all,

I wanna simulate the wind over a certain area.

I tried different tutorials and everything seems to work properly. Now I am trying to start with my simulation.

I have a problem with the 1st step, that's to say the "blockMesh".

In fact, I have to create a a block and then I will mesh it. The point is that I don't want to mesh a cube, but a "cube" whose lower face is my terrain. The point is that the edge of my terrain don't have the same altitude z (see the picture).

Does anyone know how I can solve? What should I do? Any hint?

Thanks a lot,

Samuele
Attached Images
 terrain.jpg (79.3 KB, 105 views)

 September 30, 2011, 06:51 #2 Senior Member   Bernhard Join Date: Sep 2009 Location: Delft Posts: 790 Rep Power: 21 Maybe you can consider using snappyHexMesh?

 September 30, 2011, 07:43 #3 Senior Member   Samuele Z Join Date: Oct 2009 Location: Mozzate - Co - Italy Posts: 520 Rep Power: 18 Dear Bernhard, thanks for answering. Well, snappy is what I am gonna use afeter block. How can I detect the volume that I wanna mesh without defining a block? Thanks a lot, Samuele

September 30, 2011, 08:02
#4
Member

Eysteinn Helgason
Join Date: Sep 2009
Location: Gothenburg, Sweden
Posts: 53
Rep Power: 16
Quote:
 Originally Posted by samiam1000 Dear all, I wanna simulate the wind over a certain area. I tried different tutorials and everything seems to work properly. Now I am trying to start with my simulation. I have a problem with the 1st step, that's to say the "blockMesh". In fact, I have to create a a block and then I will mesh it. The point is that I don't want to mesh a cube, but a "cube" whose lower face is my terrain. The point is that the edge of my terrain don't have the same altitude z (see the picture). Does anyone know how I can solve? What should I do? Any hint? Thanks a lot, Samuele
Hi Samuele,

I'm not sure if this is what you are looking for but here goes:

What I would suggest (maybe there are other way and then I would glad like to hear them).

Create a closed surface (stl file ), in your case a box with the bottom as your terrain.
You can name the parts of your surface (e.g. inlet, outlet, terrain and walls )using Blender ( see http://www.cfd-online.com/Forums/ope...cii-stlbs.html ).
Then you create a box in blockmesh that is slightly larger than your stl geometry. When that is all done you move to snappyHexMesh to trim of the excess cells and do refinements of the mesh.

/Eysteinn

 September 30, 2011, 08:34 #5 Member   Join Date: Nov 2010 Posts: 41 Rep Power: 15 I've done exactly this before. I did this: 1. create stl file of terrain (position centre at 0,0,0) 2. create blockMesh with the same (or tiny bit smaller) dimensions of your stl in x-y direction and whatever extent you require in z direction 3. find the lowest point in your stl (i.e. lowest z-value) 4. translate stl by that z-value. this makes the lowest point of your stl fall onto the bottom of your blockmesh (say at z=0) 5. run blockmesh and snappy and you have what you need. works fine for me.

 September 30, 2011, 10:09 #6 Senior Member   Samuele Z Join Date: Oct 2009 Location: Mozzate - Co - Italy Posts: 520 Rep Power: 18 Hi all, I think that both your ideas are good. I am gonna try grjmell's one since it looks simpler (since it does not involve Blender).. What I wanna ask to grjmell is why he translates the stl. Can't I create a box where the stl is? Why should I move it to have z=0?? I don't care about this, right?? I will try and then I'll let you know. Thanks again, Samuele

 September 30, 2011, 11:16 #7 Member   Join Date: Nov 2010 Posts: 41 Rep Power: 15 Yes translation is optional as long as you encompass all the stl (z extent) with your blockmesh