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

Conjugate heat transfer boundary conditions problem

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 4, 2016, 03:17
Default Conjugate heat transfer boundary conditions problem
  #1
New Member
 
Gregor Alan
Join Date: Feb 2016
Posts: 9
Rep Power: 10
GregorAlan is on a distinguished road
Dear all,

For my first conjugate heat transfer problem I have made two Fluent meshes and imported these succesfully and merged these (ran checkMesh and it says ok apart from some non-orthogonal faces). Then I have used topoSet to define 2 cellZonesSets the 'pin' part and the 'topAir' part, which are an aluminium cylindrical pin and the fluid flowing around it.
I run 'splitMeshRegions -cellZonesOnly -overwrite' and it creates 2 regions as expected.
I have coupled the walls of the 'pin' which are in contact with the 'topAir' with the following boundary conditions which are in the changeDictionary file like this:

dictionaryReplacement
{
T
{
internalField uniform 300;

boundaryField
{
pin_wall
{
type compressible::turbulentTemperatureCoupledBaffleMix ed;
Tnbr T;
kappa fluidThermo;
kappaName none;
value uniform 300;
}

".*"
{
type fixedValue;
value uniform 300;
}

pin_bottom
{
type compressible::turbulentTemperatureCoupledBaffleMix ed;
Tnbr T;
kappa fluidThermo;
kappaName none;
value uniform 300;
}
}
}

}
And similarly for the topAir changeDictionary.
Then changeDictionary runs fine, but chtMutiRegionFoam gives this error message:

--> FOAM FATAL ERROR:

patch type 'wall' not type 'mappedPatchBase'
for patch pin_wall of field T in file "/home/gregor/OpenFOAM/my_icoFoam_simulations/CHT_mutiple_msh/0.002/pin/T"

From function turbulentTemperatureCoupledBaffleMixedFvPatchScala rField::turbulentTemperatureCoupledBaffleMixedFvPa tchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const dictionary& dict
)

in file turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScala rField.C at line 105.

FOAM exiting


Does anybody know why it is doing this?

Regards,

Gregor
GregorAlan is offline   Reply With Quote

Old   February 4, 2016, 04:24
Default
  #2
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 29
akidess will become famous soon enough
Your base patch specification in your polyMesh/boundary is set to wall, when it should be mapped.
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Old   February 4, 2016, 04:49
Default
  #3
New Member
 
Gregor Alan
Join Date: Feb 2016
Posts: 9
Rep Power: 10
GregorAlan is on a distinguished road
In the polyMesh/boundary file it already says:
topAir_to_pin
{
type mappedWall;
inGroups 1(wall);
nFaces 2054;
startFace 39620;
sampleMode nearestPatchFace;
sampleRegion pin;
samplePatch pin_to_topAir;
}
And the other way around as well.
This is only present in the split meshes polyMesh folders (so in the first time step folder). Should this also be somewhere else? In /constant/polyMesh they are all type wall or patch.

Kind regards,

Gregor Alan
GregorAlan is offline   Reply With Quote

Old   February 4, 2016, 10:24
Default
  #4
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 29
akidess will become famous soon enough
Why did you post "topAir_to_pin" when the error message was for "pin_wall"?
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Old   February 4, 2016, 10:47
Default
  #5
New Member
 
Gregor Alan
Join Date: Feb 2016
Posts: 9
Rep Power: 10
GregorAlan is on a distinguished road
I'm now at a different error, it says it reads a file 0.001/topAir/h, but this file doesn't exits.


Create time

Create fluid mesh for region topAir for time = 0.001

Create solid mesh for region pin for time = 0.001

*** Reading fluid mesh thermophysical properties for region topAir

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 hRefFluid

Adding to ghFluid

Adding to ghfFluid

Adding to turbulence

Selecting turbulence model type laminar
Selecting radiationModel none
Adding to KFluid

Adding to dpdtFluid

Adding MRF

No MRF models present

Adding fvOptions

No finite volume options present

*** Reading solid mesh thermophysical properties for region pin

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 none
Adding fvOptions

No finite volume options present

