CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Native Meshers: snappyHexMesh and Others (
-   -   sHM internalflow (icoFoam) (

senol July 9, 2012 15:49

sHM internalflow (icoFoam)
Hi all foamers;

I have a problem with sHM. I am a new one in this foam job,so could not figure it out. I have a cylinder that created in Solidworks as three parts (montajİnlet,montajOutlet,montajSilindir). they converted to stl and I get a good mesh with snappyhexmesh. I tried to use icoFoam to see internal flow in my cylinder but i couldnot get any results .I need to see p and U profiles of my cylinder, where can I define my outlet and inlet parts in solver and how should I define?

I tried to define in p and U dictionaries in 0 fold. I wrote as;

for instance in p:

type zeroGradient;

type fixedValue;
value uniform 0;

But this didnt work; OF did not recognize internal flow. In addition in my boundary file allBoundary is defined, yet dont need it, what should I do to it not to paticipate in solving.

:oSorry for English mistakes:o

Jaworski.Mike July 10, 2012 09:48

Hi senol,
sHM renames patches depending on how the STL file "solid" regions are named. Usually it'll end up something like montajInlet_<solidName>. if you grep the stl file for "solid", you'll see what they have been named.

Another option is to create a logfile of the sHM run and look at exactly what patches are created. It is under a section called "Adding patches for surface regions" and has a listing for the different STL files and what names they've been given (i.e. montajInlet_<solidName>).

If you look at the snappyMultiRegionHeater tutorial (heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater) and run it, you can see in the logfile that it has created things like "bottomAir_minX". If you "grep solid bottomAir.stl" you'll find all those patches named in the STL file.

Once you've found your patch names, then you can set up the boundary conditions using those names.

I hope this helps.


senol July 11, 2012 09:59

Hi mike,

Firstly thank you for your reply. Problem is solved. But now i have much more harder problem and i hope you know its solution, too. ;) I built a 3d mesh for circular pipe using snappyhexmesh and I want to use icoFoam. I copied necessery files from a working case of square profile pipe except the 3d circular mesh. But the solution does not converge. The courant number gets bigger very fast. I can upload the case files including the mesh if necessary.

Briefly, I am trying to solve a simple pipe flow using a mesh obtained from snappyhexmesh but it does not converge. Any help is appreciated. It would also be very good if a sample pipe flow case is referred.

Jaworski.Mike July 12, 2012 09:25

Hi Senol,
I'm glad the first problem is fixed. As to the Co issue, did you change your time step to reflect the new mesh before running your case?


senol July 13, 2012 14:05

Hi mike

I changed my time step, but this did not help me, Then i noticed that i designed my pipes length as +z but in blockmesh i did not change values as expect. I changed it and solved problem.

Thank you for all your help.


All times are GMT -4. The time now is 20:07.