Skip to content
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

Units for gamma in Modelica.Electrical.Spice3.Internal.Mos.mos2CalcCalcTempDependenciesRevised #4369

Open
HansOlsson opened this issue Mar 27, 2024 · 5 comments · May be fixed by #4377
Open
Labels
L: Electrical.Spice3 Issue addresses Modelica.Electrical.Spice3 requires Modelica 3.7 Issue that requires Modelica Language Specification 3.7

Comments

@HansOlsson
Copy link
Contributor

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).

@AHaumer
Copy link
Contributor

AHaumer commented Oct 15, 2024

I'm pretty sure Modelica.Electrical.Spice3 is almost not used, and it's nearly impossible to maintain it since Christoph Clauss is retired, IMHO we should discuss how to get rid of that sublibrary.
@casella @christiankral what's your opinion?

@christiankral
Copy link
Contributor

christiankral commented Oct 17, 2024

I am very much in favor of getting rid of the Spice3 package within the MSL.

One simple way is to indicate the Spice3 as obsolete in one the next releases -- possibly MSL 4.1.0 -- and remove it from MSL 5.0.0. We could then move the Spice3 library to a standalone package on GitHub and see if someone is going to maintain it (or a fork) in the future.

@casella
Copy link
Contributor

casella commented Oct 17, 2024

I'm pretty sure Modelica.Electrical.Spice3 is almost not used

I'm not really sure about that. As far as I understand the FOSSEE project led by Kannan Moudgalya actually used it.

If the only problem of Spice3 is units, I wouldn't bother, since the original models did not have that attribute.

I would consider deprecating Spice3 if we had evidence that there is something actually broken in it, but I don't see why this should be the case, since I understand the original library was validated against Spice on multiple examples.

@beutlich
Copy link
Member

beutlich commented Oct 18, 2024

This issue is about the gamma unit. And we have already seen in the comments of the corresponding PR #4377 that there's something more fishy than just the unit.

@HansOlsson
Copy link
Contributor Author

This issue is about the gamma unit. And we have already seen in the comments of the corresponding PR #4377 that there's something more fishy than just the unit.

At least more fishy than the unit for that variable, it could be some non-unit issue or that the unit-issues are even more complicated than I thought; I don't know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: Electrical.Spice3 Issue addresses Modelica.Electrical.Spice3 requires Modelica 3.7 Issue that requires Modelica Language Specification 3.7
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants