
[Sponsors] 
externalWallHeatFluxTemperature BC with h as a function of Twall 

LinkBack  Thread Tools  Display Modes 
December 15, 2014, 18:00 
externalWallHeatFluxTemperature BC with h as a function of Twall

#1 
Senior Member
Alex
Join Date: Oct 2013
Posts: 336
Rep Power: 15 
Hi foamers,
I'm trying to simulating a heat transfer case with chtMultiRegionFoam where one of the boundaries transfers heat with the environment by convection. This is a simple problem where the boundary is defined as "externalWallHeatFluxTemperature" defining both values of "Ta" and "h". So far it is a basic case. However, I would like to define the heat transfer in the boundary wall using a variable value of "h" where its value depends on the value of T at the boundary. The first thing I thought about was to use swak4foam but I'm not sure how to tackle it. 1st Question Would it be possible to use the same boundary type (externalWallHeatFluxTemperature), but adding some lines with the expressions needed to calculate h? I don't think so but I ask for it just in case...  I haven't much experince using swak4foam, actually I only used it like one year ago to create a BC for convective heat transfer before I found out that externalWallHeatFluxTemperature existed. This was the definition I used: Code:
sup_convection { type groovyBC; variables ("h=50.0;" "Ta=20.0;" "k=0.5;"); valueExpression "Ta"; fractionExpression "1.0/(1.0 + k/(mag(delta())*h))"; value uniform 200; } 2nd Question a)How can I access the value of T at the boundary to use it in the calculations? b)Imagine I have a set of expressions to be used in the calculations depending on the value of T at the boundary that need to satisfy a condition such as: Code:
if T<a > expr.1 else if a<T<b > expr.2 else if T>c > expr.3  I have been reading the documentation of swak4foam and trying some tutorials and, although I think this is what I need, I still don't know how to do it. If you can give me any hint about the most proper aproach to solve my problem, don't hesitate to do it! I will appreaciate any word you can give me! Remember, you can give me a really nice (and free) Christmas present! Many thanks in advance! Alex Note: I am using OF 2.3.x and I noticed that some swak's tutorial cases are outdated since I couldn't solve the chtMultiRegion case because of a wrong boundary definition for the pressure.
__________________
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! 

September 15, 2015, 10:45 

#2 
New Member
Mick McGill
Join Date: Jun 2015
Posts: 16
Rep Power: 4 
Hi Alex,
Sorry for reviving your old thread, but this seems like one of the only relevant ones to what I'm trying to find out. I'm new to using groovyBC, and trying to find out whether the heat flux is calculated on a patch (presumably as an average or similar) or on each individual cell? I have a case with heat loss through several patches, and am wondering how it is calculated. Thanks, Mick. 

November 18, 2015, 06:52 

#3 
Member
Nicole Andrew
Join Date: Sep 2014
Location: Pretoria, South Africa
Posts: 58
Rep Power: 5 
Hi Mick,
Good question! I always just assumed groovyBC was calculating it for each individual cell, but perhaps you could use the wallHeatFlux postprocessing utility to visualise the heat flux on the patches as a test? (If you have an incomprssible case you can use wallHeatFluxIncompressible which can be downloaded here: http://www.cfdonline.com/Forums/ope...anceflow.html) 

November 18, 2015, 08:02 

#4 
Senior Member
Alex
Join Date: Oct 2013
Posts: 336
Rep Power: 15 
Hi guys!
I'm not totally sure about the first question. Does groovyBC compute heat flux with any option or utility? I need more info about it... The way I used to use in order to compute heat fluxes across patches was either by using, as Nicole points out, wallHeatFux utility or by using a custom function object defined by using swak4foam. Both methods compute first the heat flux per cell and then integrate it over the whole patch. The formula would be something like I hope that my answer may solve this question. Best ragards, 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! 

November 18, 2015, 23:50 

#5 
New Member
Mick McGill
Join Date: Jun 2015
Posts: 16
Rep Power: 4 
Hi Alex and Nicole,
Thanks for the responses, I have since worked it out, and it does in fact calculate the heat loss on a cellbycell basis, when applied properly. The issue that I was having was that the way I was specifiying the temperature applied, Code:
Toutlet{backwall}=oldTime(T) To my understanding, groovyBC is able to compute a variable heat flux, although because it does not perform an energy balance, it instead must apply a temperature gradient. To do this, input the usual heat loss equation for the boundary, but divide it by the thermal conductivity of the material losing heat. I learned this here: http://www.cfdonline.com/Forums/ope...haseflow.html Thanks for the link to the wallHeatFlux utility, I'll use it down the track to validate that my heat loss is correct. 

Tags 
convection, convection heat flux, groovybc, heat exchange, heat transfer 
Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
error message with modeling a cube with a hold at the center  hsingtzu  OpenFOAM Native Meshers: blockMesh  2  March 14, 2012 10:56 
ParaView for OF1.6ext  Chrisi1984  OpenFOAM Installation  0  December 31, 2010 07:42 
Compilation errors in ThirdPartymallochoard  feng_w  OpenFOAM Installation  1  January 25, 2009 07:59 
Problem with compile the setParabolicInlet  ivanyao  OpenFOAM Running, Solving & CFD  6  September 5, 2008 20:50 
Please help about the VTKFoam  liugx212  OpenFOAM Running, Solving & CFD  0  November 18, 2005 19:27 