Continuity equation from the Friedmann equation I know that one can derive the continuity equation:
$$\dot{\rho}=3H(\rho+P)$$
from the Friedmann equations.
$H^2=\frac{8\pi{G}\rho}{3}$ and $\frac{\ddot{a}}{a}=\frac{4\pi{G}\rho}{3}(\rho+3P)$
But what I don't really understand is why does the continuity equation apply to each fluid component separately whereas the Friedmann equations from which the continuity equations come from applies to the total energy density and pressure.
 A: First, you have a few typos.
$\dot{\rho}=-3H(\rho+P)$
$H^2=\frac{8\pi{G}\rho}{3}$ and $\frac{\ddot{a}}{a}=-\frac{4\pi{G}\rho}{3}(\rho+3P)$
for $c=1$
Actually, we can derive the Fluid equation by just using the first law of thermodynamics,
$$dQ=dE+PdV$$
so in derivation we don't need to use The Friedmann Equation or The Acceleration equation. 
The fluid equation describes the relationship between $\rho$ and $a(t)$ in terms of $w$ where, $P=w\rho$. 
So, if we solve the Fluid equation we would get
$$\rho(a)=\rho_0a^{-3(1+w)}$$
For every type of matter in the universe we have different values of $w$ so for every component we would get different $\rho$ and $a(t)$ relationship.Hence we need to define them separately
Now Lets suppose we have 2 components mattter and radiation. Then the total density can be written as,
$$\rho_{tot}(a)=\rho_m(a)+\rho_r(a)$$
so we have
$$\rho_{tot}(a)=\rho_{m,0}a^{-3}+\rho_{r,0}a^{-4}$$
This is the form that we can put into the Friedmann Equations.
Hope this helps.
A: The components are called the ''density and pressure components'' and is in fact, a highly simplified version - it is also adiabatic, when really, this is an unfounded assumption - it can be diabatic (ie. non-conserved). First let's go through a variation of the drag coefficient, then we will get to a diabatic form of the Friedmann equation.
If we recall what the dragging coefficient is first of all
$ f = \frac{2F}{\rho v^2 A} = \frac{A_b}{A_f}\frac{B}{R^2_e}$
What kind of systems does the drag coefficient apply to? It applies to all kinds of sizes, but in theory it could be applied to an electron since it has been found, not to be a pointlike particle as we have been told in literature for many years, but has instead been carefully measured to be rather a spherical distribution of charge. For spherical systems, the drag coefficient is 0.47.- since we could in theory say that most particles are approximately spherical it wouldn't be too difficult to see that this number would only differ slightly depending on the structure of certain particles - for instance, a proton may appear spherical, but it's distribution inside is not entirely spherical which may mean it variates slightly in principle for different particle systems.
Retrieving the ratio of back to front area's for particular terms in the also called the wet and back area's, we can get the pressure flow:
$P = \frac{A_b}{A_f}\frac{B}{Re^2_L} \cdot q = \int\ \frac{1}{2}\frac{A_b}{A_f}\frac{B}{Re^2_L} \cdot \rho v = \int\ \frac{1}{2A_f}\frac{B}{Re^2_L} \cdot \rho \dot{V} $
$= \int\ \frac{1}{2}\frac{B}{Re^2_L} \cdot \mathbf{j} \cdot \frac{A_b}{A_f} = \frac{1}{2n^2A_f}(x + y + z - \sigma_{x,t})^2\ T_{00} $
The first equality then has a strict relationship to the pressure flow related to the drag coefficient
$P = \frac{1}{2}\frac{A_b}{A_f}\frac{B}{Re^2_L} \cdot q = f \cdot q$
where  the dynamic/total pressure is:
$q = (P_0 - P)$
This is all mainstream. Now, let's have a look at a diabatic form of the Friedmann equation, derived from the mainstream Friedman equation (which is derived itself further from fluid mechanics).
The relative formula for the density parameters Friedmann equation is
$\frac{\ddot{R}}{R} = \frac{8 \pi G}{3c^2}(\rho + P)$
Let's divide through by the relative density and pressure
$\frac{1}{\rho + P}\frac{\ddot{R}}{R} = \frac{8 \pi G}{3c^2}$
But we need not take such a relativistic case, because this will drop out naturally when we take the non-conserved form of the Friedmann equation. We shall get to that soon.
I also entertain
$\frac{1}{\rho c^2}\frac{\ddot{R}}{R} = \frac{8 \pi G}{c^4}\Omega$
Where we remind that the ''critical density'' is:
$\Omega = \frac{\rho}{P} = \frac{8 \pi G}{3H^2} \rho$
To retrieve the upper limit of the classical gravitational force.
$\frac{1}{\rho c^2}\frac{\ddot{R}}{R} = \frac{8 \pi G}{c^4}\Omega = \frac{8 \pi G}{3c^4}\frac{8 \pi G \rho}{3H^2}$
The continuity equation is
$\dot{\rho} = -3H(\rho + \frac{P}{c^2})$
and the respective energy density is
$\dot{\rho}c^2 = -H(\rho c^2 + P)$
So, we've been through this a few times, the non-conserved form of the Friedmann equation requires one extra derivative which removes one such factor of the Hubble ''constant'' (or in the last term as explained not long ago, it gives us the continuity which is strictly defined under the density and pressure parameters) - we also distribute the factor of three from the denominator:
$\frac{3}{\rho c^2}\frac{\dot{R}}{R}\frac{\ddot{R}}{R} = \frac{8 \pi G}{c^4}\dot{\Omega} = \frac{8 \pi G}{3c^4}\frac{8 \pi G \rho}{H} = \frac{8 \pi G}{3c^4}\frac{8 \pi G}{H^2} \dot{\rho} $
This gives by plugging in the continuity:
$\dot{\rho} = -3H(\rho + \frac{P}{c^2})$
$\frac{3}{\rho c^2}\frac{\dot{R}}{R}\frac{\ddot{R}}{R} = \frac{8 \pi G}{c^4}\dot{\Omega} = \frac{8 \pi G}{3c^4}\frac{8 \pi G \rho}{H} = \frac{8 \pi G}{3c^4}\frac{8 \pi G}{H^2} \frac{\dot{R}}{R}(\rho + P)$
Distributing one inverse factor of $8 \pi G$ ~
$\frac{3}{8 \pi G \rho c^2}\frac{\dot{R}}{R}\frac{\ddot{R}}{R} = \frac{1}{c^4}\dot{\Omega} = \frac{8 \pi G}{3c^4}\frac{ \rho}{H} = \frac{8 \pi G}{3c^4}\frac{1}{H^2} \frac{\dot{R}}{R}(\rho + P)$
and/or
$\frac{3H^2}{8 \pi G \rho c^2}\frac{\dot{R}}{R}\frac{\dddot{R}}{R} = \frac{8 \pi G}{3c^4} \frac{\dot{R}}{R}(\rho + P)$
and 
$\rho c^2$
is simply the time-time component of the tensor 
$T_{00}$
known as the stress energy tensor. 
Which neatly gives the expansion of a universe, in diabatic from. So this will explain the true corrections required for the total pressure - and in principle, you can have any amount of density parameters so long as they are involved physically important for cosmology during its many different stages.
