# A simple PDE solution question

I need to ask a question about partial derivatives. I want to solve this equation (steady state, one dimensional continuity equation): $$\frac{\partial (\rho u)}{\partial z}=0$$ which is equivalent to: $$\rho\frac{\partial u}{\partial z}+u\frac{\partial \rho}{\partial z}=0$$ and discretized by means of finite differences: $$\rho_i\frac{(u_i-u_{i-1})}{\delta z}+u_i\frac{(\rho_i-\rho_{i-1})}{\delta z}=0$$ along with initial conditions like: $$z=0 \quad \rho_i=\rho_0 \quad , \quad u_i=u_0$$

My questions are: Does this equation has one unique solution? I mean one could increase $u$ and decrease $\rho$ (or the other way around) and have infinite solutions right?
In this case this equation can describe the conservation of the quantity $(\rho u)$. What about the conservation or $u$ or $\rho$?
If I could calculate the $\rho$ (density) variable through lets say an equation of state (like $PV=nRT$) which would be variable in $z$ direction can i rewrite the first equation like: $$\rho\frac{\partial u}{\partial z}=0$$ $$\rho_i\frac{(u_i-u_{i-1})}{\delta z}=0$$ which do have one unique solution.

Just to let you know of my intention, I eventually want to solve a set of PDEs: $$\frac{\partial \rho}{\partial t} +\frac{\partial (\rho u)}{\partial z}=0$$ $$\frac{\partial C_i}{\partial t} +\frac{\partial (u C_i)}{\partial z}=Reactionrate$$ $$\rho=MW_{mean}\frac{P}{RgT}, MW_{mean}=\sum^{N_{comp}}_{i=1}(Y_i*mw_i), Y_i=\frac{C_i}{\sum^{N_{comp}}_{i=1}{C_i}}$$

• In general, it's better to apply the finite difference scheme without using the product rule. You will find that the resulting method is more stable and preserves continuity.
– Paul
Jan 26, 2016 at 18:50
• Paul, thank you for your reply. I have read about the difference of conservative and non conservative form see link. The think is that if I treat the quantity ρ*u like one variable then in the case of dynamic balance I would have another one (ρ). Is n't that correct? I would need more equations than the ones that i have now. Maybe one to correlate ρ & u? Jan 26, 2016 at 21:13
• Also, please refer to this link for a more detail explanation of my problem. Jan 26, 2016 at 21:30
• I think you should put your follow-up questions into a question of itself. Feb 3, 2016 at 15:20
• @WolfgangBangerth. You mean like a whole new question? or like an answer to this question? Feb 3, 2016 at 15:21

The equation $\frac{\partial}{\partial z}(\rho u)=0$ only has a unique solution for the product $\rho u$ (namely a constant), but not for each factor separately. You need a different equation to tease them apart.
In your context, the equation describes the conservation of momentum. You will need a separate equation for the conservation of mass, which is going to have a term $\frac{\partial}{\partial z}\rho$. Together, these two equations are going to uniquely define both velocity and density.