Skip to content

>> Use SI.* where possible#288

Open
tobiasreischl wants to merge 29 commits intoDLR-SR:mainfrom
tobiasreischl:TFS_MediumChange
Open

>> Use SI.* where possible#288
tobiasreischl wants to merge 29 commits intoDLR-SR:mainfrom
tobiasreischl:TFS_MediumChange

Conversation

@tobiasreischl
Copy link
Copy Markdown
Contributor

Changed from Medium.* to SI.* - closes Issue #16
keep SI.PressureDifference
SI.Pressure -> SI.AbsolutePressure only for p, not for r
Modelica.Units.SI. changed to SI.

IMPORTANT: Media not changed (for now)

> Changed from Medium.* to SI.*
> keep SI.PressureDifference
> SI.Pressure -> SI.AbsolutePressure only for p, not for r
> Modelica.Units.SI. changed to SI.

> IMPORTANT: Media not changed (for now)

protected
SI.Pressure p_env "Environmental pressure";
SI.AbsolutePressure p_env "Environmental pressure";
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Keep SI.AbsolutePressure. Do not change to Medium.AbsolutePressure.

parameter Boolean pEnvFromInput = false "=true, if environmental pressure input connector is enabled"
annotation(Dialog(group="Environmental pressure"),Evaluate=true, HideResult=true, choices(checkBox=true));
parameter SI.Pressure p_env_par=1e5 "Environmental pressure set value"
parameter SI.AbsolutePressure p_env_par=1e5 "Environmental pressure set value"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Do not change to Medium.AbsolutePressure.


protected
SI.Pressure p_env "Environmental pressure";
SI.AbsolutePressure p_env "Environmental pressure";
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Do not change to Medium.AbsolutePressure.

@RaphaelGebhart
Copy link
Copy Markdown
Collaborator

RaphaelGebhart commented Feb 24, 2026

