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

Add missing experiment annotations #4516

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

casella
Copy link
Contributor

@casella casella commented Jan 7, 2025

Fixes #4510.

If approved should be ported to maint/4.1.x

@maltelenz
Copy link
Contributor

I don't feel comfortable reviewing this, given that I have little to no experience in this domain.

@maltelenz maltelenz removed their request for review January 7, 2025 10:47
@@ -226,5 +226,6 @@ package Polyphase "Polyphase quasi-static package"
connect(starI.plug_p,currentSource. plug_p) annotation (Line(points={{-20,-80},{-20,-50}}, color={85,170,255}));
connect(currentSource.plug_p, capacitor.plug_n) annotation (Line(points={{-20,-50},{-10,-50},{-10,-20},{-20,-20}}, color={85,170,255}));
connect(capacitor.plug_p,currentSource. plug_n) annotation (Line(points={{-40,-20},{-50,-20},{-50,-50},{-40,-50}}, color={85,170,255}));
annotation(experiment(StopTime = 1.0, Interval = 0.0002));
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
annotation(experiment(StopTime = 1.0, Interval = 0.0002));
annotation(experiment(StopTime = 1.0));

I don't see a need for Interval, as the other examples in the same package doesn't have it and still has the same number of outputs, and there is nothing interesting in these signals at that time-scale. I guess the added points are added to make the references "better" in some way.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seems reasonable to me. @christiankral, @AHaumer do you agree?

Copy link
Contributor

Choose a reason for hiding this comment

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

Since a ramp is used, I would use Interval in the range 0.01 ... 0.001

Copy link
Contributor

Choose a reason for hiding this comment

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

Are we discussing the same model? I don't see a ramp in this one (ModelicaTest.Electrical.QuasiStatic.Polyphase.FrequencySweep), but in the other two examples in the package that already had experiment-annotation.

Copy link
Contributor

Choose a reason for hiding this comment

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

(without Interval for the other two).

@@ -265,5 +265,6 @@ package SinglePhase "Single-phase quasi-static package"
connect(currentCurrent.pin_p, impedanceC.pin_n) annotation (Line(points={{20,-50},{20,-60},{50,-60},{50,-50}}, color={85,170,255}));
connect(groundI1.pin, currentCurrent.pin_p) annotation (Line(points={{0,-60},{20,-60},{20,-50}}, color={85,170,255}));
connect(complexRampC.y, impedanceC.Z_ref) annotation (Line(points={{69,-40},{62,-40}}, color={85,170,255}));
annotation(experiment(StopTime = 1.0, Interval = 0.0002));
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
annotation(experiment(StopTime = 1.0, Interval = 0.0002));
annotation(experiment(StopTime = 1.0));

I don't see a need for Interval, as the other examples in the same package doesn't have it and still has the same number of outputs, and there is nothing interesting in these signals at that time-scale. I guess the added points are added to make the references "better" in some way.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ditto

Copy link
Contributor

Choose a reason for hiding this comment

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

In general you're right, for QuasiStatic models we don't need an interval as long as no ramps are included.
I don't see which of the Test Examples is meant.
If we use a ramp, we should consider specifying the Interval to see a meaningfull count of result points during the ramp (maybe 100 or 1000, 5000 is a little bit too much).

Copy link
Contributor

@HansOlsson HansOlsson Jan 10, 2025

Choose a reason for hiding this comment

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

I meant ModelicaTest.Electrical.QuasiStatic.SinglePhase.SerialConnection and ModelicaTest.Electrical.QuasiStatic.SinglePhase.Ideal - and the outputs are just smooth.

@beutlich beutlich changed the title Added missing experiment annotations Add missing experiment annotations Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ModelicaTest.Electrical.QuasiStatic.*.FrequencySweep is missing experiment annotation
4 participants