Context. Atomic diffusion is believed to be an important physical process in the atmospheres of several types of stars. Stellar atmospheres, including the stratification of the elements due to diffusion, are then needed to properly compare theoretical results to observations for such stars.
Aims. This paper aims to estimate the effect of vertical abundance stratification on the atmospheric structure of stars and its potential importance regarding observational anomalies for various types of stars.
Methods. Simulations using a modified version of the PHOENIX atmosphere code will be described, while taking vertical abundance stratification into account.
Results. Our results show that large abundance gradients can exist in the atmospheres of Ap and blue horizontal branch stars. Stratification can also lead to relatively large atmospheric structural changes. The effect of elemental stratification on the atmospheric structure might well be able to explain the well-known core-wing anomaly of the Balmer lines observed for cool Ap stars.