CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   Issues with creating "regions" for conjugate heat transfer problem!! (https://www.cfd-online.com/Forums/openfoam-pre-processing/152036-issues-creating-regions-conjugate-heat-transfer-problem.html)

vabishek April 22, 2015 11:25

Issues with creating "regions" for conjugate heat transfer problem!!
 
2 Attachment(s)
Dear OpenFOAMers,

I am relatively new to the world of OpenFOAM. I am currently working on a problem that involves conjugate heat transfer. I have attached two PDFs that show snapshots of the geometry I am dealing with. I have ONE fluid region and FOUR solid regions surrounding it. The material properties of the solid regions are same except that a heat source is applied to two of these regions. The momentum equations are solved in the fluid region, while the energy equation is solved in both the fluid and solid regions.

I created the regions using blockMesh. I have the following issues:

1. In the case of original_geo.pdf, the problem seems to be with the creation of defaultFaces at the interface of the fluid-solid regions i.e. Region 1- Region 3 , Region1-Region 2 and so on. This happens as the regions on either side cannot "see" the face b/w the regions and hence default patches are created. This is not ideal as I need the temperature at the interface to be coupled.

2. As a workaround, I split the fluid region into two regions as shown in "Modified_geo".pdf. However, in this case the velocity is not continuous b/w the two fluid regions. The temperature coupling works fine in this case, though.

I am not sure how to work around this issue. Any help/suggestion would be greatly appreciated.

Thanks!!

zhengzh5 April 22, 2015 18:58

Quote:

Originally Posted by vabishek (Post 543227)
Dear OpenFOAMers,

I am relatively new to the world of OpenFOAM. I am currently working on a problem that involves conjugate heat transfer. I have attached two PDFs that show snapshots of the geometry I am dealing with. I have ONE fluid region and FOUR solid regions surrounding it. The material properties of the solid regions are same except that a heat source is applied to two of these regions. The momentum equations are solved in the fluid region, while the energy equation is solved in both the fluid and solid regions.

I created the regions using blockMesh. I have the following issues:

1. In the case of original_geo.pdf, the problem seems to be with the creation of defaultFaces at the interface of the fluid-solid regions i.e. Region 1- Region 3 , Region1-Region 2 and so on. This happens as the regions on either side cannot "see" the face b/w the regions and hence default patches are created. This is not ideal as I need the temperature at the interface to be coupled.

2. As a workaround, I split the fluid region into two regions as shown in "Modified_geo".pdf. However, in this case the velocity is not continuous b/w the two fluid regions. The temperature coupling works fine in this case, though.

I am not sure how to work around this issue. Any help/suggestion would be greatly appreciated.

Thanks!!

i assume you used blockMesh-TopoSet-splitMeshRegion combination to create your 5-regions mesh.

in your blockMesh, create it as if there's 6 regions (basically what you did in the modified geometry), but then inside topoSet, make sure you combine the 2 fluid regions into one. This way, your fluid region will have 4 patches (one shared with each solid region). and patches will be defined properly between regions.

Have you tried that?

thiagopl April 23, 2015 07:54

Hi vabishek,

I think this tutorial will help you in creating your regions. It is the best tutorial on chtMultiRegion I've found.

Tutorial to set up a case for chtMultiRegionFoam in OpenFOAM 2.0.0

Regards,

vabishek April 23, 2015 09:07

3 Attachment(s)
Quote:

Originally Posted by zhengzh5 (Post 543284)
i assume you used blockMesh-TopoSet-splitMeshRegion combination to create your 5-regions mesh.

in your blockMesh, create it as if there's 6 regions (basically what you did in the modified geometry), but then inside topoSet, make sure you combine the 2 fluid regions into one. This way, your fluid region will have 4 patches (one shared with each solid region). and patches will be defined properly between regions.

Have you tried that?

Hello Jace,

Thanks for replying. Yes, I did try that but I was unsuccessful. It probably has to do with how I defined the regions in both blockMesh and toposetDict files. I have attached the files. I have a feeling that the way I define the regions in blockMesh is preventing me from creating the regions using topoSet. I have also attached a log file that contains the error I get when running splitMeshRegions after running blockMesh and topoSet.

vabishek April 23, 2015 09:10

Quote:

Originally Posted by thiagopl (Post 543388)
Hi vabishek,

I think this tutorial will help you in creating your regions. It is the best tutorial on chtMultiRegion I've found.

Tutorial to set up a case for chtMultiRegionFoam in OpenFOAM 2.0.0

Regards,

Hi Thiago,

Thanks for the link. I also think it is one of the best out of there. It was the first tutorials I went through when I started learning about CHT. I pretty much tried to follow it, but haven't had any luck.

zhengzh5 April 23, 2015 16:11

Quote:

Originally Posted by vabishek (Post 543397)
Hello Jace,

Thanks for replying. Yes, I did try that but I was unsuccessful. It probably has to do with how I defined the regions in both blockMesh and toposetDict files. I have attached the files. I have a feeling that the way I define the regions in blockMesh is preventing me from creating the regions using topoSet. I have also attached a log file that contains the error I get when running splitMeshRegions after running blockMesh and topoSet.

here's your solution:

blockMeshDict
Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.2.0                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 1;

vertices
(

  (-0.00259  0.0578 0.000279)  //0
  (-0.00114  0.0578 0.000279)  //1
  (-0.00114  0.069  0.000279)  //2
  (-0.0031  0.069  0.000279)  //3
  (0.00114  0.0578 0.000279)        //4
  (0.00114  0.069  0.000279)  //5
  (0.00259  0.0578 0.000279)  //6
  (0.0031  0.069  0.000279)    //7

  (0.00114  0.0578 0.000803)  //8
  (0.00259  0.0578 0.000803)  //9
  (0.0031  0.069  0.000803)  //10
  (0.00114  0.069  0.000803)  //11
  (-0.00259  0.0578 0.000803)  //12
  (-0.00114  0.0578 0.000803)  //13
  (-0.00114  0.069  0.000803)  //14
  (-0.0031  0.069  0.000803)  //15

  (-0.00114 0.0578 0.000889)  //16
  (0.00114  0.0578 0.000889)  //17
  (0.00114  0.069  0.000889)  //18
  (-0.00114 0.069  0.000889)  //19
  (-0.00259  0.0578 0.000889)  //20
  (-0.0031  0.069  0.000889)  //21
  (0.00259  0.0578 0.000889)  //22
  (0.0031  0.069  0.000889)  //23
);

blocks
(
    hex (13 8 11 14 16 17 18 19)  (30 30 30)    simpleGrading (1 1 1)
    hex (1 4 5 2 13 8 11 14)      (30 30 30)    simpleGrading (1 1 1)
    hex (12 13 14 15 20 16 19 21) (30 30 30)    simpleGrading (1 1 1)
    hex (8 9 10 11 17 22 23 18)  (30 30 30)    simpleGrading (1 1 1)
    hex (0 1 2 3 12 13 14 15)    (30 30 30)    simpleGrading (1 1 1)
    hex (4 6 7 5 8 9 10 11)      (30 30 30)    simpleGrading (1 1 1)
);

edges
(
);

boundary
(
  leftWall
  {
  type patch;
  faces
  (
    (0 12 15 3)
    (12 20 21 15)
  );
  }

  rightWall
  {
  type patch;
  faces
  (
    (6 9 10 7)
    (9 22 23 10)
  );
  }
 
 
  topWall
  {
  type patch;
  faces
  (
    //top
    (20 16 19 21)
    (16 17 18 19)
    (17 22 23 18)
  );
  }

  bottomWall
  {
  type patch;
  faces
  (
    (0 1 2 3)
    (1 4 5 2)
    (4 6 7 5)
  );
  }
  Inlet
  {
  type patch;
  faces
  (
    (0 1 13 12)
    (12 13 16 20)
    (1 4 8 13)
    (13 8 17 16)
    (4 6 9 8)
    (8 9 22 17)
   
  );
  }
 
  Outlet
  {
  type patch;
  faces
  (
    (15 14 2 3)
    (21 19 14 15)
    (14 11 5 2)
    (19 18 11 14)
    (11 10 7 5)
    (18 23 10 11)
       
  );
  }
);

mergeMatchPairs();
mergePatchPairs();
// ************************************************************************* //

topoSetDict

Code:

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

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

actions
(
    // Heater
    {
        name    block1;
        type    cellSet;
        action  new;
        source  boxToCell;
        sourceInfo
        {
            box (-0.00114 0.0578 0.000803 )(0.00114 0.069 0.000889);
        }
    }
    {
        name    block1;
        type    cellSet;
        action  add;
        source  boxToCell;
        sourceInfo
        {
            box (-0.00114 0.0578 0.000279)(0.00114 0.069 0.000803);
        }
    }
    {
        name    block1;
        type    cellZoneSet;
        action  new;
        source  setToCellZone;
        sourceInfo
        {
            set block1;          // name of cellSet
        }
    }

    // leftSolid
    {
        name    block2;
        type    cellSet;
        action  new;
        source  boxToCell;
        sourceInfo
        {
            box (-0.0031 0.0578 0.000803 )(-0.00114 0.069 0.000889);
        }
    }
    {
        name    block2;
        type    cellZoneSet;
        action  new;
        source  setToCellZone;
        sourceInfo
        {
            set block2;
        }
    }

    // rightSolid
    {
        name    block3;
        type    cellSet;
        action  new;
        source  boxToCell;
        sourceInfo
        {
            box (0.00114 0.0578 0.000803 )(0.0031 0.069 0.000889);
        }
    }
    {
        name    block3;
        type    cellZoneSet;
        action  new;
        source  setToCellZone;
        sourceInfo
        {
            set block3;
        }
    }

    // topAir
    {
        name    block4;
        type    cellSet;
        action  new;
        source  boxToCell;
        sourceInfo
        {
          box (-0.0031 0.0578 0.000279 )(-0.00114 0.069 0.000803);
        }
    }
    {
        name    block4;
        type    cellZoneSet;
        action  new;
        source  setToCellZone;
        sourceInfo
        {
            set block4;
        }
    }


    // bottomWater is all the other cells
    {
        name    block5;
        type    cellZoneSet;
        action  clear;
    }
    {
        name    block5;
        type    cellSet;
        action  add;
        source  cellToCell;
        sourceInfo
        {
            set block1;
        }
    }
    {
        name    block5;
        type    cellSet;
        action  add;
        source  cellToCell;
        sourceInfo
        {
            set block2;
        }
    }
    {
        name    block5;
        type    cellSet;
        action  add;
        source  cellToCell;
        sourceInfo
        {
            set block3;
        }
    }
    {
        name    block5;
        type    cellSet;
        action  add;
        source  cellToCell;
        sourceInfo
        {
            set block4;
        }
    }
    {
        name    block5;
        type    cellSet;
        action  invert;
    }
    {
        name    block5;
        type    cellZoneSet;
        action  new;
        source  setToCellZone;
        sourceInfo
        {
            set block5;
        }
    }
);

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

then run the following commands:

blockMesh
topoSet
splitMeshRegions -cellZones -overwrite
paraFoam -touchAll

and view with paraview.

Good luck.

vabishek April 23, 2015 16:23

Quote:

Originally Posted by zhengzh5 (Post 543455)
here's your solution:

blockMeshDict
Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.2.0                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 1;

vertices
(

  (-0.00259  0.0578 0.000279)  //0
  (-0.00114  0.0578 0.000279)  //1
  (-0.00114  0.069  0.000279)  //2
  (-0.0031  0.069  0.000279)  //3
  (0.00114  0.0578 0.000279)    //4
  (0.00114  0.069  0.000279)  //5
  (0.00259  0.0578 0.000279)  //6
  (0.0031  0.069  0.000279)    //7

  (0.00114  0.0578 0.000803)  //8
  (0.00259  0.0578 0.000803)  //9
  (0.0031  0.069  0.000803)  //10
  (0.00114  0.069  0.000803)  //11
  (-0.00259  0.0578 0.000803)  //12
  (-0.00114  0.0578 0.000803)  //13
  (-0.00114  0.069  0.000803)  //14
  (-0.0031  0.069  0.000803)  //15

  (-0.00114 0.0578 0.000889)  //16
  (0.00114  0.0578 0.000889)  //17
  (0.00114  0.069  0.000889)  //18
  (-0.00114 0.069  0.000889)  //19
  (-0.00259  0.0578 0.000889)  //20
  (-0.0031  0.069  0.000889)  //21
  (0.00259  0.0578 0.000889)  //22
  (0.0031  0.069  0.000889)  //23
);

blocks
(
    hex (13 8 11 14 16 17 18 19)  (30 30 30)    simpleGrading (1 1 1)
    hex (1 4 5 2 13 8 11 14)      (30 30 30)    simpleGrading (1 1 1)
    hex (12 13 14 15 20 16 19 21) (30 30 30)    simpleGrading (1 1 1)
    hex (8 9 10 11 17 22 23 18)  (30 30 30)    simpleGrading (1 1 1)
    hex (0 1 2 3 12 13 14 15)    (30 30 30)    simpleGrading (1 1 1)
    hex (4 6 7 5 8 9 10 11)      (30 30 30)    simpleGrading (1 1 1)
);

edges
(
);

boundary
(
  leftWall
  {
  type patch;
  faces
  (
    (0 12 15 3)
    (12 20 21 15)
  );
  }

  rightWall
  {
  type patch;
  faces
  (
    (6 9 10 7)
    (9 22 23 10)
  );
  }
 
 
  topWall
  {
  type patch;
  faces
  (
    //top
    (20 16 19 21)
    (16 17 18 19)
    (17 22 23 18)
  );
  }

  bottomWall
  {
  type patch;
  faces
  (
    (0 1 2 3)
    (1 4 5 2)
    (4 6 7 5)
  );
  }
  Inlet
  {
  type patch;
  faces
  (
    (0 1 13 12)
    (12 13 16 20)
    (1 4 8 13)
    (13 8 17 16)
    (4 6 9 8)
    (8 9 22 17)
   
  );
  }
 
  Outlet
  {
  type patch;
  faces
  (
    (15 14 2 3)
    (21 19 14 15)
    (14 11 5 2)
    (19 18 11 14)
    (11 10 7 5)
    (18 23 10 11)
       
  );
  }
);

mergeMatchPairs();
mergePatchPairs();
// ************************************************************************* //

topoSetDict

Code:

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

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

actions
(
    // Heater
    {
        name    block1;
        type    cellSet;
        action  new;
        source  boxToCell;
        sourceInfo
        {
            box (-0.00114 0.0578 0.000803 )(0.00114 0.069 0.000889);
        }
    }
    {
        name    block1;
        type    cellSet;
        action  add;
        source  boxToCell;
        sourceInfo
        {
            box (-0.00114 0.0578 0.000279)(0.00114 0.069 0.000803);
        }
    }
    {
        name    block1;
        type    cellZoneSet;
        action  new;
        source  setToCellZone;
        sourceInfo
        {
            set block1;          // name of cellSet
        }
    }

    // leftSolid
    {
        name    block2;
        type    cellSet;
        action  new;
        source  boxToCell;
        sourceInfo
        {
            box (-0.0031 0.0578 0.000803 )(-0.00114 0.069 0.000889);
        }
    }
    {
        name    block2;
        type    cellZoneSet;
        action  new;
        source  setToCellZone;
        sourceInfo
        {
            set block2;
        }
    }

    // rightSolid
    {
        name    block3;
        type    cellSet;
        action  new;
        source  boxToCell;
        sourceInfo
        {
            box (0.00114 0.0578 0.000803 )(0.0031 0.069 0.000889);
        }
    }
    {
        name    block3;
        type    cellZoneSet;
        action  new;
        source  setToCellZone;
        sourceInfo
        {
            set block3;
        }
    }

    // topAir
    {
        name    block4;
        type    cellSet;
        action  new;
        source  boxToCell;
        sourceInfo
        {
      box (-0.0031 0.0578 0.000279 )(-0.00114 0.069 0.000803);
        }
    }
    {
        name    block4;
        type    cellZoneSet;
        action  new;
        source  setToCellZone;
        sourceInfo
        {
            set block4;
        }
    }


    // bottomWater is all the other cells
    {
        name    block5;
        type    cellZoneSet;
        action  clear;
    }
    {
        name    block5;
        type    cellSet;
        action  add;
        source  cellToCell;
        sourceInfo
        {
            set block1;
        }
    }
    {
        name    block5;
        type    cellSet;
        action  add;
        source  cellToCell;
        sourceInfo
        {
            set block2;
        }
    }
    {
        name    block5;
        type    cellSet;
        action  add;
        source  cellToCell;
        sourceInfo
        {
            set block3;
        }
    }
    {
        name    block5;
        type    cellSet;
        action  add;
        source  cellToCell;
        sourceInfo
        {
            set block4;
        }
    }
    {
        name    block5;
        type    cellSet;
        action  invert;
    }
    {
        name    block5;
        type    cellZoneSet;
        action  new;
        source  setToCellZone;
        sourceInfo
        {
            set block5;
        }
    }
);

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

then run the following commands:

blockMesh
topoSet
splitMeshRegions -cellZones -overwrite
paraFoam -touchAll

and view with paraview.

Good luck.

Thanks a lot, Jace. Works like a charm.


All times are GMT -4. The time now is 09:10.