CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   Difference between IDefault and G (radiation) (

FlyingCat October 4, 2016 11:22

Difference between IDefault and G (radiation)

Sorry but I am a new OpenFOAM user so maybe it is an easy question.

When the radiation is activated, we must have two files of boundary condition: G and IDefault. I understand that G gives the Marshak boundary condition to the walls (usually). Then, IDefault gives greydiffusivewalls (in tutorials). I do not understand that. It appears to be redundant to me, we already give a radiation boundary condition.

So I just would like to know the meaning of this two files. I think there is something that I do not understand.


FlyingCat October 10, 2016 03:56

Nobody knows ?

TobM October 10, 2016 07:55

G is used for P1 model, IDefault for fvDOM model and Qr for viewFactor model.

FlyingCat October 10, 2016 08:07

Thank you for the response.

esujby February 17, 2017 12:30

Hi, from my understanding, G is incident radiation and iDefault is radiation intensity ray which calculates radiation intensity.

G= Qin + Qem

so if you think about it this way, G is the total heat that's been absorbed and emitted within a media and IDefault which i believe is used for calculating Qin, which stands for incident radiation heat flux. not too sure but you can easily find out using the search box here, its pretty effective.

That's IDefault

FlyingCat March 7, 2017 11:40


Actually, Qr=Qin-Qem where Qem is emissivity*Sigma*T⁴

I have checked it with an easy case. Qin is the total incident radiative heat flux field.

G is used with the P1 model. But, even if I use the fvDOM method, OpenFoam calculates G. G is incident radiation.

Actually, we have Qr=-1/(3a)*grad(G) (if we do not have scattering).

So I do not understand one thing. Why do we call G the incident radiation ? Qin and G are different but their name seem to be the same for me. Both are in W/mē and it is what the wall receives. If someone can explain what is the physical difference between G and Qin, I would be grateful.

esujby March 7, 2017 13:32

Hello Fabien,

hmm interesting: well looking at the source code, it shows that Qr, Qin and Qem are independently calculated:


void Foam::radiation::fvDOM::updateG()
G_ = dimensionedScalar("zero",dimMass/pow3(dimTime), 0.0);
Qr_ = dimensionedScalar("zero",dimMass/pow3(dimTime), 0.0);
Qem_ = dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0);
Qin_ = dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0);

forAll(IRay_, rayI)
G_ += IRay_[rayI].I()*IRay_[rayI].omega();
Qr_.boundaryFieldRef() += IRay_[rayI].Qr().boundaryField();
Qem_.boundaryFieldRef() += IRay_[rayI].Qem().boundaryField();
Qin_.boundaryFieldRef() += IRay_[rayI].Qin().boundaryField();
in my case, for example, Qr=Qin, however......

to answer your question specifically

G accounts for the black body radiation and is the summation of all radiation contribution from all rays and can be calculated my multiplying the intensity of the ray by its solid angle.

so once G is updated, Qr, is calculated from G. and I as you clearly stated in your last reply, the Qem and Qin are then calculated.

However, i would reconfirm this with an expert like Bruno santos if i were you

FlyingCat March 13, 2017 05:12

Well I think you are right concerning the calculations of each parameter.

But my last question is what is the difference between Qin and G ? They have similar names but it is not the same thing. What is the power received by the wall for example, Qin or G ?

Thank you for your responses.

esujby March 13, 2017 14:18

they are completely different!!!!

if you try to run a simple case, you will realize that Qin is only calculated at the boundary and G is calculated on the boundaries and throughout the region itself.

Qin is the energy generated at the surface. for example, if you have a black body under the sun, Qin will be the heat flux on the intercepting surface, which will be conducted by the regions bellow the surface.

in practical terms, Qin is calculated based on absorptivity value.

G, like I said earlier, is:


G accounts for the black body radiation and is the summation of all radiation contribution from all rays and can be calculated my multiplying the intensity of the ray by its solid angle.
G is the radiation contribution of all rays, sort of like the average distribution of heats flux throughout the region.

I will confirm all these details with an expert like Bruno Santos and a few others.

esujby April 9, 2017 21:09


i am wondering where you got this from? is it based on your results?


Actually, we have Qr=-1/(3a)*grad(G) (if we do not have scattering).

FlyingCat April 10, 2017 03:07



It is the user guide of fluent. We use the same boundary condition (Marshak) in OpenFOAM so I guess G is the same for both softwares.

HannesJo November 24, 2017 09:30

1 Attachment(s)
In my opinion the calculation of G in the fvDOM model is wrong. At our institute we developed our own and improved view factor model and work with it quite a lot. We also calculate and write the G-field there and so I compared both models in a test case. I found out that the G-field differs exactly by a factor of 4. I digged in the source code and found the calculation of G:

G_ += IRay_[rayI].I()*IRay_[rayI].omega();
However, according to theory (for example "Incropera: Introduction to Heat transfer") G equals Pi*I over the whole hemisphere. With the above sum one obtains G equal Pi*4*I, so that G is wrong by a factor of 4. As G is not used to calculate wall temperatures but just the absorbtion inside the fluid, probably nobody noticed so far.

Do you agree with me and should I write a bug report? I never did this so far

FlyingCat November 24, 2017 10:02


It is not wrong neither in OpenFOAM nor in your book. The difference simply comes from the definition of G.

I had a look into your book and the parameter G is calculated only on one hemisphere so
\int d\Omega=\pi
But on the whole space, the solid angle is worth 4\pi.

The factor 4 comes from this.

HannesJo November 24, 2017 10:39


thanks for your quick reply. So far, I just have seen G with the definition in the book, I have never seen G defined by I*4*Pi.

When I look at the source term for the fluid, you seem to be right as the emission term is 4 \sigma T^4 and not \sigma T^4.

This probably also confuses some other people, thanks for pointing out the difference.

FlyingCat November 24, 2017 10:51

Yes, it confused me at the beginning :)

Actually, G is not directly the incident radiation even if we call it like that so we have not got:

q_r=G-\sigma T^4

but \nabla . q_r=a(G-4\sigma T^4)

with a the absorption coefficient in m^{-1}

To have the incident radiation, you need the direction because

q_{in}=\int_{one~hemisphere} I(r,s)sd\Omega

And then you have q_r=q_{in}-\sigma T^4

HannesJo November 24, 2017 10:56

Exactly. It is due to the fact that G is used for the energy balance of a single ray and not of a physical surface. The programmer redefined it a little, but for me knowing G from my lectures and books, it was really confusing.

All times are GMT -4. The time now is 18:28.