A patient with renal failure undergoes treatment using a dialysis machine, as illustrated in the simplified diagram below.

Describe how a dialysis machine is designed to remove waste products from the blood while maintaining the correct balance of useful substances.
In your answer, you should: