This function drainCurRevised calculates the main currents that flows from drain node to source node (level 2).
function drainCurRevised extends Modelica.Icons.Function; input SI.Voltage vbs; input SI.Voltage vgs; input SI.Voltage vds; input Spice3.Internal.Mosfet.Mosfet in_m "Record MOSFET"; input Modelica.Electrical.Spice3.Internal.Mos2.Mos2Calc in_c "Input record Mos2Calc"; input Modelica.Electrical.Spice3.Internal.Mos2.Mos2ModelLineParams in_p "Input record model line parameters for MOS2"; input Integer in_m_type "Type of MOS transistor"; output Modelica.Electrical.Spice3.Internal.Mos2.Mos2Calc out_c "Output record Mos2Calc"; end drainCurRevised;