I can't get my desalination plants to not work.
No, that double negative isn't a typo. I have so far been unable to make a desalination system not work, even when doing everything you aren't supposed to.
My first attempt was in a salty swamp marsh on the shore, with multiple salty murky ponds:
http://img28.imageshack.us/img28/3632/test1yy.png
As a test of what you aren't supposed to do, I built a cistern directly on bare ground:
http://img51.imageshack.us/img51/3120/test2sm.png
and filled it through the pump. On testing with a water zone, the water was fresh:
http://img585.imageshack.us/img585/1194/test2upper.png
This wasn't supposed to work, according to the common knowledge of how desalination works.
I tried again in a new location, again building a floor-less cistern, this time right next to the ocean:
http://img706.imageshack.us/img706/8278/test1floor.png
Again, the water was fresh when pumped:
http://img827.imageshack.us/img827/7435/test1upper.png
Even when I dug out the lower level, making sure the water was in direct contact with raw natural stone as shown:
http://img225.imageshack.us/img225/576/test2lower.png
the water was still fresh:
http://img85.imageshack.us/img85/1240/test2water.png
I did see the strange known bug where water near the ocean could not be raised above the level of the ocean. Once I dug the floor of the cistern below the surface of the ocean, I could not raise the level of the cistern water above the level of the ocean. Despite this, and despite being in contact with natural stone and sand walls two tiles away from the ocean, the water was still fresh.
I have since tried this in two more embark sites. I cannot reproduce the claimed behavior of contact with a natural stone or soil wall or floor turning water salty. I will attempt a few more times, but I'm starting to think that 'cisterns must have constructed walls and floor' is a superstition with no bearing on reality, similar to the claim that dwarves would stop drinking booze if only one type was available.
The closest I've found to validating this claim is on a seaside embark with an aquifer. The aquifer is salt water, and if I permit the cistern water to come in contact with the aquifer the cistern turns permanently salty. If I dig a cistern down to the level of the aquifer, the cistern is salty, but if I dig the cistern down one level shy and fill it by a pump, the cistern is fresh water, despite being in direct contact with sand walls:
http://img521.imageshack.us/img521/3936/test2isstillfresh.png
Comments?
A quick test of desalination via well:
I embarked on a seaside site, bringing along plenty of wood, some stone, some ropes, food, and no booze. I verified that activity zones on the oceanside and around the murky pools could not be designated as water sources, indicating that the water was salty, and therefore undrinkable without desalination.
I built half a dozen wells, three along the ocean and three in various murky pools. All of these wells showed as 'Active', meaning that they were usable as water sources.
(http://img52.imageshack.us/img52/457/well1.png)
Note: I did not set water source zones around the wells. Activity zones set as water sources are a completely different function than wells. It is not necessary to set a water source zone around a well, the dwarves will go and use any active and non-forbidden well as a water source. I did however try setting water source zones around the map to make sure the water was salty.
Very soon after the wells were built, thirsty dwarves began using them to get water:
(http://img197.imageshack.us/img197/2802/drinking1.png)
The content of the buckets showed as 'Water laced with salt':
(http://img195.imageshack.us/img195/451/bucket1.png)
Despite the water being salty, the dwarves didn't seem to get any bad thoughts from drinking it.
(http://img6.imageshack.us/img6/4044/thoughts1.png)
In addition to the well over the murky pool, I also did the same test with buckets set directly over the ocean, with the same results.
I don't know if there are any specific bad thoughts or health effects from drinking salt water for years, other than the general slowdown and increased length and number of breaks from alcohol deprivation. I also have not tested if salt-water wells are usable as a source of water for prisoners or convalescing injured dwarves yet. If water from a well is always usable, there's no need to build pump-based desalination systems at all.
It does seem to still be the case that while wells don't desalinate water, dwarves are willing to drink water drawn from a well over a salty water source. You also can't judge whether a well will be usable by the ability to designate a water source zone around the well.
Next experiment: On the permanent contamination of a location by salt.
I built a small desalination plant by the ocean. This one had a lever-controlled floodgate on the side which permitted the water in it to be dumped to a channel connected to the ocean.
(http://img11.imageshack.us/img11/6421/cisternfilledlower.png)
As before, when filled with water with a pump, the cistern was usable as a water source, indicating that the water was not salty.
(http://img155.imageshack.us/img155/9805/custernfilledupper.png)
I opened the floodgate for a moment, allowing water to flow out into the channel.
(http://img198.imageshack.us/img198/9544/waterescapes.png)
I then shut the floodgate and refilled the cistern. Checking the water source zone revealed that the water was now salty.
(http://img100.imageshack.us/img100/193/custernsaltyupper.png)
I then completely deconstructed the cistern, including the walls, floor, pump, door and floodgate.
(http://img84.imageshack.us/img84/6426/deconstructing.png)
In order to ensure that no trace of mud or salty water remained, I built a stone floor where the cistern was, then tore up the floor and threw away the stones. When I was finished the location which had been occupied by the cistern had been physically scrubbed clean of all contamination.
(http://img534.imageshack.us/img534/651/sitecleaned.png)
I then rebuilt a new cistern and pump in the same location, and filled it with water.
(http://img440.imageshack.us/img440/9245/rebuiltbottom.png)
I then checked the water zone on top of the cistern.
(http://img192.imageshack.us/img192/3903/topstillsalty.png)
Still salty.
Conclusions:
Salt water contamination is essentially instantaneous, and can travel uphill and against the flow of water, so that a cistern that drains into the ocean will become salty.
Once a tile has become salty, it cannot be made unsalty, even if you remove all mud and other contamination and completely replace all structural materials. It's similar to how once a tile has become light/aboveground, it can never become dark/underground again, even if you build a roof over it.
I tried some tests for further debunking of desalination myths and to help confirm Sphalerite's results.
I channeled off a section of the beach (channels are a barrier to waves). Behind the channel, I channeled a cistern in the beach (conglomerate), I then pumped water into it.
Result: Fresh
Next I build a cistern - without a constructed floor - on the beach (again, walling off the waves themselves). Result: Fresh.
I also build a cistern with a constructed floor on the beach. In that case I didn't make any special effort to stop the waves, in fact I deliberately watched them wash all over the floor before finishing off the wall and pump. Result: Fresh.
And I build a cistern without a constructed floor in the waviest bloody spot I could find with the waves going right in the front. Result: Fresh.
The walled cisterns all remained fresh permanently (whether or not they had constructed floors).
However the cisterns channeled into the beach, went salty after a short time, even if they were fully sealed in by walls.
I also noticed something weird with pumping on the beach. Sometimes waves would emanate from the pumps even though the pump output had no possible way to escape (I suspect it is these "pump waves" or related breaches of physics which re-salinate fully-sealed dug out reservoirs on beaches).
Here's an image of my horribly messy testing setup:
(http://img830.imageshack.us/img830/9656/reservoirisfresh2.jpg)
What I particularly want to draw your attention to is the little reservoir on the far left; now I couldn't fill that one because it was under the influence of beach-physics, the beach seems to function as an aquifer which doesn't produce water, but does absorb pressurized water, so if you channel into the beach, water on top of the beach will drain into the channels. But the funny thing is, the water in the channel itself, is still fresh, that is a fresh water cistern. In other words, even contact with the beach-pseudo-aquifer - even in fact being stored in the beach-pseudo-aquifer - isn't sufficient to re-salinate water.
On the right side of the screen, the small walled-reservoirs on the beach are all perfectly fresh water, in spite of the fact that I filled them, removed the pumps, let them drain, let the waves wash through them, rebuilt the pumps and finally re-filled them. They remained fresh. Waves seem to have no ability at all to contaminate on their own z-level - they need to go down a channel (and "manifest" as real salt water) to do this.
So I concluded that water only re-salinates when it contacts genuinely existing salty water. I went out to test this further and confirm Sphalerite's result:
(http://img256.imageshack.us/img256/4189/freshtosalty.png)
This is a perfectly fresh water cistern. Now my hypothesis was, when I opened the floodgate, the fresh water would flow out, contact salty water, and the saltiness, like electrical current, would propagate back into the reservoir. This turned up to be exactly what happened, when the fresh water stream hit the salt water, the whole reservoir turned salty. However, it wasn't sufficient for the fresh water stream to merely touch the waves, it was only when I dug out a channel bringing salt water nearer to the drain, that a "genuine water" connection could be made. It seems that waves by themselves are utterly harmless.
And I also repeat my earlier results, that I managed to empty small, 2x2 and 1x1 reservoirs and refill them without them being contanemated, even though the water drained into saltwater channels. I believe what must have happened there is that the fresh water quickly spread out to less than 3/7 depth before contacting the salt water. It is likely that two bodies of water need to be connected by at least 3/7 water before they count as the same body of water allowing saltiness to propagate.
So it seems that the only two critical things, is to avoid digging cisterns into the beach (this should be common sense), although building cisterns ON the beach is fine, and avoid letting the body of fresh water contact a body of salty water. Other than that, it seems you can dig or build your desalination cisterns wherever and however you like.
I also noticed some funny things with waves. Waves seem to propagate line-of-sight from the ocean. A straight horizontal mine shaft, going across the map and entering the ocean (at the highest water layer of the ocean), produced waves (and mist) on the floors of a chamber at the far end, 3 embark tiles away from the ocean in a different biome. Sadly though the mist didn't make the dwarves happy.