CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   Ansys Fluent 17 UDF Velocity Profile Update. (https://www.cfd-online.com/Forums/fluent-udf/178723-ansys-fluent-17-udf-velocity-profile-update.html)

Phil-M October 14, 2016 10:34

Ansys Fluent 17 UDF Velocity Profile Update.
 
Hello,

I have been given a velocity profile UDF made for a previous version of ANSYS, which however does not work in Fluent 17.

Any input on how to update this to work in Fluent 17 would be greatly appreciated.

#include "udf.h"

DEFINE_PROFILE(inlet_parab,thread,equation)
{
float x[3],y; /*face centroid coordinates */
face_t f; /* face identifier*/
float Vz;
float C1 = 1.76E-6;
float C2 = 2E-5;
float C3 = 6E-4;
float C4 = 2.1E-2;
float Const = 1.79;

/* loop on all faces belonging to the current thread */

begin_f_loop(f,thread)
{
F_CENTROID(x,f,thread); /*get the face centroid coordinates*/
y=x[1]; /*get the y coordinate */
Vz = -(C1*y*y*y*y)-(C2*y*y*y)+(C3*y*y)+(C4*y)+ Const; /*equation fit at 1.79 m/s to channel flow */
F_PROFILE(f,thread,equation)=Vz;
}
end_f_loop(f,thread)
}


Kind Regards, Phil.

Zbynek October 17, 2016 04:29

What error message do you get?

Phil-M October 17, 2016 05:23

Hi Zbynek,

This is the error message I am currently getting.

https://scontent.xx.fbcdn.net/t31.0-...30239760_o.jpg

https://scontent.xx.fbcdn.net/t31.0-...50099802_o.jpg


Many thanks for your response,

Phil.

Zbynek October 17, 2016 08:30

As the error message says - you did not compile the UDF, or not at least for the double precision solver (dpp). Install Visual Studio and compile the code. You can find several threads about this on this portal.

Phil-M October 17, 2016 09:05

Many thanks, I shall give that a go.


All times are GMT -4. The time now is 14:11.