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/)
-   -   Retrieving stored variables (https://www.cfd-online.com/Forums/fluent-udf/98611-retrieving-stored-variables.html)

cdf_user March 14, 2012 14:33

Retrieving stored variables
 
A few questions about storing and retrieving variables:
What is P_USER_REAL(p,0) used for?
If I have stored a number in C_UDMI(f,t,0), how do i access this memory location later on to compute some other formula

Ex: F = <UDMI number > * mass* a*....

How do I access the memory location so that the number stored in the memory location can be used in the sample formula above?

Any other general explanation regarding the use of user defined scalar variables is appreciated.

gearboy March 14, 2012 22:03

Quote:

Originally Posted by cdf_user (Post 349480)
A few questions about storing and retrieving variables:
What is P_USER_REAL(p,0) used for?
If I have stored a number in C_UDMI(f,t,0), how do i access this memory location later on to compute some other formula

Ex: F = <UDMI number > * mass* a*....

How do I access the memory location so that the number stored in the memory location can be used in the sample formula above?

Any other general explanation regarding the use of user defined scalar variables is appreciated.

P_USER_REAL is used to store user-defined information related to particle.
C_UDMI(f,t,0) stored value in UDMI-0 on face "f". So when you want to access it, you should first give the parameter "f", telling Fluent which face to access.

cdf_user March 14, 2012 22:27

how many values can UDMI-0 store? 1 or 500?



<clarification of a typo in previous post for other people reading>

Actually it should be C_UDMI(c,t,0) since C_UDMI is use to access or store values of user defined memory in a "cell". So it would require the cell to access it


F_UDMI(f,t,0) is for faces.


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