Skip to content

Units in examples and components - #4820

Open
henrikt-ma wants to merge 2 commits into
modelica:masterfrom
henrikt-ma:units-in-examples-and-components
Open

henrikt-ma wants to merge 2 commits into
modelica:masterfrom
henrikt-ma:units-in-examples-and-components

Conversation

@henrikt-ma

Copy link
Copy Markdown
Contributor

Similar to #4819, but for a variety of small problems across many sub-libraries.

@henrikt-ma henrikt-ma added the requires Modelica 3.7 Issue that requires Modelica Language Specification 3.7 label Oct 5, 2026
@henrikt-ma
henrikt-ma requested a review from AHaumer October 5, 2026 12:44
@henrikt-ma henrikt-ma added L: Electrical.Analog Issue addresses Modelica.Electrical.Analog L: Electrical.Machines Issue addresses Modelica.Electrical.Machines L: Magnetic.FluxTubes Issue addresses Modelica.Magnetic.FluxTubes L: Mechanics.MultiBody Issue addresses Modelica.Mechanics.MultiBody L: Media Issue addresses Modelica.Media labels Oct 5, 2026
@henrikt-ma
henrikt-ma requested a review from casella October 5, 2026 12:47
@AHaumer

AHaumer commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Why is the list of possible reviewers so short?

@henrikt-ma

Copy link
Copy Markdown
Contributor Author

Why is the list of possible reviewers so short?

Is there a misunderstanding regarding currently requested reviews and from whom it is possible to request a review? I just assigned the project leaders, because I think the topic of how to address unit inconsistencies like these is bigger than any particular sub-library.

henrikt-ma and others added 2 commits October 20, 2026 22:45
- Thyristor: the control voltage ramps from 0 to 10*vAK over 1 mA of gate
  current, now written 10*vAK*(iGK-0.95*IGT)/1e-3'A'.
- DCPM_Drive: the battery resistance gives a 5 % voltage drop at 1000 A, now
  written 0.05*dcpmData.VaNominal/1000'A'.
- ShowTransferFunction: the logarithm is taken of the frequency in rad/s, now
  written log10(logFrequencySweep.y/1'rad/s').
- Surfaces: the temperature oscillates at 0.5 Hz, now written
  cos(2*Modelica.Constants.pi*0.5'Hz'*time).
- GasForce2: the fitted pressure curve is in bar, scaled with 1e5'Pa'.
- WaterIF97: the pressure and temperature ramps are written
  1e5'Pa'*(1 + time/1's') and 300'K' + 200'K/s' * time.
- ElectroMagneticConverterWithLeakageInductance: eps is a minimum current, so
  that L_stat has the same unit in both branches.

The values are unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The capacitances c2 and c4 resonate with l1 and l2 at the normalized angular
frequencies of the filter's transmission zeros, now written 1.704992'rad/s'
and 1.179945'rad/s'.  In CauerLowPassOPV and CauerLowPassSC, l1 and l2 are
capacitances standing for the inductances l1*R^2 with R = 1 Ohm, so the factor
1'Ohm2' is included.  The values are unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@beutlich
beutlich force-pushed the units-in-examples-and-components branch from 381bd89 to 04017ff Compare October 20, 2026 20:45
@AHaumer

AHaumer commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Units.pdf

IMHO units should be handled this way.

This branch has not been deployed

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

Labels

L: Electrical.Analog Issue addresses Modelica.Electrical.Analog L: Electrical.Machines Issue addresses Modelica.Electrical.Machines L: Magnetic.FluxTubes Issue addresses Modelica.Magnetic.FluxTubes L: Mechanics.MultiBody Issue addresses Modelica.Mechanics.MultiBody L: Media Issue addresses Modelica.Media requires Modelica 3.7 Issue that requires Modelica Language Specification 3.7

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants