Deoxygenated blood flows from the right ventricle to the lungs via the pulmonary artery. The contraction of the right ventricle increases the pressure within it so that it is greater than in the pulmonary artery so the semi lunar valves of pulmonary artery open and blood can flow through. Therefore we can say blood flow is down a pressure gradient. The blood then becomes oxygenated in the lungs and travels to the left atrium through the pulmonary vein.