Take the 2-minute tour ×
Physics Stack Exchange is a question and answer site for active researchers, academics and students of physics. It's 100% free, no registration required.

I just saw the continuity equation, in a manuscript, written as $$\frac{\partial \log \rho }{\partial t} + \vec v \cdot \nabla \log \rho= - \nabla \cdot \vec v.$$ Now, just calculating the derivatives of $\log$, and multiplying by $\rho$, this comes back to the familiar $$\frac{\partial \rho }{\partial t} + \nabla \cdot (\rho \vec v)= 0.$$ But I am curious: what would be the reason to write it in that log-form?

EDIT: The log-form also appears on page 53 (pdf page 69) in this manual:
http://www.nordita.org/pencil-code/doc/manual.pdf

EDIT 2: page 2 here explains about the same as tpg2114's answer.
http://www.nordita.org/~brandenb/own/Bran_comp03.pdf

share|improve this question
4  
It would probably be easier to determine if we saw the context in which this was written. –  kleingordon Oct 5 '12 at 6:23
add comment

3 Answers 3

up vote 10 down vote accepted

Without seeing the manuscript in question, the most obvious reason why is when extremely large ranges of density are expected. If the density varies by orders of magnitude, say in an astrophysics setting, then the log form would keep the numbers in similar scale making it more numerically tractable.

Similar treatment is done for the partial density equations in chemically reacting flows.

share|improve this answer
add comment

I) The first equation in the question(v1) shows that the material derivative of $\ln\rho $ satisfies

$$ \frac{D \ln\rho }{D t} ~=~ - \nabla \cdot \vec v. $$

In particular, in an incompressible fluid, the velocity field is divergence-free $$\nabla \cdot \vec v~=~0.$$

Why the variable $\ln\rho$ as opposed to $\rho$?

II) In addition to tpg2114's correct argument that the density may vary over several decades, there is also the argument that in numerical calculations, it is preferred to work with a real variable $\ln\rho\in \mathbb{R}$ (as opposed to a positive variable $\rho>0$), because if one uses $\rho$ as a variable in a computer code, then small numerical errors may accidentally conspires to yield a faulty negative density $\rho<0$, while working with the variable $\ln\rho$ in a computer code would automatically guarantee a manifestly positive density.

share|improve this answer
    
Heh, yes, the first equation shows that the first equation (written in the alternative, material derivative form), satisfies the first equation. And yes, in an incompressible fluid, the velocity has div 0. But why would someone prefer to express the continuity equation in the log form? –  Sampo Smolander Oct 5 '12 at 0:07
    
I updated the answer. –  Qmechanic Oct 5 '12 at 16:52
add comment

In addition to the two great answers above, there's one more context I've encountered in which the log representation is useful.

Often in self-similar problems, some analytical solutions may be obtained by guessing a solution that has the form of a power law in some self-similar variable. The log representation makes it possible to manipulate the equations with ease, allowing one to find the exponents and thus the solution.

If you're interested, have a look at the following, http://en.wikipedia.org/wiki/Similarity_solution There are several analytic solutions for the case of the point explosion with density profile $\rho=\kappa r^{-\omega}$ for specific values of $\omega$ (Can't find the reference to the textbooks it shows up in, sorry)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.