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
Boltzmann and electron charge constants should not be redefined in Heating devices #1241
Comments
Modified by dietmarw on 20 Aug 2013 16:43 UTC |
Comment by hansolsson on 4 Sep 2013 09:33 UTC And isn't the electron charge given as: |
Comment by beutlich on 6 Oct 2015 09:31 UTC |
Comment by Matthis Thorade on 29 Oct 2015 17:01 UTC |
Comment by hansolsson on 30 Oct 2015 15:52 UTC
And in a few years the following might be exact (for some values of X), which can be seen as a strong argument for exposing them (at least after that change)- instead of computed values such as F and R (obviously we shouldn't remove F, but can keep it as F=q0*N_A;). q0=1.60217Xe-19; |
Comment by dietmarw on 31 Oct 2015 22:53 UTC
Hans, it would probably be a good idea to file a separate ticket for this. |
Comment by beutlich on 4 Nov 2015 07:40 UTC
There are now three different values of q used inside the SemiConductors package which is far from good modelling.
|
Comment by majetta on 4 Nov 2015 10:41 UTC |
Modified by majetta on 4 Nov 2015 10:41 UTC |
Modified by beutlich on 4 Nov 2015 10:46 UTC |
Changelog modified by beutlich on 4 Nov 2015 10:46 UTC |
Comment by dietmarw on 4 Nov 2015 11:22 UTC I'd suggest you rely on the existing constants and use them like proposed above: q0=Modelica.Constants.F/Modelica.Constants.N_A; in your library. Then if in future it was found agreement on adding the elementary charge directly you can still update your usage of it. |
Modified by beutlich on 4 Nov 2015 11:24 UTC |
Changelog removed by beutlich on 4 Nov 2015 11:24 UTC |
Comment by dietmarw on 4 Nov 2015 11:34 UTC Example: - Real k=Modelica.Constants.k "Boltzmann's constant, J/K";
+ import Modelica.Constants.k "Boltzmann's constant, [J/K]"; and - parameter Real K=Modelica.Constants.k "Boltzmann's constant";
+ import K=Modelica.Constants.k "Boltzmann's constant, [J/K]"; BTW very unfortunate that the Boltzmann's constant is used as |
Comment by majetta on 4 Nov 2015 13:08 UTC |
Comment by dietmarw on 4 Nov 2015 16:04 UTC |
Comment by otter on 13 Dec 2015 18:31 UTC |
Changelog modified by otter on 13 Dec 2015 18:31 UTC |
Comment by beutlich on 13 Dec 2015 18:40 UTC |
Comment by dietmarw on 14 Dec 2015 07:29 UTC |
Comment by ahaumer on 23 Dec 2015 19:52 UTC |
Modified by ahaumer on 23 Dec 2015 19:53 UTC |
Reported by jriel on 9 Aug 2013 22:29 UTC
In the HeatingDiode component, the Boltzmann constant is declared as a protected variable:
Real k=1.380662e-23 "Boltzmann's constant, J/K";
In the HeatingNPN and HeatingPNP components, the Boltzmann constant is defined as an unprotected parameter:
parameter Real K=1.3806226e-23 "Boltzmann's constant";
Note that the values differ. All should be using constants, specifically Modelica.Constants.k.
The same issues occurs with the electron charge (q) in the same models. Alas, there currently is no Modelica.Constants.q0, though there should be.
Migrated-From: https://trac.modelica.org/Modelica/ticket/1241
The text was updated successfully, but these errors were encountered: