CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[snappyHexMesh] create inlet and outlet

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 2, 2019, 11:55
Default create inlet and outlet
  #1
New Member
 
Join Date: Aug 2019
Posts: 5
Rep Power: 2
Didu is on a distinguished road
Hi,
I need to create an inlet and outlet in final mesh (after a blockMesh-snappyHexMesh (.stl)). I tried topoSet followed by createPath with no sucess. My inlet and outlet are pipes (cylindrical shape) and my main body is a tank.
Thank you.
Didu is offline   Reply With Quote

Old   October 3, 2019, 03:12
Default
  #2
Member
 
Piotr Ładyński
Join Date: Apr 2017
Posts: 32
Rep Power: 4
piotr.mecht is on a distinguished road
Isn't it easier to remesh with CORRECT settings?


in snappyHexMesh in geometry subdictionary:
Code:
geometry
{
    myGeometry.stl //this stl contains different surface regions specified
    {
        type triSurfaceMesh;
        name Geometry;
        regions
        {
            // patch name specification 
            // regionNameInSTLfile    {name    patchNameInOpenFOAM;}
            myInletSTLregion          {name Inlet;       } 
            myOutletSTLregion         {name Outlet;      }
            myWallsInSTL              {name Walls;       }
            symmetryPlaneInSTL        {name mySymmetry;  }
        }
    }
}
and in snappyHexMesh castellatedMeshControl subdictionary:
Code:
refinementSurfaces
    {
        Geometry
        {
        level (1 1);
          
          regions
          {
                // surface region refinement 
                // patch type specification
                // stlRegionName     { level (default feature_angle_resolved); patchInfo { type patchType; }
                myInletSTLregion     { level (4 4); patchInfo { type patch;         }}
                myOutletSTLregion    { level (4 4); patchInfo { type patch;         }}
                myWallsInSTL         { level (3 4); patchInfo { type wall;          }}
                symmetryPlaneInSTL   { level (0 1); patchInfo { type symmetry;      }}
          }
        }
    }
piotr.mecht is offline   Reply With Quote

Old   October 3, 2019, 04:34
Default
  #3
New Member
 
Join Date: Aug 2019
Posts: 5
Rep Power: 2
Didu is on a distinguished road
Many thanks for your reply,
but how can I build an .stl file of flat geometry?
Didu is offline   Reply With Quote

Old   October 3, 2019, 07:05
Default
  #4
Member
 
Piotr Ładyński
Join Date: Apr 2017
Posts: 32
Rep Power: 4
piotr.mecht is on a distinguished road
snappHexMesh expects that you provide closed surface file, so it can be determined, whether to prepare mesh for internal or external flow based on locationInMesh input. You can't use flat non-closed geometry, as the snappyHexMesh is designed to prepare 3d meshes.


You can create 3d closed surface out of flat stl elements of course (stl is meant to represent surfaces flat ord 3d). People often use software like SALOME to prepare stl surface mesh with matching points between patches. You can export each of these patches as separate stls and concatenate them to a single file - copypaste its content to a single file or you can use linux command:
Code:
cat inlet.stl outlet.stl wall.stl > myGeometry.stl
piotr.mecht is offline   Reply With Quote

Old   October 4, 2019, 02:39
Default
  #5
Member
 
Piotr Ładyński
Join Date: Apr 2017
Posts: 32
Rep Power: 4
piotr.mecht is on a distinguished road
I've discovered this tool recently:
https://openfoamwiki.net/index.php/AutoPatch


It is actually possible to create patches after you've meshed over your stl with snappyHexMesh, but they are separated automatically by some algorithm, based on feature angle specified (and not an exact region, so you can end up with much more patches, than you wanted). New patches are also named automatically auto0, auto1, auto2 etc. You can rename them manually in constant/polyMesh/boundary


With feature angle of 120 degrees:

Code:
autoPatch 120

Last edited by piotr.mecht; October 4, 2019 at 03:49.
piotr.mecht is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
[DesignModeler] Create Sketches (Hub, Shroud, Inlet, Outlet) tuete ANSYS Meshing & Geometry 3 September 7, 2017 05:06
Pressure inlet vs outlet position, transient, time dependent pressure and gravity silent2608 FLUENT 0 February 6, 2016 10:19
Mass flow inlet and pressure outlet issue nikhil FLUENT 5 December 11, 2013 12:30
Inlet & Outlet Velocity BC issue naiter OpenFOAM 3 December 19, 2012 07:14
steam flow in a pipe driven by a pressure gradient between inlet and outlet SalvoCalvo Main CFD Forum 0 March 11, 2010 06:52


All times are GMT -4. The time now is 09:25.