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

UDF transient velocity inlet boundary condition

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 22, 2019, 15:23
Default UDF transient velocity inlet boundary condition
  #1
New Member
 
yehiaismail
Join Date: Feb 2019
Posts: 4
Rep Power: 7
yehia ismail is on a distinguished road
I am trying to model turbulent pulsed jet flow with ration on to off equal 1:2 and I want to write a UDF for the time varying inlet velocity and I managed to write this UDF but I got a parse error in line 7 where t_local=t-0.1int(t/0.1)

#include "udf.h"
DEFINE_PROFILE(unsteady_velocity, thread, position)
{
face_t f;
real t = CURRENT_TIME;
real t_local;
t_local = t - 0.1*int(t/0.1);

begin_f_loop(f, thread)
{
if ( t_local < 0.033 )
F_PROFILE(f, thread, position) = 172.47*sin(94.25*t_local);
else
F_PROFILE(f, thread, position) = 0;
}
end_f_loop(f, thread)
}
yehia ismail is offline   Reply With Quote

Old   February 22, 2021, 21:15
Default
  #2
New Member
 
HLFM
Join Date: May 2018
Posts: 2
Rep Power: 0
Hortencia is on a distinguished road
yehia ismail, were you able to solve the problem? I am a similar situation, I need to model a pulsed flow at a inlet.
Hortencia is offline   Reply With Quote

Old   February 23, 2021, 01:38
Default
  #3
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
t_local = t - 0.1*(int)(t/0.1);
pakk 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
Outlet temperature to temperature boundary condition of velocity inlet. (UDF) dillon Fluent UDF and Scheme Programming 3 March 25, 2018 12:06
Wrong flow in ratating domain problem Sanyo CFX 17 August 15, 2015 07:20
Boundary condition of velocity inlet sara22 FLUENT 9 September 18, 2014 21:14
Low Mixing time Problem Mavier CFX 5 April 29, 2013 01:00
inlet velocity boundary condition murali CFX 5 August 3, 2012 09:56


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