CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Finite volume method for incompressible & compressible flow (https://www.cfd-online.com/Forums/main/232853-finite-volume-method-incompressible-compressible-flow.html)

TurbJet January 2, 2021 23:10

Finite volume method for incompressible & compressible flow
 
Greetings,

In Ferziger's book, for FVM, no matter what kind of interpolation scheme they discuss (in Chap.4.4, e.g., CDS, UDS, QUICK, etc), the values on cell faces are unique (if I understand it correctly): i.e., there are no left & right states as in those cases where methods like Riemann solver or flux-vector splitting are used. The latter appears to me that are majorly used in gasdynamics, namely for convection-dominated problems, high-speed flows, or hyperbolic equations.

So, is it correct to say that the approach in Ferziger's book is more suitable for incompresssible flows (or low-speed flows, or for parabolic/elliptic equations), whereas methods discussed in, e.g., the book by LeVeque or Toro's book, are for high-speed/compressible flows (or hyperbolic equations)?

Or, is it because what Ferziger presented in Chap.4 is for linear equations, thus no left & right states will show up? But what about when actually solving incompressible NS equations?

aerosayan January 3, 2021 05:06

Quote:

Originally Posted by TurbJet (Post 792227)
So, is it correct to say that the approach in Ferziger's book is more suitable for incompresssible flows (or low-speed flows, or for parabolic/elliptic equations)


Versteeg's book also focuses mostly on incompressible flows. Initially I thought it was a problem when I was trying to write my own compressible solvers and couldn't find the relevant information in the book.I only wrote compressible Euler solvers (as I only like supersonic and hypersonic flows), so I might not have the full knowledge to answer your question. But in my own case, addition of Van-Leer flux / Roe flux to the euler solver wasn't as difficult I thought it would be. I think that numerical solutions of the RIemann problem should be handled in a separate book as it is a special topic, and more focus should be given on the explanation of the FVM discretization (in 1D,2D,3D) in any entry level CFD books. Understanding the discretization, and having worked out examples in the book helps out a lot more than addition of an advanced topic.

It is expected that the student would study different books when they want to understand the advanced topics.:)


Edit : Also it looks like I got the "Senior Member" badge. Anyways, time to celebrate : https://youtu.be/gu3KzCWoons :)

FMDenaro January 3, 2021 05:27

I think there is some confusion in intepreting the general idea of FVM. The unicity of the flux function on a face of a FV is a requirement for any FV method, no matter about solving linear problems, incompressible or compressible flows.
For example, consider a linear problem, the time advancement in FVM evaluates the cell-averaged variable, therefore each cell will have its own value. The face between two cells has right and left states and the flux is univocally determined on the face. That can be done using the Riemann problem but also by introducing some specific flux reconstruction method, as in QUICK, QUICKEST and many others.

sbaffini January 3, 2021 05:45

For any cell centered FV method, for each face which is not on the boundary (but, philosophically, we might claim even for them) there are two states, those associated to the two sides of the face.

This is independent from the order to which these states are reconstructed.

Now, an upwind scheme will necessarily involve choosing one of those states using characteristics, even for scalar transport trough incompressible flows.

But even central schemes actually build face values from those states.

What makes the actual difference is that compressible schemes determine the fluxes all together, while incompressible ones split this in determining the mass flux plus the other ones, one by one. Once you know the mass flux, for the other fluxes the problem is necessarily reduced to determining the face value, but the two states on the sides of the face are still there and you actually use them to determine the face value

FMDenaro January 3, 2021 06:30

Forget to add that one distinction is due to the presence of a singularity (i.e., shock wave) in a cell. In such a case, the reconstruction of the flux is theoretically possible from the averaged variables but not from the pointwise variable in the cell.

However, I know that a student has some difficulty in managing this topic, I suggest to read and pose some specific questions from the equations.

arjun January 3, 2021 07:08

You can mix things too though. In wildkatze you can also chose Roe as flux scheme while still solving pressure equation the way Prof Peric's book describe.

I was even using HLLC scheme in pressure based solver just last night on high speed cavitation benchmark in Wildkatze solver (scheme will be available from next release).


Once you have flux, you can calculate the variable flux as (flux * var_face) how so ever you like.

