Gmres
1 Attachment(s)
Hi,
for my work I need to implement the restarted generalized minimal residual method (GMRES(m)) in OpenFOAM. As I am new to OpenFOAM I have several problems with the types of the variables and the corresponding operations I need for the GMRES. So I hope somebody can give me some help or information on how to solve the problems. Like shown in the attached picture the GMRES algorithm uses the Arnoldi process to construct an orthonormal basis Vm=[v1,…,vm]. v1 is computed by v1=r0/beta with r0=bAx0 and beta=r0. r0 as well as beta are of the type volScalarField. Now I don't know of which type the vector v must be, so that I can store the components v1vm in it. The same applies to the hessenberg matrix Hij and the vector wij. I don't know how to implement the matrix and the vector, so can anybody help me with this problem? I tried different ways of implementing these things but nothing works. Perhaps is there already something like GMRES implemented in OpenFOAM, so that I can have look at how it is implemented there? Thanks, Jennifer 
Have a look at how I did it in the lduSolvers librari in 1.5dev:
http://openfoamextend.svn.sourcefor...79&view=markup The two algorithms are close enough to each other to directly reuse most of the code. Enjoy, Hrv 
nDIrections?
Hi all,
I am a new user to Openfoam and I am trying to run shallowWaterFoam simulations using the GMRES solver in the openfoam1.6ext package. When I changed the solver to GMRES it said that "nDirections is not defined" I added this parameter in the fvSolution file and gave it a value of 1, It started to run. I am not sure what this parameter means. Can anyone help? Thank you in advance, Amir 
This is a number of search directions GMRES uses  have a look at a book that expains the algorithm. nDirections 5; is a good choice.
Hrv 
Thank you for your help.

Hi all,
Does anyone have a guide on how to compile new linear solvers in openfoam 2.1.1? I am trying to compile the GMRES solver above but I cant get to work. Thanks, Amir 
Can you be much more specific in what is going wrong or where you are stuck? Do you get compilation errors?

Quote:

Is anyone still interested in this?
I have ported the GMRES solver from foamextend to OpenFOAM 2.3.x. I haven't tested it much, in my case the residuals behaved very weird, but the results were ok in the test case I used. Is this expected behavior? 
Quote:
it that ported GMRES solver still available? And is that solver compatible to OF 2.4? I have great interest to test it on my application. If my target is scalability and HPC performace, can I expect that on GMRES solver instead of PCG? 
2 Attachment(s)
Here it is. You can include it either directly in a solver or recompile the appropriate OpenFOAM library. I haven't tested it very much, since I didn't get better convergence in my application compared to the included linear solvers.
It should go in src/OpenFOAM/matrices/lduMatrix/solvers/GMRES/ 
Hallo Chriss,
thank you very much. I will try to test it in my case. The reason I wanna use GMRES is that I am running a DNS heat transfer case using buoyantpimplefoam. For better scalability I use PCG for pressure equation. If I use perfect gas equation of state, the number of iterations using PCG solver will be around 100, which is acceptable. If I use polynom to describe the density as a function of temperature, the number of iterations will be around 4000! If I use GAMG for p equation, number of iteration will be under 5, but the scalability is poor with more than 500 cores. Do you have an opinion of that? Thank you very much. Quote:

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