CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Main CFD Forum

Performance comparison for CFD FEM solver

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

Reply
 
LinkBack Thread Tools Display Modes
Old   July 21, 2012, 07:17
Default Performance comparison for CFD FEM solver
  #1
Member
 
Hector Redal
Join Date: Aug 2010
Location: Madrid, Spain
Posts: 67
Rep Power: 6
HectorRedal is on a distinguished road
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.
HectorRedal is offline   Reply With Quote

Old   July 25, 2012, 18:06
Default
  #2
Senior Member
 
Join Date: Aug 2011
Posts: 251
Rep Power: 6
leflix is on a distinguished road
Quote:
Originally Posted by HectorRedal View Post
Hi everyone,


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.
Hi Hector,
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.
leflix is offline   Reply With Quote

Old   July 26, 2012, 09:00
Default
  #3
Member
 
Hector Redal
Join Date: Aug 2010
Location: Madrid, Spain
Posts: 67
Rep Power: 6
HectorRedal is on a distinguished road
Quote:
Originally Posted by leflix View Post
Hi Hector,
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.
Hi Leflix,

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,
HectorRedal is offline   Reply With Quote

Old   July 26, 2012, 10:07
Default
  #4
Senior Member
 
Join Date: Aug 2011
Posts: 251
Rep Power: 6
leflix is on a distinguished road
Quote:
Originally Posted by HectorRedal View Post
Hi Leflix,


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.

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:

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.
First of all you do not need to solve so accurately you linear system.
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:

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.
the only stuff you can do if you really want to keep on going with FEM,is to optimize your linear system solver.
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 10:33.
leflix is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I developed an FEM toolkit in Java: FuturEye nkliuyueming Main CFD Forum 6 August 3, 2012 05:26
interfacing a fluid solver with abaqus Tuhin Rakshit Main CFD Forum 0 June 16, 2005 10:03
comments on FDM, FEM, FVM, SM, SEM, DSEM, BEM kenn Main CFD Forum 2 July 18, 2004 18:28
Error during Solver cfd guy CFX 4 May 8, 2001 06:04
How good is CFD? kai Main CFD Forum 39 April 7, 2000 12:48


All times are GMT -4. The time now is 20:45.