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

[snappyHexMesh] extrudeMesh but retain sourcePatch as faceZone

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By jfw_cfd

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 30, 2016, 09:34
Question extrudeMesh but retain sourcePatch as faceZone
  #1
New Member
 
Johannes
Join Date: Mar 2011
Location: Austria
Posts: 12
Rep Power: 15
jfw_cfd is on a distinguished road
Hello!

After many hours of research without success, I need to open this new thread.

The following situation: I have a mesh (generated with snappyHexMesh) of a compressor with inlet and outlet boundary patches. I want to extrude an inlet channel and outlet channel, respectively, from these patches with extrudeMesh (extrude from mesh), which works fine and is already done.

But! I want to retain the original inlet and outlet boundary patch as an internal faceZone (or faceSet), since I want to do some postprocessing at these cross sections afterwards. How to do that? Any simple ideas? At the moment the sourcePatches (from the original mesh) are lost after the extrudeMesh operation.

BTW: OpenFOAM 2.4

Thanks in advance for your comments!
Regards,
Johannes
jfw_cfd is offline   Reply With Quote

Old   June 22, 2016, 11:32
Lightbulb a possible solution
  #2
New Member
 
Johannes
Join Date: Mar 2011
Location: Austria
Posts: 12
Rep Power: 15
jfw_cfd is on a distinguished road
Hello & Hallo!

Just in case anybody is facing a similar problem, I post a solution (found by a colleague of mine) for the described problem.

My colleague found a solution/work around by using topoSet right after extrudeMesh with the following topoSetDict

Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      topoSetDict;
}

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

actions
(
    {
        name    inlet-fS;
        type    faceSet;
        action  new;
        source  cellToFace;
        sourceInfo
        {
            set addedCells;
            option  all;
        }

    }
    {
        name    bothaddedfaces-fS;
        type    faceSet;
        action  new;
        source  cellToFace;
        sourceInfo
        {
            set addedCells;
            option  both;
        }
    }
    {
        name    inlet-fS;
        type    faceSet;
        action  delete;
        source  faceToFace;
        sourceInfo
        {
            set bothaddedfaces-fS;
        }
    }
    {
        name    inlet-fS;
        type    faceSet;
        action  delete;
        source  patchToFace;
        sourceInfo
        {
            name inletDisk;
        }
    }
    {
        name    inlet-fS;
        type    faceSet;
        action  delete;
        source  patchToFace;
        sourceInfo
        {
            name inletpipe;
        }
    }
    {
        name    inlet-fZ;
        type    faceZoneSet;
        action  new;
        source  setToFaceZone;
        sourceInfo
        {
            faceSet     inlet-fS;
        }
    }
    {
        name    bothaddedfaces-fS;
        type    faceSet;
        action  remove;
    }
    {
        name    inlet-fS;
        type    faceSet;
        action  remove;
    }
    {
        name    addedCells;
        type    cellSet;
        action  remove;
    }
);
In a few words about what this topoSetDict essentially does:
1 extract all faces from extruded mesh (in this case a pipe)
2 extract only internal faces (with "both" option)
3 subtract internal faces from all faces (so only bounding faces remain)
4 subtract wall and the outside pipe end (in this case the inlet), so what remains is the inside pipe end, the internal face used for postprocessing purposes later on

Hope this might be helpful for those who didn't already know ;-)

Regards,
Johannes
Alczem likes this.
jfw_cfd is offline   Reply With Quote

Old   August 23, 2017, 05:59
Default
  #3
New Member
 
Elena Valle
Join Date: Jul 2016
Posts: 3
Rep Power: 10
ElenaVM is on a distinguished road
Hello Johannes

Thanks for your information. I'm trying to create a axisymmetric mesh with internal walls, the 3D mesh is well done with SnappyHexMesh and I could integrate the internal walls. But since I need a 2D mesh I use this ExtrudeMesh tool, everything is fine with the boundary patche but for the internal walls they disappear and I have no data of them neither in cellZone file nor faceZone file. I tried to use the hint you gave here but since my cellZone file has no points I think it is not working. Do you have a idea to fix this?

Thank you very much!
ElenaVM is offline   Reply With Quote

Reply

Tags
extrudemesh, facezone, retain, source patch, toposet


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
[swak4Foam] swakExpression on faceZone returns empty field for non-empty zone jgross OpenFOAM Post-Processing 1 July 7, 2022 12:28
decomposePar problem: Cell 0contains face labels out of range vaina74 OpenFOAM Pre-Processing 37 July 20, 2020 06:38
[snappyHexMesh] Error snappyhexmesh - Multiple outside loops avinashjagdale OpenFOAM Meshing & Mesh Conversion 53 March 8, 2019 10:42
Calculate Mass Flowrate at a faceZone with OpenFOAM4 donQi OpenFOAM Post-Processing 1 August 31, 2016 22:13
Problem with Application based on a faceZone in parallel psilkeit OpenFOAM Programming & Development 2 April 28, 2016 10:47


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