Numerical analysis of thermosolutal flows in a cavity with gravity modulation effects