CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

How do you use heat flux as a boundary condition in a non-wall area in UDF?

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 2, 2018, 05:01
Post How do you use heat flux as a boundary condition in a non-wall area in UDF?
  #1
New Member
 
JuBong
Join Date: Jan 2018
Posts: 16
Rep Power: 4
JuBong is on a distinguished road
Hi, all

The solar heat reflected from the solar absorber was shot into the inlet of the honeycomb shaped channel.

We know the distribution of the heat flux of the solar heat emitted at this time. However, I do not know the temperature distribution of the entrance.

And the passing air gets heat by the conduction and the hot gas comes out at the exit.

There are masy small channels heating and measuring the heat flux at the inlet of each channel. Because there are so many channels, I think of it as a porous material and try to use fluent.

I can not enter the heat flux in a non-wall boundary condition, so I want to use the heat flux to find out the temperature.

because it can not give heat flux conditions to the inlet, I want to change the heat flux condition to the temperature equation.

For example, When the temperature of the inlet is T1 and the temperature of the next cell in the outlet direction is T2 , I want to try to give T1 = T2 - dx / k * q ''.

I tried to apply C_T (c, t) to the boundary condition of the inlet by bringing the temperature of the center of the cell at inlet.

However, the fluent will shut down.

Is the use of C_T (c, t) to get the temperature of the cells wrong?

How can I get the temperature of the center of the cell and use it as a boundary condition?

Is there an error when trying to get the value of C_T (c, t) even though I have not calculated yet?

I would appreciate your reply.



This is my code.


------------------------------------------------------------------

#include "udf.h"

DEFINE_PROFILE(temperature, thread, position)
{
Thread *t0;
face_t f;
cell_t c0;

begin_f_loop (f,thread)
{
c0 = F_C0(f,thread); // adjacent cell id
t0 = THREAD_T0(thread); // adjacent cell thread

F_PROFILE(f, thread, position) = C_T(c0,t0)+100;
}
end_f_loop (f,thread)
}
------------------------------------------------------------------
JuBong is offline   Reply With Quote

Old   July 2, 2018, 16:04
Default
  #2
Member
 
zobekenobe
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 72
Rep Power: 13
zobekenobe is on a distinguished road
put the line


t0 = THREAD_T0(thread); // adjacent cell thread

outside the begin_f_loop
zobekenobe is offline   Reply With Quote

Old   July 2, 2018, 22:15
Post Thanks zobekenobe
  #3
New Member
 
JuBong
Join Date: Jan 2018
Posts: 16
Rep Power: 4
JuBong is on a distinguished road
Quote:
Originally Posted by zobekenobe View Post

put the line


t0 = THREAD_T0(thread); // adjacent cell thread

outside the begin_f_loop
--------------------------------------------------------------------------------

Thank you for your reply zobekenobe.

I tried to do what you said, but the fluent ends.
I want to know why.


This is my code.

------------------------------------------------------------

#include "udf.h"

DEFINE_PROFILE(temperature, thread, position)
{
Thread *t0;
face_t f;
cell_t c0;

t0 = THREAD_T0(thread); // adjacent cell thread

begin_f_loop (f,thread)
{
c0 = F_C0(f,thread); // adjacent cell id

F_PROFILE(f, thread, position) = C_T(c0,t0)+100;
}
end_f_loop (f,thread)
}

-----------------------------------------------------------
JuBong is offline   Reply With Quote

Reply

Tags
udf

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
Error - Solar absorber - Solar Thermal Radiation MichaelK CFX 12 September 1, 2016 06:15
Low torque values on Screw Turbine Shaun Waters CFX 34 July 23, 2015 09:16
Radiation interface hinca CFX 15 January 26, 2014 18:11
Question about heat transfer coefficient setting for CFX Anna Tian CFX 1 June 16, 2013 07:28
Convective Heat Transfer - Heat Exchanger Mark CFX 6 November 15, 2004 16:55


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