When the kidneys are not working, a dialysis machine is used to filter the blood. Blood is taken from the arm and travels through the dialysis machine, where it flows past a dialysis fluid containing glucose and ions. The blood and fluid are separated by a partially permeable membrane, allowing diffusion between the blood and fluid. Urea exits the blood into the dialysis fluid by diffusion, as the fluid contains no urea. The levels of glucose and ions in the dialysis fluid are similar to that of the blood, so there is usually no net diffusion of ions or glucose across the membrane, unless the blood is lacking in ions.