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/)
-   -   Saving array or matrix in UDM (https://www.cfd-online.com/Forums/fluent-udf/165942-saving-array-matrix-udm.html)

vucrusader January 29, 2016 19:13

Saving array or matrix in UDM
 
All,

For a user defined scalar function I wish to save cell center values of a given scalar at each iteration (similar to temperature, velocity etc. in fluent). To do so I believe that I have to use a user defined memory allocation. However, Fluent states that I am limited to 500 UDM variables.

If my discretization requires more than 500 cells, how do I save all of them?

Is the UDM variable simply a memory location (like a pointer in c) so that I could save an entire array or matrix in a single UDM variable or will I be able to save only one value (1) to a single UDM?

Regards,

`e` January 31, 2016 22:06

User-defined memory (UDM) is a real number value stored for each cell. For example, you could store the value of 2*T (temperature doubled) for every cell within one UDM. Have a read of the user-defined memory section in the UDF manual for examples and descriptions of the macros (F_UDMI, C_UDMI etc).


All times are GMT -4. The time now is 12:57.