CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   udf for shear velocity error (https://www.cfd-online.com/Forums/fluent/145064-udf-shear-velocity-error.html)

smarika November 27, 2014 09:15

udf for shear velocity error
 
2 Attachment(s)
I am simulating the air flow over a 3D wind turbine of radius 45m in a wind domain using a paraboilc velocity inlet profile with intial velocity 5m/s at 4m height and exponent is 0.4.

The inlet profile is written by the following code, which is interpreted into fluent without any errors.

the rotating domain with sliding mesh is at 103 meters from inlet


The size of the wind domain is 400(x) x 150(y) x 150(z). T
the y direction is the height.

when i initialize the solution using the following udf it gives me error in the x, y and z component.

What can i do to maintain the Velocity Profile along the wind domain? Plz Help

#include "udf.h"


DEFINE_PROFILE(inlet_x_velocity,thread,index)
{
real z[ND_ND];
real Y;
face_t f;
begin_f_loop(f,thread)
{
F_CENTROID(z,f,thread);
Y= z[2];
F_PROFILE(f,thread,index)=5*pow(Y/4,0.3);
}
end_f_loop(f,thread)
}

pakk November 27, 2014 10:31

Quote:

Originally Posted by smarika (Post 521388)
when i initialize the solution using the following udf it gives me error in the x, y and z component.

Can you be more specific about this? What error is shown?

smarika November 27, 2014 22:41

the errror is when i select the inlet for solution initialization. please see the attached pictures

pakk November 28, 2014 06:21

I don't see an error. I only see the value "-1.#IND", is that what you are referring to?

These values are not errors. They might lead to errors later on. Why don't you just replace them by other values, for example all zeroes? It is only the initialisation after all...


All times are GMT -4. The time now is 21:08.