High-pressure phase transformations of ramp-compressed aluminum and sodium