I have made it a personal long-term goal of mine to numerically solve the 1D transient Navier-Stokes equations for simple incompressible and compressible flow scenarios. I want to do it for a few reasons: to better understand the numerics behind CFD calculations, to prove to myself that I can do it, and to eventually set up tools to simulate some simple 1D/2D systems that would be overkill to use a full 3D CFD tool for. I've been teaching myself via online resources since I never learned any of this via school, and have made a lot of progress.
I've been using the following equations for continuity/momentum (which I wanted to include since literally every resource seems to use slightly different variations):
$$ \textrm{Continuity: }\\~\\\frac{\partial \rho}{\partial t}+\frac{\partial (\rho V)}{\partial x} = 0 \\~\\ \textrm{Alternate Incompressible Flow Continuity (for Pressure Coupling): }\\~\\\frac{\partial ^2P}{\partial x^2} = b \\~\\ \textrm{Momentum: }\\~\\\frac{\partial (\rho V)}{\partial t}+\frac{\partial (\rho V^2)}{\partial x} = -\frac{\partial (P)}{\partial x} + \mu*(\frac{\partial ^2V}{\partial x^2}) $$
However, I have a few questions on areas that confuse me:
Boundary Conditions - These are often glossed over in most texts. I know from experience that it is typical to specify 1 velocity and 1 pressure boundary condition for fluid inlets/outlets. However, from the equations above, it seems like you need more than that. For the incompressible equations, there is a second-order derivative for both velocity and pressure, which I would normally think requires 4 boundary conditions. Can anyone help reconcile this for me? For now, I've been specifying velocity and calculating density/pressure from continuity at one end, and specifying pressure/calculating velocity from the momentum eqn at the other end, but I don't know if this is correct/makes sense.
What is the "b" in the pressure-poisson equation? I've seen it everywhere, but have found no good explanations, other than that is may be some sort of forcing function when using the SIMPLE/PISO algorithms. If I was solving everything simultaneously via the Newton method rather than SIMPLE/PISO, would that "b" still be used? Or would a completely different value/approach/equation be needed?
On the domain boundaries in the finite volume method, what approach is best for extrapolating node values from the center of the control volume to the exterior face? Would it be simple linear extrapolation, using the gradient between the first 2 nodes?