Codes for two layer flow between electrodes