CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   STAR-CCM+ (http://www.cfd-online.com/Forums/star-ccm/)
-   -   User Field Function (http://www.cfd-online.com/Forums/star-ccm/70423-user-field-function.html)

hannow November 24, 2009 05:20

User Field Function
 
Hi all,

I want to create a new user field function that calculate the velocity magnitude of only two components which are j and k. The problem is that i don't know how to write the function definition. Specifically, I don't know the funtion names of the two velocity component j and k. If anybody knows the tips, please let me know.

Thank you all.

Hannow

engrob November 24, 2009 05:43

sqrt($$Position[1]^2+$$Position[2]^2)

Arconis November 24, 2009 13:19

Quote:

Originally Posted by engrob (Post 237464)
sqrt($$Position[1]^2+$$Position[2]^2)

I think exponents must be defined like this:

sqrt(pow($$Position[1],2)+pow($$Position[2],2))

hannow November 24, 2009 21:20

The one I was looking for is this:

sqrt(pow($$Velocity[1],2)+pow($$Velocity[2],2))

Thank you all for the tip, really appreaciate it :-)


All times are GMT -4. The time now is 09:24.