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

conjugateHeatFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 3 Post By benk
  • 1 Post By benk

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 11, 2010, 05:04
Default conjugateHeatFoam
  #1
New Member
 
Antonello
Join Date: Apr 2010
Posts: 20
Rep Power: 16
antonessiu is on a distinguished road
hi,

I use openfoam for my thesis. i wish to use conjugateHeatFoam but in the forum no information are present.
Can anyone post or direct me on a "how to" use this code? I have been looking arround, hoping to find my way out from the tutorials.

Thank you.
antonessiu is offline   Reply With Quote

Old   May 13, 2010, 14:43
Default
  #2
Senior Member
 
Ben K
Join Date: Feb 2010
Location: Ottawa, Canada
Posts: 140
Rep Power: 19
benk is on a distinguished road
Have you seen this post:
http://www.cfd-online.com/Forums/ope...-openfoam.html

There's lots of information there.
benk is offline   Reply With Quote

Old   May 15, 2010, 04:17
Default
  #3
New Member
 
Antonello
Join Date: Apr 2010
Posts: 20
Rep Power: 16
antonessiu is on a distinguished road
Thanks for the replay Benk
the information in the forum are incomplete! The construction of a case is very difficult for me...
antonessiu is offline   Reply With Quote

Old   May 15, 2010, 12:24
Default
  #4
Senior Member
 
Ben K
Join Date: Feb 2010
Location: Ottawa, Canada
Posts: 140
Rep Power: 19
benk is on a distinguished road
Ok, the first thing you have to do is make sure that you can run the test case "conjugateHeatFoam" and that it works properly (ie. you don't get any error messages when you compile and run it).

The basics of this solver:
1) This solver is for multiple regions where, for example, you have multiple regions in contact with one another and you have a species (like heat) transferred through each of those regions. Each region is associated with a mesh. You'll have 1 main mesh and other regions are the submeshes (in the test case the main mesh is in the conjugateCavity directory and the submesh is the solid directory which is a link to the heatedBlock directory). You have to make sure you understand the directory structure of meshes and submeshes first.

2) Another important point about the mesh is that in the constant/polyMesh/boundary file, you'll have to manually add the regionCouple information (every time you run the blockMesh command), like:

Code:
right
{
    type regionCouple;
    nFaces 10;
    startFace 200;

    shadowRegion    solid;
    shadowPatch     left;
    attached        on;
}
where shadowRegion is the region in contact with the current region and shadowPatch is the name of the patch in contact with the current patch. Forgetting to edit this file after running a blockmesh command is a common mistake (at least for me) and will result in an error at runtime (not at compile).

3) To implement the equations, you use the special coupledFvScalarMatrix object which is written so that each equation is in an array. For the syntax, see solveEnergy.H file in the test case.

4) When creating coupled fields (for example in the createFields.H file), you have to include "attachPatches.H" before creating any fields that are to be coupled and include "detachPatches.H" before creating any fields that are not coupled. The [de|at]tachPatches.H essentially turns on or off the regionCoupling information in your boundaries file since regular solvers don't know what to do with this special boundary.

5) In the time = 0 directory, you must also indicate the coupling on boundaries for each coupled field. For example, if you look at the T (and DT) file for the conjugateHeatFoam case, you'll see:

Code:
    right
    {
        type            regionCoupling;
        value           uniform 273;

        remoteField     T;
    }
for every boundary that is to be treated as an "internal boundary" or a coupled boundary.

6) In your system/fvSolution, you need to indicate which fields are coupled, using:
Code:
    T+T BiCG
    {
        preconditioner
        {
            type                Cholesky;
        }

        minIter      0;
        maxIter      1000;
        tolerance    1e-6;
        relTol       0.0;
    };
if you had 3 regions instead of 2, then instead of T+T you'd have T+T+T (and of course if your field isn't called T then you change T to whatever your field is called).

7) I've found that it's also a good idea to use harmonic averaging in the system/fvSchemes file but not necessary to run a case.

For another example case, see http://www.cfd-online.com/Forums/ope...tml#post251473 and all posts within.
benk is offline   Reply With Quote

Old   May 15, 2010, 12:26
Default
  #5
Senior Member
 
Ben K
Join Date: Feb 2010
Location: Ottawa, Canada
Posts: 140
Rep Power: 19
benk is on a distinguished road
PS. If anybody has run this solver in parallel, I'd like instructions on how to do that!
benk is offline   Reply With Quote

