function diodeCurrent input Real dx "Voltage across diode"; output Real i "Diode current"; end diodeCurrent;