CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Meshing & Mesh Conversion (
-   -   extrudeMesh (

xiyuqiu March 26, 2013 18:19


Can anyone give a quick overview on how to use extrudeMesh utility? Or maybe point out a tutorial for it? I have been trying to get a basic instruction on how to use this utility but found none.


wyldckat April 1, 2013 13:00

Greetings xiyuqiu,

extrudeMesh is very simple to use... it's usually part of more complex tutorials, such as this one:

You can also find which tutorials use extrudeMesh by running:

find . -name "Allrun" | xargs grep extrudeMesh -sl
In addition, the reference dictionary file is located at:

You can look at it online here:

Best regards,

haakon April 2, 2013 04:29

Here are also some tutorials with extrudeMesh:

xiyuqiu April 2, 2013 23:53

Thank you guys. This is very helpful.

Jasmin April 3, 2016 23:58

Hi Guys,

I also have a question to extrudemesh, maybe I'm just blind and don't see the obious answer but I didn't find it yet...

I'm using openFoam 2.4 water channel example. The example works fine, but if I increase the number of cells extrudemesh is not generated. I assume that there is a problem with the nLayers but I'm not sure.

I need to increase the number of cells to get a time dependency of different solvers.

Thanks in advance for your help

wyldckat April 10, 2016 14:01


Originally Posted by Jasmin (Post 593182)
I'm using openFoam 2.4 water channel example. The example works fine, but if I increase the number of cells extrudemesh is not generated. I assume that there is a problem with the nLayers but I'm not sure.

Quick note: Please follow the instructions given here:

I don't know if anyone else has the time to go one step a time with you, but unfortunately I don't have enough time (at least today/this week) to try and deduce what steps you've taken :( If you had been more specific with more details in your post, I might have been able to give you a clearer answer than this :(
My guess is that the output given by extrudeMesh upon execution should have been fairly clear on what went wrong.

Jasmin May 17, 2016 03:21

Sorry for not giving enaugh information, I'm new to all this, and sorry for the long time until I answer now, I was very ill.
Im running the waterChannel tutorium openfoam 2.4 model ras.

I like to do a time mesure of different solvers in file fvSolution, therefore I need to raise the number of cells. When I do that, extrudemes doesnt work anymore, and the simulation does not work. I assume that raising the cells in blockMeshDict but not changing extrudeMeshDict causes the problem, probably the line "nLayers 40", but I'm not sure, and the documentation on openfoam does not solve my problem to understand what I have to change.

But…. Whatever caused the problem it solved itselfe... Thanks anyway for all the support you guys gave me.

potentialFoam May 3, 2017 09:17

Dear Foamers,

I have another issue using the utility 'extrudeMesh' (foam version 1606+ or 4.1):
Using Snappy works fine for dynamic mesh refinement (or adaptive mesh refinement, AMR), like here
The problem occurs if 'extrudeMesh' is used after using Snappy - all cells with a hanging node will become protected from refinement.

I prepared a simple case to demonstrate this problem. This case is based on the tutorial

in version 1606 (see link above). It also works with version 4.1. This case can be downloaded here:

Two figures illustrate this problem. The grey colored cells show the 'protectedCells' which cannot be refined.
Firstly, this result is gained for the standard tutorial case:

Secondly, the following figure shows the result after 'extrudeMesh' was used:

Three scripts lead to different results:
- 'runscript_likeTutorial': creates more or less the tutorial case (corresponds to the first figure).
- 'runscript_extrude1/2': uses 'extrudeMesh' in two different ways (lead to second figure).

Question: How can you use 'extrudeMesh' and dynamic mesh refinement together?

Best Regards,

1.) One problem is that the fields cellLevel and pointLevel in the directory constant/polyMesh need to be deleted for 'interDyMFoam'. In 'runscript_extrude1' they are deleted, in 'runscript_extrude2' the cellLevel field is kind of reconstructed with the 'refinementLevel'-utility. Both do not work (-> many protected cells).

same question asked here:

All times are GMT -4. The time now is 12:41.