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

Heat Transfer Coefficients from WallHeatFlux

Register Blogs Community New Posts Updated Threads Search

Like Tree6Likes
  • 1 Post By subsemitonium
  • 2 Post By subsemitonium
  • 3 Post By DaveD!

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 12, 2015, 08:42
Default Heat Transfer Coefficients from WallHeatFlux
  #1
New Member
 
Join Date: Jun 2011
Posts: 24
Rep Power: 14
subsemitonium is on a distinguished road
Hello,

I guess my Question has been discussed before, but unfortunately all the threads I found remained not-answered.

I solve a pipe flow case using buoyantBoussinesqSimpleFoam (steady state) with a laminar stream. I learned from the user guide that the utility wallHeatFlux throws out the wall heat flux (q_dot).

I would like to solve htc = q_dot / (T_wall - T_inlet) with the assumption that T_inlet represents my bulk temperature. My question is: How do I do that? I guess it is not that hard to do, but I've never incorporated equations in OF, so I would really appreciate detailed help.

Thanks in advance!
saidc. likes this.
subsemitonium is offline   Reply With Quote

Old   March 23, 2015, 13:12
Default
  #2
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 21
zfaraday will become famous soon enough
Hello!

I don't know if you have already solved your problem, but if you are still on it I will give you an advice!
An approach to compute heat transfer coefficient is to use some function objects in the controlDict file. If you don't know how to use that feature just type in the terminal
Code:
find $FOAM_TUTORIALS -name controlDict | xargs grep -r functions
and a list of controlDict files where functions have been used in the tutorials directory will be shown. Open any of them with a text editor and study how thay are used in each case.

You don't need to recompile any solver with this approach!

Best 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   March 24, 2015, 02:40
Default
  #3
New Member
 
Join Date: Jun 2011
Posts: 24
Rep Power: 14
subsemitonium is on a distinguished road
Hey,

thanks a lot for your hint. I didn't know about the functions in the controlDict file and read the tutorials. Now I'm not sure how to proceed, since I don't want to use a field that is already calculated (T,U, ...) but the result of the wallHeatFlux utility ... how can I put it in there?
subsemitonium is offline   Reply With Quote

Old   March 24, 2015, 08:20
Default
  #4
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 21
zfaraday will become famous soon enough
Hi,

Remember that the values given by wallHeatFlux utility are gotten from the fields you calculate (T,p,U...), then you can calculate the same values as the utility making use of the functions previously mentioned. If you check the topics I create/participated previously maybe you can find some hint on how to do so.

Cheers,

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   March 25, 2015, 09:25
Default
  #5
New Member
 
Join Date: Jun 2011
Posts: 24
Rep Power: 14
subsemitonium is on a distinguished road
Hey Alex,

thanks for your reply. I read the examples and understood your hint to look what happens in the wallHeatFlux utility. I also read many many of your posts, the closest one for me contained this information:
Quote:
energyAbsorbedBase1 //Thermal power abosorved by all patches of base1 region { type patchExpression; outputControlMode timeStep; outputInterval 1; region base1; patches (".*"); variables ("k=50;" ); expression "k*(snGrad(T))*area()"; accumulations ( sum ); verbose true; }
Unfortunately I don't get it...

To start with, I' not sure about the function type. OF offers the types:
patchProbes
probes
sets
surfaces

I couldn't find information about the proper one ... fieldMinMax and fieldAverage are wrong since I want all of the values on the wall. Anyway, you used patchExpression - I wonder where to get this information from.

Now I want to follow your advice and extract some code from the wallHeatFlux utility. Can you give me any hint?
subsemitonium is offline   Reply With Quote

Old   March 25, 2015, 16:27
Default
  #6
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 21
zfaraday will become famous soon enough
Well, first of all, do you have swak4foam installed on your computer? If not, do it! You need it in order to be able to run this function object (I think). Next step: You have to have something like the following snippet added in the end of your controlDict file:

Code:
libs (
    "libgroovyBC.so"
    "libsimpleFunctionObjects.so"
    "libsimpleSwakFunctionObjects.so"
    "libswakFunctionObjects.so"
    "libgroovyStandardBCs.so"
    "libswakThermoTurbFunctionPlugin.so"
);
It should make it work! Once you have it working, this function object gives you the heat fluxes across all patches!

Edit: By the way, you should have used [CODE] tags instead of [QUOTE] tags in order to make the piece of code more visual.

Enjoy it!

Best 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   March 26, 2015, 04:00
Default
  #7
New Member
 
Join Date: Jun 2011
Posts: 24
Rep Power: 14
subsemitonium is on a distinguished road
Hey,

again, thanks for your advice! I installed swak4Foam and I'm beginning to produce sth like an ouput. I tried to incorporate the following code (this time in code bracket ):

