|
[Sponsors] |
March 23, 2001, 08:04 |
Multiple user defined scalars
|
#1 |
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, 21:00 |
Re: Multiple user defined scalars
|
#2 |
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, 04:05 |
Re: Multiple user defined scalars
|
#3 |
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, 04:12 |
Re: Multiple user defined scalars
|
#4 |
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 |
|
|
|
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 |