Modeling the cyclic modulation of photospheric lines