The requested changes always refer to the last line of the preview.

  • Modelica.Units.SI.* -> SI.*
  • Pressure -> AbsolutePressure for p_in, p_out, etc. Not for dp, r
  • Apply requested changes.
  • SI.* -> Medium.* whenever possible (AbsolutePressure, Temperature, etc., see Modelica.Media.Interfaces.Types (ThermofluidStream.Media.myMedia.Interfaces.Types). Currently, the change was applied in the opposite direction, i.e. Medium.* was replaced by SI.*.

Comment thread ThermofluidStream/Boundaries/Internal/PartialTank.mo Outdated
Comment thread ThermofluidStream/Boundaries/Internal/PartialTank.mo Outdated
Comment thread ThermofluidStream/Boundaries/Internal/PartialTank.mo Outdated
Comment thread ThermofluidStream/Boundaries/Internal/PartialTank.mo Outdated
Comment thread ThermofluidStream/Boundaries/Internal/PartialTank.mo Outdated
Comment thread ThermofluidStream/Boundaries/Internal/PartialTank.mo Outdated
Comment thread ThermofluidStream/FlowControl/Internal/PartialValve.mo Outdated
Comment thread ThermofluidStream/Processes/Internal/FlowResistance/partialPressureLoss.mo Outdated
Comment thread ThermofluidStream/Processes/Internal/PartialConductionElement.mo Outdated
Comment thread ThermofluidStream/Processes/Internal/PartialConductionElement.mo Outdated
input SI.Density rho "Inlet density";
input SI.DynamicViscosity mu "Dynamic viscosity";
input Real Re1 "Lower boundary Re for laminar-turbulent transition regime";
input Real Re2 "Upper boundary Re for laminar-turbulent transition regime";
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
input Real Re2 "Upper boundary Re for laminar-turbulent transition regime";
input SI.ReynoldsNumber Re2 "Upper boundary Re for laminar-turbulent transition regime";

SI.AbsolutePressure p_branching "Total pressure branching inlet";
SI.AbsolutePressure p[2] = {p_straight, p_branching} "Total pressure inlets [straight branching]";

SI.Pressure dq_straight "Dynamic pressure difference straight inlet - outlet";
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
SI.Pressure dq_straight "Dynamic pressure difference straight inlet - outlet";
SI.PressureDifference dq_straight "Dynamic pressure difference straight inlet - outlet";

tobiasreischl and others added 25 commits March 9, 2026 10:30
Co-authored-by: RaphaelGebhart <159274394+RaphaelGebhart@users.noreply.github.com>
…directed.mo

Co-authored-by: RaphaelGebhart <159274394+RaphaelGebhart@users.noreply.github.com>
Co-authored-by: RaphaelGebhart <159274394+RaphaelGebhart@users.noreply.github.com>
Co-authored-by: RaphaelGebhart <159274394+RaphaelGebhart@users.noreply.github.com>
Co-authored-by: RaphaelGebhart <159274394+RaphaelGebhart@users.noreply.github.com>
Co-authored-by: RaphaelGebhart <159274394+RaphaelGebhart@users.noreply.github.com>
Co-authored-by: RaphaelGebhart <159274394+RaphaelGebhart@users.noreply.github.com>
…bulentPressureLossHaaland.mo

Co-authored-by: RaphaelGebhart <159274394+RaphaelGebhart@users.noreply.github.com>
…bulentPressureLossHaaland.mo

Co-authored-by: RaphaelGebhart <159274394+RaphaelGebhart@users.noreply.github.com>
…ssureLoss.mo

Co-authored-by: RaphaelGebhart <159274394+RaphaelGebhart@users.noreply.github.com>
Co-authored-by: RaphaelGebhart <159274394+RaphaelGebhart@users.noreply.github.com>
Co-authored-by: RaphaelGebhart <159274394+RaphaelGebhart@users.noreply.github.com>
…lities/DarcyFriction.mo

Co-authored-by: RaphaelGebhart <159274394+RaphaelGebhart@users.noreply.github.com>
…unctionY.mo

Co-authored-by: RaphaelGebhart <159274394+RaphaelGebhart@users.noreply.github.com>
Co-authored-by: RaphaelGebhart <159274394+RaphaelGebhart@users.noreply.github.com>
…directed.mo

Co-authored-by: RaphaelGebhart <159274394+RaphaelGebhart@users.noreply.github.com>
…directed.mo

Co-authored-by: RaphaelGebhart <159274394+RaphaelGebhart@users.noreply.github.com>
…directed.mo

Co-authored-by: RaphaelGebhart <159274394+RaphaelGebhart@users.noreply.github.com>
…directed.mo

Co-authored-by: RaphaelGebhart <159274394+RaphaelGebhart@users.noreply.github.com>
…directed.mo

Co-authored-by: RaphaelGebhart <159274394+RaphaelGebhart@users.noreply.github.com>
…directed.mo

Co-authored-by: RaphaelGebhart <159274394+RaphaelGebhart@users.noreply.github.com>
…directed.mo

Co-authored-by: RaphaelGebhart <159274394+RaphaelGebhart@users.noreply.github.com>
…directed.mo

Co-authored-by: RaphaelGebhart <159274394+RaphaelGebhart@users.noreply.github.com>
…directed.mo

Co-authored-by: RaphaelGebhart <159274394+RaphaelGebhart@users.noreply.github.com>
…directed.mo

Co-authored-by: RaphaelGebhart <159274394+RaphaelGebhart@users.noreply.github.com>
@CorentinLepais CorentinLepais linked an issue Mar 10, 2026 that may be closed by this pull request
> Checked with "Check" button and works fine now
@tobiasreischl
Copy link
Copy Markdown
Contributor Author

Done - final review (needed?) @RaphaelGebhart - or just merge

@RaphaelGebhart RaphaelGebhart self-requested a review March 24, 2026 09:29
@RaphaelGebhart
Copy link
Copy Markdown
Collaborator

Regression test passed (according to @tobiasreischl).

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.

Use Medium.* instead of SI.* where possible

4 participants