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

UDF and functions both are not showing Parabolic profile

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 26, 2021, 07:47
Default UDF and functions both are not showing Parabolic profile
  #1
New Member
 
Suraj Shembekar
Join Date: Feb 2021
Location: India
Posts: 18
Rep Power: 5
aerosuraj1 is on a distinguished road
hello all,
i am working on the the bifurcation geometry where, 1 inlet and 2 outlet.
at the inlet first i have provided UDF (fully developed parabolic profile)
please find the attachment for UDF code.
but in the result, it shows constant profile instead of parabolic.
after this
i have used the ''function'' in fluent for parabolic velocity profile as follow

v_mean*(1-(r/r_max)**2)
where, v_mean and r_max are constant defined
and r=sqrt(x**2+y**2).

but no expected result.
it shows constant profile instead of parabolic.

please help
Attached Images
File Type: jpg new.jpg (93.2 KB, 9 views)
Attached Files
File Type: c steady_3d_profile.c (328 Bytes, 3 views)
aerosuraj1 is offline   Reply With Quote

Old   February 26, 2021, 13:36
Default
  #2
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
Could you put the code here, not in an attachment? It's very hard/annoying to open attachments from a phone, and I guess that the code is not so big.
pakk is offline   Reply With Quote

Old   February 27, 2021, 07:21
Default
  #3
Member
 
MEK
Join Date: Oct 2016
Posts: 39
Rep Power: 10
ebrahem is on a distinguished road
This is the working UDF for 2D profile

#include "C:\Program Files\ANSYS Inc\v162\fluent\fluent16.2.0\src\udf\udf.h"

DEFINE_PROFILE(inlet_x_velocity, thread, position)
{
real x[ND_ND]; /* this will hold the position vector */
real y;
real h=0.003;
real u=0.06392694064; /* for Re = 100 based on Diameter of cylinder */
face_t f;

begin_f_loop(f, thread)
{
F_CENTROID(x,f,thread);
y = x[1];
F_PROFILE(f, thread, position) = u*1.5*(1-(4*(y*y/(h*h))));
}
end_f_loop(f, thread)
}
ebrahem is offline   Reply With Quote

Old   February 28, 2021, 06:33
Default
  #4
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
Your function is wrong because it assumes you work in the xy-plane, but your picture shows it's yz.

Your UDF is 2D, but should still work a bit. It's your channel centered around y=0?
pakk is offline   Reply With Quote

Old   March 1, 2021, 00:35
Default
  #5
New Member
 
Suraj Shembekar
Join Date: Feb 2021
Location: India
Posts: 18
Rep Power: 5
aerosuraj1 is on a distinguished road
Quote:
Originally Posted by pakk View Post
Your function is wrong because it assumes you work in the xy-plane, but your picture shows it's yz.

Your UDF is 2D, but should still work a bit. It's your channel centered around y=0?
thank you very much sir @pakk
your right sir my function was wrong, and now i got it. your comment helps me.

yes, my channel centered around y=o.
aerosuraj1 is offline   Reply With Quote

Old   March 1, 2021, 00:37
Default
  #6
New Member
 
Suraj Shembekar
Join Date: Feb 2021
Location: India
Posts: 18
Rep Power: 5
aerosuraj1 is on a distinguished road
Quote:
Originally Posted by ebrahem View Post
This is the working UDF for 2D profile

#include "C:\Program Files\ANSYS Inc\v162\fluent\fluent16.2.0\src\udf\udf.h"

DEFINE_PROFILE(inlet_x_velocity, thread, position)
{
real x[ND_ND]; /* this will hold the position vector */
real y;
real h=0.003;
real u=0.06392694064; /* for Re = 100 based on Diameter of cylinder */
face_t f;

begin_f_loop(f, thread)
{
F_CENTROID(x,f,thread);
y = x[1];
F_PROFILE(f, thread, position) = u*1.5*(1-(4*(y*y/(h*h))));
}
end_f_loop(f, thread)
}
thank you @ebrahem,
i will try this UDF
aerosuraj1 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
UDF to disable wall functions Abhinand Fluent UDF and Scheme Programming 3 June 15, 2020 17:05
UDF for 3D parabolic Inlet Profile Sicario FLUENT 2 October 2, 2018 09:57
How to give the coordinates of the centroid of a parabolic profil in UDF djing Fluent UDF and Scheme Programming 1 December 5, 2016 04:11
UDF linking Adjust and Profile macro functions Ramkumar21194 FLUENT 0 April 28, 2015 08:12
How to specify a transient profile with spacial variant without UDF? joy2000 Fluent UDF and Scheme Programming 0 February 6, 2013 09:51


All times are GMT -4. The time now is 18:37.