|
[Sponsors] |
How to give the temperature condition by using the temperature of next cell in UDF? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 31, 2018, 05:07 |
How to give the temperature condition by using the temperature of next cell in UDF?
|
#1 |
New Member
JuBong
Join Date: Jan 2018
Posts: 16
Rep Power: 8 |
Hi everyone,
To give 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 T2 is the temperature of the side cell in the flow direction, try to give T1 = T2 - dx / k * q ''. for example, In a square module with one cell of 0.001 m2, if the temperature T1 at the inlet is a function of T2 (the temperature of the next cell in the direction of flow), how to use UDF code to express T1 (y) = T2 (y) + 100 ? example #include "udf.h" DEFINE_PROFILE(temperature, thread, position) { real x[ND_ND]; real y; face_t f; C_T(c,t); begin_f_loop(f, thread) { F_CENTROID(x,f,thread); y = x[1]; F_PROFILE(f, thread, position) = C_T(c,t) + 100; } end_f_loop(f, thread) } Could you give me some advice on how to change the code? Or is there another way of giving heat? |
|
January 31, 2018, 09:27 |
|
#2 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Before you do this, make sure that you really need this.
Are you maybe confusing conductive heat transfer with convective heat transfer? What you want (a temperature gradient at the inlet) is physically possible, but normally points towards a wrong choice of boundary conditions, or a domain that is too small. And if you are sure that this is what you need, just ask the question once, not four times. Posting it four times will not increase the number of people answering your question, and it makes it more difficult for you because now you have to look at four places if you received an answer... |
|
February 2, 2018, 04:21 |
Thank you pakk.
|
#3 |
New Member
JuBong
Join Date: Jan 2018
Posts: 16
Rep Power: 8 |
Hello, pakk.
Thank you very much for your reply. Sorry. This forum is the first time I did not know how to delete posts and posted four. Solar energy enters with the heat flux and I want to put the heat flux into the entrance boundary condition. Can you tell me how? Thank you. JuBong. |
|
February 2, 2018, 15:27 |
|
#4 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
What else comes in at your inlet? Gas? Liquid?
|
|
February 2, 2018, 20:47 |
Thank you pakk.
|
#5 |
New Member
JuBong
Join Date: Jan 2018
Posts: 16
Rep Power: 8 |
Gas come in at inlet pakk.
|
|
February 4, 2018, 14:34 |
|
#6 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
And besides the gas, sunlight comes through the inlet?
If this is really your set-up, you should think again what you want to simulate. It makes no sense. Probably you are confused about convective vs conductive, but if you are not you should choose a bigger domain. |
|
February 19, 2018, 07:09 |
|
#7 |
New Member
JuBong
Join Date: Jan 2018
Posts: 16
Rep Power: 8 |
Thanks very much pakk.
I listened to you and tried to think more. The solar heat reflected from the solar absorber was shot into the inlet of the honeycomb shaped channel. So the passing air gets heat by the convection and the hot gas comes out at the exit. Originally, there are several small channels overlapping and measuring the heat flux at the inlet of each channel. Think of these channels as prous media and try to count them as fluent. So the process of calculating the heat flux, rather than the wall, was created. 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? This is my code. ------------------------------------------------------------------ #include "udf.h" DEFINE_PROFILE(temperature, thread, position) { real x[ND_ND]; real y; face_t f; Thread *t; cell_t c; real temp; begin_f_loop(f, thread) { F_CENTROID(x,f,thread); y = x[1]; temp = C_T(f,t); F_PROFILE(f, thread, position) = temp + 30; } end_f_loop(f, thread) } ------------------------------------------------------------------ |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF to modify inlet fluid temperature | Vipul_Patel | Fluent UDF and Scheme Programming | 0 | February 22, 2016 22:11 |
specified shear at wall - temperature gradient - UDF - access violation error | senD | Fluent UDF and Scheme Programming | 9 | September 18, 2014 08:29 |
UDF Temperature boundaries Condition | sylvix48 | Fluent UDF and Scheme Programming | 3 | July 20, 2012 13:26 |
Pressure and Temperature UDF for Cell Zone | elixer2104 | FLUENT | 0 | February 24, 2011 12:54 |
Cell Temperature using udf | Karthick | FLUENT | 2 | April 19, 2004 07:29 |