-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proper unit for gamma. It is computed as the square root of something. #4377
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- What about MosModelLineVariableqs.m_gamma where it is of type Real?
- Did you notice that there are two different calculations in the lib? In Modelica.Electrical.Spice3.Internal.Mos1.mos1ModelLineParamsInitEquations it is a sqrt, in Modelica.Electrical.Spice3.Internal.Mos2.mos2ModelLineParamsInitEquationsRevised it is a quotient. I am not sure if this is intentional.
out_v.m_gamma := sqrt(2 * SpiceConstants.EPSSIL * SpiceConstants.CHARGE *
in_p.m_substrateDoping * 1e6 / out_v.m_oxideCapFactor); // (cm**3/m**3)
vs.
out_p.m_gamma := sqrt(2.0*Spice3.Internal.SpiceConstants.EPSSIL*
Spice3.Internal.SpiceConstants.CHARGE*out_p.m_substrateDoping*1.0e6)
/out_p.m_oxideCapFactor;
Should also be updated.
I have mostly skipped units in functions.
An additional problem here is that m_substrateDoping and m_oxideCapFactor both lack units. Deleted Additionally spice is weird in that it has prefixed SI-units, and even not really SI-units (like eV). |
Oh, I realized that the units are even weirder - and the previous was incorrect. EPSSIL shouldn't be unit-less, but as far as I understand has unit "F/m", specifically it is computed based on the relative di-electric constant of Silicon being 11.7 and 8.85...e-12 F/m being Modelica.Constants.epsilon_0. Added: The name EPSSIL means epsilion (di-electric constant) for Silicon. The m_oxideCapFactor is computed as di-electric-constant divided by thickness and should thus have unit "F/m2" (ignoring unit-conversions - I think thickness is measured in "um"). That would make the first equation unit-correct if doping was measured in "1/m2" instead of "1/m3"; and I don't know how the second equation would be unit-correct. But: for doping we have: Or basically: There seems to be some remaining unit-issues, but I don't know which ones; and I don't know if it is just a matter of missing/incorrect units or whether some formulas should be updated. |
Closes #4369
To confirm I just binged "gamma spice Bulk threshold parameter" and found: https://www.seas.upenn.edu/~jan/spice/spice.MOSparamlist.html
which contains the same unit for gamma.
And the copilot said: "Its units are Volts^(1/2)."