Solution (source code)

= Solution

Choose $\rho_0$ as a representative room density, for example the fresh-air density, and neglect relative density variations everywhere except in <buoyancy>. With
$$
g'=\frac{\widehat\rho-\rho}{\rho_0}g,
$$
the triangular profiles give
$$
Q=\frac12\rho_0bW,
\qquad
M=\frac13\rho_0bW^2,
\qquad
F=\frac13\rho_0bWg'.
$$
Solving these algebraic relations,
$$
\boxed{W=\frac{3M}{2Q},
\qquad b=\frac{4Q^2}{3\rho_0M},
\qquad g'=\frac{3F}{2Q}.}
$$

The <Batchelor entrainment hypothesis>, vertical <momentum conservation>, and <mass conservation> give
$$
\boxed{\frac{dV}{dz}=\alpha W,}
\qquad
\boxed{\frac{dQ}{dz}=\rho_0\alpha W=\frac{3\rho_0\alpha M}{2Q},}
\qquad
\boxed{\frac{dM}{dz}=\frac12\rho_0bg'=\frac{QF}{M}.}
$$
An ascending parcel entrains ambient fluid from progressively lower ambient density. With the <buoyancy frequency>
$$
N^2=-\frac g{\rho_0}\frac{d\widehat\rho}{dz},
$$
the change of ambient reference density subtracts $QN^2$ from its density-weighted <buoyancy flux>, so
$$
\boxed{\frac{dF}{dz}=-QN^2.}
$$