# Navier Stokes solution doesnt make sense to me

I tried solving the Navier Stokes equation for a Newtonian fluid in a pipe.

$$\frac{du}{dt}-\frac{\sigma}{\rho}\frac{du}{dx}=g$$ with initial condition $$u(0,t)=2$$ which means that the flow velocity at $$x=0$$ is $$2$$.

$$\frac{dt}{dx} = -\frac{\rho}{\sigma}\rightarrow t =-\frac{\rho}{\sigma}x+c\rightarrow c = t+\frac{\rho}{\sigma}x$$

We the introduce two ned variable $$\xi = c , \eta=t$$ to put the PDE into canonical form:

$$\xi_{t} = 1 ,\xi_{x} =\frac{\rho}{\sigma}$$ and

$$\eta_{t}=1,\eta_{x}=0$$

$$u_{x} = \xi_{x}u_{\xi}+\eta_{x}u_{\eta} = \frac{\rho}{\sigma}u_{\xi}$$

$$u_{t} =\xi_{t}u_{\xi}+\eta_{t}u_{\eta} = u_{\xi}+u_{\eta}$$

Substituting into the original equation we get:

$$u_{\eta}=g\rightarrow u(\xi,\eta) = \eta g+f(\xi)$$ But $$\eta = t$$ and $$\xi = t+\frac{\rho}{\sigma}x$$ so we get $$u(x,t) = gt+f(t+\frac{\rho}{\sigma}x)$$. By applying the condition $$u(0,t)=2\rightarrow gt+f(t)=2\rightarrow f(t) = 2-gt \rightarrow f(t+\frac{\rho}{\sigma}x) = 2-gt-g\frac{\rho}{\sigma}x$$ and by substituting $$f(t+\frac{\rho}{\sigma}x) \rightarrow u(x,t) = 2-g\frac{\rho}{\sigma}x$$ which doesnt make sense since it can take negative values and predict a negative flow velocity.What am I doing wrong?

• If $u(0,t) = 2$, doesn't that mean it will be constant in time? Then $du/dt = 0$, the rest can be separated and integrated and you should end up with velocity of 2 in the whole pipe. Commented Apr 22, 2023 at 10:27
• No It doesn't work like that bcs we know u is only independent of time when x=0. Commented Apr 22, 2023 at 10:50
• You are right. But for transient simulation, you basically need known state at the start. So you should have initial velocity distribution at starting time, not just a value at a point. If the fluid is not compressible, the pipe has constant diameter and you are only interested in mean velocity at each cross section, I don't see a possibility for the velocity to be other than constant in the whole pipe, depending just on time. Commented Apr 22, 2023 at 12:01
• @TomášLétal cant the diameter of the pipe change across x? Commented Apr 22, 2023 at 12:06
• @TomášLétal the flow velocity is 2 at x=0 there isn't any reason why it couldn't be something else when x not equal 0 Commented Apr 22, 2023 at 12:10

According to Wikipedia in the Navier Stokes equation the Cauchy stress tensor $$\sigma = \tau-p$$ where $$\tau$$ describes viscocity and $$p$$ describes the volumetric pressure
Since we can make the meaningful assumption that when $$|p|>0$$ fluid will flow in the pipe $$|p|>|\tau|\rightarrow \tau-p<0$$ so in my equation the term $$-g\frac{\rho}{\sigma}>0$$ so $$2-g\frac{\rho}{\sigma}x$$ cannot be $$<0$$(for $$x>0$$)