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

how to generate cylinder field in cellSetDict?

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

Reply
 
LinkBack Thread Tools Display Modes
Old   June 18, 2012, 10:03
Default how to generate cylinder field in cellSetDict?
  #1
New Member
 
Teemo
Join Date: May 2012
Posts: 29
Rep Power: 5
Teemo is on a distinguished road
Hello,

I would like to generate a floating object with cylinder shape, how should I setup the cellSetDict?

Regards,
T
Teemo is offline   Reply With Quote

Old   June 18, 2012, 11:05
Default
  #2
Member
 
Eysteinn Helgason
Join Date: Sep 2009
Location: Gothenburg, Sweden
Posts: 52
Rep Power: 7
eysteinn is on a distinguished road
Quote:
Originally Posted by Teemo View Post
Hello,

I would like to generate a floating object with cylinder shape, how should I setup the cellSetDict?

Regards,
T
This is from OF 1.6-ext:
OpenFOAM-1.6-ext/applications/utilities/mesh/manipulation/cellSet/cellSetDict

Code:
// Name of set to operate on
name c0;

// One of clear/new/invert/add/delete|subset/list
action new;

// Actions to apply to cellSet. These are all the topoSetSource's ending
// in ..ToCell (see the meshTools library).

topoSetSources 
(   
    // Select by explicitly providing cell labels
    labelToCell
    {
        value (12 13 56);   // labels of cells
    }

    // Copy elements from cellSet
    cellToCell
    {
        set c1;
    }

    // Cells in cell zone
    zoneToCell
    {
        name ".*Zone";      // Name of cellZone, regular expressions allowed
    }

    // Cells on master or slave side of faceZone
    faceZoneToCell
    {
        name ".*Zone";      // Name of faceZone, regular expressions allowed
        option master;      // master/slave
    }
    
    // Select based on faceSet
    faceToCell
    {
        set f0;             // Name of faceSet

        //option neighbour; // cell with neighbour in faceSet
        //option owner;     //  ,,       owner
        option any;         // cell with any face in faceSet
        //option all;       // cell with all faces in faceSet
    }
    // Select based on pointSet
    pointToCell
    {
        set p0;
        option any;         // cell with any point in pointSet
        //option all;       // cell with all points in pointSet
    }

    // Select based on cellShape
    shapeToCell
    {
        type hex;           // hex/wedge/prism/pyr/tet/tetWedge/splitHex
    }

    // Cells with cell centre within box
    boxToCell
    {
       box   (0 0 0) (1 1 1);
    }

    // Cells with cell centre within box
    // Is skewed, rotated box. Given as origin and three spanning vectors.
    rotatedBoxToCell
    {
       origin   (0.2 0.2 -10);
       i        (0.2 0.2 0);
       j        (-0.2 0.2 0);
       k        (10 10 10);
    }

    // Cells with centre within cylinder
    cylinderToCell
    {
       p1       (0.2 0.2 -10); // start point on cylinder axis
       p2       (0.2 0.2 0);   // end point on cylinder axis
       radius   5.0;
    }

    // Cells with centre within sphere
    sphereToCell
    {
       centre   (0.2 0.2 -10);
       radius   5.0;
    }

    // Cells with cellCentre nearest to coordinates
    nearestToCell
    {
       points ((0 0 0) (1 1 1)(2 2 2));
    }

    // Select based on surface
    surfaceToCell
    {
        file            "www.avl.com-geometry.stl";
        outsidePoints   ((-99 -99 -59));    // definition of outside
        includeCut      false;              // cells cut by surface
        includeInside   false;              // cells not on outside of surf
        includeOutside  false;              // cells on outside of surf
        nearDistance    -1;                 // cells with centre near surf
                                            // (set to -1 if not used)
        curvature       0.9;                // cells within nearDistance
                                                                                                     126,1         73%
                                           // (set to -100 if not used)
    }

    // values of field within certain range
    fieldToCell
    {
        fieldName   U;      // Note: uses mag(U) since volVectorField
        min         0.1;
        max         0.5;
    }

    // Mesh region (non-face connected part of (subset of)mesh)
    regionToCell
    {
        set         c0;         // name of cellSet giving mesh subset
        insidePoint (1 2 3);    // point inside region to select
    }

);
cylinderToCell is probably what you are looking for

