CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   How do you use heat flux as a boundary condition in a non-wall area in UDF? (https://www.cfd-online.com/Forums/fluent-udf/203594-how-do-you-use-heat-flux-boundary-condition-non-wall-area-udf.html)

JuBong July 2, 2018 04:01

How do you use heat flux as a boundary condition in a non-wall area in UDF?
 
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)
}
------------------------------------------------------------------

zobekenobe July 2, 2018 15:04

put the line


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

outside the begin_f_loop

JuBong July 2, 2018 21:15

Thanks zobekenobe
 
Quote:

Originally Posted by zobekenobe (Post 697945)

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)
}

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


All times are GMT -4. The time now is 16:55.