Solution (source code)

= Solution

For top-hat profiles, $Q=bW$, $M=bW^2$, and $\mathcal B=Q g(T-T_0)/T_0$. One-sided entrainment, vertical momentum, and the wall heat input give
$$
\boxed{Q'=E\frac MQ},\qquad
\boxed{M'=\mathcal B\frac QM}.
$$
Integrating the temperature equation across the plume gives
$$
\frac d{dz}[Q(T-T_0)]=\frac{q_0}{\rho_0c_p}.
$$
Combining this with the definition of buoyancy flux yields
$$
\boxed{\mathcal B'=\beta},
\qquad
\boxed{\beta=\frac{gq_0}{\rho_0c_pT_0}},
\qquad
\mathcal B(z)=\mathcal B_0+\beta z.
$$