Code:
functions {
    HeatLoss
    {
        type patchExpression;
        patches ( ".+Wall.*" );
    outputControlMode timeStep;
    outputInterval 1;
        verbose true;
        aliases {
            al thermo:alpha;
                }
        expression"(al+alphat)*area()*snGrad(h)";
        accumulations (sum);
        //        debugCommonDriver 1;
    }
};

libs (
    "libgroovyBC.so"
    "libsimpleFunctionObjects.so"
    "libsimpleSwakFunctionObjects.so"
    "libswakFunctionObjects.so"
    "libgroovyStandardBCs.so"
    "libswakThermoTurbFunctionPlugin.so"
);
which I found in example cases. Anything I enter instead of ".+Wall.*" (I want to calculate a wall type named unten) leads to an error saying "al" is not known ...

I also tried your code instead, but have to questions: First, I have a fluid domain, so I'm not sure, whether Fourier approach is the best way? Second, I want a lokal heat flux (for a local heat transfer coefficient), but that code gives me a sum. Anyway, this is an issue I'm struggling with using the common wallHeatFlux tool: When executing, it gives values in W/m², but an average value multiplied with the wall surface area gives a value far from the value given in Watts in the terminal output ...
Apparently I get something wrong. Could you (again) give advice please?
subsemitonium is offline   Reply With Quote

Old   March 26, 2015, 09:38
Default
  #8
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 21
zfaraday will become famous soon enough
Hi!

Quote:
Originally Posted by subsemitonium View Post
Hey,

again, thanks for your advice! I installed swak4Foam and I'm beginning to produce sth like an ouput. I tried to incorporate the following code (this time in code bracket ):

Code:
functions {
    HeatLoss
    {
        type patchExpression;
        patches ( ".+Wall.*" );
    outputControlMode timeStep;
    outputInterval 1;
        verbose true;
        aliases {
            al thermo:alpha;
                }
        expression"(al+alphat)*area()*snGrad(h)";
        accumulations (sum);
        //        debugCommonDriver 1;
    }
};

libs (
    "libgroovyBC.so"
    "libsimpleFunctionObjects.so"
    "libsimpleSwakFunctionObjects.so"
    "libswakFunctionObjects.so"
    "libgroovyStandardBCs.so"
    "libswakThermoTurbFunctionPlugin.so"
);
which I found in example cases. Anything I enter instead of ".+Wall.*" (I want to calculate a wall type named unten) leads to an error saying "al" is not known ...
First of all, what solver are you using? That error means that the field that the variable "al" points to doesn't exist, that is, thermo:alpha is not loaded in memory when you are requesting it. Maybe the solver you are using uses another name to refer to alpha. Anyway, what you can try is to check what files are loaded in memory by adding the following snippet in the functions sub dictionary in the controlDict file:

Code:
    listFields 
    {
        type listRegisteredObjects;
        outputControlMode startup;//timeStep;
        outputInterval 1;
        region regionName; //only in a multi region case     
    }
It will show all available fields in memory at the beginning of the run in the solver's output. Just check if alpha is shown in there and under what name it is loaded.

Quote:
Originally Posted by subsemitonium View Post
I also tried your code instead, but have to questions: First, I have a fluid domain, so I'm not sure, whether Fourier approach is the best way? Second, I want a lokal heat flux (for a local heat transfer coefficient), but that code gives me a sum. Anyway, this is an issue I'm struggling with using the common wallHeatFlux tool: When executing, it gives values in W/m², but an average value multiplied with the wall surface area gives a value far from the value given in Watts in the terminal output ...
Apparently I get something wrong. Could you (again) give advice please?
wallHeatFlux output consists of a new field with the heat flux in each patch's face stored within each time directory [W/m²] (field that can be seen in paraview) and the integration of this field over the whole patch area [W] (value given in the screen or in a log file instead). The integration of the heat flux over the total patch area would be something like
Code:
Q=sum(wallHeatFlux*area())
I hope this explains why you cannot multiply an average value of the wallHeatFlux by the total area, unless all patch faces have equal area.

Hope it helps!

Best 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   March 26, 2015, 10:38
Default
  #9
New Member
 
Join Date: Jun 2011
Posts: 24
Rep Power: 14
subsemitonium is on a distinguished road
... after scores of errors the thought came to me and I changed the calculation in using the T field. What I was looking for was a way to make the solver put out the local heat flux density directly (as the wallHeatFlux utility does) to calculate local heat transfer coefficients. The controlDict functions always give me average or MinMax values instead of each face values. Isn't there a way put out all values or to incorporate the wallHeatFlux utility in the solver, so that it is just calculated every timestep? But I can run the wallHeatFlux tool afterwards .. that's ok as well.

