CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

mappedPatchBase error in chtMultiRegionFoam

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By alexvaleije

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 19, 2019, 15:59
Default mappedPatchBase error in chtMultiRegionFoam
  #1
Member
 
Emre
Join Date: Nov 2015
Location: Izmir, Turkey
Posts: 97
Rep Power: 10
ordinary is on a distinguished road
Hello,

I have a simple case which consists of solid and fluid regions. I imported mesh via fluent3DMeshToFoam. Then, I treated it via splitMeshRegions -cellZones -overwrite. It looks like this:
mesh.png

I set all boundary conditions similar to multiRegionFoam tutorial. chtMultiRegionFoam gives me error:
Code:
Create time
Create fluid mesh for region fluid for time = 0
Create solid mesh for region solid for time = 0
*** Reading fluid mesh thermophysical properties for region fluid
    Adding to thermoFluid

Selecting thermodynamics package 
{
    type            heRhoThermo;
    mixture         pureMixture;
    transport       const;
    thermo          hConst;
    equationOfState rhoConst;
    specie          specie;
    energy          sensibleEnthalpy;
}

--> FOAM FATAL ERROR: 
' not type 'mappedPatchBase'
    for patch wall-fluid-solid of field T in file "/home/emre/isidegistirici/0/fluid/T"
    From function Foam::compressible::turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::turbulentTemperatureCoupledBaffleMixedFvPatchScalarField(const Foam::fvPatch&, const Foam::DimensionedField<double, Foam::volMesh>&, const Foam::dictionary&)
    in file turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C at line 96.
FOAM exiting
I fixed my boundary conditions according to this: Coupling patches in chtMultiRegionSimpleFoam .
Here is what my case look like:
Code:
.
 ├── 0
│   ├── cellToRegion
│   ├── fluid
│   │   ├── alphat
│   │   ├── cellToRegion
│   │   ├── epsilon
│   │   ├── k
│   │   ├── p
│   │   ├── p_rgh
│   │   ├── T
│   │   └── U
│   └── solid
│       ├── cellToRegion
│       ├── p
│       └── T
├── constant
│   ├── cellToRegion
│   ├── fluid
│   │   ├── g
│   │   ├── polyMesh
│   │   ├── radiationProperties
│   │   ├── thermophysicalProperties
│   │   └── turbulenceProperties
│   ├── polyMesh
│   │   ├── boundary
│   │   ├── cellZones
│   │   ├── faces
│   │   ├── faceZones
│   │   ├── neighbour
│   │   ├── owner
│   │   ├── points
│   │   ├── pointZones
│   │   └── sets
│   ├── regionProperties
│   └── solid
│       ├── polyMesh
│       ├── radiationProperties
│       └── thermophysicalProperties
└── system
    ├── controlDict
    ├── decomposeParDict
    ├── fluid
    │   ├── fvSchemes
    │   └── fvSolution
    ├── fvSchemes
    ├── fvSolution
    ├── solid
    │   ├── fvSchemes
    │   └── fvSolution
    └── topoSetDict
The FOAM FATAL ERROR still says there is a problem in 0/fluid/T. Here is my T dictionary:
Code:
dimensions      [ 0 0 0 1 0 0 0 ];

internalField   uniform 300;

boundaryField
{
    #includeEtc "caseDicts/setConstraintTypes"

    inlet
    {
        type            fixedValue;
        value           $internalField;
    }
    outlet
    {
        type            inletOutlet;
        value           $internalField;
        inletValue      $internalField;
    }
    wall-fluid
    {
        type            zeroGradient;
        value           $internalField;
    }
    wall-fluid.1
    {
        type            zeroGradient;
        value           $internalField;
    }
    wall-fluid-solid
    {
        type            compressible::turbulentTemperatureCoupledBaffleMixed;
        value           $internalField;
        Tnbr            T;
        kappaMethod     fluidThermo;
    }
}
And finally here is my constant/polyMesh/boundary file:
Code:
6
(
    wall-fluid-solid
    {
        type            mappedPatchBase; /*This was 'wall' before*/
        inGroups        1(wall);
        nFaces          12800;
        startFace       1320000;
    }
    wall-fluid
    {
        type            wall;
        inGroups        1(wall);
        nFaces          6400;
        startFace       1332800;
    }
    inlet
    {
        type            patch;
        nFaces          3200;
        startFace       1339200;
    }
    outlet
    {
        type            patch;
        nFaces          3200;
        startFace       1342400;
    }
    wall-fluid.1
    {
        type            wall;
        inGroups        1(wall);
        nFaces          6400;
        startFace       1345600;
    }
    wall-solid
    {
        type            wall;
        inGroups        1(wall);
        nFaces          16000;
        startFace       1352000;
    }
)
And my checkMesh report is also here:
Code:
Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
    points:           465831
    faces:            1368000
    internal faces:   1320000
    cells:            448000
    faces per cell:   6
    boundary patches: 6
    point zones:      0
    face zones:       2
    cell zones:       2

