|
[Sponsors] |
March 31, 2011, 17:49 |
UDF for pressure profile at outlet:
|
#1 |
Member
Sandeep
Join Date: Apr 2009
Location: Munich, Germany
Posts: 30
Rep Power: 17 |
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, 12:13 |
|
#2 |
Member
Sandeep
Join Date: Apr 2009
Location: Munich, Germany
Posts: 30
Rep Power: 17 |
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, 06:54 |
|
#3 |
Senior Member
Max
Join Date: Mar 2009
Posts: 133
Rep Power: 17 |
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, 10:40 |
|
#4 |
Member
Sandeep
Join Date: Apr 2009
Location: Munich, Germany
Posts: 30
Rep Power: 17 |
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: 16 |
Quote:
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: 192
Rep Power: 16 |
One can impose any "physics" one wants in fluent. The two fractions likely have something to do with the setup of the problem.
|
|
November 14, 2014, 15:10 |
|
#7 |
New Member
AJK
Join Date: Nov 2014
Posts: 6
Rep Power: 12 |
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: 17 |
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. |
|
December 3, 2014, 14:17 |
|
#9 |
New Member
AJK
Join Date: Nov 2014
Posts: 6
Rep Power: 12 |
Thank you...it was really helpful. Sorry for late reply...
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
On debugging a Womersley Profile UDF | david | FLUENT | 4 | May 21, 2024 12:29 |
Udf for pumped outlet - help please | Adammada | FLUENT | 4 | August 5, 2009 10:29 |
UDF: PROFILE + SOURCE | Nuno | FLUENT | 0 | September 1, 2008 16:31 |
Multi step transient UDF velocity profile problem | William177 | FLUENT | 1 | February 3, 2008 07:47 |
UDF in Fluent to Match Mass Flow at Pressure Outlet | Jonas Larsson | Main CFD Forum | 1 | April 29, 1999 11:44 |