CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   chtMultiRegionFOAM (

masuarez February 25, 2011 13:02

1 Attachment(s)

I'm trying to run a case dealing with heat transfer through a rocket cooling channel. Since I'm fairly new to OpenFOAM, I modeled a simple 3D straight channel with aluminum walls. I'm running compressible air through it and trying to give the walls a 600 K temperature. When i run ChtMultiRegionFoam, it is giving me the following error:

Solving for solid region solid
DICPCG: Solving for T, Initial residual = 0.5277694, Final residual = 2.889443e-07, No Iterations 1

[IMG]file:///Users/Suarez/Library/Caches/TemporaryItems/moz-screenshot.png[/IMG]request for volScalarField K from objectRegistry solid failed
available objects of type volScalarField are


This error appears as it is iterating in the solid region. It does iterate once in the fluid region, but I can't get past this issue.

One of the things I have not been very comfortable was the solid/0/T file. But i don't know if a mistake in my temp boundary conditions would give me an error on my thermal conductivity file.

Any help would be greatly appreciated. Thank you.

masuarez March 1, 2011 23:12

Additional info
2 Attachment(s)
I was told that the reason i was receiving this error was because I was missing a K field in one of my solids. the only problem is that I only have one solid file. I'm doing a 3-D problem (see attached images) and I decided to mesh one whole solid. Could that be the problem?

If anybody has any info... please reply (don't be shy!!!)

Also, for my boundary conditions, i'm having some problems with the type of information that should be in them. I understand all the files needed, but what I don't get is what type of info should go in the boundary field.

Example, in my 0/solid/T:

type solidWallMixedTemperatureCoupled;
neighbourRegionName fluid;
neighbourPatchName tfluid_to_solid;
neighbourFieldName T;
K K;
value uniform 600;

Is this appropriate? I based this on the following threads:


I semi-understand what i need to do in the faces where the fluid and solid interact... but what should i do on the outside faces?

psosnows March 2, 2011 05:31

Hello Miguel,

I just took a look at the case you attached. And I have to say, I was a bit scared...

First of all, your domains are NOT coupled. I explained that in the topic
in this kind of BC, coupling is done on 2 levels: in polyMesh/REGION/boundary and in 0/REGION/T
first thing you have to do is to correct that.

Secondary, You did not link proper fields.
In your example dictionary you have a statement:
K K;
This means, that you say to the boundary:
"The name of the K field in the neighbour region is K"
Similarly if you write:
K someK;
it will mean:
"The name of the K field in the neighbour region is someK"

Link proper objects. And check if neighbour patches match.

I believe this will solve your problems (for now ;) )


masuarez March 2, 2011 14:15


regarding the coupling, I thought I achieved this by the following:


type wall;
nFaces 400;
startFace 196800;
sampleMode nearestPatchFace;
sampleRegion solid;
samplePatch lfluid_to_solid;
offset (0 0 0);

and in the 0/solid/T:

type solidWallMixedTemperatureCoupled;
neighbourRegionName fluid;
neighbourPatchName lfluid_to_solid;
neighbourFieldName T;
K K;
value uniform 600;

Is this incorrect?

as for the K field... if I delete it from my boundary conditions in both 0/solid/T and 0/fluid/T, OpenFoam gives me the following error:

keyword K is undefined in dictionary "/mesh/3D/multiregion/runCase3/0/solid/T::solid_to_lfluid"

file: /mesh/3D/multiregion/runCase3/0/solid/T::solid_to_lfluid from line 48 to line 52.

Also, will the following work for the solid boundary file on walls not interacting with the fluid (i.e. walls open to the atmosphere)?


type wall;
nFaces 1200;
startFace 194400;

and for the 0/solid/T:

type zeroGradient;

It doesn't make sense in my simple minded head to couple the outside walls, but I might be way off.

Thank you.


psosnows March 2, 2011 17:48

Hello Miguel,

regarding polyMesh/boundary - it seems OK.

regarding K - I think you missed some info in the cht-thread, linked to the structure of the boundaries.
Each boundary is an individual being, and in general, does not have ANY knowledge of the neighbour fields. We have to manually link it and sew together with neighbouring region. And since OF wants to be "general", "abstract", etc, some things have to be stitched manually.
I strongly suggest looking through topic:
IN short words- you need to "tell" the boundary what is the "name" of the K field in the neighbour region. This is necessary, and you do that by putting dictionary entry:
K name_of_the_neighbour_K_field;
and the file with that named field HAS to be present in the time folders.

Good luck!

masuarez March 14, 2011 00:13

Boundary conditions
3 Attachment(s)

Thanks for your explanation... I have solved the

K Kcond;

boundary problem.

Regarding the initial conditions for my problem.... the solver is iterating on both regions, however, when post-processing with ParaView, I noticed that it is not solving anything. Obviously, like you said, my boundary conditions are a bit scary (I apologize). I have tried to modify them as much as possible, and I just found the following thread:

which lists several of the types of boundary conditions available on OpenFOAM. My only problem is that I have been playing around with some of them and is a little overwhelming. Is there anyway you can give me a hint as to which boundary conditions are applicable to my case.

I have several questions, but would like to start with the 0/fluid/U:

type flowRateInletVelocity;
flowRate 0.001;
value uniform (0 .001 0);
type fluxCorrectedVelocity;
value uniform (0 0 0);
inletValue uniform (0 .001 0);

Am I using the right format? I have tried to gather as much from many many threads... but it is really hard since people seem to be doing more complicated things.

Thanks for all your help and patience.

psosnows March 14, 2011 05:48

Hello Miguel,

first, congratulations on setting up the case.

Regarding post processing-
If you were able to save the time steps over the simulation, then you have to be able to post process it. It is just a matter of technique.
My suggestion is to do the following:
*) create dummy cases for all your regions:
paraFoam -touch -region REGION_NAME
*) open ParaView (not paraFoam):
*) in ParaView use "open" button to open all regions

There is another method, by creating *.vtk files. I explained it sometime ago, but truly do not remember where.

About the boundary conditions. I have a simple rule: if I do not understand the mechanics of something in OF, I just do not use it. Usually I stick with fixedValue or fixedGradinent BCs. Sometimes I introduce my own modifications. I strongly suggest to dig into the code of the BCs that you are to be using, understand the mechanics, or switch to ones that you know.

Hope it help you a bit.

masuarez June 20, 2011 12:37

Using OpenFoam 1.7
1 Attachment(s)

Sorry about the previous posts... i feel I have wasted your time and mine. I was using Freefoam per my boss' request and was having a great deal of problems. After taking a small break from CFD (Due to school and other responsibilities)... I decided to install OpenFOAM 1.7 and attempt to finally solve my problem.

I modified the case using chtMultiRegionSimpleFoam and have attached the following boundary conditions. I believe all my boundary conditions are correct except the ones dealing with pressure(p and p_rgh). Is there any way you can take a look at them and give me some feedback (any feedback is greatly appreciated)

just to remind you... my case consist of a small duct (.002 X .002 X .25 meters), with air flowing through it. mass flow of 7e-5 kg/sec (laminar flow).

Thank you .


All times are GMT -4. The time now is 15:06.