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

[mesh manipulation] On spliting multi region meshes

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 27, 2022, 08:50
Default On spliting multi region meshes
  #1
Senior Member
 
Nico
Join Date: Jan 2022
Location: Germany
Posts: 122
Rep Power: 6
Hr_kules is on a distinguished road
Hey, since my rather humble beginings with openfoam i am stuck with a certain problem regarding the spliting of multi region meshes. I am using OpenFoam Version 9.



To finally resolve this as this will be somewhat fundamental to my phd i would like to discuss my error.

I have a boiled down case of a single plate with a chevron corrugation, for simplicity its a single quick and dirty done corrugation. I had this test case in ansys fluent and exported the stls to openfoam to use them in snappyhexmesh. The complete case is attached with an allrun script and a log from my previous run.



My main concern is the spliting of the mesh as the boundaries don't match up. If i run the case and examine the boundary files i have for the fluidregion the correct boundaries and the mesh is mediocore but resembles what i had in mind. (See attached image) However i can't open the mesh for the other region because the console states that the boundaries don't match up.
A closer look reveals that one of the interfaces is found in both boundary definitions.
fluid:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  9
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    format      ascii;
    class       polyBoundaryMesh;
    location    "constant/fluidcold/polyMesh";
    object      boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

4
(
    inletcold
    {
        type            patch;
        nFaces          2675;
        startFace       563642;
    }
    outletcold
    {
        type            patch;
        nFaces          2672;
        startFace       566317;
    }
    wallfluidcold
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          36996;
        startFace       568989;
    }
    fluidcold_to_solid
    {
        type            mappedWall;
        inGroups        List<word> 
3
(
wall
mappedPatch
baffles1
)
;
        nFaces          33762;
        startFace       605985;
        sampleMode      nearestPatchFace;
        sampleRegion    solid;
        samplePatch     solid_to_fluidcold;
    }
)

// ************************************************************************* //
solid
Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  9
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    format      ascii;
    class       polyBoundaryMesh;
    location    "constant/solid/polyMesh";
    object      boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

3
(
    wallsolid
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          34685;
        startFace       292030;
    }
    fluidcold_to_solid
    {
        type            mappedWall;
        inGroups        List<word> 
3
(
wall
mappedPatch
baffles1
)
;
        nFaces          1;
        startFace       326715;
        sampleMode      nearestPatchFace;
        sampleRegion    solid;
        samplePatch     solid_to_fluidcold;
    }
    solid_to_fluidcold
    {
        type            mappedWall;
        inGroups        List<word> 
3
(
wall
mappedPatch
baffles1
)
;
        nFaces          33760;
        startFace       326716;
        sampleMode      nearestPatchFace;
        sampleRegion    fluidcold;
        samplePatch     fluidcold_to_solid;
    }
)

// ************************************************************************* //
examining the log, if found a few entries i find highly intriguing, since snappyHexMesh states that:
Code:
Finished meshing without any errors
Finished meshing in = 94.08 s.
i found for the creation of the baffles:
Code:
Reading "createBafflesDict"

Created zone baffles1 at index 1 with 33763 faces
--> FOAM Warning : 
    From function void createFaces(bool, const Foam::fvMesh&, const Foam::faceZone&, const labelList&, const labelList&, Foam::polyTopoChange&, Foam::PackedBoolList&, Foam::label&)
    in file createBaffles.C at line 395
    Found boundary face (in patch wallfluidcold) in faceZone baffles1 to convert to baffle patches fluidcold_to_solid/solid_to_fluidcold
    Set internalFacesOnly to true in the createBaffles control dictionary if you don't wish to convert boundary faces.
--> FOAM Warning : 
    From function void createFaces(bool, const Foam::fvMesh&, const Foam::faceZone&, const labelList&, const labelList&, Foam::polyTopoChange&, Foam::PackedBoolList&, Foam::label&)
    in file createBaffles.C at line 395
    Found boundary face (in patch wallsolid) in faceZone baffles1 to convert to baffle patches fluidcold_to_solid/solid_to_fluidcold
    Set internalFacesOnly to true in the createBaffles control dictionary if you don't wish to convert boundary faces.
Converted 33763 faces into boundary faces in patches 
2
(
fluidcold_to_solid
solid_to_fluidcold
)


--> FOAM Warning : 
    From function int main(int, char**)
    in file createBaffles.C at line 822
    Setting field on boundary faces to zero.
You might have to edit these fields.
Writing mesh to 0
End
After changing almost every parameter in the snappyhexmeshdict i found no real progress, which is by now more than frustrating. Also trying to use topoSet and the attempt to use
Code:
splitMeshRegions -cellZonesOnly -overwrite
didn't work at all since appearantly the cells are not completely inside a cellZone only.


However i am left with increasing doubt that mabye my stl files are not ideal from the start. Is there anything known regarding issues like this?

Or is there anything fundamentaly wrong with my workflow and/or my snappyHexMeshdict?



Any hint is greatly appreciated and would help me out a lot in the long run!
Have a good one!
Attached Images
File Type: jpg mesh1.jpg (195.6 KB, 5 views)
Attached Files
File Type: zip singlePlate.zip (39.1 KB, 3 views)
Hr_kules 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
Can I use fvOptions to couple a solid region and a fluid region? titanchao OpenFOAM Running, Solving & CFD 4 January 14, 2022 08:55
[snappyHexMesh] Multi Region Mesh of a car filter Zephiro88 OpenFOAM Meshing & Mesh Conversion 3 September 11, 2019 20:34
conjugate heat transfer in OpenFOAM skuznet OpenFOAM Running, Solving & CFD 99 March 16, 2017 06:07
[snappyHexMesh] Multi Region Meshing bruce OpenFOAM Meshing & Mesh Conversion 12 July 31, 2013 11:09
[snappyHexMesh] multi region with snappyHexMesh vikthor OpenFOAM Meshing & Mesh Conversion 0 August 24, 2012 04:47


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