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

UDF direction

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 17, 2011, 05:25
Default UDF direction
  #1
New Member
 
Herman
Join Date: May 2011
Posts: 8
Rep Power: 14
Rowing is on a distinguished road
Hi all!

Can someone give me guidance how to change the velocity in the preceding udf from a x-velocity to a y-velocity....I'n really new to udf writing

Thanks

#include "udf.h"
#include "dynamesh_tools.h"

DEFINE_CG_MOTION(trans, dt, vel, omega, time, dtime)
{
/*reset velocities*/
NV_S(vel, =, 0.0);
NV_S(omega, =, 0.0);

if (!Data_Valid_P ())

{
Message0("\n\nNo data->No mesh motion!!!\n\n");
return;
}
/*set x-component velocity*/
vel[0] = 1;
}
Rowing is offline   Reply With Quote

Old   June 17, 2011, 06:09
Default
  #2
Senior Member
 
Max
Join Date: Mar 2009
Posts: 133
Rep Power: 17
coglione is on a distinguished road
x-component velocity = vel[0]
y-component velocity = vel[1]
z-component velocity = vel[2]

cheers
coglione is offline   Reply With Quote

Old   June 17, 2011, 08:33
Default
  #3
New Member
 
Herman
Join Date: May 2011
Posts: 8
Rep Power: 14
Rowing is on a distinguished road
Hahaha thanks! Wish I knew this sooner!
Rowing 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
Help please UDF flow direction val17lr FLUENT 2 September 4, 2010 05:30
looping UDF in given direction ak6g08 Fluent UDF and Scheme Programming 0 September 10, 2009 10:13
UDF for C.G.Motion in two direction ciprian FLUENT 3 August 20, 2009 21:45
Help: using udf to define direction Bo FLUENT 1 July 16, 2008 06:47
changing gravity vector direction using UDF Nico FLUENT 0 September 7, 2006 12:00


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