This flux is usually = velocity * rho * area + dissipation flux .

Here for dissipation flux one can chose Rhie and Chow ( Prof Peric's book) or Roe, HLLC etc scheme as in gasdynamics could be used.

TurbJet January 3, 2021 13:22

Quote:

Originally Posted by sbaffini (Post 792233)
For any cell centered FV method, for each face which is not on the boundary (but, philosophically, we might claim even for them) there are two states, those associated to the two sides of the face.

This is independent from the order to which these states are reconstructed.

Now, an upwind scheme will necessarily involve choosing one of those states using characteristics, even for scalar transport trough incompressible flows.

But even central schemes actually build face values from those states.

What makes the actual difference is that compressible schemes determine the fluxes all together, while incompressible ones split this in determining the mass flux plus the other ones, one by one. Once you know the mass flux, for the other fluxes the problem is necessarily reduced to determining the face value, but the two states on the sides of the face are still there and you actually use them to determine the face value

I see your point.

But based on Ferziger's book, seems like they never mention anything about this two-states situation. Also, they didn't introduce any numerical fluxes (if I am not missing anything); so what's the typical way of computing fluxes from these two states when solving incompressible flow?

TurbJet January 3, 2021 14:01

Quote:

Originally Posted by aerosayan (Post 792231)
Versteeg's book also focuses mostly on incompressible flows. Initially I thought it was a problem when I was trying to write my own compressible solvers and couldn't find the relevant information in the book.I only wrote compressible Euler solvers (as I only like supersonic and hypersonic flows), so I might not have the full knowledge to answer your question. But in my own case, addition of Van-Leer flux / Roe flux to the euler solver wasn't as difficult I thought it would be. I think that numerical solutions of the RIemann problem should be handled in a separate book as it is a special topic, and more focus should be given on the explanation of the FVM discretization (in 1D,2D,3D) in any entry level CFD books. Understanding the discretization, and having worked out examples in the book helps out a lot more than addition of an advanced topic.

It is expected that the student would study different books when they want to understand the advanced topics.:)


Edit : Also it looks like I got the "Senior Member" badge. Anyways, time to celebrate : https://youtu.be/gu3KzCWoons :)

Maybe it just me, but I think Versteeg's book is awfully like Ferziger's, especially the notations.

TurbJet January 3, 2021 14:05

Quote:

Originally Posted by FMDenaro (Post 792232)
I think there is some confusion in intepreting the general idea of FVM. The unicity of the flux function on a face of a FV is a requirement for any FV method, no matter about solving linear problems, incompressible or compressible flows.
For example, consider a linear problem, the time advancement in FVM evaluates the cell-averaged variable, therefore each cell will have its own value. The face between two cells has right and left states and the flux is univocally determined on the face. That can be done using the Riemann problem but also by introducing some specific flux reconstruction method, as in QUICK, QUICKEST and many others.

So can I say that all the methods in, e.g., approximate Riemann solvers or methods like flux splitting, can be extended to incompressible flow? In Ferziger's book, I don't think they ever mention the concept of numerical fluxes or how to compute fluxes from these two states.

BTW, isn't QUICK just an interpolation scheme for reconstruction of face values?

FMDenaro January 3, 2021 14:16

In the Sec.4.4 of the Ferziger's book you see some of the possible flux reconstructions, but you should be aware that:
1) the examples are for linear problems
2) it is assumed that the surface integral is discretized by the mean value formula


If you read the Leonard's paper about the QUICK/QUICKEST methods you will get more details.


However, Riemann problems are never explicitly explained in that book, you should consider the Leveque's textbook. It can be shown for example that a first order upwind is actually a way to solve the Riemann problem.

Generally, the difference in the approaches is due to the fact for incompressible flows (divergence-free velocity) the variables are assumed pointwise continuous while appearence of singularity is possible in compressible flows.



In more technical words, from the exact integral equation you have an averaged variable f_av=1/|V| Int f dV and the flux F(f). The two approaches can be seen as a closure relation in the form either f_av(f) or f(f_av).

arjun January 3, 2021 16:17

Quote:

Originally Posted by TurbJet (Post 792273)
I see your point.

Also, they didn't introduce any numerical fluxes (if I am not missing anything);


