# Variable T_inf for convection problem in a pipe using groovyBC

 Register Blogs Members List Search Today's Posts Mark Forums Read

September 4, 2013, 13:50
Variable T_inf for convection problem in a pipe using groovyBC
#1
Senior Member

Mojtaba Amiraslanpour
Join Date: Jun 2011
Location: Zanjan, Iran
Posts: 233
Rep Power: 7
Hi all,
I am trying to simulate a simple pipe with constant heat flux walls, which are cooled by fluid flow going through the pipe.

Here is an image for better illustration:

Here is what I am gonna do. For wall BC I want to use:

Code:
`dT/dn= (q-h*(T-T_inf))/(k_f)`
In which T_inf is the average bulk temperature of the fluid, which varies across the pipe.

To calculate bulk temperature I want to use the average value of T as a variable of x (Length from the inlet).

How can I calculate this average in each x and use it as T_inf?

Is it possible to do this using groovyBC?
Attached Images
 pipe.png (10.6 KB, 21 views)
__________________
Complex Heat & Flow Simulation Research Group
If you can't explain it simply, you don't understand it well enough. "Richard Feynman"

September 4, 2013, 15:08
#2
Assistant Moderator

Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
Quote:
 Originally Posted by Mojtaba.a Hi all, I am trying to simulate a simple pipe with constant heat flux walls, which are cooled by fluid flow going through the pipe. Here is an image for better illustration: Here is what I am gonna do. For wall BC I want to use: Code: `dT/dn= (q-h*(T-T_inf))/(k_f)` In which T_inf is the average bulk temperature of the fluid, which varies across the pipe. To calculate bulk temperature I want to use the average value of T as a variable of x (Length from the inlet). How can I calculate this average in each x and use it as T_inf? Is it possible to do this using groovyBC?
Not the way you'd want to.

The first thing is that T_avg(s) is not really well defined after the pipe bend (BTW: convention is that x is a component of cartesian coordinates. The string length which you mean is s. At least the way I learned it). So the first thing would be to specify/calculate it for the whole geometry. Then you can calculate your T_avg(s) (for this there is actually a functionObject swakExpressionAverageDistribution in the development verson. But currently there is no way to feed that data back to your BC)
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request

September 4, 2013, 15:50
#3
Senior Member

Mojtaba Amiraslanpour
Join Date: Jun 2011
Location: Zanjan, Iran
Posts: 233
Rep Power: 7
Quote:
 Originally Posted by gschaider Not the way you'd want to. The first thing is that T_avg(s) is not really well defined after the pipe bend (BTW: convention is that x is a component of cartesian coordinates. The string length which you mean is s. At least the way I learned it). So the first thing would be to specify/calculate it for the whole geometry. Then you can calculate your T_avg(s) (for this there is actually a functionObject swakExpressionAverageDistribution in the development verson. But currently there is no way to feed that data back to your BC)
Thank you Bernhard.
__________________
Complex Heat & Flow Simulation Research Group
If you can't explain it simply, you don't understand it well enough. "Richard Feynman"

 September 4, 2013, 18:21 #4 Senior Member   Joachim Herb Join Date: Sep 2010 Posts: 291 Rep Power: 9 Why don't you use the turbulentHeatFluxTemperature boundary condition? See also buoyantBoussinesqPimpleFoam & turbulentHeatFluxTemperature

September 4, 2013, 19:10
#5
Assistant Moderator

Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
Quote:
 Originally Posted by jherb Why don't you use the turbulentHeatFluxTemperature boundary condition? See also buoyantBoussinesqPimpleFoam & turbulentHeatFluxTemperature
In principle you're right. The problem is the T_inf he wants: an average of the T in the fluid. I don't think turbulentHeatFluxTemperature does that (last time I looked you specified the T_inf. It didn't get calculated from the solution)
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request

 Thread Tools 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 On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post iampolaris OpenFOAM Running, Solving & CFD 7 October 18, 2014 09:25 kantipudi Main CFD Forum 2 April 7, 2008 14:30 lego CFX 3 November 5, 2002 21:09 Mark Wisom Main CFD Forum 4 July 25, 2002 13:20 ram Main CFD Forum 5 June 17, 2000 21:31

All times are GMT -4. The time now is 22:33.