This function drainCur calculates the main currents that flows from drain node to source node (level 1).
function drainCur extends Modelica.Icons.Function; input SI.Voltage vb; input SI.Voltage vg; input SI.Voltage vds; input Mos1Calc in_c "Input record Mos1Calc"; input Mos1ModelLineParams in_p "Input record model line parameters for MOS1"; input SpiceConstants in_C "Spice constants"; input Mos.MosModelLineVariables in_vp "Input record model line variables"; input Integer in_m_type "Type of Mos transistor"; output Mos1Calc out_c "Output record Mos1Calc"; end drainCur;