This is the first lecture in the 6-8 part lecture series (dependent on how ambitious I am) on astrophysical fluids. This is mostly done in hope to practice for the preliminary exam for my PhD. Below is the lecture video and also the notes are below as well.
Not everything can be modeled like a fluid. Somethings can be approximated as a fluid. A fluid is made of fluid elements (a hypotehtical cube which contains stuff). This fluid element has a size \(L\). We can only model these collection of things as a fluid IF \(L\) has these properties:
\[n^{-1/3} << L \]
\[L >> \frac{Q(x,t)}{|\nabla Q(x,t) |}\]
\[L >> \lambda\]
There are different kinds of derivatives, the Eulerian and Lagrangian. The Eulerian is the regular partial derivatives. The Lagrangian is a "grown up" derivative that "moves" with the fluid. Eulerian derivative is fixed and not moving, Lagrangian is like taking the derivative while following the fluid element. We can define the new Lagrangian derivative the following way, let say we want to take the Lagrangian derivative \(Q\) then by definition of a derivative we have
\[\frac{DQ}{Dt} = \lim_{\delta \to 0} \left[\frac{Q(x+\delta x, t + \delta t) - Q(x,t)}{\delta t} \right]\]
We add and subtract the same term so it doesn't affect things \(+ Q(x, t+\delta t) - Q(x, t+\delta t)\)
\[\frac{DQ}{Dt} = \lim_{\delta \to 0} \left[\frac{Q(x+\delta x, t + \delta t)+Q(x, t+\delta t) - Q(x, t+\delta t) - Q(x,t)}{\delta t} \right]\]
\[\frac{DQ}{Dt} = \lim_{\delta \to 0} \left[\frac{Q(x, t+\delta t) - Q(x,t)}{\delta t} + \frac{Q(x+\delta x, t + \delta t) - Q(x, t+\delta t)}{\delta t} \right]\] \[\frac{DQ}{Dt} = \lim_{\delta \to 0} \left[\frac{Q(x, t+\delta t) - Q(x,t)}{\delta t} \right] + \lim_{\delta \to 0} \left[\frac{Q(x+\delta x, t + \delta t) + - Q(x, t+\delta t)}{\delta t} \right]\]
The first chunk is literally just a time derivative.
\[\frac{DQ}{Dt} = \frac{\partial Q}{\partial t}+ \lim_{\delta \to 0} \left[\frac{Q(x+\delta x, t + \delta t) + - Q(x, t+\delta t)}{\delta t} \right]\]
The second term looks like a spatial derivative (gradient)
\[\boxed{\frac{DQ}{Dt} = \overbrace{\frac{\partial Q}{\partial t}}^{\text{Eulerian}}+ \underbrace{v\cdot \nabla Q}_{\text{Co-moving frame}}} \tag{Lagrangian Derivative}\]
We see we have two parts one where we are in the FIXED frame and another where we add an extra vector \(v\cdot \nabla Q\) to boost us into a moving frame with the fluid itself! This is the Advection term.
With the background material covered we can move onto the real physics, the famous fluid equations. The fluid equations are conservation laws. These are mass, momentum and energy conservation. On a high level we just want to ensure the total mass, momentum and energy of the system is unchanging as we evolve with time. Let us derive equations that govern these properties.
To conserve mass we mean the total mass is not changing. This means the following:
\[\frac{\partial M}{\partial t} = 0 \]
This is the equivalent to saying that the mass density \(\rho\) flowing at velocity \(v\) summed over a small surface \(dS\) is zero. The integral gives the NET FLOW through surface area \(S\).
\[\frac{\partial M}{\partial t} = 0 = -\int \rho v \cdot dS \]
Now we simply apply the Divergence Theorem which states that we can turn a surface integral into the volume integral of the divergence of the field.
\[\int \int F\cdot dS = \int\int\int \nabla \cdot F dV\]
We can just turn to writing the following volume integral:
\[\frac{\partial M}{\partial t} = -\int \nabla \cdot (\rho v) dV \]
We can then rewrite the mass as the volume integral over density! \(M = \int \rho dV\)
\[\frac{\partial }{\partial t} \int \rho dV= -\int \nabla \cdot (\rho v) dV \] \[ \int \frac{\partial }{\partial t}\rho dV= -\int \nabla \cdot (\rho v) dV \]
Recognize that the thing inside the integral must be equal
\[\frac{\partial \rho }{\partial t} = -\nabla \cdot (\rho v) \Rightarrow \boxed{\frac{\partial \rho }{\partial t} + \nabla \cdot (\rho v) = 0} \tag{mass conservation}\]
This is just the grown up way of saying Newtons \(F=ma\)... but for fluids. We have the same thing where we have some velocity \(v\). To get the acceleration we need to use the Lagrangian Derivative
\[\frac{F}{m} = a = \frac{Dv}{Dt} = \frac{\partial v}{\partial t} + (v\cdot \nabla)v\]
What forces do we have? We have two (for now)... Pressure \(P\) and force of Gravity \(\Phi\). We can formalise this. Starting with Pressure forces.
Pressure
Recall that pressure is FORCE per Area. To get the force we need to integrate out the area! So we can write the force (that is pointing the direction \(\hat n\) to be the following):
\[F\cdot \hat{n} = -\int P\hat n \cdot dS\]
We can again apply the divergence theorem
\[F\cdot \hat{n} = -\int \nabla\cdot (P\cdot \hat n) dV\]
We notice that \(\hat{n}\) does not vary with volume integration so we can pull it out
\[F\cdot \hat{n} = -\hat n \cdot \int \nabla\cdot P dV\]
\[F = - \int \nabla\cdot P dV\]
We can recall that a small unit of force being the following:
\[\frac{F}{m} = \frac{\nabla P}{\rho}\Delta V \Rightarrow \boxed{\frac{F}{m} = \frac{-\nabla P}{\rho}}\]
Gravity
Remember that for regular old Newtonian gravity that the gravitation potential is \(\Phi\) then the force from the scalar potential is the following:
\[\frac{F}{m} = - \nabla \Phi \]
We can go even further, because if we are within a Newtonian gravitational potential then we can have the following:
\[\nabla \Phi = \frac{-GM}{r^2}\hat r\]
We can integrate in the surface
\[\int \nabla \Phi dS= \int\frac{-GM}{r^2}\hat r dS\]
Hit it again the the divergence theorem
\[\int \nabla \cdot \nabla \Phi dV= \int\frac{-GM}{r^2}\hat r dS\] \[\int \nabla^2 \Phi dV= \int\frac{-GM}{r^2}\hat r dS\]
Recognize that we can just integrat the right hand side:
\[\int \nabla^2 \Phi dV= -4\pi GM \] \[\int \nabla^2 \Phi dV= -4\pi G\int \rho dV \] \[\int \nabla^2 \Phi dV= -\int4\pi G \rho dV \]
Recognize that the integrals inside must equal
\[\boxed{\nabla^2 \Phi = -4\pi G \rho } \tag{a familiar Poisson equation}\] This will be used later on to solve the system of PDEs.
Putting Momentum Equation Together...
Let us smush all the forces together.
\[\boxed{\frac{\partial v}{\partial t} + (v\cdot \nabla)v = \frac{-1}{\rho }\nabla P - \nabla \Phi}\]
An aside...
Note that in some textbooks we might introduce an upgraded version of \(P\) pressure to the stress tensor \(T_{ij}\) The stress tensor is defined to the stress expericnced at the multiple faces of the fluid element cube. For example the stress/pressure experienced on the \(x, y\) face of the cube will be indexed in the matrix \(T_{xy}\). Each element of the tensor is defined in the following:
\[T_{ij} = \overbrace{\rho v_iv_j}^{\text{ram pressure}} + \underbrace{\delta_{ij}P}_{\text{thermal pressure}}\]
What this is saying that pressure is made of two components, the component of the fluid moving and "ramming" into you is the ram pressure (bulk motion). While the thermal pressure is due to the internal heat of particles trying to escape. This makes the formalism of the derivative
\[\partial_t (\rho v_i) = -\partial_j T_{ij} - \partial_j \Phi_j\]
Thermodynamics Review
We recall that the first law of thermal dynamic states the following that the heat exchange is defined by the following: where the change in heat is related to the change of internal energy \(\epsilon\) and \(PdV\) is the work done.
\[dQ = TdS = d\epsilon + PdV\]
We can also compute the specific heat. Specific heat is the heat gained per change in temperature \(T\) holding \(V\) volume or \(P\) pressure constant
\[C_V = (\frac{\partial Q}{\partial T})|_{V} = (\frac{\partial \epsilon }{\partial T})|_{V} \]
We can rewrite the first law as the following we realise that from chain rule that \(d\epsilon = (\frac{d\epsilon}{dT})|_{V} dT + (\frac{d\epsilon}{dV})|_{T} dV\)
\[dQ = C_VdT + (\frac{\partial \epsilon }{\partial V} + P)dV\]
The heat change while holding pressure constant is the same as the change in internal energy.
\[C_P = (\frac{\partial Q}{\partial T})|_{P} \]
Ideal Gas Law from high school chemistry is the following:
\[PV = nk_B T\] \[P = \frac{nk_B T}{V}\]
Take its derivative and hit it with a product rule
\[PdV + VdP = nk_B dT\]
We can rearrange the first law
\[dQ = C_VdT + (\frac{\partial \epsilon }{\partial V} + P)dV\] We notice that in ideal gas law circumstances that \(\frac{\partial \epsilon }{\partial V} = 0\) when holding Temperature constant. This is because the internal energy is primarily kinetic energy and not intermolecular and so its nonchanging \[dQ = C_VdT + PdV\] We then plug in the ideal gas law \[dQ = C_VdT + \frac{nk_B T}{V}dV\]
Now we assume the system is adiabatic meaning it does not exchange heat with the outside enviroment. This is reasonable because in space unless its a radiative process this should be satisfied.
\[0= C_VdT + \frac{nk_B T}{V}dV\] \[-C_VdT = \frac{nk_B T}{V}dV\] \[-\int C_VdT = \int\frac{nk_B T}{V}dV\] \[-C_VT = nk_B T \ln V+\mathcal{C}_1\] \[-C_VT = nk_B T \ln V+\mathcal{C}_1\] \[e^{-C_VT} = Ve^{nk_B T} +\mathcal{C}_1\] \[T\propto V^{-nk_B/C_V}\] We can compute the specific heat while holding pressure constant as \(C_P = (\frac{\partial Q}{\partial T})|_{P} = (\frac{\partial Q}{\partial T})|_{V} + (\frac{\partial V}{\partial T})|_{P} =C_V +nk_B\) Through chain rule?
Now lets ge the pressure, recall the rearranged ideal gas \[ P = \frac{nk_B T}{V} \propto \frac{T}{V} \propto V^{-nk_B/C_V} /V \propto V^{\frac{-nk_B}{C_V} -1} \propto V^{-\frac{C_P}{C_V}}\] Let us call \(\boxed{\gamma = \frac{C_P}{C_V}}\) this is called the adiabatic index and we know that if mass is constant we can hold \(\rho \approx \frac{m}{V} \propto V^{-1}\) we cab say that \[P \propto \rho^\gamma\] Let us define the constant as \(K\) which is \(K =e^{S(\gamma-1)/k_B}\) related to entropy (not obvious we just have to keep track of coefficents etc). \[\boxed{P = K \rho^{\gamma}} \tag{Equation of state!}\]
Energy Equation
We can now write down the total energy (density). The sum of kinetic energy + gravitational potential + internal energy \[E_{total} = \rho(\frac{1}{2}v^2 + \Phi + \epsilon)\]
To make it energy conserving we need to check that the Lagrangian derivative is 0.
\[\frac{D E_{total}}{Dt} = \frac{D \rho}{Dt} (\frac{1}{2}v^2 + \Phi + \epsilon) + (\frac{D}{Dt}\frac{1}{2}v^2 + \frac{D}{Dt}\Phi +\frac{D}{Dt} \epsilon) \] \[\frac{D E_{total}}{Dt} = \frac{D \rho}{Dt} \frac{E}{\rho} + (2v\frac{D}{Dt}v + \frac{D}{Dt}\Phi +\frac{D}{Dt} \epsilon) \]
Now let us assemble the whole avengers team of equations. We reconize that the lagrangian of the mass continuity can be \(\frac{D\rho}{D t} + \rho \nabla \cdot v = 0 \) we can directly rearrange to get the largangian density derivative
\[\frac{D E_{total}}{Dt} = -\rho \nabla \cdot v \frac{E}{\rho} + (2v\frac{D}{Dt}v + \frac{D}{Dt}\Phi +\frac{D}{Dt} \epsilon) \]
Let us then look at the gravitational term \(\frac{D}{Dt}\Phi = \frac{\partial}{\partial t}\Phi + v\cdot \nabla \Phi\)
\[\frac{D E_{total}}{Dt} = -\rho \nabla \cdot v \frac{E}{\rho} + (v\frac{D}{Dt}v + (\frac{\partial}{\partial t}\Phi + v\cdot \nabla \Phi) +\frac{D}{Dt} \epsilon) \]
Now let us use the momentum equation
\[\frac{D E_{total}}{Dt} = -\rho \nabla \cdot v \frac{E}{\rho} + (v(\frac{-\nabla P}{\rho} + \nabla \Phi) + (\frac{\partial}{\partial t}\Phi + v\cdot \nabla \Phi) +\frac{D}{Dt} \epsilon) \] We can cross out the \(\nabla \Phi\) terms \[\frac{D E_{total}}{Dt} = -\rho \nabla \cdot v \frac{E}{\rho} + (v(\frac{-\nabla P}{\rho} ) + (\frac{\partial}{\partial t}\Phi ) +\frac{D}{Dt} \epsilon) \]
Now we need to tackle the \(\frac{D}{Dt} \epsilon\) term. Lets write this guy out from second law \[dQ = d\epsilon + PdV\] \[Q = \epsilon + \int PdV\] \[\frac{DQ}{Dt} = \frac{D\epsilon}{Dt} + \int \frac{DP}{Dt} dV\] The change in heat in respect to time is the cooling. \[-\dot Q_{cool} = \frac{D\epsilon}{Dt} + \int \frac{DP}{Dt} dV\] \[ \frac{D\epsilon}{Dt} = \int \frac{DP}{Dt} dV - \dot Q_{cool} \] We see that the pressure from the equation of state is \(P = K \rho^\gamma\) \[ \frac{D\epsilon}{Dt} = \int \frac{D}{Dt}K \rho^\gamma dV - \dot Q_{cool} \] We know that the density is related to the volume by the inverse \[ \frac{D\epsilon}{Dt} = \int \frac{D}{Dt}K V^{-\gamma} dV - \dot Q_{cool} \] Move the derivative outside \[ \frac{D\epsilon}{Dt} = \frac{D}{Dt}\int K V^{-\gamma} dV - \dot Q_{cool}\] \[ \frac{D\epsilon}{Dt} = \frac{D}{Dt} \frac{1}{-\gamma +1}K V^{-\gamma+1} - \dot Q_{cool}\] We apply chain rule \[ \frac{D\epsilon}{Dt} = \frac{\gamma}{-\gamma +1}K V^{-\gamma} \frac{DV}{Dt} - \dot Q_{cool}\] \[ \frac{D\epsilon}{Dt} = \frac{\gamma}{-\gamma +1}K V^{-\gamma} \frac{DV}{Dt} - \dot Q_{cool}\] Reconize that \(\rho \propto V^{-\gamma}\) and we can compute the derviative again \[ \frac{D\epsilon}{Dt} = \frac{\gamma}{-\gamma +1}K \rho^\gamma \frac{D\rho^{-1}}{Dt} - \dot Q_{cool}\] Chain rule the density \[ \frac{D\epsilon}{Dt} = \frac{\gamma}{-\gamma +1}K \rho^\gamma (-2)\rho^{-2}\frac{D\rho}{Dt} - \dot Q_{cool}\] \[ -\frac{D\epsilon}{Dt} = -\frac{K \rho^\gamma}{\rho^2}\frac{D\rho}{Dt} + \dot Q_{cool}\] \[ \frac{D\epsilon}{Dt} = \frac{P}{\rho^2 } \frac{D \rho}{Dt} - \dot Q_{cool}\]
Let us put these back into the energy equation \[\frac{D E_{total}}{Dt} = -\rho \nabla \cdot v \frac{E}{\rho} + (v(\frac{-\nabla P}{\rho} ) + (\frac{\partial}{\partial t}\Phi ) +\frac{P}{\rho^2 } \frac{D \rho}{Dt} - \dot Q_{cool}) \] We write out the left hand side \[\frac{\partial E_{total}}{\partial t} + v\cdot \nabla E_{total}= -\rho \nabla \cdot v \frac{E}{\rho} + (v(\frac{-\nabla P}{\rho} ) + (\frac{\partial}{\partial t}\Phi ) +\frac{P}{\rho^2 } \frac{D \rho}{Dt} - \dot Q_{cool}) \] Rearrange \[\frac{\partial E}{\partial t}+ \nabla [(E+P)v] = \rho \frac{\partial \Phi}{\partial t}- \rho\dot Q_{cool}\] If we define Enthalpy \(H = \epsilon + PV\) and define \(h = H/V\) as enthalpy density we do some algebruh and \[\boxed{(E+P)v = \rho v(\frac{1}{2}v^2+\Phi + h)}\]
Assuming some fluid properties we have the following fundamental equations Mass Momentum and Equation of state / Energy conservation.
\[\boxed{\frac{\partial \rho }{\partial t} + \nabla \cdot (\rho v) = 0} \tag{mass conservation}\] \[\boxed{\frac{\partial v}{\partial t} + (v\cdot \nabla)v = \frac{-1}{\rho }\nabla P - \nabla \Phi} \tag{momentum conservation}\] \[\boxed{P = K \rho^{\gamma}} \tag{Equation of state}\] \[\boxed{\nabla^2 \Phi = -4\pi G \rho } \tag{Poisson equation}\] \[\boxed{(E+P)v = \rho v(\frac{1}{2}v^2+\Phi + h)} \tag{energy conservation}\]
Remember these by heart as they will become critically important for the remainder of the course.