|
[Sponsors] |
![]() |
![]() |
#1 |
Member
Oula
Join Date: Apr 2015
Location: United Kingdom
Posts: 81
Rep Power: 11 ![]() |
I have created a UDF for transient temperature on walls in my model. The temperature profile that I need to use is shown in the second slide of the attached file. The profile represents a temperature data from thermocouple recordings in the real-life process. I have managed to obtain an approximation formula to the profile in order to use it in coding the UDF.
The code is shown in the 3rd slide and below this post. I run the function in fluent alone with everything off, because I wanted to check if the function is working good. The function was compiled successfully and everything was OK. I used the ‘Report Definitions’ feature in fluent to monitor the temperature on the walls that I applied the UDF on. Unfortunately, the temperature profile out of the simlation was completely different from the one that I coded, please see slide 4 in the attached file. I expected to have a temp vs time chart a copy-paste of the original one of the thermocouple recordings or at least close enough. Can anyone have any idea what is going on? Any help is greatly appreciated /************************************************** ******************* unsteady.c UDF for specifying a transient temperature profile boundary condition ************************************************** *********************/ #include "udf.h" DEFINE_PROFILE(unsteady_temperature, thread, position) { face_t f; real t = CURRENT_TIME; begin_f_loop(f, thread) { F_PROFILE(f, thread, position) =(-9e-23*t*t*t*t*t*t)+(8e-18*t*t*t*t*t)-(2e-13*t*t*t*t)+(3e-09*t*t*t)-(2e- 05*t*t)+(0.0845*t)+282.3; } end_f_loop(f, thread) } |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 35 ![]() ![]() |
your UDF is correct, check your equation
you may try to use excel to make graph best regards |
|
![]() |
![]() |
![]() |
![]() |
#3 |
Member
Oula
Join Date: Apr 2015
Location: United Kingdom
Posts: 81
Rep Power: 11 ![]() |
Thanks AlexanderZ
You are right, there was a problem with the equation. Now I'm using a polynomial equation of x^3 and it is working good. I tried polynomial equations of x^2, x^3, x^4, the best one was of x^3. |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
does Hyperthreading affect the application of UDF? | SJSW | Fluent UDF and Scheme Programming | 11 | October 10, 2018 22:28 |
Error code: 126 when loading parallel UDF | Coop | Fluent UDF and Scheme Programming | 0 | July 13, 2018 08:33 |
udf for valve closing a pipe using dynamic mesh | chem engineer | Fluent UDF and Scheme Programming | 2 | May 13, 2017 09:39 |
UDF compilation/ platform issue! Help!! :s | lmarf88 | Fluent UDF and Scheme Programming | 4 | April 11, 2014 13:11 |
I need UDF help. | S.Whitney | FLUENT | 0 | October 15, 2007 11:29 |