|
[Sponsors] |
Get cell coordinates and value at the lower face of the cell |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 27, 2015, 07:28 |
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 |
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); Thank you so much. Bernat. |
|
|
|