Overall number of cells of each type:
    hexahedra:     448000
    prisms:        0
    wedges:        0
    pyramids:      0
    tet wedges:    0
    tetrahedra:    0
    polyhedra:     0

Checking topology...
    Boundary definition OK.
    Cell to face addressing OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.
   *Number of regions: 2
    The mesh has multiple regions which are not connected by any face.
  <<Writing region information to "0/cellToRegion"
  <<Writing region 0 with 256000 cells to cellSet region0
  <<Writing region 1 with 192000 cells to cellSet region1

Checking patch topology for multiply connected surfaces...
    Patch               Faces    Points   Surface topology                  
    wall-fluid-solid    12800    6561     multiply connected (shared edge)  
    wall-fluid          6400     6561     ok (non-closed singly connected)  
    inlet               3200     3321     ok (non-closed singly connected)  
    outlet              3200     3321     ok (non-closed singly connected)  
    wall-fluid.1        6400     6642     ok (non-closed singly connected)  
    wall-solid          16000    16161    ok (non-closed singly connected)  
  <<Writing 6557 conflicting points to set nonManifoldPoints

Checking geometry...
    Overall domain bounding box (0 0 -0.05) (0.3 0.3 0.05)
    Mesh has 3 geometric (non-empty/wedge) directions (1 1 1)
    Mesh has 3 solution (non-empty) directions (1 1 1)
    Boundary openness (2.8154493e-16 1.8634725e-18 8.6962049e-18) OK.
    Max cell openness = 1.4054537e-16 OK.
    Max aspect ratio = 5.4752516 OK.
    Minimum face area = 2.5683751e-06. Maximum face area = 1.40625e-05.  Face area magnitudes OK.
    Min volume = 9.6314067e-09. Max volume = 4.3090779e-08.  Total volume = 0.009.  Cell volumes OK.
    Mesh non-orthogonality Max: 0 average: 0
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 1.1832852e-13 OK.
    Coupled point location match (average 0) OK.

Mesh OK.

End
If you have any idea, please don't hesitate.

Best regards
ordinary

Last edited by ordinary; April 19, 2019 at 17:33.
ordinary is offline   Reply With Quote

Old   June 20, 2022, 12:55
Default
  #2
Member
 
Alejandro Valeije
Join Date: Nov 2014
Location: Spain
Posts: 51
Rep Power: 11
alexvaleije is on a distinguished road
Hi,

I know this is pretty old and I don't know if you ever got to figure it out how to solve this problem, but I'm answering just in case someone ever need the answer.

The thing is that "fluent3DMeshToFoam" is unable to properly convert the interface/wall between a volume marked as fluid and another marked as solid in Fluent Meshing. The solution is marking all the volumes as "fluid", and then, after the "splitMeshRegions" operation is done, new boundaries will be created, that should be used as the interface between fluid and solid.

Hope this would help anyone. Regards,

Alex
Tava likes this.
alexvaleije is offline   Reply With Quote

Old   September 7, 2022, 06:52
Default
  #3
New Member
 
Join Date: Sep 2022
Posts: 3
Rep Power: 3
Tava is on a distinguished road
Quote:
Originally Posted by alexvaleije View Post
Hi,

I know this is pretty old and I don't know if you ever got to figure it out how to solve this problem, but I'm answering just in case someone ever need the answer.

The thing is that "fluent3DMeshToFoam" is unable to properly convert the interface/wall between a volume marked as fluid and another marked as solid in Fluent Meshing. The solution is marking all the volumes as "fluid", and then, after the "splitMeshRegions" operation is done, new boundaries will be created, that should be used as the interface between fluid and solid.

Hope this would help anyone. Regards,

Alex
Thanks,alex
what you said gives me a lot inspire.
I use ICEM to build my mesh,and face the same error.
i still have some doubt about "marking all the volumes as fluid".Dose it mean i should combine the fluid and solid blocks,or i should change solid block's name to fluid1?How to build different regions which have interface that can be recognized?
thanks again!
By the way ,why the error said i lack P file in ”solid/0“.
Tava is offline   Reply With Quote

Old   September 7, 2022, 07:20
Default
  #4
Member
 
Alejandro Valeije
Join Date: Nov 2014
Location: Spain
Posts: 51
Rep Power: 11
alexvaleije is on a distinguished road
Hi Tava,

I'm glad this could be useful to someone. First, I have never used ICEM, so I am unsure if my repply can help, but I'll try my best.

