CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Main CFD Forum (http://www.cfd-online.com/Forums/main/)
-   -   Left/right states for Riemann problems (http://www.cfd-online.com/Forums/main/15244-left-right-states-riemann-problems.html)

Niels May 30, 2008 04:01

Left/right states for Riemann problems
 
Hi,

I'm new to the finite volume method and its implementation. I have what I believe is a silly question about signs.

I'm trying to build a 3d vertex-centered NS solver for tetrahedral meshes using control volumes (CV) defined by the associated median dual mesh. For the convective fluxes I wish to offer a number of different approximate Riemann solvers, beginning with Roe's.

I have set things up such that, given an edge between vertices A and B, the normal to the interface between CV_A and CV_B intersected by this edge points away from B. I also have a binormal and tangent to the interface that allows me to rotate state variables from the Cartesian xyz-frame to the local frame at the interface.

Having done the rotation, I need the left and right states at the interface to proceed.

My first question is: what state is at A - is it the left or the right state? Does it depend on the direction of the interface normal ?

The choice can't be arbitrary because although the flux Jacobian does not depend on which is left or right (it depends only on Roe averages), the interface jumps do.

Looking at my notes for a 1D Riemann problem it appears that the left state should be such that the interface normal points from "left" to "right", although this is not mentioned anywhere. To get to my next question, I'll assume that this is so. This means that in my case, the left state is at B, right state at A. Now my jumps are (U_A - U_B) where U is the vector of conserved variables.

Now I calculate the fluxes and rotate them back to the xyz-frame to prepare for update of the vertex-centered values according to the typical scheme:

U^(n+1) = U^n - delta_t/|Volume| x Flux-integral

where the flux integral must be evaluared using the outward normal (Gauss theorem). Now, since the normal pointed away from B and towards A, this means that my nodal values should be updated as:

U_A^(n+1) = U_A^(n) + delta_t/|Volume| x Flux-integral (1)

U_B^(n+1) = U_B^(n) - delta_t/|Volume| x Flux-integral (2)

For comparison I found a 2D solver (NSC2KE) that does exactly the same as I have described above. In particular, for an edge AB the associated CV interface normal points away from vertex B. The only difference is that this code uses vertex A as left state, thus its jumps are U_B-U_A. Opposite sign of mine. Yet, it uses the exact same update formula (1)-(2).

This I don't understand. Changing the sign of the jumps should, all other things being equal, change the signs of the flux terms in (1)-(2) as well.

I would appreciate it if someone could point out my mistakes.

Thanks, Martin

Ananda Himansu May 30, 2008 10:19

Re: Left/right states for Riemann problems
 
From your formulas (1) and (2), "Flux-integral" should be the flux outward for the CV containing B and inward for the CV containing A. This is consistent with your stated interface normal direction pointing from B to A.

If the NSC2KE code uses your formulas (1) and (2), and adopts the same interface normal direction, then the difference between your code and NSC2KE must be in the relationship between the flux-integral and the jump in the conservative variables U. In that relationship, the two codes must reverse signs to account for the opposite directions of the jump in U.

Martin May 30, 2008 12:17

Re: Left/right states for Riemann problems
 
Thanks for the reply.

Having thought more about it, I conclude that the convention for what is the left and right states has nothing to do with the direction of the normal. Instead, whenever one considers the conservation equation for a control volume CV:

dU/dt = -S_dCV[F(U)dA] (1)

where dCV is the boundary of CV and S is the integral symbol, the convention is that the left state is inside CV, the right state is in any adjacent CV (or external to the domain at boundaries).

The everything falls into place. In NSC2KE (1) then becomes

dU/dt = S_dCV[F(U)dA]

at vertex A because the normal points into CV_A. And the jumps are calculated as U_B - U_A which is right state minus left state as it should be.

Ananda Himansu May 30, 2008 14:58

Re: Left/right states for Riemann problems
 
okay, if you say so. glad you were able to figure it out.

Nishu July 7, 2009 13:47

Hi,

I am also dealing with 1D Riemann compressible flow problem,
Were you able to figure out/ wrote the code for it?

Thanks


All times are GMT -4. The time now is 02:54.