They do because without numerical fluxes you can't write working finite volume flow solver.


Quote:

Originally Posted by TurbJet (Post 792273)
so what's the typical way of computing fluxes from these two states when solving incompressible flow?

In gas dynamics that you have in mind, the speed of sound is assume to be a constant value and fluxes are constructed.

Your issue as I understand here is that the book you are following does not do the things the way you are used to and you are finding it hard to give them a chance and read what they have to say.

Put aside the two state concept for this book because here they discuss pressure based solver mainly used for incompressible flow. Though the book also mentions high speed flow related modifications to the fluxes too.

TurbJet January 3, 2021 17:25

Quote:

Originally Posted by arjun (Post 792287)
They do because without numerical fluxes you can't write working finite volume flow solver.



In gas dynamics that you have in mind, the speed of sound is assume to be a constant value and fluxes are constructed.

Your issue as I understand here is that the book you are following does not do the things the way you are used to and you are finding it hard to give them a chance and read what they have to say.

Put aside the two state concept for this book because here they discuss pressure based solver mainly used for incompressible flow. Though the book also mentions high speed flow related modifications to the fluxes too.

Yes, that is exactly my confusion: the book is very different from those discussing density-based solver, at least at the level I can understand.

Could you briefly introduce some of the numerical fluxes that are commonly used in incompressible solver?

arjun January 4, 2021 02:57

Quote:

Originally Posted by TurbJet (Post 792290)
Yes, that is exactly my confusion: the book is very different from those discussing density-based solver, at least at the level I can understand.

Could you briefly introduce some of the numerical fluxes that are commonly used in incompressible solver?

In the chapter 6 of the first version of the book, look for the section 'implicit pressure correction method' this writes in detail as to how to set up. (the section before this also outlines what the approach is).
Still in nutshell:
1. As metioned in my first post think two things (a) flux (b) variables to be transported at the control volume face.
2. Flux is flux due to velocity (rho Velocity Area) and flux due to dissipation.
3. In the book you are following Rhie and Chow flux is used (the section i mentioned).
4. In density based solver flux is by looking at the state vectors from left and from right based on speed of sound.



Now one important source of confusion is that in density based solver when the variables are iterpolated to the face there is a contribution to them due to dissipation too. While in the pressure based solvers we do not have that. This is why you do not see the left and right state vectors mentioned in the book. While in all the density based literature you see this.



Another important thing that no book or no paper says is that you do not really need dissipation in variables at the face center, the dissipation in flux is good enough. (as happens in pressure based solvers).
Using this idea one can actually mix the formulations , that is use the flux with dissipation from density based solver and use in formulation of pressure based solver.
That is replace Rhie and Chow flux to AUSM or Roe or HLLC etc schemes.

Why would you want to do so? The reason to do such thing is that the dissipation based on state vector is not timestep dependent but Rhie and Chow dissipation is. So when timestep size go small Rhie and Chow based solvers de-couple.

TurbJet January 4, 2021 14:11

Quote:

Originally Posted by arjun (Post 792317)
In the chapter 6 of the first version of the book, look for the section 'implicit pressure correction method' this writes in detail as to how to set up. (the section before this also outlines what the approach is).
Still in nutshell:
1. As metioned in my first post think two things (a) flux (b) variables to be transported at the control volume face.
2. Flux is flux due to velocity (rho Velocity Area) and flux due to dissipation.
3. In the book you are following Rhie and Chow flux is used (the section i mentioned).
4. In density based solver flux is by looking at the state vectors from left and from right based on speed of sound.



Now one important source of confusion is that in density based solver when the variables are iterpolated to the face there is a contribution to them due to dissipation too. While in the pressure based solvers we do not have that. This is why you do not see the left and right state vectors mentioned in the book. While in all the density based literature you see this.



Another important thing that no book or no paper says is that you do not really need dissipation in variables at the face center, the dissipation in flux is good enough. (as happens in pressure based solvers).
Using this idea one can actually mix the formulations , that is use the flux with dissipation from density based solver and use in formulation of pressure based solver.
That is replace Rhie and Chow flux to AUSM or Roe or HLLC etc schemes.

