I wanted to simulate the motion of a fluid (continuously filling the entire space) in a given space, say $3$-dimensional Euclidean space. To calculate the dynamics of fluid motion, I used the Navier-Stokes equation and the mass continuity equation.
Let $\vec{v}$ be a vector of $\mathbb{R}^3$. And let $$\frac{D}{Dt} = \frac{\partial}{\partial t} + \vec{u} \cdot \nabla$$ be the material derivative. Also, assume the following conditions for the fluid.
- The fluid is compressible.
- The fluid is viscous.
- The fluid is isothermal.
- Dynamic viscosity $\mu$ is a constant in the whole spacetime.
Then, the Navier-Stokes equation is given as $$\rho \frac{D \vec{u}}{Dt} = -\nabla p + \mu \nabla^2 \vec{u} + \frac{1}{3} \mu \nabla (\nabla \cdot \vec{u}) + \rho \vec{g}.$$ And the mass continuity equation is given as $$\frac{\partial \rho}{\partial t} + \nabla \cdot (\rho \vec{u}) = 0.$$ Here, we can categorize existing variables. The independent variables are obviously time $t$ and position $\vec{x}$, and the dependent variables are:
- unknown variables: $\rho (t, \vec{x})$, $\vec{u} (t, \vec{x})$, $p(t, \vec{x})$
- given variables: $\vec{g} (t, \vec{x})$, $\mu$
In other words, we have $5$ unknown dynamic fields to be simulated: $\rho$, $u_x$, $u_y$, $u_z$, and $p$. However,
The Navier-Stokes equation gives $3$ time-dependent equations for the time evolution of $\vec{u}$;
The mass continuity equation gives $1$ time-dependent equation for the time evolution of $\rho$.
That is, there is a lack of $1$ time-dependent equation for the time evolution of $p$. (Given the initial conditions, the future shape of the system must be determined, so there must be an equation relating $p$ or its time derivatives to $\vec{u}$, $\rho$, and known quantities.) Hence, my question is,
To time-dependently simulate (compressible, viscous, isothermal) fluids, how can we calculate the pressure $p$ at each point in spacetime? What is the relation between $p$ and $\vec{u}$, $\rho$, or the time evolution equation?
Any help will be appreciated.