USER-DEFINED-MEMORY
Dear all,
I have few questions about user-defined-memory. 1. How one can set some initial values, e.g. zero to the user defined memories. Can one use the cell_looping macros provided by Fluent? 2. How many memory locations are available in one user-defined memory block? Does the number of memory locations adjust to the domain , the data of which we shall store in user-defined memory, or is it fixed somehow? Greetings, Varghese |
Re: USER-DEFINED-MEMORY
1.
For memory 0, loop example : thread_loop_c (t,d) { begin_c_loop (c,t) { C_UDMI(c,t,0)=0.0; } end_c_loop (c,t) } 2. I don't know what you are meaning. Can you be clearer? |
Re: USER-DEFINED-MEMORY
Dear Alexandre,
I used the same in my udf, and found a parse error at this line. Then I used Domain *d; { d=Get_Domain(1); thread_loop_c (t,d) { begin_c_loop (c,t) { C_UDMI(c,t,0)=0.0; } end_c_loop (c,t) } The idea was to get a definition for the variable d in thread_loop_c(c,t). It also doesnot work. I donot know if there is another reason for the compilation error. The second question was about the size of memory allocated when we define a UDM. Can one make sure that it has enough size as to store the variables we define for all the control volumes in the domain we define it? Greetings Varghese |
Re: USER-DEFINED-MEMORY
On UDM is liek defining one scalar variable for your probelm - it will allocate memory for one value in every cell of your domain.
Check udf manual for looping macros etc . the above looks ok. Greg |
Re: USER-DEFINED-MEMORY
Thank you Greg!
Varghese |
Re: USER-DEFINED-MEMORY
Does anyone know if we can only store scalars in UDM? Is there any way to store vector in it, e.g. C_UDMI(c,t,i)[j], or do we have to define seperate UDMs for each component of the vector j. Thanks...
|
All times are GMT -4. The time now is 21:51. |