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

udf problem (urgent)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 12, 2009, 13:05
Exclamation udf problem (urgent)
  #1
New Member
 
carlo
Join Date: Apr 2009
Posts: 1
Rep Power: 0
marttini is on a distinguished road
I am working on a vof case in which i have a tank filled with water up to 50%. i want to define a function to put a sinusoidal velocity for the first 30 seconds. I have tryed with the function showed bellow, but it does not work. I have two question:
Is this the correct way to get variable time?
Do you have to define in your source code, x_velocity if you know that it already exist for fluent program?

#include"udf.h"
real current_time;
real x_velocity;
current_time=CURRENT_TIME;
if(current_time<30.)
{x_velocity=0.3*sin(0.8*current_time)};
else
{x_velocity=0};

thanks in advance
marttini is offline   Reply With Quote

Reply


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 Problem ozgur Fluent UDF and Scheme Programming 18 January 17, 2016 15:40
Pressure profile UDF for unsteady-state problem? Mohsen Keshavarzian FLUENT 2 August 20, 2008 05:22
parallel UDF problem kerem FLUENT 2 June 20, 2006 07:56
Switch problem! using 2 custom udf laws at the same time HP FLUENT 0 September 15, 2004 10:48
UDF variables F1, y / problem with UDF Fabian FLUENT 6 June 2, 2003 11:22


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