
[Sponsors] 
On the Roe approximate Riemann solver in the preconditioned density based method 

LinkBack  Thread Tools  Search this Thread  Display Modes 
June 20, 2021, 10:32 
On the Roe approximate Riemann solver in the preconditioned density based method

#1 
Senior Member

Dear all,
the Roe approximate Riemann solver is typically written for a general equation in the following form: which is then linearized around a state to produce: where: is the Jacobian of the flux with respect to the conserved variables . Besides some obvious properties that the state has to satisfy when used to evaluate the Jacobian, there is also the so called conservative property: . Turns out that for the Euler equations written in conservative variables and the ideal gas EOS, the state can be evaluated with the so called Roe averages: for the three velocity components and the enthalpy, and with: for the density. These are all the quantities needed in the Jacobian, which include the speed of sound. So far so good, one can easily follow the Roe derivation of such state under the given assumptions and no specific problem arises. For non ideal gases the matter is more complicated because, roughly speaking, there are more unknowns now coming from the partial derivatives in the EOS (which can't be expressed anymore, in general, in terms of the remaining variables). Yet, the literature on possible solutions seems abundant. Again, so far so good. My question here, however, concerns the situation when the above approach is applied to a preconditioned density based solver, and more specifically in the context of a cellcentered FV solver. Say, like the following ones: Merkle, Sullivan, Buelow, Venkateswaran: Computation of Flows with Arbitrary Equations of State, AIAA Journal Vol. 36, No. 4, April 1998 Weiss, Maruszewski, Smith: Implicit Solution of Preconditioned Navier–Stokes Equations Using Algebraic Multigrid, AIAA Journal Vol. 37, No. 1, January 1999 In this case, one actually ends up having to solve the following problem instead: where are the primitive variables the method solves for, are the conserved variables and is the Jacobian with respect to the primitive variables. The method also requires the following quantities from the EOS: , , , , and . The preconditioning comes from , which is a modified version of where, in place of a modified one is used: where a properly defined plays the role of an artificial speed of sound that keeps the system hyperbolic and well conditioned at all speeds. Now, the question is: where do I even start to try to satisfy the conservation property as per the original Roe scheme? In particular, how does the preconditioning affect it? Is still the relevant matrix? Or do I have to use ? (Not even considering the possibility of ). Thus, for example, might it make sense to consider the conservation property in the following form? . Does this produce the same result of the original one? I think not. Note that some codes, Fluent for example, simply use arithmetic averages of the R and L states and don't care at all of the Roe average. Until today, I tought I was actually using the Roe averages, that is: density, enthalpy and all the primitive variables were computed a la Roe, then those were used to compute the remaining derivatives. But then I realized that this might not be correct, not even for ideal gases (I already knew it isn't for general EOS). For example, consider the ideal gas EOS and the resulting derivative: This also holds for the case of the arithmetic average. Still, using the Roe averages for p and T turns out instead that: So, in order to recover the correct Roe average for the ideal gas case requires, at least, a careful implementation of the thermodynamic derivatives, which I had not done. That is, the two versions being different, only one of the two can then reproduce the original Roe state. Note that none of this ever affected any practical computation of the scheme, that I know of. In particular, my implementation also switches to the HLLE+ scheme for the cases where an entropy fix is needed, thus, in the end, is not a true Roe scheme in any case. Still, my lack of understanding on the matter has now scared me off enough to look for more answers. Thanks to anyone who can point me to the relevant literature or provide his own interpretation of the matter. More specifically, how do I compute the Roe averages in the case the primitive variables are used and how do I compute the EOS derivatives in order to recover the original Roe ones for the ideal gas case? Are they even recoverable at all in my case? Last edited by sbaffini; June 21, 2021 at 03:08. 

June 20, 2021, 12:25 

#2 
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,830
Rep Power: 73 
Quote:
Paolo, not in my field of personal work experience, I suppose you already checked Leveque and Hirsch, right? I can suggest also this review https://www.sciencedirect.com/scienc...050?via%3Dihub maybe some check to the textbook "Chung T.J. Computational fluid dynamics (CUP, 2002)" could be worthwhile. 

June 20, 2021, 13:17 

#3  
Senior Member

Quote:
The only papers I ever found on the subject are those I mentioned (and their direct descendant/parents from the same authors), and they don't mention anything or don't use Roe averages in the Fluent case. Every other paper I found (even books) just acritically copy that material. In the end, as I said, this is not, nor has ever been, a real issue per se, but I'm now starting to feel uncomfortable without certain pieces of information. 

June 20, 2021, 13:25 

#4  
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,830
Rep Power: 73 
Quote:
Have you checked also in the report "Building your own shock tube" by J. Naber? The primitive variables are used there. 

June 29, 2021, 06:57 

#5 
Senior Member

Just an update.
In the end, I decided that the EOS is not, by itself, ambiguous on how certain properties should be calculated, no matter what. In particular, in no occasion should I compute any thermodynamic quantity starting from anything different than the independent variables. Thus, as my independent variables are and , for the ideal gas EOS it means that, for example: is the only correct way to compute the density derivative with respect to pressure; that is, density can't appear in it (i.e., I can't use ). Will see if this turns out problematic, but for the moment I feel it is the only reasonable approach. If something different is needed for the Roe scheme, than this must be handled outside the EOS routine, no matter how bad it looks. Still, with respect to a classical Roe scheme, this should only affect how the speed of sound is computed in the intermediate state. 

June 29, 2021, 12:55 

#6 
Senior Member

Join Date: Jul 2012
Location: Germany
Posts: 184
Rep Power: 14 
Dear Paolo,
the exact Riemann solver for the linearized hyperbolic system, more precisely the Roe solver for the Euler equations with general EoS, is not straight forward. With general EoS i refer to noncalorically perfect EoS, this includes e.g. ideal gases, real EoS or multicomponent systems. The caloric perfect EoS case is a lucky accident: In general it is not possible to fulfill thermodynamic consistency and all three Roe properties (i) hyperbolicity, (ii) consistency, (iii) conservation, simultaneously. That makes total sense, since (as the name suggests) you are playing with mean values using the Roe averages. Simply spoken, thermodynamic laws are generally not applicable on averages. A neccecary condition to be fullfilled is, see e.g. Guardone and Quartapelle: Summarizing: You have to define new reasonable conditions for the new unknowns, especially for the last Roe property. Original Roe: Roe Approximation of original Roe: Pike First multicomponent Roe: Abgrall First real EoS Roe: Glaister Ideas of Larrouturou for multicomponent systems: Larrouturou Other generalizations of Roe method: Liou Cox Toumi Vinokur Guardone Mottura Regards 

June 29, 2021, 13:07 

#7 
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,830
Rep Power: 73 
Again, no direct experience about that issue but the LES field of compressible flows has to do with the local averaging of the EOS. Is that approach valid?


June 29, 2021, 14:18 

#8 
Senior Member

Join Date: Jul 2012
Location: Germany
Posts: 184
Rep Power: 14 
I am no expert for compressible LES, especially for noncalorically perfect EoS. However, let me explain the problem you are facing with general EoS. The onedimensional Euler equations are given as
. Moreover, we have to keep in mind that an arbitrary caloric EoS (also called incomplete EOS) is needed to close the system . Now we define the closed system as: . Considering a Riemann problem (RP) with arbitrary constant values left and right: Situation A: A unique caloric perfect EoS, e.g. Situation B: Spatial varying , e.g. left , right Since the EoS is part of your equation system, you now challenge the problem of solving a RP for two different closed PDEs. As a byproduct, you are facing the problem of so called spurious pressure and velocity ocillations. Regards 

June 29, 2021, 14:36 

#9 
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,830
Rep Power: 73 
Quote:
I think that the problems should be better clarified between cellaveraged variables and pointwise fluxes. You do not write the differential form on the pointwise variables but on the cellaveraged variables. I have no great experience but I think that the PDEs are the issues, you need to write them as nonclosed PDEs. 

June 30, 2021, 03:50 

#10  
Senior Member

Quote:
So, if I understand correctly, even just pretending that a certain average reduces to the Roe one when applied to non ideal gases is not, indeed, as easy as it may sound? Even if I don't care at all of what happens in the other non ideal cases? @Filippo, at the present state I only care about 1st order, constant states in left and right cells for a given face in 1D. Actually, if we look at this from the FD perspective, we don't even need the average concept, I think. I would just like that in the most relevant compressible case I'm going to handle I will correctly upwind the correct Riemann invariants. 

June 30, 2021, 04:17 

#11  
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,830
Rep Power: 73 
Quote:
Paolo, let us think first to the continuous set of equations, including the EOS. You know that the concept of the Riemann problem makes sense in a more different way, the differential form of the equations (you wouyld use in the FD manner) governs the variables that are averaged, see Eq.(4.9) in the textbook of Leveque. The fact that you use a first order discretization fro the flux reconstruction does not change the initial formulation of conservation laws. I think that one should first describe the mathematical problem in terms of cellaaveraged values, pointwise flux, pointwise and averaged EOS and then introduce the discretization. Is maybe that issue generating confusion? 

June 30, 2021, 05:48 

#12 
Senior Member

Just for your interest, this is what I have so far in my scheme for the dissipation part (but note that I don't use it in this form, I still use matrix products to avoid loosing control):
with: and: where is the inverse of the speed of sound squared, and anything without the R/L subscript to be evaluated at the Roe average. One could actually further simplify things by nothing that: but I've found difficulties in proceeding further toward a version which could even remotely resemble the Roe one (not sure if it is also due to the certainly different eigenvectors I'm using). 

June 30, 2021, 05:58 

#13  
Senior Member

Quote:


June 30, 2021, 06:58 

#14 
Senior Member

Join Date: Jul 2012
Location: Germany
Posts: 184
Rep Power: 14 
FMDenaro is right saying that the use of a first order discretization does not change the initial formulation of conservation laws, the Riemann problem itself. As long as your EoS preserves the convexity of your hyperbolic system, the Riemann problem is still unique and can be calculated, more or less straightforward.
However, I can only speak from my own experience. The step towards noncaloric EoS is not as easy as it seems. You will encounter problems that you did not realize existed in the first place. 

June 30, 2021, 12:31 

#15 
Senior Member

Join Date: Jul 2012
Location: Germany
Posts: 184
Rep Power: 14 
If you are more interested in the Riemann problem theory for real materials i can suggest:
Menikoff and Plohr One of my favorite papers so far. Regards 

July 10, 2021, 06:03 

#16 
Senior Member

Another doubt I have regards the unsteady term for the preconditioned system when preconditioning is actually turned off.
As I wrote, for the preconditooned case one usually solves for: where time really has to be interpreted as pseudotime and the equations are correct only at steady state. Now with preconditioning "turned off" one would end up with: where and The question then is, from the continuous point of view, as now we use (instead of its preconditioning altered version ), is this now time accurate? If it is so, imagine the following discretization of the unsteady term: If it is time accurate, does it mean that the following is correct? I'm not sure that this actually holds at all. EDIT: Just to give context, the relevance of this comes from the fact that, if all of this holds, and one uses primitive variables, then one can completely avoid conservative variables also for the unsteady cases. EDIT2: Apparently, someone even made a paper on this kind of obviou possibility (https://researchinformation.bris.ac...ne.0195494.pdf). Yet, besides the journal quality, they seem too naive to be trusted. EDIT3: While the above is certainly true at the continuous level, I think it is also certainly false that it holds discretely (just as for the Roe average) for anything non linear. If indeed one consider the NS equations with an ideal gas and the backward Euler discretization of the density time derivative, what one obtains is: which is generally different from the actual difference in density as computed at the two times: So the question is, is this at least second order accurate in time? I think that one can show that this is indeed the case for the ideal gas by nothing that: but I'm unsure on how to prove this in general (nor I actually tested all the remaining terms of the NSE) EDIT 4: Apparently, for the given 1st order backward Euler case with the idal gas EOS, all the terms are indeed exact within a 2nd order error term, except the kinetic energy contribution to the total energy, which also has a first order error of the form: Last edited by sbaffini; July 12, 2021 at 12:54. 

July 14, 2021, 04:00 

#17 
Senior Member
Ashwani
Join Date: Sep 2013
Location: Hyderabad
Posts: 154
Rep Power: 12 
Roe average should (most likely!) not be used. Simple arithmetic average should be used from our experience and also as per Weiss, 1995 work where it is clearly stated
"Roeaveraged values are not used with preconditioning" https://arc.aiaa.org/doi/abs/10.2514...rnalCode=aiaaj 

March 13, 2022, 18:57 

#18 
Senior Member

Quote:
using the Roe density... still don't know why. So I had to use an ugly hack just for that: 

March 14, 2022, 03:09 

#19  
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,282
Rep Power: 34 
Quote:
if you are talking about d rho / dP for construction of linear system to solve pressure correction then upwinded values of d rho / dP work just fine (I have n't looked into code for 2 years so bit vague here). Same should be okay for drho/dT I believe. For compressible flow I do not remember to do any hack and everything works just fine (Other than the upwinded values when needed). 

March 14, 2022, 03:37 

#20  
Senior Member

Quote:
1) rho, u, v, w, p, T and H are taken as classical roe averages 2) All the derivatives, except drho/dT, are computed from primitive variables only (i.e., p and T) at the Roe state computed in 1 3) drho/dT is computed as in 2, but then needs to be multiplied by the ratio between rho computed in 1 and rho computed in 2 This, actually, is independent from the specific average used in 1, and also works if it is an arithmetic average. The very important step is 3, which means that drho/dT in the Roe state for an ideal gas must be computed as rho_ROE/T_ROE. Nothing of this seems relevant if you work with conservative variables in ideal gas cases, where you can just use the straightforward Roe receipt. Note that this receipt can solve, for example, the following shock tube case: , , ; , , which I couldn't solve with any other combination (the only thing I haven't tried yet is using step 1 for all the variables). All of this might or not have something to do with my specific eigenvectors, but I have no idea at the moment. 

Thread Tools  Search this Thread 
Display Modes  


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 
Approximate Riemann solver and reconstruction  TurbJet  Main CFD Forum  2  June 14, 2020 09:02 
Density and Pressure based solver  Diger  ANSYS  1  May 1, 2018 23:51 
Density or Pressure based solver  Achu  FLUENT  1  April 27, 2018 04:34 
Pressure based and Density based Solver  taekyu8  FLUENT  0  January 28, 2013 11:05 