CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[swak4Foam] Variable T_inf for convection problem in a pipe using groovyBC

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 4, 2013, 13:50
Default Variable T_inf for convection problem in a pipe using groovyBC
  #1
Senior Member
 
Mojtaba.a's Avatar
 
Mojtaba Amiraslanpour
Join Date: Jun 2011
Location: Tampa, US
Posts: 308
Rep Power: 15
Mojtaba.a is on a distinguished road
Send a message via Skype™ to 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?
Attached Images
File Type: png pipe.png (10.6 KB, 64 views)
__________________
Learn OpenFOAM in Persian
SFO (StarCCM+ FLUENT OpenFOAM) Project Team Member
Complex Heat & Flow Simulation Research Group
If you can't explain it simply, you don't understand it well enough. "Richard Feynman"
Mojtaba.a is offline   Reply With Quote

Old   September 4, 2013, 15:08
Default
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by Mojtaba.a View Post
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
gschaider is offline   Reply With Quote

Old   September 4, 2013, 15:50
Default
  #3
Senior Member
 
Mojtaba.a's Avatar
 
Mojtaba Amiraslanpour
Join Date: Jun 2011
Location: Tampa, US
Posts: 308
Rep Power: 15
Mojtaba.a is on a distinguished road
Send a message via Skype™ to Mojtaba.a
Quote:
Originally Posted by gschaider View Post
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.
__________________
Learn OpenFOAM in Persian
SFO (StarCCM+ FLUENT OpenFOAM) Project Team Member
Complex Heat & Flow Simulation Research Group
If you can't explain it simply, you don't understand it well enough. "Richard Feynman"
Mojtaba.a is offline   Reply With Quote

Old   September 4, 2013, 18:21
Default
  #4
Senior Member
 
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 21
jherb is on a distinguished road
Why don't you use the turbulentHeatFluxTemperature boundary condition?

See also http://www.cfd-online.com/Forums/ope...mperature.html
jherb is offline   Reply With Quote

Old   September 4, 2013, 19:10
Default
  #5
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by jherb View Post
Why don't you use the turbulentHeatFluxTemperature boundary condition?

See also http://www.cfd-online.com/Forums/ope...mperature.html
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
gschaider is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
need help about double pipe heat exchanger with chtMultiRegionSimpleFoam wuyangzhen OpenFOAM 10 December 12, 2017 00:19
[swak4Foam] GroovyBC problem in the defining inlet velocity iampolaris OpenFOAM Community Contributions 7 October 18, 2014 09:25
Replace periodic by inlet-outlet pair lego CFX 3 November 5, 2002 20:09
Terrible Mistake In Fluid Dynamics History Abhi Main CFD Forum 12 July 8, 2002 09:11
fluid flow fundas ram Main CFD Forum 5 June 17, 2000 21:31


All times are GMT -4. The time now is 05:20.