The Sun and alpha Cen A and B are the nearest stars to us. Despite the general agreement between their models and seismic and non-seismic constraints, there are serious problems pertaining to their interiors. The good agreement between the sound speed and base radius of the convective zone of the Sun and the solar models is broken apart by a recent revision in solar chemical composition. For alpha Cen A and B, however, it is not possible to fit models with the same age and chemical composition to all seismic and non-seismic observational constraints. At the age deduced from seismic constraints, the luminosity ratio (L-A/L-B) of the models is significantly lower than the ratio taken from the observed luminosities. Enhancement of opacity as a function of temperature is one way to restore the agreement between solar models and the Sun, but such an enhancement does not alter the situation for alpha Cen A and B. The reason is that models of both components are influenced in a similar manner and consequently the luminosity ratio does not change much. In the present study, problems pertaining to the interiors of these three stars with a single expression for opacity enhancement are modelled. The opacity enhancement is expressed as a function of density, ionization degree of heavy elements (oxygen) and temperature. According to this expression, for improvement of the models the required opacity enhancement for alpha Cen A and B at log(T) = 6.5, for example, is about 7 and 22 per cent, respectively. The enhancement takes place in the region in which pressure ionization is effective, and is higher for low-mass stars than for high-mass stars. This result seems to be a possible explanation for the serious differences between models and observational results for cool stars.