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

Weiss & Smith Preconditioned Density Based Solver, Algebraic Multigrid, etc.

Register Blogs Community New Posts Updated Threads Search

Like Tree7Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 3, 2016, 05:32
Default
  #21
New Member
 
Karpenko Anton
Join Date: Aug 2009
Location: Saint-Petersburg
Posts: 4
Rep Power: 16
aspera is on a distinguished road
Quote:
Originally Posted by sbaffini View Post
I have to say that i overlooked at this method of computing U_r just because it had another small parameter (\epsilon=10^{-5}) which was, again, much smaller than what i typically need (order 1 without pressure gradient, order 0.1 in problematic cases when i use the pressure gradient term). What is your experience on this?
In this methods U_r = |V| in all Mach number then M<1, but then we need solve \Theta = \left( \frac{1}{U^2_r} - \frac{\rho_T}{\rho C_p} \right) and if M < \epsilon we set M = \epsilon and solve the preconditioned equations corresponding (approximately) to M \rightarrow 0. Therefore, we choose the \epsilon as little as possible, but so as not to receive a loss of precision in the division.

I do not have experience in the calculation of the implicit scheme. In the explicit schemes without preconditioning I do not get convergence for low speed flows, when with preconditioning i get it. I did not compare improvements the convergence in explicit schemes whit different \epsilon.

Quote:
Originally Posted by sbaffini View Post
This is something i didn't really got (in the paper) and i suspect i'm really missing something here. While i agree that using the square roots for each flux might slow down things a little bit (and especially so in the 90's), i can't see this as my bottleneck in the code performance nor can any profiling tool. So i simply decided to stick to the original Roe formulation. Actually i couldn't see any major difference in my tests (still, i didn't try this on the 5 Toro shock tube tests, some of which were failed by Fluent with both Roe and AUSM 1st order ). Is there any particular reason for which you decided to use averages (instead of Roe averages), besides trying to follow closely the paper?

So, i guess, you also use simple averages for on the faces when computing the fluxes.
Yes, you're right, I used the average by reason of Weiss paper and because it is easier than the Roe (+ code has been written on the GPU, and I was paranoid about performance ))) ). I think it is possible to average as you'd like when M < 1.

I also noticed that the Fluent strange working on some simple tasks (for example hypersonic).
sbaffini likes this.
aspera is offline   Reply With Quote

Old   December 25, 2017, 21:20
Default implicit density-based in foam-extend 4.0
  #22
New Member
 
WangYi
Join Date: Dec 2015
Location: Xi'an China
Posts: 7
Rep Power: 10
youmengtear is on a distinguished road
Dear Paolo.
I am trying to develop a implicit density-based solver with time derivative preconditioning method in framework of foam-extend 4.0. But when I use a CFL number beyond 4.0, it diverged. I am not sure the system matrix I used is correct. Could you in convinent to explain how to discrete it in a cell with one or more face is boundary part? Thank you very much
youmengtear is offline   Reply With Quote

Old   December 27, 2017, 07:05
Default
  #23
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,151
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Quote:
Originally Posted by youmengtear View Post
Dear Paolo.
I am trying to develop a implicit density-based solver with time derivative preconditioning method in framework of foam-extend 4.0. But when I use a CFL number beyond 4.0, it diverged. I am not sure the system matrix I used is correct. Could you in convinent to explain how to discrete it in a cell with one or more face is boundary part? Thank you very much
Dear WangYi,

first of all I want to stress that I am a practitioner more than an expert with a specific study in the field. So, take everything with a grain of salt.

In my code I have two kinds of boundaries, body fitted solid ones (walls and symmetry) and non solid ones (body fitted open boundaries and immersed solid boundaries).

The way I treat non solid boundaries is via ghost cells or sort of, in the sense that I apply there the convective scheme as if they were internal boundaries. This means that the implicit part comes from the convective scheme, but I simply add its matrix to the internal cell row-column, as the ghost cell is just fictitious for me (just some space in the variables array where I conveniently store what I need to apply bcs straightforwardly).