Sorry that I forgot to attach my case. In fact, my patches are all equal size But I simply don't get, why the calculated values are about 30% too high (compared to VDI heat atlas theory for laminar plate flow)! Any idea for that? I noticed you do a lot of calculations with heat transfer ...
Attached Files
File Type: gz case.tar.gz (3.4 KB, 73 views)
subsemitonium is offline   Reply With Quote

Old   March 27, 2015, 08:26
Default
  #10
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 21
zfaraday will become famous soon enough
Hi,
Quote:
Originally Posted by subsemitonium View Post
... after scores of errors the thought came to me and I changed the calculation in using the T field. What I was looking for was a way to make the solver put out the local heat flux density directly (as the wallHeatFlux utility does) to calculate local heat transfer coefficients. The controlDict functions always give me average or MinMax values instead of each face values. Isn't there a way put out all values or to incorporate the wallHeatFlux utility in the solver, so that it is just calculated every timestep? But I can run the wallHeatFlux tool afterwards .. that's ok as well.
Well, now you have swak4foam installed maybe you better study deeper its possibilities since it has a function object that allows you to create your own custom fields and other one to manipulate fields. Making use of this (and maybe other) function objects you can create your own wallHeatFlux field on the fly during the run to suit your needs. Check out swak4foam's documentation in order to find out if it can come handy for your case or not.

Quote:
Originally Posted by subsemitonium View Post
Sorry that I forgot to attach my case. In fact, my patches are all equal size But I simply don't get, why the calculated values are about 30% too high (compared to VDI heat atlas theory for laminar plate flow)! Any idea for that? I noticed you do a lot of calculations with heat transfer ...
Yes, I usually use OpenFOAM for heat transfer calculations mainly. However, I'm sorry that now I have no time to check your case since I'm busy with my own cases. Nevertheless, maybe the problem is your discretization at the boundary, as per what you say, maybe if you refine the mesh near the boundary you can get more accurate results. I'm talking from a blind point of view because I haven't even downloaded your case, but it might be a point to start with. Otherwise, maybe it's a problem about a bad setting of the time step, have you checked your Courant number?

If I have some time in the following days (quite unlikely) I will take it a quick glance.

Hope it can be a little helpful.

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   March 27, 2015, 08:40
Default
  #11
New Member
 
Join Date: Jun 2011
Posts: 24
Rep Power: 14
subsemitonium is on a distinguished road
Thanks for your reply! I'll check that manual for sure, since I want to incorporate volumetric heat source, which I saw is also possible with swak4foam.

Mesh refinement was not the problem with the case, indeed the boundary inlet condition of velocity field was the bad guy. I had to set mass flow and not uniform speed, because it contradicted the wall condition (ux = 0) in the lowest cell. The error is down to a very few percent now.

So, save the time downloading my case - it can be considered closed. Thanks again!
shach934 and Konstantinos_V like this.
subsemitonium is offline   Reply With Quote

Old   March 27, 2015, 08:54
Default
  #12
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 21
zfaraday will become famous soon enough
For a volumetric heat source you don't need to use swak4foam, it can be done by means of the use of fvOptions tool. The only thing you have to do is to add a fvOptions file in your system directory. Study semiImplicitSource type (maybe this is not the exact name, I'm talking from memory, just google it) in order to apply a volumetric heat source to your case!

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   October 10, 2018, 15:09
Default
  #13
Member
 
Yijiu Jiang
Join Date: Jan 2013
Location: Michigan, US
Posts: 49
Rep Power: 13
y_jiang is on a distinguished road
Hi Alex,


Have you made the heat transfer coefficient calculation work? I recently have the same problem. I am working on OF 5.0. Do you have any hint on how to calculate the HTC.
y_jiang is offline   Reply With Quote

Old   January 12, 2019, 08:22
Default
  #14
Senior Member
 
Jianrui Zeng
Join Date: May 2018
Location: China
Posts: 157
Rep Power: 7
calf.Z is on a distinguished road
I am now using externalWallHeatFluxTemperature BC to give the constant heat flux:

WALL
{
type externalWallHeatFluxTemperature;
mode flux;
q uniform 6666;
value $internalField;
kappaMethod fluidThermo;
}

After the simulation, I use WallheatFlux to check the heat flux in WALL. It should be 6666W/m2, right? .

If I use tabulated method to get the thermophysicalProperties, The result of heat flux is far bigger than the setting ones. But If I use the original thermophysicalProperties, the heat flux is 6666.

I am confused about it. Any hint is appreciated.
calf.Z is offline   Reply With Quote

Old   February 16, 2019, 04:08
Default
  #15
New Member
 
Kevin Habrock
Join Date: Oct 2018
Posts: 22
Rep Power: 7
Kevin.H is on a distinguished road
Dear Calf Z.
Code:

