# Multiple user defined scalars

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

 March 23, 2001, 08:04 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 ?

 March 26, 2001, 20:00 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

 March 27, 2001, 03:05 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 ?

 March 27, 2001, 03:12 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

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Ganesh FLUENT 13 January 22, 2014 05:11 yann Phoenics 6 November 14, 2013 09:46 asaijo OpenFOAM Installation 9 April 6, 2011 12:21 Carlos V. FLUENT 0 April 19, 2006 18:18 Greg Perkins FLUENT 0 March 7, 2000 00:10

All times are GMT -4. The time now is 09:26.