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

[mesh manipulation] topoSet boxToFace misses faces on some sides.

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 3, 2020, 10:17
Default topoSet boxToFace misses faces on some sides.
  #1
New Member
 
Daniel Rostan
Join Date: Dec 2020
Posts: 1
Rep Power: 0
akataniel is on a distinguished road
Hi all,


I have a problem with topoSet missing out Faces that should be picked by boxToFace. I have a more complex gmsh-File where I want to use topoSet but reproduced my problem with a more simple case with a 3x3x3 cube with cubic elements. The size of the complete cube is 10.0x10.0x10.0 and I am trying to pick up all faces on every side of the cube later transforming it into patches to apply BCs.


At first I convert the gmsh via gmshToFoam and then apply topoSet with the following file:



Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  7
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      topoSetDict;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

actions
(
    {
        name    inletFaces;
        type    faceSet;
        action  new;
        source  boxToFace;
        sourceInfo
        {
            box (0.0 0.0 0.0)(10.0 0.0 10.0);
        }
    }
    {
        name    outletFaces;
        type    faceSet;
        action  new;
        source  boxToFace;
        sourceInfo
        {
            box (0.0 10.0 0.0)(10.0 10.0 10.0);
        }
    }
    {
        name    bottomFaces;
        type    faceSet;
        action  new;
        source  boxToFace;
        sourceInfo
        {
            box (0.0 0.0 0.0)(10.0 10.0 0.0);
        }
    }
    {
        name    topFaces;
        type    faceSet;
        action  new;
        source  boxToFace;
        sourceInfo
        {
            box (0.0 0.0 10.0)(10.0 10.0 10.0);
        }
    }
        {
        name    leftFaces;
        type    faceSet;
        action  new;
        source  boxToFace;
        sourceInfo
        {
            box (0.0 0.0 0.0)(0.0 10.0 10.0);
        }
    }
    {
        name    rightFaces;
        type    faceSet;
        action  new;
        source  boxToFace;
        sourceInfo
        {
            box (10.0 0.0 0.0)(10.0 10.0 10.0);
        }
    }
);

// ************************************************************************* //
On the front(inlet), left and bottom side boxToFace finds all 9 Faces. But on the back(outlet), right and top side only 5 Faces are found. With modifying the box for the 3 latter ones to a 3D-Box (i.e. 10.01 - 9.99) allows to solve this problem for this easy case but not for a more complex geometry I actually want to use. I would be grateful for every hint, that allows to solve my problem.


Thank you!
akataniel is offline   Reply With Quote

Old   December 18, 2020, 00:30
Default
  #2
Senior Member
 
Claudio Boezio
Join Date: May 2020
Location: Europe
Posts: 137
Rep Power: 6
Ship Designer is on a distinguished road
Depending on the geometry complexity, you could try to use the utility autoPatch and play around with the angle option. It will automatically create patches named auto0, auto1 … autoN. You can then rename these and assign types with createPatch and createPatchDict. This has the limitation that if the geometry changes, the numbering of automatically created patches might change as well, requiring createPatchDict to be edited. But it still might save time. I believe you can also define patches by defining boxes or other matching criteria in the createPatchDict directly (if that's what you are trying to do) and you wouldn't need to use topoSet first.

Cheers, Claudio
Ship Designer is offline   Reply With Quote

Old   December 19, 2020, 12:46
Default
  #3
Senior Member
 
Charles
Join Date: Aug 2016
Location: Vancouver, Canada
Posts: 148
Rep Power: 9
Marpole is on a distinguished road
It seems to me that you are not using a box but a plane. Have you tested using something slightly different, such as below.

Code:
    {
        name    outletFaces;
        type    faceSet;
        action  new;
        source  boxToFace;
        sourceInfo
        {
            box (0.0 9.999 0.0)(10.0 10.001 10.0);
        }
    }
__________________
Charles L.
Marpole is offline   Reply With Quote

Reply


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
Decomposing meshes Tobi OpenFOAM Pre-Processing 22 February 24, 2023 09:23
[snappyHexMesh] Add Mesh Layers doesnt work on the whole surface Kryo OpenFOAM Meshing & Mesh Conversion 13 February 17, 2022 07:34
[snappyHexMesh] Layers not growing at all zonda OpenFOAM Meshing & Mesh Conversion 12 June 6, 2020 11:28
[snappyHexMesh] No layers in a small gap bobburnquist OpenFOAM Meshing & Mesh Conversion 6 August 26, 2015 09:38
createPatch Segmentation Fault (CORE DUMPED) sam.ho OpenFOAM Pre-Processing 2 April 21, 2014 02:01


All times are GMT -4. The time now is 22:56.