|| Checking for direct PDF access through Ovid
We present 2-D, fully compressible radiation-MHD simulations of the solar photospheric and subphotospheric layers that run for 2 hours of solar time starting from a magnetic configuration with mixed polarities. In the atmospheric layers the simulation reveals a correlation between field strength and inclination, with a nearly vertical strong-field magnetic component and a more horizontal weak-field component, in agreement with the observations. Our simulation also shows that magnetic flux is converted from one of these states to the other. In particular, magnetic flux sheets can also be formed when a new downflow lane starts due to granule fragmentation. The dynamics of the granulation and field-line reconnection are found to play a role in the initial stages of a magnetic element's formation. The simulation predicts that during or shortly after their formation magnetic elements could be associated with oppositely polarized flux at a small spatial scale.