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

[snappyHexMesh] Porous Media using TopoSet

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

Like Tree5Likes
  • 1 Post By RobertoCirolini
  • 4 Post By RobertoCirolini

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 21, 2016, 18:53
Default Porous Media using TopoSet
  #1
New Member
 
Roberto
Join Date: May 2016
Posts: 17
Rep Power: 9
RobertoCirolini is on a distinguished road
Dear Foamers,

I have some problems using TopoSet.
I need to simulate a flow passing throw a porous media, please see the picture 1 attached. The pleat is a stl file.

The only thing I need is somehow to make that OpenFoam recognize my stl file as a CellZone.

The problem is: I have been using sHM, but when I split my mesh, (using surfaceFeatureExtract) it creates FaceZones and CellZones, because I enable in sHM to create a refinementSurface. Creating a CellZone is fine because I can, and I should, set in fvOptions my porous Media, but the flow does not pass through the other side of the pleat and I can not find a way to deal with sHM, so I decided to migrate to use TopoSet.

Using TopoSet I could manage creating a Cellzone for my stl file just when I create a blockMesh that involves all my pleat, not like in the picture. However, when I try to set TopoSet using the picture 1, OpenFoam gives me those CellZones, please see the other pictures.

The red part are my CellZones and they are different because I was playing around with SurfaceToCell, which means that the following code represents the picture 2.

here is the code I used for my topoSet:

Code:
{
      name filter;
      type cellSet;
      action new;
      source surfaceToCell; // select based on surface
//      source zoneToCell;
      sourceInfo
          {
        file            "$FOAM_CASE/constant/triSurface/testPleat.stl";

        outsidePoints   ((1 1 1));         // definition of outside
        includeCut      true;              // cells cut by surface
        includeInside   true;             // cells not on outside of surf
        includeOutside  false;             // cells on outside of surf
        useSurfaceOrientation false;  // use closed surface inside/outside
                                      // test (ignores includeCut,
                                      // outsidePoints)
        nearDistance    -1;//-1             // cells with centre near surf
                                            // (set to -1 if not used)
        //- If > 0 : include cells with distance from cellCentre to surface
        //  less than nearDist.
        curvature       0.9;                // cells within nearDistance
                                            // and near surf curvature
                                            // (set to -100 if not used)
          }
      }/**/

      {
    name pleat;
    type cellZoneSet;
    action new;
    source setToCellZone;
    sourceInfo
    {
    set filter;
    }
      }/**/
Has anyone already faced similar issues in OpenFOAM? Where could this come from?

Thank you very much for your time!

Roberto
Attached Images
File Type: jpg picture 1.jpg (126.9 KB, 223 views)
File Type: jpg picture 2.jpg (94.5 KB, 177 views)
File Type: jpg picture 3.jpg (36.8 KB, 173 views)
leogermer likes this.

Last edited by RobertoCirolini; August 23, 2016 at 09:57.
RobertoCirolini is offline   Reply With Quote

Old   August 23, 2016, 08:59
Default
  #2
New Member
 
Roberto
Join Date: May 2016
Posts: 17
Rep Power: 9
RobertoCirolini is on a distinguished road
Hi again,

maybe my explanation was not very understandable. Please let me know.
But I still cannot manage to set my cellzone properly. I tried to use topoSet in a simple mode, a square. The square is a stl file and I made it in paraview. Therefore I used the following code to set my CellZone, and it works (for that square). Please, see the picture 4.

Code:
      {
      name filter;
      type cellSet;
      action new;
      source surfaceToCell; // select based on surface
      sourceInfo
          {
        file            "$FOAM_CASE/constant/triSurface/testPleat.stl";

        outsidePoints   ((1 1 1));         // definition of outside
        includeCut      false;              // cells cut by surface
        includeInside   true;             // cells not on outside of surf
        includeOutside  false;             // cells on outside of surf
        useSurfaceOrientation true;  // use closed surface inside/outside
                                      // test (ignores includeCut,
                                      // outsidePoints)
        nearDistance    -1;//-1             // cells with centre near surf
                                            // (set to -1 if not used)
        //- If > 0 : include cells with distance from cellCentre to surface
        //  less than nearDist.
        curvature       0.9;                // cells within nearDistance
                                            // and near surf curvature
                                            // (set to -100 if not used)
          }
      }
However when I use the pleat file I receive the picture 5 and I still cannot understand why my cellZone is like The red region is my CellZone

Is there somebody who could give me some hint, please?

Thank you in advance
Attached Images
File Type: jpg picture4.jpg (192.3 KB, 109 views)
File Type: jpg picture5.jpg (168.4 KB, 113 views)

Last edited by RobertoCirolini; August 23, 2016 at 10:57.
RobertoCirolini is offline   Reply With Quote

Old   August 25, 2016, 16:19
Default
  #3
New Member
 
Roberto
Join Date: May 2016
Posts: 17
Rep Power: 9
RobertoCirolini is on a distinguished road
Any suggestions?
RobertoCirolini is offline   Reply With Quote

Old   August 30, 2016, 09:34
Default
  #4
New Member
 
Roberto
Join Date: May 2016
Posts: 17
Rep Power: 9
RobertoCirolini is on a distinguished road
Hi, just to finish this thread,

I have found a solution for my problem. Using topoSet I've just selected the other cells of my configuration in the picture 5, using "actions" and "invert". Besides I have also created two boxes "boxToCell" to delete the regions that were not important for my simulation, front and behind of my pleat. That is all.

Cheers,

Roberto
RobertoCirolini is offline   Reply With Quote

Reply

Tags
snappyhexmesh, surfacetocell, toposetdict

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
Thermal non-equilibrium porous media model with conjugate heat transfer Hexahedron FLUENT 9 February 22, 2023 03:55
Multiphase Porous Media Flow - Convergence Issues VT_Bromley FLUENT 7 May 14, 2020 17:34
Porous media setup issues in Fluent Bernard Van FLUENT 29 January 26, 2017 05:09
How to model granular flow through porous media Axius FLUENT 2 August 7, 2014 11:34
porous media: Fluent or Star-CD? Igor Main CFD Forum 0 December 5, 2002 16:16


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