Old   June 20, 2011, 04:39
Default
  #6
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23
maddalena will become famous soon enough
Quote:
Originally Posted by benk View Post
This solver is for multiple regions where, for example, you have multiple regions in contact with one another and you have a species (like heat) transferred through each of those regions. Each region is associated with a mesh. You'll have 1 main mesh and other regions are the submeshes (in the test case the main mesh is in the conjugateCavity directory and the submesh is the solid directory which is a link to the heatedBlock directory). You have to make sure you understand the directory structure of meshes and submeshes first.
Hi benk,
some questions for you:
  1. if I understood it right, conjugateHeatFoam has a different file structure than chtMultiRegionFoam, i.e.there is not a constant/regionProperties file defining which regions are solids and which are fluids. Thus I simply need to add the solid1 solid2 solid3 folders (or link) inside the main directory folder. Is it correct?
  2. Is the main directory the fluid or can I take it as the solid?
  3. And what about if I have multiple solid and multiple fluid? Am I allowed to use them? Where to declare which are what?
Thank you for your time,

mad
maddalena is offline   Reply With Quote

Old   June 20, 2011, 21:39
Default
  #7
Senior Member
 
Ben K
Join Date: Feb 2010
Location: Ottawa, Canada
Posts: 140
Rep Power: 19
benk is on a distinguished road
Quote:
Originally Posted by maddalena View Post
if I understood it right, conjugateHeatFoam has a different file structure than chtMultiRegionFoam, i.e.there is not a constant/regionProperties file defining which regions are solids and which are fluids. Thus I simply need to add the solid1 solid2 solid3 folders (or link) inside the main directory folder. Is it correct?
Yes. When you say "main directory folder", this is the directory of the main mesh which in the conjugateHeatFoam lingo, is referred to as "region0". All other regions become submeshes of the main mesh.

Quote:
Originally Posted by maddalena View Post
Is the main directory the fluid or can I take it as the solid?
It can be whatever you want. Just make sure your equations fit your problem.

Quote:
Originally Posted by maddalena View Post
And what about if I have multiple solid and multiple fluid? Am I allowed to use them? Where to declare which are what?
You can have any number of regions. For each region, just add the submesh under the main mesh directory (ie. constant/regionName). I'm pretty sure you'll also have to edit the attachPatches.H file for more than 2 regions. Also, remember to edit your boundaries file correctly for each mesh.

The solver will just apply the following conditions at the interface between 2 regions (ie. internal boundaries):
1. phi(region 1) = phi(region 2)
2. flux(region 1) = -flux(region 2)
mm.abdollahzadeh likes this.
benk is offline   Reply With Quote

Old   July 30, 2020, 05:00
Default
  #8
New Member
 
Hailong
Join Date: Sep 2019
Posts: 8
Rep Power: 6
nilvxingren is on a distinguished road
Quote:
Originally Posted by benk View Post
Yes. When you say "main directory folder", this is the directory of the main mesh which in the conjugateHeatFoam lingo, is referred to as "region0". All other regions become submeshes of the main mesh.



It can be whatever you want. Just make sure your equations fit your problem.



You can have any number of regions. For each region, just add the submesh under the main mesh directory (ie. constant/regionName). I'm pretty sure you'll also have to edit the attachPatches.H file for more than 2 regions. Also, remember to edit your boundaries file correctly for each mesh.

The solver will just apply the following conditions at the interface between 2 regions (ie. internal boundaries):
1. phi(region 1) = phi(region 2)
2. flux(region 1) = -flux(region 2)
Hi benk
If I have multiple solid, and they have different thermal properties, diffusivity, and so on. Besides attachPatches.H file,do I need to modify other files? for example creatSolidField.H
nilvxingren 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
conjugateHeatFoam, grid spacing and gradient calculation benk OpenFOAM 1 May 5, 2010 16:06
conjugateHeatFoam: Problems adding 3rd region benk OpenFOAM 5 April 21, 2010 12:46
conjugateHeatFOAM: exchange of INFO at INTERFACE?? dinonettis OpenFOAM 7 March 25, 2010 14:09
conjugateHeatFOAM: exchange of INFO at INTERFACE?? dinonettis OpenFOAM Programming & Development 0 March 19, 2010 12:11
conjugateHeatFoam: Should solid and fluid have the same mesh at the coupled boundary? awacs OpenFOAM Running, Solving & CFD 6 September 22, 2009 22:58


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