# UDF for pressure profile at outlet:

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

 March 31, 2011, 16:49 UDF for pressure profile at outlet: #1 Member   Sandeep Join Date: Apr 2009 Location: Munich, Germany Posts: 30 Rep Power: 7 Hello everyone, Could any one please help me in writing an UDF for pressure profile at outlet which is varying with respect to Z direction in 3-D case i.e, p = -1.2*9.81*101325*(z-1)*((1/293)-(1/290)) thanks Sandeep

 April 1, 2011, 11:13 #2 Member   Sandeep Join Date: Apr 2009 Location: Munich, Germany Posts: 30 Rep Power: 7 I tried to write an udf (pressure profile) for my case, could any one please help if I am in the right path. As the outlet in my case is in XZ plane perpendicular to Y direction. #include "udf.h" DEFINE_PROFILE(pressure_profile,thread,index) { real y[ND_ND]; real z; face_t f; begin_f_loop(f,thread) { F_CENTROID(y,f,thread); z=y[2]; F_PROFILE(f,thread,index) = -1.2*9.81*101325*(z-1)*((1/293)-(1/290)); } end_f_loop(f,thread) } can anyone please explain these two commands real y[ND_ND]; and z=y[2]; thank you Sandeep

 April 4, 2011, 05:54 #3 Senior Member   Max Join Date: Mar 2009 Posts: 133 Rep Power: 8 With y[ND_ND] you define a vector of length ND_ND, which will be set automatically to 2 for 2-D and 3 for 3-D problems. Thus in 3-D y will have 3 components (y[0],y[1],y[2]) and as you fill it with the coordinates (x,y,z) of a face f, y[2] returns the z-component. cheers

 April 4, 2011, 09:40 #4 Member   Sandeep Join Date: Apr 2009 Location: Munich, Germany Posts: 30 Rep Power: 7 thank you for the reply, udf is working

December 23, 2011, 05:27
#5
New Member

Pooya
Join Date: May 2010
Posts: 26
Rep Power: 6
Quote:
 Originally Posted by sandeep_tu I tried to write an udf (pressure profile) for my case, could any one please help if I am in the right path. As the outlet in my case is in XZ plane perpendicular to Y direction. #include "udf.h" DEFINE_PROFILE(pressure_profile,thread,index) { real y[ND_ND]; real z; face_t f; begin_f_loop(f,thread) { F_CENTROID(y,f,thread); z=y[2]; F_PROFILE(f,thread,index) = -1.2*9.81*101325*(z-1)*((1/293)-(1/290)); } end_f_loop(f,thread) } can anyone please explain these two commands real y[ND_ND]; and z=y[2]; thank you Sandeep
Dear freind
i have a questions why are you using ((1/293)-(1/290)) in your profile equation?

 December 29, 2011, 19:33 #6 Senior Member   Real Name :) Join Date: Jan 2010 Location: United States Posts: 180 Rep Power: 7 One can impose any "physics" one wants in fluent. The two fractions likely have something to do with the setup of the problem. Yapoo likes this.

 November 14, 2014, 15:10 #7 New Member   AJK Join Date: Nov 2014 Posts: 6 Rep Power: 2 Hi, I am looking for the UDF to close and open the pressure outlet wrt time. I am really new to UDF. Any help would be appreciated.

November 27, 2014, 08:17
#8
Member

Sandeep
Join Date: Apr 2009
Location: Munich, Germany
Posts: 30
Rep Power: 7
For your problem, you can also try with defining events. All you need is dynamic mesh model. In the dynamic mesh model, events can be defined.

I've attached a picture, where you can see how to enable the events. Just enable the dynamic mesh model. Then you are able to access the panel to define time-dependent events.
Attached Images
 events.jpg (56.0 KB, 13 views)

 December 3, 2014, 14:17 #9 New Member   AJK Join Date: Nov 2014 Posts: 6 Rep Power: 2 Thank you...it was really helpful. Sorry for late reply...

 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 david FLUENT 1 December 2, 2011 05:56 Adammada FLUENT 4 August 5, 2009 09:29 Nuno FLUENT 0 September 1, 2008 15:31 William177 FLUENT 1 February 3, 2008 07:47 Jonas Larsson Main CFD Forum 1 April 29, 1999 10:44

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