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

Regarding slow computation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 14, 2017, 09:07
Default Regarding slow computation
  #1
New Member
 
hemant mittal
Join Date: Feb 2016
Posts: 21
Rep Power: 10
hemmt is on a distinguished road
Hello every one,
I m simulating atmospheric flow around buildings using LES. for this I have created an UDF as attached for fluctuating velocity profile.
but using this UDF, computation is getting very slow.
as I m quite new user to UDF.
so please guide to improve this situation regarding slow computaion.
Attached Files
File Type: c main.c (1.4 KB, 9 views)
hemmt is offline   Reply With Quote

Old   February 21, 2017, 03:27
Default
  #2
Member
 
KirMaks
Join Date: Aug 2016
Posts: 34
Rep Power: 9
kirmaks is on a distinguished road
Hallo,

you have two loops in the code and You are performing many "pow" operations. You can try to save some time putting some repeating math into separate variables, i.e. replace y/y0 with y_prime, where y_prime=y/y0 is computed only once in the begining of the loop. The same is for the parameters B1, B2 and B3 where You can put 70.8/U/U into one variable.

You are also using 500 iterations for the inside loop. You may consider to reduce this number to a reasonable value if You want to increase the performance.

Also You may compile the UDF (I don't know is it interpreted or compiled).

Best regards, Maksim
kirmaks is offline   Reply With Quote

Reply


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
pimpleDyMFoam computation randomly stops babapeti OpenFOAM Running, Solving & CFD 5 January 24, 2018 05:28
the speed of parallel computation for over 3 million grid is very slow liujmljm SU2 7 June 27, 2014 16:45
problem in the CFX12.1 parallel computation BalanceChen ANSYS 2 July 7, 2011 10:26
Discussion on the computation of the multi-stage axial compressor BalanceChen CFX 5 January 5, 2011 02:23
Why the parallel computation is slow ztdep OpenFOAM Running, Solving & CFD 1 May 1, 2008 04:55


All times are GMT -4. The time now is 14:48.