On body fitted solid boundaries I directly build the fluxes and apply them. However, for the convective part, I add (still, only to the adjacent fluid cell row-column) the jacobian of the flux to the implicit part, as I am solving in primitive variables.

For the diffusive fluxes I simply use the TSL approximation for the implicit part. What changes on the boundary, thus, is just the length at the denominator (and, again, the fact that I only add the implicit part to the row-column relative to the adjacent fluid cell).

In addition to this, note that on the boundary I don't even care about the exact scaling of these terms (even if, in the future, I will certainly do it). Thus, for example, the jacobian I add for the convective part on body fitted solid boundaries is the same I use for internal faces (so it has a wrong 2 factor in it).

In practice, except for the dissipation of the convective scheme (which is only added congruently), my implicit part on the boundary is identical to that in the interior, using for the geometric part a fictitious cell on the other side of the boundary that doesn't actually exist. In some cases I get the exact jacobian, in some others not. But for the second order scheme that wouldn't be exact in any case, so I don't care that much (yet).

When using this approach I can reach a CFL as high as 1E6.

Obviously, that's not always possible, and there are cases which need to run on much lower values. The range 10-100 is more typical of practical cases. Very few ones need to start (or pass trough) a 5 (default value in Fluent), but when I need to go below that, that's typically the signal for other problems.

In case it might help, I want to also add how I solved some of the issues I raised in my original question at the beginning of this thread.

First of all, I finally switched to a second order scheme that, given the gradient extrapolated values on the faces for p and T, would then compute with them all the other fields (instead of independently extrapolating density and enthalpy with their own gradients). Shock tube tests confirmed that this is the way to go (especially for near vacuum cases). This complicates the handling of terms that typically end up into the pressure (e.g., gravity potential) or enthalpy (e.g., gravity potential energy and turb. kinetic energy), but it is definitely the way to go.

For what concerns the pressure in the preconditioning velocity. I tried computing it in the classical way suggested in some papers (with loops on faces and using max over neighbors), but that produced worst results and code with respect to my original approach based on the pressure gradient already available.

In the Darmofal paper, cited in the first post, are also presented two scalings of the preconditioning velocity (you first compute it classically, then scale it with a function of M). One is that also used in Fluent; the other one is an original proposal from Darmofal. I finally found that the Darmofal proposal is better in my case. It is less aggressive of the Fluent one, but much better than the unscaled case over a large M range (but reduces to that for M = 0). The key here seems to be uniformity.

My convective scheme still uses a Roe average of the adjacent preconditioning velocities, but on boundaries now I revert to the max between the one in the adjacent fluid cell and the hypothetical one arising on the face for its current values of the variables.

Another aspect I underestimated is the unsteady preconditioning, which needs consideration if you go unsteady. There aresome paper around describing how they solved it in OVERFLOW.
sbaffini is offline   Reply With Quote

Old   December 28, 2017, 01:23
Default
  #24
New Member
 
WangYi
Join Date: Dec 2015
Location: Xi'an China
Posts: 7
Rep Power: 10
youmengtear is on a distinguished road
Dear Paolo,
Thanks to your quick reply and sorry for my poor English. From your explaination, the diagonal part maybe wrong in my system matrix, as the boundary contribution is not added.
I'm only dealing with Euler equation, so the diffusive fluxes are not noted. The second order scheme comes with the same way as you describe. I have not read the Darmofal paper you mensioned, and I will read it later.
Thank you very much!
sbaffini likes this.
youmengtear 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
Pressure based and Density based Solver Xobile Main CFD Forum 39 August 19, 2020 06:04
"Solid" in density based solver songpen1985 Fluent Multiphase 0 July 2, 2015 04:52
algebraic multigrid vs geometric multigrid Anna Tian Main CFD Forum 5 June 18, 2013 05:03
Strange residuals of the Density Based Solver Pat84 FLUENT 0 October 22, 2012 15:59
MIGAL- coupled algebraic multigrid solver? George Bergantz Main CFD Forum 0 December 1, 2000 01:39


All times are GMT -4. The time now is 21:41.