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

UDF for pressure profile at outlet:

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By ComputerGuy
  • 1 Post By sandeep_tu

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 31, 2011, 16:49
Default UDF for pressure profile at outlet:
  #1
Member
 
Sandeep
Join Date: Apr 2009
Location: Munich, Germany
Posts: 30
Rep Power: 17
sandeep_tu is on a distinguished road
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
sandeep_tu is offline   Reply With Quote

Old   April 1, 2011, 11:13
Default
  #2
Member
 
Sandeep
Join Date: Apr 2009
Location: Munich, Germany
Posts: 30
Rep Power: 17
sandeep_tu is on a distinguished road
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
sandeep_tu is offline   Reply With Quote

Old   April 4, 2011, 05:54
Default
  #3
Senior Member
 
Max
Join Date: Mar 2009
Posts: 133
Rep Power: 17
coglione is on a distinguished road
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
coglione is offline   Reply With Quote

Old   April 4, 2011, 09:40
Default
  #4
Member
 
Sandeep
Join Date: Apr 2009
Location: Munich, Germany
Posts: 30
Rep Power: 17
sandeep_tu is on a distinguished road
thank you for the reply, udf is working
sandeep_tu is offline   Reply With Quote

Old   December 23, 2011, 04:27
Question
  #5
New Member
 
Pooya
Join Date: May 2010
Posts: 26
Rep Power: 15
Yapoo is on a distinguished road
Quote:
Originally Posted by sandeep_tu View Post
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?
Yapoo is offline   Reply With Quote

Old   December 29, 2011, 18:33
Default
  #6
Senior Member
 
Real Name :)
Join Date: Jan 2010
Location: United States
Posts: 192
Rep Power: 16
ComputerGuy is on a distinguished road
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.
ComputerGuy is offline   Reply With Quote

Old   November 14, 2014, 14:10
Default
  #7
New Member
 
AJK
Join Date: Nov 2014
Posts: 6
Rep Power: 11
flashkicker is on a distinguished road
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.
flashkicker is offline   Reply With Quote

Old   November 27, 2014, 07:17
Default
  #8
Member
 
Sandeep
Join Date: Apr 2009
Location: Munich, Germany
Posts: 30
Rep Power: 17
sandeep_tu is on a distinguished road
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
File Type: jpg events.jpg (56.0 KB, 52 views)
wc34071209 likes this.
sandeep_tu is offline   Reply With Quote

Old   December 3, 2014, 13:17
Default
  #9
New Member
 
AJK
Join Date: Nov 2014
Posts: 6
Rep Power: 11
flashkicker is on a distinguished road
Thank you...it was really helpful. Sorry for late reply...
flashkicker is offline   Reply With Quote

Reply


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
On debugging a Womersley Profile UDF david FLUENT 3 August 7, 2017 03:49
Udf for pumped outlet - help please Adammada FLUENT 4 August 5, 2009 09:29
UDF: PROFILE + SOURCE Nuno FLUENT 0 September 1, 2008 15:31
Multi step transient UDF velocity profile problem William177 FLUENT 1 February 3, 2008 06:47
UDF in Fluent to Match Mass Flow at Pressure Outlet Jonas Larsson Main CFD Forum 1 April 29, 1999 10:44


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