Why would you want to do so? The reason to do such thing is that the dissipation based on state vector is not timestep dependent but Rhie and Chow dissipation is. So when timestep size go small Rhie and Chow based solvers de-couple.

When you mention "flux with dissipation" in density-based solver, are flux-limiter/slope-limiter one of them?

Anyway, really appreciate it! It's really helpful!

arjun January 5, 2021 03:52

Quote:

Originally Posted by TurbJet (Post 792394)
When you mention "flux with dissipation" in density-based solver, are flux-limiter/slope-limiter one of them?

Anyway, really appreciate it! It's really helpful!


limiters come in play when you interpolate the variable to the face using the gradients.

For example you can say your scheme is first order if the values at face is just cell center value from left/right.
Second order would be when you have the value at face = value_cell + limiter * grad (var) . deltaR

Based on these interpolated values you can calculate various things like flux or variable flux ( var_face * flux ) etc etc.

The schemes that you usually hear ( upwind, second order upwind, bounded central, MUSCL , QUICK etc etc) are basically how using limiters and gradients you construct the values of variables at face.

sbaffini January 5, 2021 06:20

As a trivial example to clarify things, consider any order upwind for incompressible solvers. Assume we are transporting scalar \phi (can be any velocity component, temperature, etc.) with a precomputed mass flux m = \rho V_n A, where V_n is not simply an interpolated velocity on the face, but one that actually satisfies your continuity equation on the cell (not really relevant for the discussion, but still).

Now, for a given face f, considering that its mass flux is already given (i.e., m_f), the convective flux of scalar \phi will have to be m_f \phi_f. How is this \phi_f computed for an upwind scheme? As follows (actually this is the full flux formula, but you get the point):

m_f \phi_f = \frac{\left(m_f + \left|m_f\right|\right)}{2} \phi_L + \frac{\left(m_f - \left|m_f\right|\right)}{2} \phi_R

where \phi_L and \phi_R are the states on the two sides of the face (whatever is the order at which they are reconstructed), with the normal to the face assumed positive when going from L to R.

It should be clear now where those states enter the picture. If you consider first order upwind, I think, there should be no confusion, L and R just refer to the cell values on the two sides of the face. For HO reconstruction, I guess, your confusion might come from the fact that examples are typically for structured grids and those states are directly written in terms of additional cell values and everything is put together in one formula. But the formulation above is the actual one valid for any order and grid topology.

As a side note, if you are using a density based solver with additional transported scalars (say, turbulence variables), the flux component from the continuity equation will directly give you the m_f above to be used with the additional scalars.

FMDenaro January 5, 2021 06:31

Quote:

Originally Posted by sbaffini (Post 792455)
As a trivial example to clarify things, consider any order upwind for incompressible solvers. Assume we are transporting scalar \phi (can be any velocity component, temperature, etc.) with a precomputed mass flux m = \rho V_n A, where V_n is not simply an interpolated velocity on the face, but one that actually satisfies your continuity equation on the cell (not really relevant for the discussion, but still).

Now, for a given face f, considering that its mass flux is already given (i.e., m_f), the convective flux of scalar \phi will have to be m_f \phi_f. How is this \phi_f computed for an upwind scheme? As follows (actually this is the full flux formula, but you get the point):

m_f \phi_f = \frac{\left(m_f + \left|m_f\right|\right)}{2} \phi_L + \frac{\left(m_f - \left|m_f\right|\right)}{2} \phi_R

where \phi_L and \phi_R are the states on the two sides of the face (whatever is the order at which they are reconstructed), with the normal to the face assumed positive when going from L to R.

It should be clear now where those states enter the picture. If you consider first order upwind, I think, there should be no confusion, L and R just refer to the cell values on the two sides of the face. For HO reconstruction, I guess, your confusion might come from the fact that examples are typically for structured grids and those states are directly written in terms of additional cell values and everything is put together in one formula. But the formulation above is the actual one valid for any order and grid topology.

As a side note, if you are using a density based solver with additional transported scalars (say, turbulence variables), the flux component from the continuity equation will directly give you the m_f above to be used with the additional scalars.

Paolo the further confusion is that R and L should be assumed to be the cell-averaged value whilst the value for the flux in f is pointwise...


All times are GMT -4. The time now is 07:22.