Effect of gravity on spontaneous imbibition from cores with two ends open in the frontal flow period