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/)
-   -   How to get the coordinates and velocities at the grid center and nodes simultaneously (https://www.cfd-online.com/Forums/fluent-udf/68959-how-get-coordinates-velocities-grid-center-nodes-simultaneously.html)

maye761 October 7, 2009 06:36

How to get the coordinates and velocities at the grid center and nodes simultaneously
 
when fluent is calculating, i want to export the coordinates and velocities at the grid center and nodes together to a data file. How should I do?

Häwimeddel October 12, 2009 10:58

Do you want to do this for every iteration?

Anyway, the macros you are looking for are

Code:

C_CENTROID(x,c,t); //coords of cell centre
C_U(c,t) //flow velocity x
C_V(c,t) //flow velocity y
C_W(c,t) //flow velocity z

Just loop over all the cells in the domain with

Code:

begin_c_loop(cell,thread)
{
}
end_c_loop(cell,thread)


crazyman October 12, 2009 13:40

hey hi i want to know how do we define heat source in fluent

maye761 October 18, 2009 22:48

Well, this is the macros for velocities at center of cells. How to export velocities at nodes?

Häwimeddel October 19, 2009 02:41

I don´t believe there are any macros for getting the velocities at the nodes. I believe Fluent only solves the velocities for the cell centres. You would have to interpolate betwen the cell centre velocities to get a value for the velocities at the nodes.


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