Manohar,
Things on the LHS are calculated for the next time step.
Things on the RHS are used from the previous time step.
Also, the point I was making about rho0 is is not to “move away from the variable density problem”. It’s that ρ0 is a *reasonable guess* for the true density ρ.
Suppose you have ρ0 ~ ρ (fully variable)
Then doing what you would like:
p = P/ρ
Then as an identity:
(grad P) / ρ = grad p + p grad log( ρ0 ) + p grad log( ρ / ρ0 )
You can go even further. Suppose you have a *best guess* p0 ~ p. Then you can also have
(grad P) / ρ = grad p + p grad log( ρ0 ) + p0 grad log( ρ / ρ0 ) + (p-p0) grad log( ρ / ρ0 )
Then you can solve:
dt( u ) + grad p + p grad log( ρ0 ) + p0 grad log( ρ / ρ0 ) + … = - (p - p0) grad log( ρ / ρ0 ) + …
Everything on the LHS is linear. If you set ρ0 = 1 and p0=0, then the 3rd and 4th terms will vanish. That’s fine. But if you have guesses RHS term smaller. Also, your guesses don’t have to be perfect. Anything you do to lessen the RHS will make your problems more stable for time stepping.
However, you also want to balance making ρ0 and p0 simple. That’s because if they are too complicated then the LHS will become more expensive. So there’s a tradeoff between making the RHS more stable and making the LHS more expensive. But you can usually do this with some simple polynomial guesses.
Btw, since log( ρ / ρ0 ) is natural in the momentum equation, you can also possibly transform your density equation to use that variable. You’ll end up with non-constant and nonlinear terms where you didn’t have them before, but you can make similar manipulations to make that easier.