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

Inconsistency in wallHeatFlux utility

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 21, 2014, 14:53
Default Inconsistency in wallHeatFlux utility
  #1
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 21
zfaraday will become famous soon enough
Hello FOAMers!

I am studying a simple case with chtMultiRegionSimpleFoam (just to practice the set up for radiation and heat generation) consisting of 2 cubic solid regions (one is generating heat power, actually its temperature is defined as a constant of 600K because I still don't know how to set up a volumetric heat source) surrounded by a bigger cubic region of air. All of the boundary faces for the air region are isolated (using externalWallHeatFluxTemperature wit q=0) except one (defined as externalWallHeatFluxTemperature with Ta=293K and h=1).

The purpose of this simple case is, of course, study what happens when the heating region heats the whole system, either considering radiation or not.

Then, here comes the point! I executed the wallHeatFlux utility to check the energy balance in the system and I found something that is making me crazy. Below you can see the results I got.

Code:
air
Wall heat fluxes [W]
maxY -63.0738
minX -0.003706714
maxX -0.009187714
minY -0.0116676
bottom -0.002245114
top -0.002884371
air_to_heater 141.7464
air_to_object -73.04159
Code:
heater
Wall heat fluxes [W]
bottom 0
heater_to_air -141.74
Code:
object
Wall heat fluxes [W]
object_to_air 24.3712
As you can see the heat absorbed by the object (yes, I know, it's the most original name for a region anyone has ever heard) is not the same that goes from the air to the object. Furthermore, right now I realised that the energy in the air is also unbalanced since there is a difference of 5W between then energy coming in and going out of the air domain.

Have anyone experinced something similar any time? Am I doing anything wrong? Is there something going wrong with the utility? Any hint or advice will be more than welcome!


Thanks in advance!


Alex

PS: The results are extracted fom a case without radiation, but the same occurs adding the radiation component.
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com

The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in!

Last edited by zfaraday; May 21, 2014 at 15:17. Reason: PS added
zfaraday is offline   Reply With Quote

Old   May 21, 2014, 15:39
Default
  #2
New Member
 
Jean El-Hajal
Join Date: Jun 2010
Location: Ulm
Posts: 16
Rep Power: 15
Jean El-Hajal is on a distinguished road
Dear Alex,

I did not check you post in details, but today we made a simulation with chtMultiRegionSimpleFoam solver and the externalWallHeatFluxTemperature boundary condition with Ta and h. It did not work for us. Nothing happened it was just like an adiabatic wall.

Hope it help.

Best Regards,

Jean
Jean El-Hajal is offline   Reply With Quote

Old   May 21, 2014, 15:48
Default
  #3
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 21
zfaraday will become famous soon enough
Quote:
Originally Posted by Jean El-Hajal View Post
Dear Alex,

I did not check you post in details, but today we made a simulation with chtMultiRegionSimpleFoam solver and the externalWallHeatFluxTemperature boundary condition with Ta and h. It did not work for us. Nothing happened it was just like an adiabatic wall.

Hope it help.

Best Regards,

Jean
I don't understand what you mean when you say "Nothing happened". Did you get an error? An adiabatic wall doesn't make sense at all. Look at my results, my wall that isn't isolated is the one called "maxY" and, as you can see, is not adiabatic (maxY -63.0738).

Check the values you gave to Ta and h. If Ta is close to the wall temperature then the heat flux will be close to 0. Likewise if you gave h a value close to 0.

Regards,

Alex
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com

The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in!
zfaraday is offline   Reply With Quote

Old   May 22, 2014, 04:56
Default
  #4
Senior Member
 
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 17
olivierG is on a distinguished road
hello,

Which OF version do you use ?
Because there where some bug in 2.2 and 2.3 corrected in 2.3.x.
See http://www.openfoam.org/mantisbt/view.php?id=1258
and http://www.openfoam.org/mantisbt/view.php?id=1108

regards,
olivier
olivierG is offline   Reply With Quote

Old   May 22, 2014, 04:59
Default
  #5
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 21
zfaraday will become famous soon enough
I using 2.2.1 version. Does it mean that I need to install 2.3.x in order to be capable to get the correct results?

Thanks olivierG
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com

The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in!
zfaraday is offline   Reply With Quote

Old   May 22, 2014, 05:02
Default
  #6
Senior Member
 
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 17
olivierG is on a distinguished road
the 2.2.x and 2.3.x should work.

regards,
olivier
olivierG is offline   Reply With Quote

Old   May 22, 2014, 05:40
Default
  #7
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 21
zfaraday will become famous soon enough
Thank you so much olivier for your information. I will try to install ot when I have time for that.
By the way, in the bugs reported im your links above it is said that this occurs with the externalWallHeatFlux BC. However my main problem occurs in the interface between a solid region and a fluid region and the BC in there is turbulent::TemperatureCoupledBaffleMixed (written from memory, maybe the spelling is not correct). Would your approach solve that issue aswell?

Many thanks!
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com

The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in!
zfaraday is offline   Reply With Quote

Old   May 22, 2014, 05:55
Default
  #8
Senior Member
 
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 17
olivierG is on a distinguished road
I don't know for turbulentTemperatureCoupledBaffleMixed, but there where improvement in 2.3 about that (see http://www.openfoam.org/version2.3.0/thermal.php ).

regards,
olivier
olivierG is offline   Reply With Quote

Old   May 22, 2014, 08:08
Default
  #9
Member
 
Laurent Fitschy
Join Date: May 2011
Posts: 40
Rep Power: 14
GDTech is on a distinguished road
Hi Alex,

From my experience, chtMultiRegionSimpleFoam takes sometimes a really large number of iterations to reach thermal convergence (correct energy balance). I suggest you to set probes on walls between fluid and solid regions to monitor temperature. Add this to your controlDict :

Code:
functions
{
    probes
    {
        type            probes;
        functionObjectLibs ("libsampling.so");
        outputControl   timeStep;
        outputInterval  1;
        probeLocations
        (
            ( 0 9.95 19.77 )
            ( 0 -9.95 19.77 )
        );
        fields
        (
            T
        );
    }
}
Energy balance will be correct when interface temperature do not change anymore.

If this temperature is converged and energy balance is still wrong, your BCs are probably not correct.

Laurent.
GDTech is offline   Reply With Quote

Old   May 22, 2014, 11:57
Default
  #10
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 21
zfaraday will become famous soon enough
Thanks for your advices Olivier and Laurent!

@Laurent, I would like to be able to understand the piece of code you posted because it's the first time I add something like that to the controlDict file and I am getting errors all the time when I try to run the case.

Could you please explain briefly the use and meaning of every field within probes, mainly the probeLocation one. Otherwise, if you can, give me some link or site where I can reveiw some useful documentation.

Thanks again!


Alex
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com

The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in!
zfaraday is offline   Reply With Quote

Old   May 23, 2014, 03:06
Default
  #11
Member
 
Laurent Fitschy
Join Date: May 2011
Posts: 40
Rep Power: 14
GDTech is on a distinguished road
Hi,

Here is some general information about functionObjects :

http://foam.sourceforge.net/docs/cpp/a00002.html

ProbeLocation is a set of points (x, y, z coordinates) where you want to measure the field written in the "fields" token ("T" in my example).
2 points are set in my example, but you can add more if you want.

Laurent.
GDTech is offline   Reply With Quote

Old   May 23, 2014, 03:14
Default
  #12
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 21
zfaraday will become famous soon enough
Thank you so much Laurent, that was exactly what I needed!! I will take a look into it later
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com

The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in!
zfaraday is offline   Reply With Quote

Old   May 27, 2014, 17:43
Default
  #13
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 21
zfaraday will become famous soon enough
After some days away from OpenFOAM, finally today I got back on track. I could run the case using probes function object, but I didn't see anything. Is it supposed to create some files with the requested results, isn't it? Although I couldn't get anything from function objects functionality, I tried something more visual, that is, I displayed the patches between both surfaces and I found out that the temeprature distribution is the same in both patches. So, where can be the error in my case? What can be wrong in my setup? Or is it something related to the issue mentioned above in the wallHeatFlux utility?

Thanks in advance, any hint will be welcome!

Regards,

Alex
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com

The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in!
zfaraday is offline   Reply With Quote

Old   May 28, 2014, 15:32
Default
  #14
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 21
zfaraday will become famous soon enough
Dear Laurent,

sorry for my previous response, I wrote too quick. After looking a little further into the case folder I found the info inside the PostProcessing folder and, indeed, you were right, the temperature seems not to be equal in the same point.

These are the results in the latest time of my simulation for the air region
Code:
417.9127       423.2814        -1e+300       428.8006
and here are the results for the object region
Code:
350.2071       350.2188       350.1326        -1e+300
The two first values are the important ones. They come from the same points (two different points belonging both to the boundary) in the boundary between both regions. As it is shown, they are not even similar. Thus, finally I could verify that the problem was the thermal convergence in the walls, so what do I need to do to solve that?

On the other hand, as I said in my previous post, I tried to check the temperature values in the walls by using ParaView, this is, I displayed the temperature distribution in the boundary faces (air_to_object and object_to_air) but both distributions were equal! Did I do anything wrong? Is this method not able to identify this issue with thermal convergence?

Many thanks in advance!

Alex
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com

The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in!
zfaraday is offline   Reply With Quote

Old   May 30, 2014, 02:55
Default
  #15
Member
 
Laurent Fitschy
Join Date: May 2011
Posts: 40
Rep Power: 14
GDTech is on a distinguished road
Hi Alex,

Quote:
Originally Posted by zfaraday View Post
Thus, finally I could verify that the problem was the thermal convergence in the walls, so what do I need to do to solve that?
Well ! So, you need to restart your simulation for a few more iterations until your probes report the same temperature on both sides. It is sometimes really slow to reach thermal convergence, then I also suggest you to follow this tip :

http://www.cfd-online.com/Forums/ope...tml#post338430

Quote:
On the other hand, as I said in my previous post, I tried to check the temperature values in the walls by using ParaView, this is, I displayed the temperature distribution in the boundary faces (air_to_object and object_to_air) but both distributions were equal! Did I do anything wrong? Is this method not able to identify this issue with thermal convergence?
I don't know exactly what's happening but my guess is that paraview reads the boundary condition in T file which is the same in both regions ... boundary conditions are equal but not field values just next to the boundary since convergence is not reached ...

Laurent.
GDTech is offline   Reply With Quote

Old   May 30, 2014, 07:55
Default
  #16
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 21
zfaraday will become famous soon enough
Quote:
Originally Posted by GDTech View Post
Hi Alex,

Well ! So, you need to restart your simulation for a few more iterations until your probes report the same temperature on both sides. It is sometimes really slow to reach thermal convergence, then I also suggest you to follow this tip :

http://www.cfd-online.com/Forums/ope...tml#post338430
I actually tried it right after posting the comment (again I posted it too fast :P) and, indeed, it was a matter of time, after a few minutes I reached thermal convergence and everything was fine. But then I tried the same case but adding radiation to the case and something weird occurred (at least to my eyes...). It seems to reach steady state, since temperature shown with probes function object remains constant for the last iterations, but the temperature is not the same in both boundaries. When I get home I will upload the results of my case to se if I can get some help.

Quote:
I don't know exactly what's happening but my guess is that paraview reads the boundary condition in T file which is the same in both regions ... boundary conditions are equal but not field values just next to the boundary since convergence is not reached ...

Laurent.
I don't get what you mean, Laurent. You say that BC are equal in both regions. However, as you can see in the results shown above extrated from probes, in the same point (belonging to the BC of both regions) the temperature is diferent for each region.

Thanks for your explanations, Laurent

Alex
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com

The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in!
zfaraday is offline   Reply With Quote

Reply

Tags
chtmultiregionsimplefoam, radiation, wallheatflux


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
wallHeatFlux utility for an incompressible case Mr.Jingles OpenFOAM Post-Processing 67 April 6, 2023 03:25
Heat flux calculating with wallHeatFlux utility and alphaEff tanshihaj OpenFOAM Post-Processing 0 March 12, 2014 05:55
wallHeatFlux utility with chtMultiRegionFoam solver. Usem OpenFOAM Programming & Development 9 January 6, 2014 05:10
wallHeatFlux utility and chtMultiRegionFoam solver Lada OpenFOAM Post-Processing 4 June 7, 2012 09:46
wallHeatFlux utility in OpenFoam1.6 maruthamuthu_venkatraman OpenFOAM 29 October 3, 2011 10:43


All times are GMT -4. The time now is 17:04.