Region: topAir Courant Number mean: 0.032191039 max: 3.9437706
Region: pin Diffusion Number mean: 0.00026157047 max: 0.0010890305
deltaT = 0.00015213753
Region: topAir Courant Number mean: 0.0048974652 max: 0.59999553
Region: pin Diffusion Number mean: 3.9794687e-05 max: 0.00016568242
deltaT = 0.00015213753
Time = 0.00115214


Solving for fluid region topAir
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 1.4921893e-09, No Iterations 2
DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 3.9820263e-10, No Iterations 3
DILUPBiCG: Solving for Uz, Initial residual = 1, Final residual = 1.8649883e-08, No Iterations 2


--> FOAM FATAL ERROR:

gradientInternalCoeffs cannot be called for a calculatedFvPatchField
on patch topAir_to_pin of field h in file "/home/gregor/OpenFOAM/my_icoFoam_simulations/CHT_mutiple_msh/0.001/topAir/h"
You are probably trying to solve for a field with a default boundary condition.

From function calculatedFvPatchField<Type>::gradientInternalCoef fs() const
in file fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C at line 199.

FOAM exiting

Any suggestions?
GregorAlan is offline   Reply With Quote

Old   February 4, 2016, 11:19
Default
  #6
Senior Member
 
Join Date: Sep 2013
Posts: 353
Rep Power: 20
Bloerb will become famous soon enough
Your boundary conditions are most likely ill defined.
Please do the following
run checkMesh -region ... after splitMeshRegions to check if both region meshes are valid.
After executing changeDictionary check polyMesh/boundary and 0/region.../T if all boundary conditions are correct. If you are unsure please post them here.
In addition...why does it say "time = 0.001"? Is this your startTime?
Is your pin region a solid? If so why have you put fluidThermo instead of solidThermo into the boundary condition?
Bloerb is offline   Reply With Quote

Old   February 5, 2016, 03:21
Default
  #7
New Member
 
Gregor Alan
Join Date: Feb 2016
Posts: 9
Rep Power: 10
GregorAlan is on a distinguished road
I corrected the fluidThermo to solidThermo.
The reason why it says 0.001 is that it is my startTime. Moreover, if I use mergeMesh to merge the two fluent meshes and then 'topoSet' and 'splitMeshRegions -cellZonesOnly -overwrite'. This creates a new time folder with the two split meshes which I then copy manually to the constant/region folders.
So after running checkMesh -region topAir:

Create time

Create polyMesh topAir for time = 0

Time = 0

Mesh stats
points: 9449
faces: 61354
internal faces: 57183
cells: 26765
faces per cell: 4.4288063
boundary patches: 9
point zones: 0
face zones: 0
cell zones: 2

Overall number of cells of each type:
hexahedra: 0
prisms: 11290
wedges: 0
pyramids: 187
tet wedges: 0
tetrahedra: 15288
polyhedra: 0

Checking topology...
****Duplicate boundary patch 1 named topAir_to_pin of type mappedWall.
Suppressing future warnings.
***Boundary definition is in error.
Cell to face addressing OK.
Point usage OK.
Upper triangular ordering OK.
Face vertices OK.
Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces...
Patch Faces Points Surface topology
topAir_to_pin 167 236 ok (non-closed singly connected)
topAir_to_pin 68 45 ok (non-closed singly connected)
slice_top 344 298 ok (non-closed singly connected)
slice_side_1 832 450 ok (non-closed singly connected)
slice_side_2 826 447 ok (non-closed singly connected)
inlet_slice 150 95 ok (non-closed singly connected)
outlet_slice 70 51 ok (non-closed singly connected)
bottom 149 97 ok (non-closed singly connected)
topAir_to_pin 1565 979 multiply connected (shared edge)
<<Writing 50 conflicting points to set nonManifoldPoints

Checking geometry...
Overall domain bounding box (0 0 -0.005) (0.05 0.01 0.035)
Mesh has 3 geometric (non-empty/wedge) directions (1 1 1)
Mesh has 3 solution (non-empty) directions (1 1 1)
Boundary openness (2.1324352e-17 -3.2357735e-16 9.8175178e-18) OK.
Max cell openness = 4.3025992e-16 OK.
Max aspect ratio = 18.062411 OK.
Minimum face area = 2.4664557e-08. Maximum face area = 9.6183031e-06. Face area magnitudes OK.
Min volume = 9.7573986e-12. Max volume = 9.098178e-09. Total volume = 1.8638727e-05. Cell volumes OK.
Mesh non-orthogonality Max: 76.57185 average: 13.971542
*Number of severely non-orthogonal (> 70 degrees) faces: 45.
Non-orthogonality check OK.
<<Writing 45 non-orthogonal faces to set nonOrthoFaces
Face pyramids OK.
Max skewness = 1.0477446 OK.
Coupled point location match (average 0) OK.

