-
Notifications
You must be signed in to change notification settings - Fork 176
Remove incorrect unit-casting #4053
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
Remove incorrect unit-casting #4053
Conversation
christiankral
left a comment
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.
Two comments:
- The constant
unitHis then not needed any more and can be removed from both models - The parameter
parameter Real M = 10/Hccould be changed toparameter Real(final unit="m/A") M = 10/Hc
|
Sorry this is a task for @ThomasBoedrich and Johannes Ziske. |
christiankral
left a comment
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.
Looks OK
True, but that would sort of break compatibility (using an inherited unitH is bad; but formally allowed) - so I delay that.
Ok, but doesn't seem that necessary. |
|
Adding unit just in case. |
Can you re-examine - it seems that a new approval is needed after change. |
christiankral
left a comment
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.
Look all good.
The basic issue is that
H0shouldn't be seen as a magnetic field strength, but as a dimensionless value (which makes sense given that it is the result of a logarithm). That implies that the argument to tanh is already dimensionless - when M has the unit of inverse magnetic field strength.The commit also makes the two models more similar.
As far as I can tell this issue was already present in the original commit of these models.