working, but u values are wrong because voltages are used instead of selfconsistent phi