Mesh OK.

Time = 0.001

Mesh stats
points: 9449
faces: 61354
internal faces: 57183
cells: 26765
faces per cell: 4.4288063
boundary patches: 9
point zones: 0
face zones: 0
cell zones: 2

Overall number of cells of each type:
hexahedra: 0
prisms: 11290
wedges: 0
pyramids: 187
tet wedges: 0
tetrahedra: 15288
polyhedra: 0

Checking topology...
****Duplicate boundary patch 1 named topAir_to_pin of type mappedWall.
Suppressing future warnings.
***Boundary definition is in error.
Cell to face addressing OK.
Point usage OK.
Upper triangular ordering OK.
Face vertices OK.
Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces...
Patch Faces Points Surface topology
topAir_to_pin 167 236 ok (non-closed singly connected)
topAir_to_pin 68 45 ok (non-closed singly connected)
slice_top 344 298 ok (non-closed singly connected)
slice_side_1 832 450 ok (non-closed singly connected)
slice_side_2 826 447 ok (non-closed singly connected)
inlet_slice 150 95 ok (non-closed singly connected)
outlet_slice 70 51 ok (non-closed singly connected)
bottom 149 97 ok (non-closed singly connected)
topAir_to_pin 1565 979 multiply connected (shared edge)
<<Writing 50 conflicting points to set nonManifoldPoints

Checking geometry...
Overall domain bounding box (0 0 -0.005) (0.05 0.01 0.035)
Mesh has 3 geometric (non-empty/wedge) directions (1 1 1)
Mesh has 3 solution (non-empty) directions (1 1 1)
Boundary openness (2.1324352e-17 -3.2357735e-16 9.8175178e-18) OK.
Max cell openness = 4.3025992e-16 OK.
Max aspect ratio = 18.062411 OK.
Minimum face area = 2.4664557e-08. Maximum face area = 9.6183031e-06. Face area magnitudes OK.
Min volume = 9.7573986e-12. Max volume = 9.098178e-09. Total volume = 1.8638727e-05. Cell volumes OK.
Mesh non-orthogonality Max: 76.57185 average: 13.971542
*Number of severely non-orthogonal (> 70 degrees) faces: 45.
Non-orthogonality check OK.
<<Writing 45 non-orthogonal faces to set nonOrthoFaces
Face pyramids OK.
Max skewness = 1.0477446 OK.
Coupled point location match (average 0) OK.

Mesh OK.

End

I am a bit confused as to what the solver needs for coupling the solid region to the fluid region. Do I need to add mappedWalIs manually to the polyMesh/boundary file? I did it like this for the pin (the pin top is the only one not in contact with the solid):

4
(
pin_wall_to_topAir
{
type mappedWall;
inGroups 1(wall);
nFaces 1506;
startFace 49399;
sampleMode nearestPatchFace;
sampleRegion topAir;
samplePatch topAir_to_pin_wall;
}
pin_top
{
type wall;
inGroups 1(wall);
nFaces 238;
startFace 50905;
}
pin_bottom_to_topAir
{
type mappedWall;
inGroups 1(wall);
nFaces 238;
startFace 51143;
sampleMode nearestPatchFace;
sampleRegion topAir;
samplePatch topAir_to_pin_bottom;
}
pin_to_topAir
{
type mappedWall;
inGroups 1(wall);
nFaces 1565;
startFace 51381;
sampleMode nearestPatchFace;
sampleRegion topAir;
samplePatch topAir_to_pin;
}
)

