What 'sets' the curvature in the FRW metric? In the FRW metric, the way I understand it, there are 4 key quantities, $P$ (pressure), $\rho$ (matter density), $\Lambda$ (the cosmological constant) and $K$ (the curvature constant).
$P$ and $\rho$ are fairly self explanatory, while $\Lambda$ we attribute to 'dark energy', whatever that turns out to be.
My question is, what is it that 'sets' the value of $K$? Is it the matter density that sets the global curvature, or does the universe simply have a global curvature as an intrinsic property?
 A: The curvature is set my the densities of the fluids comprimising the Universe.
Consider the first FL-equation
\begin{equation}
\frac{3}{R^2} \left( k + \frac{\dot{R}^2}{c^2} \right) = \frac{8 \pi G}{c^2}\rho_{tot}
\end{equation}
with
\begin{equation}
\rho_{tot}(t) = \rho_{\gamma}(t) + \rho_{M}(t) + \rho_{\Lambda}(t)
\end{equation}
Some also include the curvature $k$ in the total density.
It is clear that there is a critical density such that the Universe is flat: $k=0$, this is
\begin{equation}
\rho_{crit}(t) = \frac{3H(t)^2}{8\pi G}
\end{equation}
Now define the dimensionless density
\begin{equation}
\Omega_{i}(t) = \frac{\rho_{i}(t)}{\rho_{crit}(t)}
\end{equation}
Then the FL-equations reduces to
\begin{equation}
\frac{kc^2}{R^2} = H^2 ( \Omega_{tot} - 1)
\end{equation}
The curvature is indeed set by the densities and we obtain a flat Universe for $\Omega_{tot} = 1$.
A: $k$ is the curvature of spatial slices, not the full spacetime, and it varies with $\dot a$ because it's essentially defined by the local motion of matter.
Take a bunch of parallel lines in Euclidean space, draw small local neighborhoods of the plane perpendicular to each one, and stitch them together. You'll get a plane. Now do the same with lines that are not quite parallel. You'll get a curved surface. The curvature will increase linearly with the degree to which the lines deviate from being parallel. If they're radiating out from a common point then you'll get a portion of a sphere whose radius is the distance to the origin point. If they are actually curves and don't converge at that point, you'll get a sphere whose radius is a linearly extrapolated apparent origin point.
In general relativity the same thing happens, with planes of simultaneity in local frames at rest with the Hubble flow standing in for the perpendicular planes in Euclidean space. There are two differences. First, "spheres" with timelike radius have negative curvature, which is why $\dot a^2+k$ instead of $\dot a^2-k$ appears in the first Friedmann equation (note that $k$ is the square of what I called the curvature above). Second, the spacetime you're slicing can be curved as well, which is why the right hand side of the equation is not zero.
