CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

externalWallHeatFluxTemperature BC with h as a function of Twall

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 15, 2014, 18:00
Default externalWallHeatFluxTemperature BC with h as a function of Twall
  #1
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 22
zfaraday will become famous soon enough
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<a ---> expr.1
else if a<T<b ---> 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!
zfaraday is offline   Reply With Quote

Old   September 15, 2015, 11:45
Default
  #2
New Member
 
Mick McGill
Join Date: Jun 2015
Posts: 16
Rep Power: 11
mick223 is on a distinguished road
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.
mick223 is offline   Reply With Quote

Old   November 18, 2015, 06:52
Default
  #3
Member
 
Nicole Andrew
Join Date: Sep 2014
Location: Pretoria, South Africa
Posts: 58
Rep Power: 12
Nicole is on a distinguished road
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)
Nicole is offline   Reply With Quote

Old   November 18, 2015, 08:02
Default
  #4
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 22
zfaraday will become famous soon enough
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

\frac{\sum heatFlux_{i} * area_{i}}{\sum area_{i}}

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!
zfaraday is offline   Reply With Quote

Old   November 18, 2015, 23:50
Default
  #5
New Member
 
Mick McGill
Join Date: Jun 2015
Posts: 16
Rep Power: 11
mick223 is on a distinguished road
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.
mick223 is offline   Reply With Quote

Reply

Tags
convection, convection heat flux, groovybc, heat exchange, heat transfer


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[blockMesh] error message with modeling a cube with a hold at the center hsingtzu OpenFOAM Meshing & Mesh Conversion 2 March 14, 2012 10:56
ParaView for OF-1.6-ext 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 21:50
Please help about the VTKFoam liugx212 OpenFOAM Running, Solving & CFD 0 November 18, 2005 19:27


All times are GMT -4. The time now is 13:21.