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

Time varying velocity BC

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

Reply
 
LinkBack Thread Tools Display Modes
Old   March 22, 2011, 12:29
Default Time varying velocity BC
  #1
New Member
 
Tejasvi Krishna
Join Date: Sep 2010
Location: College station,Tx, USA
Posts: 11
Rep Power: 6
tejasvikrishna is on a distinguished road
Send a message via Skype™ to tejasvikrishna
Hello,
I need a sinusoidal time varying UDF for my problem , I am kind of new to fluent , please direct me , any time varying BC tutorial is helpful but couldnt find any on google
Thankyou
Tejasvi
tejasvikrishna is offline   Reply With Quote

Old   March 22, 2011, 13:27
Default
  #2
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Shiraz, Iran
Posts: 739
Blog Entries: 1
Rep Power: 14
Amir is on a distinguished road
Hi,
if you are new in UDF, it will be better to use other ways like defining a profile.
refer to: <defining transient boundary conditions> in user guide (7.1.9 in FLUENT 6.3.26)
Amir is offline   Reply With Quote

Old   March 22, 2011, 14:06
Default
  #3
New Member
 
Tejasvi Krishna
Join Date: Sep 2010
Location: College station,Tx, USA
Posts: 11
Rep Power: 6
tejasvikrishna is on a distinguished road
Send a message via Skype™ to tejasvikrishna
thanks for the reply, I will try that out , meanwhile I have written an UDF , does this look reasonable

#include "udf.h"

DEFINE_PROFILE(transient_velocity, thread, position)
{

float t, velocity;
face_t f;

t = RP_Get_Real("flow-time");

velocity = Sin(40*3.14*t);

begin_f_loop(f, thread)
{
F_PROFILE(f, thread, position) = velocity;
}
end_f_loop(f, thread)
tejasvikrishna is offline   Reply With Quote

Old   March 22, 2011, 14:41
Default
  #4
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Shiraz, Iran
Posts: 739
Blog Entries: 1
Rep Power: 14
Amir is on a distinguished road
it needs some changes:
Quote:
#include "udf.h"
#include "math.h"
DEFINE_PROFILE(transient_velocity,thread,position)
{
face_t f;
float t, velocity;
t = CURRENT_TIME;
velocity = sin(40*3.14*t);//argument should be in radian
begin_f_loop(f, thread)
{
F_PROFILE(f, thread, position) = velocity;
}
end_f_loop(f, thread)
}
Amir is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to write k and epsilon before the abnormal end xiuying OpenFOAM Running, Solving & CFD 8 August 27, 2013 15:33
how did I see next time step of velocity cotour ? Andy Chen FLUENT 2 June 30, 2009 12:48
please help-time varying inlet velocity saurabh Phoenics 1 June 9, 2009 06:17
DPM UDF particle position using the macro P_POS(p)[i] dm2747 FLUENT 0 April 17, 2009 01:29
Transient simulation not converging skabilan OpenFOAM Running, Solving & CFD 12 September 17, 2007 17:48


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