|
[Sponsors] |
July 22, 2016, 06:58 |
One end closed tube-Openfoam
|
#1 |
Member
Akr
Join Date: Apr 2015
Location: India
Posts: 53
Rep Power: 11 |
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; } Code:
i.e Q/A = k*dt/dx; Q/A = h*(Tw-Tref); 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 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? |
|
July 24, 2016, 15:15 |
|
#2 |
Senior Member
Join Date: Sep 2010
Posts: 226
Rep Power: 17 |
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" } Regards, T.D. Last edited by T.D.; July 24, 2016 at 15:18. Reason: corrected word "position" |
|
July 25, 2016, 06:34 |
Thank you T.D
|
#3 |
Member
Akr
Join Date: Apr 2015
Location: India
Posts: 53
Rep Power: 11 |
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); } 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? |
|
August 2, 2016, 08:58 |
|
#4 |
Senior Member
Join Date: Sep 2010
Posts: 226
Rep Power: 17 |
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); Good Luck ! |
|
|
|
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 |