|
[Sponsors] |
July 3, 2018, 05:50 |
access wall velocities using UDFs in Fluent
|
#1 |
Senior Member
Join Date: Nov 2011
Posts: 109
Rep Power: 15 |
Hi,
I need to access the velocity components in some boundary faces belonging to a moving wall. I am trying to do this using a define on demand UDF, using the macros F_U, F_V and F_W. The results, however seem to be wrong. The wall I am interested in is rotating aroung the z axis. I would expect then all the w velocities to be zero as it is an inviscid wall! From my macro the results are instead wrong, and w velocities obtained using F_W are not zero. Also the u and v components seem to be wrong. The solution itself, however, makes sense as I can plot those variables as contour plot and they make sense (w=0 everywhere and u and v have trends consistent with rigid rotation around the z axis). If I apply the same macro on another viscous wall, stationary this time, it does not work either! In this case I'd expect all three components of velocity to be 0 but they are not. Below a code snippet of my UDF: Code:
DEFINE_ON_DEMAND(write_omega_15) { #if !RP_HOST Domain *domain=Get_Domain(1); Thread *thread; face_t c; thread=Lookup_Thread(domain, 15); real *xyz; xyz=(real *)malloc(ND_ND * sizeof(real)); real u, v, w, x, y, z, omega, r, abs_v; x = 10.0; y = 10.0; z = 10.0; u = 0.0; v = 0.0; w = 0.0; begin_f_loop(c,thread) F_CENTROID(xyz,c,thread); u = F_U(c,thread); v = F_V(c,thread); w = F_W(c,thread); x = xyz[0]; y = xyz[1]; z = xyz[2]; r = sqrt(pow(y, 2.0) + pow(x, 2.0)); abs_v = sqrt(pow(v, 2.0) + pow(u, 2.0)); Message("\n r %f, u %f, v %f, w %f, abs_v %f, omega %f:\n",r,u,v,w,abs_v,abs_v/r); end_f_loop(c,thread) #endif } Any help is appreciated! Rob |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Natural convection in a closed domain STILL NEEDING help! | Yr0gErG | FLUENT | 4 | December 2, 2019 01:04 |
Running UDF with Supercomputer | roi247 | FLUENT | 4 | October 15, 2015 14:41 |
UDF to Access Wall Normal Concentration Gradient | Daniel Tanner | Fluent UDF and Scheme Programming | 4 | February 18, 2015 15:35 |
UDF for wall slipping | HFLUENT | Fluent UDF and Scheme Programming | 0 | April 27, 2011 13:03 |
Problem in IMPORT of ICEM input file in FLUENT | csvirume | FLUENT | 2 | September 9, 2009 02:08 |