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

Get cell coordinates and value at the lower face of the cell

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 27, 2015, 07:28
Default Get cell coordinates and value at the lower face of the cell
  #1
New Member
 
B. F
Join Date: Feb 2014
Posts: 5
Rep Power: 12
troymcfont is on a distinguished road
Hi!

I'm new to fluent programming and I would appreciate if you gave me some advices. I am coding a slip wall boundary condition for a microchannel and I would like to compute a first order and a second order BC. So, for the first order one I need the value at the boundary itself and at the cell centre of the adjacent cell, plus the coordinates at these regions in order to compute the spatial derivative.

To do so, I used F_CENTROID and C_CENTROID, but it is not working.
The part of the code that I'm using to compute such values is:
Code:
            F_CENTROID(xf,f,thread);    /*Get current face centroid */
            t0 = F_C0_THREAD(f,thread); /*Find thread containing this cell*/
            c0 = F_C0(f,thread);        /*Find cell attached to current face */
            C_CENTROID(xc,c0,t0);       /*Get adjacent cell centroid */
            
            rUp = C_U(c0,t0);           /*Get velocity in the adjacent cell*/
            
            yf = xf[1];
            yc = xc[1];
            rDy = abs(yf-yc);
Additionally I will need the value at the lower face of the cell to compute the second order derivative. Which macro I need to get this value??
Thank you so much.
Bernat.
troymcfont 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



All times are GMT -4. The time now is 23:38.