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/)
-   -   patch problem with chtMultiRegionSimpleFoam (https://www.cfd-online.com/Forums/openfoam-solving/167270-patch-problem-chtmultiregionsimplefoam.html)

philibert February 26, 2016 09:20

patch problem with chtMultiRegionSimpleFoam
 
Hi,

I am learning to use chtMultiRegionSimpleFoam by creating a 2D case with a solid box (called wall) on the floor encircled by air. The bottom of the wall has a temperature higher than the rest of the domain (500K for bottom wall and 300K for the rest).

I am using the tutorial planeWall2D to realize my case.

I have two domains: domain0 air and domain1 wall.
The interface between solid region and fluid region is defined by:
- wall_to_air for domain1
- air_to_wall for domain0

When I run the case I obtained this fatal error :


/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
/* Windows port by CFD support (www.cfdsupport.com) [based on Symscape] *\
\*---------------------------------------------------------------------------*/
Build : 2.3.x-819030ed51bd
Exec : C:\OpenFOAM\***
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create fluid mesh for region domain0 for time = 0

Create solid mesh for region domain1 for time = 0

*** Reading fluid mesh thermophysical properties for region domain0

Adding to thermoFluid

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

Adding to rhoFluid

Adding to UFluid

Adding to phiFluid

Adding to gFluid

Adding to turbulence

Selecting turbulence model type laminar
Adding to ghFluid

Adding to ghfFluid

Selecting radiationModel none
Adding fvOptions

No finite volume options present

*** Reading solid mesh thermophysical properties for region domain1

Adding to thermos

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

Adding to radiations

Selecting radiationModel opaqueSolid
Selecting absorptionEmissionModel constantAbsorptionEmission
Selecting scatterModel none
Adding fvOptions

No finite volume options present
Time = 1


Solving for fluid region domain0
DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 0.001204138, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 0.0115684, No Iterations 1


--> FOAM FATAL ERROR:
Cannot find patch wall_to_air in region domain0
Valid patches are
6
(
leftlet
rightlet
topair
bottom_air
air_to_wall
frontAndBackPlanes
)


From function mappedPatchBase::samplePolyPatch()
in file mappedPatches/mappedPolyPatch/mappedPatchBase.C at line 1259.

FOAM exiting


I don't understand because the patch wall_to_air doesn't need to be in the domain0, it is the interface of domain1.

Does anybody know where this problem comes from?

jmdf February 26, 2016 10:57

From the error it appears that the error is in the boundary (polyMesh folder) file, where you define the wall_to_air.

Perhaps you could post that file here to see if there's any error.

Regards

Bloerb February 27, 2016 02:52

The error message tells you that the region you specified only has these patches available

Code:

Cannot find patch wall_to_air in region domain0
(
leftlet
rightlet
topair
bottom_air
air_to_wall
frontAndBackPlanes
)

you probably assigned sampleRegion wrongly. The sample region for region0 is region1 and vice versa.

philibert February 29, 2016 03:08

Thank you for your responses. You can find, in the following, the "PolyMesh" boundary:


FoamFile
{
version 2.0;
format ascii;
class polyBoundaryMesh;
location "constant/polyMesh";
object boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

8
(
leftlet
{
type patch;
inGroups 1(patch);
nFaces 28;
startFace 1484;
}
rightlet
{
type patch;
inGroups 1(patch);
nFaces 28;
startFace 1512;
}
topair
{
type symmetryPlane;
inGroups 1(symmetryPlane);
nFaces 28;
startFace 1540;
}
bottomair
{
type wall;
inGroups 1(wall);
nFaces 14;
startFace 1568;
}
bottomwall
{
type wall;
inGroups 1(wall);
nFaces 14;
startFace 1582;
}
air_to_wall
{
type mappedWall;
inGroups 1(wall);
nFaces 28;
startFace 1596;
sampleMode nearestPatchFace;
sampleRegion domain0;
samplePatch wall_to_air;
}
wall_to_air
{
type mappedWall;
inGroups 1(wall);
nFaces 28;
startFace 1624;
sampleMode nearestPatchFace;
sampleRegion domain1;
samplePatch air_to_wall;
}
frontAndBackPlanes
{
type empty;
inGroups 1(empty);
nFaces 1568;
startFace 1652;
}
)

jmdf February 29, 2016 04:50

As Bloerb said, the sampleRegion of the mappedWall boundaries is wrongly defined.
The "domain0" and "domain1" regions does not exist. In this entry you have to insert an existent region, one of the regions you have on your regionProperties file.
The sampleRegion refers to the neighbour region you want to couple with.

shahilc March 3, 2016 15:32

Similar issue
 
Hi Philibert,

Were you able to overcome your error? Because I am exactly facing the same problem.
If you have solved your problems, please help me to a solution to this error.

Shahil.

Bloerb March 3, 2016 16:33

As i have said the sampleRegion keyword or patch definition was ill defined. Open the boundary files in each region and check if it contains the patches of that region.
Code:

patchinregion0_to_patchinregion1 // your patch in this region
{
type mappedWall;
nFaces ...;
startFace ...;
sampleMode nearestPatchFace; // mapping method.
sampleRegion domain1; // the domain the adjacent patch is in
samplePatch patchinregion1_to_patchinregion0; the adjacent patch
}

Lets say you have one region named fluid and one region named solid. Naturally you want to couple fluid to solid on some boundary. The patch in the fluid region is named fluid_to_solid and in the solid region the patch is solid_to_fluid

In the polyMesh boundary file of your fluid region you have to define
Code:

fluid_to_solid// your patch in this region
{
type mappedWall;
nFaces ...;
startFace ...;
sampleMode nearestPatchFace; // mapping method.
sampleRegion solid; // the domain the adjacent patch is in
samplePatch solid_to_fluid; the adjacent patch
}

And in the solid region
Code:

solid_to_fluid// your patch in this region
{
type mappedWall;
nFaces ...;
startFace ...;
sampleMode nearestPatchFace; // mapping method.
sampleRegion fluid; // the domain the adjacent patch is in
samplePatch fluid_to_solid; the adjacent patch
}



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