I am really late to this party, but part of my company is in the battery energy storage business. If we leave the issues related to raw materials, and safety, aside (not trying to minimize those issues) it is absolutely true that batteries must be charged from an energy source, and then discharged, and there is a round trip efficiency loss, which can be 10-15% depending on many variables. So there are a couple of things which make batteries still worth while. Charging them from low cost energy, like surplus wind and solar power which would otherwise be dumped, or for example on a ship, since you probably don’t have wind or solar power…charging them when your generators are running at or near full load, which is probably their most efficient operating point, and then using them when maneuvering or some other operating point which would involve running your generators at low load where they will be significantly less efficient, i.e. consuming more fuel per kWh generated.
Some metrics. Today’s highest capacity containerized batteries can hold up to about 6 MWh (6000 kWh) in a 40 foot box. That’s as much energy as running a 1000 kW generator for 6 hours, or a 6000 kW generator for 1 hour. Not going to get your ship across a big stretch of water, but a still significant amount of energy. Power can be delivered instantly, if it matters, no ramp time waiting for turbos to spool. Above, Mr. Klaveness mentioned the energy density of diesel fuel as 230 g/kWh. That’s not correct. That is more than likely the measure of the fuel consumption of some diesel engine somewhere. A round number for the energy density of diesel fuel is 18,360 BTU/lb, or 42.7 MJ/kg. An older diesel engine might consume 230 grams of diesel to produce 1 kWh of shaft or electric power, modern ones are more like 180 g/kWh or less.
Ships are actually a very efficient way of transporting cargo, albeit often with highly polluting bunker fuel. But now with the push to low sulfur fuel, and further on to LNG, there will be less pollution produced per ton-mile or container mile or container km… I could go on for hours, but I’ll stop here.