If I use tabulated method to get the thermophysicalProperties, The  result of heat flux is far bigger than the setting ones. But If I use  the original thermophysicalProperties, the heat flux is 6666.

Can u maybe describe the last way a little bit more for me?
I only get the wallHeatFlux when I type this commando in the Terminal (OF4.1). And the results are not correct as well.


Best regards
Kevin.H is offline   Reply With Quote

Old   February 18, 2019, 06:20
Default
  #16
Senior Member
 
Jianrui Zeng
Join Date: May 2018
Location: China
Posts: 157
Rep Power: 7
calf.Z is on a distinguished road
Quote:
Originally Posted by Kevin.H View Post
Dear Calf Z.

Can u maybe describe the last way a little bit more for me?
I only get the wallHeatFlux when I type this commando in the Terminal (OF4.1). And the results are not correct as well.

Best regards
If I use tabulated method, the thermoProperties is changed with T, e.g. kappa. When I use wallHeatFlux to check the heat flux in wall. the result is not equal to the setting one.

But if I use constant thermoProperties, The result of using wallHeatFlux is the same as the setting one. So I am confused about it.
calf.Z is offline   Reply With Quote

Old   February 8, 2020, 06:46
Default
  #17
New Member
 
Join Date: Feb 2016
Posts: 20
Rep Power: 10
DaveD! is on a distinguished road
Quote:
Originally Posted by subsemitonium View Post
Hello,

I guess my Question has been discussed before, but unfortunately all the threads I found remained not-answered.

I solve a pipe flow case using buoyantBoussinesqSimpleFoam (steady state) with a laminar stream. I learned from the user guide that the utility wallHeatFlux throws out the wall heat flux (q_dot).

I would like to solve htc = q_dot / (T_wall - T_inlet) with the assumption that T_inlet represents my bulk temperature. My question is: How do I do that? I guess it is not that hard to do, but I've never incorporated equations in OF, so I would really appreciate detailed help.

Thanks in advance!
Dear all,

starting from version v1812, OpenFOAM now offers a built-in functionObject named "heatTransferCoeff" for postProcessing. It is able to calculate the wall HTC in three different ways: https://www.openfoam.com/documentati...fer-coeff.html

OpenFOAM v7 also has a functionObject "wallHeatTransferCoeff" that is only able to calculate wall HTC based on Reynolds analogy, which is only applicable for very rare standard cases with well defined flow schemes (flat plate, pipe flow).

The most common way is to relate the wall heat flux to the difference between the wall temperature and a reference temperature, the latter of which is usually a constant value, p.e. the inlet temperature:

h = \frac{\hat{\dot{q}}}{T_W - T_{ref}}

For this purpose, I have implemented a new field functionObject called "myWallHeatTransferCoeff". I used the "wallHeatFlux" functionObject as template for implementation.

For use, put all the attached files into a folder (preferably $FOAM_RUN/extensions/myWallHeatTransferCoeff) and compile with wmake via command line.

In controlDict, add the following:

Code:
libs
(
    "myLibfieldFunctionObjects.so"
); 

functions
{
    wallHTC1
    {
        type myWallHeatTransferCoeff;
        libs ("myLibfieldFunctionObjects.so");
        patches ("wall_heated");
        writeControl writeTime;
        Tref 306.7;
    }
}
I have already reported this as contribution feature in https://bugs.openfoam.org/view.php?id=3446, but implementation appears to lack commercial or financial interests

It would be a pleasure if anybody could merge with existent wallHeatTransferCoeff object or implement as new functionObject.

Thanks, DaveD
Attached Files
File Type: zip myWallHeatTransferCoeff.zip (5.1 KB, 120 views)
crubio.abujas, Clau.77 and TGS like this.
DaveD! is offline   Reply With Quote

Old   December 22, 2022, 10:34
Default
  #18
New Member
 
Joao Coelho
Join Date: Jun 2021
Posts: 23
Rep Power: 4
jcoelho5 is on a distinguished road
If anyone have time, please check my post
heat flux coefficient with wallHeatTransfCoeff

I am having some problems using wallHeatTransfCoeff utility
jcoelho5 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
Porous domain:Interfacial area density and heat transfer coefficient l.te CFX 2 May 17, 2014 23:45
radiation heat transfer GeHa FLUENT 1 September 5, 2012 14:56
Correlations for heat transfer coefficients poornima Main CFD Forum 2 April 27, 2006 11:27
Question on heat transfer coefficient!!! Benny FLUENT 7 June 7, 2005 09:25
Heat Transfer Coefficients Ashish Kumar Gupta Siemens 6 November 22, 2001 02:50


All times are GMT -4. The time now is 05:12.