Interesting. I read a little more on the topic of desalination, particularly about vacuum distillation. How low can they manage to drop the boiling temperature to? I imagine that since we can create press machines that can exert enough pressure to create artificial diamonds We should be able to design reverse presses that can force near total vacuums.
The lower the pressure, the lower the boiling point. From a practical standpoint, the lowest pressure would correspond to the highest seawater temperature, say 90 degrees Fahrenheit (say 30 degrees C), so that you don't have to chill the incoming seawater, which becomes expensive.
One might envisage a situation in which sea water passed through a clay bed. These will preferentially attract cations to their surfaces and inter-layer spaces. The problem is that permeability is very low, so it would take a geologically significant time to occur. It would also be difficult to imagine what drive mechanism could produce the necessary movement.
Re questions: "If one digs a well near the ocean
can the sand filter the salt out of ocean water?
If so how far inland would one have to go?"
Beach sand will not filter salt from the water but many
ocean shorelines have fresh water aquifers beneath them.
Where soils are permeable and aquifers slope to the
ocean this fresh water may extend far offshore.
Where landowners adopt the onsite retention techniques
strongly recommended by USA gencies, aquifers can be
refilled to push salt water out from beneath the land.
Where politicians reject this rainwater management mode,
as here in San Diego County and most of Southern
California, the "zero runoff" design mandated by State law
is not in use so salt water has encroached under beaches
and estuaries. Wells and reservoirs commonly run dry
in the summer and during droughts like the present one,
even though County rainfall is 22 times household usage.
Small islands can have plentiful fresh wellwater if they have
adequate rainfall, permeable soil and wise land managers
As hinted at by several replies, fresh water reservoirs are accumulated rain water which trickles down from the surface.
Below this fresh water zone the pore water is almost always brine, often referred to as connate water. This is sea water trapped with the sediments when the rock is formed.
At the sea shore contiguous high permeable sand bodies can be subject to competition between the surface rain accumulations and the salty sea encroachment due to various gradients of elevation, density, temperature, chemical concentration, etc. as wells as capillary forces/surface tensions.
On-the-shelf tech will permit anyone to manage groundwater
to suit their needs. Over the past 60 years Fresno has shown
how a major aquifer that was contaminated can be flushed and
refilled with pure water derived from street runoff.
Beach sand aquifers can similarly be purified by diverting
runoff into upslope aquifers with due diligence.
This is rarely done in here in California because it has the
world's greatest concentration of civil engineers who focus
on protecting their job security by misleading clients into
approval of inaapropriate, extravagant and/or wholly
unnecessarhy programs and projects.
San Diego County's beaches are deeply contaminated because
its plentiful rainfall (1.35 trillion gallons annually) is channelled
to the ocean - at considerable expense - rather than being
detained to soak in and replenish aquifers. It's politicians are
kept ignorant of sensible options, choose between foolish ones.
Its 70 miles of shoreline present an excellent source of far
more pure water than it uses, needing only to have 2/3 of its
huge volume of rainfall percolated into soils so that it raises
the land water table to where underwater springs develop.