# UDF For inlet Velo BC, trouble in soln calculation

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

September 29, 2020, 02:16
UDF For inlet Velo BC, trouble in soln calculation
#1
New Member

Siddharth
Join Date: May 2020
Posts: 2
Rep Power: 0
So i wrote the following snippet in order to obtain a power law velocity profile for my inlet BC.The z is the z co-ordinate and while i was able to interpret and hook the udf. as soon as start calculating the velocity, the continuity and all 3 velocities remain zero in residuals and only k & w are iterating.
My main aim is to do for transient k-w sst simulations but I also switched to steady just to check but it didnt work. Pls enlighten me as I am new to this UDF.
Another i would want to know is how to plot velocity vs z-coordinate while calculating solution
pls see the attachments

#include "udf.h"

{
real coord[ND_ND]; /* this will hold the position vector */
real z;
face_t f;

in the DEFINE macro argument */
{
coord[2]=z;
}
}
Attached Images
 WhatsApp Image 2020-09-29 at 11.02.16.jpeg (78.5 KB, 9 views) WhatsApp Image 2020-09-29 at 10.58.30.jpeg (146.6 KB, 10 views) WhatsApp Image 2020-09-29 at 11.26.29.jpeg (149.8 KB, 9 views) WhatsApp Image 2020-09-29 at 11.09.33.jpeg (126.3 KB, 9 views)

 October 5, 2020, 03:11 #2 Senior Member   Alexander Join Date: Apr 2013 Posts: 2,363 Rep Power: 34 tobe Code: `z=coord[2];` was Code: `coord[2]=z;` __________________ best regards ****************************** press LIKE if this message was helpful

March 24, 2022, 08:08
Need help with UDF!
#3
New Member

Soma
Join Date: Mar 2022
Posts: 1
Rep Power: 0

From where did you get this? is there a standard expression? and what does the values stand for??
Attached Images
 2D_stuructured_meshing_screenshot_final_Cropped_wing_area_inlet&outlet.png (33.1 KB, 2 views)

 Tags fluent, fluent - udf - parallel, inlet bc, report definition, udf