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

[mesh manipulation] Merging meshes for chtMultiRegionFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 29, 2022, 06:04
Default Merging meshes for chtMultiRegionFoam
  #1
Senior Member
 
Nico
Join Date: Jan 2022
Location: Germany
Posts: 122
Rep Power: 6
Hr_kules is on a distinguished road
Hey guys, for a multi region simulation i want to couple two (then three) seperate generated meshes. I am somewhat familiar with merging meshes, but i am unsure considering the interfaces.
For the first test i want to couple a solid and a fluid thermaly along a surface with the exact same geometric values. (same length and width and same geometric features).
After meshing both of them, with same refinement levels in for each snappyhex run, i am sitting on two times the surface, but with different amount of faces:
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/polyMesh";
    object      boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

3
(
    lowerInterface
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          1972883;
        startFace       23702955;
    }
    upperInterface
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          1976846;
        startFace       25675838;
    }
    wallplate
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          69265;
        startFace       27652684;
    }
)

// ************************************************************************* //
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/polyMesh";
    object      boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

4
(
    Inlethot
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          10254;
        startFace       19818519;
    }
    Outlethot
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          10242;
        startFace       19828773;
    }
    wallfluidhot
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          1156425;
        startFace       19839015;
    }
    upperInterface
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          1642604;
        startFace       20995440;
    }
)

// ************************************************************************* //
My question is now how to couple the boundary upperInterface thermaly so that i can use the boundary condition of following type:
Code:
    fluid_to_plate 
    {
        type            compressible::turbulentTemperatureCoupledBaffleMixed;
        value           $internalField;
        Tnbr            T;
    }
Generally i'd have no problem with changing the patches with a createPatchDict to mapped walls, however i am uncertain if that would lead to accurate solutions. I have no idea wether a mapped wall uses any kind of interpolation between the patches and wether chtMultiRegionFoam accepts non conforming interfaces, so I need an idea how to prepare the patches to get a nice simulation.



Any help is greatly appreciated!



Kind regards!

Last edited by Hr_kules; July 29, 2022 at 06:57. Reason: additional information
Hr_kules is offline   Reply With Quote

Old   July 29, 2022, 09:32
Default
  #2
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,080
Rep Power: 26
Yann will become famous soon enough
Hi Nico,

Let's start with the most basic question: why do you want to use mergeMeshes for a CHT case? chtMultiRegionFoam use separate meshes for each region, this is why we use splitMeshRegions which is pretty much the opposite of mergeMeshes.

Regarding the interfaces coupling, mappedWall can work with non-conformal interfaces thanks to AMI. But it must be handled with care since the interpolation can lead to energy conservation issues, which is obviously something we would like to avoid when working with heat transfer.

I don't have the exact method in mind to create the interfaces, but you should have a look to utilities such as changeDictionary, createPatch.
The mappedWall definition should look like this: Non-conformal coupling interfaces in chtMultiRegionFoam

The thread is pretty old and I don't think there is any tutorial demonstrating this kind of stuff so you might have to dig deeper, but it should be a good starting point.

My first thought is that this must be doable without merging the meshes, maybe another way would be to merge, deal with the interfaces, then split the meshes but it sounds a bit unnecessary to me.

I hope this helps!
Yann
Yann is offline   Reply With Quote

Old   July 29, 2022, 09:40
Default
  #3
Senior Member
 
Nico
Join Date: Jan 2022
Location: Germany
Posts: 122
Rep Power: 6
Hr_kules is on a distinguished road
Hi Yann,

i want to merge meshes of each region since the behaviour (as we discussed in a another post) doesn't seems really reliable. I made some "progress" with meshing each region and then splitting the meshes, delivering the wanted boundaries in each region. For the interface i wanted to (like you mentioned) use the createpatch dictionary. I have only concerns regarding the handling of data between the interfaces.

But the link to the thread seems quite what i am looking for, i will dig deeper and try to make the best out of it!

Thank you, as always, for your help!
Hr_kules is offline   Reply With Quote

Old   July 30, 2022, 13:15
Default mergeMeshes
  #4
New Member
 
Join Date: Aug 2019
Posts: 19
Rep Power: 6
Didu is on a distinguished road
Dear foamers,
I have been working in blockMesh on two simple meshes (two cylinders), I intend to join with an overlap as a T-junction (90º degree angle). mergeMeshes command only joins the two meshes however the overlapped part is still there including the walls. Is there a command to remove the overlapped cells or to combine two meshes from blockMesh?
Many thanks,
Didu
Didu 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
[mesh manipulation] Merging meshes for chtMultiRegionFoam Hr_kules OpenFOAM Meshing & Mesh Conversion 0 May 12, 2022 08:00
[ICEM] Merging of 3d meshes Ali3031 ANSYS Meshing & Geometry 1 November 4, 2014 10:54
[ICEM] Merging Hexa Meshes in ICEM screech1987 ANSYS Meshing & Geometry 11 March 13, 2014 11:45
merging meshes amirr OpenFOAM Running, Solving & CFD 2 July 23, 2012 09:30
Merging Meshes Matteo Giacobello. FLUENT 1 February 16, 2000 09:22


All times are GMT -4. The time now is 15:28.