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/)
-   -   Fluent how to access coordinates of vector (https://www.cfd-online.com/Forums/fluent-udf/245647-fluent-how-access-coordinates-vector.html)

jdiab October 17, 2022 12:06

Fluent how to access coordinates of vector
 
Dear all,

I am trying to access the coordinates of a calculated vector in a UDF.

Basically, I am calculating the current density through a created UDS of the electric potential, by using vector commands (NV_VEC, NV_VS)

However, I need to use the 3d cartesian components of this current_density vector for further calculations,

would writing NV_VEC(current_density)[0] give access to the x component of the current density, and NV_VEC(current_density)[1] give acces to the y-component, etc. or no?

and if not, could someone please help me in accessing the cartesian components of the vector?

Thank you in advance

AlexanderZ October 18, 2022 02:55

current_density[0] for x component
current_density[1] for y component


All times are GMT -4. The time now is 06:47.