Will distillation do the job of purifying the water? I asked about my sophisticated water purification system for a generation ship on Worldbuilding Stack Exchange, and somebody mentioned this:


  If you're gonna go to all the trouble of distilling it, why not just
  have that be your only step?


And it is a good question. But, from my chemistry knowledge, this just won't work. Here are the problems I see with distillation being the only step:


Proteins in blood and urine are going to froth up from the heat. If these get into the water, the water is going to smell like urine and nobody is going to want to drink it.


This is the easiest issue to fix. Just make the apparatus tall enough and no urine froth will make it to the distallate. That or adding a trap to react with the urine froth and solidify it in between the 2 ends of the apparatus would work.


Any hydrochloric acid that is present from vomit is still going to be there because it changes the boiling point of water. You simply can't get rid of the acid via distillation alone, not even repeated distillation. You need either microbes that can break down hydrochloric acid or an acid base reaction to get rid of the acid.


Hydrochloric acid forms an azeotrope with water. In fact it forms several depending on the acid concentration. So at some point, strongly acidic water will come over. Worst part is that a mixture of hydrochloric acid and water is colorless and odorless, so the only way you could tell is by density. Start to see those lines that occur when you mix liquids of different densities and you know strongly acidic water is coming over. Also, checking for pH would help but that would mean either an acid resistant pH sensor in the container with the distillate or stopping the distillation periodically and using pH strips. Checking for a change in density is much easier.


If acid vapors escape the system, as I think some will, then everybody on the ship will get irritated lungs, and some might get "Acid Pneumonia" and die from both the irritation due to the acid and the infection that the hot acid predisposes them to. There would be some infectious agents on the generation ship to keep their immune system in their prime and to help prevent autoimmune disorders from spreading like wildfire. But if this is combined with acid vapors, it is basically a death sentence for whoever gets infected. This is not even considering the fact that acid in your eyes can make you go blind


No distillation system can 100% prevent vapors from escaping. Not even a vacuum distillation with a trap will do it.

So in my opinion, distillation is necessary but can't be the only step, otherwise WCS, you get water that smells like urine that nobody wants to drink and hot acid vapors spread all over the ship causing lung irritation and blindness and everybody dies from a combination of the acid vapors and dehydration related both to heat and infection very quickly and you just have an empty hull in space. BCS, everybody gets heartburn from drinking the acidic water.

So, is there a way to get rid of the hydrochloric acid when distilling the water? Or would the people distilling the water have to resort to an acid base reaction followed by a second distillation to get rid of the acid and any excess base?
The old school method of generating ultra-pure water by distillation was to add a small amount of potassium permanganate in a slightly alkaline solution. All the organics were oxidized by the permanganate ion in boiling water. A small of $\ce{MnO2}$ so formed during boiling would take care of the acid(s). This water was good enough for electrochemical experiments. HCl only forms an azeotrope at 20.2% composition and it boils around 110 Celsius.

Today ultrapure water is produced by using quite expensive deionizers with UV lamps. UV destroys all the organics, and then an activated carbon filter absorbs them. Water produced from such deionizer has a specific resistance of $18.2  \rm{M\Omega.cm}$.