Skip to content

Issue261 switch#329

Open
Nicsda wants to merge 17 commits into
DLR-SR:mainfrom
Nicsda:Issue261Switch
Open

Issue261 switch#329
Nicsda wants to merge 17 commits into
DLR-SR:mainfrom
Nicsda:Issue261Switch

Conversation

@Nicsda

@Nicsda Nicsda commented Jun 2, 2026

Copy link
Copy Markdown

Made Switch and its test case obsolete (only cosmetically to be able to push this to a minor release) and added documentation accordingly.
Created the new ThreeWayValve model very similar to the switch model but with BasicControlValves. Apparently, the same parameterization as for the switch still works. Also added a pointer in the icon to visualize the opening position.
Regression Test: everything validated, except of course the new "FlowControl.Tests.ThreeWayValve"

dotz_ni added 17 commits May 29, 2026 17:03
…y the type and not its path get displayed in the parameter dialog window
…nput) and added/adjusted the documentation in both pCV and mCV
…ters forwarded from top-level to single valves yet
…uding invertInput; more extensive test model, needs to be tidied up
…valves according to the corresponding outlet
@RaphaelGebhart

Copy link
Copy Markdown
Collaborator

It looks like reviewer, assignee, and a corresponding issue are still missing.

@Nicsda Nicsda self-assigned this Jun 2, 2026
@Nicsda Nicsda linked an issue Jun 2, 2026 that may be closed by this pull request

@tobiasreischl tobiasreischl Jun 15, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i would remove this file change - intentional? ... maybe consistency?

experiment(StopTime=10, Tolerance=1e-6, Interval=0.01, __Dymola_Algorithm="Dassl"),
Documentation(info="<html>
<p>Test for the switches.</p>
<p>Owner: Michael Mei&szlig;ner</p>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
<p>Owner: Michael Mei&szlig;ner</p>
<p>Owner: Niclas Dotzauer</p>

experiment(StopTime=10, Tolerance=1e-6, Interval=0.01, __Dymola_Algorithm="Dassl"),
Documentation(info="<html>
<p>Test for the switches.</p>
<p>Owner: Michael Mei&szlig;ner</p>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can also be deleted

annotation(Dialog(group = "Valve parameters",enable = (flowCoefficient ==FlowCoeffType.m_flow_set)));
parameter Real k_min(unit="1", min = 1e-5, max = 1) = 0.03 "Remaining flow at actuation signal u = 0";

parameter SI.Pressure p_ref = 1e5 "Reference pressure";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
parameter SI.Pressure p_ref = 1e5 "Reference pressure";
";

not used

ThermofluidStream.Interfaces.Outlet outletB(redeclare package Medium=Medium)
annotation (Placement(transformation(extent={{-20,-20},{20,20}},rotation=90,origin={0,100})));

Modelica.Blocks.Interfaces.RealInput u(min=0, max=1, unit="1") "Flow split"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
Modelica.Blocks.Interfaces.RealInput u(min=0, max=1, unit="1") "Flow split"
Modelica.Blocks.Interfaces.RealInput u(min=0, max=1, unit="1") "Control signal for valve openings"

parameter Real k_min(unit="1", min = 1e-5, max = 1) = 0.03 "Remaining flow at actuation signal u = 0";

parameter SI.Pressure p_ref = 1e5 "Reference pressure";
parameter Boolean invertInput = false "=true, if input single is inverted" annotation (Evaluate=true, HideResult=true, choices(checkBox=true));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
parameter Boolean invertInput = false "=true, if input single is inverted" annotation (Evaluate=true, HideResult=true, choices(checkBox=true));
parameter Boolean invertInput = false "=true, if the control input is inverted" annotation (Evaluate=true, HideResult=true, choices(checkBox=true));

Spelling mistake

@@ -0,0 +1,180 @@
within ThermofluidStream.FlowControl;
model ThreeWayValve "to control e.g. bypass flows"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
model ThreeWayValve "to control e.g. bypass flows"
model ThreeWayValve "Three-way valve for continuously controlling complementary branch openings"

annotation (Diagram(coordinateSystem(extent={{-120,-100},{100,100}})),
experiment(StopTime=10, Tolerance=1e-6, Interval=0.01, __Dymola_Algorithm="Dassl"),
Documentation(info="<html>
<p>Test for the switches.</p>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
<p>Test for the switches.</p>
<p>Test for the three-way valve component.</p>

Prbly copy paste error ;)

@tobiasreischl tobiasreischl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Minor changes suggested directly - but mostly stuff to make it appear clean

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.

Create New Switch Model

3 participants