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

UDF issue

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

Like Tree1Likes
  • 1 Post By AlexanderZ

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 23, 2018, 09:58
Default UDF issue
  #1
Member
 
Oula
Join Date: Apr 2015
Location: United Kingdom
Posts: 81
Rep Power: 11
Oula is on a distinguished road
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)

}
Attached Files
File Type: pptx UDF Issue.pptx (125.7 KB, 4 views)
Oula is offline   Reply With Quote

Old   November 26, 2018, 00:50
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 35
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
your UDF is correct, check your equation
you may try to use excel to make graph

best regards
Oula likes this.
AlexanderZ is offline   Reply With Quote

Old   November 28, 2018, 09:11
Default
  #3
Member
 
Oula
Join Date: Apr 2015
Location: United Kingdom
Posts: 81
Rep Power: 11
Oula is on a distinguished road
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.
Oula is offline   Reply With Quote

Reply

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


All times are GMT -4. The time now is 01:42.