Free (standard conforming) library to model mechanical (1D/3D), electrical (analog, digital, machines), magnetic, thermal, fluid, control systems and hierarchical state machines. Also numerical functions and functions for strings, files and streams are included.
out_c.m_tVbi := in_p.m_vt0 - in_m_type*(in_p.m_gamma*sqrt(in_p.m_phi)) + ...
The in_m_type is just an integer, but the other variables are all voltages, which mean that we have voltage=voltage+voltage*sqrt(voltage), which clearly does not make sense.
Looking at references it seems that the formula looks ok, but gamma is computed as the square root of something, and thus likely should have unit sqrt(voltage) instead (which will require Modelica Language 3.7).
Modelica.Electrical.Spice3.Internal.Mos.mos2CalcCalcTempDependenciesRevised contains:
out_c.m_tVbi := in_p.m_vt0 - in_m_type*(in_p.m_gamma*sqrt(in_p.m_phi)) + ...
The in_m_type is just an integer, but the other variables are all voltages, which mean that we have voltage=voltage+voltage*sqrt(voltage), which clearly does not make sense.Looking at references it seems that the formula looks ok, but gamma is computed as the square root of something, and thus likely should have unit sqrt(voltage) instead (which will require Modelica Language 3.7).