CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   How to couple regions (http://www.cfd-online.com/Forums/openfoam-solving/108927-how-couple-regions.html)

Koga November 5, 2012 06:45

How to couple regions
 
1 Attachment(s)
I defined two regions, a tiny and a big one. Both meshed with tetrahedrons.

We assume that one region is hot and one region is cold. I want to simulate the heat transfer between these regions. For that I use the chtMultiRegionSimpleFoam solver.

Now I am trying to couple the two patches, which are on the same plane.
I did it the same way like they did it in the 'heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater' tutorial.
I changed the boundary type of the two connected patches from patch to mappedWall (and added sampleMode, offset and all other necessary settings) in 'constant/{regionname}/boundary'. Furthermore I changed the initial condition type from 'zeroGradient' to 'compressible::turbulentTemperatureCoupledBaffleMi xed' and all necessary settings.

If I try to simulate this case, I will get this error message:
'Did not find sample (29.90284 38.34374 49) on any processor of region Solid2'

Solid2 is the tiny region. It might be a problem with the defined offset, but I can't imagine why. The offset is always set to (0 0 0), because both connected patches are on the same plane. Am I wrong? Or is there another reason for this error?

Koga November 7, 2012 05:11

I found a solution. The problem was that both connected patches must have the same size. So I created another patch on top of the big box that fits to the bottom patch of the tiny box. I used the following createPatchDict:

Code:

pointSync false;

patches
(
    {

        name test_patch;

        patchInfo
        {
            type patch;
        }

        set test_set;
    }
);

The faceSet 'test_set' is defined in my TopoSetDict:

Code:

actions
(
    {
        name    test;
        type    faceSet;
        action  new;
        source  boxToFace;
        sourceInfo
        {
            box (45 45 49.99) (55 55 50.01);
        }
    }
);

The definition of the faceSet is my next problem. For this simple geometry everything is fine. But I am working with a more complex geometry and the box-command doesn't fit for patches that have many curves.

Just imagine there is a very complex domain (but still tiny) instead of the tiny box. How can I get all the faces, that are connected with the bottom patch of the complex domain, from the top patch of the big box in this case?


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