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

[snappyHexMesh] Patch volume refinement in sHMD

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

Like Tree2Likes
  • 2 Post By wyldckat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 11, 2015, 11:58
Default Patch volume refinement in sHMD
  #1
Member
 
shashank moghe
Join Date: Feb 2015
Posts: 32
Rep Power: 11
smog is on a distinguished road
Hello all,

I want to region-refine a patch (imported from a .stl file and included in the "regions" section of the Geometry subdict in sHMD [with the same name as the .stl patch]). Has anyone tried it yet?

As it goes, the geometry of my .stl file is such that I cannot use a refinementBox/refinementSphere/etc. for this volume refinement. It would be simpler for me to just refine the region bounded by this patch. Any ideas as to what the syntax should be? This documentation link says it is possible (at the bottom of the page).

http://www.openfoam.org/version2.2.0/snappyHexMesh.php

"users can now specify surface names for region refinement using wildcards; "



Any help will be highly appreciated.

P.S: I tried these permutations before and failed to refine the region:
1) stlFileName.stl_patchname
2) "patchame"
3) "patchname_*"
smog is offline   Reply With Quote

Old   August 13, 2015, 19:33
Default
  #2
New Member
 
Join Date: Mar 2015
Posts: 10
Rep Power: 11
seanmike31 is on a distinguished road
HI, I found this tutorial on youtube. Try it.

https://www.youtube.com/watch?v=ObsFQUiVi1U
seanmike31 is offline   Reply With Quote

Old   August 13, 2015, 20:46
Default
  #3
Member
 
shashank moghe
Join Date: Feb 2015
Posts: 32
Rep Power: 11
smog is on a distinguished road
I have seen this tutorial. Unless I missed the part where he talks about this problem.
smog is offline   Reply With Quote

Old   August 14, 2015, 01:36
Default
  #4
Member
 
DanielP
Join Date: Jan 2015
Posts: 33
Rep Power: 11
danielpiaget is on a distinguished road
Hello Smog,

In snappyHexMesh, one can define patch(es) or surfaces geometry in the following ways.

The first method is when the blockMesh mesh is defined. I recommend that you id all 6 surfaces with patches names.In other words, inside the blockMeshdict defines each patch with the 4 summit points (in counter-clockwise fashion).

The second method is inside the stl file. Each patch can be separated likes this:
---------------------------------------------------------------
solid outlet

facet normal +0.0000000E+00 +0.0000000E+00 +1.0000000E+00
outer loop
vertex -2.0000000E-01 +1.5000000E-01 +2.0000000E+00 vertex -2.0000000E-01 -1.5000000E-01 +2.0000000E+00 vertex +2.0000000E-01 -1.5000000E-01 +2.0000000E+00
endloop
endfacet

endsolid
-------------------------------------------------------------------

Once all that works fine, you can define inside the Geometry section
a region as follows:

regions
{
outlet
{
name my_outlet;
}

}


See also the links below:

https://sites.google.com/site/snappy...t#TOC-geometry
https://openfoamwiki.net/images/f/f0...SlidesOFW7.pdf

Daniel
danielpiaget is offline   Reply With Quote

Old   August 14, 2015, 15:04
Default
  #5
Member
 
shashank moghe
Join Date: Feb 2015
Posts: 32
Rep Power: 11
smog is on a distinguished road
That is not an answer to my question. I can very well define a patch in the sHMD, my question was whether I can refine the volume bounded by a patch.
smog is offline   Reply With Quote

Old   August 14, 2015, 16:52
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings to all!

I was wondering about this today as well and diagnosed it with a modified case of the tutorial "heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges". I added a new STL file to the case named "sliced0.stl" and then added the following to "system/snappyHexMeshDict":
  • Inside the "geometry" block:
    Code:
        sliced0.stl
        {
            type triSurfaceMesh;
    
            regions
            {
                ascii
                {
                    name myPlane;
                }
            }
        }
  • Inside the "castellatedMeshControls.refinementRegions" block:
    Code:
            sliced0.stl
            {
               mode distance;
               levels ((0.3 4) (0.6 3));
            }
    Note: The name "myPlane" cannot be used inside this block.
In case you assigned a new name for the STL, for example:
Code:
    sliced0.stl
    {
        type triSurfaceMesh;
        name mySlice;
Then it's the name "mySlice" that has to be used in "castellatedMeshControls.refinementRegions".


Therefore, you cannot use the name for one of the solids inside the STL and you should be careful with whether you renamed the main STL geometry.

This is the feature that smog pointed out from the release notes for OpenFOAM 2.2.0 .

Best regards,
Bruno
Bollonga and smog like this.
__________________
wyldckat is offline   Reply With Quote

Old   September 1, 2015, 11:51
Default
  #7
Member
 
shashank moghe
Join Date: Feb 2015
Posts: 32
Rep Power: 11
smog is on a distinguished road
Thank you Bruno for the reply. Exactly what I needed, although I worked around the problem in the same way as you did- adding another .stl file and refining that region. Works perfectly fine.
smog is offline   Reply With Quote

Reply

Tags
mesh refinement, refinementregion

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to set periodic boundary conditions Ganesh FLUENT 15 November 18, 2020 07:09
Problem of simulating of small droplet with radius of 2mm liguifan OpenFOAM Running, Solving & CFD 5 June 3, 2014 03:53
[blockMesh] non-orthogonal faces and incorrect orientation? nennbs OpenFOAM Meshing & Mesh Conversion 7 April 17, 2013 06:42
[Other] StarToFoam error Kart OpenFOAM Meshing & Mesh Conversion 1 February 4, 2010 05:38
On the damBreak4phaseFine cases paean OpenFOAM Running, Solving & CFD 0 November 14, 2008 22:14


All times are GMT -4. The time now is 05:49.