When using Fluent Meshing, there is a step where you have to define which class is each body. You can choose between fluid, solid and dead (which won't produce a volume mesh after the meshing process).

If you combine your fluid and your solid bodies in the geometry, you won't get what you need. My advice would be that you first do a try with two cubes sharing one face: one of them called "fluid1" and other called "solid1" (to avoid possible confunsions later with fluid/solid terms, but make sure that, when you create the mesh, treat both volumes as if they were fluids (if there is any disctintion in ICEM, which I don't know). Also create the boundary names, and after doing the mesh, try to replicate the mesh generation, with fliuent3DMeshToFoam and splitMeshRegions, and see which files are created.

The error you are seeing is posterior to the mesh generation. First you need to check if the mesh generation is correct.

Hope I could help, if you still dont get to create the mesh, share the log files and we can check what is wrong.

Regards,
alexvaleije is offline   Reply With Quote

Old   September 11, 2022, 01:16
Default
  #5
New Member
 
Join Date: Sep 2022
Posts: 3
Rep Power: 3
Tava is on a distinguished road
Hi alex,

Thanks for your advice.

I tryed to set two fluid regions which named "fluid" and "solid" in both ICEM and fluent meshing(useing share topology to ensure only one face between).
After fluent3DMeshToFoam , and checkMesh:

I think the problem is:

*Number of regions: 2
The mesh has multiple regions which are not connected by any face.
<<Writing region information to "0/cellToRegion"
<<Writing region 0 with 16294 cells to cellSet region0
<<Writing region 1 with 2203 cells to cellSet region1

Checking patch topology for multiply connected surfaces...
Patch Faces Points Surface topology
inletc 41 83 ok (non-closed singly connected)
inleth 66 132 ok (non-closed singly connected)
sym1 84 100 ok (non-closed singly connected)
sym1.1 465 930 ok (non-closed singly connected)
sym2 84 114 ok (non-closed singly connected)
sym2.1 457 918 ok (non-closed singly connected)
outletc 33 67 ok (non-closed singly connected)
outleth 41 84 ok (non-closed singly connected)
wall 30 58 ok (non-closed singly connected)
wall.2 198 399 ok (non-closed singly connected)
wall.1 3512 3424 multiply connected (shared edge)

It recognized my face between which named “wall.1” ,but it also reminded me that the mesh has multiple regions which are not connected by any face.

My code and setting is very similar with #1 posted,and face the same problem with him such as how to set the face between two regions in constant/polyMesh/boundary.

If any suggesstions in Fluent meshing ,please !

thanks again!!!

Quote:
Originally Posted by alexvaleije View Post
Hi Tava,

I'm glad this could be useful to someone. First, I have never used ICEM, so I am unsure if my repply can help, but I'll try my best.

When using Fluent Meshing, there is a step where you have to define which class is each body. You can choose between fluid, solid and dead (which won't produce a volume mesh after the meshing process).

If you combine your fluid and your solid bodies in the geometry, you won't get what you need. My advice would be that you first do a try with two cubes sharing one face: one of them called "fluid1" and other called "solid1" (to avoid possible confunsions later with fluid/solid terms, but make sure that, when you create the mesh, treat both volumes as if they were fluids (if there is any disctintion in ICEM, which I don't know). Also create the boundary names, and after doing the mesh, try to replicate the mesh generation, with fliuent3DMeshToFoam and splitMeshRegions, and see which files are created.

The error you are seeing is posterior to the mesh generation. First you need to check if the mesh generation is correct.

Hope I could help, if you still dont get to create the mesh, share the log files and we can check what is wrong.

Regards,
Tava is offline   Reply With Quote

Old   September 11, 2022, 06:03
Default
  #6
Member
 
Alejandro Valeije
Join Date: Nov 2014
Location: Spain
Posts: 51
Rep Power: 11
alexvaleije is on a distinguished road
Quote:
Originally Posted by Tava View Post
Hi alex,

Thanks for your advice.

I tryed to set two fluid regions which named "fluid" and "solid" in both ICEM and fluent meshing(useing share topology to ensure only one face between).
After fluent3DMeshToFoam , and checkMesh:

I think the problem is:

*Number of regions: 2
The mesh has multiple regions which are not connected by any face.
<<Writing region information to "0/cellToRegion"
<<Writing region 0 with 16294 cells to cellSet region0
<<Writing region 1 with 2203 cells to cellSet region1

