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

Writing UDF for a square waveform

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 10, 2017, 08:50
Default Writing UDF for a square waveform
  #1
New Member
 
Anthony
Join Date: Mar 2017
Posts: 1
Rep Power: 0
anthonyczy is on a distinguished road
Hi
I am new to FLUENT and writing UDFs. Please help me out.

I would like to write a UDF for the inlet velocity profile of a pulsed fluidized bed. The pulses are 1Hz, with amplitude 0.1 m/s.
0 to 0.5 seconds, 0.1m/s
0.5 to 1.0 seconds, 0 m/s
1.0 to 1.5 seconds, 0.1m/s
and so on till 300 seconds

Thanks!

PS I have a template here but i do not know how to describe the equation of this square waveform.

#include "udf.h"
DEFINE_PROFILE(unsteady_velocity_profile, t, i)
{
real current_time;
real x[ND_ND];
real y;
face_t f;
current_time = CURRENT_TIME;
begin_f_loop(f, t)
{
F_CENTROID(x,f,t);
y = x[1];
if (current_time < ______ )
{
F_PROFILE(f,t,i)=______;
}
else
{
F_PROFILE(f,t,i)=0;
}
}
end_f_loop(f, t)
}
anthonyczy is offline   Reply With Quote

Reply

Tags
fluent, fluidized bed, pulsed, udf

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
[Other] Contribution a new utility: refine wall layer mesh based on yPlus field lakeat OpenFOAM Community Contributions 58 December 23, 2021 02:36
Writing UDF to represent drag equations Dawood Al-Mosuli FLUENT 1 April 27, 2015 05:02
having problem in writing a UDF for specific heat in fluent 14.0 nands_bullwalker Fluent UDF and Scheme Programming 1 June 29, 2013 10:32
Seek help in writing UDF Jack Martinez FLUENT 9 June 14, 2007 10:24
New to writing UDF Sandilya FLUENT 0 May 31, 2007 12:03


All times are GMT -4. The time now is 08:31.