CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   Is there an easy way to mesh this room? (

murrdpirate June 4, 2011 14:44

Is there an easy way to mesh this room?
This doesn't seem like it should be too difficult, but I've been struggling with this for days. I'm wondering if I'm going about this in the wrong way and if someone else would do it differently.

Here is a picture of the room I am trying to model. It has an inlet that I will patch with a cold/hot airflow, and outlet that I will patch with a zero gradient, and a window that I will patch with a heat gain/loss. Everything else is a wall.

If anyone has any suggestions on how to approach this problem, I would greatly appreciate it. Thanks.

alberto June 4, 2011 16:40

If you want to use blockMesh, it is a bit annoying. You have to project the BC's (window, inlet, outlet) on the opposite face, and then split the domain in many hex blocks, and mesh them.

A CAD + mesher would do this in a few minutes.


murrdpirate June 4, 2011 17:02

Yeah I've been using blockMesh and it has been a pain. At least I know now that it wasn't just me, haha. I guess I'll have to look into using salome or something.

wyldckat June 4, 2011 18:26

Greetings to both!

Mmm, if the geometries are going to be this simple, you can try Discretizer:

Discretizer comes with two GUIs:
  • The original Discretizer - which gives the power to draw 3D geometries and define boundaries on surfaces.
  • Discretizer::Setup - more oriented to act as a frontend for OpenFOAM and acting as a first approach to newcomers.
This project is still in development and last I saw, it hasn't reached 1.0, so if you find it useful, give your support to its author Björn Bergqvist :) Even if its just feedback ;)

Another option is enGrid, which acts as a mesher and partial frontend to OpenFOAM:

But wait, there's more: :D

On a more low level side, there is also OpenFOAM's snappyHexMesh, but until 1.8.0 is released, those sharp edges/corners can be tamed with snapEdge:

Best regards,

kalle June 6, 2011 01:46


you could also mesh this geometry with 3 blocks in blockMesh, and then create your patches with the faceSet and createPatch utilities... it might be hard to control the exact distribution of the cells as well as the exact extent of the patches, though... for full control you need plenty of blocks, like Alberto says.


All times are GMT -4. The time now is 15:38.