CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Coupling patches in chtMultiRegionSimpleFoam (https://www.cfd-online.com/Forums/openfoam-solving/172293-coupling-patches-chtmultiregionsimplefoam.html)

Nkl May 27, 2016 13:23

Coupling patches in chtMultiRegionSimpleFoam
 
Hello to everyone!

I am running a case with chtMultiRegionSimpleFoam in which i have 4 different regions: 3 are solid and 1 is fluid.
I've created a mesh for each region separately - each region has its own polyMesh - and generated the meshes by means of blockMesh -region.

I've assigned a compressible::turbulentHeatFluxTemperature boundary condition on the external wall of a solid region - which is a boundary patch - and now i am wandering what should i assign to the internal wall of the same region and to the corresponding patch of the fluid region (the 2 patches that sould be coupled).
I see that i cannot use compressible::turbulentTemperatureCoupledBaffleMix ed since it requires mapping - i went through the planeWall2D tutorial, but as i said i generated 4 different meshes instead of mapping one.

What should i assign to the fluid/solid patches in the 0/T file?

Thanks in advance!

Nkl May 31, 2016 05:59

No one can help?

flanel1988 May 31, 2016 09:06

Hey! First of all: What OF-Version do you use? I had similar problems in the past, but then I detected gmsh and I created one big mesh with all regions. I assigned all relevant patches to physical surfaces; except for the boundary patches. If you assign physical volumes, in OF with
Code:

splitMeshRegions -cellZones -overwrite
the program detects the boundaries by itself and adds patches like solid1_to_solid2 or something like that.

Nkl May 31, 2016 09:11

Hi! I use the 3.0.1 version.
I know there is that possibility, but since i already modelled the different regions i wanted to figure out if there is a possibility of coupling the patches in another way.

flanel1988 May 31, 2016 10:43

But i do not understand, why you cannot use
Code:

compressible::turbulentTemperatureCoupledBaffleMix  ed

Nkl May 31, 2016 10:48

I've tried to apply that patch to both the solid and fluid region as in the planeWall2D case, but i receive the following error:

Code:

--> FOAM FATAL ERROR:

    patch type 'wall' not type 'mappedPatchBase'


Antimony May 31, 2016 11:09

Hi,

This error means that in the boundary file under constant/polyMesh, the highlighted patch has been specified as 'wall', while the compressible::turbulentTemperatureBaffleMixed is only available (again from the error message) if the type is 'mappedPatchBase'.

So change the type to 'mappedPatchBase' in the boundary file and at the very least, this error message will be removed.

Hope this helps.

Cheers,
Antimony

Nkl May 31, 2016 11:25

Hello and thanks for the suggestion. Unfortunately it is the first thing i did but then i receive the following error:

Code:

--> FOAM FATAL ERROR:

    patch type 'genericPatch' not type 'mappedPatchBase'
    for patch walls of field T in file "/home/nikola/OpenFOAM/nikola-3.0.1/PhD/receiverMultiRegion4/0/moltenSalt/T"

I supposed that i cannot use compressible::turbulentTemperatureCoupledBaffleMix ed when different regions have a separate mesh. Any suggestions about this error?

flanel1988 June 1, 2016 03:30

Do you have different Meshes in your constant/ folder? So chance the "mapped" in the constant/meshXX/boundary to "mappedWall". This has to be done for all meshes involved!

Nkl June 8, 2016 06:48

Sorry for the late answer.

I tried to change to mappedWall in the various constant/regionX/polyMesh/boundary files, but now I receive the following error:

Code:

--> FOAM FATAL IO ERROR:
keyword sampleMode is undefined in dictionary ".walls"

file: .walls from line 34 to line 37.

Should I map the fields using the mapFields utility?

Nkl June 21, 2016 11:42

Some one can help please?

Struggle_Achieve July 12, 2016 03:50

Same issue
 
Hello Nikola,
I also created a very complex geometry of a ladle which is used in Steel operations.
I already made different regions using blockMesh. Then I saw the plane2D wall case example for chtMultiRegionSimpleFoam. Then I tried to modify my mesh files so the format matches with the example. But when I run this case I too get the same error:

patch type 'genericPatch' not type 'mappedPatchBase'

in the T file for the mappedWall zone1_to_zone2. I used

type compressible::turbulentTemperatureCoupledBaffleMix ed;
Tnbr T;
kappa fluidThermo;
kappaName none;
value uniform 1873;

for the same.

I am clueless. One possible solution I can think is to recreate the whole geometry using snappyhex and let splitMeshRegions -cellZones -owerwrite define all the boundaries between the different regions. ie (zone0_to_zone1, etc)

Any help would be greatly appreciated!

Thanks and regards,
Singh.

Bloerb July 15, 2016 14:47

The answer has already been given. Change your patch type in all constant/meshXX/boundary files from wall to mappedWall.

As for Nkl issue. Here is an example from the tutorials:

Code:

bottomAir_to_leftSolid
{
    type            mappedWall;
    nFaces          130;
    startFace      4680;
    sampleMode      nearestPatchFace;
    sampleRegion    leftSolid;
    samplePatch    leftSolid_to_bottomAir;
}

You have to set this accordingly. The sample region is the neighbour region and the samplePatch the neighboring patch to this one. You need to add these lines since you meshed with different meshes instead of splitting one mesh into different domains. The splitmeshregions command automatically adds these lines. For many industrial applications meshing your domains separately is of course more convenient.

Struggle_Achieve July 19, 2016 02:24

Problem still persists
 
Quote:

Originally Posted by Bloerb (Post 609720)
The answer has already been given. Change your patch type in all constant/meshXX/boundary files from wall to mappedWall.

As for Nkl issue. Here is an example from the tutorials:

Code:

bottomAir_to_leftSolid
{
    type            mappedWall;
    nFaces          130;
    startFace      4680;
    sampleMode      nearestPatchFace;
    sampleRegion    leftSolid;
    samplePatch    leftSolid_to_bottomAir;
}

You have to set this accordingly. The sample region is the neighbour region and the samplePatch the neighboring patch to this one. You need to add these lines since you meshed with different meshes instead of splitting one mesh into different domains. The splitmeshregions command automatically adds these lines. For many industrial applications meshing your domains separately is of course more convenient.

Hello Bloerb,
First of all my gratitude for your answer.
Yes I have already modified the wall type to mappedWall; I have tried a number of things here but still same error appears.

I have used a format like this for all the boundaries:
Code:

domain1_to_domain0
    {
        type            mappedwall;
        inGroups        1(wall);
        nFaces          4000;
        startFace      236000;
    sampleMode      nearestPatchFace;
        sampleRegion    domain0;
        samplePatch    domain0_to_domain1;
    }

I am certainly new to openFOAM and I guess I must be wrong somewhere.
I would be very grateful if you may please point that out.

I have also posted the whole problem, it might be useful to understand the whole case.
Please take a look:
http://www.cfd-online.com/Forums/ope...blockmesh.html

My deepest thanks and regards,
Prateek Singh.

bineet_aero November 9, 2020 05:37

Quote:

Originally Posted by Bloerb (Post 609720)
The answer has already been given. Change your patch type in all constant/meshXX/boundary files from wall to mappedWall.

As for Nkl issue. Here is an example from the tutorials:

Code:

bottomAir_to_leftSolid
{
    type            mappedWall;
    nFaces          130;
    startFace      4680;
    sampleMode      nearestPatchFace;
    sampleRegion    leftSolid;
    samplePatch    leftSolid_to_bottomAir;
}

You have to set this accordingly. The sample region is the neighbour region and the samplePatch the neighboring patch to this one. You need to add these lines since you meshed with different meshes instead of splitting one mesh into different domains. The splitmeshregions command automatically adds these lines. For many industrial applications meshing your domains separately is of course more convenient.


Thanks a lot. Will it be possible to use the Y+utility to find yplus values for solid walls in contact with fluid in conjugate heat transfer problems (for the mappedWalls) ?for example chtMultiRegionSimpleFoam cases etc ?

thanks

bineet_aero November 9, 2020 06:14

Quote:

Originally Posted by Nkl (Post 602153)
Hello to everyone!

I am running a case with chtMultiRegionSimpleFoam in which i have 4 different regions: 3 are solid and 1 is fluid.
I've created a mesh for each region separately - each region has its own polyMesh - and generated the meshes by means of blockMesh -region.

I've assigned a compressible::turbulentHeatFluxTemperature boundary condition on the external wall of a solid region - which is a boundary patch - and now i am wandering what should i assign to the internal wall of the same region and to the corresponding patch of the fluid region (the 2 patches that sould be coupled).
I see that i cannot use compressible::turbulentTemperatureCoupledBaffleMix ed since it requires mapping - i went through the planeWall2D tutorial, but as i said i generated 4 different meshes instead of mapping one.

What should i assign to the fluid/solid patches in the 0/T file?

Thanks in advance!

Hii thanks a lot. How did you create mesh for each region separately ? blockMesh region solid1 something like this ?

thanks

JesusJoker November 2, 2021 08:43

mappedWall;

Henrinavier May 19, 2023 09:23

First of all: Super helpful thread and thanks to those responding! However, I have a follow-up question:

Is it possible to map patch a from region A to multiple patches 1, 2, 3 in region B or do I have to always create perfectly matching patches in both regions?

Best, Henrinavier


All times are GMT -4. The time now is 17:20.