Fundamental studies on electrochemical production of dendrite-free aluminum and titanium-aluminum alloys