CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [mesh manipulation] splitMeshRegions doesn't split patches sufficient (https://www.cfd-online.com/Forums/openfoam-meshing/242404-splitmeshregions-doesnt-split-patches-sufficient.html)

Hr_kules April 20, 2022 04:04

splitMeshRegions doesn't split patches sufficient
 
Hey everyone!

i am meshing a region made out of two fluid bodies and a solid region. The meshing is done with stl imports and snappyHexMesh.
I am in generall quite happy with the result, however after splitting the mesh. The patches are not correctly added to the regions and the patches, that surround the regions and are not part of the interfaces still show up in the neighbouring regions.
The number of faces is quite low, so i think something is not as precise set as it should be.

Considering the fact the the regions interfere with each other, an approach with topoSet and boxToCell proved to be wrong.
I also varied the tolerance of the snapping process with no real progress.

Any help/hints are greatly appreciated!

Yann April 20, 2022 08:18

Hi Nico,

It would help if you could provide more information about your problem: screenshot showing the issue, OpenFOAM version you are using, a short description of your meshing process and the related files (snappyHexMeshDict, topoSetDict, etc...)

Yann

Kummi April 20, 2022 09:31

Hello
Unless you give complete information, it's gonna be hard to guide you. Give details regarding your fluid solid domains, and how you implemented toposet and splitMeshRegions.

Firstly in your primary approach, give a try with ordinary mesh with toposet and splitMeshRegions, and check your expected outcomes. Then shift to snappyHexaMesh.

Thank you

Hr_kules April 21, 2022 08:26

2 Attachment(s)
Hey guys,


so the general meshing process is build my background mesh with blockMesh.
From my stls i create the edge meshes, before using snappyhexmesh. The files are attached. After running snappyHexMesh i split the mesh with "splitMeshRegions -cellZones -defaultRegionName plate -overwrite >> meshLog"
The log is also attached, after investigating the log i noticed that its blown up with warnings i fail to interpret further. However i can procude a mesh. An example of the mesh is also attached, i know the quailty at this point is a bit problematic as i tuned down the refinement to provide you faster with information regarding my problem. Interestingly the error persists with reducing the refinement.



If further information is required to assists, i will provide it as fast as possible. And as always, thank you very much!


Edit: i wasn't able to attach the log as following warning repeated so much that the file size exceeds the limit for attachments by far.
Code:

--> FOAM Warning :
    From function static Foam::vectorField Foam::snappySnapDriver::calcNearestSurface(const Foam::meshRefinement&, const scalarField&, const indirectPrimitivePatch&, Foam::pointField&, Foam::vectorField&)
    in file snappyHexMeshDriver/snappySnapDriver.C at line 1641
    For point:252 coordinate:(43.4922 240.102 -3.28134) did not find any surface within:0.0523438 metre.


Hr_kules April 26, 2022 07:04

1 Attachment(s)
Hey, just as a follow up, i have now tried every possible setting on snappyhexmesh, i just cant seem to get all the cellzones in the right region...


I have tried to boil down my problem to a more simple geometry. Still the problem persists. The complete case is attached.


The meshing is done in following manner:
- surfacefeatures
- blockmesh
- snappyhexmesh -overwrite
- splitMeshRegions -cellZones -defaultRegionName solid -overwrite


after this is done, the boundary file for the fluid looks as following:
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;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

5
(
    inletcold
    {
        type            patch;
        nFaces          2670;
        startFace      563642;
    }
    outletcold
    {
        type            patch;
        nFaces          2495;
        startFace      566312;
    }
    wallfluidcold
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          37179;
        startFace      568807;
    }
    wallsolid
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          2;
        startFace      605986;
    }
    fluidcold_to_solid
    {
        type            mappedWall;
        inGroups        List<word> 1(wall);
        nFaces          33760;
        startFace      605988;
        sampleMode      nearestPatchFace;
        sampleRegion    solid;
        samplePatch    solid_to_fluidcold;
    }
)

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

considering it is the boundary for the fluid, i have no idea why the wallsolid patch appears. There seems to be a stupid or completely fundamental error.

Anyways, i hope someone can help, i am starting to get frustrated


All times are GMT -4. The time now is 00:39.