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/)
-   -   velocity profile with trailing vortices (https://www.cfd-online.com/Forums/fluent-udf/214434-velocity-profile-trailing-vortices.html)

pondchailang January 31, 2019 02:05

velocity profile with trailing vortices
 
hi everyone,
I'm newbie for udf coding. I had tried to simulate trailing vortices from aircraft in 3D domain by using 2 ideal vortex from lamb-oseen eq. The eq. of vortex is cylindrical coordinate form. I don't know concept how to coding velocity profile of 2 vortex. Could someone explain?

https://lh3.googleusercontent.com/EV...OTpQy7fTg=s170

https://lh3.googleusercontent.com/Hz...onLmh9MDw=s170
Thanks.:)

pondchailang February 1, 2019 23:06

This is my code that I try to generate 1 vortex. It can run but the result is incorrect.



#include "udf.h"

#define V0 0.043
#define taouzero 0.052
#define r0 0.009
#define pi 3.14159265358979323846
#define b0 0.153
#define h0 0.0765

DEFINE_INIT(vortex,d)
{
cell_t c ;
Thread *ct ;
real x[ND_ND] ;
real y ;
real z ;
real r ;
real Vzetra ;

thread_loop_c(ct,d)
{
begin_c_loop(c,ct)
{

y = x[1] ;
z = x[2] ;
r = sqrt(pow(y,2) + pow(z,2)) ;
if(sqrt(pow(x[2],2) + pow(x[1],2)) <= 0.009)
{
Vzetra = taouzero/(2*pi*r)*(1-exp(-pow(r,2)/pow(r0,2)));
C_U(c,ct) = V0 ;
C_V(c,ct) = -Vzetra*(z/r) ;
C_W(c,ct) = Vzetra*(y/r) ;
}
else
{
C_U(c,ct) = 0 ;
C_V(c,ct) = 0 ;
C_W(c,ct) = 0 ;
}
}
end_c_loop(c,ct) ;
}
}


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