/Eysteinn
eysteinn is offline   Reply With Quote

Old   June 18, 2012, 11:16
Default
  #3
New Member
 
Teemo
Join Date: May 2012
Posts: 29
Rep Power: 5
Teemo is on a distinguished road
Thanks very much, I will give it a try with cylinderToCell.

REgards,
T
Teemo is offline   Reply With Quote

Old   July 17, 2012, 07:44
Default
  #4
New Member
 
llh
Join Date: Jan 2012
Posts: 22
Rep Power: 5
lilinghan8 is on a distinguished road
Hi Eystein,

I tried cylinderToCell but the shape of the cylinder looked really strange, could you help me with this?
https://docs.google.com/drawings/d/1...DW5AXeEmY/edit

Regards,
Li
lilinghan8 is offline   Reply With Quote

Old   July 17, 2012, 07:53
Default
  #5
Member
 
Eysteinn Helgason
Join Date: Sep 2009
Location: Gothenburg, Sweden
Posts: 52
Rep Power: 7
eysteinn is on a distinguished road
Quote:
Originally Posted by lilinghan8 View Post
Hi Eystein,

I tried cylinderToCell but the shape of the cylinder looked really strange, could you help me with this?
https://docs.google.com/drawings/d/1...DW5AXeEmY/edit

Regards,
Li
I guess with "strange" you mean that it is not smooth or?
Have you tried to make the cells smaller in this region?
It is possible that the cells in this region are too larger to make it
better "looking".
eysteinn is offline   Reply With Quote

Old   July 17, 2012, 08:44
Default
  #6
New Member
 
llh
Join Date: Jan 2012
Posts: 22
Rep Power: 5
lilinghan8 is on a distinguished road
Hi again,

The cells you mean is the mesh size around this region or the cylinder size?
I set the shape of the cylinder based on a physical experiment so I can not change the size of it.

Btw, the simulation cashed down at about 3.5s since floating point exception issue, do you have any idea about how to solve it?

Regards,
lilinghan8 is offline   Reply With Quote

Old   July 17, 2012, 10:17
Default
  #7
Member
 
Eysteinn Helgason
Join Date: Sep 2009
Location: Gothenburg, Sweden
Posts: 52
Rep Power: 7
eysteinn is on a distinguished road
Quote:
Originally Posted by lilinghan8 View Post
Hi again,

The cells you mean is the mesh size around this region or the cylinder size?
I set the shape of the cylinder based on a physical experiment so I can not change the size of it.

Btw, the simulation cashed down at about 3.5s since floating point exception issue, do you have any idea about how to solve it?

Regards,

What I mean is that your cylinder selection is created from the cell in your domain. So if you have large cells in your domain the cylinder surface will not be smooth.

If you want to create an solid cylinder inside your domain, then it is probably easier to do that using a cad software and mesh everything, including the cylinder.
eysteinn is offline   Reply With Quote

Reply

Thread Tools
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
Phase Field modeling in OpenFOAM adona058 OpenFOAM Running, Solving & CFD 24 January 31, 2015 07:01
3-d mesh gambit (cylinder within a cylinder) Jason ANSYS Meshing & Geometry 19 June 26, 2013 10:00
problems after decomposing for running alessio.nz OpenFOAM 5 April 20, 2011 08:44
Solver and geometry choose for drag coefficient calculation around circular cylinder at large Re lin OpenFOAM Running, Solving & CFD 3 April 16, 2009 10:50
flow over a cylinder urgent! kevin FLUENT 7 June 8, 2006 01:19


All times are GMT -4. The time now is 03:52.