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

Heat Transfer Coefficients from WallHeatFlux

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   March 12, 2015, 09:42
Default Heat Transfer Coefficients from WallHeatFlux
  #1
New Member
 
Join Date: Jun 2011
Posts: 24
Rep Power: 6
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!
subsemitonium is offline   Reply With Quote

Old   March 23, 2015, 14:12
Default
  #2
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 310
Rep Power: 13
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, 03:40
Default
  #3
New Member
 
Join Date: Jun 2011
Posts: 24
Rep Power: 6
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, 09:20
Default
  #4
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 310
Rep Power: 13
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, 10:25
Default
  #5
New Member
 
Join Date: Jun 2011
Posts: 24
Rep Power: 6
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, 17:27
Default
  #6
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 310
Rep Power: 13
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, 05:00
Default
  #7
New Member
 
Join Date: Jun 2011
Posts: 24
Rep Power: 6
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, 10:38
Default
  #8
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 310
Rep Power: 13
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, 11:38
Default
  #9
New Member
 
Join Date: Jun 2011
Posts: 24
Rep Power: 6
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, 7 views)
subsemitonium is offline   Reply With Quote

Old   March 27, 2015, 09:26
Default
  #10
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 310
Rep Power: 13
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, 09:40
Default
  #11
New Member
 
Join Date: Jun 2011
Posts: 24
Rep Power: 6
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!
subsemitonium is offline   Reply With Quote

Old   March 27, 2015, 09:54
Default
  #12
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 310
Rep Power: 13
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

Reply

Thread Tools
Display Modes

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 On
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 CD-adapco 6 November 22, 2001 03:50


All times are GMT -4. The time now is 20:09.