Skip to content

Conversation

@HansOlsson
Copy link
Contributor

The basic issue is that H0 shouldn'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.

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.

Two comments:

  1. The constant unitH is then not needed any more and can be removed from both models
  2. The parameter parameter Real M = 10/Hc could be changed to parameter Real(final unit="m/A") M = 10/Hc

@AHaumer
Copy link
Contributor

AHaumer commented Apr 27, 2023

Sorry this is a task for @ThomasBoedrich and Johannes Ziske.

@beutlich beutlich changed the title Remove incorrect unit-casting. Remove incorrect unit-casting Jun 1, 2023
@christiankral christiankral self-requested a review June 1, 2023 20:07
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.

Looks OK

@HansOlsson
Copy link
Contributor Author

Two comments:

  1. The constant unitH is then not needed any more and can be removed from both models

True, but that would sort of break compatibility (using an inherited unitH is bad; but formally allowed) - so I delay that.

  1. The parameter parameter Real M = 10/Hc could be changed to parameter Real(final unit="m/A") M = 10/Hc

Ok, but doesn't seem that necessary.

@HansOlsson
Copy link
Contributor Author

Adding unit just in case.

@HansOlsson
Copy link
Contributor Author

Looks OK

Can you re-examine - it seems that a new approval is needed after change.

@christiankral christiankral self-requested a review June 13, 2023 11:55
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.

Look all good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L: Magnetic.FluxTubes Issue addresses Modelica.Magnetic.FluxTubes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants