CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   USER-DEFINED-MEMORY (https://www.cfd-online.com/Forums/fluent/30353-user-defined-memory.html)

varghese October 2, 2002 09:08

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

Alexandre October 4, 2002 07:11

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?

varghese October 4, 2002 07:54

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


Greg Perkins October 7, 2002 23:26

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

varghese October 8, 2002 02:49

Re: USER-DEFINED-MEMORY
 
Thank you Greg!

Varghese

Ugur November 4, 2002 11:49

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.