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

UDF Not working

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   January 31, 2017, 12:48
Default UDF Not working
  #1
New Member
 
Ashwath Vaidhyanathan
Join Date: Oct 2016
Posts: 9
Rep Power: 9
av147@snu.edu.in is on a distinguished road
Hi everyone !

I was writing a code for a transient temperature analysis, for 0 to 5700 secs i have a equation and for 5701 to 14400 i have another equation for temperature change with time.
I wrote the following code

#include "udf.h"
DEFINE_PROFILE(unsteady_temperature, thread, position)
{
face_t f;
int time;
real t= CURRENT_TIME;
begin_f_loop(f, thread);
{
if(t<=5700)
F_PROFILE(f, thread, position) = (6*10^(-8))*t^(5)-(7*10^(-14))*(t^(4))+(2*10^(-10))*(t^(3))-(0.0072*t)+326.75;
else if(5701<=t<=14400)
F_PROFILE(f, thread, position) = -(5*10^(-21))*(t^(5))+(2*10^(-16))*(t^(4))-(5*10^(-12))*(t^(3))+(4*10^(-8))*(t^(2))-0.0002^(t)+306.58;

}
end_f_loop(f, thread);
}


Also my doubt is do i have to include some kind of a loop statement for updating time after each iteration ?
av147@snu.edu.in is offline   Reply With Quote

 


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
UDF Compilation Error - Loading Library - COMMON Problem! Help! robtheslob Fluent UDF and Scheme Programming 8 July 24, 2015 00:53
UDF for Oscillating Membrane/Diaphragm of a Synthetic Jet cuan1029 Fluent UDF and Scheme Programming 0 December 8, 2014 08:20
Serial UDF is working for parallel computation also Tanjina Fluent UDF and Scheme Programming 0 December 26, 2013 18:24
UDF is working in Laptop, but not working in Serial Cluster Tanjina Fluent UDF and Scheme Programming 0 December 20, 2013 21:42
UDF...UDF...UDF...UDF Luc SEMINEL FLUENT 0 November 25, 2002 04:03


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