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

One end closed tube-Openfoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 22, 2016, 06:58
Default One end closed tube-Openfoam
  #1
Member
 
Akr
Join Date: Apr 2015
Location: India
Posts: 53
Rep Power: 11
NightWing is on a distinguished road
Hi

I have a set of boundary conditions for my problem. Like, i have a one end closed tube which is open at the other end. The tube is inclined at 20 degree. Through the open end air is entering into the tube and the walls of the tube are applied with constant heat flux.

In my problem, i have divided the tube equally into a upper portion (top side) and lower portion (bottom side). I have applied two different magnitude of flux at these two portions

Code:
Topside
{
type      fixedGradient;
value    uniform 200;
}

Bottomside
{
type      fixedGradient;
value    uniform 600;
}
Now, i want to calculate the heat transfer coefficient, near to the both walls (top wall and bottom wall) of my tube.

Code:
i.e Q/A = k*dt/dx;  Q/A = h*(Tw-Tref);
But in my case the temperature of wall (Tw) at upper portion of my tube will be greater than at my lower end. Eventually my heat transfer coefficient will have a varying values at both sides

Now if i want to calculate heat transfer coefficient nearer to my top portion of my tube:
Code:
k*dt/dx =h*(Ttopwall -Tref);  where Ttopwall is the temperature given to the wall due to my applied flux

and

k*dt/dx =h*(Tbottomwall -Tref); here Tbottomwall is the temperature given to the wall due to my applied flux
How can i calculate these boundary values seperately.

i.e. I want to write in a file, Ttopwall and Tbottom wall and then to use it to compute heat transfer coefficient

any suggestion?
NightWing is offline   Reply With Quote

Old   July 24, 2016, 15:15
Default
  #2
Senior Member
 
Join Date: Sep 2010
Posts: 226
Rep Power: 17
T.D. is on a distinguished road
Hi,

to get a patch label (at the Top-level code) use something like:

Code:
label Topwallside = mesh.boundaryMesh().findPatchID("Topside");

//Now, for values at boundary cells, you can use something at the Top-level code like:
forAll(mesh.boundaryMesh()[Topwallside],i)
{
double TheValue = T.boundaryField()[Topwallside][i]; // do whatever you want with "TheValue" at position "i"
}
Good Luck !

Regards,
T.D.

Last edited by T.D.; July 24, 2016 at 15:18. Reason: corrected word "position"
T.D. is offline   Reply With Quote

Old   July 25, 2016, 06:34
Default Thank you T.D
  #3
Member
 
Akr
Join Date: Apr 2015
Location: India
Posts: 53
Rep Power: 11
NightWing is on a distinguished road
What i did is; i created a new header file called parametersCalc.H

In that i defined like this

Code:
label Topwallside = mesh.boundaryMesh().findPatchID("Topside");

//Now, for values at boundary cells, you can use something at the Top-level code like:
forAll(mesh.boundaryMesh()[Topwallside],i)
{
double TheValue = T.boundaryField()[Topwallside][i]; 

htc = Q/(TheValue-Tref);
}
But now the code is compiling but during runtime it shows a dimensional mismatch. As TheValue is not taking up units as Kelvin

What can be done?

Moreover, as i am new to this; is there a way so that i can get all the values of Temperature just next to the wall?
NightWing is offline   Reply With Quote

Old   August 2, 2016, 08:58
Default
  #4
Senior Member
 
Join Date: Sep 2010
Posts: 226
Rep Power: 17
T.D. is on a distinguished road
Hello NightWing,

In order to fix any dimensions errors, you can create and use dimensional scalars by:
Code:
dimensionedScalar a("a", dimensionSet(0,0,0,0,0,0,0), 1.0);
so "a" above, will be a dimensioned scalar type of zero dimension and value=1.0.

Good Luck !
T.D. is offline   Reply With Quote

Reply


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
Simulation of a single bubble with a VOF-method Suzzn CFX 21 January 29, 2018 01:58
Closed Domain Buoyancy Flow Problem Madhatter92 CFX 6 June 20, 2016 22:05
Ansys CFX problem: unexpected very high temperatures in premix laminar combustion faizan_habib7 CFX 4 February 1, 2016 18:00
Setting rotating frame of referece. RPFigueiredo CFX 3 October 28, 2014 05:59
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 08:00


All times are GMT -4. The time now is 12:56.