CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

access wall velocities using UDFs in Fluent

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 3, 2018, 04:50
Default access wall velocities using UDFs in Fluent
  #1
Senior Member
 
Join Date: Nov 2011
Posts: 109
Rep Power: 14
robboflea is on a distinguished road
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
}
The question is: am I doing something wrong to access the wall velocities or is there an inherent limitation of the face velocity access macros? I have been banging my head on this since a couple of days now and I cannot seem to understand where the bug is, if any.

Any help is appreciated!

Rob
robboflea is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Natural convection in a closed domain STILL NEEDING help! Yr0gErG FLUENT 4 December 2, 2019 00:04
Running UDF with Supercomputer roi247 FLUENT 4 October 15, 2015 13:41
UDF to Access Wall Normal Concentration Gradient Daniel Tanner Fluent UDF and Scheme Programming 4 February 18, 2015 14:35
UDF for wall slipping HFLUENT Fluent UDF and Scheme Programming 0 April 27, 2011 12:03
Problem in IMPORT of ICEM input file in FLUENT csvirume FLUENT 2 September 9, 2009 01:08


All times are GMT -4. The time now is 16:51.