Checking patch topology for multiply connected surfaces...
Patch Faces Points Surface topology
inletc 41 83 ok (non-closed singly connected)
inleth 66 132 ok (non-closed singly connected)
sym1 84 100 ok (non-closed singly connected)
sym1.1 465 930 ok (non-closed singly connected)
sym2 84 114 ok (non-closed singly connected)
sym2.1 457 918 ok (non-closed singly connected)
outletc 33 67 ok (non-closed singly connected)
outleth 41 84 ok (non-closed singly connected)
wall 30 58 ok (non-closed singly connected)
wall.2 198 399 ok (non-closed singly connected)
wall.1 3512 3424 multiply connected (shared edge)

It recognized my face between which named “wall.1” ,but it also reminded me that the mesh has multiple regions which are not connected by any face.

My code and setting is very similar with #1 posted,and face the same problem with him such as how to set the face between two regions in constant/polyMesh/boundary.

If any suggesstions in Fluent meshing ,please !

thanks again!!!
Hi Tava,

That message does not mean that the generated mesh is incorrect. You should check (within the files or in paraView whether the mesh has been generated properly or not)

I'll leave you attached an example where you can see the geometry and the mesh (generated in Fluent Meshing) and the process, with the logs and the run file to get the mesh.

https://drive.google.com/file/d/1CDk...ew?usp=sharing

If you have any issues after seeing the example, let me know. If you still have problems, you can leave attached your test case and I'll try to see what problem are you having.

Regards,

Alex
alexvaleije is offline   Reply With Quote

Old   September 11, 2022, 07:28
Default
  #7
New Member
 
Join Date: Sep 2022
Posts: 3
Rep Power: 3
Tava is on a distinguished road
Thanks a million for your example,alex

I checked my mesh and compared log files, but i still got no ideas where my error occurred.

Here is my test case .
https://drive.google.com/file/d/1PLo...ew?usp=sharing



Quote:
Originally Posted by alexvaleije View Post
Hi Tava,

That message does not mean that the generated mesh is incorrect. You should check (within the files or in paraView whether the mesh has been generated properly or not)

I'll leave you attached an example where you can see the geometry and the mesh (generated in Fluent Meshing) and the process, with the logs and the run file to get the mesh.

https://drive.google.com/file/d/1CDk...ew?usp=sharing

If you have any issues after seeing the example, let me know. If you still have problems, you can leave attached your test case and I'll try to see what problem are you having.

Regards,

Alex
Tava is offline   Reply With Quote

Old   October 17, 2022, 05:18
Default Same question
  #8
New Member
 
Ding Yan
Join Date: Oct 2022
Posts: 10
Rep Power: 3
batteryFoamer is on a distinguished road
Hi Thread,

Have u solved this question? I met the same one.
batteryFoamer is offline   Reply With Quote

Old   October 24, 2022, 10:24
Default
  #9
Member
 
Alejandro Valeije
Join Date: Nov 2014
Location: Spain
Posts: 51
Rep Power: 11
alexvaleije is on a distinguished road
Quote:
Originally Posted by batteryFoamer View Post
Hi Thread,

Have u solved this question? I met the same one.
Hi,

Yes, or at least for a type of problem. After doing fluent3DMeshToFoam and splitMeshRegions -cellZones, you will encounter with several regions in your constant folder.

If you go to the "boundary" file, you will see there the boundary names in each region. Well, the trick is, for the coupled regions, you have to change "type wall" with "type mappedWall", and add the three following fields:

sampleMode nearestPatchFace; \\this is always like this
sampleRegion solid; \\here goes the name of the coupled region
samplePatch wall_1; \\the name of the face in the other region, which should be the same (or at least similar) if you have named properly

This way, you will meet a boundary like this:

wall_1
{
//type wall;
type mappedWall;
inGroups 1(wall);
nFaces 1756;
startFace 89849;
sampleMode nearestPatchFace;
sampleRegion solid;
samplePatch wall_1;
}

You have to do for every coupled boundary. This can be a little of a nightmare if you have a lot, but I still haven't found any other way to do it, so I hope this trick can help you at least for the moment.

Regards,

Alex
alexvaleije is offline   Reply With Quote

Reply

Tags
chtmultiregionfoam, heat tranfer

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
heat transfer, multiple regions, chtMultiRegionFoam? Ohlzen-Wendy OpenFOAM Pre-Processing 13 February 8, 2022 08:17
Error in thermophysical properties (chtMultiRegionFoam) mukut OpenFOAM Pre-Processing 28 November 23, 2021 07:34
chtMultiRegionFoam connection between solid and fluid region of heat exchanger ahab OpenFOAM 1 December 18, 2019 01:37
Changing Frozenflowfield in chtMultiRegionFoam Solver during simulation meshingpumpkins OpenFOAM Programming & Development 4 February 18, 2019 19:43
Error in chtMultiRegionFoam michael157 OpenFOAM Running, Solving & CFD 17 May 22, 2017 04:32


All times are GMT -4. The time now is 04:11.