Direct simulation of wave interactions in unsteady natural convection in a cavity