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

[snappyHexMesh] snappyhexmesh without geometry files

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 7, 2016, 18:21
Default snappyhexmesh without geometry files
  #1
Member
 
Luis Eduardo
Join Date: Jan 2011
Posts: 85
Rep Power: 15
lebc is on a distinguished road
Hi guys,

I'm starting to analyze wind turbines in OpenFoam and I'm having some trouble with snappyhexmesh...

What I'm trying to do is to generate a mesh to analyze only the rotor on a free flow (not considering terrain, towers, and other details, but using actuationDiskSource for the rotor representation...), so I'm creating a simple rectangular mesh in blockMesh and using snappyhexmesh to refine a cylindrical region, but it does not recognize the specified refinement region...

My starting point was the turbine siting tutorial, just removing the terrain.stl and adjusting the coordinates.

From the log file I noticed this message, but I don't know if this is the cause of the problem:

" Number of intersected edges : 0 "

Any clue about it?

Thank you!
Attached Files
File Type: txt snappyHexMeshDict.txt (2.8 KB, 82 views)
File Type: txt blockMeshDict.txt (1.7 KB, 45 views)
lebc is offline   Reply With Quote

Old   September 8, 2016, 05:01
Default
  #2
New Member
 
Join Date: Jun 2009
Location: Belgium
Posts: 11
Rep Power: 17
Laika is on a distinguished road
Hi Luis,

indeed sHM doesn't mark any cells for refinement, despite your refinementRegion.
(I've seen this before; I guess sHM needs at least one refinementSurface to get into refinement.)
I played with your snappyHexMeshDict, and modified it like this:

Code:
   refinementSurfaces
    {
        windTurbine1 
        {
            level (4 4);
            faceZone windTurbine1;
            cellZone windTurbine1;
            cellZoneInside inside;
        }
    }

    resolveFeatureAngle 30;

    refinementRegions
    {
        /*windTurbine1
        {
            mode inside;
            levels ((6 6));
        }*/

    }
The result is shown in the attached image.

I hope this helps,
happy foaming,

Laika,
still orbiting
Attached Images
File Type: png 20160908_Lebc_img01.png (45.9 KB, 93 views)
Laika is offline   Reply With Quote

Old   September 8, 2016, 06:29
Default
  #3
New Member
 
Ehsan Mahravan
Join Date: Dec 2014
Location: Tehran, Iran
Posts: 9
Rep Power: 11
EhsanMh is on a distinguished road
Hi Luis,

Check the attachment. Geometry specified in refinementSurfaces will be cutted from the base geometry.

If you mean that the selected regions is not refined, just decrease the size of background mesh or increase size of searchableCylinder.
Attached Files
File Type: txt snappyHexMeshDict.txt (2.8 KB, 51 views)

Last edited by EhsanMh; September 8, 2016 at 08:03.
EhsanMh is offline   Reply With Quote

Old   September 8, 2016, 15:38
Default
  #4
Member
 
Luis Eduardo
Join Date: Jan 2011
Posts: 85
Rep Power: 15
lebc is on a distinguished road
Hi Ehsan,

This is the point, the regions for refinement were not being refined.

I increased the blockmesh number of elements in one direction and decreased the level to 4, and it worked! (actually only the blockmesh change was enough to make it work)

Do you know if there is any relation between the blockmesh and the ability of snappyhexmesh to refine some specific region?

Thank you for the reply!!
lebc is offline   Reply With Quote

Old   September 9, 2016, 04:18
Default
  #5
New Member
 
Ehsan Mahravan
Join Date: Dec 2014
Location: Tehran, Iran
Posts: 9
Rep Power: 11
EhsanMh is on a distinguished road
I realized that the size of grid is greater than the size of your cylinder. I guess that it was not crossing any of edges, so snappy could not find any region. It selects edges which coincide with specified geometry, which in your case, as you mentioned in first post, was zero.
EhsanMh is offline   Reply With Quote

Old   September 9, 2016, 07:12
Default
  #6
New Member
 
Join Date: Jun 2009
Location: Belgium
Posts: 11
Rep Power: 17
Laika is on a distinguished road
Hi Ehsan and Luis,

Playing around a bit and sharing some experiences...
Luis used a refinementRegion.
Both Ehsan and myself suggested to use a refinementSurface.

The refinementRegion yields a nicely refined mesh in the desired disk-shaped region, if the background mesh is finer.
The refinementRegion yields a nicely refined mesh (but near the disk-region's surface only; not uniformly in the entire disk volume), even on Luis's original backgroundmesh.

Attached is an impression of the result of my test using Luis's original background mesh, colored by domain. (splitted using splitMeshRegion)

cheers,
Laika,
still orbiting
Attached Images
File Type: png cellToRegionIndex.png (83.7 KB, 61 views)
Laika is offline   Reply With Quote

Old   September 9, 2016, 14:00
Default
  #7
Member
 
Luis Eduardo
Join Date: Jan 2011
Posts: 85
Rep Power: 15
lebc is on a distinguished road
Hi Ehsan and Laika,

I think I got the ideia!!! I'm new to OpenFoam (about 2 months), so it will take me some time to fully understand how it works.

Laika,

After posting the doubt I refined the background mesh and I could see the results you said.

Thank you guys for helping!!! I'll be back soon!!
lebc is offline   Reply With Quote

Reply

Tags
refine, snappyhexmesh


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[snappyHexMesh] SnappyHexMesh on multi-STL geometry in foam extend Awak OpenFOAM Meshing & Mesh Conversion 3 December 20, 2017 16:05
[snappyHexMesh] SnappyHexMesh fails to create patches of .stl files WernerW OpenFOAM Meshing & Mesh Conversion 4 September 26, 2017 01:59
[snappyHexMesh] What types of stl files are needed in snappyhexmesh? phandy OpenFOAM Meshing & Mesh Conversion 1 February 19, 2015 06:36
Simulation of Flow through Complex 3D Geometry EmersonKB CFX 5 July 2, 2009 09:17
OpenFOAM15 paraFoam bug koen OpenFOAM Bugs 19 June 30, 2009 11:46


All times are GMT -4. The time now is 11:02.