The changeDictionaryDict for topAir is as follows:
dictionaryReplacement
{
U
{
internalField uniform (0 0 0);

boundaryField
{
pin_wall_slice
{
type fixedValue;
value uniform (0 0 0);
}
pin_bottom_slice
{
type fixedValue;
value uniform (0 0 0);
}
slice_top
{
type slip;
}
slice_side_1
{
type slip;
}
slice_side_2
{
type slip;
}
inlet_slice
{
type fixedValue;
value uniform (3 0 0);
}
outlet_slice
{
type zeroGradient;
}
bottom
{
type fixedValue;
value uniform (0 0 0);
}
}
}
}

T
{
internalField uniform 300;

boundaryField
{
".*"
{
type fixedValue;
value uniform 300;
}
pin_wall_slice
{
type compressible::turbulentTemperatureCoupledBaffleMix ed;
Tnbr T;
kappa fluidThermo;
kappaName none;
value uniform 300;
}
pin_bottom_slice
{
type compressible::turbulentTemperatureCoupledBaffleMix ed;
Tnbr T;
kappa fluidThermo;
kappaName none;
value uniform 300;
}

}
}

p_rgh
{
internalField uniform 1e5;

boundaryField
{
pin_wall_slice
{
type inletOutlet;
inletValue uniform (0 0 0);
value uniform (0.1 0 0);
}
pin_bottom_slice
{
type fixedValue;
value uniform (0.1 0 0);
}
slice_top
{
type fixedValue;
value uniform (0 0 0);
}
slice_side_1
{
type inletOutlet;
inletValue uniform (0 0 0);
value uniform (0.1 0 0);
}
slice_side_2
{
type inletOutlet;
inletValue uniform (0 0 0);
value uniform (0.1 0 0);
}
inlet_slice
{
type inletOutlet;
inletValue uniform (0 0 0);
value uniform (0.1 0 0);
}
outlet_slice
{
type inletOutlet;
inletValue uniform (0 0 0);
value uniform (0.1 0 0);
}
bottom
{
type inletOutlet;
inletValue uniform (0 0 0);
value uniform (0.1 0 0);
}
}
}

p
{
internalField uniform 1e5;

boundaryField
{
pin_wall_slice
{
type inletOutlet;
inletValue uniform (0 0 0);
value uniform (0.1 0 0);
}
pin_bottom_slice
{
type fixedValue;
value uniform (0.1 0 0);
}
slice_top
{
type fixedValue;
value uniform (0 0 0);
}
slice_side_1
{
type inletOutlet;
inletValue uniform (0 0 0);
value uniform (0.1 0 0);
}
slice_side_2
{
type inletOutlet;
inletValue uniform (0 0 0);
value uniform (0.1 0 0);
}
inlet_slice
{
type inletOutlet;
inletValue uniform (0 0 0);
value uniform (0.1 0 0);
}
outlet_slice
{
type inletOutlet;
inletValue uniform (0 0 0);
value uniform (0.1 0 0);
}
bottom
{
type inletOutlet;
inletValue uniform (0 0 0);
value uniform (0.1 0 0);
}
}
}
}
}

Maybe if you want I can attach the case folder?
GregorAlan is offline   Reply With Quote

Old   March 31, 2016, 16:53
Default
  #8
New Member
 
Diego Vaca
Join Date: Mar 2016
Posts: 3
Rep Power: 10
diegofutbolero is on a distinguished road
I am running OF 2.1.1 wuth chtMultiRegionSimple solver.To run the case I use ./Allrun. However: I have the following error:

--> FOAM FATAL ERROR:

patch type 'patch' not type 'mappedPatchBase'
for patch CO2_to_SS316 of field T in file "/home/diego/OpenFOAM/Kruizenga-StraightChannels-2/0/CO2/T"

From function turbulentTemperatureCoupledBaffleMixedFvPatchScala rField::turbulentTemperatureCoupledBaffleMixedFvPa tchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const dictionary& dict
)

in file derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScala rField.C at line 99.


My BC for the both regions are:

CO2_to_SS316
{
type compressible::turbulentTemperatureCoupledBaffleMix ed;
neighbourFieldName T;
K basicThermo;
KName none;
value uniform 298.15;
}

SS316_to_CO2
{
type compressible::turbulentTemperatureCoupledBaffleMix ed;
neighbourFieldName T;
K solidThermo;
KName none;
value uniform 298.15;
}

