
[Sponsors] 
March 12, 2015, 09:42 
Heat Transfer Coefficients from WallHeatFlux

#1 
New Member
Join Date: Jun 2011
Posts: 24
Rep Power: 7 
Hello,
I guess my Question has been discussed before, but unfortunately all the threads I found remained notanswered. 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! 

March 23, 2015, 14:12 

#2 
Senior Member
Alex
Join Date: Oct 2013
Posts: 332
Rep Power: 14 
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 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! 

March 24, 2015, 03:40 

#3 
New Member
Join Date: Jun 2011
Posts: 24
Rep Power: 7 
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? 

March 24, 2015, 09:20 

#4 
Senior Member
Alex
Join Date: Oct 2013
Posts: 332
Rep Power: 14 
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! 

March 25, 2015, 10:25 

#5  
New Member
Join Date: Jun 2011
Posts: 24
Rep Power: 7 
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:
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? 

March 25, 2015, 17:27 

#6 
Senior Member
Alex
Join Date: Oct 2013
Posts: 332
Rep Power: 14 
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" ); 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! 

March 26, 2015, 05:00 

#7 
New Member
Join Date: Jun 2011
Posts: 24
Rep Power: 7 
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" ); 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? 

March 26, 2015, 10:38 

#8  
Senior Member
Alex
Join Date: Oct 2013
Posts: 332
Rep Power: 14 
Hi!
Quote:
Code:
listFields { type listRegisteredObjects; outputControlMode startup;//timeStep; outputInterval 1; region regionName; //only in a multi region case } Quote:
Code:
Q=sum(wallHeatFlux*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! 

March 26, 2015, 11:38 

#9 
New Member
Join Date: Jun 2011
Posts: 24
Rep Power: 7 
... 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 ... 

March 27, 2015, 09:26 

#10  
Senior Member
Alex
Join Date: Oct 2013
Posts: 332
Rep Power: 14 
Hi,
Quote:
Quote:
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! 

March 27, 2015, 09:40 

#11 
New Member
Join Date: Jun 2011
Posts: 24
Rep Power: 7 
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! 

March 27, 2015, 09:54 

#12 
Senior Member
Alex
Join Date: Oct 2013
Posts: 332
Rep Power: 14 
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! 

Thread Tools  
Display Modes  


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