|
[Sponsors] |
July 21, 2012, 08:17 |
Performance comparison for CFD FEM solver
|
#1 |
Senior Member
Hector Redal
Join Date: Aug 2010
Location: Madrid, Spain
Posts: 243
Rep Power: 16 |
Hi everyone,
I would like to compare the performance of a cfd solver developed by me that uses the Characteristic Split Algorithm with any reference available. The validation test case I am using is the lid driven cavity flow problem for a Reynolds number of 1000. For a 50x50 cell layout, the code takes 3 hours for getting the steady state in a i3 processor based computer. I am afraid that this not quite a good performance. Does anyone know any reference I can use as a validation test? I would appreciate any feedback. Thanks in advance. Hector. |
|
July 25, 2012, 19:06 |
|
#2 | |
Senior Member
Join Date: Aug 2011
Posts: 272
Rep Power: 15 |
Quote:
yes it is really poor...I do not know the method you call Characteristic Split Algorithm but forget it.... Our very simple house code in finite volume, fully transcient, written in standard fortran, takes 32 seconds to get steady state at Re=1000 for lidd driven cavity in 50x50 on a 3GHz Dell computer. (and our linear system solver is even not the best one, and we could certainly reduce computational time with a Bi-CGSTAB or multigrid) First verify that you obtain the right solution in comparing your results with the benchmark of Ghia. Then after you can focus on optimization and improvement. |
||
July 26, 2012, 10:00 |
|
#3 | |
Senior Member
Hector Redal
Join Date: Aug 2010
Location: Madrid, Spain
Posts: 243
Rep Power: 16 |
Quote:
First of all I would like to thank you for providing me with performance information about other algorithms. As far as I know, FEM (Finite Element Method) is a considerably most costly method than the Finite Volume Method. This could explain the difference in performance. Currently, I am using a transient approach to reach the steady state, using a 0.008 time step for a Re=1000. I consider that the steady state is reached when the difference between the previous velocity and the current velocity is less than 1e-5. My implementation uses a Bi-CSTAB algorithm for calculation of the matrix inverse. And it takes 3 minutes to calculate the inverse of a matrix of 5202 rows x 5202 columns with an error or less than 1e-9. Obviously, 3 minutes is by far greater than 32 seconds. I would like to comment that I have validated my results with Ghya, and I get an error less than 1%. But, as you have rightly mentioned, with a poor performance. I don't know how to improve the implementation. I would highly appreciate any comment or suggestion. Thank you very much for your help and time. Best regards, |
||
July 26, 2012, 11:07 |
|
#4 | |||
Senior Member
Join Date: Aug 2011
Posts: 272
Rep Power: 15 |
Quote:
Yes you are right, it is mainly due to the linear system solver efficiency. Indeed in FEM the coefficient are sparsely distributed within the matrix. In finite volume, like in finite difference, the matrix is organized in diagonals (5 in 2D). The classical linear system solvers are more efficient for diagonaly structured matrix. The structure of the matrix affects the performance of the linear system solver. Quote:
residual < 1.e-5 is largely enough. even lower.. The inner loop and coupling agorithm will do the rest and will compensate... You said that you take 3 mn to solve one linear system of 5202x5202. I take 35 seconds to solve the complete problem 5000 time iterations, the time step dt=0.01, Re=1000, residual < 1.e-9 (to use the same criteria than you) With residual < 1.e-5s it takes 29 seconds For each time iteration, I solve 3 linear systems (U,V,P) time the number of inner loop due to simple algorithm and in the first time step it can perform 20 inner loops after 700 iterations only one. So I solve more than 30.000 linear system during this simulation ! The only thing is that my mesh is 50x50 control volumes so only a matrix 2500x2500 so a bit smaller than yours, but I will perform a simulation with 72x72 cvs to be closer than your case. Quote:
Perhaps multigrid may be an option. but the first thing to do would be to re-organize your linear system. There are some algorithms which reorganize your linear system and your matrix into optimized banded one. Unfortunately I do not remember the name of a software which does this that I have seen. May be someone here knows that... When it is done, you can call your linear system solver. It will certainly improve. What is also your OS, your compiler and you programming language ? Do you use optimized compiling options ? It may have an impact on the CPU time. You can reduce from 30% with suited options. Last edited by leflix; July 26, 2012 at 11:33. |
||||
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
I developed an FEM toolkit in Java: FuturEye | nkliuyueming | Main CFD Forum | 7 | January 29, 2016 14:28 |
interfacing a fluid solver with abaqus | Tuhin Rakshit | Main CFD Forum | 0 | June 16, 2005 11:03 |
comments on FDM, FEM, FVM, SM, SEM, DSEM, BEM | kenn | Main CFD Forum | 2 | July 18, 2004 19:28 |
Error during Solver | cfd guy | CFX | 4 | May 8, 2001 07:04 |
How good is CFD? | kai | Main CFD Forum | 39 | April 7, 2000 13:48 |