# externalWallHeatFluxTemperature BC with h as a function of Twall

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 December 15, 2014, 17:00 externalWallHeatFluxTemperature BC with h as a function of Twall #1 Senior Member   Alex Join Date: Oct 2013 Posts: 337 Rep Power: 21 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; } I guess that one possible approach would be to start with this BC and use the necessary expressions to make "h" change each time step depending on the value of T at the boundary. However, I have some doubts about this procedure. ----------------------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 expr.1 else if a expr.2 else if T>c ---> expr.3 Can I do something like that with the groovyBC BC? ------------------------------------------------------------- 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: 11 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, 05:52 #3 Member   Nicole Andrew Join Date: Sep 2014 Location: Pretoria, South Africa Posts: 58 Rep Power: 11 Hi Mick, Good question! I always just assumed groovyBC was calculating it for each individual cell, but perhaps you could use the wallHeatFlux post-processing 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.cfd-online.com/Forums/ope...ance-flow.html)

 November 18, 2015, 07:02 #4 Senior Member   Alex Join Date: Oct 2013 Posts: 337 Rep Power: 21 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, 22:50 #5 New Member   Mick McGill Join Date: Jun 2015 Posts: 16 Rep Power: 11 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 cell-by-cell 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) was having the effect of requesting data as if it were a remote patch, and so it was averaging the cell temperature to perform the heat loss calculation. To remedy this, simply remove the {backwall} term and it will default to using the local temperature, for each individual cell. 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.cfd-online.com/Forums/ope...hase-flow.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 Search this Thread Search this Thread: Advanced Search Display Modes Linear Mode

 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 OffTrackbacks are Off Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post hsingtzu OpenFOAM Meshing & Mesh Conversion 2 March 14, 2012 09:56 Chrisi1984 OpenFOAM Installation 0 December 31, 2010 06:42 feng_w OpenFOAM Installation 1 January 25, 2009 06:59 ivanyao OpenFOAM Running, Solving & CFD 6 September 5, 2008 20:50 liugx212 OpenFOAM Running, Solving & CFD 0 November 18, 2005 18:27

All times are GMT -4. The time now is 23:46.

 Contact Us - CFD Online - Privacy Statement - Top