# UDF pulsating pressure inlet

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

 May 29, 2013, 06:17 UDF pulsating pressure inlet #1 New Member   N/A Join Date: Apr 2013 Posts: 18 Rep Power: 4 Hi there, I have a 2d fluent simulation with 3 pressure inlets 1 in x direction and 2 y direction. Now i I am trying to create a pulsating pressure inlet with a pressure of 1,3 bar in the Y direction for transit simulation. It has to pulsate at a frequency of 50 Hz (thus 50 pulsation per seconde) I know i need to use a UDF for this but i have looked through the manual but i find it very confusing. If anyone is willing to help thank you very much

 May 29, 2013, 06:37 #2 Senior Member   Join Date: Aug 2011 Posts: 315 Rep Power: 12 You are no more confused than I am. What do you want?

 May 29, 2013, 06:52 #3 New Member   N/A Join Date: Apr 2013 Posts: 18 Rep Power: 4 Thank you for your reply, what i want is an UDF or something that will help me achieve a not constant inlet pressure in the Y direction i want the Y direction inlet pressures to pulsate (or give a burst of pressure 50 times a second). The pressure burst will have a pressure of 1,3 bar or 131.7225 kPa. What you should image i am simulation is a valve opening en closing 50 times a second and just letting a small bit of air through. (btw this is not what i am trying to simulation but will help me achieve my goals it just to give a picture to what i want) I looked through the UDF manual and came past a this UDF which i edited, but it doesn't seem to do anything atm at all. Though i might have gone the totally wrong way with this UDF #include "udf.h" DEFINE_PROFILE(unsteady_pressure, thread, position) { face_t f; real t = CURRENT_TIME; begin_f_loop(f, thread) { F_PROFILE(f, thread, position) =131.7225*sin(100*t); } end_f_loop(f, thread) It might be usefull to know the Y direction inlets are opposite each other and should both pulsate at 50 times a second but at opposite intervals thus at 0.01 t the one should pulsate an at 0.02 the other one should pulsate. What i am trying to achieve is an airflow that is oscillating

 May 29, 2013, 07:01 #4 Senior Member   Join Date: Aug 2011 Posts: 315 Rep Power: 12 Note that the angular frequency should be 2*pi*f = 2*3.14159*50 = 314.159. If the amplitude is 131 with an averaged value of 131k, it would be Code: `F_PROFILE(f, thread, position) =131.7225*(1000+sin(100*M_PI*t));`

May 29, 2013, 08:55
#5
New Member

N/A
Join Date: Apr 2013
Posts: 18
Rep Power: 4
Thank you,

It did help its starting to do something now. I am still wondering when i plot this same equation in excel and make a graph of it with time steps of 0.01 i i looked like the image below. Thus actually not beeing a normal sin wave but a constantly increasing sin wave? I might be totally wrong about this but this is confusing to me.
Attached Images
 oscillation.jpg (94.5 KB, 10 views)

 May 29, 2013, 09:23 #6 Senior Member   Join Date: Aug 2011 Posts: 315 Rep Power: 12 Gee. The period is 0.02s, so 0.01s is half the period. You need minimum 20 points per period so please reduce time step to 0.001s or smaller.

 May 29, 2013, 10:05 #7 New Member   N/A Join Date: Apr 2013 Posts: 18 Rep Power: 4 OMG, sometime i amaze myself at how obvious my mistakes are, thank you for pointing it out once you said it i realized what i did wrong .

 May 29, 2013, 19:41 #9 Senior Member   Join Date: Aug 2011 Posts: 315 Rep Power: 12 The line Code: `F_PROFILE(f, thread, position) =-7*(1000+sin(2*M_PI*t));` should be changed to Code: `F_PROFILE(f, thread, position) =7*(1000-sin(2*M_PI*t));`

 May 31, 2013, 13:20 #11 New Member   N/A Join Date: Apr 2013 Posts: 18 Rep Power: 4 Oke i figure out what i did wrong for anyone interested don't forget the . after the number very important.

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Wijaya FLUENT 14 August 26, 2015 06:02 nikhil FLUENT 5 December 11, 2013 13:30 GerardX89 Fluent UDF and Scheme Programming 0 July 16, 2012 10:15 Antech Main CFD Forum 0 April 25, 2006 02:15 Alfonso Ferrandez FLUENT 0 May 4, 2000 07:02

All times are GMT -4. The time now is 09:15.