Washing machines squander electricity to heat water, dishwashers too. That much:
(0.4m)3 = 64kg water from +15°C to +40°C is 6.7MJ=1.9kWh, in two passes 3.7kWh. Heat losses during the process make it worse. At variable 0.3€/kWh it costs 1.1€, just once a week is 170€ in 3 years, ouch. To +90°C it's 30MJ, in two passes 11kWh and 3.3€. Every second week costs 260€ in 3 years. Blistering barnacles!
We can fill the machine completely, and when possible wash in a single pass less warm, to save electricity, washing powder and water. I've just bought 6 bed sheets which the saved electricity will pay in 3 years, better than a savings account. But what can technology do?
Coal, gas, heating oil, maybe solar heat, are much cheaper than electricity. My grandmother had a washing machine heated by gas. Allegedly not convenient enough, but to save 3€ I'd go to the cellar twice. An engineer doesn't earn money at that pace. Plus, gas heating can be automatic. Better: obtain warm water from the central heating, dilute for +40°C, post-heat with electricity if needed. Clean that water if necessary, or use a heat exchanger.
If washing in two passes, the first wastewater could heat the second pass. This needs water storage at ambient pressure for the wastewater, a heat exchanger, and controls, but no insulation. To save half of 400€ in 3 years, the added hardware looks cheap. It needs room and smart customers.
At a laundry, hotel, restaurant... machines run often. Heat from the (second) pass could serve for the next machine load. 0.3m3 water allowed to cool from +90°C to +85°C in 24h tolerates 73W leak, at a sphere it's 70mm foam. A second insulated tank could recycle the heat at +40°C to +60°C. Or just neglect the refinements.
A collective house could use a similar storage, both if few machines are shared by many users, or if one user's heat serves for the other. Some policy can share the costs better.
Can a lone washing machine do the same? Imagine it serves regularly every week, or accept imperfect savings from random use. 64kg water allowed to cool from +90°C to +70°C in a week tolerate 9W leak. At a sphere it's >180mm foam, not little. Vacuum insulation would do it better.
A solid like bricks or a polyolefine could store heat. This would avoid bacterial growth in the wastewater tank, but it adds costs. It could double as the heat exchanger.
The water supply pipe is often long in a house. Running the wastewater close to it, in the opposite direction, with a common heat insulation, would implement the function imperfectly but with the minimum footprint. If shared among many machines, the insulation is less critical.
Marc Schaefer, aka Enthalpy