Blue energy conversion utilizing smart ionic nanotransistors