CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

Using setSet to define cellSet through stl

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 4, 2020, 13:46
Default Using setSet to define cellSet through stl
  #1
New Member
 
Manuel Oliveira
Join Date: Nov 2019
Posts: 8
Rep Power: 2
ManuelOliveira is on a distinguished road
Hello to all,


I am trying to define to divide a tensile specimen into 2 regions through an stl.


The geometry:



The stl to cut is colored blue:



I am using setSet in the following:


I created a file named setSet to run the command: setSet -batch setSet. In it I have:
  • cellSet metal new surfaceToCell "geometry/specimen.stl" ((0 0 0)) true true false 10 -10
  • cellSet metal delete surfaceToCell "geometry/secondRegion.stl" ((0 0 0)) true true false 1e-3 1e-3

I intent to add the same block I am removing by:
  • cellSet secondRegion new surfaceToCell "geometry/secondRegion.stl" ((0 0 0)) true true false 1e-3 1e-3

I want to check the cut but it is giving an unexpected result

The result so far:


It is not giving me a clean cut.

After some searching I found out the following information on wiki
  • surfaceToCell: Select cells using a surface

    surfaceToCell SURFACE OUTSIDEPOINTS CUT INSIDE OUTSIDE NEAR CURVATURE

    SURFACE name of triSurface
    OUTSIDEPOINTS list of points that define outside
    CUT boolean whether to include cells cut by surface
    INSIDE boolean whether to include cells inside surface
    OUTSIDE boolean whether to include cells outside surface
    NEAR scalar; include cells with centre <= near to surface
    CURVATURE scalar; include cells close to strong curvature on surface (curvature defined as difference in surface normal at nearest point on surface for each vertex of cell)

I have tried to change of the parameters for the near and curvature, however with no success.

Can anyone explain what is understood by:
  • OUTSIDEPOINTS list of points that define outside
  • How to set the near and curvature parameters.

Is there a better way to define cellSets via an stl?

Best Regards!
ManuelOliveira is offline   Reply With Quote

Old   January 5, 2020, 12:06
Default
  #2
New Member
 
Manuel Oliveira
Join Date: Nov 2019
Posts: 8
Rep Power: 2
ManuelOliveira is on a distinguished road
Hello,


Don't know if it was the best way, but I was able to solve it through OF1906 with the creation of a topoSetDict and using useSurfaceOrientation as true


Code:
actions
(
  {
    name    metal;
    type    cellSet;
    action  new;
    source surfaceToCell;
   sourceInfo
   {
       file            "geometry/specimen.stl";
      useSurfaceOrientation false;
        outsidePoints   ((0 0 0));    // definition of outside
        includeCut      true;              // cells cut by surface
       includeInside    true;              // cells not on outside of surf
        includeOutside  false;              // cells on outside of surf
        nearDistance    10;                 // cells with centre near surf
                                           // (set to -1 if not used)
       curvature       -10;                // cells within nearDistance
                                            // and near surf curvature
                                            // (set to -100 if not used)
    }

  }

  {
    name    metal;
    type    cellSet;
    action  delete;
    source surfaceToCell;
   sourceInfo
   {
       file            "geometry/secondRegion.stl";
      useSurfaceOrientation true;
        outsidePoints   ((0 0 0));    // definition of outside
        includeCut      false;              // cells cut by surface
       includeInside    true;              // cells not on outside of surf
        includeOutside  false;              // cells on outside of surf
        nearDistance    0;                 // cells with centre near surf
                                           // (set to -1 if not used)
       curvature       0;                // cells within nearDistance
                                            // and near surf curvature
                                            // (set to -100 if not used)
    }

  }

  {
    name    polymer;
    type    cellSet;
    action  new;
    source surfaceToCell;
   sourceInfo
   {
       file            "geometry/secondRegion.stl";
      useSurfaceOrientation true;
        outsidePoints   ((0 0 0));    // definition of outside
        includeCut      false;              // cells cut by surface
       includeInside    true;              // cells not on outside of surf
        includeOutside  false;              // cells on outside of surf
        nearDistance    0;                 // cells with centre near surf
                                           // (set to -1 if not used)
       curvature       0;                // cells within nearDistance
                                            // and near surf curvature
                                            // (set to -100 if not used)
    }

  }
);
ManuelOliveira 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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
HELP----Surface Reaction UDF Ashi Fluent UDF and Scheme Programming 1 May 19, 2020 21:13
UDF: trying to implement a Kinetic Equation source term er.mkumar Fluent UDF and Scheme Programming 35 March 22, 2019 10:20
[blockMesh] How can I define functions with m4? entropie OpenFOAM Meshing & Mesh Conversion 2 August 13, 2014 10:00
[snappyHexMesh] Experimentally obtained STL file for internal Flow SnappyHexMesh Irish09 OpenFOAM Meshing & Mesh Conversion 9 April 7, 2012 08:50
Free surface boudary conditions with SOLA-VOF Fan Main CFD Forum 10 September 9, 2006 12:24


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