|
[Sponsors] |
March 12, 2015, 08:42 |
Heat Transfer Coefficients from WallHeatFlux
|
#1 |
New Member
Join Date: Jun 2011
Posts: 24
Rep Power: 14 |
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! |
|
March 23, 2015, 13:12 |
|
#2 |
Senior Member
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 21 |
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, 02:40 |
|
#3 |
New Member
Join Date: Jun 2011
Posts: 24
Rep Power: 14 |
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, 08:20 |
|
#4 |
Senior Member
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 21 |
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, 09:25 |
|
#5 | |
New Member
Join Date: Jun 2011
Posts: 24
Rep Power: 14 |
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, 16:27 |
|
#6 |
Senior Member
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 21 |
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, 04:00 |
|
#7 |
New Member
Join Date: Jun 2011
Posts: 24
Rep Power: 14 |
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, 09:38 |
|
#8 | ||
Senior Member
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 21 |
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, 10:38 |
|
#9 |
New Member
Join Date: Jun 2011
Posts: 24
Rep Power: 14 |
... 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, 08:26 |
|
#10 | ||
Senior Member
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 21 |
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, 08:40 |
|
#11 |
New Member
Join Date: Jun 2011
Posts: 24
Rep Power: 14 |
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, 08:54 |
|
#12 |
Senior Member
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 21 |
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! |
|
October 10, 2018, 15:09 |
|
#13 |
Member
Yijiu Jiang
Join Date: Jan 2013
Location: Michigan, US
Posts: 49
Rep Power: 13 |
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. |
|
January 12, 2019, 08:22 |
|
#14 |
Senior Member
Jianrui Zeng
Join Date: May 2018
Location: China
Posts: 157
Rep Power: 7 |
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. |
|
February 16, 2019, 04:08 |
|
#15 |
New Member
Kevin Habrock
Join Date: Oct 2018
Posts: 22
Rep Power: 7 |
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 |
|
February 18, 2019, 06:20 |
|
#16 | |
Senior Member
Jianrui Zeng
Join Date: May 2018
Location: China
Posts: 157
Rep Power: 7 |
Quote:
But if I use constant thermoProperties, The result of using wallHeatFlux is the same as the setting one. So I am confused about it. |
||
February 8, 2020, 06:46 |
|
#17 | |
New Member
Join Date: Feb 2016
Posts: 20
Rep Power: 10 |
Quote:
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: 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; } } It would be a pleasure if anybody could merge with existent wallHeatTransferCoeff object or implement as new functionObject. Thanks, DaveD |
||
December 22, 2022, 10:34 |
|
#18 |
New Member
Joao Coelho
Join Date: Jun 2021
Posts: 23
Rep Power: 4 |
If anyone have time, please check my post
heat flux coefficient with wallHeatTransfCoeff I am having some problems using wallHeatTransfCoeff utility |
|
|
|
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 |