Any help will be very appreciated
diegofutbolero is offline   Reply With Quote

Old   April 7, 2016, 17:10
Default
  #9
Senior Member
 
Join Date: Sep 2013
Posts: 353
Rep Power: 20
Bloerb will become famous soon enough
In your polyMesh boundary files you need to change the definition of both patches to a mapped patch instead of patch
Bloerb is offline   Reply With Quote

Old   January 30, 2021, 05:29
Default
  #10
Member
 
saidc
Join Date: Feb 2020
Location: Türkiye
Posts: 61
Rep Power: 6
saidc. is on a distinguished road
Hi Bloerb,

I had the same problem in T file (' not type 'mappedPatchBase' for patch wall of field T in file) then i read this post and changed boundary files. Now i'm getting this error:

Cannot find patchField entry for fluid_to_sphere

Any suggestion?

Best regards,
Said.

fluid/boundary
(
inlet
{
type patch;
nFaces 214;
startFace 165423;
}
outlet
{
type patch;
nFaces 242;
startFace 165637;
}
wall
{
type mappedWall; //was wall
inGroups List<word> 1(wall);
nFaces 4664;
startFace 165879;
sampleMode nearestPatchFace;
sampleRegion sphere;
samplePatch sphere_to_fluid;

}
fluid_to_sphere
{
type mappedWall;
inGroups List<word> 1(wall);
nFaces 4186;
startFace 170543;
sampleMode nearestPatchFace;
sampleRegion sphere;
samplePatch sphere_to_fluid;
}
)

polyMesh/boundary
(
inlet
{
type patch;
nFaces 214;
startFace 380986;
}
outlet
{
type patch;
nFaces 242;
startFace 381200;
}
wall
{
type wall;
nFaces 4664;
startFace 381442;
}
)

T
{
inlet
{
type fixedValue;
value uniform $Tinitial;
}

outlet
{
type inletOutlet;
inletValue uniform $Tinitial;
value uniform $Tinitial;
}

wall
{
type compressible::turbulentTemperatureCoupledBaffleMix ed;
neighbourFieldName T;
kappa kappa;
Tnbr T;
value uniform $Tinitial;
}

}

Last edited by saidc.; January 30, 2021 at 05:37. Reason: wrong inputs
saidc. is offline   Reply With Quote

Old   January 31, 2021, 12:13
Default
  #11
Member
 
saidc
Join Date: Feb 2020
Location: Türkiye
Posts: 61
Rep Power: 6
saidc. is on a distinguished road
Hi,

I realized what I was doing wrong, I made a silly mistake. One of the boundary conditions in T was missing and I changed it, now it's working.

Best regards,
Said.

fluid/boundary
(
inlet
{
type patch;
nFaces 214;
startFace 165423;
}
outlet
{
type patch;
nFaces 242;
startFace 165637;
}
wall
{
type wall;
inGroups List<word> 1(wall);
nFaces 4664;
startFace 165879;
}
fluid_to_sphere
{
type mappedWall;
inGroups List<word> 1(wall);
nFaces 4186;
startFace 170543;
sampleMode nearestPatchFace;
sampleRegion sphere;
samplePatch sphere_to_fluid;
}
)

T
{
inlet
{
type fixedValue;
value uniform $Tinitial;
}

outlet
{
type inletOutlet;
inletValue uniform $Tinitial;
value uniform $Tinitial;
}

wall
{
type zeroGradient;

}

fluid_to_sphere
{
type compressible::turbulentTemperatureCoupledBaffleMix ed;
neighbourFieldName T;
kappa kappa;
Tnbr T;
value uniform $Tinitial;
}

}
saidc. is offline   Reply With Quote

Reply


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
sliding mesh problem in CFX Saima CFX 46 September 11, 2021 07:38
Problem with SIMPLEC-like finite volume channel flow boundary conditions ghobold Main CFD Forum 3 June 15, 2015 11:14
Difficulty In Setting Boundary Conditions Moinul Haque CFX 4 November 25, 2014 17:30
RPM in Wind Turbine Pankaj CFX 9 November 23, 2009 04:05
Convective Heat Transfer - Heat Exchanger Mark CFX 6 November 15, 2004 15:55


All times are GMT -4. The time now is 16:54.