Skip to content

Conversation

@HansOlsson
Copy link
Contributor

As explained in the documentation rewrite to make it easier for unit-checking.

Previously the equation contained 10^(log10(wMin)+(log10(wMax)-log(wMin))*x) but that is replaced by the equivalent to wMin*(wMax/wMin)^x.

Looking at units for the first equation would require some special logic, but the second trivially has the same unit as wMin.

@HansOlsson
Copy link
Contributor Author

BTW: Looking at the uses of the model, should wMin and wMax also be declared as frequencies corresponding to their description? I understand that it can technically sweep anything, but if the intent is that they are frequencies that would be helpful as documentation.

@casella casella self-requested a review November 2, 2022 22:12
Copy link
Contributor

@casella casella left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I completely agree with this proposal. From a numerical point of view of course log(xy) = log(x) + log(y), if x>0 and y > 0, that is. However, from a physical point of view, the argument of transcendental functions in physical laws should be dimensionless. So, if we want to use variables with units, the proposed change is much better.

Copy link
Contributor

@christiankral christiankral left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also very much agree with this proposal

@casella casella merged commit 7b9cf4c into modelica:master Nov 15, 2022
@beutlich beutlich removed the request for review from AHaumer February 25, 2023 16:33
@beutlich beutlich added this to the MSL4.1.0 milestone Feb 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L: Blocks Issue addresses Modelica.Blocks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants