CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Main CFD Forum (
-   -   UDS for compressible flow (

Hooman February 4, 2012 19:44

UDS for compressible flow
Hi, Quick question on Upwind differencing scheme in finite volume, for compressible flows, where density and velocity both vary.
I know that when density and velocity are constants, then you would have:
\left[\frac{\partial(\rho u\phi)}{\partial x}\right]_{i}=\rho u\frac{\phi_{i}-\phi_{i-1}}{x_{i}-x_{i-1}} if \rho u > 0
\left[\frac{\partial(\rho u\phi)}{\partial x}\right]_{i}=\rho u\frac{\phi_{i+1}-\phi_{i}}{x_{i+1}-x_{i}} if \rho u < 0

Can someone please tell me what happens when density and velocity are variables. Would I get something like this?

\left[\frac{\partial(\rho u\phi)}{\partial x}\right]_{i}=\frac{\left(\rho u\phi\right)_{i}-\left(\rho u\phi\right)_{i-1}}{x_{i}-x_{i-1}} if \rho u > 0

\left[\frac{\partial(\rho u\phi)}{\partial x}\right]_{i}=\frac{\left(\rho u\phi\right)_{i+1}-\left(\rho u\phi\right)_{i}}{x_{i+1}-x_{i}} if \rho u < 0

I'm guessing the same principle applies even if density is constant and velocity varies.

I didn't manage to find anything useful online. Please help!


All times are GMT -4. The time now is 20:00.