CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > FLUENT

USER-DEFINED-MEMORY

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   October 2, 2002, 09:08
Default USER-DEFINED-MEMORY
  #1
varghese
Guest
 
Posts: n/a
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
  Reply With Quote

Old   October 4, 2002, 07:11
Default Re: USER-DEFINED-MEMORY
  #2
Alexandre
Guest
 
Posts: n/a
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?
  Reply With Quote

Old   October 4, 2002, 07:54
Default Re: USER-DEFINED-MEMORY
  #3
varghese
Guest
 
Posts: n/a
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

  Reply With Quote

Old   October 7, 2002, 23:26
Default Re: USER-DEFINED-MEMORY
  #4
Greg Perkins
Guest
 
Posts: n/a
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
  Reply With Quote

Old   October 8, 2002, 02:49
Default Re: USER-DEFINED-MEMORY
  #5
varghese
Guest
 
Posts: n/a
Thank you Greg!

Varghese
  Reply With Quote

Old   November 4, 2002, 12:49
Default Re: USER-DEFINED-MEMORY
  #6
Ugur
Guest
 
Posts: n/a
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...
  Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I allocate user defined memory? MASOUD Fluent UDF and Scheme Programming 1 November 20, 2014 03:12
Trouble setting user scalar and user memory names tstorm FLUENT 5 April 19, 2013 01:45
user defined sourcen term xck1986 CFX 1 July 8, 2010 08:35
user defined turbulence model manuutin STAR-CD 5 October 14, 2009 05:29
Gradient of a User defined Variable Ramadas CFX 2 August 21, 2007 09:19


All times are GMT -4. The time now is 15:05.