CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion > OpenFOAM Native Meshers: snappyHexMesh and Others

How to change patch types in snappyHexMesh?

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

LinkBack Thread Tools Display Modes
Old   September 25, 2013, 23:15
Default How to change patch types in snappyHexMesh?
Join Date: Jul 2013
Posts: 73
Rep Power: 6
inf.vish is on a distinguished road
Hi all,
I am meshing using snappyHexMesh for the first time.

I have a *.stl file wherein i have defined 3 solids - wall, inlet, outlet (those are the names given to the solids)

when running snappyHexMesh this is part of the output

Adding patches for surface regions

Patch Type Region
----- ---- ------

6 wall xyz_wall
7 wall xyz_inlet
8 wall xyz_outlet

Added patches in = 0.02 s

As you can see it has defined all the three boundaris as "wall" but inlet and outlet (of a pipe for example) are always defined as "patch". So how do i change the patch type of "inlet" and "outlet"?
Do i need to change only the boundary file in constant/polymesh? Or is there any other way to define it using snappyHexMesh - I saw something called as "patchInfo" in SHM but not sure how to use it to define different patch types to different boundaries.
inf.vish is offline   Reply With Quote

Old   May 26, 2014, 07:25
New Member
Join Date: Sep 2012
Posts: 13
Rep Power: 8
Endel is on a distinguished road

I just stumbled upon this post and think I know the answer, if it is still needed.

If you refer to you can see, that there is a patchInfo entry in "refinementsurfaces". If you don't set the patchInfo entry, SHM will refer to any given .stl-patch as "wall" by default.

So all you need to do is give it the patchInfo like this:

// Surface based refinement

            // Surface-wise min and max refinement level
            level (2 2);

            // Optional specification of patch type (default is wall). No
            // constraint types (cyclic, symmetry) etc. are allowed.
                type patch;


Hope that helps,
Endel is offline   Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
simpleSRFoam, makePatch and cyclic patch vaina74 OpenFOAM Running, Solving & CFD 7 February 28, 2011 08:26
Initialize a volScalarFiedl with wordList of patch types tgillebaart OpenFOAM Programming & Development 0 February 9, 2011 09:34
Problem in defining patch deformation paul b OpenFOAM Programming & Development 3 April 27, 2010 00:31
specification of patch types vaina74 OpenFOAM Running, Solving & CFD 0 April 9, 2010 08:44
StarToFoam error Kart OpenFOAM Meshing & Mesh Conversion 1 February 4, 2010 05:38

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