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

How to verify AMG code?

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

Like Tree10Likes
  • 2 Post By arjun
  • 1 Post By ibopaul
  • 3 Post By arjun
  • 1 Post By aero_head
  • 2 Post By arjun
  • 1 Post By ibopaul

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 18, 2021, 12:01
Default How to verify AMG code?
  #1
New Member
 
ibopaul's Avatar
 
ibopaul
Join Date: Nov 2020
Posts: 12
Rep Power: 5
ibopaul is on a distinguished road
Hi, recently i made my CFD code which uses algebraic multigrid method to solve compressible Euler equation (cell-centered FVM).

I wanted to know this code works properly, by comparing with similar reference papers.
However, i couldn't find appropriate reference paper which shows AMG performance(how much does calculation accelerated) while solving compressible Euler equation.

Is there any way to verify AMG code?

Thank you.
ibopaul is offline   Reply With Quote

Old   February 18, 2021, 15:56
Default
  #2
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,273
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Take uniform mesh and observe the convergence. At each cycle you should be able to achieve text book efficiency. That is error should drop almost 10 times with each cycle.

This shall happen with all the cases you try with uniform and good meshes. If it does not happen then there is something wrong.


I was reading a book and the author mentioned that people often get happen with say 5 to 7 times drop per cycle and think that everything is good. He says that if for simple problem it does not drop by at least a factor of 10 then you should carefully check everything and doubt what you have.
aerosayan and aero_head like this.
arjun is offline   Reply With Quote

Old   February 18, 2021, 20:38
Default Thank you for reply
  #3
New Member
 
ibopaul's Avatar
 
ibopaul
Join Date: Nov 2020
Posts: 12
Rep Power: 5
ibopaul is on a distinguished road
Thank you for reply.

Can you tell me about document you've read?
I think i need to study more about AMG.

Thank you.
aero_head likes this.
ibopaul is offline   Reply With Quote

Old   February 18, 2021, 22:04
Default
  #4
Senior Member
 
Kira
Join Date: Nov 2020
Location: Canada
Posts: 435
Rep Power: 8
aero_head is on a distinguished road
Quote:
Originally Posted by arjun View Post
Take uniform mesh and observe the convergence. At each cycle you should be able to achieve text book efficiency. That is error should drop almost 10 times with each cycle.

This shall happen with all the cases you try with uniform and good meshes. If it does not happen then there is something wrong.


I was reading a book and the author mentioned that people often get happen with say 5 to 7 times drop per cycle and think that everything is good. He says that if for simple problem it does not drop by at least a factor of 10 then you should carefully check everything and doubt what you have.
I am similarly investigating the AMG. Would love to read this book you have mentioned. What is it called? As well, do you have any papers on the topic?
aero_head is offline   Reply With Quote

Old   February 18, 2021, 22:53
Default
  #5
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,273
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
I have been reading lots of papers and books over last 20 years so it is hard to pin point where i read that. (it goes back at least 8 years when i read it).

So I point out two most useful documents that i ever read on amg:

https://www.researchgate.net/publica...al_2nd_Edition


https://www.ljll.math.upmc.fr/~frey/...0multigrid.pdf

Read both of them, they were very useful to me in learning it.
aerosayan, ibopaul and aero_head like this.
arjun is offline   Reply With Quote

Old   February 18, 2021, 23:50
Default
  #6
Senior Member
 
Kira
Join Date: Nov 2020
Location: Canada
Posts: 435
Rep Power: 8
aero_head is on a distinguished road
Quote:
Originally Posted by arjun View Post
I have been reading lots of papers and books over last 20 years so it is hard to pin point where i read that. (it goes back at least 8 years when i read it).

So I point out two most useful documents that i ever read on amg:

https://www.researchgate.net/publica...al_2nd_Edition


https://www.ljll.math.upmc.fr/~frey/...0multigrid.pdf

Read both of them, they were very useful to me in learning it.
Thanks Arjun!

I also just found this: https://computing.llnl.gov/sites/def...05_revised.pdf
where a quote from the book is "Here, solving a problem is defined as reducing the residual by 10 orders of magnitude..."
arjun likes this.
aero_head is offline   Reply With Quote

Old   February 19, 2021, 00:12
Default
  #7
New Member
 
ibopaul's Avatar
 
ibopaul
Join Date: Nov 2020
Posts: 12
Rep Power: 5
ibopaul is on a distinguished road
Thank you for recommendations!
ibopaul is offline   Reply With Quote

Old   February 19, 2021, 02:44
Default
  #8
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,273
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Here is quote from page 56 of first document

"Diagnostic Tools

As with any numerical code, debugging can be the most difficult part of creating
a successful program. For multigrid, this situation is exacerbated in two ways.
First, the interactions between the various multigrid components are very subtle,
and it can be difficult to determine which part of a code is defective. Even more
insidious is the fact that an incorrectly implemented multigrid code can perform
quite well—sometimes better than other solution methods! It is not uncommon for
the beginning multigrid user to write a code that exhibits convergence factors in the
0.2–0.3 range for model problems, while proper tuning would improve the factors
to something more like 0.05. The difficulty is convincing the user that 0.2–0.3 is
not good enough.
After all, this kind of performance solves the problem in very few
cycles. But the danger is that performance that is below par for model problems
might really expose itself as more complexities are introduced. Diagnostic tools
can be used to detect defects in a multigrid code—or increase confidence in the
observed results.
aerosayan and aero_head like this.
arjun is offline   Reply With Quote

Old   February 19, 2021, 04:46
Default
  #9
New Member
 
ibopaul's Avatar
 
ibopaul
Join Date: Nov 2020
Posts: 12
Rep Power: 5
ibopaul is on a distinguished road
Thank you very much for detailed explanation!
I will study by reading the recommended document.

Thanks again.
arjun likes this.
ibopaul is offline   Reply With Quote

Reply

Tags
algebraic multigrid, verification

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fortran->Assembly : How to remove redundant non-vectorized code? aerosayan Main CFD Forum 6 November 20, 2020 05:37
The FOAM Documentation Project - SHUT-DOWN holger_marschall OpenFOAM 242 March 7, 2013 12:30
Small 3-D code Zdravko Stojanovic Main CFD Forum 2 July 19, 2010 10:11
AMG versus ICCG msrinath80 OpenFOAM Running, Solving & CFD 2 November 7, 2006 15:15
Design Integration with CFD? John C. Chien Main CFD Forum 19 May 17, 2001 15:56


All times are GMT -4. The time now is 15:52.