Skip to content

Commit

Permalink
Use SI.Mass instead of specifying 'unit'
Browse files Browse the repository at this point in the history
This is more elegant, and also similar to how it's done in Modelica.Media.Interfaces.PartialMedium.MassFlowRate:
  type MassFlowRate = SI.MassFlowRate(quantity = "MassFlowRate." + mediumName, min = -1.0e5, max = 1.e5)
  • Loading branch information
henrikt-ma committed Mar 28, 2023
1 parent b5dea8c commit d55f0bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Modelica/Media/package.mo
Expand Up @@ -2316,7 +2316,7 @@ is given to compare the approximation.
fixed=true,
stateSelect=StateSelect.prefer),
X(start={0.8,0.2}));
Real m1(unit = "kg", quantity = "Mass." + Medium1.mediumName, start=1.0);
SI.Mass m1(quantity = "Mass." + Medium1.mediumName, start=1.0);
SI.InternalEnergy U1;
Medium1.SpecificHeatCapacity cp1=Medium1.specificHeatCapacityCp(medium1.state);
Medium1.DynamicViscosity eta1=Medium1.dynamicViscosity(medium1.state);
Expand All @@ -2332,7 +2332,7 @@ is given to compare the approximation.
fixed=true,
stateSelect=StateSelect.prefer),
X(start={0.1,0.1,0.1,0.2,0.2,0.3}));
Real m2(unit = "kg", quantity = "Mass." + Medium2.mediumName, start=1.0);
SI.Mass m2(quantity = "Mass." + Medium2.mediumName, start=1.0);
SI.InternalEnergy U2;
Medium2.SpecificHeatCapacity cp2=Medium2.specificHeatCapacityCp(medium2.state);
Medium2.DynamicViscosity eta2=Medium2.dynamicViscosity(medium2.state);
Expand Down

0 comments on commit d55f0bd

Please sign in to comment.