# Square Wave Profile

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 June 18, 2005, 23:30 Square Wave Profile #1 manish mehta Guest   Posts: n/a Dear All, How do I generate a square wave profile for a pressure inlet boundary condition? I tried FFT but there are some problems with this. I need this to be a discontinous flow, because my pressure needs to have a square profile from 0 psi to 180 psi. I do not know how to write this as a UDF code. Can someone please help me? Thanks. Manish

 June 20, 2005, 10:40 Re: Square Wave Profile #2 david Guest   Posts: n/a Hi, I've incluced a modified version of a UDF I used to prescribe a time-dependent velocity at the inlet of a pipe. I've modified it quickly so check for errors. To use this, either interpret or compile this UDF and go to define/boundary-conditions. Choose the face on which you want to use the pressure pulse and choose the UDF named "pressurepulse" in this case. If you need more details, let me know. Regards, David --------------------------------------------------- #include "udf.h" DEFINE_PROFILE(pressurepulse, thread, position) { real x[ND_ND]; float t, velocity,w,y,z; face_t f; t = RP_Get_Real("flow-time"); w=floor (t); z=t-w;/* z is ranging from 0 to 1 in this case but the time variable could be modified */ if (z<0.4) pressure = 0; else pressure =180; begin_f_loop(f, thread) { F_CENTROID(x,f,thread); y = x[1]; F_PROFILE(f, thread, position) = pressure; } end_f_loop(f, thread) }

 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 Taru FLUENT 6 September 14, 2015 08:38 Emmanuel FLUENT 2 March 13, 2010 09:36 John N. FLUENT 0 February 2, 2009 17:17 Frederik FLUENT 0 May 8, 2006 06:48 Ramin FLUENT 0 March 8, 2006 10:38

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

 Contact Us - CFD Online - Top