Linear and nonlinear Rayleigh–Bénard convections with variable heat source (sink) are studied analytically using the Fourier series. The strength of the heat source is characterized by an internal Rayleigh number, RI, whose effect is to decrease the critical external Rayleigh number. Linear theory involving an autonomous system (linearized Lorenz model) further reveals that the critical point at pre-onset can only be a saddle point. In the postonset nonlinear study, analysis of the generalized Lorenz model leads us to two other critical points that take over from the critical point of the pre-onset regime. Classical analysis of the Lorenz model points to the possibility of chaos. The effect of RI is shown to delay or advance the appearance of chaos depending on whether RI is negative or positive. This aspect is also reflected in its effect on the Nusselt number. The Lyapunov exponents provide useful information on the closing in and opening out of the trajectories of the solution of the Lorenz model in the cases of heat sink and heat source, respectively. The Ginzburg-Landau models for the problem are obtained via the 3-mode and 5-mode Lorenz models of the paper.