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