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

Multiple user defined scalars

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 23, 2001, 08:04
Default Multiple user defined scalars
  #1
Hassid Samuel
Guest
 
Posts: n/a
In a problem in which more than one user defined scalar is used, is there any possibility if we use in the process of the calculation of the source term associated with each scalar the same function to circumvent the computer-time-consuming calculation of a part of the source term by using an array which is calculated once and whose value is transfered to the source term of the other user-defined-scalar equation ?
  Reply With Quote

Old   March 26, 2001, 21:00
Default Re: Multiple user defined scalars
  #2
Greg Perkins
Guest
 
Posts: n/a
The easiest thing to do is define one or more user defined memory locations and store the value(s) of the source term(s) in that, calculated with a define_adjust function.

Then when your source terms are called you can just passs the value stored in the user memory as the source term. This works fine, but of course some additional memory is required.

Thus your calculation loop is called only once per iteration (or less if required) from the define_adjust routine.

If your calc loops are intensive you'll get a good speed-up from this - in my poblem I got around 10x speed-up.

Regards

Greg
  Reply With Quote

Old   March 27, 2001, 04:05
Default Re: Multiple user defined scalars
  #3
Hassid Samuel
Guest
 
Posts: n/a
Thanks for the answer. I am not sure though - is this way to be used only for the storage of the source terms themselves - or for other terms used in conjunction with source terms ?
  Reply With Quote

Old   March 27, 2001, 04:12
Default Re: Multiple user defined scalars
  #4
Greg Perkins
Guest
 
Posts: n/a
what do you mean?

you can use memory location to store whatever you want. it depends on your problem. essentially you will have some trade-off of memory vs computation. If you want fast computation, you can store results calculated once and pass them to the source terms as described, or you can repeatedly calculate them to save memory. The amount of memory used for storage is pretty small - remember that Fluent stores just about all variables/properties in this way internally - that's why its uses so much ram as compared to a solver you might write yourself. So using a few udms will not effect memory sigificantly compared to your normal fluent model.

Greg
  Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to set periodic boundary conditions Ganesh FLUENT 15 November 18, 2020 07:09
USER DEFINED SCALARS yann Phoenics 6 November 14, 2013 09:46
OpenFOAM static build on Cray XT5 asaijo OpenFOAM Installation 9 April 6, 2011 13:21
User Defined Scalars - Returning Values Carlos V. FLUENT 0 April 19, 2006 19:18
Naming User Defined Scalars Greg Perkins FLUENT 0 March 7, 2000 00:10


All times are GMT -4. The time now is 02:29.