diff -ur "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Examples/EspressoMachine.mo" "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Examples/EspressoMachine.mo"
--- "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Examples/EspressoMachine.mo"	2021-11-16 02:01:59.240483575 +0000
+++ "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Examples/EspressoMachine.mo"	2021-11-16 02:03:49.804152119 +0000
@@ -272,9 +272,8 @@
         origin={-100,-30})));
   Modelica.Blocks.Continuous.LimPID
                                 PID3(
-    Ti=3,controllerType=Modelica.Blocks.Types.SimpleController.PI,
-    initType=.Modelica.Blocks.Types.InitPID.NoInit,
-    k=100, limitsAtInit = true,
+    Ti=3,controllerType=Modelica.Blocks.Types.SimpleController.PI, initType = .Modelica.Blocks.Types.Init.NoInit,
+    k=100,
     yMax=5000,
     yMin=0,
     y_start=0)
diff -ur "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Examples/HeatPump.mo" "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Examples/HeatPump.mo"
--- "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Examples/HeatPump.mo"	2021-11-16 02:01:59.240483575 +0000
+++ "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Examples/HeatPump.mo"	2021-11-16 02:03:49.704152417 +0000
@@ -221,7 +221,7 @@
     Ti=0.3,
     yMax=1,
     yMin=0,
-    initType=Modelica.Blocks.Types.InitPID.InitialOutput,
+    initType=Modelica.Blocks.Types.Init.InitialOutput,
     y_start=1) annotation (Placement(transformation(extent={{-90,-10},{-110,10}})));
   Modelica.Blocks.Sources.Constant const(k=5) annotation (Placement(transformation(extent={{-50,-10},{-70,10}})));
   Modelica.Blocks.Continuous.LimPID PI1(
@@ -230,7 +230,7 @@
     Ti=20,
     yMax=1,
     yMin=0.0001,
-    initType=Modelica.Blocks.Types.InitPID.InitialOutput,
+    initType=Modelica.Blocks.Types.Init.InitialOutput,
     xi_start=0,
     y_start=0.0001) annotation (Placement(transformation(extent={{124,10},{104,-10}})));
   Modelica.Blocks.Sources.Step     step(
@@ -243,7 +243,7 @@
     Ti=0.5,
     yMax=10,
     yMin=-10,
-    initType=Modelica.Blocks.Types.InitPID.InitialOutput,
+    initType=Modelica.Blocks.Types.Init.InitialOutput,
     xi_start=0,
     y_start=0) annotation (Placement(transformation(extent={{82,-10},{62,10}})));
   Modelica.Mechanics.Rotational.Sources.Torque torque annotation (Placement(transformation(extent={{44,-10},{24,10}})));
diff -ur "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Examples/VaporCycle.mo" "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Examples/VaporCycle.mo"
--- "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Examples/VaporCycle.mo"	2021-11-16 02:01:59.240483575 +0000
+++ "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Examples/VaporCycle.mo"	2021-11-16 02:03:49.356153455 +0000
@@ -249,7 +249,7 @@
     Ti=3,
     yMax=-0.001,
     yMin=-38,
-    initType=Modelica.Blocks.Types.InitPID.InitialOutput,
+    initType=Modelica.Blocks.Types.Init.InitialOutput,
     y_start=-4) annotation (Placement(transformation(extent={{204,-10},{184,10}})));
   Modelica.Blocks.Math.Gain gain(k=1)
     annotation (Placement(transformation(extent={{120,-6},{108,6}})));
@@ -272,7 +272,7 @@
     Ti=0.3,
     yMax=10000,
     yMin=1,
-    initType=Modelica.Blocks.Types.InitPID.InitialOutput,
+    initType=Modelica.Blocks.Types.Init.InitialOutput,
     y_start=3000) annotation (Placement(transformation(extent={{148,10},{128,-10}})));
   Modelica.Blocks.Math.Gain gain1(k=-1)
     annotation (Placement(transformation(extent={{172,-6},{160,6}})));
diff -ur "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/FlowControl/Internal/PartialValve.mo" "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/FlowControl/Internal/PartialValve.mo"
--- "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/FlowControl/Internal/PartialValve.mo"	2021-11-16 02:01:59.240483575 +0000
+++ "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/FlowControl/Internal/PartialValve.mo"	2021-11-16 02:03:49.196153933 +0000
@@ -14,16 +14,16 @@
         origin={0,80})));
 
   Real u(unit="1") "actuation input for flow calculation";
-  parameter Modelica.SIunits.Pressure dp_ref = 1e5 "Reference pressure difference"
+  parameter Modelica.Units.SI.Pressure dp_ref = 1e5 "Reference pressure difference"
     annotation(Dialog(tab="Advanced", group = "Reference values"));
-  parameter Modelica.SIunits.Density rho_ref = 1000 "Reference density"
+  parameter Modelica.Units.SI.Density rho_ref = 1000 "Reference density"
     annotation(Dialog(tab="Advanced", group = "Reference values"));
 
 protected
   final constant Real secondsPerHour(final unit="s/h") = 3600 "Parameter for unit conversion";
 
   //Medium properties
-  Modelica.SIunits.Density rho = Medium.density(inlet.state) "Medium density at inlet";
+  Modelica.Units.SI.Density rho = Medium.density(inlet.state) "Medium density at inlet";
 
   SI.MassFlowRate m_flow_ref "Reference mass flow derived from flow coefficient inputs";
   Real k_u(unit="1") "Kv/Kvs, respecting flow characteristics";
diff -ur "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/FlowControl/SpecificValveType.mo" "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/FlowControl/SpecificValveType.mo"
--- "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/FlowControl/SpecificValveType.mo"	2021-11-16 02:01:59.240483575 +0000
+++ "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/FlowControl/SpecificValveType.mo"	2021-11-16 02:03:49.152154064 +0000
@@ -11,7 +11,7 @@
 
   parameter FlowCoeffType flowCoefficient = FlowCoeffType.Kvs "Select type of flow coefficient" annotation(Dialog(group = "Valve parameters"));
   //Set valve data as parameter
-  parameter Modelica.SIunits.Diameter d_valve "Flow diameter" annotation(Evaluate = true, Dialog(group = "Valve parameters",
+  parameter Modelica.Units.SI.Diameter d_valve "Flow diameter" annotation(Evaluate = true, Dialog(group = "Valve parameters",
   enable = (flowCoefficient == FlowCoeffType.flowDiameter)));
   //Reference Values
   parameter Real Kvs( unit = "m3/h")  "Kvs-value (metric) from data sheet (valve fully open)" annotation(Evaluate = true,
@@ -25,7 +25,7 @@
   Dialog(group = "Valve parameters",enable = (flowCoefficient ==FlowCoeffType.m_flow_set)));
 
 protected
-  Modelica.SIunits.Area A_valve = 0.25*Modelica.Constants.pi*d_valve^2 "Cross-sectional valve area";
+  Modelica.Units.SI.Area A_valve = 0.25*Modelica.Constants.pi*d_valve^2 "Cross-sectional valve area";
   constant zetaValueRecord valveData;
 
   SI.VolumeFlowRate V_flow_ref=
diff -ur "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/HeatExchangers/CounterFlowNTU.mo" "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/HeatExchangers/CounterFlowNTU.mo"
--- "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/HeatExchangers/CounterFlowNTU.mo"	2021-11-16 02:01:59.244483563 +0000
+++ "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/HeatExchangers/CounterFlowNTU.mo"	2021-11-16 02:03:49.032154421 +0000
@@ -1,4 +1,4 @@
-﻿within ThermofluidStream.HeatExchangers;
+within ThermofluidStream.HeatExchangers;
 model CounterFlowNTU "Counter flow heat exchanger using the epsilon-NTU method"
 
   replaceable package MediumA =
@@ -35,19 +35,19 @@
         rotation=180,
         origin={-110,60})));
 
-  parameter Modelica.SIunits.Area A "Conductive Surface";
+  parameter Modelica.Units.SI.Area A "Conductive Surface";
   parameter Utilities.Units.Inertance L = dropOfCommons.L "inertance of the flow"
     annotation(Dialog(tab="Advanced"));
-  parameter Modelica.SIunits.CoefficientOfHeatTransfer k_NTU = 50 "overall heat transfer coefficient";
-  parameter Modelica.SIunits.MassFlowRate m_flow_reg = dropOfCommons.m_flow_reg "nominal mass flow for regularisation"
+  parameter Modelica.Units.SI.CoefficientOfHeatTransfer k_NTU = 50 "overall heat transfer coefficient";
+  parameter Modelica.Units.SI.MassFlowRate m_flow_reg = dropOfCommons.m_flow_reg "nominal mass flow for regularisation"
     annotation(Dialog(tab = "Advanced", group = "Regularisation parameters"));
-  parameter Modelica.SIunits.Time TC = 0.01 "time constant for dh"
+  parameter Modelica.Units.SI.Time TC = 0.01 "time constant for dh"
     annotation(Dialog(tab="Advanced"));
 
-  Modelica.SIunits.TemperatureDifference Delta_T_max "Maximum Temperature Difference";
+  Modelica.Units.SI.TemperatureDifference Delta_T_max "Maximum Temperature Difference";
 
-  Modelica.SIunits.SpecificEnthalpy dh_A "Enthalpy difference Medium A";
-  Modelica.SIunits.SpecificEnthalpy dh_B "Enthalpy difference Medium B";
+  Modelica.Units.SI.SpecificEnthalpy dh_A "Enthalpy difference Medium A";
+  Modelica.Units.SI.SpecificEnthalpy dh_B "Enthalpy difference Medium B";
 
   SI.HeatFlowRate q_flow "actual heat flow rate";
   Real effectiveness(unit="1") "effectiveness derived from NTU correlation";
@@ -60,17 +60,17 @@
 protected
   outer DropOfCommons dropOfCommons;
 
-  Modelica.SIunits.Pressure p_A = MediumA.pressure(inletA.state);
-  Modelica.SIunits.Pressure p_B = MediumB.pressure(inletB.state);
+  Modelica.Units.SI.Pressure p_A = MediumA.pressure(inletA.state);
+  Modelica.Units.SI.Pressure p_B = MediumB.pressure(inletB.state);
 
   MediumA.MassFraction Xi_A[MediumA.nXi] = MediumA.massFraction(inletA.state);
   MediumB.MassFraction Xi_B[MediumB.nXi] = MediumB.massFraction(inletB.state);
 
   //In- and outlet enthalpies and enthalpy differences
-  Modelica.SIunits.SpecificEnthalpy h_in_A "Enthalpy at inlet A";
-  Modelica.SIunits.SpecificEnthalpy h_in_B "Enthalpy at Inlet B";
-  Modelica.SIunits.SpecificEnthalpy h_out_A "Enthalpy at inlet A";
-  Modelica.SIunits.SpecificEnthalpy h_out_B "Enthalpy at Inlet B";
+  Modelica.Units.SI.SpecificEnthalpy h_in_A "Enthalpy at inlet A";
+  Modelica.Units.SI.SpecificEnthalpy h_in_B "Enthalpy at Inlet B";
+  Modelica.Units.SI.SpecificEnthalpy h_out_A "Enthalpy at inlet A";
+  Modelica.Units.SI.SpecificEnthalpy h_out_B "Enthalpy at Inlet B";
 
   SI.HeatFlowRate q_max "Maximum heat flow rate";
   SI.HeatFlowRate q_flowA "Heat flow rate side A";
@@ -82,11 +82,11 @@
   Real C_max(unit="J/(K.s)") "maximum heat capacity rate";
   Real C_r(unit="1") "Cmin/Cmax (ratio of heat capacity rates)";
 
-  Modelica.SIunits.SpecificHeatCapacityAtConstantPressure cp_A "specific heat capacity of Medium A";
-  Modelica.SIunits.SpecificHeatCapacityAtConstantPressure cp_B "specific heat capacity of Medium B";
+  Modelica.Units.SI.SpecificHeatCapacityAtConstantPressure cp_A "specific heat capacity of Medium A";
+  Modelica.Units.SI.SpecificHeatCapacityAtConstantPressure cp_B "specific heat capacity of Medium B";
 
-  Modelica.SIunits.MassFlowRate m_flow_A = inletA.m_flow "Mass flow on side A";
-  Modelica.SIunits.MassFlowRate m_flow_B = inletB.m_flow "Mass flow on side B";
+  Modelica.Units.SI.MassFlowRate m_flow_A = inletA.m_flow "Mass flow on side A";
+  Modelica.Units.SI.MassFlowRate m_flow_B = inletB.m_flow "Mass flow on side B";
 
   SI.SpecificHeatCapacity cpA_in = MediumA.specificHeatCapacityCp(inletA.state);
   SI.SpecificHeatCapacity cpA_out = MediumA.specificHeatCapacityCp(outletA.state);
diff -ur "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/HeatExchangers/CrossFlowNTU.mo" "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/HeatExchangers/CrossFlowNTU.mo"
--- "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/HeatExchangers/CrossFlowNTU.mo"	2021-11-16 02:01:59.244483563 +0000
+++ "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/HeatExchangers/CrossFlowNTU.mo"	2021-11-16 02:03:49.004154506 +0000
@@ -1,4 +1,4 @@
-﻿within ThermofluidStream.HeatExchangers;
+within ThermofluidStream.HeatExchangers;
 model CrossFlowNTU "Cross flow heat exchanger using the epsilon-NTU method"
 
   replaceable package MediumA =
@@ -8,13 +8,13 @@
       ThermofluidStream.Media.myMedia.Interfaces.PartialMedium
     "Medium model" annotation (choicesAllMatching=true);
 
-  parameter Modelica.SIunits.Area A "Conductive Surface";
+  parameter Modelica.Units.SI.Area A "Conductive Surface";
   parameter Utilities.Units.Inertance L = dropOfCommons.L "inertance of the flow"
     annotation(Dialog(tab="Advanced"));
-  parameter Modelica.SIunits.CoefficientOfHeatTransfer k_NTU = 50 "overall heat transfer coefficient";
-  parameter Modelica.SIunits.MassFlowRate m_flow_reg = dropOfCommons.m_flow_reg "nominal mass flow for regularisation"
+  parameter Modelica.Units.SI.CoefficientOfHeatTransfer k_NTU = 50 "overall heat transfer coefficient";
+  parameter Modelica.Units.SI.MassFlowRate m_flow_reg = dropOfCommons.m_flow_reg "nominal mass flow for regularisation"
     annotation(Dialog(tab = "Advanced", group = "Regularisation parameters"));
-  parameter Modelica.SIunits.Time TC = 0.01 "time constant for dh"
+  parameter Modelica.Units.SI.Time TC = 0.01 "time constant for dh"
     annotation(Dialog(tab="Advanced"));
 
   ThermofluidStream.Interfaces.Inlet inletA(redeclare package Medium = MediumA)
@@ -42,33 +42,33 @@
         rotation=270,
         origin={0,-100})));
 
-  Modelica.SIunits.TemperatureDifference Delta_T_max "Maximum Temperature Difference";
+  Modelica.Units.SI.TemperatureDifference Delta_T_max "Maximum Temperature Difference";
 
-  Modelica.SIunits.SpecificEnthalpy dh_A "Enthalpy difference Medium A";
-  Modelica.SIunits.SpecificEnthalpy dh_B "Enthalpy difference Medium B";
+  Modelica.Units.SI.SpecificEnthalpy dh_A "Enthalpy difference Medium A";
+  Modelica.Units.SI.SpecificEnthalpy dh_B "Enthalpy difference Medium B";
 
   SI.HeatFlowRate q_flow "actual heat flow rate";
   Real effectiveness(unit="1") "effectiveness derived from NTU correlation";
   Real NTU(unit="1") "Number of Transfer Units";
 
   //In- and outlet temperatures
-  Modelica.SIunits.Temperature T_in_MediumA "Inlet temperature of Medium A";
-  Modelica.SIunits.Temperature T_in_MediumB "Inlet temperature of Medium B";
+  Modelica.Units.SI.Temperature T_in_MediumA "Inlet temperature of Medium A";
+  Modelica.Units.SI.Temperature T_in_MediumB "Inlet temperature of Medium B";
 
 protected
   outer DropOfCommons dropOfCommons;
 
-  Modelica.SIunits.Pressure p_A = MediumA.pressure(inletA.state);
-  Modelica.SIunits.Pressure p_B = MediumB.pressure(inletB.state);
+  Modelica.Units.SI.Pressure p_A = MediumA.pressure(inletA.state);
+  Modelica.Units.SI.Pressure p_B = MediumB.pressure(inletB.state);
 
   MediumA.MassFraction Xi_A[MediumA.nXi] = MediumA.massFraction(inletA.state);
   MediumB.MassFraction Xi_B[MediumB.nXi] = MediumB.massFraction(inletB.state);
 
   //In- and outlet enthalpies and enthalpy differences
-  Modelica.SIunits.SpecificEnthalpy h_in_A "Enthalpy at inlet A";
-  Modelica.SIunits.SpecificEnthalpy h_in_B "Enthalpy at Inlet B";
-  Modelica.SIunits.SpecificEnthalpy h_out_A "Enthalpy at inlet A";
-  Modelica.SIunits.SpecificEnthalpy h_out_B "Enthalpy at Inlet B";
+  Modelica.Units.SI.SpecificEnthalpy h_in_A "Enthalpy at inlet A";
+  Modelica.Units.SI.SpecificEnthalpy h_in_B "Enthalpy at Inlet B";
+  Modelica.Units.SI.SpecificEnthalpy h_out_A "Enthalpy at inlet A";
+  Modelica.Units.SI.SpecificEnthalpy h_out_B "Enthalpy at Inlet B";
 
   SI.HeatFlowRate q_max "Maximum heat flow rate";
   SI.HeatFlowRate q_flowA "Heat flow rate side A";
@@ -80,11 +80,11 @@
   Real C_max(unit="J/(K.s)") "maximum heat capacity rate";
   Real C_r(unit="1") "Cmin/Cmax (ratio of heat capacity rates)";
 
-  Modelica.SIunits.SpecificHeatCapacityAtConstantPressure cp_A "specific heat capacity of Medium A";
-  Modelica.SIunits.SpecificHeatCapacityAtConstantPressure cp_B "specific heat capacity of Medium B";
+  Modelica.Units.SI.SpecificHeatCapacityAtConstantPressure cp_A "specific heat capacity of Medium A";
+  Modelica.Units.SI.SpecificHeatCapacityAtConstantPressure cp_B "specific heat capacity of Medium B";
 
-  Modelica.SIunits.MassFlowRate m_flow_A = inletA.m_flow "Mass flow on side A";
-  Modelica.SIunits.MassFlowRate m_flow_B = inletB.m_flow "Mass flow on side B";
+  Modelica.Units.SI.MassFlowRate m_flow_A = inletA.m_flow "Mass flow on side A";
+  Modelica.Units.SI.MassFlowRate m_flow_B = inletB.m_flow "Mass flow on side B";
 
   SI.SpecificHeatCapacity cpA_in = MediumA.specificHeatCapacityCp(inletA.state);
   SI.SpecificHeatCapacity cpA_out = MediumA.specificHeatCapacityCp(outletA.state);
diff -ur "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/HeatExchangers/DiscretizedHEX.mo" "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/HeatExchangers/DiscretizedHEX.mo"
--- "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/HeatExchangers/DiscretizedHEX.mo"	2021-11-16 02:01:59.244483563 +0000
+++ "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/HeatExchangers/DiscretizedHEX.mo"	2021-11-16 02:03:48.956154648 +0000
@@ -1,4 +1,4 @@
-﻿within ThermofluidStream.HeatExchangers;
+within ThermofluidStream.HeatExchangers;
 model DiscretizedHEX "Discretized Heat Exchanger for two-phase working fluid"
 
   replaceable package MediumAir =
@@ -16,8 +16,8 @@
   parameter Boolean initializeMassFlow=false  "Initialize mass flow at inlets?" annotation(Dialog(tab = "Initialization", group = "Mass flow"));
   parameter SI.MassFlowRate m_flow_0 = 0.01 "Initial mass flow" annotation(Dialog(tab = "Initialization", group = "Mass flow", enable = initializeMassFlow));
   parameter Integer nCells = 3 "Number of discretization elements";
-  parameter Modelica.SIunits.Area A = 10 "Conductive area of heat exchanger" annotation(Dialog(group = "Heat transfer parameters"));
-  parameter Modelica.SIunits.Volume V_Hex = 0.001 "Volume for heat transfer calculation" annotation(Dialog(group = "Heat transfer parameters"));
+  parameter Modelica.Units.SI.Area A = 10 "Conductive area of heat exchanger" annotation(Dialog(group = "Heat transfer parameters"));
+  parameter Modelica.Units.SI.Volume V_Hex = 0.001 "Volume for heat transfer calculation" annotation(Dialog(group = "Heat transfer parameters"));
   parameter SI.CoefficientOfHeatTransfer U_nom = 3000 "Nominal coefficient of heat transfer for single-phase side" annotation(Dialog(group = "Heat transfer parameters"));
   parameter SI.CoefficientOfHeatTransfer U_liq_nom = 700 "Nominal coefficient of heat transfer for liquid region" annotation(Dialog(group = "Heat transfer parameters"));
   parameter SI.CoefficientOfHeatTransfer U_vap_nom = 500 "Nominal coefficient of heat transfer for vapour region" annotation(Dialog(group = "Heat transfer parameters"));
@@ -30,9 +30,9 @@
     annotation(Dialog(tab="Advanced"));
 
   //Parameterization of HEX Wall
-  parameter Modelica.SIunits.CoefficientOfHeatTransfer k_wall = 100 "Coefficient of heat transfer for pipe wall" annotation(Dialog(group = "Wall parameters"));
+  parameter Modelica.Units.SI.CoefficientOfHeatTransfer k_wall = 100 "Coefficient of heat transfer for pipe wall" annotation(Dialog(group = "Wall parameters"));
 protected
-  parameter Modelica.SIunits.ThermalConductance G = k_wall*A "Wall thermal conductance" annotation(Dialog(group = "Wall parameters"));
+  parameter Modelica.Units.SI.ThermalConductance G = k_wall*A "Wall thermal conductance" annotation(Dialog(group = "Wall parameters"));
 
 
 public
@@ -92,7 +92,6 @@
   if initializeMassFlow then
    inletRef.m_flow = m_flow_0;
    inletAir.m_flow = m_flow_0;
-  else
   end if;
 
 equation
diff -ur "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Media/XRGMedia.mo" "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Media/XRGMedia.mo"
--- "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Media/XRGMedia.mo"	2021-11-16 02:01:59.252483538 +0000
+++ "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Media/XRGMedia.mo"	2021-11-16 02:03:48.648155568 +0000
@@ -9,7 +9,7 @@
     record HelmholtzDerivs
       "derivatives of dimensionless Helmholtz-function w.r.t. dimensionless pressuredensity and temperature"
       extends Modelica.Icons.Record;
-      import SI = Modelica.SIunits;
+      import Modelica.Units.SI;
       SI.Density d "density";
       SI.Temperature T "temperature";
       SI.SpecificHeatCapacity R "specific heat capacity";
@@ -28,14 +28,14 @@
       "thermodynamic base properties on the phase boundary"
       extends Modelica.Icons.Record;
 
-      Modelica.SIunits.Density d "density";
-      Modelica.SIunits.SpecificEnthalpy h "enthalpy";
-      Modelica.SIunits.SpecificEnergy u "inner energy";
-      Modelica.SIunits.SpecificEntropy s "entropy";
-      Modelica.SIunits.SpecificHeatCapacity cp "heat capacity at constant pressure";
-      Modelica.SIunits.SpecificHeatCapacity cv "heat capacity at constant volume";
-      Modelica.SIunits.IsothermalCompressibility kappa "isentropic exponent";
-      Modelica.SIunits.Velocity a "velocity of sound";
+      Modelica.Units.SI.Density d "density";
+      Modelica.Units.SI.SpecificEnthalpy h "enthalpy";
+      Modelica.Units.SI.SpecificEnergy u "inner energy";
+      Modelica.Units.SI.SpecificEntropy s "entropy";
+      Modelica.Units.SI.SpecificHeatCapacity cp "heat capacity at constant pressure";
+      Modelica.Units.SI.SpecificHeatCapacity cv "heat capacity at constant volume";
+      Modelica.Units.SI.IsothermalCompressibility kappa "isentropic exponent";
+      Modelica.Units.SI.Velocity a "velocity of sound";
       Modelica.Media.Interfaces.Types.IsobaricExpansionCoefficient beta
         "isobaric expansion coefficient";
       Modelica.Media.Interfaces.Types.IsentropicExponent gamma
@@ -47,7 +47,7 @@
 
     record NewtonDerivatives_pT
       "Derivatives for fast inverse calculations of Helmholtz functions:p & T"
-      import SI = Modelica.SIunits;
+      import Modelica.Units.SI;
       extends Modelica.Icons.Record;
       SI.Pressure p "Pressure";
       SI.DerPressureByDensity pd "Derivative of pressure w.r.t. density";
@@ -57,7 +57,7 @@
       "derivatives for fast inverse calculations of Helmholtz functions: p & h"
 
       extends Modelica.Icons.Record;
-      import SI = Modelica.SIunits;
+      import Modelica.Units.SI;
       SI.Pressure p "pressure";
       SI.SpecificEnthalpy h "specific enthalpy";
       Real pd "derivative of pressure w.r.t. density";
@@ -72,7 +72,7 @@
       "derivatives for fast inverse calculation of Helmholtz functions: p & s"
 
       extends Modelica.Icons.Record;
-      import SI = Modelica.SIunits;
+      import Modelica.Units.SI;
       SI.Pressure p "pressure";
       SI.SpecificEntropy s "specific entropy";
       Real pd "derivative of pressure w.r.t. density";
@@ -88,11 +88,11 @@
       extends Modelica.Icons.Record;
 
       Integer phase "number of phases";
-      Modelica.SIunits.Pressure p "pressure";
-      Modelica.SIunits.Temperature T "kelvin-temperature";
-      Modelica.SIunits.Density rho "density";
-      Modelica.SIunits.SpecificEnthalpy h "specific enthalpy";
-      Modelica.SIunits.SpecificHeatCapacity cv
+      Modelica.Units.SI.Pressure p "pressure";
+      Modelica.Units.SI.Temperature T "kelvin-temperature";
+      Modelica.Units.SI.Density rho "density";
+      Modelica.Units.SI.SpecificEnthalpy h "specific enthalpy";
+      Modelica.Units.SI.SpecificHeatCapacity cv
         "specific heat capacity at constant volume";
       Real pt "derivative of pressure wrt temperature";
       Real pd "derivative of pressure wrt density";
@@ -154,7 +154,7 @@
       "compute isochoric specific heat capacity inside the two-phase region"
       extends Modelica.Icons.Function;
 
-      import SI = Modelica.SIunits;
+      import Modelica.Units.SI;
       input PhaseBoundaryProperties liq "properties on the boiling curve";
       input PhaseBoundaryProperties vap "properties on the condensation curve";
       input SI.MassFraction x "vapour mass fraction";
@@ -215,7 +215,7 @@
     function Helmholtz_ph
       "function to calculate analytic derivatives for computing d and t given p and h"
       extends Modelica.Icons.Function;
-      import SI = Modelica.SIunits;
+      import Modelica.Units.SI;
       input HelmholtzDerivs f "dimensionless derivatives of Helmholtz function";
       output NewtonDerivatives_ph nderivs
         "derivatives for Newton iteration to calculate d and t from p and h";
@@ -236,7 +236,7 @@
       "function to calculate analytic derivatives for computing d and t given p and s"
 
       extends Modelica.Icons.Function;
-      import SI = Modelica.SIunits;
+      import Modelica.Units.SI;
       input HelmholtzDerivs f "dimensionless derivatives of Helmholtz function";
       output NewtonDerivatives_ps nderivs
         "derivatives for Newton iteration to compute d and t from p and s";
@@ -257,7 +257,7 @@
       "calulate phase boundary property record from dimensionless Helmholtz function"
 
       extends Modelica.Icons.Function;
-      import SI = Modelica.SIunits;
+      import Modelica.Units.SI;
       input HelmholtzDerivs f "dimensionless derivatives of Helmholtz function";
       output PhaseBoundaryProperties sat "phase boundary property record";
     protected
@@ -402,8 +402,8 @@
     protected
      SaturationProperties sat(psat=p, Tsat=0)
       "saturation temperature and pressure";
-     Modelica.SIunits.SpecificEnthalpy hl=bubbleEnthalpy(sat) "liquid enthalpy";
-     Modelica.SIunits.SpecificEnthalpy hv=dewEnthalpy(sat) "vapor enthalpy";
+     Modelica.Units.SI.SpecificEnthalpy hl=bubbleEnthalpy(sat) "liquid enthalpy";
+     Modelica.Units.SI.SpecificEnthalpy hv=dewEnthalpy(sat) "vapor enthalpy";
 
     algorithm
     state.p :=p;
@@ -436,10 +436,10 @@
       "set state for density and temperature (X not used since single substance)"
     protected
        Common.HelmholtzDerivs f "helmholtz derivatives";
-       Modelica.SIunits.SpecificHeatCapacity R "specific gas constant";
+       Modelica.Units.SI.SpecificHeatCapacity R "specific gas constant";
        SaturationProperties sat "saturation temperature and pressure";
-       Modelica.SIunits.Density dl "liquid density";
-       Modelica.SIunits.Density dv "vapor density";
+       Modelica.Units.SI.Density dl "liquid density";
+       Modelica.Units.SI.Density dv "vapor density";
 
     algorithm
        R := R134aData.R;
@@ -491,8 +491,8 @@
     "set state for pressure and specific entropy (X not used since single substance)"
 
     protected
-      Modelica.SIunits.Pressure delp=1e-2 "iteration accuracy for pressure";
-      Modelica.SIunits.SpecificEntropy dels=1e-1 "iteration accuracy for entropy";
+      Modelica.Units.SI.Pressure delp=1e-2 "iteration accuracy for pressure";
+      Modelica.Units.SI.SpecificEntropy dels=1e-1 "iteration accuracy for entropy";
       Integer error "if newton iteration fails (too many calls)";
       Common.HelmholtzDerivs f "helmholtz derivatives";
       SaturationProperties sat "saturation temperature and pressure";
@@ -749,7 +749,7 @@
       SaturationProperties sat "saturation temperature and pressure";
       Common.PhaseBoundaryProperties vap "properties on vapor phase boundary";
 
-      Modelica.SIunits.MassFraction x "vapor quality";
+      Modelica.Units.SI.MassFraction x "vapor quality";
 
     algorithm
       if getPhase_ph(state.p, state.h)==2 then
@@ -835,7 +835,7 @@
       "time derivative of saturation temperature in two-phase region"
       extends Modelica.Icons.Function;
 
-      input Modelica.SIunits.AbsolutePressure p "pressure";
+      input Modelica.Units.SI.AbsolutePressure p "pressure";
       input Real der_p "time derivative of pressure";
       output Real der_Tsat "time derivative of saturation temperature";
     protected
@@ -1506,7 +1506,7 @@
       SaturationProperties sat "saturation temperature and pressure";
       Common.PhaseBoundaryProperties vap "properties on vapor phase boundary";
 
-      Modelica.SIunits.MassFraction x "vapor quality";
+      Modelica.Units.SI.MassFraction x "vapor quality";
 
     algorithm
       if getPhase_ph(state.p, state.h)==2 then
@@ -1538,8 +1538,8 @@
       Real omega "collision integral";
 
       constant Real K=0.021357 "Constant for low density term eta_star";
-      constant Modelica.SIunits.Length sigma=0.50647e-09 "Hard-sphere diameter";
-      constant Modelica.SIunits.Temperature epsilon_k=288.82 "empirical factor";
+      constant Modelica.Units.SI.Length sigma=0.50647e-09 "Hard-sphere diameter";
+      constant Modelica.Units.SI.Temperature epsilon_k=288.82 "empirical factor";
       constant Real a[5]={2.218816e-01,-5.079322e-01,1.285776e-01,-8.328165e-02,-2.713173e-02}
       "Coefficients for term of collision integral";
       constant Real b[13]={-1.7999496,4.6692621e+01,-5.3460794e+02,3.3604074e+03,
@@ -1599,26 +1599,26 @@
     protected
       Common.HelmholtzDerivs f "helmholtz derivatives";
       Common.HelmholtzDerivs f_ref "helmholtz derivatives for reference state";
-      Modelica.SIunits.ThermalConductivity lambda_dg
+      Modelica.Units.SI.ThermalConductivity lambda_dg
       "dilute gas contribution to lambda";
       R134aData.CoeffsThermalConductivity coeff "coefficients of thermal conductivity model";
-      Modelica.SIunits.ThermalConductivity lambda_reduced "reduced lambda";
-      Modelica.SIunits.ThermalConductivity lambda_crit
+      Modelica.Units.SI.ThermalConductivity lambda_reduced "reduced lambda";
+      Modelica.Units.SI.ThermalConductivity lambda_crit
       "enhancement of lambda in the critical region";
-      Modelica.SIunits.ThermalConductivity chi_star "correlation length";
-      Modelica.SIunits.ThermalConductivity chi_star_ref "correlation length";
-      Modelica.SIunits.ThermalConductivity delta_chi "chi_star - chi_star_ref";
+      Modelica.Units.SI.ThermalConductivity chi_star "correlation length";
+      Modelica.Units.SI.ThermalConductivity chi_star_ref "correlation length";
+      Modelica.Units.SI.ThermalConductivity delta_chi "chi_star - chi_star_ref";
       Real rho_molar "molar density [mol/l]";
       Real dddp "derivative of density w.r.t. pressure";
       Real dddp_ref "derivative of density w.r.t. pressure for reference state";
-      Modelica.SIunits.Length xi "correlation length";
-      Modelica.SIunits.SpecificHeatCapacity cp
+      Modelica.Units.SI.Length xi "correlation length";
+      Modelica.Units.SI.SpecificHeatCapacity cp
       "specific heat capacity at constant pressure";
-      Modelica.SIunits.SpecificHeatCapacity cv
+      Modelica.Units.SI.SpecificHeatCapacity cv
       "specific heat capacity at constant volume";
-      Modelica.SIunits.DynamicViscosity eta "dynamic viscosity";
-      Modelica.SIunits.ThermalConductivity omega "crossover function";
-      Modelica.SIunits.ThermalConductivity omega_0 "crossover function";
+      Modelica.Units.SI.DynamicViscosity eta "dynamic viscosity";
+      Modelica.Units.SI.ThermalConductivity omega "crossover function";
+      Modelica.Units.SI.ThermalConductivity omega_0 "crossover function";
 
     algorithm
       f:= f_R134a(state.d, state.T);
@@ -1681,7 +1681,7 @@
     protected
       Real tau "reduced temperatur";
       R134aData.CoeffsSurfaceTension coeff "polynomial coefficients";
-      Modelica.SIunits.Temperature Tc=374.21 "critical temperature";
+      Modelica.Units.SI.Temperature Tc=374.21 "critical temperature";
 
     algorithm
       if sat.Tsat > Tc then
@@ -1947,12 +1947,12 @@
     protected
       SaturationProperties sat(psat=p, Tsat=0)
         "saturation temperature and pressure";
-      Modelica.SIunits.Pressure delp=1.0e-2 "relative error in p in iteration";
-      Modelica.SIunits.SpecificEnthalpy delh=1.0e-2
+      Modelica.Units.SI.Pressure delp=1.0e-2 "relative error in p in iteration";
+      Modelica.Units.SI.SpecificEnthalpy delh=1.0e-2
         "relative error in h in iteration";
-      Modelica.SIunits.SpecificEnthalpy hvapor=
+      Modelica.Units.SI.SpecificEnthalpy hvapor=
           dewEnthalpy(sat=sat) "vapor enthalpy";
-      Modelica.SIunits.SpecificEnthalpy hliquid=
+      Modelica.Units.SI.SpecificEnthalpy hliquid=
           bubbleEnthalpy(sat=sat) "liquid enthalpy";
       Integer error "iteration error";
       Real x "vapor quality";
@@ -2008,7 +2008,7 @@
       constant Real dv_coef[:, 4]=XRGMedia.R134aData.dvcoef
         "coefficients of cubic spline for rho_vap(p)";
 
-      Modelica.SIunits.SpecificEnthalpy hl "liquid enthalpy";
+      Modelica.Units.SI.SpecificEnthalpy hl "liquid enthalpy";
       Boolean liquid "is liquid";
       Boolean supercritical "is supercritcal";
       Integer int "interval number";
@@ -2330,9 +2330,9 @@
 
     protected
      SaturationProperties sat(psat=p, Tsat=0) "saturation temperature and pressure";
-     Modelica.SIunits.SpecificEnthalpy hl=bubbleEnthalpy(sat) "liquid enthalpy";
-     Modelica.SIunits.SpecificEnthalpy hv=dewEnthalpy(sat) "vapor enthalpy";
 
+     Modelica.Units.SI.SpecificEnthalpy hl=bubbleEnthalpy(sat) "liquid enthalpy";
+     Modelica.Units.SI.SpecificEnthalpy hv=dewEnthalpy(sat) "vapor enthalpy";
     algorithm
     phase := if ((h < hl) or (h > hv) or (p > R134aData.data.FPCRIT)) then 1 else 2;
 
@@ -2351,9 +2351,9 @@
 
     protected
      SaturationProperties sat(psat=p, Tsat=0) "saturation temperature and pressure";
-     Modelica.SIunits.SpecificEntropy sl=bubbleEntropy(sat) "liquid entropy";
-     Modelica.SIunits.SpecificEntropy sv=dewEntropy(sat) "vapor entropy";
 
+     Modelica.Units.SI.SpecificEntropy sl=bubbleEntropy(sat) "liquid entropy";
+     Modelica.Units.SI.SpecificEntropy sv=dewEntropy(sat) "vapor entropy";
     algorithm
     phase := if ((s < sl) or (s > sv) or (p > R134aData.data.FPCRIT)) then 1 else 2;
 
@@ -2373,11 +2373,11 @@
 
     protected
       SaturationProperties sat "saturation temperature and pressure";
-      Modelica.SIunits.MassFraction x "vapor quality";
-      Modelica.SIunits.SpecificEntropy sl "liquid entropy";
-      Modelica.SIunits.SpecificEntropy sv "vapor entropy";
-      Modelica.SIunits.SpecificEnthalpy hl "liquid enthalpy";
-      Modelica.SIunits.SpecificEnthalpy hv "vapor enthalpy";
+      Modelica.Units.SI.MassFraction x "vapor quality";
+      Modelica.Units.SI.SpecificEntropy sl "liquid entropy";
+      Modelica.Units.SI.SpecificEntropy sv "vapor entropy";
+      Modelica.Units.SI.SpecificEnthalpy hl "liquid enthalpy";
+      Modelica.Units.SI.SpecificEnthalpy hv "vapor enthalpy";
     algorithm
       sat.psat := p;
       // dummy
@@ -2465,8 +2465,8 @@
 
       output Common.PhaseBoundaryProperties liq "properties on liquid boundary phase";
     protected
-      Modelica.SIunits.Temperature T_liq "liquid temperature";
-      Modelica.SIunits.Density d_liq "liquid density";
+      Modelica.Units.SI.Temperature T_liq "liquid temperature";
+      Modelica.Units.SI.Density d_liq "liquid density";
       Common.HelmholtzDerivs f "helmholtz derivatives";
     algorithm
       if T < R134aData.data.TCRIT then
@@ -2490,8 +2490,8 @@
 
       output Common.PhaseBoundaryProperties vap "properties on vapor boundary phase";
     protected
-      Modelica.SIunits.Temperature T_vap "vapor temperature";
-      Modelica.SIunits.Density d_vap "vapor density";
+      Modelica.Units.SI.Temperature T_vap "vapor temperature";
+      Modelica.Units.SI.Density d_vap "vapor density";
       Common.HelmholtzDerivs f "helmholtz derivatives";
     algorithm
       if T < R134aData.data.TCRIT then
@@ -2533,10 +2533,10 @@
     function rho_props_ph "density as function of pressure and specific enthalpy"
       extends Modelica.Icons.Function;
 
-      input Modelica.SIunits.Pressure p "pressure";
-      input Modelica.SIunits.SpecificEnthalpy h "specific enthalpy";
+      input Modelica.Units.SI.Pressure p "pressure";
+      input Modelica.Units.SI.SpecificEnthalpy h "specific enthalpy";
       input Common.InverseDerivatives_rhoT derivs "record for the calculation of rho_ph_der";
-      output Modelica.SIunits.Density d "density";
+      output Modelica.Units.SI.Density d "density";
     algorithm
       d := derivs.rho;
 
@@ -2770,10 +2770,10 @@
   end R134a_ph;
 
   package R134aData "R134a data required by package R134a_ph"
-  import Modelica.SIunits;
+  import Modelica.Units.SI;
 
     extends Modelica.Icons.Package;
-    constant SIunits.SpecificHeatCapacity R=data.R;
+    constant SI.SpecificHeatCapacity R=data.R;
     constant Integer Npoints=478;
     constant Integer Ninterval=Npoints - 1;
     constant Real[Npoints] pbreaks={9.597762848258994e-005, 9.869357747732370e-005, 1.010264375639950e-004, 1.065169584583328e-004, 1.123059413359126e-004, 1.184094248412308e-004, 1.248446933924201e-004, 1.316297064467259e-004, 1.387835295300911e-004, 1.463261079761978e-004, 1.542786111807819e-004, 1.626631846135783e-004, 1.715035062398977e-004, 1.808243694992149e-004, 1.906517107583061e-004, 2.010132485287069e-004, 2.119377912202213e-004, 2.234561174702443e-004, 2.356004528862385e-004, 2.484047512716141e-004, 2.616284653191377e-004, 2.747881183685521e-004, 2.885158790807569e-004, 3.028318826616158e-004, 3.177568016040576e-004, 3.333118542894548e-004, 3.495188133266056e-004, 3.664000141427236e-004, 3.839783631625294e-004, 4.022773464529003e-004, 4.213210377579724e-004, 4.411341070924892e-004, 4.617418287585031e-004, 4.831700895846934e-004, 5.054453973240350e-004, 5.285948883287491e-004, 5.526463359992557e-004, 5.776281585116855e-004, 6.035694268866237e-004, 6.304998727332601e-004, 6.584498962084673e-004, 6.874505733153568e-004, 7.175336642444060e-004, 7.487316202293097e-004, 7.810775914127821e-004, 8.146054342502127e-004, 8.493497185583605e-004, 8.853457349505343e-004, 9.226295020377572e-004, 9.612377731634476e-004, 1.001208043569667e-003, 1.042578557225471e-003, 1.085388313487843e-003, 1.129677073668393e-003, 1.175485367705820e-003, 1.222854500460934e-003, 1.271826558129384e-003, 1.322444414376414e-003, 1.374751736326610e-003, 1.428792990668195e-003, 1.484613449495073e-003, 1.542259195759381e-003, 1.601777129328165e-003, 1.663214972080042e-003, 1.726621273310258e-003, 1.792045415319891e-003, 1.859537618008464e-003, 1.929148944128722e-003, 2.000931304128618e-003, 2.074937460870742e-003, 2.151221034049469e-003, 2.229836504887513e-003, 2.310839220352569e-003, 2.394285397224690e-003, 2.480232126358037e-003, 2.568737376543922e-003, 2.659859998183566e-003, 2.753659727089886e-003, 2.850197187960054e-003, 2.949533897578886e-003, 3.051732268501956e-003, 3.156855611648015e-003, 3.264968139624009e-003, 3.376134969543659e-003, 3.490422125512034e-003, 3.607896541474759e-003, 3.728626063414313e-003, 3.852679451797347e-003, 3.980126383732962e-003, 4.111037454976533e-003, 4.245484181734639e-003, 4.383539002791262e-003, 4.525275280559336e-003, 4.670767303162268e-003, 4.820090285488170e-003, 4.973320370546478e-003, 5.130534630480654e-003, 5.291811067763014e-003, 5.457228615833621e-003, 5.626867140010384e-003, 5.800807438004561e-003, 5.979131240454509e-003, 6.161921211248477e-003, 6.349260947941199e-003, 6.541234981608406e-003, 6.737928777105548e-003, 6.939428732811780e-003, 7.145822180530093e-003, 7.357197385013741e-003, 7.573643543593235e-003, 7.795250785685322e-003, 8.022110172037484e-003, 8.254313693933356e-003, 8.491954272338212e-003, 8.735125756982369e-003, 8.983922925176295e-003, 9.238441480673905e-003, 9.498778052406051e-003, 9.765030192907764e-003, 1.003729637709093e-002, 1.031567600057533e-002, 1.060026937790312e-002, 1.089117774088576e-002, 1.118850323681089e-002, 1.149234892629966e-002, 1.180281878149178e-002, 1.212001768378737e-002, 1.244405142182634e-002, 1.277502668901607e-002, 1.311305108132637e-002, 1.345823309485172e-002, 1.381068212326552e-002, 1.417050845529529e-002, 1.453782327208102e-002, 1.491273864445383e-002, 1.529536753016332e-002, 1.568582377114743e-002, 1.608422209040166e-002, 1.649067808931178e-002, 1.690530824446280e-002, 1.732822990453687e-002, 1.775956128744187e-002, 1.819942147677864e-002, 1.864793041887473e-002, 1.910520891956503e-002, 1.957137864057372e-002, 2.004656209644468e-002, 2.053088265103482e-002, 2.102446451411387e-002, 2.152743273774831e-002, 2.203991321298626e-002, 2.256203266622321e-002, 2.309391865555178e-002, 2.363569956736602e-002, 2.418750461246241e-002, 2.474946382258750e-002, 2.532170804665175e-002, 2.590436894709933e-002, 2.649757899613318e-002, 2.710147147198215e-002, 2.771618045516845e-002, 2.834184082475825e-002, 2.897858825451354e-002, 2.962655920917527e-002, 3.028589094062469e-002, 3.095672148415131e-002, 3.163918965453092e-002, 3.233343504239619e-002, 3.303959801019879e-002, 3.375781968861326e-002, 3.448824197265431e-002, 3.523100751788461e-002, 3.598625973665024e-002, 3.675414279428406e-002, 3.753480160540696e-002, 3.832838183003045e-002, 3.913502986997648e-002, 3.995489286516166e-002, 4.078811868980567e-002, 4.163485594877166e-002, 4.249525397402870e-002, 4.336946282080187e-002, 4.425763326428060e-002, 4.515991679581355e-002, 4.607646561937220e-002, 4.700743264819789e-002, 4.795297150115203e-002, 4.891323649938621e-002, 4.988838266300229e-002, 5.087856570747507e-002, 5.188394204050219e-002, 5.290466875872184e-002, 5.394090364435762e-002, 5.499280516221097e-002, 5.606053245635714e-002, 5.714424534717350e-002, 5.824410432822266e-002, 5.936027056331945e-002, 6.049290588356860e-002, 6.164217278454836e-002, 6.280823442343543e-002, 6.399125461636106e-002, 6.519139783552948e-002, 6.640882920680599e-002, 6.764371450704471e-002, 6.889622016163087e-002, 7.016651324207315e-002, 7.145476146359577e-002, 7.276113318295722e-002, 7.408579739616779e-002, 7.542892373645665e-002, 7.679068247215846e-002, 7.817124450477091e-002, 7.957078136711258e-002, 8.098946522143942e-002, 8.242746885787376e-002, 8.388496569268521e-002, 8.536212976679605e-002, 8.685913574431177e-002, 8.837615891128831e-002, 8.991337517436447e-002, 9.147096105967481e-002, 9.304909371182504e-002, 9.464795089290083e-002, 9.626771098168203e-002, 9.790855297290042e-002, 9.957065647660095e-002, 1.012542017176483e-001, 1.029593695353304e-001, 1.046863413830815e-001, 1.064352993283296e-001, 1.082064260525101e-001, 1.099999048510082e-001, 1.118159196335355e-001, 1.136546549243387e-001, 1.155162958627491e-001, 1.174010282037917e-001, 1.193090383188843e-001, 1.212405131966888e-001, 1.231956404442420e-001, 1.251746082880320e-001, 1.271776055753336e-001, 1.292048217756560e-001, 1.312564469824424e-001, 1.333326719147161e-001, 1.354336879191573e-001, 1.375596869720684e-001, 1.397108616817379e-001, 1.418874052908662e-001, 1.440895116791160e-001, 1.463173753659727e-001, 1.485711915136508e-001, 1.508511559303043e-001, 1.531574650734013e-001, 1.554903160532023e-001, 1.578499066364259e-001, 1.602364352504390e-001, 1.626501009871427e-001, 1.650911036075191e-001, 1.675596435460891e-001, 1.700559219157807e-001, 1.725801405130011e-001, 1.751325018227866e-001, 1.777132090243812e-001, 1.803224659969848e-001, 1.829604773257499e-001, 1.856274483079854e-001, 1.883235849597385e-001, 1.910490940225762e-001, 1.938041829705809e-001, 1.965890600178195e-001, 1.994039341258457e-001, 2.022490150118090e-001, 2.051245131564867e-001, 2.080306398131010e-001, 2.109676070159534e-001, 2.139356275898521e-001, 2.169349151595292e-001, 2.199656841596673e-001, 2.230281498451127e-001, 2.261225283015071e-001, 2.292490364564299e-001, 2.324078920906696e-001, 2.355993138502352e-001, 2.388235212584440e-001, 2.420807347286962e-001, 2.453711755776573e-001, 2.486950660387031e-001, 2.520526292761376e-001, 2.554440893996220e-001, 2.588696714792741e-001, 2.623296015612792e-001, 2.658241066839430e-001, 2.693534148944132e-001, 2.729177552658184e-001, 2.765173579152221e-001, 2.801524540219758e-001, 2.838232758468616e-001, 2.875300567517182e-001, 2.912730312199488e-001, 2.950524348775986e-001, 2.988685045151655e-001, 3.027214781102109e-001, 3.066115948507304e-001, 3.105390951593055e-001, 3.145042207181398e-001, 3.185072144949388e-001, 3.225483207696795e-001, 3.266277851623652e-001, 3.307458546616600e-001, 3.349027776546629e-001, 3.390988039576249e-001, 3.433341848477569e-001, 3.476091730962973e-001, 3.519240230025824e-001, 3.562789904294610e-001, 3.606743328399952e-001, 3.651103093353738e-001, 3.695871806943437e-001, 3.741052094140343e-001, 3.786646597522729e-001, 3.832657977714583e-001, 3.879088913841363e-001, 3.925942104002511e-001, 3.973220265761317e-001, 4.020926136654290e-001, 4.069062474719831e-001, 4.117632059046955e-001, 4.166637690345744e-001, 4.216082191539507e-001, 4.265968408381747e-001, 4.316299210096456e-001, 4.367077490044181e-001, 4.418306166415828e-001, 4.469988182954611e-001, 4.522126509707460e-001, 4.574724143807979e-001, 4.627784110292650e-001, 4.681309462951913e-001, 4.735303285216456e-001, 4.789768691084685e-001, 4.844708826088187e-001, 4.900126868302581e-001, 4.956026029402373e-001, 5.012409555764841e-001, 5.069280729624649e-001, 5.126642870282773e-001, 5.184499335373062e-001, 5.242853522190180e-001, 5.302680522792256e-001, 5.362148870570488e-001, 5.421125034763555e-001, 5.479604123151721e-001, 5.537581634208009e-001, 5.595053445140967e-001, 5.652015800117042e-001, 5.708465298673534e-001, 5.764398884324107e-001, 5.819813833363990e-001, 5.874707743877503e-001, 5.929078524952066e-001, 5.982924386100538e-001, 6.036243826896056e-001, 6.089035626818212e-001, 6.141298835313674e-001, 6.193032762071714e-001, 6.244236967514051e-001, 6.294911253499476e-001, 6.345055654242815e-001, 6.394670427446655e-001, 6.443756045645810e-001, 6.492313187762216e-001, 6.540342730869820e-001, 6.587845742164332e-001, 6.634823471141452e-001, 6.681277341974906e-001, 6.727208946097391e-001, 6.772620034977512e-001, 6.817512513092869e-001, 6.861888431095735e-001, 6.905749979167365e-001, 6.949099480559251e-001, 6.991939385318118e-001, 7.034272264190118e-001, 7.076100802703395e-001, 7.117427795423493e-001, 7.158256140379710e-001, 7.198588833658458e-001, 7.238428964161435e-001, 7.277779708523336e-001, 7.316644326187892e-001, 7.355026154637049e-001, 7.392928604808265e-001, 7.430355156427725e-001, 7.467309354101930e-001, 7.503794802847638e-001, 7.539815165033564e-001, 7.575374158563575e-001, 7.610475525042479e-001, 7.645123095847116e-001, 7.679320711405823e-001, 7.713072258757592e-001, 7.746381659738916e-001, 7.779252867810481e-001, 7.811689864996086e-001, 7.843696658934009e-001, 7.875277280034720e-001, 7.906435778747776e-001, 7.937176222932615e-001, 7.967502695335140e-001, 8.000199630662463e-001, 8.033009258512434e-001, 8.065932139849678e-001, 8.098968847000179e-001, 8.132119945147386e-001, 8.165386053633329e-001, 8.198767769333629e-001, 8.232265712101035e-001, 8.265880515436206e-001, 8.299612827168834e-001, 8.333463310190913e-001, 8.367432643245871e-001, 8.401521521779828e-001, 8.435730658861569e-001, 8.470060786178580e-001, 8.504512655117438e-001, 8.539087037939039e-001, 8.573784729060409e-001, 8.608606546457506e-001, 8.643553333207711e-001, 8.678625959196853e-001, 8.713825323024099e-001, 8.749152354154032e-001, 8.784608015388341e-001, 8.820193305769569e-001, 8.855909230615221e-001, 8.891756908959754e-001, 8.927737444522241e-001, 8.963852006600686e-001, 9.000101817311734e-001, 9.036488156539342e-001, 9.073012367571003e-001, 9.109675863549037e-001, 9.146480134897557e-001, 9.183426757925104e-001, 9.220517404865118e-001, 9.257753855697142e-001, 9.295138012239329e-001, 9.332671915249889e-001, 9.370357765779688e-001, 9.408197916132383e-001, 9.446194993887446e-001, 9.484351827283455e-001, 9.522671554710838e-001, 9.561157672135285e-001, 9.599814113076552e-001, 9.638645356406839e-001, 9.677656576771091e-001, 9.716853843570205e-001, 9.756244470156604e-001, 9.795837477900006e-001, 9.825671883209557e-001, 9.855632858038894e-001, 9.886965153922347e-001, 9.917147058660856e-001, 9.939889544462242e-001, 9.955107773467575e-001, 9.966554757188424e-001, 9.976501440012482e-001, 9.985707411825207e-001, 9.989551169812724e-001, 9.991090113187927e-001, 9.993400213037331e-001, 9.995459937617709e-001, 9.997521475624808e-001, 9.998552980391523e-001, 9.999068928446231e-001, 1.0};
@@ -7551,19 +7551,19 @@
 
     record crit
       extends Modelica.Icons.Record;
-      constant SIunits.Temperature TCRIT=374.18;
-      constant SIunits.Pressure PCRIT=4056290.0;
-      constant SIunits.Density DCRIT=508.0;
+      constant SI.Temperature TCRIT=374.18;
+      constant SI.Pressure PCRIT=4056290.0;
+      constant SI.Density DCRIT=508.0;
 
     end crit;
 
     record data
-      constant SIunits.SpecificHeatCapacity R=81.4888564372;
+      constant SI.SpecificHeatCapacity R=81.4888564372;
       // 8.314471/0.102032
-      constant SIunits.MolarMass MM=0.102032;
+      constant SI.MolarMass MM=0.102032;
       extends crit;
-      constant SIunits.SpecificEnthalpy HCRIT=389653;
-      constant SIunits.SpecificEntropy SCRIT=1562.135;
+      constant SI.SpecificEnthalpy HCRIT=389653;
+      constant SI.SpecificEntropy SCRIT=1562.135;
       extends fcrit;
       extends triple;
 
@@ -7571,9 +7571,9 @@
 
     record fcrit
       extends Modelica.Icons.Record;
-      constant SIunits.Temperature FTCRIT=374.209;
-      constant SIunits.Pressure FPCRIT=4059280.0;
-      constant SIunits.Density FDCRIT=511.9;
+      constant SI.Temperature FTCRIT=374.209;
+      constant SI.Pressure FPCRIT=4059280.0;
+      constant SI.Density FDCRIT=511.9;
 
     end fcrit;
 
@@ -7585,8 +7585,8 @@
     end Ideal;
 
     record ReferenceStates
-      constant SIunits.SpecificEnthalpy h0=1.0;
-      constant SIunits.SpecificEntropy s0=1.0;
+      constant SI.SpecificEnthalpy h0=1.0;
+      constant SI.SpecificEntropy s0=1.0;
 
     end ReferenceStates;
 
@@ -7610,10 +7610,10 @@
     end Residual;
 
     record triple
-      constant SIunits.Temperature TTRIPLE=169.85;
-      constant SIunits.Pressure PTRIPLE=389.563789;
-      constant SIunits.Density DLTRIPLE=1591.107453;
-      constant SIunits.Density DVTRIPLE=0.028172;
+      constant SI.Temperature TTRIPLE=169.85;
+      constant SI.Pressure PTRIPLE=389.563789;
+      constant SI.Density DLTRIPLE=1591.107453;
+      constant SI.Density DVTRIPLE=0.028172;
 
     end triple;
 
@@ -7749,8 +7749,8 @@
     "set state for pressure and specific enthalpy (X not used since single substance)"
     protected
      SaturationProperties sat(psat=p, Tsat=0);
-     Modelica.SIunits.SpecificEnthalpy hl=bubbleEnthalpy(sat);
-     Modelica.SIunits.SpecificEnthalpy hv=dewEnthalpy(sat);
+     Modelica.Units.SI.SpecificEnthalpy hl=bubbleEnthalpy(sat);
+     Modelica.Units.SI.SpecificEnthalpy hv=dewEnthalpy(sat);
 
     algorithm
     state.p :=p;
@@ -7767,10 +7767,10 @@
     "set state for density and temperature (X not used since single substance)"
     protected
       XRGMedia.Common.HelmholtzDerivs f;
-      Modelica.SIunits.SpecificHeatCapacity R;
+      Modelica.Units.SI.SpecificHeatCapacity R;
       NH3_ph.SaturationProperties sat;
-      Modelica.SIunits.Density dl;
-      Modelica.SIunits.Density dv;
+      Modelica.Units.SI.Density dl;
+      Modelica.Units.SI.Density dv;
 
     algorithm
        R := NH3Data.R;
@@ -7801,8 +7801,8 @@
     "set state for pressure and specific entropy (X not used since single substance)"
 
     protected
-      Modelica.SIunits.Pressure delp=1e-2 "iteration accuracy for pressure";
-      Modelica.SIunits.SpecificEntropy dels=1e-1 "iteration accuracy for entropy";
+      Modelica.Units.SI.Pressure delp=1e-2 "iteration accuracy for pressure";
+      Modelica.Units.SI.SpecificEntropy dels=1e-1 "iteration accuracy for entropy";
       Integer error;
       //this can be avoided with special function to get h
       Common.HelmholtzDerivs f;
@@ -7827,7 +7827,7 @@
     redeclare function extends setState_pTX   "Set state for pressure and temperature (X not used since single substance)"
 
     protected
-        Modelica.SIunits.Pressure delp=1.0e-2
+        Modelica.Units.SI.Pressure delp=1.0e-2
         "Relative error in p in iteration";
 
     algorithm
@@ -7956,11 +7956,11 @@
     "temperature as function of pressure and specific enthalpy"
       extends Modelica.Icons.Function;
 
-      input Modelica.SIunits.Pressure p "pressure";
-      input Modelica.SIunits.SpecificEnthalpy h "specific enthalpy";
+      input Modelica.Units.SI.Pressure p "pressure";
+      input Modelica.Units.SI.SpecificEnthalpy h "specific enthalpy";
       input Integer phase =   0
       "2 for two-phase, 1 for one-phase, 0 if not known";
-      output Modelica.SIunits.Temperature T "temperature";
+      output Modelica.Units.SI.Temperature T "temperature";
     algorithm
       T := T_props_ph(p, h,
         derivsOf_ph(p, h, getPhase_ph(p,h)));
@@ -8006,7 +8006,7 @@
       SaturationProperties sat;
       Common.PhaseBoundaryProperties vap;
 
-      Modelica.SIunits.MassFraction x;
+      Modelica.Units.SI.MassFraction x;
 
     algorithm
       if getPhase_ph(state.p, state.h)==2 then
@@ -8028,8 +8028,8 @@
     "saturation temperature in two-phase region"
       extends Modelica.Icons.Function;
 
-      input Modelica.SIunits.AbsolutePressure p "pressure";
-      output Modelica.SIunits.Temperature T "saturation temperature";
+      input Modelica.Units.SI.AbsolutePressure p "pressure";
+      output Modelica.Units.SI.Temperature T "saturation temperature";
     protected
       constant Real T_coef[:,:] = NH3Data.Tcoef;
       constant Real p_breaks[:] = NH3Data.pbreaks;
@@ -8050,7 +8050,7 @@
     redeclare function saturationTemperature_derp
     "derivative of saturation temperature in two-phase region"
       extends Modelica.Icons.Function;
-      input Modelica.SIunits.AbsolutePressure p "pressure";
+      input Modelica.Units.SI.AbsolutePressure p "pressure";
       output Real dTp "derivative of saturation temperature w.r.t pressure";
     protected
       constant Real T_coef[:,:] = NH3Data.Tcoef;
@@ -8073,7 +8073,7 @@
     function saturationTemperature_der_p
       "derivative of saturation temperature in two-phase region"
       extends Modelica.Icons.Function;
-      input Modelica.SIunits.AbsolutePressure p "pressure";
+      input Modelica.Units.SI.AbsolutePressure p "pressure";
       input Real der_p "pressure derivative";
       output Real der_Tsat "derivative of saturation temperature w.r.t pressure";
     protected
@@ -8099,7 +8099,7 @@
       extends Modelica.Icons.Function;
       input SaturationProperties sat
       "saturation properties | pressure is used for interpolation";
-      output Modelica.SIunits.Density dl "liquid density";
+      output Modelica.Units.SI.Density dl "liquid density";
     protected
       constant Real dl_coef[:,:] = NH3Data.dlcoef;
       constant Real p_breaks[:] = NH3Data.pbreaks;
@@ -8174,7 +8174,7 @@
       extends Modelica.Icons.Function;
       input SaturationProperties sat
       "saturation properties | pressure is used for interpolation";
-      output Modelica.SIunits.Density dv "vapor phase density";
+      output Modelica.Units.SI.Density dv "vapor phase density";
     protected
       constant Real dv_coef[:,:] = NH3Data.dvcoef;
       constant Real p_breaks[:] = NH3Data.pbreaks;
@@ -8249,12 +8249,12 @@
       extends Modelica.Icons.Function;
       input SaturationProperties sat
       "saturation properties | pressure is used for interpolation";
-      output Modelica.SIunits.SpecificEnthalpy hl
+      output Modelica.Units.SI.SpecificEnthalpy hl
       "specific enthalpy of liquid fraction";
     protected
       constant Real hl_coef[:,:] = NH3Data.hlcoef;
       constant Real p_breaks[:] = NH3Data.pbreaks;
-      constant Modelica.SIunits.SpecificEnthalpy dh_ref=0;
+      constant Modelica.Units.SI.SpecificEnthalpy dh_ref=0;
       //constant Modelica.SIunits.SpecificEnthalpy dh_ref = -143200;
       Integer int;
       Integer error;
@@ -8329,12 +8329,12 @@
       input SaturationProperties sat
       "saturation properties | pressure is used for interpolation";
        // Update: Unit changed. S.W.
-      output Modelica.SIunits.SpecificEnthalpy hv
+      output Modelica.Units.SI.SpecificEnthalpy hv
       "specific enthalpy of vapor fraction";
     protected
       constant Real hv_coef[:,:] = NH3Data.hvcoef;
       constant Real p_breaks[:] = NH3Data.pbreaks;
-      constant Modelica.SIunits.SpecificEnthalpy dh_ref=0;
+      constant Modelica.Units.SI.SpecificEnthalpy dh_ref=0;
       //constant Modelica.SIunits.SpecificEnthalpy dh_ref = -143200;
       Integer int;
       Integer error;
@@ -8407,7 +8407,7 @@
       extends Modelica.Icons.Function;
       input SaturationProperties sat
       "saturation properties | pressure is used for interpolation";
-      output Modelica.SIunits.SpecificEntropy sv
+      output Modelica.Units.SI.SpecificEntropy sv
       "specific entropy of vapor phase w.r.t saturation pressure";
     protected
       constant Real sv_coef[:,:] = NH3Data.svcoef;
@@ -8415,7 +8415,7 @@
     /*  constant Modelica.SIunits.SpecificEntropy ds_ref = -471.584 
     "offset of boundary coefficients and fundamental equation reference point";
 */
-      constant Modelica.SIunits.SpecificEntropy ds_ref = 0
+      constant Modelica.Units.SI.SpecificEntropy ds_ref = 0
       "offset of boundary coefficients and fundamental equation reference point";
 
       Integer int;
@@ -8498,7 +8498,7 @@
       extends Modelica.Icons.Function;
       input SaturationProperties sat
       "saturation properties | pressure is used for interpolation";
-      output Modelica.SIunits.SpecificEntropy sl
+      output Modelica.Units.SI.SpecificEntropy sl
       "specific entropy of liquid phase w.r.t saturation pressure";
     protected
       constant Real sl_coef[:,:] = NH3Data.slcoef;
@@ -8506,7 +8506,7 @@
       /*constant Modelica.SIunits.SpecificEntropy ds_ref = -471.584 
     "offset of boundary coefficients and fundamental equation reference point";
 */
-      constant Modelica.SIunits.SpecificEntropy ds_ref = 0
+      constant Modelica.Units.SI.SpecificEntropy ds_ref = 0
       "offset of boundary coefficients and fundamental equation reference point";
       Integer int;
       Integer error;
@@ -8622,7 +8622,7 @@
       SaturationProperties sat;
       Common.PhaseBoundaryProperties vap;
 
-      Modelica.SIunits.MassFraction x;
+      Modelica.Units.SI.MassFraction x;
 
     algorithm
       if getPhase_ph(state.p, state.h)==2 then
@@ -8646,8 +8646,8 @@
       Real omega "collision integral";
 
       constant Real K=0.021357 "Constant for low density term eta_star";
-      constant Modelica.SIunits.Length sigma=0.2957e-09 "Hard-sphere diameter";
-      constant Modelica.SIunits.Temperature epsilon_k=386 "empirical factor";
+      constant Modelica.Units.SI.Length sigma=0.2957e-09 "Hard-sphere diameter";
+      constant Modelica.Units.SI.Temperature epsilon_k=386 "empirical factor";
       constant Real a[5]={4.99318220,-6.1122364e-1,0,1.8535124e-1,-1.1160946e-1}
       "Coefficients for term of collision integral";
       constant Real b[13]={-1.7999496,4.6692621e+01,-5.3460794e+02,3.3604074e+03,
@@ -8711,18 +8711,18 @@
 
       Real d_red "reduced density";
       Real T_red "reduced temperature";
-      Modelica.SIunits.ThermalConductivity lam_0 "ideal gas term";
-      Modelica.SIunits.ThermalConductivity del_lam
+      Modelica.Units.SI.ThermalConductivity lam_0 "ideal gas term";
+      Modelica.Units.SI.ThermalConductivity del_lam
       "excess density-dependent thermal conductivity";
-      Modelica.SIunits.ThermalConductivity del_lam_c
+      Modelica.Units.SI.ThermalConductivity del_lam_c
       "excess term of thermal conductivity around critical region";
-      Modelica.SIunits.ThermalConductivity del_lam_L
+      Modelica.Units.SI.ThermalConductivity del_lam_L
       "excess term of thermal conductivity in liquid phase";
-      Modelica.SIunits.SpecificHeatCapacity cp
+      Modelica.Units.SI.SpecificHeatCapacity cp
       "specific heat capacity at constant pressure";
-      Modelica.SIunits.SpecificHeatCapacity cv
+      Modelica.Units.SI.SpecificHeatCapacity cv
       "specific heat capacity at constant volume";
-      Modelica.SIunits.DynamicViscosity eta "dynamic viscosity";
+      Modelica.Units.SI.DynamicViscosity eta "dynamic viscosity";
 
       Common.HelmholtzDerivs f "helmholtz derivatives";
       Common.HelmholtzDerivs f_ref "helmholtz derivatives";
@@ -8936,8 +8936,8 @@
     function derivsOf_ph
 
       extends Modelica.Icons.Function;
-      input Modelica.SIunits.Pressure p;
-      input Modelica.SIunits.SpecificEnthalpy h;
+      input Modelica.Units.SI.Pressure p;
+      input Modelica.Units.SI.SpecificEnthalpy h;
       input Integer phase;
       output Common.InverseDerivatives_rhoT derivs;
 
@@ -8986,20 +8986,20 @@
     function dt_ph "density and temperature w.r.t. pressure and specific enthalpy"
 
       extends Modelica.Icons.Function;
-      input Modelica.SIunits.Pressure p "pressure";
-      input Modelica.SIunits.SpecificEnthalpy h "specific enthalpy";
-      output Modelica.SIunits.Density d "density";
-      output Modelica.SIunits.Temperature T "temperature";
+      input Modelica.Units.SI.Pressure p "pressure";
+      input Modelica.Units.SI.SpecificEnthalpy h "specific enthalpy";
+      output Modelica.Units.SI.Density d "density";
+      output Modelica.Units.SI.Temperature T "temperature";
     protected
       SaturationProperties sat(psat=p, Tsat=0);
-      Modelica.SIunits.Pressure delp=1.0e-2 "relative error in p in iteration";
-      Modelica.SIunits.SpecificEnthalpy delh=1.0e-2
+      Modelica.Units.SI.Pressure delp=1.0e-2 "relative error in p in iteration";
+      Modelica.Units.SI.SpecificEnthalpy delh=1.0e-2
         "relative error in h in iteration";
       //constant NH3Data.Ideal idc "ideal gas coefficients";
       //constant NH3Data.Residual resc "residual coefficients";
-      Modelica.SIunits.SpecificEnthalpy hvapor=
+      Modelica.Units.SI.SpecificEnthalpy hvapor=
           dewEnthalpy(sat=sat);
-      Modelica.SIunits.SpecificEnthalpy hliquid=
+      Modelica.Units.SI.SpecificEnthalpy hliquid=
           bubbleEnthalpy(sat=sat);
       Integer error "iteration error";
       Real x "steam quality";
@@ -9025,19 +9025,19 @@
       "density and temperature w.r.t. pressure and specific enthalpy in one-phase region"
 
       extends Modelica.Icons.Function;
-      input Modelica.SIunits.Pressure p "pressure";
-      input Modelica.SIunits.SpecificEnthalpy h "enthalpy";
-      input Modelica.SIunits.Pressure delp "relative error in p in iteration";
-      input Modelica.SIunits.SpecificEnthalpy delh
+      input Modelica.Units.SI.Pressure p "pressure";
+      input Modelica.Units.SI.SpecificEnthalpy h "enthalpy";
+      input Modelica.Units.SI.Pressure delp "relative error in p in iteration";
+      input Modelica.Units.SI.SpecificEnthalpy delh
         "relative error in h in iteration";
 
-      output Modelica.SIunits.Density d "density";
-      output Modelica.SIunits.Temperature T "temperature";
+      output Modelica.Units.SI.Density d "density";
+      output Modelica.Units.SI.Temperature T "temperature";
       output Integer error "1 if had not converged";
 
       //constant Modelica.SIunits.SpecificEnthalpy dh_ref = -143200;
     protected
-      constant Modelica.SIunits.SpecificEnthalpy dh_ref = 0;
+      constant Modelica.Units.SI.SpecificEnthalpy dh_ref = 0;
 
       constant Real p_breaks[:]=XRGMedia.NH3Data.pbreaks;
       constant Real hl_coef[:, 4]=XRGMedia.NH3Data.hlcoef;
@@ -9045,7 +9045,7 @@
       constant Real T_coef[:, 4]=XRGMedia.NH3Data.Tcoef;
       constant Real dv_coef[:, 4]=XRGMedia.NH3Data.dvcoef;
 
-      Modelica.SIunits.SpecificEnthalpy hl;
+      Modelica.Units.SI.SpecificEnthalpy hl;
       Boolean liquid;
       Boolean supercritical;
       Integer int;
@@ -9145,14 +9145,14 @@
 
       extends Modelica.Icons.Function;
 
-      input Modelica.SIunits.Pressure p "pressure";
-      input Modelica.SIunits.SpecificEntropy s "specific entropy";
-      input Modelica.SIunits.Pressure delp "iteration accuracy";
-      input Modelica.SIunits.SpecificEntropy dels "iteration accuracy";
+      input Modelica.Units.SI.Pressure p "pressure";
+      input Modelica.Units.SI.SpecificEntropy s "specific entropy";
+      input Modelica.Units.SI.Pressure delp "iteration accuracy";
+      input Modelica.Units.SI.SpecificEntropy dels "iteration accuracy";
     //   input NH3Data.Ideal idc "ideal coefficients";
     //   input NH3Data.Residual resc "residual coefficients";
-      output Modelica.SIunits.Density d "density";
-      output Modelica.SIunits.Temperature T "temperature (K)";
+      output Modelica.Units.SI.Density d "density";
+      output Modelica.Units.SI.Temperature T "temperature (K)";
       output Integer error "error flag: trouble if different from 0";
 
     protected
@@ -9162,7 +9162,7 @@
       constant Real sl_coef[:, 4]=XRGMedia.NH3Data.slcoef;
       constant Real sv_coef[:, 4]=XRGMedia.NH3Data.svcoef;
       constant Real T_coef[:, 4]=XRGMedia.NH3Data.Tcoef;
-      constant Modelica.SIunits.SpecificEntropy ds_ref = 0
+      constant Modelica.Units.SI.SpecificEntropy ds_ref = 0
         "offset of boundary coefficients and fundamental equation reference point";
 
       /*constant Modelica.SIunits.SpecificEntropy ds_ref = -471.584 
@@ -9256,8 +9256,8 @@
     function f_NH3
       "calculation of helmholtz derivatives by density and temperature"
       extends Modelica.Icons.Function;
-      input Modelica.SIunits.Density d "density";
-      input Modelica.SIunits.Temperature T "temperature";
+      input Modelica.Units.SI.Density d "density";
+      input Modelica.Units.SI.Temperature T "temperature";
       output Common.HelmholtzDerivs f "helmholtz derivatives";
     protected
       Real delta;
@@ -9370,15 +9370,15 @@
 
       extends Modelica.Icons.Function;
 
-      input Modelica.SIunits.Pressure p "pressure";
-      input Modelica.SIunits.SpecificEnthalpy h "specific enthalpy";
+      input Modelica.Units.SI.Pressure p "pressure";
+      input Modelica.Units.SI.SpecificEnthalpy h "specific enthalpy";
 
       output Integer phase "number of phases";
     protected
      SaturationProperties sat(psat=p, Tsat=0);
-     Modelica.SIunits.SpecificEnthalpy hl=bubbleEnthalpy(sat);
-     Modelica.SIunits.SpecificEnthalpy hv=dewEnthalpy(sat);
 
+     Modelica.Units.SI.SpecificEnthalpy hl=bubbleEnthalpy(sat);
+     Modelica.Units.SI.SpecificEnthalpy hv=dewEnthalpy(sat);
     algorithm
     phase := if ((h < hl) or (h > hv) or (p > NH3Data.data.FPCRIT)) then 1 else 2;
 
@@ -9389,14 +9389,14 @@
 
       extends Modelica.Icons.Function;
 
-      input Modelica.SIunits.Pressure p "pressure";
-      input Modelica.SIunits.SpecificEntropy s "specific entropy";
+      input Modelica.Units.SI.Pressure p "pressure";
+      input Modelica.Units.SI.SpecificEntropy s "specific entropy";
       output Integer phase "number of phases";
     protected
      SaturationProperties sat(psat=p, Tsat=0);
-     Modelica.SIunits.SpecificEntropy sl=bubbleEntropy(sat);
-     Modelica.SIunits.SpecificEntropy sv=dewEntropy(sat);
 
+     Modelica.Units.SI.SpecificEntropy sl=bubbleEntropy(sat);
+     Modelica.Units.SI.SpecificEntropy sv=dewEntropy(sat);
     algorithm
     phase := if ((s < sl) or (s > sv) or (p > NH3Data.data.FPCRIT)) then 1 else 2;
 
@@ -9408,16 +9408,16 @@
 
       extends Modelica.Icons.Function;
 
-      input Modelica.SIunits.Pressure p "pressure";
-      input Modelica.SIunits.SpecificEntropy s "specific entropy";
-      output Modelica.SIunits.SpecificEnthalpy h "specific enthalpy";
+      input Modelica.Units.SI.Pressure p "pressure";
+      input Modelica.Units.SI.SpecificEntropy s "specific entropy";
+      output Modelica.Units.SI.SpecificEnthalpy h "specific enthalpy";
     protected
       SaturationProperties sat;
-      Modelica.SIunits.MassFraction x;
-      Modelica.SIunits.SpecificEntropy sl;
-      Modelica.SIunits.SpecificEntropy sv;
-      Modelica.SIunits.SpecificEnthalpy hl;
-      Modelica.SIunits.SpecificEnthalpy hv;
+      Modelica.Units.SI.MassFraction x;
+      Modelica.Units.SI.SpecificEntropy sl;
+      Modelica.Units.SI.SpecificEntropy sv;
+      Modelica.Units.SI.SpecificEnthalpy hl;
+      Modelica.Units.SI.SpecificEnthalpy hv;
     algorithm
       sat.psat := p;
       // dummy
@@ -9435,13 +9435,13 @@
     function NH3_liqofdT "properties on liquid boundary phase"
 
       extends Modelica.Icons.Function;
-      input Modelica.SIunits.Temperature T "temperature";
-      input Modelica.SIunits.Density d "density";
+      input Modelica.Units.SI.Temperature T "temperature";
+      input Modelica.Units.SI.Density d "density";
       output Common.PhaseBoundaryProperties liq
         "properties on liquid boundary phase";
     protected
-      Modelica.SIunits.Temperature T_liq;
-      Modelica.SIunits.Density d_liq;
+      Modelica.Units.SI.Temperature T_liq;
+      Modelica.Units.SI.Density d_liq;
       Common.HelmholtzDerivs f;
     algorithm
       if T < NH3Data.data.FTCRIT then
@@ -9460,13 +9460,13 @@
     function NH3_vapofdT "properties on vapor boundary phase"
 
       extends Modelica.Icons.Function;
-      input Modelica.SIunits.Temperature T "temperature";
-      input Modelica.SIunits.Density d "density";
+      input Modelica.Units.SI.Temperature T "temperature";
+      input Modelica.Units.SI.Density d "density";
       output Common.PhaseBoundaryProperties vap
         "properties on vapor boundary phase";
     protected
-      Modelica.SIunits.Temperature T_vap;
-      Modelica.SIunits.Density d_vap;
+      Modelica.Units.SI.Temperature T_vap;
+      Modelica.Units.SI.Density d_vap;
       Common.HelmholtzDerivs f;
     algorithm
       if T < NH3Data.data.FTCRIT then
@@ -9484,8 +9484,8 @@
 
     function rho_ph_der "derivative function of rho_ph"
     extends Modelica.Icons.Function;
-    input Modelica.SIunits.Pressure p "pressure";
-    input Modelica.SIunits.SpecificEnthalpy h "specific enthalpy";
+    input Modelica.Units.SI.Pressure p "pressure";
+    input Modelica.Units.SI.SpecificEnthalpy h "specific enthalpy";
     input Common.InverseDerivatives_rhoT derivs "record for derivatives";
     input Real p_der "derivative of pressure";
     input Real h_der "derivative of specific enthalpy";
@@ -9505,11 +9505,11 @@
 
     function rho_props_ph "density as function of pressure and specific enthalpy"
       extends Modelica.Icons.Function;
-      input Modelica.SIunits.Pressure p "pressure";
-      input Modelica.SIunits.SpecificEnthalpy h "specific enthalpy";
+      input Modelica.Units.SI.Pressure p "pressure";
+      input Modelica.Units.SI.SpecificEnthalpy h "specific enthalpy";
       input Common.InverseDerivatives_rhoT derivs
         "record for the calculation of rho_ph_der";
-      output Modelica.SIunits.Density d "density";
+      output Modelica.Units.SI.Density d "density";
     algorithm
       d := derivs.rho;
 
@@ -9521,8 +9521,8 @@
 
     function T_ph_der "derivative function of T_ph"
     extends Modelica.Icons.Function;
-    input Modelica.SIunits.Pressure p "pressure";
-    input Modelica.SIunits.SpecificEnthalpy h "specific enthalpy";
+    input Modelica.Units.SI.Pressure p "pressure";
+    input Modelica.Units.SI.SpecificEnthalpy h "specific enthalpy";
     input Common.InverseDerivatives_rhoT derivs "auxiliary record";
     input Real p_der "derivative of pressure";
     input Real h_der "derivative of specific enthalpy";
@@ -9541,11 +9541,11 @@
 
     function T_props_ph "temperature as function of pressure and specific enthalpy"
       extends Modelica.Icons.Function;
-      input Modelica.SIunits.Pressure p "pressure";
-      input Modelica.SIunits.SpecificEnthalpy h "specific enthalpy";
+      input Modelica.Units.SI.Pressure p "pressure";
+      input Modelica.Units.SI.SpecificEnthalpy h "specific enthalpy";
       input Common.InverseDerivatives_rhoT derivs
         "record for the calculation of T_ph_der";
-      output Modelica.SIunits.Temperature T "density";
+      output Modelica.Units.SI.Temperature T "density";
     algorithm
       T := derivs.T;
 
@@ -9730,11 +9730,11 @@
   end NH3_ph;
 
   package NH3Data "NH3 data required by package NH3_ph"
-  import Modelica.SIunits;
+  import Modelica.Units.SI;
 
   extends Modelica.Icons.Package;
 
-  constant SIunits.SpecificHeatCapacity R=NH3Data.data.R;
+  constant SI.SpecificHeatCapacity R=NH3Data.data.R;
 
   constant Integer Npoints=478;
 
@@ -14516,21 +14516,21 @@
 
     record crit
       extends Modelica.Icons.Record;
-      constant SIunits.Temperature TCRIT=405.4;
-      constant SIunits.Pressure PCRIT=11339e3;
-      constant SIunits.Pressure NUMPCRIT=11359e3;
+      constant SI.Temperature TCRIT=405.4;
+      constant SI.Pressure PCRIT=11339e3;
+      constant SI.Pressure NUMPCRIT=11359e3;
       // slightly above the real to avoid numerical problems
-      constant SIunits.Density DCRIT=225.0;
+      constant SI.Density DCRIT=225.0;
 
     end crit;
 
     record data
 
-      constant SIunits.MolarMass MM=0.0170305;
-      constant SIunits.SpecificHeatCapacity R=Modelica.Constants.R/MM;
+      constant SI.MolarMass MM=0.0170305;
+      constant SI.SpecificHeatCapacity R=Modelica.Constants.R/MM;
       extends crit;
-      constant SIunits.SpecificEnthalpy HCRIT=1118990;
-      constant SIunits.SpecificEntropy SCRIT=3553.58;
+      constant SI.SpecificEnthalpy HCRIT=1118990;
+      constant SI.SpecificEntropy SCRIT=3553.58;
       extends fcrit;
       extends triple;
 
@@ -14538,9 +14538,9 @@
 
     record fcrit
       extends Modelica.Icons.Record;
-      constant SIunits.Temperature FTCRIT=405.4;
-      constant SIunits.Pressure FPCRIT=11339.0e3;
-      constant SIunits.Density FDCRIT=225;
+      constant SI.Temperature FTCRIT=405.4;
+      constant SI.Pressure FPCRIT=11339.0e3;
+      constant SI.Density FDCRIT=225;
 
     end fcrit;
 
@@ -14553,8 +14553,8 @@
 
     record ReferenceStates
       extends Modelica.Icons.Record;
-      constant SIunits.SpecificEnthalpy h0=1.0;
-      constant SIunits.SpecificEntropy s0=1.0;
+      constant SI.SpecificEnthalpy h0=1.0;
+      constant SI.SpecificEntropy s0=1.0;
 
     end ReferenceStates;
 
@@ -14578,22 +14578,22 @@
 
     record triple
       extends Modelica.Icons.Record;
-      constant SIunits.Temperature TTRIPLE=195.495;
-      constant SIunits.Pressure PTRIPLE=6.09114e3;
-      constant SIunits.Density DLTRIPLE=732.903;
-      constant SIunits.Density DVTRIPLE=0.0640935;
+      constant SI.Temperature TTRIPLE=195.495;
+      constant SI.Pressure PTRIPLE=6.09114e3;
+      constant SI.Density DLTRIPLE=732.903;
+      constant SI.Density DVTRIPLE=0.0640935;
 
     end triple;
 
     record CoeffsThermalConductivity
       extends Modelica.Icons.Record;
       constant Real q_d=1/0.28e-9 "Modified effective cutoff wave number, [1/m]";
-      constant Modelica.SIunits.Length xi_0=1.5e-10 "Critical Amplitude";
+      constant Modelica.Units.SI.Length xi_0=1.5e-10 "Critical Amplitude";
       constant Real GAMMA=0.063 "Amplitude";
-      constant Modelica.SIunits.Temperature T_ref=1.5*crit.TCRIT
+      constant Modelica.Units.SI.Temperature T_ref=1.5*crit.TCRIT
         "Arbitrary reference temperature";
-      constant Modelica.SIunits.Pressure p_crit=crit.PCRIT "Critical pressure";
-      constant Modelica.SIunits.Density rho_crit=crit.DCRIT "Critical density";
+      constant Modelica.Units.SI.Pressure p_crit=crit.PCRIT "Critical pressure";
+      constant Modelica.Units.SI.Density rho_crit=crit.DCRIT "Critical density";
       constant Real nu=0.63 "Universal exponent";
       constant Real gamma=1.239 "Universal exponent";
       constant Real R_0=1.01 "Universal amplitude";
@@ -14715,8 +14715,8 @@
 
     protected
      SaturationProperties sat(psat=p, Tsat=0);
-     Modelica.SIunits.SpecificEnthalpy hl=bubbleEnthalpy(sat);
-     Modelica.SIunits.SpecificEnthalpy hv=dewEnthalpy(sat);
+     Modelica.Units.SI.SpecificEnthalpy hl=bubbleEnthalpy(sat);
+     Modelica.Units.SI.SpecificEnthalpy hv=dewEnthalpy(sat);
 
     algorithm
     state.p :=p;
@@ -14733,10 +14733,10 @@
     "set state for density and temperature (X not used since single substance)"
     protected
       XRGMedia.Common.HelmholtzDerivs f;
-      Modelica.SIunits.SpecificHeatCapacity R;
+      Modelica.Units.SI.SpecificHeatCapacity R;
       CO2_ph.SaturationProperties sat;
-      Modelica.SIunits.Density dl;
-      Modelica.SIunits.Density dv;
+      Modelica.Units.SI.Density dl;
+      Modelica.Units.SI.Density dv;
 
     algorithm
        R := CO2Data.R;
@@ -14767,8 +14767,8 @@
     "set state for pressure and specific entropy (X not used since single substance)"
 
     protected
-      Modelica.SIunits.Pressure delp=1e-2 "iteration accuracy for pressure";
-      Modelica.SIunits.SpecificEntropy dels=1e-1 "iteration accuracy for entropy";
+      Modelica.Units.SI.Pressure delp=1e-2 "iteration accuracy for pressure";
+      Modelica.Units.SI.SpecificEntropy dels=1e-1 "iteration accuracy for entropy";
       Integer error;
       //this can be avoided with special function to get h
       Common.HelmholtzDerivs f;
@@ -14795,7 +14795,7 @@
     redeclare function extends setState_pTX "Set state for pressure and temperature (X not used since single substance)"
 
     protected
-        Modelica.SIunits.Pressure delp=1.0e-2
+        Modelica.Units.SI.Pressure delp=1.0e-2
         "Relative error in p in iteration";
 
     algorithm
@@ -14923,12 +14923,12 @@
     redeclare function temperature_ph
     "temperature as function of pressure and specific enthalpy"
       extends Modelica.Icons.Function;
-      input Modelica.SIunits.Pressure p "pressure";
-      input Modelica.SIunits.SpecificEnthalpy h "specific enthalpy";
+      input Modelica.Units.SI.Pressure p "pressure";
+      input Modelica.Units.SI.SpecificEnthalpy h "specific enthalpy";
       input Integer phase =   0
       "2 for two-phase, 1 for one-phase, 0 if not known";
-      output Modelica.SIunits.Temperature T "temperature";
 
+      output Modelica.Units.SI.Temperature T "temperature";
     algorithm
       T := T_props_ph(p, h,
         derivsOf_ph(p, h, getPhase_ph(p,h)));
@@ -14977,7 +14977,7 @@
       SaturationProperties sat;
       Common.PhaseBoundaryProperties vap;
 
-      Modelica.SIunits.MassFraction x;
+      Modelica.Units.SI.MassFraction x;
 
     algorithm
       if getPhase_ph(state.p, state.h)==2 then
@@ -14998,9 +14998,9 @@
     redeclare function saturationTemperature
     "saturation temperature in two-phase region"
       extends Modelica.Icons.Function;
-      input Modelica.SIunits.AbsolutePressure p "pressure";
-      output Modelica.SIunits.Temperature T "saturation temperature";
 
+      input Modelica.Units.SI.AbsolutePressure p "pressure";
+      output Modelica.Units.SI.Temperature T "saturation temperature";
     protected
       constant Real T_coef[:,:] = CO2Data.Tcoef;
       constant Real p_breaks[:] = CO2Data.pbreaks;
@@ -15022,7 +15022,7 @@
     "derivative of saturation temperature in two-phase region"
       extends Modelica.Icons.Function;
 
-      input Modelica.SIunits.AbsolutePressure p "pressure";
+      input Modelica.Units.SI.AbsolutePressure p "pressure";
       output Real dTp "derivative of saturation temperature w.r.t pressure";
     protected
       constant Real T_coef[:,:] = CO2Data.Tcoef;
@@ -15046,7 +15046,7 @@
       "derivative of saturation temperature in two-phase region"
       extends Modelica.Icons.Function;
 
-      input Modelica.SIunits.AbsolutePressure p "pressure";
+      input Modelica.Units.SI.AbsolutePressure p "pressure";
       input Real der_p "pressure derivative";
       output Real der_Tsat "derivative of saturation temperature w.r.t pressure";
     protected
@@ -15073,7 +15073,7 @@
 
       input SaturationProperties sat
       "saturation properties | pressure is used for interpolation";
-      output Modelica.SIunits.Density dl "liquid density";
+      output Modelica.Units.SI.Density dl "liquid density";
     protected
       constant Real dl_coef[:,:] = CO2Data.dlcoef;
       constant Real p_breaks[:] = CO2Data.pbreaks;
@@ -15151,7 +15151,7 @@
 
       input SaturationProperties sat
       "saturation properties | pressure is used for interpolation";
-      output Modelica.SIunits.Density dv "vapor phase density";
+      output Modelica.Units.SI.Density dv "vapor phase density";
     protected
       constant Real dv_coef[:,:] = CO2Data.dvcoef;
       constant Real p_breaks[:] = CO2Data.pbreaks;
@@ -15229,7 +15229,7 @@
 
       input SaturationProperties sat
       "saturation properties | pressure is used for interpolation";
-      output Modelica.SIunits.SpecificEnthalpy hl
+      output Modelica.Units.SI.SpecificEnthalpy hl
       "specific enthalpy of liquid fraction";
     protected
       constant Real hl_coef[:,:] = CO2Data.hlcoef;
@@ -15308,7 +15308,7 @@
 
       input SaturationProperties sat
       "saturation properties | pressure is used for interpolation";
-      output Modelica.SIunits.SpecificEnthalpy hv
+      output Modelica.Units.SI.SpecificEnthalpy hv
       "specific enthalpy of vapor fraction";
     protected
       constant Real hv_coef[:,:] = CO2Data.hvcoef;
@@ -15387,7 +15387,7 @@
       extends Modelica.Icons.Function;
       input SaturationProperties sat
       "saturation properties | pressure is used for interpolation";
-      output Modelica.SIunits.SpecificEntropy sv
+      output Modelica.Units.SI.SpecificEntropy sv
       "specific entropy of vapor phase w.r.t saturation pressure";
 
     protected
@@ -15474,7 +15474,7 @@
       extends Modelica.Icons.Function;
       input SaturationProperties sat
       "saturation properties | pressure is used for interpolation";
-      output Modelica.SIunits.SpecificEntropy sl
+      output Modelica.Units.SI.SpecificEntropy sl
       "specific entropy of liquid phase w.r.t saturation pressure";
     protected
       constant Real sl_coef[:,:] = CO2Data.slcoef;
@@ -15595,7 +15595,7 @@
       SaturationProperties sat;
       Common.PhaseBoundaryProperties vap;
 
-      Modelica.SIunits.MassFraction x;
+      Modelica.Units.SI.MassFraction x;
 
     algorithm
       if getPhase_ph(state.p, state.h)==2 then
@@ -15622,7 +15622,7 @@
       Real omega_log "log of effective cross section";
       Real omega "effective cross section";
 
-      constant Modelica.SIunits.Temperature epsilon_k=251.196
+      constant Modelica.Units.SI.Temperature epsilon_k=251.196
       "energy scaling parameter";
       constant Real a[5]={2.35156e-01,-4.91266e-01,5.211155e-02,5.347906e-02,-1.537102e-02}
       "Coefficients for term of effective cross section";
@@ -15665,20 +15665,20 @@
       Common.HelmholtzDerivs f;
       Common.HelmholtzDerivs f_ref;
 
-      Modelica.SIunits.ThermalConductivity lambda_crit;
-      Modelica.SIunits.ThermalConductivity chi_star;
-      Modelica.SIunits.ThermalConductivity chi_star_ref;
-      Modelica.SIunits.ThermalConductivity delta_chi;
+      Modelica.Units.SI.ThermalConductivity lambda_crit;
+      Modelica.Units.SI.ThermalConductivity chi_star;
+      Modelica.Units.SI.ThermalConductivity chi_star_ref;
+      Modelica.Units.SI.ThermalConductivity delta_chi;
       Real dddp;
       Real dddp_ref;
-      Modelica.SIunits.Length xi;
-      Modelica.SIunits.SpecificHeatCapacity cp;
-      Modelica.SIunits.SpecificHeatCapacity cv;
-      Modelica.SIunits.DynamicViscosity eta;
-      Modelica.SIunits.ThermalConductivity omega;
-      Modelica.SIunits.ThermalConductivity omega_0;
+      Modelica.Units.SI.Length xi;
+      Modelica.Units.SI.SpecificHeatCapacity cp;
+      Modelica.Units.SI.SpecificHeatCapacity cv;
+      Modelica.Units.SI.DynamicViscosity eta;
+      Modelica.Units.SI.ThermalConductivity omega;
+      Modelica.Units.SI.ThermalConductivity omega_0;
 
-      constant Modelica.SIunits.Temperature epsilon_k=251.196
+      constant Modelica.Units.SI.Temperature epsilon_k=251.196
       "energy scaling parameter";
       constant Real c[5]={2.387869e-2, 4.350794, -10.33404, 7.981590, -1.940558};
       Real r;
@@ -15686,15 +15686,15 @@
       constant Real b[8]={0.4226159, 0.6280115, -0.5387661, 0.6735941, 0.0, 0.0, -0.4362677, 0.2255388};
       constant Real d[4]={2.447164e-2, 8.705605e-5, -6.547950e-8, 6.594919e-11};
       Real T_star "reduced temperature";
-      Modelica.SIunits.ThermalConductivity lambda_0;
-      Modelica.SIunits.ThermalConductivity lambda_d;
+      Modelica.Units.SI.ThermalConductivity lambda_0;
+      Modelica.Units.SI.ThermalConductivity lambda_d;
       Real c_k;
 
       constant Real q_d = 1/4.0e-10;
-      constant Modelica.SIunits.Density rho_crit = 467.69;
-      constant Modelica.SIunits.Pressure p_crit = 7.3721e6;
-      constant Modelica.SIunits.Temperature T_crit = 304.107;
-      constant Modelica.SIunits.Temperature T_ref = 450;
+      constant Modelica.Units.SI.Density rho_crit = 467.69;
+      constant Modelica.Units.SI.Pressure p_crit = 7.3721e6;
+      constant Modelica.Units.SI.Temperature T_crit = 304.107;
+      constant Modelica.Units.SI.Temperature T_ref = 450;
       constant Real xi_0 = 1.5e-10;
       constant Real nu = 0.63;
       constant Real gamma = 1.2415;
@@ -15908,8 +15908,8 @@
 
       extends Modelica.Icons.Function;
 
-      input Modelica.SIunits.Pressure p;
-      input Modelica.SIunits.SpecificEnthalpy h;
+      input Modelica.Units.SI.Pressure p;
+      input Modelica.Units.SI.SpecificEnthalpy h;
       input Integer phase;
       output Common.InverseDerivatives_rhoT derivs;
 
@@ -15959,20 +15959,20 @@
 
       extends Modelica.Icons.Function;
 
-      input Modelica.SIunits.Pressure p "pressure";
-      input Modelica.SIunits.SpecificEnthalpy h "specific enthalpy";
-      output Modelica.SIunits.Density d "density";
-      output Modelica.SIunits.Temperature T "temperature";
+      input Modelica.Units.SI.Pressure p "pressure";
+      input Modelica.Units.SI.SpecificEnthalpy h "specific enthalpy";
+      output Modelica.Units.SI.Density d "density";
+      output Modelica.Units.SI.Temperature T "temperature";
     protected
       SaturationProperties sat(psat=p, Tsat=0);
-      Modelica.SIunits.Pressure delp=1.0e-2 "relative error in p in iteration";
-      Modelica.SIunits.SpecificEnthalpy delh=1.0e-2
+      Modelica.Units.SI.Pressure delp=1.0e-2 "relative error in p in iteration";
+      Modelica.Units.SI.SpecificEnthalpy delh=1.0e-2
         "relative error in h in iteration";
       constant XRGMedia.CO2Data.Ideal idc "ideal gas coefficients";
       constant XRGMedia.CO2Data.Residual resc "residual coefficients";
-      Modelica.SIunits.SpecificEnthalpy hvapor=
+      Modelica.Units.SI.SpecificEnthalpy hvapor=
           dewEnthalpy(sat=sat);
-      Modelica.SIunits.SpecificEnthalpy hliquid=
+      Modelica.Units.SI.SpecificEnthalpy hliquid=
           bubbleEnthalpy(sat=sat);
       Integer error "iteration error";
       Real x "steam quality";
@@ -16004,14 +16004,14 @@
 
       extends Modelica.Icons.Function;
 
-      input Modelica.SIunits.Pressure p "pressure";
-      input Modelica.SIunits.SpecificEnthalpy h "enthalpy";
-      input Modelica.SIunits.Pressure delp "relative error in p in iteration";
-      input Modelica.SIunits.SpecificEnthalpy delh
+      input Modelica.Units.SI.Pressure p "pressure";
+      input Modelica.Units.SI.SpecificEnthalpy h "enthalpy";
+      input Modelica.Units.SI.Pressure delp "relative error in p in iteration";
+      input Modelica.Units.SI.SpecificEnthalpy delh
         "relative error in h in iteration";
 
-      output Modelica.SIunits.Density d "density";
-      output Modelica.SIunits.Temperature T "temperature";
+      output Modelica.Units.SI.Density d "density";
+      output Modelica.Units.SI.Temperature T "temperature";
       output Integer error "1 if had not converged";
 
     protected
@@ -16025,7 +16025,7 @@
       Real a_rho_start[6]={3.533899e2,-1.37164e-3,3.48988e-9,2.29267e-15, 1.01064e-20,1.1411e-26};
       Real a_T_start[6]={4.1554e2,5.69608e-4,6.7811e-11,2.0382e-16,-2.0541e-21,7.0334e-28};
 
-      Modelica.SIunits.SpecificEnthalpy hl;
+      Modelica.Units.SI.SpecificEnthalpy hl;
       Boolean liquid;
       Boolean supercritical;
       Integer int;
@@ -16127,13 +16127,13 @@
 
       extends Modelica.Icons.Function;
 
-      input Modelica.SIunits.Pressure p "pressure";
-      input Modelica.SIunits.SpecificEntropy s "specific entropy";
-      input Modelica.SIunits.Pressure delp "iteration accuracy";
-      input Modelica.SIunits.SpecificEntropy dels "iteration accuracy";
+      input Modelica.Units.SI.Pressure p "pressure";
+      input Modelica.Units.SI.SpecificEntropy s "specific entropy";
+      input Modelica.Units.SI.Pressure delp "iteration accuracy";
+      input Modelica.Units.SI.SpecificEntropy dels "iteration accuracy";
 
-      output Modelica.SIunits.Density d "density";
-      output Modelica.SIunits.Temperature T "temperature (K)";
+      output Modelica.Units.SI.Density d "density";
+      output Modelica.Units.SI.Temperature T "temperature (K)";
       output Integer error "error flag: trouble if different from 0";
       output Integer i;
 
@@ -16224,8 +16224,8 @@
       "calculation of helmholtz derivatives by density and temperature"
       extends Modelica.Icons.Function;
 
-      input Modelica.SIunits.Density d "density";
-      input Modelica.SIunits.Temperature T "temperature";
+      input Modelica.Units.SI.Density d "density";
+      input Modelica.Units.SI.Temperature T "temperature";
       output Common.HelmholtzDerivs f "helmholtz derivatives";
     protected
       Real delta;
@@ -16405,16 +16405,16 @@
 
       extends Modelica.Icons.Function;
 
-      input Modelica.SIunits.Pressure p "pressure";
-      input Modelica.SIunits.SpecificEnthalpy h "specific enthalpy";
+      input Modelica.Units.SI.Pressure p "pressure";
+      input Modelica.Units.SI.SpecificEnthalpy h "specific enthalpy";
 
       output Integer phase "number of phases";
 
     protected
      SaturationProperties sat(psat=p, Tsat=0);
-     Modelica.SIunits.SpecificEnthalpy hl=bubbleEnthalpy(sat);
-     Modelica.SIunits.SpecificEnthalpy hv=dewEnthalpy(sat);
 
+     Modelica.Units.SI.SpecificEnthalpy hl=bubbleEnthalpy(sat);
+     Modelica.Units.SI.SpecificEnthalpy hv=dewEnthalpy(sat);
     algorithm
     phase := if ((h < hl) or (h > hv) or (p > CO2Data.data.FPCRIT)) then 1 else 2;
 
@@ -16425,15 +16425,15 @@
 
       extends Modelica.Icons.Function;
 
-      input Modelica.SIunits.Pressure p "pressure";
-      input Modelica.SIunits.SpecificEntropy s "specific entropy";
+      input Modelica.Units.SI.Pressure p "pressure";
+      input Modelica.Units.SI.SpecificEntropy s "specific entropy";
       output Integer phase "number of phases";
 
     protected
      SaturationProperties sat(psat=p, Tsat=0);
-     Modelica.SIunits.SpecificEntropy sl=bubbleEntropy(sat);
-     Modelica.SIunits.SpecificEntropy sv=dewEntropy(sat);
 
+     Modelica.Units.SI.SpecificEntropy sl=bubbleEntropy(sat);
+     Modelica.Units.SI.SpecificEntropy sv=dewEntropy(sat);
     algorithm
     phase := if ((s < sl) or (s > sv) or (p > CO2Data.data.FPCRIT)) then 1 else 2;
 
@@ -16445,17 +16445,17 @@
 
       extends Modelica.Icons.Function;
 
-      input Modelica.SIunits.Pressure p "pressure";
-      input Modelica.SIunits.SpecificEntropy s "specific entropy";
-      output Modelica.SIunits.SpecificEnthalpy h "specific enthalpy";
+      input Modelica.Units.SI.Pressure p "pressure";
+      input Modelica.Units.SI.SpecificEntropy s "specific entropy";
+      output Modelica.Units.SI.SpecificEnthalpy h "specific enthalpy";
 
     protected
       SaturationProperties sat;
-      Modelica.SIunits.MassFraction x;
-      Modelica.SIunits.SpecificEntropy sl;
-      Modelica.SIunits.SpecificEntropy sv;
-      Modelica.SIunits.SpecificEnthalpy hl;
-      Modelica.SIunits.SpecificEnthalpy hv;
+      Modelica.Units.SI.MassFraction x;
+      Modelica.Units.SI.SpecificEntropy sl;
+      Modelica.Units.SI.SpecificEntropy sv;
+      Modelica.Units.SI.SpecificEnthalpy hl;
+      Modelica.Units.SI.SpecificEnthalpy hv;
     algorithm
       sat.psat := p;
       // dummy
@@ -16474,13 +16474,13 @@
 
       extends Modelica.Icons.Function;
 
-      input Modelica.SIunits.Temperature T "temperature";
-      input Modelica.SIunits.Density d "density";
+      input Modelica.Units.SI.Temperature T "temperature";
+      input Modelica.Units.SI.Density d "density";
       output Common.PhaseBoundaryProperties liq
         "properties on liquid boundary phase";
     protected
-      Modelica.SIunits.Temperature T_liq;
-      Modelica.SIunits.Density d_liq;
+      Modelica.Units.SI.Temperature T_liq;
+      Modelica.Units.SI.Density d_liq;
       Common.HelmholtzDerivs f;
     algorithm
       if T < CO2Data.data.FTCRIT then
@@ -16503,13 +16503,13 @@
 
       extends Modelica.Icons.Function;
 
-      input Modelica.SIunits.Temperature T "temperature";
-      input Modelica.SIunits.Density d "density";
+      input Modelica.Units.SI.Temperature T "temperature";
+      input Modelica.Units.SI.Density d "density";
       output Common.PhaseBoundaryProperties vap
         "properties on vapor boundary phase";
     protected
-      Modelica.SIunits.Temperature T_vap;
-      Modelica.SIunits.Density d_vap;
+      Modelica.Units.SI.Temperature T_vap;
+      Modelica.Units.SI.Density d_vap;
       Common.HelmholtzDerivs f;
     algorithm
       if T < CO2Data.data.FTCRIT then
@@ -16531,8 +16531,8 @@
     function rho_ph_der "derivative function of rho_ph"
     extends Modelica.Icons.Function;
 
-    input Modelica.SIunits.Pressure p "pressure";
-    input Modelica.SIunits.SpecificEnthalpy h "specific enthalpy";
+    input Modelica.Units.SI.Pressure p "pressure";
+    input Modelica.Units.SI.SpecificEnthalpy h "specific enthalpy";
     input Common.InverseDerivatives_rhoT derivs "record for derivatives";
     input Real p_der "derivative of pressure";
     input Real h_der "derivative of specific enthalpy";
@@ -16553,11 +16553,11 @@
     function rho_props_ph "density as function of pressure and specific enthalpy"
       extends Modelica.Icons.Function;
 
-      input Modelica.SIunits.Pressure p "pressure";
-      input Modelica.SIunits.SpecificEnthalpy h "specific enthalpy";
+      input Modelica.Units.SI.Pressure p "pressure";
+      input Modelica.Units.SI.SpecificEnthalpy h "specific enthalpy";
       input Common.InverseDerivatives_rhoT derivs
         "record for the calculation of rho_ph_der";
-      output Modelica.SIunits.Density d "density";
+      output Modelica.Units.SI.Density d "density";
     algorithm
       d := derivs.rho;
 
@@ -16570,8 +16570,8 @@
     function T_ph_der "derivative function of T_ph"
     extends Modelica.Icons.Function;
 
-    input Modelica.SIunits.Pressure p "pressure";
-    input Modelica.SIunits.SpecificEnthalpy h "specific enthalpy";
+    input Modelica.Units.SI.Pressure p "pressure";
+    input Modelica.Units.SI.SpecificEnthalpy h "specific enthalpy";
     input Common.InverseDerivatives_rhoT derivs "auxiliary record";
     input Real p_der "derivative of pressure";
     input Real h_der "derivative of specific enthalpy";
@@ -16591,11 +16591,11 @@
     function T_props_ph "temperature as function of pressure and specific enthalpy"
       extends Modelica.Icons.Function;
 
-      input Modelica.SIunits.Pressure p "pressure";
-      input Modelica.SIunits.SpecificEnthalpy h "specific enthalpy";
+      input Modelica.Units.SI.Pressure p "pressure";
+      input Modelica.Units.SI.SpecificEnthalpy h "specific enthalpy";
       input Common.InverseDerivatives_rhoT derivs
         "record for the calculation of T_ph_der";
-      output Modelica.SIunits.Temperature T "density";
+      output Modelica.Units.SI.Temperature T "density";
     algorithm
       T := derivs.T;
 
@@ -16780,15 +16780,15 @@
   end CO2_ph;
 
   package CO2Data "CO2 (R744) data required by package CO2_ph"
-  import Modelica.SIunits;
+  import Modelica.Units.SI;
 
     extends Modelica.Icons.Package;
-    constant SIunits.SpecificHeatCapacity R=data.R;
+    constant SI.SpecificHeatCapacity R=data.R;
     constant Integer Npoints=478;
     constant Integer Ninterval=Npoints - 1;
-    constant Modelica.SIunits.SpecificEnthalpy h_offset=506.778e3;
-    constant Modelica.SIunits.SpecificInternalEnergy u_offset=503.020e3;
-    constant Modelica.SIunits.SpecificEntropy s_offset=2.739e3;
+    constant Modelica.Units.SI.SpecificEnthalpy h_offset=506.778e3;
+    constant Modelica.Units.SI.SpecificInternalEnergy u_offset=503.020e3;
+    constant Modelica.Units.SI.SpecificEntropy s_offset=2.739e3;
     constant Real[Npoints] pbreaks={7.021015968662282e-002, 7.053659622388628e-002, 7.081165865137355e-002, 7.144076152515623e-002, 7.207833502110553e-002, 7.272450977542642e-002, 7.337945901267051e-002, 7.404333187402537e-002, 7.471629380691874e-002, 7.539849935225054e-002, 7.609011960102413e-002, 7.679131464231040e-002, 7.750227554011570e-002, 7.822318269070905e-002, 7.895420542032645e-002, 7.969554474021336e-002, 8.044737643912703e-002, 8.120990857356041e-002, 8.198333820944606e-002, 8.276786622454246e-002, 8.354771098298068e-002, 8.429577560955064e-002, 8.504886633628400e-002, 8.580700441273058e-002, 8.657021114416662e-002, 8.733850776453903e-002, 8.811191563235363e-002, 8.889045603569432e-002, 8.967415038294056e-002, 9.046302005888701e-002, 9.125708642415456e-002, 9.205637100166134e-002, 9.286089524067284e-002, 9.367068061393190e-002, 9.448574862296025e-002, 9.530612088971509e-002, 9.613181889991282e-002, 9.696286429581123e-002, 9.779927868116463e-002, 9.864108374347390e-002, 9.948830107540578e-002, 1.003409524803612e-001, 1.011990595987061e-001, 1.020626441910413e-001, 1.029317280449241e-001, 1.038063329673694e-001, 1.046864807945966e-001, 1.055721933272012e-001, 1.064634924787062e-001, 1.073604000993502e-001, 1.082629381856388e-001, 1.091711286351995e-001, 1.100849934337919e-001, 1.110045545623002e-001, 1.119298340820502e-001, 1.128608539943808e-001, 1.137976364138621e-001, 1.147402034168887e-001, 1.156885771202562e-001, 1.166427796790404e-001, 1.176028332775298e-001, 1.185687600960764e-001, 1.195405823335022e-001, 1.205183222791851e-001, 1.215020021868998e-001, 1.224916443305387e-001, 1.234872710442062e-001, 1.244889047133239e-001, 1.254965676300238e-001, 1.265102822583044e-001, 1.275300709739129e-001, 1.285559562564901e-001, 1.295879605315062e-001, 1.306261063336599e-001, 1.316704161335227e-001, 1.327209125423982e-001, 1.337776180593319e-001, 1.348405553395511e-001, 1.359097469336515e-001, 1.369852155768759e-001, 1.380669838382744e-001, 1.391550744786455e-001, 1.402495102021822e-001, 1.413503137063968e-001, 1.424575078270900e-001, 1.435711153432784e-001, 1.446911590574732e-001, 1.458176618369937e-001, 1.469506465083357e-001, 1.480901360312694e-001, 1.492361532629388e-001, 1.503887212093474e-001, 1.515478628045653e-001, 1.527136010598159e-001, 1.538859590071518e-001, 1.550649596835211e-001, 1.562506261783517e-001, 1.574429815749823e-001, 1.586420490156128e-001, 1.598478516669065e-001, 1.610604126922567e-001, 1.622797553108011e-001, 1.635059027683088e-001, 1.647388782839964e-001, 1.659787051807556e-001, 1.672254067842222e-001, 1.684790063935580e-001, 1.697395273880218e-001, 1.710069931747510e-001, 1.722814271811958e-001, 1.735628528446566e-001, 1.748512936534963e-001, 1.761467730690065e-001, 1.774493146927267e-001, 1.787589420180619e-001, 1.800756786678643e-001, 1.813995482683353e-001, 1.827305744206975e-001, 1.840687808086932e-001, 1.854141911657989e-001, 1.867668291796628e-001, 1.881267186182907e-001, 1.894938832780244e-001, 1.908683469788491e-001, 1.922501335290678e-001, 1.936392668133334e-001, 1.950357707611364e-001, 1.964396692698628e-001, 1.978509863120732e-001, 1.992697458838444e-001, 2.006959719953717e-001, 2.021296887087748e-001, 2.035709201107639e-001, 2.050196902811905e-001, 2.064760233960687e-001, 2.079399436130121e-001, 2.094114751483414e-001, 2.108906422287182e-001, 2.123774691060097e-001, 2.138719801132477e-001, 2.153741995726786e-001, 2.168841518335916e-001, 2.184018613129551e-001, 2.199273524466741e-001, 2.214606496464498e-001, 2.230017774830203e-001, 2.245507604294654e-001, 2.261076230620545e-001, 2.276723900111101e-001, 2.292450858736628e-001, 2.308257353093450e-001, 2.324143630718171e-001, 2.340109938655858e-001, 2.356156524558863e-001, 2.372283636842315e-001, 2.388491523626383e-001, 2.404780434058529e-001, 2.421150617066800e-001, 2.437602322475066e-001, 2.454135799976152e-001, 2.470751300390190e-001, 2.487449073932699e-001, 2.504229371830894e-001, 2.521092445896599e-001, 2.538038547706599e-001, 2.555067929683598e-001, 2.572180844659786e-001, 2.589377545429458e-001, 2.606658286103752e-001, 2.624023319941594e-001, 2.641472901998487e-001, 2.659007286643744e-001, 2.676626729163130e-001, 2.694331485356247e-001, 2.712121811453794e-001, 2.729997963710876e-001, 2.747960199437521e-001, 2.766008776049443e-001, 2.784143951350832e-001, 2.802365983864248e-001, 2.820675132582442e-001, 2.839071656553643e-001, 2.857555815911254e-001, 2.876127870928247e-001, 2.894788082292031e-001, 2.913536711281314e-001, 2.932374020172421e-001, 2.951300270851979e-001, 2.970315726299937e-001, 2.989420650171392e-001, 3.008615306106174e-001, 3.027899958496921e-001, 3.047274872631849e-001, 3.066740313764978e-001, 3.086296548279514e-001, 3.105943842637421e-001, 3.125682464271941e-001, 3.145512680873121e-001, 3.165434760879498e-001, 3.185448973069908e-001, 3.205555587469284e-001, 3.225754873994992e-001, 3.246047103404765e-001, 3.266432547354133e-001, 3.286911477696480e-001, 3.307484167192276e-001, 3.328150889273028e-001, 3.348911917773146e-001, 3.369767527392257e-001, 3.390717993540320e-001, 3.411763592056393e-001, 3.432904599683165e-001, 3.454141293867942e-001, 3.475473952532589e-001, 3.496902854522560e-001, 3.518428279401969e-001, 3.540050507266404e-001, 3.561769819147778e-001, 3.583586496823406e-001, 3.605500822600505e-001, 3.627513079811062e-001, 3.649623552515214e-001, 3.671832525365443e-001, 3.694140284095679e-001, 3.716547114944992e-001, 3.739053305224792e-001, 3.761659143016777e-001, 3.784364917056273e-001, 3.807170917143360e-001, 3.830077433947435e-001, 3.853084758747426e-001, 3.876193183998510e-001, 3.899403002966187e-001, 3.922714509659735e-001, 3.946127999228323e-001, 3.969643767708638e-001, 3.993262111909653e-001, 4.016983329799335e-001, 4.040807720290948e-001, 4.064735583118564e-001, 4.088767218793651e-001, 4.112902929967525e-001, 4.137143019117578e-001, 4.161487790170967e-001, 4.185937548124941e-001, 4.210492599084949e-001, 4.235153250337874e-001, 4.259919810448885e-001, 4.284792589425029e-001, 4.309771898932027e-001, 4.334858035802967e-001, 4.360051333223644e-001, 4.385352097246380e-001, 4.410760643074498e-001, 4.436277287135379e-001, 4.461902347096856e-001, 4.487636141889829e-001, 4.513478991725486e-001, 4.539431218117099e-001, 4.565493143899304e-001, 4.591665093251637e-001, 4.617947391716735e-001, 4.644340366226604e-001, 4.670844345120162e-001, 4.697459658173289e-001, 4.724186636615658e-001, 4.751025613161054e-001, 4.777976922028328e-001, 4.805040898969746e-001, 4.832217881295374e-001, 4.859508207902519e-001, 4.886912219303096e-001, 4.914430257651006e-001, 4.942062666775990e-001, 4.969809792210453e-001, 4.997671981225862e-001, 5.025649582864934e-001, 5.053742947978540e-001, 5.081952429263431e-001, 5.110278381304986e-001, 5.138721160616697e-001, 5.167281125692699e-001, 5.195958637054240e-001, 5.224754038603412e-001, 5.253667725127880e-001, 5.282700049651653e-001, 5.311851380608891e-001, 5.341122088578428e-001, 5.370512546325980e-001, 5.400023128845493e-001, 5.429654213397834e-001, 5.459406179557739e-001, 5.489279409255130e-001, 5.519274286819076e-001, 5.549391199025342e-001, 5.579630535141730e-001, 5.609992686976566e-001, 5.640478048925131e-001, 5.671087018022094e-001, 5.701819993990264e-001, 5.732677379293532e-001, 5.763659579188132e-001, 5.794767001778287e-001, 5.826000058071249e-001, 5.857359162033540e-001, 5.888844730647951e-001, 5.920457183974784e-001, 5.952196945210641e-001, 5.984064440750987e-001, 6.016060100255415e-001, 6.048184356710915e-001, 6.080437646500172e-001, 6.112820409469850e-001, 6.145333089003596e-001, 6.177976132093288e-001, 6.210749989415113e-001, 6.243655115409189e-001, 6.276691968358646e-001, 6.309861010474298e-001, 6.343162707982117e-001, 6.376597531214028e-001, 6.410165954702760e-001, 6.443868457280405e-001, 6.477705522184963e-001, 6.511677637168036e-001, 6.545785294612128e-001, 6.580028991654617e-001, 6.614409230320385e-001, 6.648926517661467e-001, 6.683581344111897e-001, 6.718374262977721e-001, 6.753305780750759e-001, 6.788376425396038e-001, 6.823586730560819e-001, 6.858937235742144e-001, 6.894428486465963e-001, 6.930061034474803e-001, 6.965835437926351e-001, 7.001752261604799e-001, 7.037812077142182e-001, 7.074015463253933e-001, 7.110363005987404e-001, 7.146855298986565e-001, 7.183492943768114e-001, 7.220276550018503e-001, 7.257206735904185e-001, 7.294284128401657e-001, 7.331509363645535e-001, 7.368883087296186e-001, 7.407023994886293e-001, 7.444762478978346e-001, 7.482020316166073e-001, 7.518801285426167e-001, 7.555109220696569e-001, 7.590948006859818e-001, 7.626321575858831e-001, 7.661233902945419e-001, 7.695689003053768e-001, 7.729690927302360e-001, 7.763243759615830e-001, 7.796351613468794e-001, 7.829018628746054e-001, 7.861248968718254e-001, 7.893046817131169e-001, 7.924416375404879e-001, 7.955361859940454e-001, 7.985887499536274e-001, 8.015997532904766e-001, 8.045696206294428e-001, 8.074987751319189e-001, 8.103876454862811e-001, 8.132366557547353e-001, 8.160462313184426e-001, 8.188167972493742e-001, 8.215487781256172e-001, 8.242425978547341e-001, 8.268986795055471e-001, 8.295174451471477e-001, 8.320993156959989e-001, 8.346447107699347e-001, 8.371540485494795e-001, 8.396277456459270e-001, 8.420662169759995e-001, 8.444698756430072e-001, 8.468391328240736e-001, 8.491743976634102e-001, 8.514760771712588e-001, 8.537445761283860e-001, 8.559802969960114e-001, 8.581836398306761e-001, 8.603550022041782e-001, 8.624947791282536e-001, 8.646033629837652e-001, 8.666811434543370e-001, 8.687285074641012e-001, 8.707458391196318e-001, 8.727335196556342e-001, 8.746919273844499e-001, 8.766214376490804e-001, 8.785224227796511e-001, 8.803952520533021e-001, 8.822402916569861e-001, 8.840579046536019e-001, 8.858484509508277e-001, 8.876122872729220e-001, 8.893497671350422e-001, 8.910612408204799e-001, 8.927470553599765e-001, 8.944075545138560e-001, 8.960430787562601e-001, 8.978035477906898e-001, 8.995670772714669e-001, 9.013336769488126e-001, 9.031033631992252e-001, 9.048761468872223e-001, 9.066520409231118e-001, 9.084310585097370e-001, 9.102132131579134e-001, 9.119985187030015e-001, 9.137869893227092e-001, 9.155786395561864e-001, 9.173734843242962e-001, 9.191715389516939e-001, 9.209728191900954e-001, 9.227773412435014e-001, 9.245851217952128e-001, 9.263961780368104e-001, 9.282105276993707e-001, 9.300281890870148e-001, 9.318491811131732e-001, 9.336735233395954e-001, 9.355012360188555e-001, 9.373323401403243e-001, 9.391668574804317e-001, 9.410048106578860e-001, 9.428462231947069e-001, 9.446911195847180e-001, 9.465395253714061e-001, 9.483914672383850e-001, 9.502469731180305e-001, 9.521060702083984e-001, 9.539687919173771e-001, 9.558351691524953e-001, 9.577052356744491e-001, 9.595790270923484e-001, 9.614565810572543e-001, 9.633379374898563e-001, 9.652231388508131e-001, 9.671122304662633e-001, 9.690052609243522e-001, 9.709022825678724e-001, 9.728033521225357e-001, 9.747085315359323e-001, 9.766178891917902e-001, 9.785314972526502e-001, 9.804494440125665e-001, 9.823718238961468e-001, 9.842987474848474e-001, 9.862303447851883e-001, 9.881667724988856e-001, 9.901082224663096e-001, 9.915677533380150e-001, 9.930303818468828e-001, 9.945564372744679e-001, 9.960227762723833e-001, 9.971250349734946e-001, 9.978611859939195e-001, 9.984140521919537e-001, 9.988937809949887e-001, 9.993371396481319e-001, 9.995220430324233e-001, 9.995960359555428e-001, 9.997070607614770e-001, 9.998060059093646e-001, 9.999049925932212e-001, 9.999545030808417e-001, 9.999792640202215e-001, 1.0};
     constant Real[Npoints] Tbreaks={0.712173353210916, 0.712524294724927, 0.712819053484217, 0.713489964870819, 0.714165369187667, 0.714845294603604, 0.715529811540735, 0.716218962252321, 0.716912803076046, 0.717611376265172, 0.718314738157383, 0.719022931005941, 0.719736025232951, 0.720454077176096, 0.721177129088638, 0.721905251392682, 0.722638486341490, 0.723376904357166, 0.724120561777393, 0.724869514939856, 0.725608721683099, 0.726312942724981, 0.727017163766863, 0.727721384808745, 0.728425605850628, 0.729129826892510, 0.729834047934392, 0.730538268976274, 0.731242490018157, 0.731946711060039, 0.732650932101921, 0.733355153143803, 0.734059374185685, 0.734763595227568, 0.735467816269450, 0.736172037311332, 0.736876258353214, 0.737580479395096, 0.738284700436979, 0.738988921478861, 0.739693142520743, 0.740397363562625, 0.741101584604507, 0.741805805646390, 0.742510026688272, 0.743214247730154, 0.743918468772036, 0.744622689813918, 0.745326910855801, 0.746031131897683, 0.746735352939565, 0.747439573981447, 0.748143795023330, 0.748848016065212, 0.749552237107094, 0.750256458148976, 0.750960679190858, 0.751664900232741, 0.752369121274623, 0.753073342316505, 0.753777563358387, 0.754481784400269, 0.755186005442152, 0.755890226484034, 0.756594447525916, 0.757298668567798, 0.758002889609681, 0.758707110651563, 0.759411331693445, 0.760115552735327, 0.760819773777209, 0.761523994819092, 0.762228215860974, 0.762932436902856, 0.763636657944738, 0.764340878986620, 0.765045100028503, 0.765749321070385, 0.766453542112267, 0.767157763154149, 0.767861984196031, 0.768566205237914, 0.769270426279796, 0.769974647321678, 0.770678868363560, 0.771383089405443, 0.772087310447325, 0.772791531489207, 0.773495752531089, 0.774199973572971, 0.774904194614854, 0.775608415656736, 0.776312636698618, 0.777016857740500, 0.777721078782382, 0.778425299824265, 0.779129520866147, 0.779833741908029, 0.780537962949911, 0.781242183991793, 0.781946405033676, 0.782650626075558, 0.783354847117440, 0.784059068159322, 0.784763289201205, 0.785467510243087, 0.786171731284969, 0.786875952326851, 0.787580173368733, 0.788284394410616, 0.788988615452498, 0.789692836494380, 0.790397057536262, 0.791101278578145, 0.791805499620027, 0.792509720661909, 0.793213941703791, 0.793918162745673, 0.794622383787555, 0.795326604829438, 0.796030825871320, 0.796735046913202, 0.797439267955084, 0.798143488996967, 0.798847710038849, 0.799551931080731, 0.800256152122613, 0.800960373164495, 0.801664594206378, 0.802368815248260, 0.803073036290142, 0.803777257332024, 0.804481478373906, 0.805185699415789, 0.805889920457671, 0.806594141499553, 0.807298362541435, 0.808002583583318, 0.808706804625200, 0.809411025667082, 0.810115246708964, 0.810819467750846, 0.811523688792729, 0.812227909834611, 0.812932130876493, 0.813636351918375, 0.814340572960257, 0.815044794002140, 0.815749015044022, 0.816453236085904, 0.817157457127786, 0.817861678169668, 0.818565899211551, 0.819270120253433, 0.819974341295315, 0.820678562337197, 0.821382783379080, 0.822087004420962, 0.822791225462844, 0.823495446504726, 0.824199667546608, 0.824903888588491, 0.825608109630373, 0.826312330672255, 0.827016551714137, 0.827720772756019, 0.828424993797902, 0.829129214839784, 0.829833435881666, 0.830537656923548, 0.831241877965430, 0.831946099007313, 0.832650320049195, 0.833354541091077, 0.834058762132959, 0.834762983174842, 0.835467204216724, 0.836171425258606, 0.836875646300488, 0.837579867342370, 0.838284088384253, 0.838988309426135, 0.839692530468017, 0.840396751509899, 0.841100972551782, 0.841805193593664, 0.842509414635546, 0.843213635677428, 0.843917856719310, 0.844622077761192, 0.845326298803075, 0.846030519844957, 0.846734740886839, 0.847438961928721, 0.848143182970604, 0.848847404012486, 0.849551625054368, 0.850255846096250, 0.850960067138132, 0.851664288180015, 0.852368509221897, 0.853072730263779, 0.853776951305661, 0.854481172347544, 0.855185393389426, 0.855889614431308, 0.856593835473190, 0.857298056515072, 0.858002277556955, 0.858706498598837, 0.859410719640719, 0.860114940682601, 0.860819161724483, 0.861523382766366, 0.862227603808248, 0.862931824850130, 0.863636045892012, 0.864340266933894, 0.865044487975777, 0.865748709017659, 0.866452930059541, 0.867157151101423, 0.867861372143306, 0.868565593185188, 0.869269814227070, 0.869974035268952, 0.870678256310835, 0.871382477352717, 0.872086698394599, 0.872790919436481, 0.873495140478363, 0.874199361520245, 0.874903582562128, 0.875607803604010, 0.876312024645892, 0.877016245687774, 0.877720466729657, 0.878424687771539, 0.879128908813421, 0.879833129855303, 0.880537350897185, 0.881241571939067, 0.881945792980950, 0.882650014022832, 0.883354235064714, 0.884058456106596, 0.884762677148479, 0.885466898190361, 0.886171119232243, 0.886875340274125, 0.887579561316007, 0.888283782357890, 0.888988003399772, 0.889692224441654, 0.890396445483536, 0.891100666525419, 0.891804887567301, 0.892509108609183, 0.893213329651065, 0.893917550692947, 0.894621771734830, 0.895325992776712, 0.896030213818594, 0.896734434860476, 0.897438655902359, 0.898142876944241, 0.898847097986123, 0.899551319028005, 0.900255540069887, 0.900959761111769, 0.901663982153652, 0.902368203195534, 0.903072424237416, 0.903776645279298, 0.904480866321180, 0.905185087363063, 0.905889308404945, 0.906593529446827, 0.907297750488709, 0.908001971530592, 0.908706192572474, 0.909410413614356, 0.910114634656238, 0.910818855698120, 0.911523076740003, 0.912227297781885, 0.912931518823767, 0.913635739865649, 0.914339960907532, 0.915044181949414, 0.915748402991296, 0.916452624033178, 0.917156845075060, 0.917861066116943, 0.918565287158825, 0.919269508200707, 0.919973729242589, 0.920677950284471, 0.921382171326354, 0.922086392368236, 0.922790613410118, 0.923494834452000, 0.924199055493882, 0.924903276535765, 0.925607497577647, 0.926311718619529, 0.927015939661411, 0.927720160703293, 0.928424381745176, 0.929128602787058, 0.929832823828940, 0.930537044870822, 0.931241265912705, 0.931945486954587, 0.932649707996469, 0.933353929038351, 0.934058150080234, 0.934762371122116, 0.935466592163998, 0.936170813205880, 0.936875034247762, 0.937579255289644, 0.938283476331527, 0.938987697373409, 0.939691918415291, 0.940396139457173, 0.941100360499055, 0.941804581540938, 0.942508802582820, 0.943213023624702, 0.943917244666584, 0.944621465708467, 0.945325686750349, 0.946029907792231, 0.946734128834113, 0.947438349875996, 0.948142570917878, 0.948846791959760, 0.949551013001642, 0.950255234043524, 0.950959455085407, 0.951663676127289, 0.952367897169171, 0.953072118211053, 0.953776339252935, 0.954480560294818, 0.955184781336700, 0.955889002378582, 0.956593223420464, 0.957309020248766, 0.958014422847513, 0.958708088829500, 0.959390213470694, 0.960060988798020, 0.960720603643428, 0.961369243697047, 0.962007091559457, 0.962634326793101, 0.963251125972825, 0.963857662735595, 0.964454107829368, 0.965040629161171, 0.965617391844360, 0.966184558245106, 0.966742288028102, 0.967290738201511, 0.967830063161165, 0.968360414734030, 0.968881942220948, 0.969394792438667, 0.969899109761171, 0.970395036160320, 0.970882711245826, 0.971362272304545, 0.971833854339131, 0.972297590106039, 0.972753610152898, 0.973202042855262, 0.973643014452749, 0.974076649084578, 0.974503068824520, 0.974922393715258, 0.975334741802183, 0.975740229166627, 0.976138969958538, 0.976531076428618, 0.976916658959920, 0.977295826098923, 0.977668684586093, 0.978035339385926, 0.978395893716500, 0.978750449078533, 0.979099105283955, 0.979441960484005, 0.979779111196868, 0.980110652334839, 0.980436677231045, 0.980757277665719, 0.981072543892040, 0.981382564661538, 0.981687427249075, 0.981987217477423, 0.982282019741417, 0.982571917031714, 0.982856990958159, 0.983137321772757, 0.983412988392267, 0.983684068420414, 0.983950638169740, 0.984212772683085, 0.984494461099837, 0.984776149516590, 0.985057837933343, 0.985339526350096, 0.985621214766849, 0.985902903183602, 0.986184591600355, 0.986466280017108, 0.986747968433861, 0.987029656850614, 0.987311345267366, 0.987593033684119, 0.987874722100872, 0.988156410517625, 0.988438098934378, 0.988719787351131, 0.989001475767884, 0.989283164184637, 0.989564852601389, 0.989846541018142, 0.990128229434895, 0.990409917851648, 0.990691606268401, 0.990973294685154, 0.991254983101907, 0.991536671518660, 0.991818359935412, 0.992100048352165, 0.992381736768918, 0.992663425185671, 0.992945113602424, 0.993226802019177, 0.993508490435930, 0.993790178852683, 0.994071867269436, 0.994353555686188, 0.994635244102941, 0.994916932519694, 0.995198620936447, 0.995480309353200, 0.995761997769953, 0.996043686186706, 0.996325374603458, 0.996607063020212, 0.996888751436964, 0.997170439853717, 0.997452128270470, 0.997733816687223, 0.998015505103976, 0.998297193520729, 0.998578881937482, 0.998790148250046, 0.999001414562611, 0.999221339977107, 0.999432144320668, 0.999590247578339, 0.999695649750119, 0.999774701378955, 0.999843212790612, 0.999906454093681, 0.999932804636626, 0.999943344853804, 0.999959155179571, 0.999973239600408, 0.999987324021246, 0.999994366231665, 0.999997887336874, 1.0};
     constant Real[Ninterval, 4] Tcoef={{1.466157356216828e+004, -1.763722663459683e+003, 3.275327130069820e+002, 2.165920000000000e+002},
@@ -21564,20 +21564,20 @@
 
     record crit
       extends Modelica.Icons.Record;
-      constant SIunits.Temperature TCRIT=304.1282;
-      constant SIunits.Pressure PCRIT=7377300.0;
-      constant SIunits.Density DCRIT=467.59972402;
+      constant SI.Temperature TCRIT=304.1282;
+      constant SI.Pressure PCRIT=7377300.0;
+      constant SI.Density DCRIT=467.59972402;
 
     end crit;
 
     record data
 
-      constant SIunits.SpecificHeatCapacity R=188.9231;
+      constant SI.SpecificHeatCapacity R=188.9231;
       // 8.314471/0.0440098
-      constant SIunits.MolarMass MM=0.0440098;
+      constant SI.MolarMass MM=0.0440098;
       extends crit;
-      constant SIunits.SpecificEnthalpy HCRIT=332.25e3;
-      constant SIunits.SpecificEntropy SCRIT=1.4336e3;
+      constant SI.SpecificEnthalpy HCRIT=332.25e3;
+      constant SI.SpecificEntropy SCRIT=1.4336e3;
       extends fcrit;
       extends triple;
 
@@ -21585,9 +21585,9 @@
 
     record fcrit
       extends Modelica.Icons.Record;
-      constant SIunits.Temperature FTCRIT=304.1282;
-      constant SIunits.Pressure FPCRIT=7377300.0;
-      constant SIunits.Density FDCRIT=467.59972402;
+      constant SI.Temperature FTCRIT=304.1282;
+      constant SI.Pressure FPCRIT=7377300.0;
+      constant SI.Density FDCRIT=467.59972402;
 
     end fcrit;
 
@@ -21601,8 +21601,8 @@
 
     record ReferenceStates
       extends Modelica.Icons.Record;
-      constant SIunits.SpecificEnthalpy h0=1.0;
-      constant SIunits.SpecificEntropy s0=1.0;
+      constant SI.SpecificEnthalpy h0=1.0;
+      constant SI.SpecificEntropy s0=1.0;
 
     end ReferenceStates;
 
@@ -21636,10 +21636,10 @@
 
     record triple
       extends Modelica.Icons.Record;
-      constant SIunits.Temperature TTRIPLE=216.592;
-      constant SIunits.Pressure PTRIPLE=517.95e3;
-      constant SIunits.Density DLTRIPLE=1178.53;
-      constant SIunits.Density DVTRIPLE=13.7614;
+      constant SI.Temperature TTRIPLE=216.592;
+      constant SI.Pressure PTRIPLE=517.95e3;
+      constant SI.Density DLTRIPLE=1178.53;
+      constant SI.Density DVTRIPLE=13.7614;
 
     end triple;
 
@@ -21760,8 +21760,8 @@
     protected
      SaturationProperties sat(psat=p, Tsat=0)
       "saturation temperature and pressure";
-     Modelica.SIunits.SpecificEnthalpy hl=bubbleEnthalpy(sat) "liquid enthalpy";
-     Modelica.SIunits.SpecificEnthalpy hv=dewEnthalpy(sat) "vapor enthalpy";
+     Modelica.Units.SI.SpecificEnthalpy hl=bubbleEnthalpy(sat) "liquid enthalpy";
+     Modelica.Units.SI.SpecificEnthalpy hv=dewEnthalpy(sat) "vapor enthalpy";
 
     algorithm
     state.p :=p;
@@ -21794,10 +21794,10 @@
     "set state for density and temperature (X not used since single substance)"
     protected
       Common.HelmholtzDerivs f "helmholtz derivatives";
-      Modelica.SIunits.SpecificHeatCapacity R "specific gas constant";
+      Modelica.Units.SI.SpecificHeatCapacity R "specific gas constant";
       SaturationProperties sat "saturation temperature and pressure";
-      Modelica.SIunits.Density dl "liquid density";
-      Modelica.SIunits.Density dv "vapor density";
+      Modelica.Units.SI.Density dl "liquid density";
+      Modelica.Units.SI.Density dv "vapor density";
 
     algorithm
        R := R1234yfData.R;
@@ -21847,8 +21847,8 @@
     "set state for pressure and specific entropy (X not used since single substance)"
 
     protected
-      Modelica.SIunits.Pressure delp=1e-2 "iteration accuracy for pressure";
-      Modelica.SIunits.SpecificEntropy dels=1e-1 "iteration accuracy for entropy";
+      Modelica.Units.SI.Pressure delp=1e-2 "iteration accuracy for pressure";
+      Modelica.Units.SI.SpecificEntropy dels=1e-1 "iteration accuracy for entropy";
       Integer error "if newton iteration fails (too many calls)";
       Common.HelmholtzDerivs f "helmholtz derivatives";
       SaturationProperties sat "saturation temperature and pressure";
@@ -22026,12 +22026,12 @@
     redeclare function temperature_ph
     "temperature as function of pressure and specific enthalpy"
       extends Modelica.Icons.Function;
-      input Modelica.SIunits.Pressure p "pressure";
-      input Modelica.SIunits.SpecificEnthalpy h "specific enthalpy";
+      input Modelica.Units.SI.Pressure p "pressure";
+      input Modelica.Units.SI.SpecificEnthalpy h "specific enthalpy";
       input Integer phase =   0
       "2 for two-phase, 1 for one-phase, 0 if not known";
-      output Modelica.SIunits.Temperature T "temperature";
 
+      output Modelica.Units.SI.Temperature T "temperature";
     algorithm
       T := T_props_ph(p, h,
         derivsOf_ph(p, h, getPhase_ph(p,h)));
@@ -22101,7 +22101,7 @@
       SaturationProperties sat "saturation temperature and pressure";
       Common.PhaseBoundaryProperties vap "properties on vapor phase boundary";
 
-      Modelica.SIunits.MassFraction x "vapor quality";
+      Modelica.Units.SI.MassFraction x "vapor quality";
 
     algorithm
       if getPhase_ph(state.p, state.h)==2 then
@@ -22186,7 +22186,7 @@
       "time derivative of saturation temperature in two-phase region"
       extends Modelica.Icons.Function;
 
-      input Modelica.SIunits.AbsolutePressure p "pressure";
+      input Modelica.Units.SI.AbsolutePressure p "pressure";
       input Real der_p "time derivative of pressure";
       output Real der_Tsat "time derivative of saturation temperature";
     protected
@@ -22855,7 +22855,7 @@
       SaturationProperties sat "saturation temperature and pressure";
       Common.PhaseBoundaryProperties vap "properties on vapor phase boundary";
 
-      Modelica.SIunits.MassFraction x "vapor quality";
+      Modelica.Units.SI.MassFraction x "vapor quality";
 
     algorithm
       if getPhase_ph(state.p, state.h)==2 then
@@ -22891,13 +22891,13 @@
       constant Real K0=0.021357
       "Constant for low density term eta_star for R134a";
       constant Real beta=0.98791 "correction factor";
-      constant Modelica.SIunits.Length sigma=0.53280e-09
+      constant Modelica.Units.SI.Length sigma=0.53280e-09
       "Hard-sphere diameter for R1234yf";
-      constant Modelica.SIunits.Length sigma0=0.50647e-09
+      constant Modelica.Units.SI.Length sigma0=0.50647e-09
       "Hard-sphere diameter for R134a";
-      constant Modelica.SIunits.Temperature epsilon_k=281.14
+      constant Modelica.Units.SI.Temperature epsilon_k=281.14
       "empirical factor for R1234yf";
-      constant Modelica.SIunits.Temperature epsilon_k0=288.82
+      constant Modelica.Units.SI.Temperature epsilon_k0=288.82
       "empirical factor for R134a";
       constant Real a[6]={1.16145, -0.14874, 0.52487, -0.77320, 2.16178, -2.43787}
       "Coefficients for term of collision integral of R1234yf";
@@ -23006,27 +23006,27 @@
     protected
       Common.HelmholtzDerivs f "helmholtz derivatives";
       Common.HelmholtzDerivs f_ref "helmholtz derivatives for reference state";
-      Modelica.SIunits.ThermalConductivity lambda_dg
+      Modelica.Units.SI.ThermalConductivity lambda_dg
       "dilute gas contribution to lambda";
       R1234yfData.CoeffsThermalConductivity coeff
       "coefficients of thermal conductivity model";
-      Modelica.SIunits.ThermalConductivity lambda_reduced "reduced lambda";
-      Modelica.SIunits.ThermalConductivity lambda_crit
+      Modelica.Units.SI.ThermalConductivity lambda_reduced "reduced lambda";
+      Modelica.Units.SI.ThermalConductivity lambda_crit
       "enhancement of lambda in the critical region";
-      Modelica.SIunits.ThermalConductivity chi_star "correlation length";
-      Modelica.SIunits.ThermalConductivity chi_star_ref "correlation length";
-      Modelica.SIunits.ThermalConductivity delta_chi "chi_star - chi_star_ref";
+      Modelica.Units.SI.ThermalConductivity chi_star "correlation length";
+      Modelica.Units.SI.ThermalConductivity chi_star_ref "correlation length";
+      Modelica.Units.SI.ThermalConductivity delta_chi "chi_star - chi_star_ref";
       Real rho_molar "molar density [mol/l]";
       Real dddp "derivative of density w.r.t. pressure";
       Real dddp_ref "derivative of density w.r.t. pressure for reference state";
-      Modelica.SIunits.Length xi "correlation length";
-      Modelica.SIunits.SpecificHeatCapacity cp
+      Modelica.Units.SI.Length xi "correlation length";
+      Modelica.Units.SI.SpecificHeatCapacity cp
       "specific heat capacity at constant pressure";
-      Modelica.SIunits.SpecificHeatCapacity cv
+      Modelica.Units.SI.SpecificHeatCapacity cv
       "specific heat capacity at constant volume";
-      Modelica.SIunits.DynamicViscosity eta "dynamic viscosity";
-      Modelica.SIunits.ThermalConductivity omega "crossover function";
-      Modelica.SIunits.ThermalConductivity omega_0 "crossover function";
+      Modelica.Units.SI.DynamicViscosity eta "dynamic viscosity";
+      Modelica.Units.SI.ThermalConductivity omega "crossover function";
+      Modelica.Units.SI.ThermalConductivity omega_0 "crossover function";
 
     algorithm
       f := XRGMedia.R1234yf_ph.f_R1234yf(state.d, state.T);
@@ -23090,7 +23090,7 @@
     protected
       Real tau "reduced temp.";
       R1234yfData.CoeffsSurfaceTension coeff "polynomial coefficients";
-      Modelica.SIunits.Temperature Tc=R1234yfData.data.TCRIT
+      Modelica.Units.SI.Temperature Tc=R1234yfData.data.TCRIT
       "critical temperature";
 
     algorithm
@@ -23349,12 +23349,12 @@
     protected
       SaturationProperties sat(psat=p, Tsat=0)
         "saturation temperature and pressure";
-      Modelica.SIunits.Pressure delp=1.0e-2 "relative error in p in iteration";
-      Modelica.SIunits.SpecificEnthalpy delh=1.0e-2
+      Modelica.Units.SI.Pressure delp=1.0e-2 "relative error in p in iteration";
+      Modelica.Units.SI.SpecificEnthalpy delh=1.0e-2
         "relative error in h in iteration";
-      Modelica.SIunits.SpecificEnthalpy hvapor=
+      Modelica.Units.SI.SpecificEnthalpy hvapor=
           dewEnthalpy(sat=sat) "vapor enthalpy";
-      Modelica.SIunits.SpecificEnthalpy hliquid=
+      Modelica.Units.SI.SpecificEnthalpy hliquid=
           bubbleEnthalpy(sat=sat) "liquid enthalpy";
       Integer error "iteration error";
       Real x "steam quality";
@@ -23391,8 +23391,8 @@
       input AbsolutePressure delp "absolute error in p in iteration";
       input SpecificEnthalpy delh "absolute error in h in iteration";
 
-      output Modelica.SIunits.Density d "density";
-      output Modelica.SIunits.Temperature T "temperature";
+      output Modelica.Units.SI.Density d "density";
+      output Modelica.Units.SI.Temperature T "temperature";
       output Integer error "1 if had not converge";
 
     protected
@@ -23407,7 +23407,7 @@
       constant Real dv_coef[:, 4]=XRGMedia.R1234yfData.dvcoef
         "coefficients of cubic spline for rho_vap(p)";
 
-      Modelica.SIunits.SpecificEnthalpy hl "liquid enthalpy";
+      Modelica.Units.SI.SpecificEnthalpy hl "liquid enthalpy";
       Boolean liquid "is liquid";
       Boolean supercritical "is supercritcal";
       Integer int "interval number";
@@ -23611,8 +23611,8 @@
       "calculation of helmholtz derivatives by density and temperature"
       extends Modelica.Icons.Function;
 
-      input Modelica.SIunits.Density d "density";
-      input Modelica.SIunits.Temperature T "temperature";
+      input Modelica.Units.SI.Density d "density";
+      input Modelica.Units.SI.Temperature T "temperature";
       output Common.HelmholtzDerivs f "helmholtz derivatives";
     protected
       Real delta "reduced density";
@@ -23752,16 +23752,16 @@
 
       extends Modelica.Icons.Function;
 
-      input Modelica.SIunits.Pressure p "pressure";
-      input Modelica.SIunits.SpecificEnthalpy h "specific enthalpy";
+      input Modelica.Units.SI.Pressure p "pressure";
+      input Modelica.Units.SI.SpecificEnthalpy h "specific enthalpy";
 
       output Integer phase "number of phases";
 
     protected
      SaturationProperties sat(psat=p, Tsat=0) "saturation temperature and pressure";
-     Modelica.SIunits.SpecificEnthalpy hl=bubbleEnthalpy(sat) "liquid enthalpy";
-     Modelica.SIunits.SpecificEnthalpy hv=dewEnthalpy(sat) "vapor enthalpy";
 
+     Modelica.Units.SI.SpecificEnthalpy hl=bubbleEnthalpy(sat) "liquid enthalpy";
+     Modelica.Units.SI.SpecificEnthalpy hv=dewEnthalpy(sat) "vapor enthalpy";
     algorithm
     phase := if ((h < hl) or (h > hv) or (p > R1234yfData.data.FPCRIT)) then 1 else 2;
 
@@ -23774,15 +23774,15 @@
 
       extends Modelica.Icons.Function;
 
-      input Modelica.SIunits.Pressure p "pressure";
-      input Modelica.SIunits.SpecificEntropy s "specific entropy";
+      input Modelica.Units.SI.Pressure p "pressure";
+      input Modelica.Units.SI.SpecificEntropy s "specific entropy";
       output Integer phase "number of phases";
 
     protected
      SaturationProperties sat(psat=p, Tsat=0) "saturation temperature and pressure";
-     Modelica.SIunits.SpecificEntropy sl=bubbleEntropy(sat) "liquid entropy";
-     Modelica.SIunits.SpecificEntropy sv=dewEntropy(sat) "vapor entropy";
 
+     Modelica.Units.SI.SpecificEntropy sl=bubbleEntropy(sat) "liquid entropy";
+     Modelica.Units.SI.SpecificEntropy sv=dewEntropy(sat) "vapor entropy";
     algorithm
     phase := if ((s < sl) or (s > sv) or (p > R1234yfData.data.FPCRIT)) then 1 else 2;
 
@@ -23796,17 +23796,17 @@
 
       extends Modelica.Icons.Function;
 
-      input Modelica.SIunits.Pressure p "pressure";
-      input Modelica.SIunits.SpecificEntropy s "specific entropy";
-      output Modelica.SIunits.SpecificEnthalpy h "specific enthalpy";
+      input Modelica.Units.SI.Pressure p "pressure";
+      input Modelica.Units.SI.SpecificEntropy s "specific entropy";
+      output Modelica.Units.SI.SpecificEnthalpy h "specific enthalpy";
 
     protected
       SaturationProperties sat "saturation temperature and pressure";
-      Modelica.SIunits.MassFraction x "vapor quality";
-      Modelica.SIunits.SpecificEntropy sl "liquid entropy";
-      Modelica.SIunits.SpecificEntropy sv "vapor entropy";
-      Modelica.SIunits.SpecificEnthalpy hl "liquid enthalpy";
-      Modelica.SIunits.SpecificEnthalpy hv "vapor enthalpy";
+      Modelica.Units.SI.MassFraction x "vapor quality";
+      Modelica.Units.SI.SpecificEntropy sl "liquid entropy";
+      Modelica.Units.SI.SpecificEntropy sv "vapor entropy";
+      Modelica.Units.SI.SpecificEnthalpy hl "liquid enthalpy";
+      Modelica.Units.SI.SpecificEnthalpy hv "vapor enthalpy";
     algorithm
       sat.psat := p;
       // dummy
@@ -23827,12 +23827,12 @@
 
       extends Modelica.Icons.Function;
 
-      input Modelica.SIunits.Temperature T "temperature";
+      input Modelica.Units.SI.Temperature T "temperature";
       output Common.PhaseBoundaryProperties liq
         "properties on liquid boundary phase";
     protected
-      Modelica.SIunits.Temperature T_liq "liquid temperature";
-      Modelica.SIunits.Density d_liq "liquid density";
+      Modelica.Units.SI.Temperature T_liq "liquid temperature";
+      Modelica.Units.SI.Density d_liq "liquid density";
       Common.HelmholtzDerivs f "helmholtz derivatives";
     algorithm
       if T < R1234yfData.data.FTCRIT then
@@ -23852,12 +23852,12 @@
 
       extends Modelica.Icons.Function;
 
-      input Modelica.SIunits.Temperature T "temperature";
+      input Modelica.Units.SI.Temperature T "temperature";
       output Common.PhaseBoundaryProperties vap
         "properties on vapor boundary phase";
     protected
-      Modelica.SIunits.Temperature T_vap "vapor temperature";
-      Modelica.SIunits.Density d_vap "vapor density";
+      Modelica.Units.SI.Temperature T_vap "vapor temperature";
+      Modelica.Units.SI.Density d_vap "vapor density";
       Common.HelmholtzDerivs f "helmholtz derivatives";
     algorithm
       if T < R1234yfData.data.FTCRIT then
@@ -23876,8 +23876,8 @@
     function rho_ph_der "time derivative function of rho_ph"
     extends Modelica.Icons.Function;
 
-    input Modelica.SIunits.Pressure p "pressure";
-    input Modelica.SIunits.SpecificEnthalpy h "specific enthalpy";
+    input Modelica.Units.SI.Pressure p "pressure";
+    input Modelica.Units.SI.SpecificEnthalpy h "specific enthalpy";
     input Common.InverseDerivatives_rhoT derivs "record for derivatives";
     input Real p_der "derivative of pressure";
     input Real h_der "derivative of specific enthalpy";
@@ -23900,11 +23900,11 @@
     function rho_props_ph "density as function of pressure and specific enthalpy"
       extends Modelica.Icons.Function;
 
-      input Modelica.SIunits.Pressure p "pressure";
-      input Modelica.SIunits.SpecificEnthalpy h "specific enthalpy";
+      input Modelica.Units.SI.Pressure p "pressure";
+      input Modelica.Units.SI.SpecificEnthalpy h "specific enthalpy";
       input Common.InverseDerivatives_rhoT derivs
         "record for the calculation of rho_ph_der";
-      output Modelica.SIunits.Density d "density";
+      output Modelica.Units.SI.Density d "density";
     algorithm
       d := derivs.rho;
 
@@ -23920,8 +23920,8 @@
     function T_ph_der "time derivative function of T_ph"
     extends Modelica.Icons.Function;
 
-    input Modelica.SIunits.Pressure p "pressure";
-    input Modelica.SIunits.SpecificEnthalpy h "specific enthalpy";
+    input Modelica.Units.SI.Pressure p "pressure";
+    input Modelica.Units.SI.SpecificEnthalpy h "specific enthalpy";
     input Common.InverseDerivatives_rhoT derivs "auxiliary record";
     input Real p_der "derivative of pressure";
     input Real h_der "derivative of specific enthalpy";
@@ -23943,11 +23943,11 @@
     function T_props_ph "temperature as function of pressure and specific enthalpy"
       extends Modelica.Icons.Function;
 
-      input Modelica.SIunits.Pressure p "pressure";
-      input Modelica.SIunits.SpecificEnthalpy h "specific enthalpy";
+      input Modelica.Units.SI.Pressure p "pressure";
+      input Modelica.Units.SI.SpecificEnthalpy h "specific enthalpy";
       input Common.InverseDerivatives_rhoT derivs
         "record for the calculation of T_ph_der";
-      output Modelica.SIunits.Temperature T "density";
+      output Modelica.Units.SI.Temperature T "density";
     algorithm
       T := derivs.T;
 
@@ -24134,10 +24134,10 @@
   end R1234yf_ph;
 
   package R1234yfData "R1234yf data required by package R1234yf_ph"
-  import Modelica.SIunits;
+  import Modelica.Units.SI;
 
     extends Modelica.Icons.Package;
-    constant SIunits.SpecificHeatCapacity R=data.R;
+    constant SI.SpecificHeatCapacity R=data.R;
     constant Integer Npoints=478;
     constant Integer Ninterval=Npoints - 1;
     constant Real[Npoints] pbreaks={9.315630675516716e-003, 9.409255633940164e-003, 9.488479721749476e-003, 9.670820083273173e-003, 9.857236523172464e-003, 1.004782719500372e-002, 1.024270478607997e-002, 1.044197700500009e-002, 1.064575853680641e-002, 1.085416297635702e-002, 1.106731118394720e-002, 1.128532296394324e-002, 1.150833012790055e-002, 1.173646375335438e-002, 1.196985393331968e-002, 1.220864347585780e-002, 1.245296981947073e-002, 1.270298361638314e-002, 1.295883495009673e-002, 1.322067802831311e-002, 1.348326458664130e-002, 1.373730244898376e-002, 1.399516736437004e-002, 1.425690077780504e-002, 1.452254436857515e-002, 1.479214004975419e-002, 1.506572996738148e-002, 1.534335649959893e-002, 1.562506225640576e-002, 1.591089007855800e-002, 1.620088303694847e-002, 1.649508443205401e-002, 1.679353779296355e-002, 1.709628687693232e-002, 1.740337566840506e-002, 1.771484837820044e-002, 1.803074944290500e-002, 1.835112352434224e-002, 1.867601550817086e-002, 1.900547050386442e-002, 1.933953384319901e-002, 1.967825108001468e-002, 2.002166798900960e-002, 2.036983056544179e-002, 2.072278502363915e-002, 2.108057779693416e-002, 2.144325553615600e-002, 2.181086510924945e-002, 2.218345360049769e-002, 2.256106830927540e-002, 2.294375674960237e-002, 2.333156664903044e-002, 2.372454594820709e-002, 2.412274279950184e-002, 2.452620556664199e-002, 2.493498282341629e-002, 2.534912335324316e-002, 2.576867614801135e-002, 2.619369040752748e-002, 2.662421553834543e-002, 2.706030115303215e-002, 2.750199706944538e-002, 2.794935330960237e-002, 2.840242009913459e-002, 2.886124786616048e-002, 2.932588724063573e-002, 2.979638905317514e-002, 3.027280433490780e-002, 3.075518431542033e-002, 3.124358042324318e-002, 3.173804428412386e-002, 3.223862772029860e-002, 3.274538274991409e-002, 3.325836158598358e-002, 3.377761663558471e-002, 3.430320049893134e-002, 3.483516596874220e-002, 3.537356602920063e-002, 3.591845385522195e-002, 3.646988281146409e-002, 3.702790645175352e-002, 3.759257851818565e-002, 3.816395293998679e-002, 3.874208383336914e-002, 3.932702549989411e-002, 3.991883242637054e-002, 4.051755928361898e-002, 4.112326092606439e-002, 4.173599239032232e-002, 4.235580889526038e-002, 4.298276584039096e-002, 4.361691880573670e-002, 4.425832355056338e-002, 4.490703601313953e-002, 4.556311230958085e-002, 4.622660873334073e-002, 4.689758175420882e-002, 4.757608801775745e-002, 4.826218434496750e-002, 4.895592773094184e-002, 4.965737534414139e-002, 5.036658452656595e-002, 5.108361279212413e-002, 5.180851782647362e-002, 5.254135748621165e-002, 5.328218979811275e-002, 5.403107295870885e-002, 5.478806533366683e-002, 5.555322545674275e-002, 5.632661202969333e-002, 5.710828392144488e-002, 5.789830016734707e-002, 5.869671996908133e-002, 5.950360269343520e-002, 6.031900787220641e-002, 6.114299520157184e-002, 6.197562454135469e-002, 6.281695591498913e-002, 6.366704950835135e-002, 6.452596566975423e-002, 6.539376490922141e-002, 6.627050789821097e-002, 6.715625546901680e-002, 6.805106861423359e-002, 6.895500848664705e-002, 6.986813639829756e-002, 7.079051382084833e-002, 7.172220238420629e-002, 7.266326387712414e-002, 7.361376024605856e-002, 7.457375359535129e-002, 7.554330618657645e-002, 7.652248043827870e-002, 7.751133892574050e-002, 7.850994438076163e-002, 7.951835969106350e-002, 8.053664790037918e-002, 8.156487220782588e-002, 8.260309596829445e-002, 8.365138269125792e-002, 8.470979604158700e-002, 8.577839983860573e-002, 8.685725805616221e-002, 8.794643482276496e-002, 8.904599442080670e-002, 9.015600128693797e-002, 9.127652001175569e-002, 9.240761533972777e-002, 9.354935216886134e-002, 9.470179555114282e-002, 9.586501069207760e-002, 9.703906295058845e-002, 9.822401783933890e-002, 9.941994102430024e-002, 1.006268983251261e-001, 1.018449557148436e-001, 1.030741793202256e-001, 1.043146354214038e-001, 1.055663904523611e-001, 1.068295110006661e-001, 1.081040638077801e-001, 1.093901157691820e-001, 1.106877339342592e-001, 1.119969855066399e-001, 1.133179378443828e-001, 1.146506584600905e-001, 1.159952150210168e-001, 1.173516753493960e-001, 1.187201074227709e-001, 1.201005793739709e-001, 1.214931594916042e-001, 1.228979162203815e-001, 1.243149181610227e-001, 1.257442340712720e-001, 1.271859328656935e-001, 1.286400836160518e-001, 1.301067555522305e-001, 1.315860180619805e-001, 1.330779406919038e-001, 1.345825931475443e-001, 1.361000452940549e-001, 1.376303671566986e-001, 1.391736289213739e-001, 1.407299009350596e-001, 1.422992537066589e-001, 1.438817579073215e-001, 1.454774843712649e-001, 1.470865040964267e-001, 1.487088882451205e-001, 1.503447081448309e-001, 1.519940352887712e-001, 1.536569413369012e-001, 1.553334981167469e-001, 1.570237776240911e-001, 1.587278520238180e-001, 1.604457936510685e-001, 1.621776750120363e-001, 1.639235687849428e-001, 1.656835478210055e-001, 1.674576851457033e-001, 1.692460539595864e-001, 1.710487276395420e-001, 1.728657797400524e-001, 1.746972839941315e-001, 1.765433143147128e-001, 1.784039447960046e-001, 1.802792497146345e-001, 1.821693035310596e-001, 1.840741808909274e-001, 1.859939566265981e-001, 1.879287057585378e-001, 1.898785034966221e-001, 1.918434252421119e-001, 1.938235465889968e-001, 1.958189433253717e-001, 1.978296914355736e-001, 1.998558671015539e-001, 2.018975467047508e-001, 2.039548068277830e-001, 2.060277242563256e-001, 2.081163759810605e-001, 2.102208391993603e-001, 2.123411913173642e-001, 2.144775099518446e-001, 2.166298729324203e-001, 2.187983583033968e-001, 2.209830443259219e-001, 2.231840094800919e-001, 2.254013324672244e-001, 2.276350922117295e-001, 2.298853678637365e-001, 2.321522388010336e-001, 2.344357846316015e-001, 2.367360851957188e-001, 2.390532205688913e-001, 2.413872710658508e-001, 2.437383172471578e-001, 2.461064399305902e-001, 2.484917202094892e-001, 2.508942394806896e-001, 2.533140781678804e-001, 2.557513195264376e-001, 2.582060450362360e-001, 2.606783369954784e-001, 2.631682779623241e-001, 2.656759507573187e-001, 2.682014384661343e-001, 2.707448244423811e-001, 2.733061923100609e-001, 2.758856259667364e-001, 2.784832095858203e-001, 2.810990276198103e-001, 2.837331648027633e-001, 2.863857061532917e-001, 2.890567369776618e-001, 2.917463428721611e-001, 2.944546097265926e-001, 2.971816237269118e-001, 2.999274713583898e-001, 3.026922394085144e-001, 3.054760149702748e-001, 3.082788854452390e-001, 3.111009385467645e-001, 3.139422623033672e-001, 3.168029450619952e-001, 3.196830754917426e-001, 3.225827425874214e-001, 3.255020356733183e-001, 3.284410444073942e-001, 3.313998587856100e-001, 3.343785691462718e-001, 3.373772653495060e-001, 3.403960397233189e-001, 3.434349830589198e-001, 3.464941870692562e-001, 3.495737438244092e-001, 3.526737457558475e-001, 3.557942856605627e-001, 3.589354567053061e-001, 3.620973524310305e-001, 3.652800667575694e-001, 3.684836939880964e-001, 3.717083288142175e-001, 3.749540663207588e-001, 3.782210019910307e-001, 3.815092317121846e-001, 3.848188517807593e-001, 3.881499589082944e-001, 3.915026502274128e-001, 3.948770232979663e-001, 3.982731761133534e-001, 4.016912071072268e-001, 4.051312151604421e-001, 4.085932996082444e-001, 4.120775602475995e-001, 4.155840973452928e-001, 4.191130116456622e-001, 4.226644043794131e-001, 4.262383772721448e-001, 4.298350325536861e-001, 4.334544729676149e-001, 4.370968017812642e-001, 4.407621227961664e-001, 4.444505403588394e-001, 4.481621593723135e-001, 4.518970853078258e-001, 4.556554242173586e-001, 4.594372827465302e-001, 4.632427681480688e-001, 4.670719882962936e-001, 4.709250517016247e-001, 4.748020675264054e-001, 4.787031456011864e-001, 4.826283964419272e-001, 4.865779312680196e-001, 4.905518620216192e-001, 4.945503013874972e-001, 4.985733619487809e-001, 5.026211593106774e-001, 5.066938078745179e-001, 5.107914234725258e-001, 5.149141227844997e-001, 5.190620233626294e-001, 5.232352436573770e-001, 5.274339030446875e-001, 5.316581218542190e-001, 5.359080213990058e-001, 5.401837240063026e-001, 5.444853530500829e-001, 5.488130329845681e-001, 5.531668893797669e-001, 5.575470489584132e-001, 5.619536396343869e-001, 5.663867905532218e-001, 5.708466321343051e-001, 5.753332961149484e-001, 5.798469155966031e-001, 5.843876250931400e-001, 5.889555605813668e-001, 5.935508595539758e-001, 5.981736610747082e-001, 6.028241058364706e-001, 6.075023362218488e-001, 6.122084963667619e-001, 6.169427322269214e-001, 6.217051916477554e-001, 6.264960244374308e-001, 6.313153824437330e-001, 6.361634196347269e-001, 6.411206986117265e-001, 6.460352993383135e-001, 6.508966586119415e-001, 6.557048730961161e-001, 6.604600586574547e-001, 6.651623495573744e-001, 6.698118976653070e-001, 6.744088716934064e-001, 6.789534549814681e-001, 6.834458499824261e-001, 6.878862704844553e-001, 6.922749452417124e-001, 6.966121163111577e-001, 7.008980384057117e-001, 7.051329782666260e-001, 7.093172140545464e-001, 7.134510347593471e-001, 7.175347396278320e-001, 7.215686376094660e-001, 7.255530468195049e-001, 7.294882940192793e-001, 7.333747141131675e-001, 7.372126496621356e-001, 7.410024504130868e-001, 7.447444728440330e-001, 7.484390797246702e-001, 7.520866396914827e-001, 7.556875268380247e-001, 7.592421203188933e-001, 7.627508039678688e-001, 7.662139659294402e-001, 7.696319983035204e-001, 7.730052968029781e-001, 7.763342604236577e-001, 7.796192911264421e-001, 7.828607935311818e-001, 7.860591746222621e-001, 7.892148434649562e-001, 7.923282109329445e-001, 7.953996894463983e-001, 7.984296927199410e-001, 8.014186355210898e-001, 8.043669334379496e-001, 8.072750026565070e-001, 8.101432597470136e-001, 8.129721214592659e-001, 8.157620045265285e-001, 8.185133254777655e-001, 8.212265004580400e-001, 8.239019450570220e-001, 8.265400720520630e-001, 8.291412989285575e-001, 8.317060370495547e-001, 8.342346981619770e-001, 8.367276926978374e-001, 8.391854296434316e-001, 8.416083164147079e-001, 8.439967587385600e-001, 8.463511605401085e-001, 8.486719238354188e-001, 8.509594486297846e-001, 8.534235782286244e-001, 8.558939176437034e-001, 8.583704963175127e-001, 8.608533443131144e-001, 8.633424923412703e-001, 8.658379717892334e-001, 8.683398147516084e-001, 8.708480540631788e-001, 8.733627233340892e-001, 8.758838569876275e-001, 8.784114903005678e-001, 8.809456594466919e-001, 8.834864015435844e-001, 8.860337547030759e-001, 8.885877580858074e-001, 8.911484519603137e-001, 8.937158777670442e-001, 8.962900781882104e-001, 8.988710972240462e-001, 9.014589802762411e-001, 9.040537742400032e-001, 9.066555276059866e-001, 9.092642905739027e-001, 9.118801151806986e-001, 9.145030554463847e-001, 9.171331649152600e-001, 9.197705056949577e-001, 9.224151368931771e-001, 9.250671218614590e-001, 9.277265268203832e-001, 9.303934211177789e-001, 9.330678775216419e-001, 9.357499725541159e-001, 9.384397868742795e-001, 9.411374057194415e-001, 9.438429194172382e-001, 9.465564239840780e-001, 9.492780218304997e-001, 9.520078226012148e-001, 9.547459441893602e-001, 9.574925139862757e-001, 9.602476704716016e-001, 9.630115622806061e-001, 9.657843583578399e-001, 9.685662415138245e-001, 9.713574174833745e-001, 9.741581188827921e-001, 9.769686121688898e-001, 9.797892075144336e-001, 9.826202737800692e-001, 9.854622561317351e-001, 9.876012426146010e-001, 9.897469851796209e-001, 9.919882661490472e-001, 9.941443954700153e-001, 9.957669518705825e-001, 9.968515080872197e-001, 9.976665605400329e-001, 9.983741815363867e-001, 9.990284994389748e-001, 9.993014849697313e-001, 9.994107424983970e-001, 9.995746981398848e-001, 9.997208314321637e-001, 9.998670389257163e-001, 9.999401740029222e-001, 9.999767464778039e-001, 1.0};
@@ -28915,19 +28915,19 @@
 
     record crit
       extends Modelica.Icons.Record;
-      constant SIunits.Temperature TCRIT=367.85;
-      constant SIunits.Pressure PCRIT=3382200.0;
-      constant SIunits.Density DCRIT=475.55;
+      constant SI.Temperature TCRIT=367.85;
+      constant SI.Pressure PCRIT=3382200.0;
+      constant SI.Density DCRIT=475.55;
 
     end crit;
 
     record data
-      constant SIunits.SpecificHeatCapacity R=72.907357745538;
+      constant SI.SpecificHeatCapacity R=72.907357745538;
       // 8.314471/0.11404159
-      constant SIunits.MolarMass MM=0.11404159;
+      constant SI.MolarMass MM=0.11404159;
       extends crit;
-      constant SIunits.SpecificEnthalpy HCRIT=369550;
-      constant SIunits.SpecificEntropy SCRIT=1508.75;
+      constant SI.SpecificEnthalpy HCRIT=369550;
+      constant SI.SpecificEntropy SCRIT=1508.75;
       extends fcrit;
       extends triple;
 
@@ -28936,9 +28936,9 @@
 
     record fcrit
       extends Modelica.Icons.Record;
-      constant SIunits.Temperature FTCRIT=367.85;
-      constant SIunits.Pressure FPCRIT=3382200.0;
-      constant SIunits.Density FDCRIT=475.55;
+      constant SI.Temperature FTCRIT=367.85;
+      constant SI.Pressure FPCRIT=3382200.0;
+      constant SI.Density FDCRIT=475.55;
 
     end fcrit;
 
@@ -28957,8 +28957,8 @@
 
     record ReferenceStates
       extends Modelica.Icons.Record;
-      constant SIunits.SpecificEnthalpy h0=1.0;
-      constant SIunits.SpecificEntropy s0=1.0;
+      constant SI.SpecificEnthalpy h0=1.0;
+      constant SI.SpecificEntropy s0=1.0;
 
     end ReferenceStates;
 
@@ -28984,10 +28984,10 @@
 
     record triple
       extends Modelica.Icons.Record;
-      constant SIunits.Temperature TTRIPLE=220;
-      constant SIunits.Pressure PTRIPLE=31507.3260707326;
-      constant SIunits.Density DLTRIPLE=1326.64849922441;
-      constant SIunits.Density DVTRIPLE=2.00523848216718;
+      constant SI.Temperature TTRIPLE=220;
+      constant SI.Pressure PTRIPLE=31507.3260707326;
+      constant SI.Density DLTRIPLE=1326.64849922441;
+      constant SI.Density DVTRIPLE=2.00523848216718;
 
     end triple;
 
@@ -29134,8 +29134,8 @@
     protected
      SaturationProperties sat(psat=p, Tsat=0)
       "saturation temperature and pressure";
-     Modelica.SIunits.SpecificEnthalpy hl=bubbleEnthalpy(sat) "liquid enthalpy";
-     Modelica.SIunits.SpecificEnthalpy hv=dewEnthalpy(sat) "vapor enthalpy";
+     Modelica.Units.SI.SpecificEnthalpy hl=bubbleEnthalpy(sat) "liquid enthalpy";
+     Modelica.Units.SI.SpecificEnthalpy hv=dewEnthalpy(sat) "vapor enthalpy";
 
     algorithm
     state.p :=p;
@@ -29169,10 +29169,10 @@
     "set state for density and temperature (X not used since single substance)"
     protected
       Common.HelmholtzDerivs f "helmholtz derivatives";
-      Modelica.SIunits.SpecificHeatCapacity R "specific gas constant";
+      Modelica.Units.SI.SpecificHeatCapacity R "specific gas constant";
       SaturationProperties sat "saturation temperature and pressure";
-      Modelica.SIunits.Density dl "liquid density";
-      Modelica.SIunits.Density dv "vapor density";
+      Modelica.Units.SI.Density dl "liquid density";
+      Modelica.Units.SI.Density dv "vapor density";
 
     algorithm
        R := R245faData.R;
@@ -29222,8 +29222,8 @@
     "set state for pressure and specific entropy (X not used since single substance)"
 
     protected
-      Modelica.SIunits.Pressure delp=1e-2 "iteration accuracy for pressure";
-      Modelica.SIunits.SpecificEntropy dels=1e-1 "iteration accuracy for entropy";
+      Modelica.Units.SI.Pressure delp=1e-2 "iteration accuracy for pressure";
+      Modelica.Units.SI.SpecificEntropy dels=1e-1 "iteration accuracy for entropy";
       Integer error "if newton iteration fails (too many calls)";
       Common.HelmholtzDerivs f "helmholtz derivatives";
       SaturationProperties sat "saturation temperature and pressure";
@@ -29266,7 +29266,7 @@
       "Set state for pressure and temperature (X not used since single substance)"
 
     protected
-        Modelica.SIunits.Pressure delp=1.0e-2
+        Modelica.Units.SI.Pressure delp=1.0e-2
         "Relative error in p in iteration";
 
     algorithm
@@ -29485,7 +29485,7 @@
       SaturationProperties sat "saturation temperature and pressure";
       Common.PhaseBoundaryProperties vap "properties on vapor phase boundary";
 
-      Modelica.SIunits.MassFraction x "vapor quality";
+      Modelica.Units.SI.MassFraction x "vapor quality";
 
     algorithm
       if getPhase_ph(state.p, state.h)==2 then
@@ -29571,7 +29571,7 @@
       "derivative of saturation temperature in two-phase region"
       extends Modelica.Icons.Function;
 
-      input Modelica.SIunits.AbsolutePressure p "pressure";
+      input Modelica.Units.SI.AbsolutePressure p "pressure";
       input Real der_p "time derivative of pressure";
       output Real der_Tsat "time derivative of saturation temperature";
     protected
@@ -29703,7 +29703,7 @@
 
       input SaturationProperties sat
       "saturation properties | pressure is used for interpolation";
-      output Modelica.SIunits.Density dv "vapor phase density";
+      output Modelica.Units.SI.Density dv "vapor phase density";
     protected
       constant Real dv_coef[:,:] = R245faData.dvcoef;
       constant Real p_breaks[:] = R245faData.pbreaks;
@@ -29781,7 +29781,7 @@
 
       input SaturationProperties sat
       "saturation properties | pressure is used for interpolation";
-      output Modelica.SIunits.SpecificEnthalpy hl
+      output Modelica.Units.SI.SpecificEnthalpy hl
       "specific enthalpy of liquid fraction";
     protected
       constant Real hl_coef[:,:] = R245faData.hlcoef;
@@ -29860,7 +29860,7 @@
 
       input SaturationProperties sat
       "saturation properties | pressure is used for interpolation";
-      output Modelica.SIunits.SpecificEnthalpy hv
+      output Modelica.Units.SI.SpecificEnthalpy hv
       "specific enthalpy of vapor fraction";
     protected
       constant Real hv_coef[:,:] = R245faData.hvcoef;
@@ -29939,7 +29939,7 @@
       extends Modelica.Icons.Function;
       input SaturationProperties sat
       "saturation properties | pressure is used for interpolation";
-      output Modelica.SIunits.SpecificEntropy sv
+      output Modelica.Units.SI.SpecificEntropy sv
       "specific entropy of vapor phase w.r.t saturation pressure";
 
     protected
@@ -30023,7 +30023,7 @@
       extends Modelica.Icons.Function;
       input SaturationProperties sat
       "saturation properties | pressure is used for interpolation";
-      output Modelica.SIunits.SpecificEntropy sl
+      output Modelica.Units.SI.SpecificEntropy sl
       "specific entropy of liquid phase w.r.t saturation pressure";
     protected
       constant Real sl_coef[:,:] = R245faData.slcoef;
@@ -30140,7 +30140,7 @@
       SaturationProperties sat;
       Common.PhaseBoundaryProperties vap;
 
-      Modelica.SIunits.MassFraction x;
+      Modelica.Units.SI.MassFraction x;
 
     algorithm
       if getPhase_ph(state.p, state.h)==2 then
@@ -30166,13 +30166,13 @@
       constant Real K0=0.021357
       "Constant for low density term eta_star for R134a";
       constant Real beta=1 "correction factor";
-      constant Modelica.SIunits.Length sigma=0.5529e-09
+      constant Modelica.Units.SI.Length sigma=0.5529e-09
       "Hard-sphere diameter for R245fa";
-      constant Modelica.SIunits.Length sigma0=0.50647e-09
+      constant Modelica.Units.SI.Length sigma0=0.50647e-09
       "Hard-sphere diameter for R134a";
-      constant Modelica.SIunits.Temperature epsilon_k=329.72
+      constant Modelica.Units.SI.Temperature epsilon_k=329.72
       "empirical factor for R245fa";
-      constant Modelica.SIunits.Temperature epsilon_k0=288.82
+      constant Modelica.Units.SI.Temperature epsilon_k0=288.82
       "empirical factor for R134a";
       constant Real a[6]={1.16145, -0.14874, 0.52487, -0.77320, 2.16178, -2.43787}
       "Coefficients for term of collision integral";
@@ -30323,26 +30323,26 @@
     protected
       Common.HelmholtzDerivs f "helmholtz derivatives";
       Common.HelmholtzDerivs f_ref "helmholtz derivatives for reference state";
-      Modelica.SIunits.ThermalConductivity lambda_dg
+      Modelica.Units.SI.ThermalConductivity lambda_dg
       "dilute gas contribution to lambda";
       XRGMedia.R245faData.CoeffsThermalConductivity coeff "coefficients of thermal conductivity model";
-      Modelica.SIunits.ThermalConductivity lambda_reduced "reduced lambda";
-      Modelica.SIunits.ThermalConductivity lambda_crit
+      Modelica.Units.SI.ThermalConductivity lambda_reduced "reduced lambda";
+      Modelica.Units.SI.ThermalConductivity lambda_crit
       "enhancement of lambda in the critical region";
-      Modelica.SIunits.ThermalConductivity chi_star "correlation length";
-      Modelica.SIunits.ThermalConductivity chi_star_ref "correlation length";
-      Modelica.SIunits.ThermalConductivity delta_chi "chi_star - chi_star_ref";
+      Modelica.Units.SI.ThermalConductivity chi_star "correlation length";
+      Modelica.Units.SI.ThermalConductivity chi_star_ref "correlation length";
+      Modelica.Units.SI.ThermalConductivity delta_chi "chi_star - chi_star_ref";
       Real rho_molar "molar density [mol/l]";
       Real dddp "derivative of density w.r.t. pressure";
       Real dddp_ref "derivative of density w.r.t. pressure for reference state";
-      Modelica.SIunits.Length xi "correlation length";
-      Modelica.SIunits.SpecificHeatCapacity cp
+      Modelica.Units.SI.Length xi "correlation length";
+      Modelica.Units.SI.SpecificHeatCapacity cp
       "specific heat capacity at constant pressure";
-      Modelica.SIunits.SpecificHeatCapacity cv
+      Modelica.Units.SI.SpecificHeatCapacity cv
       "specific heat capacity at constant volume";
-      Modelica.SIunits.DynamicViscosity eta "dynamic viscosity";
-      Modelica.SIunits.ThermalConductivity omega "crossover function";
-      Modelica.SIunits.ThermalConductivity omega_0 "crossover function";
+      Modelica.Units.SI.DynamicViscosity eta "dynamic viscosity";
+      Modelica.Units.SI.ThermalConductivity omega "crossover function";
+      Modelica.Units.SI.ThermalConductivity omega_0 "crossover function";
 
     algorithm
       f := XRGMedia.R245fa_ph.f_R245fa(state.d, state.T);
@@ -30540,8 +30540,8 @@
 
       extends Modelica.Icons.Function;
 
-      input Modelica.SIunits.Pressure p;
-      input Modelica.SIunits.SpecificEnthalpy h;
+      input Modelica.Units.SI.Pressure p;
+      input Modelica.Units.SI.SpecificEnthalpy h;
       input Integer phase;
       output Common.InverseDerivatives_rhoT derivs;
 
@@ -30589,18 +30589,18 @@
 
       extends Modelica.Icons.Function;
 
-      input Modelica.SIunits.Pressure p "pressure";
-      input Modelica.SIunits.SpecificEnthalpy h "specific enthalpy";
-      output Modelica.SIunits.Density d "density";
-      output Modelica.SIunits.Temperature T "temperature";
+      input Modelica.Units.SI.Pressure p "pressure";
+      input Modelica.Units.SI.SpecificEnthalpy h "specific enthalpy";
+      output Modelica.Units.SI.Density d "density";
+      output Modelica.Units.SI.Temperature T "temperature";
     protected
       SaturationProperties sat(psat=p, Tsat=0);
-      Modelica.SIunits.Pressure delp=1.0e-2 "relative error in p in iteration";
-      Modelica.SIunits.SpecificEnthalpy delh=1.0e-2
+      Modelica.Units.SI.Pressure delp=1.0e-2 "relative error in p in iteration";
+      Modelica.Units.SI.SpecificEnthalpy delh=1.0e-2
         "relative error in h in iteration";
-      Modelica.SIunits.SpecificEnthalpy hvapor=
+      Modelica.Units.SI.SpecificEnthalpy hvapor=
           dewEnthalpy(sat=sat);
-      Modelica.SIunits.SpecificEnthalpy hliquid=
+      Modelica.Units.SI.SpecificEnthalpy hliquid=
           bubbleEnthalpy(sat=sat);
       Integer error "iteration error";
       Real x "steam quality";
@@ -30627,14 +30627,14 @@
 
       extends Modelica.Icons.Function;
 
-      input Modelica.SIunits.Pressure p "pressure";
-      input Modelica.SIunits.SpecificEnthalpy h "enthalpy";
-      input Modelica.SIunits.Pressure delp "relative error in p in iteration";
-      input Modelica.SIunits.SpecificEnthalpy delh
+      input Modelica.Units.SI.Pressure p "pressure";
+      input Modelica.Units.SI.SpecificEnthalpy h "enthalpy";
+      input Modelica.Units.SI.Pressure delp "relative error in p in iteration";
+      input Modelica.Units.SI.SpecificEnthalpy delh
         "relative error in h in iteration";
 
-      output Modelica.SIunits.Density d "density";
-      output Modelica.SIunits.Temperature T "temperature";
+      output Modelica.Units.SI.Density d "density";
+      output Modelica.Units.SI.Temperature T "temperature";
       output Integer error "1 if had not converged";
 
     protected
@@ -30644,7 +30644,7 @@
       constant Real T_coef[:, 4]=XRGMedia.R245faData.Tcoef;
       constant Real dv_coef[:, 4]=XRGMedia.R245faData.dvcoef;
 
-      Modelica.SIunits.SpecificEnthalpy hl;
+      Modelica.Units.SI.SpecificEnthalpy hl;
       Boolean liquid;
       Boolean supercritical;
       Integer int;
@@ -30735,13 +30735,13 @@
 
       extends Modelica.Icons.Function;
 
-      input Modelica.SIunits.Pressure p "pressure";
-      input Modelica.SIunits.SpecificEntropy s "specific entropy";
-      input Modelica.SIunits.Pressure delp "iteration accuracy";
-      input Modelica.SIunits.SpecificEntropy dels "iteration accuracy";
+      input Modelica.Units.SI.Pressure p "pressure";
+      input Modelica.Units.SI.SpecificEntropy s "specific entropy";
+      input Modelica.Units.SI.Pressure delp "iteration accuracy";
+      input Modelica.Units.SI.SpecificEntropy dels "iteration accuracy";
     //   input R245faData.Residual resc "residual coefficients";
-      output Modelica.SIunits.Density d "density";
-      output Modelica.SIunits.Temperature T "temperature (K)";
+      output Modelica.Units.SI.Density d "density";
+      output Modelica.Units.SI.Temperature T "temperature (K)";
       output Integer error "error flag: trouble if different from 0";
 
     protected
@@ -30838,8 +30838,8 @@
       "calculation of helmholtz derivatives by density and temperature"
       extends Modelica.Icons.Function;
 
-      input Modelica.SIunits.Density d "density";
-      input Modelica.SIunits.Temperature T "temperature";
+      input Modelica.Units.SI.Density d "density";
+      input Modelica.Units.SI.Temperature T "temperature";
       output Common.HelmholtzDerivs f "helmholtz derivatives";
     protected
       Real delta;
@@ -30959,16 +30959,16 @@
 
       extends Modelica.Icons.Function;
 
-      input Modelica.SIunits.Pressure p "pressure";
-      input Modelica.SIunits.SpecificEnthalpy h "specific enthalpy";
+      input Modelica.Units.SI.Pressure p "pressure";
+      input Modelica.Units.SI.SpecificEnthalpy h "specific enthalpy";
 
       output Integer phase "number of phases";
 
     protected
      SaturationProperties sat(psat=p, Tsat=0);
-     Modelica.SIunits.SpecificEnthalpy hl=bubbleEnthalpy(sat);
-     Modelica.SIunits.SpecificEnthalpy hv=dewEnthalpy(sat);
 
+     Modelica.Units.SI.SpecificEnthalpy hl=bubbleEnthalpy(sat);
+     Modelica.Units.SI.SpecificEnthalpy hv=dewEnthalpy(sat);
     algorithm
     phase := if ((h < hl) or (h > hv) or (p > R245faData.data.FPCRIT)) then 1 else 2;
 
@@ -30979,15 +30979,15 @@
 
       extends Modelica.Icons.Function;
 
-      input Modelica.SIunits.Pressure p "pressure";
-      input Modelica.SIunits.SpecificEntropy s "specific entropy";
+      input Modelica.Units.SI.Pressure p "pressure";
+      input Modelica.Units.SI.SpecificEntropy s "specific entropy";
       output Integer phase "number of phases";
 
     protected
      SaturationProperties sat(psat=p, Tsat=0);
-     Modelica.SIunits.SpecificEntropy sl=bubbleEntropy(sat);
-     Modelica.SIunits.SpecificEntropy sv=dewEntropy(sat);
 
+     Modelica.Units.SI.SpecificEntropy sl=bubbleEntropy(sat);
+     Modelica.Units.SI.SpecificEntropy sv=dewEntropy(sat);
     algorithm
     phase := if ((s < sl) or (s > sv) or (p > R245faData.data.FPCRIT)) then 1 else 2;
 
@@ -30999,17 +30999,17 @@
 
       extends Modelica.Icons.Function;
 
-      input Modelica.SIunits.Pressure p "pressure";
-      input Modelica.SIunits.SpecificEntropy s "specific entropy";
-      output Modelica.SIunits.SpecificEnthalpy h "specific enthalpy";
+      input Modelica.Units.SI.Pressure p "pressure";
+      input Modelica.Units.SI.SpecificEntropy s "specific entropy";
+      output Modelica.Units.SI.SpecificEnthalpy h "specific enthalpy";
 
     protected
       SaturationProperties sat;
-      Modelica.SIunits.MassFraction x;
-      Modelica.SIunits.SpecificEntropy sl;
-      Modelica.SIunits.SpecificEntropy sv;
-      Modelica.SIunits.SpecificEnthalpy hl;
-      Modelica.SIunits.SpecificEnthalpy hv;
+      Modelica.Units.SI.MassFraction x;
+      Modelica.Units.SI.SpecificEntropy sl;
+      Modelica.Units.SI.SpecificEntropy sv;
+      Modelica.Units.SI.SpecificEnthalpy hl;
+      Modelica.Units.SI.SpecificEnthalpy hv;
     algorithm
       sat.psat := p;
       // dummy
@@ -31028,13 +31028,13 @@
 
       extends Modelica.Icons.Function;
 
-      input Modelica.SIunits.Temperature T "temperature";
-      input Modelica.SIunits.Density d "density";
+      input Modelica.Units.SI.Temperature T "temperature";
+      input Modelica.Units.SI.Density d "density";
       output Common.PhaseBoundaryProperties liq
         "properties on liquid boundary phase";
     protected
-      Modelica.SIunits.Temperature T_liq;
-      Modelica.SIunits.Density d_liq;
+      Modelica.Units.SI.Temperature T_liq;
+      Modelica.Units.SI.Density d_liq;
       Common.HelmholtzDerivs f;
     algorithm
       if T < R245faData.data.FTCRIT then
@@ -31054,13 +31054,13 @@
 
       extends Modelica.Icons.Function;
 
-      input Modelica.SIunits.Temperature T "temperature";
-      input Modelica.SIunits.Density d "density";
+      input Modelica.Units.SI.Temperature T "temperature";
+      input Modelica.Units.SI.Density d "density";
       output Common.PhaseBoundaryProperties vap
         "properties on vapor boundary phase";
     protected
-      Modelica.SIunits.Temperature T_vap;
-      Modelica.SIunits.Density d_vap;
+      Modelica.Units.SI.Temperature T_vap;
+      Modelica.Units.SI.Density d_vap;
       Common.HelmholtzDerivs f;
     algorithm
       if T < R245faData.data.FTCRIT then
@@ -31079,8 +31079,8 @@
     function rho_ph_der "derivative function of rho_ph"
     extends Modelica.Icons.Function;
 
-    input Modelica.SIunits.Pressure p "pressure";
-    input Modelica.SIunits.SpecificEnthalpy h "specific enthalpy";
+    input Modelica.Units.SI.Pressure p "pressure";
+    input Modelica.Units.SI.SpecificEnthalpy h "specific enthalpy";
     input Common.InverseDerivatives_rhoT derivs "record for derivatives";
     input Real p_der "derivative of pressure";
     input Real h_der "derivative of specific enthalpy";
@@ -31101,11 +31101,11 @@
     function rho_props_ph "density as function of pressure and specific enthalpy"
       extends Modelica.Icons.Function;
 
-      input Modelica.SIunits.Pressure p "pressure";
-      input Modelica.SIunits.SpecificEnthalpy h "specific enthalpy";
+      input Modelica.Units.SI.Pressure p "pressure";
+      input Modelica.Units.SI.SpecificEnthalpy h "specific enthalpy";
       input Common.InverseDerivatives_rhoT derivs
         "record for the calculation of rho_ph_der";
-      output Modelica.SIunits.Density d "density";
+      output Modelica.Units.SI.Density d "density";
     algorithm
       d := derivs.rho;
 
@@ -31118,8 +31118,8 @@
     function T_ph_der "derivative function of T_ph"
     extends Modelica.Icons.Function;
 
-    input Modelica.SIunits.Pressure p "pressure";
-    input Modelica.SIunits.SpecificEnthalpy h "specific enthalpy";
+    input Modelica.Units.SI.Pressure p "pressure";
+    input Modelica.Units.SI.SpecificEnthalpy h "specific enthalpy";
     input Common.InverseDerivatives_rhoT derivs "auxiliary record";
     input Real p_der "derivative of pressure";
     input Real h_der "derivative of specific enthalpy";
@@ -31139,11 +31139,11 @@
     function T_props_ph "temperature as function of pressure and specific enthalpy"
       extends Modelica.Icons.Function;
 
-      input Modelica.SIunits.Pressure p "pressure";
-      input Modelica.SIunits.SpecificEnthalpy h "specific enthalpy";
+      input Modelica.Units.SI.Pressure p "pressure";
+      input Modelica.Units.SI.SpecificEnthalpy h "specific enthalpy";
       input Common.InverseDerivatives_rhoT derivs
         "record for the calculation of T_ph_der";
-      output Modelica.SIunits.Temperature T "density";
+      output Modelica.Units.SI.Temperature T "density";
     algorithm
       T := derivs.T;
 
@@ -31324,10 +31324,10 @@
   end R245fa_ph;
 
   package R245faData "R245fa data required by package R245fa_ph"
-  import Modelica.SIunits;
+  import Modelica.Units.SI;
 
     extends Modelica.Icons.Package;
-    constant SIunits.SpecificHeatCapacity R=data.R;
+    constant SI.SpecificHeatCapacity R=data.R;
     constant Integer Npoints=478;
     constant Integer Ninterval=Npoints - 1;
     constant Real[Npoints] pbreaks={3.427714409984365e-006, 3.583535730051671e-006, 3.719317017140551e-006, 4.045821479302135e-006, 4.400383040701793e-006, 4.785343682573352e-006, 5.203268586820519e-006, 5.656906491056489e-006, 6.149243944810657e-006, 6.683510888860645e-006, 7.263181738615014e-006, 7.892038957493585e-006, 8.574151744840505e-006, 9.313951810733022e-006, 1.011618105707287e-005, 1.098599906914673e-005, 1.192893681871501e-005, 1.295104240658305e-005, 1.405878616662813e-005, 1.525918746578454e-005, 1.653280269351794e-005, 1.783344561649109e-005, 1.922451262731168e-005, 2.071141336385989e-005, 2.229982350797381e-005, 2.399569521218994e-005, 2.580526773551858e-005, 2.773507638012567e-005, 2.979196443773967e-005, 3.198309289986128e-005, 3.431595232120825e-005, 3.679837350687304e-005, 3.943853839462914e-005, 4.224499308236515e-005, 4.522665817493084e-005, 4.839284170310974e-005, 5.175325062355353e-005, 5.531800376295286e-005, 5.909764361815815e-005, 6.310315032525699e-005, 6.734602280714502e-005, 7.183801822812913e-005, 7.659157087151197e-005, 8.161953886358229e-005, 8.693528338996816e-005, 9.255268220868290e-005, 9.848614387748341e-005, 1.047506218659195e-004, 1.113616281291842e-004, 1.183352480590967e-004, 1.256881542954171e-004, 1.334376215894581e-004, 1.416015412376843e-004, 1.501984359390234e-004, 1.592474744760652e-004, 1.687684871754848e-004, 1.787819798541130e-004, 1.893091497896218e-004, 2.003719004244562e-004, 2.119928570979588e-004, 2.241953812983789e-004, 2.370035871323165e-004, 2.504423557931060e-004, 2.645373514553597e-004, 2.793152777946894e-004, 2.948029393208658e-004, 3.110286713520830e-004, 3.280214231428581e-004, 3.458110040640287e-004, 3.644280983518765e-004, 3.839042813362719e-004, 4.042720339159054e-004, 4.255647584495441e-004, 4.478167938639552e-004, 4.710634306851398e-004, 4.953409265351829e-004, 5.206865207307379e-004, 5.471384497634426e-004, 5.747359618847087e-004, 6.035193320109636e-004, 6.335298761304093e-004, 6.648099667122272e-004, 6.974030463573928e-004, 7.313536426409222e-004, 7.667073820064512e-004, 8.035110043072011e-004, 8.418123762048110e-004, 8.816605056226577e-004, 9.231055544216113e-004, 9.661995545309440e-004, 1.010993642516351e-003, 1.057542198778472e-003, 1.105900137096666e-003, 1.156123590848091e-003, 1.208269926740686e-003, 1.262397755864743e-003, 1.318566947026008e-003, 1.376838638073880e-003, 1.437275247599374e-003, 1.499940486707029e-003, 1.564899370348589e-003, 1.632218227799403e-003, 1.701964714120830e-003, 1.774207820332625e-003, 1.849017883727729e-003, 1.926466598228160e-003, 2.006627023935652e-003, 2.089573596638470e-003, 2.175382137290837e-003, 2.264129861174651e-003, 2.355895386223079e-003, 2.450758741913860e-003, 2.548801377319007e-003, 2.650107811982333e-003, 2.754759125642450e-003, 2.862842663257659e-003, 2.974445629210812e-003, 3.089656683923205e-003, 3.208565951663261e-003, 3.331265025586158e-003, 3.457846974471584e-003, 3.588406347900316e-003, 3.723039182115523e-003, 3.861843004733720e-003, 4.004916839976118e-003, 4.152361212749632e-003, 4.304278153083934e-003, 4.460771200486354e-003, 4.621945406790366e-003, 4.787907340291363e-003, 4.958765088293860e-003, 5.134628260644715e-003, 5.315607991129978e-003, 5.501816940816382e-003, 5.693369299393422e-003, 5.890380787035820e-003, 6.092968655745604e-003, 6.301255060670424e-003, 6.515353674143780e-003, 6.735389627787872e-003, 6.961486309705901e-003, 7.193768642320793e-003, 7.432363083005157e-003, 7.677397623040488e-003, 7.929001786795493e-003, 8.187306631233087e-003, 8.452444743965741e-003, 8.724550242269487e-003, 9.003758771303598e-003, 9.290207501645562e-003, 9.584035127428616e-003, 9.885381864123202e-003, 1.019438944514071e-002, 1.051120111931365e-002, 1.083596164780069e-002, 1.116881730060818e-002, 1.150991585281046e-002, 1.185940658101665e-002, 1.221744025920746e-002, 1.258416915454463e-002, 1.295974702296128e-002, 1.334432910461525e-002, 1.373807847642038e-002, 1.414114076717273e-002, 1.455368185003925e-002, 1.497586285173530e-002, 1.540784635778373e-002, 1.584979640605104e-002, 1.630187848135165e-002, 1.676425950925797e-002, 1.723710785029384e-002, 1.772059329316940e-002, 1.821488704875544e-002, 1.872016174326347e-002, 1.923659141169968e-002, 1.976435149101764e-002, 2.030361881318879e-002, 2.085457159810865e-002, 2.141738944642078e-002, 2.199225333236823e-002, 2.257934559628885e-002, 2.317884993746671e-002, 2.379095140605222e-002, 2.441583639596839e-002, 2.505369263688568e-002, 2.570470918660784e-002, 2.636908713307457e-002, 2.704699696449066e-002, 2.773864217078034e-002, 2.844421704361847e-002, 2.916391716175666e-002, 2.989793938532629e-002, 3.064648184586886e-002, 3.140974393948861e-002, 3.218792631726632e-002, 3.298123087841197e-002, 3.378986076122629e-002, 3.461402033515787e-002, 3.545391519258637e-002, 3.630975214033182e-002, 3.718173919198573e-002, 3.807008555914637e-002, 3.897500164320208e-002, 3.989669902766229e-002, 4.083539046994066e-002, 4.179128989204280e-002, 4.276461237481449e-002, 4.375557414780762e-002, 4.476439258161129e-002, 4.579128618155215e-002, 4.683647457728657e-002, 4.790019564109672e-002, 4.898263728394266e-002, 5.008403929289071e-002, 5.120462572315607e-002, 5.234462171730815e-002, 5.350425349760149e-002, 5.468374835885463e-002, 5.588333466050716e-002, 5.710324182059411e-002, 5.834370030780304e-002, 5.960494163490063e-002, 6.088719835188539e-002, 6.219070403914025e-002, 6.351569330085927e-002, 6.486240175874794e-002, 6.623106604544993e-002, 6.762192379852129e-002, 6.903521365440497e-002, 7.047117524267890e-002, 7.193004917948272e-002, 7.341207706286147e-002, 7.491750146728789e-002, 7.644656593763659e-002, 7.799951498507582e-002, 7.957661944296149e-002, 8.117807540644256e-002, 8.280415523007526e-002, 8.445510724007969e-002, 8.613118070623656e-002, 8.783262583750473e-002, 8.955969377763898e-002, 9.131263660299882e-002, 9.309170731734461e-002, 9.489715985046808e-002, 9.672924905463169e-002, 9.858823070155574e-002, 1.004743614802274e-001, 1.023878989955312e-001, 1.043291017649621e-001, 1.062982292178041e-001, 1.082955416940346e-001, 1.103213004418592e-001, 1.123757676185336e-001, 1.144592062887200e-001, 1.165718804242136e-001, 1.187140549042159e-001, 1.208859955164309e-001, 1.230879689551474e-001, 1.253202428258955e-001, 1.275831220000510e-001, 1.298768036844935e-001, 1.322015940877432e-001, 1.345577644665943e-001, 1.369455869970249e-001, 1.393653347766621e-001, 1.418172818280688e-001, 1.443017031025784e-001, 1.468188744852243e-001, 1.493690727974794e-001, 1.519525758038292e-001, 1.545696622158803e-001, 1.572206116992078e-001, 1.599057048791069e-001, 1.626252233466184e-001, 1.653794496667460e-001, 1.681686673855770e-001, 1.709931610374037e-001, 1.738532161554053e-001, 1.767491192790428e-001, 1.796811579644671e-001, 1.826496207941052e-001, 1.856547973878898e-001, 1.886969784147629e-001, 1.917765050472959e-001, 1.948935718038373e-001, 1.980485214184213e-001, 2.012416488803737e-001, 2.044732502934900e-001, 2.077436228905515e-001, 2.110530650508547e-001, 2.144018763152748e-001, 2.177903574048911e-001, 2.212188102379681e-001, 2.246875379499495e-001, 2.281968449123569e-001, 2.317470367541535e-001, 2.353384203828339e-001, 2.389713040068830e-001, 2.426459971598789e-001, 2.463628107234998e-001, 2.501220569549131e-001, 2.539240495111521e-001, 2.577691034784224e-001, 2.616575353994909e-001, 2.655896633049104e-001, 2.695658067425989e-001, 2.735862868120771e-001, 2.776514261962396e-001, 2.817616151525232e-001, 2.859170484556400e-001, 2.901181189965056e-001, 2.943651561557876e-001, 2.986584910999340e-001, 3.029984568030854e-001, 3.073853881100691e-001, 3.118196217665284e-001, 3.163014964819177e-001, 3.208313529678470e-001, 3.254095339983386e-001, 3.300363844591281e-001, 3.347122514106592e-001, 3.394374841373846e-001, 3.442124342189784e-001, 3.490374555905920e-001, 3.539129046113275e-001, 3.588391401272333e-001, 3.638165235534716e-001, 3.688454189455304e-001, 3.739261930759138e-001, 3.790592155217877e-001, 3.842448587444083e-001, 3.894834981904625e-001, 3.947755972481180e-001, 4.001213687019036e-001, 4.055212815301375e-001, 4.109757240688992e-001, 4.164850881354445e-001, 4.220497691624137e-001, 4.276701663101271e-001, 4.333466825953149e-001, 4.390797250280633e-001, 4.448697047487608e-001, 4.507170371814787e-001, 4.566221421791337e-001, 4.625854441960403e-001, 4.686073724495081e-001, 4.746883611060881e-001, 4.808288494650814e-001, 4.871317043943387e-001, 4.934040717149109e-001, 4.996316564307218e-001, 5.058136322868104e-001, 5.119492494579844e-001, 5.180378341242857e-001, 5.240786828278236e-001, 5.300713755184784e-001, 5.360150354683355e-001, 5.419094924667530e-001, 5.477540043575350e-001, 5.535482163263343e-001, 5.592917316888211e-001, 5.649841069030955e-001, 5.706251833496565e-001, 5.762145300117194e-001, 5.817519996281146e-001, 5.872371629240155e-001, 5.926699888564191e-001, 5.980502746104921e-001, 6.033778711557177e-001, 6.086525647544204e-001, 6.138744286427792e-001, 6.190433522694685e-001, 6.241592734909649e-001, 6.292220569768667e-001, 6.342319770827903e-001, 6.391888708069510e-001, 6.440928619379103e-001, 6.489438719588370e-001, 6.537423605576077e-001, 6.584880851337298e-001, 6.631812141339760e-001, 6.678220835425680e-001, 6.724108172411909e-001, 6.769474477628238e-001, 6.814322991116203e-001, 6.858654748382075e-001, 6.902473717200389e-001, 6.945780315942305e-001, 6.988577886345723e-001, 7.030870111062841e-001, 7.072657025672327e-001, 7.113944257848260e-001, 7.154732426944290e-001, 7.195026439830985e-001, 7.234828817334932e-001, 7.274142345986069e-001, 7.312970074511849e-001, 7.351316679822494e-001, 7.389184365522026e-001, 7.426576944443859e-001, 7.463497090055007e-001, 7.499950482123952e-001, 7.535938869099762e-001, 7.571466999077385e-001, 7.606538444850638e-001, 7.641156987700492e-001, 7.675326614354857e-001, 7.709050089514420e-001, 7.742333215624221e-001, 7.778232325481845e-001, 7.814270064149287e-001, 7.850447177025628e-001, 7.886764423670212e-001, 7.923221120967158e-001, 7.959820967700946e-001, 7.996563317758608e-001, 8.033448993503086e-001, 8.070478834716908e-001, 8.107653699396460e-001, 8.144972972789495e-001, 8.182440529793520e-001, 8.220055802409774e-001, 8.257819730638135e-001, 8.295733277595025e-001, 8.333795909052661e-001, 8.372011675309458e-001, 8.410380100887621e-001, 8.448902254434451e-001, 8.487579234999332e-001, 8.526412173540159e-001, 8.565400676527846e-001, 8.604549056348771e-001, 8.643857000628266e-001, 8.683325790609170e-001, 8.722956751740608e-001, 8.762749666031351e-001, 8.802709132551304e-001, 8.842835045824377e-001, 8.883128944223906e-001, 8.923592430652362e-001, 8.964225553588761e-001, 9.005033305111698e-001, 9.046015901322544e-001, 9.087175268481533e-001, 9.128513435175228e-001, 9.170032543354397e-001, 9.211733194295764e-001, 9.253621126298693e-001, 9.295697250659099e-001, 9.337964321341071e-001, 9.380425301425804e-001, 9.423081689517414e-001, 9.465940375387719e-001, 9.509003478747394e-001, 9.552275212587145e-001, 9.595760267320104e-001, 9.639463919051639e-001, 9.683390417830139e-001, 9.727550129345379e-001, 9.771949650221782e-001, 9.805412820133607e-001, 9.839019362184458e-001, 9.874164682334337e-001, 9.908014047004694e-001, 9.933507869153496e-001, 9.950557200991184e-001, 9.963371610958786e-001, 9.974495869350226e-001, 9.984777943562472e-001, 9.989065960991410e-001, 9.990781467366092e-001, 9.993354868407409e-001, 9.995646545213720e-001, 9.997937878312032e-001, 9.999084209557779e-001, 9.999656354286557e-001, 1.0};
@@ -36105,19 +36105,19 @@
 
     record crit
       extends Modelica.Icons.Record;
-      constant SIunits.Temperature TCRIT=427.16;
-      constant SIunits.Pressure PCRIT=3651064.31106;
-      constant SIunits.Density DCRIT=516.084569;
+      constant SI.Temperature TCRIT=427.16;
+      constant SI.Pressure PCRIT=3651064.31106;
+      constant SI.Density DCRIT=516.084569;
 
     end crit;
 
     record data
-      constant SIunits.SpecificHeatCapacity R=62.0261;
+      constant SI.SpecificHeatCapacity R=62.0261;
       // 8.314471/0.13404794
-      constant SIunits.MolarMass MM=0.13404794;
+      constant SI.MolarMass MM=0.13404794;
       extends crit;
-      constant SIunits.SpecificEnthalpy HCRIT=460344.097769;
-      constant SIunits.SpecificEntropy SCRIT=1721.70241470;
+      constant SI.SpecificEnthalpy HCRIT=460344.097769;
+      constant SI.SpecificEntropy SCRIT=1721.70241470;
       extends fcrit;
       extends triple;
 
@@ -36126,9 +36126,9 @@
 
     record fcrit
       extends Modelica.Icons.Record;
-      constant SIunits.Temperature FTCRIT=427.16;
-      constant SIunits.Pressure FPCRIT=3651064.31106;
-      constant SIunits.Density FDCRIT=516.084569;
+      constant SI.Temperature FTCRIT=427.16;
+      constant SI.Pressure FPCRIT=3651064.31106;
+      constant SI.Density FDCRIT=516.084569;
 
     end fcrit;
 
@@ -36146,8 +36146,8 @@
 
     record ReferenceStates
       extends Modelica.Icons.Record;
-      constant SIunits.SpecificEnthalpy h0=1.0;
-      constant SIunits.SpecificEntropy s0=1.0;
+      constant SI.SpecificEnthalpy h0=1.0;
+      constant SI.SpecificEntropy s0=1.0;
 
     end ReferenceStates;
 
@@ -36171,10 +36171,10 @@
 
     record triple
       extends Modelica.Icons.Record;
-      constant SIunits.Temperature TTRIPLE=171.05;
-      constant SIunits.Pressure PTRIPLE=12.5148;
-      constant SIunits.Density DLTRIPLE=1647.782856;
-      constant SIunits.Density DVTRIPLE=0.001179726;
+      constant SI.Temperature TTRIPLE=171.05;
+      constant SI.Pressure PTRIPLE=12.5148;
+      constant SI.Density DLTRIPLE=1647.782856;
+      constant SI.Density DVTRIPLE=0.001179726;
 
     end triple;
 
diff -ur "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Media/myMedia.mo" "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Media/myMedia.mo"
--- "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Media/myMedia.mo"	2021-11-16 02:01:59.260483515 +0000
+++ "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Media/myMedia.mo"	2021-11-16 02:03:31.044208132 +0000
@@ -1,8 +1,8 @@
 within ThermofluidStream.Media;
 package myMedia "Library of media property models"
 extends Modelica.Icons.Package;
-import SI = Modelica.SIunits;
-import Cv = Modelica.SIunits.Conversions;
+import Modelica.Units.SI;
+import Cv = Modelica.Units.Conversions;
 
   package UsersGuide "User's Guide of Media Library"
     extends Modelica.Icons.Information;
@@ -2254,15 +2254,15 @@
           stateSelect=StateSelect.prefer),
         T(start=275.0),
         d(start=999.0));
-      Modelica.SIunits.Volume V(start=0.1, fixed=true);
-      parameter Modelica.SIunits.VolumeFlowRate dV=0.0
+      Modelica.Units.SI.Volume V(start=0.1, fixed=true);
+      parameter Modelica.Units.SI.VolumeFlowRate dV=0.0
         "Fixed time derivative of volume";
       parameter Medium.MassFlowRate m_flow_ext=0
         "Fixed mass flow rate into volume";
       parameter Medium.EnthalpyFlowRate H_flow_ext=10000
         "Fixed enthalpy flow rate into volume";
-      Modelica.SIunits.Mass m "Mass of volume";
-      Modelica.SIunits.InternalEnergy U "Internal energy of volume";
+      Modelica.Units.SI.Mass m "Mass of volume";
+      Modelica.Units.SI.InternalEnergy U "Internal energy of volume";
 
       Medium.ThermodynamicState state2;
       Medium.ThermodynamicState state;
@@ -2299,10 +2299,10 @@
     model MixtureGases "Test gas mixtures"
       extends Modelica.Icons.Example;
 
-      parameter Modelica.SIunits.Volume V=1 "Fixed size of volume 1 and volume 2";
-      parameter Modelica.SIunits.MassFlowRate m_flow_ext=0.01
+      parameter Modelica.Units.SI.Volume V=1 "Fixed size of volume 1 and volume 2";
+      parameter Modelica.Units.SI.MassFlowRate m_flow_ext=0.01
         "Fixed mass flow rate in to volume 1 and in to volume 2";
-      parameter Modelica.SIunits.EnthalpyFlowRate H_flow_ext=5000
+      parameter Modelica.Units.SI.EnthalpyFlowRate H_flow_ext=5000
         "Fixed enthalpy flow rate in to volume and in to volume 2";
 
       package Medium1 = myMedia.IdealGases.MixtureGases.CombustionAir
@@ -2395,7 +2395,7 @@
       Real der_p;
       Real der_T;
     protected
-      constant Modelica.SIunits.Time unitTime=1;
+      constant Modelica.Units.SI.Time unitTime=1;
     equation
       der(medium.p) = 0.0;
       der(medium.T) = 90;
@@ -2673,9 +2673,9 @@
 
       model MoistAir "Example for moist air"
         extends Modelica.Icons.Example;
-        parameter Modelica.SIunits.Temperature T_start=274
+        parameter Modelica.Units.SI.Temperature T_start=274
           "Initial guess value for temperature";
-        parameter Modelica.SIunits.Pressure p_start=1e5
+        parameter Modelica.Units.SI.Pressure p_start=1e5
           "Initial guess value for pressure";
         package Medium = myMedia.Air.ReferenceMoistAir        "Medium model";
         Medium.BaseProperties medium(
@@ -2693,7 +2693,7 @@
         Real der_p;
         Real der_T;
       protected
-        constant Modelica.SIunits.Time unitTime=1;
+        constant Modelica.Units.SI.Time unitTime=1;
       equation
         der(medium.p) = 0.0;
         der(medium.T) = 90;
@@ -2734,37 +2734,37 @@
         extends Modelica.Icons.Example;
 
         import Medium = ThermofluidStream.Media.myMedia.Air.ReferenceAir.Air_pT
-                                                               "Medium model";
+                                                               ;
 
-        parameter Modelica.SIunits.Temperature T_min=300
+        parameter Modelica.Units.SI.Temperature T_min=300
           "Vary temperature linearly from T_min (time=0) up to T_max (time=1)";
-        parameter Modelica.SIunits.Temperature T_max=500
+        parameter Modelica.Units.SI.Temperature T_max=500
           "Vary temperature linearly from T_min (time=0) up to T_max (time=1)";
-        parameter Modelica.SIunits.Pressure p=1.0e5 "Fixed pressure in model";
-        final parameter Modelica.SIunits.SpecificEnthalpy h_min=
+        parameter Modelica.Units.SI.Pressure p=1.0e5 "Fixed pressure in model";
+        final parameter Modelica.Units.SI.SpecificEnthalpy h_min=
             Medium.specificEnthalpy(Medium.setState_pT(p, T_min))
           "Specific enthalpy at T_min";
-        final parameter Modelica.SIunits.SpecificEnthalpy h_max=
+        final parameter Modelica.Units.SI.SpecificEnthalpy h_max=
             Medium.specificEnthalpy(Medium.setState_pT(p, T_max))
           "Specific enthalpy at T_max";
-        final parameter Modelica.SIunits.SpecificEntropy s_min=
+        final parameter Modelica.Units.SI.SpecificEntropy s_min=
             Medium.specificEntropy(Medium.setState_pT(p, T_min))
           "Specific entropy at T_min";
-        final parameter Modelica.SIunits.SpecificEntropy s_max=
+        final parameter Modelica.Units.SI.SpecificEntropy s_max=
             Medium.specificEntropy(Medium.setState_pT(p, T_max))
           "Specific entropy at T_max";
-        Modelica.SIunits.SpecificEnthalpy h1 "Pre-defined specific enthalpy";
-        Modelica.SIunits.SpecificEnthalpy h2
+        Modelica.Units.SI.SpecificEnthalpy h1 "Pre-defined specific enthalpy";
+        Modelica.Units.SI.SpecificEnthalpy h2
           "Specific enthalpy computed from T (= h1 required)";
-        Modelica.SIunits.SpecificEntropy s1 "Pre-defined specific entropy";
-        Modelica.SIunits.SpecificEntropy s2
+        Modelica.Units.SI.SpecificEntropy s1 "Pre-defined specific entropy";
+        Modelica.Units.SI.SpecificEntropy s2
           "Specific entropy computed from T (= h1 required)";
-        Modelica.SIunits.Temperature Th "Temperature computed from h1";
-        Modelica.SIunits.Temperature Ts "Temperature computed from s1";
+        Modelica.Units.SI.Temperature Th "Temperature computed from h1";
+        Modelica.Units.SI.Temperature Ts "Temperature computed from s1";
 
       protected
-        constant Modelica.SIunits.Time timeUnit=1.0;
 
+        constant Modelica.Units.SI.Time timeUnit=1.0;
       equation
         // Define specific enthalpy and specific entropy
         h1 = if time < 0 then h_min else if time >= 1 then h_max else h_min + time
@@ -2801,51 +2801,51 @@
         extends Modelica.Icons.Example;
 
         import Medium = ThermofluidStream.Media.myMedia.Air.ReferenceMoistAir
-                                                             "Medium model";
+                                                             ;
 
-        parameter Modelica.SIunits.Temperature T_min=300
+        parameter Modelica.Units.SI.Temperature T_min=300
           "Vary temperature linearly from T_min (time=0) up to T_max (time=1)";
-        parameter Modelica.SIunits.Temperature T_max=500
+        parameter Modelica.Units.SI.Temperature T_max=500
           "Vary temperature linearly from T_min (time=0) up to T_max (time=1)";
-        parameter Modelica.SIunits.Pressure p=1.0e5 "Fixed pressure in model";
-        parameter Modelica.SIunits.MassFraction[:] X=myMedia.Air.ReferenceMoistAir.reference_X
+        parameter Modelica.Units.SI.Pressure p=1.0e5 "Fixed pressure in model";
+        parameter Modelica.Units.SI.MassFraction[:] X=myMedia.Air.ReferenceMoistAir.reference_X
           "Mass fraction vector";
-        final parameter Modelica.SIunits.SpecificEnthalpy h_min=
+        final parameter Modelica.Units.SI.SpecificEnthalpy h_min=
             myMedia.Air.ReferenceMoistAir.specificEnthalpy(
             myMedia.Air.ReferenceMoistAir.setState_pTX(
                   p,
                   T_min,
                   X)) "Specific enthalpy at T_min";
-        final parameter Modelica.SIunits.SpecificEnthalpy h_max=
+        final parameter Modelica.Units.SI.SpecificEnthalpy h_max=
             myMedia.Air.ReferenceMoistAir.specificEnthalpy(
             myMedia.Air.ReferenceMoistAir.setState_pTX(
                   p,
                   T_max,
                   X)) "Specific enthalpy at T_max";
-        final parameter Modelica.SIunits.SpecificEntropy s_min=
+        final parameter Modelica.Units.SI.SpecificEntropy s_min=
             myMedia.Air.ReferenceMoistAir.specificEntropy(
             myMedia.Air.ReferenceMoistAir.setState_pTX(
                   p,
                   T_min,
                   X)) "Specific entropy at T_min";
-        final parameter Modelica.SIunits.SpecificEntropy s_max=
+        final parameter Modelica.Units.SI.SpecificEntropy s_max=
             myMedia.Air.ReferenceMoistAir.specificEntropy(
             myMedia.Air.ReferenceMoistAir.setState_pTX(
                   p,
                   T_max,
                   X)) "Specific entropy at T_max";
-        Modelica.SIunits.SpecificEnthalpy h1 "Pre-defined specific enthalpy";
-        Modelica.SIunits.SpecificEnthalpy h2
+        Modelica.Units.SI.SpecificEnthalpy h1 "Pre-defined specific enthalpy";
+        Modelica.Units.SI.SpecificEnthalpy h2
           "Specific enthalpy computed from T (= h1 required)";
-        Modelica.SIunits.SpecificEntropy s1 "Pre-defined specific entropy";
-        Modelica.SIunits.SpecificEntropy s2
+        Modelica.Units.SI.SpecificEntropy s1 "Pre-defined specific entropy";
+        Modelica.Units.SI.SpecificEntropy s2
           "Specific entropy computed from T (= h1 required)";
-        Modelica.SIunits.Temperature Th "Temperature computed from h1";
-        Modelica.SIunits.Temperature Ts "Temperature computed from s1";
+        Modelica.Units.SI.Temperature Th "Temperature computed from h1";
+        Modelica.Units.SI.Temperature Ts "Temperature computed from s1";
 
       protected
-        constant Modelica.SIunits.Time timeUnit=1.0;
 
+        constant Modelica.Units.SI.Time timeUnit=1.0;
       equation
         // Define specific enthalpy
         h1 = if time < 0 then h_min else if time >= 1 then h_max else h_min + time
@@ -2927,7 +2927,7 @@
         encapsulated package Inverse_sine_definition
           "Define sine as non-linear equation to be solved"
           import Modelica;
-          extends Modelica.Media.Common.OneNonLinearEquation;
+          extends ObsoleteModelica4.Media.Common.OneNonLinearEquation;
 
           redeclare record extends f_nonlinear_Data "Data for nonlinear equation"
             Real A;
@@ -3298,7 +3298,7 @@
             annotation (Evaluate=true, Dialog(group=
                   "Initial temperature or initial specific enthalpy"));
           parameter Medium.Temperature T_start=
-              Modelica.SIunits.Conversions.from_degC(20) "Initial temperature"
+              Modelica.Units.Conversions.from_degC(20) "Initial temperature"
             annotation (Dialog(group=
                   "Initial temperature or initial specific enthalpy", enable=
                   use_T_start));
@@ -3384,7 +3384,7 @@
             annotation (Evaluate=true, Dialog(group=
                   "Ambient temperature or ambient specific enthalpy"));
           parameter Medium.Temperature T_ambient=
-              Modelica.SIunits.Conversions.from_degC(20) "Ambient temperature"
+              Modelica.Units.Conversions.from_degC(20) "Ambient temperature"
             annotation (Dialog(group=
                   "Ambient temperature or ambient specific enthalpy", enable=
                   use_T_ambient));
@@ -3470,7 +3470,7 @@
             annotation (Evaluate=true, Dialog(group=
                   "Ambient temperature or ambient specific enthalpy"));
           parameter Medium.Temperature T_ambient=
-              Modelica.SIunits.Conversions.from_degC(20) "Ambient temperature"
+              Modelica.Units.Conversions.from_degC(20) "Ambient temperature"
             annotation (Dialog(group=
                   "Ambient temperature or ambient specific enthalpy", enable=
                   use_T_ambient));
@@ -3556,7 +3556,7 @@
           //   "Medium properties in port_b";
           Medium.MassFlowRate m_flow
             "Mass flow rate from port_a to port_b (m_flow > 0 is design flow direction)";
-          Modelica.SIunits.Pressure dp "Pressure drop from port_a to port_b";
+          Modelica.Units.SI.Pressure dp "Pressure drop from port_a to port_b";
         equation
           /* Handle reverse and zero flow */
           port_a.H_flow = semiLinear(
@@ -3601,7 +3601,7 @@
         end ShortPipe;
 
         partial model PartialTestModel "Basic test model to test a medium"
-          import SI = Modelica.SIunits;
+          import Modelica.Units.SI;
 
           replaceable package Medium = myMedia.Interfaces.PartialMedium
             "Medium model" annotation (choicesAllMatching=true);
@@ -3661,7 +3661,7 @@
 
         partial model PartialTestModel2
           "Slightly larger test model to test a medium"
-          import SI = Modelica.SIunits;
+          import Modelica.Units.SI;
           replaceable package Medium = myMedia.Interfaces.PartialMedium
             "Medium model" annotation (choicesAllMatching=true);
           parameter SI.AbsolutePressure p_start=1.0e5 "Initial value of pressure";
@@ -3833,7 +3833,7 @@
         extends Modelica.Icons.Example;
         extends Modelica.Icons.ObsoleteModel;
 
-        parameter Modelica.SIunits.Volume V=1 "Size of fixed volume";
+        parameter Modelica.Units.SI.Volume V=1 "Size of fixed volume";
         parameter Medium.MassFlowRate m_flow_ext=0.01
           "Mass flow rate into volume";
         parameter Medium.EnthalpyFlowRate H_flow_ext=5000
@@ -3875,7 +3875,7 @@
         extends Modelica.Icons.Example;
         extends Modelica.Icons.ObsoleteModel;
 
-        parameter Modelica.SIunits.Volume V=1 "Size of volume";
+        parameter Modelica.Units.SI.Volume V=1 "Size of volume";
         parameter Medium.MassFlowRate m_flow_ext=0.01
           "Mass flow rate flowing into volume";
         parameter Medium.EnthalpyFlowRate H_flow_ext=5000
@@ -4046,7 +4046,7 @@
             annotation (Evaluate=true, Dialog(group=
                   "Initial temperature or initial specific enthalpy"));
           parameter Medium.Temperature T_start=
-              Modelica.SIunits.Conversions.from_degC(20) "Initial temperature"
+              Modelica.Units.Conversions.from_degC(20) "Initial temperature"
             annotation (Dialog(group=
                   "Initial temperature or initial specific enthalpy", enable=
                   use_T_start));
@@ -4133,7 +4133,7 @@
             annotation (Evaluate=true, Dialog(group=
                   "Ambient temperature or ambient specific enthalpy"));
           parameter Medium.Temperature T_ambient=
-              Modelica.SIunits.Conversions.from_degC(20) "Ambient temperature"
+              Modelica.Units.Conversions.from_degC(20) "Ambient temperature"
             annotation (Dialog(group=
                   "Ambient temperature or ambient specific enthalpy", enable=
                   use_T_ambient));
@@ -4220,7 +4220,7 @@
             annotation (Evaluate=true, Dialog(group=
                   "Ambient temperature or ambient specific enthalpy"));
           parameter Medium.Temperature T_ambient=
-              Modelica.SIunits.Conversions.from_degC(20) "Ambient temperature"
+              Modelica.Units.Conversions.from_degC(20) "Ambient temperature"
             annotation (Dialog(group=
                   "Ambient temperature or ambient specific enthalpy", enable=
                   use_T_ambient));
@@ -4307,7 +4307,7 @@
           //   "Medium properties in port_b";
           Medium.MassFlowRate m_flow
             "Mass flow rate from port_a to port_b (m_flow > 0 is design flow direction)";
-          Modelica.SIunits.Pressure dp "Pressure drop from port_a to port_b";
+          Modelica.Units.SI.Pressure dp "Pressure drop from port_a to port_b";
         equation
           /* Handle reverse and zero flow */
           port_a.H_flow = semiLinear(
@@ -4352,7 +4352,7 @@
         end ShortPipe;
 
         partial model PartialTestModel "Basic test model to test a medium"
-          import SI = Modelica.SIunits;
+          import Modelica.Units.SI;
           extends Modelica.Icons.ObsoleteModel;
 
           replaceable package Medium = myMedia.Interfaces.PartialMedium
@@ -4406,7 +4406,7 @@
 
         partial model PartialTestModel2
           "Slightly larger test model to test a medium"
-          import SI = Modelica.SIunits;
+          import Modelica.Units.SI;
           extends Modelica.Icons.ObsoleteModel;
           replaceable package Medium = myMedia.Interfaces.PartialMedium
             "Medium model" annotation (choicesAllMatching=true);
@@ -4948,7 +4948,7 @@
         "Default mass fractions of medium";
       constant AbsolutePressure p_default=101325
         "Default value for pressure of medium (for initialization)";
-      constant Temperature T_default=Modelica.SIunits.Conversions.from_degC(20)
+      constant Temperature T_default=Modelica.Units.Conversions.from_degC(20)
         "Default value for temperature of medium (for initialization)";
       constant SpecificEnthalpy h_default=specificEnthalpy_pTX(
               p_default,
@@ -4998,11 +4998,11 @@
           annotation (Evaluate=true, Dialog(tab="Advanced"));
         parameter Boolean standardOrderComponents=true
           "If true, and reducedX = true, the last element of X will be computed from the other ones";
-        SI.Conversions.NonSIunits.Temperature_degC T_degC=
-            Modelica.SIunits.Conversions.to_degC(T)
+        Modelica.Units.NonSI.Temperature_degC T_degC=
+            Modelica.Units.Conversions.to_degC(T)
           "Temperature of medium in [degC]";
-        SI.Conversions.NonSIunits.Pressure_bar p_bar=
-            Modelica.SIunits.Conversions.to_bar(p)
+        Modelica.Units.NonSI.Pressure_bar p_bar=
+            Modelica.Units.Conversions.to_bar(p)
           "Absolute pressure of medium in [bar]";
 
         // Local connector definition, used for equation balancing check
@@ -8440,7 +8440,7 @@
           "Derivative of specific volume w.r.t. temperature";
         Real vp(unit="m4.kg-2.s2")
           "Derivative of specific volume w.r.t. pressure";
-        Modelica.SIunits.Density d;
+        Modelica.Units.SI.Density d;
       algorithm
         pro.R := g.R;
         pro.p := g.p;
@@ -8663,7 +8663,7 @@
   public
     record SaturationProperties "Properties in the two phase region"
       extends Modelica.Icons.Record;
-      SI.Temp_K T "Temperature";
+      SI.Temperature T "Temperature";
       SI.Density d "Density";
       SI.Pressure p "Pressure";
       SI.SpecificEnergy u "Specific inner energy";
@@ -8686,7 +8686,7 @@
       "Properties on both phase boundaries, including some derivatives"
 
       extends Modelica.Icons.Record;
-      SI.Temp_K T "Saturation temperature";
+      SI.Temperature T "Saturation temperature";
       SI.Density dl "Liquid density";
       SI.Density dv "Vapour density";
       SI.SpecificEnthalpy hl "Liquid specific enthalpy";
@@ -9003,14 +9003,14 @@
 
     record FundamentalConstants "Constants of the medium"
       extends Modelica.Icons.Record;
-      Modelica.SIunits.MolarHeatCapacity R_bar;
-      Modelica.SIunits.SpecificHeatCapacity R;
-      Modelica.SIunits.MolarMass MM;
-      Modelica.SIunits.MolarDensity rhored;
-      Modelica.SIunits.Temperature Tred;
-      Modelica.SIunits.AbsolutePressure pred;
-      Modelica.SIunits.SpecificEnthalpy h_off;
-      Modelica.SIunits.SpecificEntropy s_off;
+      Modelica.Units.SI.MolarHeatCapacity R_bar;
+      Modelica.Units.SI.SpecificHeatCapacity R;
+      Modelica.Units.SI.MolarMass MM;
+      Modelica.Units.SI.MolarDensity rhored;
+      Modelica.Units.SI.Temperature Tred;
+      Modelica.Units.SI.AbsolutePressure pred;
+      Modelica.Units.SI.SpecificEnthalpy h_off;
+      Modelica.Units.SI.SpecificEntropy s_off;
     end FundamentalConstants;
 
     record AuxiliaryProperties "Intermediate property data record"
@@ -9726,8 +9726,8 @@
         T_min=Cv.from_degC(0),
         T_max=Cv.from_degC(100),
         fluidConstants=airConstants,
-        Temperature(min=Modelica.SIunits.Conversions.from_degC(0), max=
-              Modelica.SIunits.Conversions.from_degC(100)));
+        Temperature(min=Modelica.Units.Conversions.from_degC(0), max=
+              Modelica.Units.Conversions.from_degC(100)));
 
       import Modelica.Constants;
 
@@ -9778,7 +9778,7 @@
         input Integer method=1 "Dummy for compatibility reasons";
         output ThermalConductivity lambda "Thermal conductivity";
         import ThermofluidStream.Media.myMedia.Incompressible.TableBased.Polynomials_Temp;
-        import Cv = Modelica.SIunits.Conversions;
+        import Cv = Modelica.Units.Conversions;
       algorithm
         lambda := 1e-3*Polynomials_Temp.evaluateWithRange(
             {6.5691470817717812E-15,-3.4025961923050509E-11,5.3279284846303157E-08,
@@ -9806,7 +9806,7 @@
     package ReferenceAir
       "ReferenceAir: Detailed dry air model with a large operating range (130 ... 2000 K, 0 ... 2000 MPa) based on Helmholtz equations of state"
       extends Modelica.Icons.VariantsPackage;
-      import SI = Modelica.SIunits;
+      import Modelica.Units.SI;
 
       constant myMedia.Interfaces.Types.TwoPhase.FluidConstants airConstants(
         chemicalFormula="N2+O2+Ar",
@@ -10780,8 +10780,8 @@
 
         function airBaseProp_ps "Intermediate property record for air"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.SpecificEntropy s "Specific entropy";
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.SpecificEntropy s "Specific entropy";
           output Common.AuxiliaryProperties aux "Auxiliary record";
         protected
           myMedia.Common.HelmholtzDerivs f "Dimensionless Helmholtz function and derivatives w.r.t. delta and tau";
@@ -10807,10 +10807,10 @@
         function rho_props_ps
           "Density as function of pressure and specific entropy"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.SpecificEntropy s "Specific entropy";
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.SpecificEntropy s "Specific entropy";
           input Common.AuxiliaryProperties aux "Auxiliary record";
-          output Modelica.SIunits.Density rho "Density";
+          output Modelica.Units.SI.Density rho "Density";
         algorithm
           rho := aux.rho;
           annotation (Inline=false, LateInline=true);
@@ -10818,9 +10818,9 @@
 
         function rho_ps "Density as function of pressure and specific entropy"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.SpecificEntropy s "Specific entropy";
-          output Modelica.SIunits.Density rho "Density";
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.SpecificEntropy s "Specific entropy";
+          output Modelica.Units.SI.Density rho "Density";
         algorithm
           rho := rho_props_ps(
                   p,
@@ -10831,10 +10831,10 @@
         function T_props_ps
           "Temperature as function of pressure and specific entropy"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.SpecificEntropy s "Specific entropy";
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.SpecificEntropy s "Specific entropy";
           input Common.AuxiliaryProperties aux "Auxiliary record";
-          output Modelica.SIunits.Temperature T "Temperature";
+          output Modelica.Units.SI.Temperature T "Temperature";
         algorithm
           T := aux.T;
           annotation (Inline=false, LateInline=true);
@@ -10842,9 +10842,9 @@
 
         function T_ps "Temperature as function of pressure and specific entropy"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.SpecificEntropy s "Specific entropy";
-          output Modelica.SIunits.Temperature T "Temperature";
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.SpecificEntropy s "Specific entropy";
+          output Modelica.Units.SI.Temperature T "Temperature";
         algorithm
           T := T_props_ps(
                   p,
@@ -10855,10 +10855,10 @@
         function h_props_ps
           "Specific enthalpy as function or pressure and temperature"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.SpecificEntropy s "Specific entropy";
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.SpecificEntropy s "Specific entropy";
           input Common.AuxiliaryProperties aux "Auxiliary record";
-          output Modelica.SIunits.SpecificEnthalpy h "Specific enthalpy";
+          output Modelica.Units.SI.SpecificEnthalpy h "Specific enthalpy";
         algorithm
           h := aux.h;
           annotation (Inline=false, LateInline=true);
@@ -10866,9 +10866,9 @@
 
         function h_ps "Specific enthalpy as function or pressure and temperature"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.SpecificEntropy s "Specific entropy";
-          output Modelica.SIunits.SpecificEnthalpy h "Specific enthalpy";
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.SpecificEntropy s "Specific entropy";
+          output Modelica.Units.SI.SpecificEnthalpy h "Specific enthalpy";
         algorithm
           h := h_props_ps(
                   p,
@@ -10878,8 +10878,8 @@
 
         function airBaseProp_ph "Intermediate property record for air"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.SpecificEnthalpy h "Specific enthalpy";
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.SpecificEnthalpy h "Specific enthalpy";
           output Common.AuxiliaryProperties aux "Auxiliary record";
         protected
           myMedia.Common.HelmholtzDerivs f "Dimensionless Helmholtz function and derivatives w.r.t. delta and tau";
@@ -10906,10 +10906,10 @@
         function rho_props_ph
           "Density as function of pressure and specific enthalpy"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.SpecificEnthalpy h "Specific enthalpy";
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.SpecificEnthalpy h "Specific enthalpy";
           input Common.AuxiliaryProperties aux "Auxiliary record";
-          output Modelica.SIunits.Density rho "Density";
+          output Modelica.Units.SI.Density rho "Density";
         algorithm
           rho := aux.rho;
           annotation (
@@ -10920,9 +10920,9 @@
 
         function rho_ph "Density as function of pressure and specific enthalpy"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.SpecificEnthalpy h "Specific enthalpy";
-          output Modelica.SIunits.Density rho "Density";
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.SpecificEnthalpy h "Specific enthalpy";
+          output Modelica.Units.SI.Density rho "Density";
         algorithm
           rho := rho_props_ph(
                   p,
@@ -10932,8 +10932,8 @@
 
         function rho_ph_der "Derivative function of rho_ph"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.SpecificEnthalpy h "Specific enthalpy";
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.SpecificEnthalpy h "Specific enthalpy";
           input Common.AuxiliaryProperties aux "Auxiliary record";
           input Real p_der "Derivative of pressure";
           input Real h_der "Derivative of specific enthalpy";
@@ -10947,10 +10947,10 @@
         function T_props_ph
           "Temperature as function of pressure and specific enthalpy"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.SpecificEnthalpy h "Specific enthalpy";
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.SpecificEnthalpy h "Specific enthalpy";
           input Common.AuxiliaryProperties aux "Auxiliary record";
-          output Modelica.SIunits.Temperature T "Temperature";
+          output Modelica.Units.SI.Temperature T "Temperature";
         algorithm
           T := aux.T;
           annotation (
@@ -10961,9 +10961,9 @@
 
         function T_ph "Temperature as function of pressure and specific enthalpy"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.SpecificEnthalpy h "Specific enthalpy";
-          output Modelica.SIunits.Temperature T "Temperature";
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.SpecificEnthalpy h "Specific enthalpy";
+          output Modelica.Units.SI.Temperature T "Temperature";
         algorithm
           T := T_props_ph(
                   p,
@@ -10973,8 +10973,8 @@
 
         function T_ph_der "Derivative function of T_ph"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.SpecificEnthalpy h "Specific enthalpy";
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.SpecificEnthalpy h "Specific enthalpy";
           input Common.AuxiliaryProperties aux "Auxiliary record";
           input Real p_der "Derivative of pressure";
           input Real h_der "Derivative of specific enthalpy";
@@ -10988,10 +10988,10 @@
         function s_props_ph
           "Specific entropy as function of pressure and specific enthalpy"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.SpecificEnthalpy h "Specific enthalpy";
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.SpecificEnthalpy h "Specific enthalpy";
           input Common.AuxiliaryProperties aux "Auxiliary record";
-          output Modelica.SIunits.SpecificEntropy s "Specific entropy";
+          output Modelica.Units.SI.SpecificEntropy s "Specific entropy";
         algorithm
           s := aux.s;
           annotation (
@@ -11003,9 +11003,9 @@
         function s_ph
           "Specific entropy as function of pressure and specific enthalpy"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.SpecificEnthalpy h "Specific enthalpy";
-          output Modelica.SIunits.SpecificEntropy s "Specific entropy";
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.SpecificEnthalpy h "Specific enthalpy";
+          output Modelica.Units.SI.SpecificEntropy s "Specific entropy";
         algorithm
           s := s_props_ph(
                   p,
@@ -11016,8 +11016,8 @@
         function s_ph_der
           "Specific entropy as function of pressure and specific enthalpy"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.SpecificEnthalpy h "Specific enthalpy";
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.SpecificEnthalpy h "Specific enthalpy";
           input Common.AuxiliaryProperties aux "Auxiliary record";
           input Real p_der "Derivative of pressure";
           input Real h_der "Derivative of specific enthalpy";
@@ -11029,10 +11029,10 @@
         function cv_props_ph
           "Specific heat capacity at constant volume as function of pressure and specific enthalpy"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.SpecificEnthalpy h "Specific enthalpy";
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.SpecificEnthalpy h "Specific enthalpy";
           input Common.AuxiliaryProperties aux "Auxiliary record";
-          output Modelica.SIunits.SpecificHeatCapacity cv
+          output Modelica.Units.SI.SpecificHeatCapacity cv
             "Specific heat capacity";
         algorithm
           cv := aux.cv;
@@ -11042,9 +11042,9 @@
         function cv_ph
           "Specific heat capacity at constant volume as function of pressure and specific enthalpy"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.SpecificEnthalpy h "Specific enthalpy";
-          output Modelica.SIunits.SpecificHeatCapacity cv
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.SpecificEnthalpy h "Specific enthalpy";
+          output Modelica.Units.SI.SpecificHeatCapacity cv
             "Specific heat capacity";
         algorithm
           cv := cv_props_ph(
@@ -11056,10 +11056,10 @@
         function cp_props_ph
           "Specific heat capacity at constant pressure as function of pressure and specific enthalpy"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.SpecificEnthalpy h "Specific enthalpy";
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.SpecificEnthalpy h "Specific enthalpy";
           input Common.AuxiliaryProperties aux "Auxiliary record";
-          output Modelica.SIunits.SpecificHeatCapacity cp
+          output Modelica.Units.SI.SpecificHeatCapacity cp
             "Specific heat capacity";
         algorithm
           cp := aux.cp;
@@ -11069,9 +11069,9 @@
         function cp_ph
           "Specific heat capacity at constant pressure as function of pressure and specific enthalpy"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.SpecificEnthalpy h "Specific enthalpy";
-          output Modelica.SIunits.SpecificHeatCapacity cp
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.SpecificEnthalpy h "Specific enthalpy";
+          output Modelica.Units.SI.SpecificHeatCapacity cp
             "Specific heat capacity";
         algorithm
           cp := cp_props_ph(
@@ -11083,10 +11083,10 @@
         function beta_props_ph
           "Isobaric expansion coefficient as function of pressure and specific enthalpy"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.SpecificEnthalpy h "Specific enthalpy";
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.SpecificEnthalpy h "Specific enthalpy";
           input Common.AuxiliaryProperties aux "Auxiliary record";
-          output Modelica.SIunits.RelativePressureCoefficient beta
+          output Modelica.Units.SI.RelativePressureCoefficient beta
             "Isobaric expansion coefficient";
         algorithm
           beta := aux.pt/(aux.rho*aux.pd);
@@ -11096,9 +11096,9 @@
         function beta_ph
           "Isobaric expansion coefficient as function of pressure and specific enthalpy"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.SpecificEnthalpy h "Specific enthalpy";
-          output Modelica.SIunits.RelativePressureCoefficient beta
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.SpecificEnthalpy h "Specific enthalpy";
+          output Modelica.Units.SI.RelativePressureCoefficient beta
             "Isobaric expansion coefficient";
         algorithm
           beta := beta_props_ph(
@@ -11110,10 +11110,10 @@
         function kappa_props_ph
           "Isothermal compressibility factor as function of pressure and specific enthalpy"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.SpecificEnthalpy h "Specific enthalpy";
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.SpecificEnthalpy h "Specific enthalpy";
           input Common.AuxiliaryProperties aux "Auxiliary record";
-          output Modelica.SIunits.IsothermalCompressibility kappa
+          output Modelica.Units.SI.IsothermalCompressibility kappa
             "Isothermal compressibility factor";
         algorithm
           kappa := 1/(aux.rho*aux.pd);
@@ -11123,9 +11123,9 @@
         function kappa_ph
           "Isothermal compressibility factor as function of pressure and specific enthalpy"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.SpecificEnthalpy h "Specific enthalpy";
-          output Modelica.SIunits.IsothermalCompressibility kappa
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.SpecificEnthalpy h "Specific enthalpy";
+          output Modelica.Units.SI.IsothermalCompressibility kappa
             "Isothermal compressibility factor";
         algorithm
           kappa := kappa_props_ph(
@@ -11137,10 +11137,10 @@
         function velocityOfSound_props_ph
           "Speed of sound as function of pressure and specific enthalpy"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.SpecificEnthalpy h "Specific enthalpy";
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.SpecificEnthalpy h "Specific enthalpy";
           input Common.AuxiliaryProperties aux "Auxiliary record";
-          output Modelica.SIunits.Velocity a "Speed of sound";
+          output Modelica.Units.SI.Velocity a "Speed of sound";
         algorithm
           a := sqrt(max(0, aux.pd + aux.pt*aux.pt*aux.T/(aux.rho*aux.rho*aux.cv)));
           annotation (Inline=false, LateInline=true);
@@ -11148,9 +11148,9 @@
 
         function velocityOfSound_ph
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.SpecificEnthalpy h "Specific enthalpy";
-          output Modelica.SIunits.Velocity a "Speed of sound";
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.SpecificEnthalpy h "Specific enthalpy";
+          output Modelica.Units.SI.Velocity a "Speed of sound";
         algorithm
           a := velocityOfSound_props_ph(
                   p,
@@ -11161,8 +11161,8 @@
         function isentropicExponent_props_ph
           "Isentropic exponent as function of pressure and specific enthalpy"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.SpecificEnthalpy h "Specific enthalpy";
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.SpecificEnthalpy h "Specific enthalpy";
           input Common.AuxiliaryProperties aux "Auxiliary record";
           output Real gamma "Isentropic exponent";
         algorithm
@@ -11174,8 +11174,8 @@
         function isentropicExponent_ph
           "Isentropic exponent as function of pressure and specific enthalpy"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.SpecificEnthalpy h "Specific enthalpy";
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.SpecificEnthalpy h "Specific enthalpy";
           output Real gamma "Isentropic exponent";
         algorithm
           gamma := isentropicExponent_props_ph(
@@ -11187,10 +11187,10 @@
 
         function ddph_props "Density derivative by pressure"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.SpecificEnthalpy h "Specific enthalpy";
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.SpecificEnthalpy h "Specific enthalpy";
           input Common.AuxiliaryProperties aux "Auxiliary record";
-          output Modelica.SIunits.DerDensityByPressure ddph
+          output Modelica.Units.SI.DerDensityByPressure ddph
             "Density derivative by pressure";
         algorithm
           ddph := ((aux.rho*(aux.cv*aux.rho + aux.pt))/(aux.rho*aux.rho*aux.pd*
@@ -11200,9 +11200,9 @@
 
         function ddph "Density derivative by pressure"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.SpecificEnthalpy h "Specific enthalpy";
-          output Modelica.SIunits.DerDensityByPressure ddph
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.SpecificEnthalpy h "Specific enthalpy";
+          output Modelica.Units.SI.DerDensityByPressure ddph
             "Density derivative by pressure";
         algorithm
           ddph := ddph_props(
@@ -11213,10 +11213,10 @@
 
         function ddhp_props "Density derivative by specific enthalpy"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.SpecificEnthalpy h "Specific enthalpy";
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.SpecificEnthalpy h "Specific enthalpy";
           input Common.AuxiliaryProperties aux "Auxiliary record";
-          output Modelica.SIunits.DerDensityByEnthalpy ddhp
+          output Modelica.Units.SI.DerDensityByEnthalpy ddhp
             "Density derivative by specific enthalpy";
         algorithm
           ddhp := -aux.rho*aux.rho*aux.pt/(aux.rho*aux.rho*aux.pd*aux.cv + aux.T*
@@ -11226,9 +11226,9 @@
 
         function ddhp "Density derivative by specific enthalpy"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.SpecificEnthalpy h "Specific enthalpy";
-          output Modelica.SIunits.DerDensityByEnthalpy ddhp
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.SpecificEnthalpy h "Specific enthalpy";
+          output Modelica.Units.SI.DerDensityByEnthalpy ddhp
             "Density derivative by specific enthalpy";
         algorithm
           ddhp := ddhp_props(
@@ -11240,8 +11240,8 @@
         function airBaseProp_pT
           "Intermediate property record for air (p and T preferred states)"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.Temperature T "Temperature";
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.Temperature T "Temperature";
           output Common.AuxiliaryProperties aux "Auxiliary record";
         protected
           myMedia.Common.HelmholtzDerivs f "Dimensionless Helmholtz function and derivatives w.r.t. delta and tau";
@@ -11266,10 +11266,10 @@
 
         function rho_props_pT "Density as function or pressure and temperature"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.Temperature T "Temperature";
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.Temperature T "Temperature";
           input Common.AuxiliaryProperties aux "Auxiliary record";
-          output Modelica.SIunits.Density rho "Density";
+          output Modelica.Units.SI.Density rho "Density";
         algorithm
           rho := aux.rho;
           annotation (
@@ -11280,9 +11280,9 @@
 
         function rho_pT "Density as function or pressure and temperature"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.Temperature T "Temperature";
-          output Modelica.SIunits.Density rho "Density";
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.Temperature T "Temperature";
+          output Modelica.Units.SI.Density rho "Density";
         algorithm
           rho := rho_props_pT(
                   p,
@@ -11292,8 +11292,8 @@
 
         function rho_pT_der "Derivative function of rho_pT"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.Temperature T "Temperature";
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.Temperature T "Temperature";
           input Common.AuxiliaryProperties aux "Auxiliary record";
           input Real p_der "Derivative of pressure";
           input Real T_der "Derivative of temperature";
@@ -11305,10 +11305,10 @@
         function h_props_pT
           "Specific enthalpy as function or pressure and temperature"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.Temperature T "Temperature";
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.Temperature T "Temperature";
           input Common.AuxiliaryProperties aux "Auxiliary record";
-          output Modelica.SIunits.SpecificEnthalpy h "Specific enthalpy";
+          output Modelica.Units.SI.SpecificEnthalpy h "Specific enthalpy";
         algorithm
           h := aux.h;
           annotation (
@@ -11319,9 +11319,9 @@
 
         function h_pT "Specific enthalpy as function or pressure and temperature"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.Temperature T "Temperature";
-          output Modelica.SIunits.SpecificEnthalpy h "Specific enthalpy";
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.Temperature T "Temperature";
+          output Modelica.Units.SI.SpecificEnthalpy h "Specific enthalpy";
         algorithm
           h := h_props_pT(
                   p,
@@ -11331,8 +11331,8 @@
 
         function h_pT_der "Derivative function of h_pT"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.Temperature T "Temperature";
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.Temperature T "Temperature";
           input Common.AuxiliaryProperties aux "Auxiliary record";
           input Real p_der "Derivative of pressure";
           input Real T_der "Derivative of temperature";
@@ -11346,10 +11346,10 @@
         function s_props_pT
           "Specific entropy as function of pressure and temperature"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.Temperature T "Temperature";
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.Temperature T "Temperature";
           input Common.AuxiliaryProperties aux "Auxiliary record";
-          output Modelica.SIunits.SpecificEntropy s "Specific entropy";
+          output Modelica.Units.SI.SpecificEntropy s "Specific entropy";
         algorithm
           s := aux.s;
           annotation (Inline=false, LateInline=true);
@@ -11357,9 +11357,9 @@
 
         function s_pT "Temperature as function of pressure and temperature"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.Temperature T "Temperature";
-          output Modelica.SIunits.SpecificEntropy s "Specific entropy";
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.Temperature T "Temperature";
+          output Modelica.Units.SI.SpecificEntropy s "Specific entropy";
         algorithm
           s := s_props_pT(
                   p,
@@ -11371,10 +11371,10 @@
           "Specific heat capacity at constant volume as function of pressure and temperature"
 
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.Temperature T "Temperature";
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.Temperature T "Temperature";
           input Common.AuxiliaryProperties aux "Auxiliary record";
-          output Modelica.SIunits.SpecificHeatCapacity cv
+          output Modelica.Units.SI.SpecificHeatCapacity cv
             "Specific heat capacity";
         algorithm
           cv := aux.cv;
@@ -11384,9 +11384,9 @@
         function cv_pT
           "Specific heat capacity at constant volume as function of pressure and temperature"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.Temperature T "Temperature";
-          output Modelica.SIunits.SpecificHeatCapacity cv
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.Temperature T "Temperature";
+          output Modelica.Units.SI.SpecificHeatCapacity cv
             "Specific heat capacity";
         algorithm
           cv := cv_props_pT(
@@ -11398,10 +11398,10 @@
         function cp_props_pT
           "Specific heat capacity at constant pressure as function of pressure and temperature"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.Temperature T "Temperature";
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.Temperature T "Temperature";
           input Common.AuxiliaryProperties aux "Auxiliary record";
-          output Modelica.SIunits.SpecificHeatCapacity cp
+          output Modelica.Units.SI.SpecificHeatCapacity cp
             "Specific heat capacity";
         algorithm
           cp := aux.cp;
@@ -11412,9 +11412,9 @@
           "Specific heat capacity at constant pressure as function of pressure and temperature"
 
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.Temperature T "Temperature";
-          output Modelica.SIunits.SpecificHeatCapacity cp
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.Temperature T "Temperature";
+          output Modelica.Units.SI.SpecificHeatCapacity cp
             "Specific heat capacity";
         algorithm
           cp := cp_props_pT(
@@ -11426,10 +11426,10 @@
         function beta_props_pT
           "Isobaric expansion coefficient as function of pressure and temperature"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.Temperature T "Temperature";
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.Temperature T "Temperature";
           input Common.AuxiliaryProperties aux "Auxiliary record";
-          output Modelica.SIunits.RelativePressureCoefficient beta
+          output Modelica.Units.SI.RelativePressureCoefficient beta
             "Isobaric expansion coefficient";
         algorithm
           beta := aux.pt/(aux.rho*aux.pd);
@@ -11439,9 +11439,9 @@
         function beta_pT
           "Isobaric expansion coefficient as function of pressure and temperature"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.Temperature T "Temperature";
-          output Modelica.SIunits.RelativePressureCoefficient beta
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.Temperature T "Temperature";
+          output Modelica.Units.SI.RelativePressureCoefficient beta
             "Isobaric expansion coefficient";
         algorithm
           beta := beta_props_pT(
@@ -11453,10 +11453,10 @@
         function kappa_props_pT
           "Isothermal compressibility factor as function of pressure and temperature"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.Temperature T "Temperature";
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.Temperature T "Temperature";
           input Common.AuxiliaryProperties aux "Auxiliary record";
-          output Modelica.SIunits.IsothermalCompressibility kappa
+          output Modelica.Units.SI.IsothermalCompressibility kappa
             "Isothermal compressibility factor";
         algorithm
           kappa := 1/(aux.rho*aux.pd);
@@ -11466,9 +11466,9 @@
         function kappa_pT
           "Isothermal compressibility factor as function of pressure and temperature"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.Temperature T "Temperature";
-          output Modelica.SIunits.IsothermalCompressibility kappa
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.Temperature T "Temperature";
+          output Modelica.Units.SI.IsothermalCompressibility kappa
             "Isothermal compressibility factor";
         algorithm
           kappa := kappa_props_pT(
@@ -11480,10 +11480,10 @@
         function velocityOfSound_props_pT
           "Speed of sound as function of pressure and temperature"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.Temperature T "Temperature";
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.Temperature T "Temperature";
           input Common.AuxiliaryProperties aux "Auxiliary record";
-          output Modelica.SIunits.Velocity a "Speed of sound";
+          output Modelica.Units.SI.Velocity a "Speed of sound";
         algorithm
           a := sqrt(max(0, (aux.pd*aux.rho*aux.rho*aux.cv + aux.pt*aux.pt*aux.T)/
             (aux.rho*aux.rho*aux.cv)));
@@ -11493,9 +11493,9 @@
         function velocityOfSound_pT
           "Speed of sound as function of pressure and temperature"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.Temperature T "Temperature";
-          output Modelica.SIunits.Velocity a "Speed of sound";
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.Temperature T "Temperature";
+          output Modelica.Units.SI.Velocity a "Speed of sound";
         algorithm
           a := velocityOfSound_props_pT(
                   p,
@@ -11506,8 +11506,8 @@
         function isentropicExponent_props_pT
           "Isentropic exponent as function of pressure and temperature"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.Temperature T "Temperature";
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.Temperature T "Temperature";
           input Common.AuxiliaryProperties aux "Auxiliary record";
           output Real gamma "Isentropic exponent";
         algorithm
@@ -11519,8 +11519,8 @@
         function isentropicExponent_pT
           "Isentropic exponent as function of pressure and temperature"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Pressure p "Pressure";
-          input Modelica.SIunits.Temperature T "Temperature";
+          input Modelica.Units.SI.Pressure p "Pressure";
+          input Modelica.Units.SI.Temperature T "Temperature";
           output Real gamma "Isentropic exponent";
         algorithm
           gamma := isentropicExponent_props_pT(
@@ -11532,8 +11532,8 @@
         function airBaseProp_dT
           "Intermediate property record for air (d and T preferred states)"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Density d "Density";
-          input Modelica.SIunits.Temperature T "Temperature";
+          input Modelica.Units.SI.Density d "Density";
+          input Modelica.Units.SI.Temperature T "Temperature";
           output Common.AuxiliaryProperties aux "Auxiliary record";
         protected
           myMedia.Common.HelmholtzDerivs f "Dimensionless Helmholtz function and derivatives w.r.t. delta and tau";
@@ -11556,10 +11556,10 @@
         function h_props_dT
           "Specific enthalpy as function of density and temperature"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Density d "Density";
-          input Modelica.SIunits.Temperature T "Temperature";
+          input Modelica.Units.SI.Density d "Density";
+          input Modelica.Units.SI.Temperature T "Temperature";
           input Common.AuxiliaryProperties aux "Auxiliary record";
-          output Modelica.SIunits.SpecificEnthalpy h "Specific enthalpy";
+          output Modelica.Units.SI.SpecificEnthalpy h "Specific enthalpy";
         algorithm
           h := aux.h;
           annotation (
@@ -11570,9 +11570,9 @@
 
         function h_dT "Specific enthalpy as function of density and temperature"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Density d "Density";
-          input Modelica.SIunits.Temperature T "Temperature";
-          output Modelica.SIunits.SpecificEnthalpy h "Specific enthalpy";
+          input Modelica.Units.SI.Density d "Density";
+          input Modelica.Units.SI.Temperature T "Temperature";
+          output Modelica.Units.SI.SpecificEnthalpy h "Specific enthalpy";
         algorithm
           h := h_props_dT(
                   d,
@@ -11582,8 +11582,8 @@
 
         function h_dT_der "Derivative function of h_dT"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Density d "Density";
-          input Modelica.SIunits.Temperature T "Temperature";
+          input Modelica.Units.SI.Density d "Density";
+          input Modelica.Units.SI.Temperature T "Temperature";
           input Common.AuxiliaryProperties aux "Auxiliary record";
           input Real d_der "Derivative of density";
           input Real T_der "Derivative of temperature";
@@ -11595,10 +11595,10 @@
 
         function p_props_dT "Pressure as function of density and temperature"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Density d "Density";
-          input Modelica.SIunits.Temperature T "Temperature";
+          input Modelica.Units.SI.Density d "Density";
+          input Modelica.Units.SI.Temperature T "Temperature";
           input Common.AuxiliaryProperties aux "Auxiliary record";
-          output Modelica.SIunits.Pressure p "Pressure";
+          output Modelica.Units.SI.Pressure p "Pressure";
         algorithm
           p := aux.p;
           annotation (
@@ -11609,9 +11609,9 @@
 
         function p_dT "Pressure as function of density and temperature"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Density d "Density";
-          input Modelica.SIunits.Temperature T "Temperature";
-          output Modelica.SIunits.Pressure p "Pressure";
+          input Modelica.Units.SI.Density d "Density";
+          input Modelica.Units.SI.Temperature T "Temperature";
+          output Modelica.Units.SI.Pressure p "Pressure";
         algorithm
           p := p_props_dT(
                   d,
@@ -11621,8 +11621,8 @@
 
         function p_dT_der "Derivative function of p_dT"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Density d "Density";
-          input Modelica.SIunits.Temperature T "Temperature";
+          input Modelica.Units.SI.Density d "Density";
+          input Modelica.Units.SI.Temperature T "Temperature";
           input Common.AuxiliaryProperties aux "Auxiliary record";
           input Real d_der "Derivative of density";
           input Real T_der "Derivative of temperature";
@@ -11634,10 +11634,10 @@
         function s_props_dT
           "Specific entropy as function of density and temperature"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Density d "Density";
-          input Modelica.SIunits.Temperature T "Temperature";
+          input Modelica.Units.SI.Density d "Density";
+          input Modelica.Units.SI.Temperature T "Temperature";
           input Common.AuxiliaryProperties aux "Auxiliary record";
-          output Modelica.SIunits.SpecificEntropy s "Specific entropy";
+          output Modelica.Units.SI.SpecificEntropy s "Specific entropy";
         algorithm
           s := aux.s;
           annotation (Inline=false, LateInline=true);
@@ -11645,9 +11645,9 @@
 
         function s_dT "Temperature as function of density and temperature"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Density d "Density";
-          input Modelica.SIunits.Temperature T "Temperature";
-          output Modelica.SIunits.SpecificEntropy s "Specific entropy";
+          input Modelica.Units.SI.Density d "Density";
+          input Modelica.Units.SI.Temperature T "Temperature";
+          output Modelica.Units.SI.SpecificEntropy s "Specific entropy";
         algorithm
           s := s_props_dT(
                   d,
@@ -11658,10 +11658,10 @@
         function cv_props_dT
           "Specific heat capacity at constant volume as function of density and temperature"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Density d "Density";
-          input Modelica.SIunits.Temperature T "Temperature";
+          input Modelica.Units.SI.Density d "Density";
+          input Modelica.Units.SI.Temperature T "Temperature";
           input Common.AuxiliaryProperties aux "Auxiliary record";
-          output Modelica.SIunits.SpecificHeatCapacity cv
+          output Modelica.Units.SI.SpecificHeatCapacity cv
             "Specific heat capacity";
         algorithm
           cv := aux.cv;
@@ -11671,9 +11671,9 @@
         function cv_dT
           "Specific heat capacity at constant volume as function of density and temperature"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Density d "Density";
-          input Modelica.SIunits.Temperature T "Temperature";
-          output Modelica.SIunits.SpecificHeatCapacity cv
+          input Modelica.Units.SI.Density d "Density";
+          input Modelica.Units.SI.Temperature T "Temperature";
+          output Modelica.Units.SI.SpecificHeatCapacity cv
             "Specific heat capacity";
         algorithm
           cv := cv_props_dT(
@@ -11685,10 +11685,10 @@
         function cp_props_dT
           "Specific heat capacity at constant pressure as function of density and temperature"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Density d "Density";
-          input Modelica.SIunits.Temperature T "Temperature";
+          input Modelica.Units.SI.Density d "Density";
+          input Modelica.Units.SI.Temperature T "Temperature";
           input Common.AuxiliaryProperties aux "Auxiliary record";
-          output Modelica.SIunits.SpecificHeatCapacity cp
+          output Modelica.Units.SI.SpecificHeatCapacity cp
             "Specific heat capacity";
         algorithm
           cp := aux.cp;
@@ -11698,9 +11698,9 @@
         function cp_dT
           "Specific heat capacity at constant pressure as function of density and temperature"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Density d "Density";
-          input Modelica.SIunits.Temperature T "Temperature";
-          output Modelica.SIunits.SpecificHeatCapacity cp
+          input Modelica.Units.SI.Density d "Density";
+          input Modelica.Units.SI.Temperature T "Temperature";
+          output Modelica.Units.SI.SpecificHeatCapacity cp
             "Specific heat capacity";
         algorithm
           cp := cp_props_dT(
@@ -11712,10 +11712,10 @@
         function beta_props_dT
           "Isobaric expansion coefficient as function of density and temperature"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Density d "Density";
-          input Modelica.SIunits.Temperature T "Temperature";
+          input Modelica.Units.SI.Density d "Density";
+          input Modelica.Units.SI.Temperature T "Temperature";
           input Common.AuxiliaryProperties aux "Auxiliary record";
-          output Modelica.SIunits.RelativePressureCoefficient beta
+          output Modelica.Units.SI.RelativePressureCoefficient beta
             "Isobaric expansion coefficient";
         algorithm
           beta := aux.pt/(aux.rho*aux.pd);
@@ -11725,9 +11725,9 @@
         function beta_dT
           "Isobaric expansion coefficient as function of density and temperature"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Density d "Density";
-          input Modelica.SIunits.Temperature T "Temperature";
-          output Modelica.SIunits.RelativePressureCoefficient beta
+          input Modelica.Units.SI.Density d "Density";
+          input Modelica.Units.SI.Temperature T "Temperature";
+          output Modelica.Units.SI.RelativePressureCoefficient beta
             "Isobaric expansion coefficient";
         algorithm
           beta := beta_props_dT(
@@ -11739,10 +11739,10 @@
         function kappa_props_dT
           "Isothermal compressibility factor as function of density and temperature"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Density d "Density";
-          input Modelica.SIunits.Temperature T "Temperature";
+          input Modelica.Units.SI.Density d "Density";
+          input Modelica.Units.SI.Temperature T "Temperature";
           input Common.AuxiliaryProperties aux "Auxiliary record";
-          output Modelica.SIunits.IsothermalCompressibility kappa
+          output Modelica.Units.SI.IsothermalCompressibility kappa
             "Isothermal compressibility factor";
         algorithm
           kappa := 1/(aux.rho*aux.pd);
@@ -11752,9 +11752,9 @@
         function kappa_dT
           "Isothermal compressibility factor as function of density and temperature"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Density d "Density";
-          input Modelica.SIunits.Temperature T "Temperature";
-          output Modelica.SIunits.IsothermalCompressibility kappa
+          input Modelica.Units.SI.Density d "Density";
+          input Modelica.Units.SI.Temperature T "Temperature";
+          output Modelica.Units.SI.IsothermalCompressibility kappa
             "Isothermal compressibility factor";
         algorithm
           kappa := kappa_props_dT(
@@ -11766,10 +11766,10 @@
         function velocityOfSound_props_dT
           "Speed of sound as function of density and temperature"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Density d "Density";
-          input Modelica.SIunits.Temperature T "Temperature";
+          input Modelica.Units.SI.Density d "Density";
+          input Modelica.Units.SI.Temperature T "Temperature";
           input Common.AuxiliaryProperties aux "Auxiliary record";
-          output Modelica.SIunits.Velocity a "Speed of sound";
+          output Modelica.Units.SI.Velocity a "Speed of sound";
         algorithm
           a := sqrt(max(0, ((aux.pd*aux.rho*aux.rho*aux.cv + aux.pt*aux.pt*aux.T)
             /(aux.rho*aux.rho*aux.cv))));
@@ -11779,9 +11779,9 @@
         function velocityOfSound_dT
           "Speed of sound as function of density and temperature"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Density d "Density";
-          input Modelica.SIunits.Temperature T "Temperature";
-          output Modelica.SIunits.Velocity a "Speed of sound";
+          input Modelica.Units.SI.Density d "Density";
+          input Modelica.Units.SI.Temperature T "Temperature";
+          output Modelica.Units.SI.Velocity a "Speed of sound";
         algorithm
           a := velocityOfSound_props_dT(
                   d,
@@ -11792,8 +11792,8 @@
         function isentropicExponent_props_dT
           "Isentropic exponent as function of density and temperature"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Density d "Density";
-          input Modelica.SIunits.Temperature T "Temperature";
+          input Modelica.Units.SI.Density d "Density";
+          input Modelica.Units.SI.Temperature T "Temperature";
           input Common.AuxiliaryProperties aux "Auxiliary record";
           output Real gamma "Isentropic exponent";
         algorithm
@@ -11805,8 +11805,8 @@
         function isentropicExponent_dT
           "Isentropic exponent as function of density and temperature"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.Density d "Density";
-          input Modelica.SIunits.Temperature T "Temperature";
+          input Modelica.Units.SI.Density d "Density";
+          input Modelica.Units.SI.Temperature T "Temperature";
           output Real gamma "Isentropic exponent";
         algorithm
           gamma := isentropicExponent_props_dT(
@@ -11821,13 +11821,13 @@
           function air_ph
             "Calculate the property record for dynamic simulation properties using p,h as states"
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.Pressure p "Pressure";
-            input Modelica.SIunits.SpecificEnthalpy h "Specific enthalpy";
+            input Modelica.Units.SI.Pressure p "Pressure";
+            input Modelica.Units.SI.SpecificEnthalpy h "Specific enthalpy";
             output myMedia.Common.ThermoFluidSpecial.ThermoProperties_ph pro "Property record for dynamic simulation";
           protected
             myMedia.Common.HelmholtzDerivs f "Dimensionless Helmholtz function and derivatives w.r.t. delta and tau";
-            Modelica.SIunits.Temperature T "Temperature";
-            Modelica.SIunits.Density d "Density";
+            Modelica.Units.SI.Temperature T "Temperature";
+            Modelica.Units.SI.Density d "Density";
           algorithm
             (d,T) := Air_Utilities.Inverses.dTofph(
                       p=p,
@@ -11841,11 +11841,11 @@
           function air_dT
             "Calculate property record for dynamic simulation properties using d and T as dynamic states"
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.Density d "Density";
-            input Modelica.SIunits.Temperature T "Temperature";
+            input Modelica.Units.SI.Density d "Density";
+            input Modelica.Units.SI.Temperature T "Temperature";
             output myMedia.Common.ThermoFluidSpecial.ThermoProperties_dT pro "Property record for dynamic simulation";
           protected
-            Modelica.SIunits.Pressure p "Pressure";
+            Modelica.Units.SI.Pressure p "Pressure";
             myMedia.Common.HelmholtzDerivs f "Dimensionless Helmholtz function and derivatives w.r.t. delta and tau";
           algorithm
             f := Air_Utilities.Basic.Helmholtz(d, T);
@@ -11856,11 +11856,11 @@
             "Calculate property record for dynamic simulation properties using p and T as dynamic states"
 
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.Pressure p "Pressure";
-            input Modelica.SIunits.Temperature T "Temperature";
+            input Modelica.Units.SI.Pressure p "Pressure";
+            input Modelica.Units.SI.Temperature T "Temperature";
             output myMedia.Common.ThermoFluidSpecial.ThermoProperties_pT pro "Property record for dynamic simulation";
           protected
-            Modelica.SIunits.Density d "Density";
+            Modelica.Units.SI.Density d "Density";
             myMedia.Common.HelmholtzDerivs f "Dimensionless Helmholtz function and derivatives w.r.t. delta and tau";
           algorithm
             d := myMedia.Air.ReferenceAir.Air_Utilities.Inverses.dofpT(
@@ -13095,7 +13095,8 @@
     redeclare function extends thermalConductivity
         "Return thermal conductivity as a function of the thermodynamic state record, valid from 123.15 K to 1273.15 K"
       import ThermofluidStream.Media.myMedia.Incompressible.TableBased.Polynomials_Temp;
-      import Cv = Modelica.SIunits.Conversions;
+      import Cv = Modelica.Units.Conversions;
+
     algorithm
       lambda := 1e-3*Polynomials_Temp.evaluateWithRange(
           {6.5691470817717812E-15,-3.4025961923050509E-11,5.3279284846303157E-08,
@@ -13538,8 +13539,8 @@
 
       import ThermofluidStream.Media.myMedia.Interfaces;
       import Modelica.Math;
-      import SI = Modelica.SIunits;
-      import Cv = Modelica.SIunits.Conversions;
+      import Modelica.Units.SI;
+      import Cv = Modelica.Units.Conversions;
       import Modelica.Constants;
       import ThermofluidStream.Media.myMedia.IdealGases.Common.SingleGasNasa;
 
@@ -14176,11 +14177,11 @@
           function T_phX
             "Return temperature as a function of pressure, specific enthalpy and mass fractions"
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.AbsolutePressure p "Pressure";
-            input Modelica.SIunits.SpecificEnthalpy h "Specific enthalpy";
-            input Modelica.SIunits.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
+            input Modelica.Units.SI.AbsolutePressure p "Pressure";
+            input Modelica.Units.SI.SpecificEnthalpy h "Specific enthalpy";
+            input Modelica.Units.SI.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
               "Mass fractions";
-            output Modelica.SIunits.Temperature T "Temperature";
+            output Modelica.Units.SI.Temperature T "Temperature";
 
           protected
             MassFraction[nX] Xfull=if size(X, 1) == nX then X else cat(
@@ -14188,11 +14189,12 @@
                       X,
                       {1 - sum(X)});
 
+
             function T_phX_res
               extends Modelica.Math.Nonlinear.Interfaces.partialScalarFunction;
-              input Modelica.SIunits.AbsolutePressure p "Pressure";
-              input Modelica.SIunits.SpecificEnthalpy h "Specific enthalpy";
-              input Modelica.SIunits.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
+              input Modelica.Units.SI.AbsolutePressure p "Pressure";
+              input Modelica.Units.SI.SpecificEnthalpy h "Specific enthalpy";
+              input Modelica.Units.SI.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
                 "Mass fractions";
             algorithm
               y := myMedia.Air.ReferenceMoistAir.Utilities.h_pTX(
@@ -14200,7 +14202,6 @@
                             T=u,
                             X=X) - h;
             end T_phX_res;
-
           algorithm
             T := Modelica.Math.Nonlinear.solveOneNonlinearEquation(
                     function T_phX_res(
@@ -14220,11 +14221,11 @@
           function T_psX
             "Return temperature as function of pressure, specific entropy and mass fractions"
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.AbsolutePressure p "Pressure";
-            input Modelica.SIunits.SpecificEntropy s "Specific entropy";
-            input Modelica.SIunits.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
+            input Modelica.Units.SI.AbsolutePressure p "Pressure";
+            input Modelica.Units.SI.SpecificEntropy s "Specific entropy";
+            input Modelica.Units.SI.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
               "Mass fractions";
-            output Modelica.SIunits.Temperature T "Temperature";
+            output Modelica.Units.SI.Temperature T "Temperature";
 
           protected
             MassFraction[nX] Xfull=if size(X, 1) == nX then X else cat(
@@ -14232,11 +14233,12 @@
                       X,
                       {1 - sum(X)});
 
+
             function T_psX_res
               extends Modelica.Math.Nonlinear.Interfaces.partialScalarFunction;
-              input Modelica.SIunits.AbsolutePressure p "Pressure";
-              input Modelica.SIunits.SpecificEntropy s "Specific entropy";
-              input Modelica.SIunits.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
+              input Modelica.Units.SI.AbsolutePressure p "Pressure";
+              input Modelica.Units.SI.SpecificEntropy s "Specific entropy";
+              input Modelica.Units.SI.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
                 "Mass fractions";
             algorithm
               y := myMedia.Air.ReferenceMoistAir.Utilities.s_pTX(
@@ -14244,7 +14246,6 @@
                             T=u,
                             X=X) - s;
             end T_psX_res;
-
           algorithm
             T := Modelica.Math.Nonlinear.solveOneNonlinearEquation(
                     function T_psX_res(
@@ -14264,11 +14265,11 @@
           function p_dTX
             "Return pressure as function of density, temperature and mass fractions"
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.Density d "Density";
-            input Modelica.SIunits.Temperature T "Temperature";
-            input Modelica.SIunits.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
+            input Modelica.Units.SI.Density d "Density";
+            input Modelica.Units.SI.Temperature T "Temperature";
+            input Modelica.Units.SI.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
               "Mass fractions";
-            output Modelica.SIunits.AbsolutePressure p "Pressure";
+            output Modelica.Units.SI.AbsolutePressure p "Pressure";
 
           protected
             MassFraction[nX] Xfull=if size(X, 1) == nX then X else cat(
@@ -14276,11 +14277,12 @@
                       X,
                       {1 - sum(X)});
 
+
             function p_dTX_res
               extends Modelica.Math.Nonlinear.Interfaces.partialScalarFunction;
-              input Modelica.SIunits.Density d "Density";
-              input Modelica.SIunits.Temperature T "Temperature";
-              input Modelica.SIunits.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
+              input Modelica.Units.SI.Density d "Density";
+              input Modelica.Units.SI.Temperature T "Temperature";
+              input Modelica.Units.SI.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
                 "Mass fractions";
             algorithm
               y := myMedia.Air.ReferenceMoistAir.Utilities.rho_pTX(
@@ -14288,7 +14290,6 @@
                             T=T,
                             X=X) - d;
             end p_dTX_res;
-
           algorithm
             p := Modelica.Math.Nonlinear.solveOneNonlinearEquation(
                     function p_dTX_res(
@@ -14325,11 +14326,11 @@
 
           function eta_pTX "Dynamic viscosity"
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.AbsolutePressure p "Pressure";
-            input Modelica.SIunits.Temperature T "Temperature";
-            input Modelica.SIunits.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
+            input Modelica.Units.SI.AbsolutePressure p "Pressure";
+            input Modelica.Units.SI.Temperature T "Temperature";
+            input Modelica.Units.SI.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
               "Mass fractions";
-            output Modelica.SIunits.DynamicViscosity eta "Dynamic viscosity";
+            output Modelica.Units.SI.DynamicViscosity eta "Dynamic viscosity";
 
           protected
             Real ya;
@@ -14400,11 +14401,11 @@
 
           function lambda_pTX "Thermal conductivity"
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.AbsolutePressure p "Pressure";
-            input Modelica.SIunits.Temperature T "Temperature";
-            input Modelica.SIunits.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
+            input Modelica.Units.SI.AbsolutePressure p "Pressure";
+            input Modelica.Units.SI.Temperature T "Temperature";
+            input Modelica.Units.SI.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
               "Mass fractions";
-            output Modelica.SIunits.ThermalConductivity lambda
+            output Modelica.Units.SI.ThermalConductivity lambda
               "Thermal conductivity";
 
           protected
@@ -14493,9 +14494,9 @@
           function Baa_dT "Second molar virial coefficient of dry air"
             extends Modelica.Icons.Function;
 
-            input Modelica.SIunits.Density d "Density";
-            input Modelica.SIunits.Temperature T "Temperature";
-            output Modelica.SIunits.MolarVolume baa "Second virial coefficient";
+            input Modelica.Units.SI.Density d "Density";
+            input Modelica.Units.SI.Temperature T "Temperature";
+            output Modelica.Units.SI.MolarVolume baa "Second virial coefficient";
 
           protected
             final constant Real[19] N={0.118160747229,0.713116392079,-0.161824192067E+001,
@@ -14521,9 +14522,9 @@
           function Baw_dT "Second molar cross-virial coefficient"
             extends Modelica.Icons.Function;
 
-            input Modelica.SIunits.Density d "Density";
-            input Modelica.SIunits.Temperature T "Temperature";
-            output Modelica.SIunits.MolarVolume baw
+            input Modelica.Units.SI.Density d "Density";
+            input Modelica.Units.SI.Temperature T "Temperature";
+            output Modelica.Units.SI.MolarVolume baw
               "Second cross-virial coefficient";
 
           protected
@@ -14544,9 +14545,9 @@
           function Bww_dT "Second molar virial coefficient of water"
             extends Modelica.Icons.Function;
 
-            input Modelica.SIunits.Density d "Density";
-            input Modelica.SIunits.Temperature T "Temperature";
-            output Modelica.SIunits.MolarVolume bww "Second virial coefficient";
+            input Modelica.Units.SI.Density d "Density";
+            input Modelica.Units.SI.Temperature T "Temperature";
+            output Modelica.Units.SI.MolarVolume bww "Second virial coefficient";
 
           protected
             final constant Real[56] N={0.12533547935523E-001,0.78957634722828E+001,
@@ -14660,9 +14661,9 @@
           function Caaa_dT "Third molar virial coefficient of dry air"
             extends Modelica.Icons.Function;
 
-            input Modelica.SIunits.Density d "Density";
-            input Modelica.SIunits.Temperature T "Temperature";
-            output Modelica.SIunits.MolarVolume caaa "Third virial coefficient";
+            input Modelica.Units.SI.Density d "Density";
+            input Modelica.Units.SI.Temperature T "Temperature";
+            output Modelica.Units.SI.MolarVolume caaa "Third virial coefficient";
 
           protected
             final constant Real[19] N={0.118160747229,0.713116392079,-0.161824192067E+001,
@@ -14692,8 +14693,8 @@
           function Caaw_dT "Third molar cross-virial coefficient"
             extends Modelica.Icons.Function;
 
-            input Modelica.SIunits.Density d "Density";
-            input Modelica.SIunits.Temperature T "Temperature";
+            input Modelica.Units.SI.Density d "Density";
+            input Modelica.Units.SI.Temperature T "Temperature";
             output Real caaw "Third cross-virial coefficient";
 
           protected
@@ -14714,8 +14715,8 @@
           function Caww_dT "Third molar cross-virial coefficient"
             extends Modelica.Icons.Function;
 
-            input Modelica.SIunits.Density d "Density";
-            input Modelica.SIunits.Temperature T "Temperature";
+            input Modelica.Units.SI.Density d "Density";
+            input Modelica.Units.SI.Temperature T "Temperature";
             output Real caww "Third cross-virial coefficient";
 
           protected
@@ -14736,9 +14737,9 @@
           function Cwww_dT "Third molar virial coefficient of water"
             extends Modelica.Icons.Function;
 
-            input Modelica.SIunits.Density d "Density";
-            input Modelica.SIunits.Temperature T "Temperature";
-            output Modelica.SIunits.MolarVolume cwww "Third virial coefficient";
+            input Modelica.Units.SI.Density d "Density";
+            input Modelica.Units.SI.Temperature T "Temperature";
+            output Modelica.Units.SI.MolarVolume cwww "Third virial coefficient";
 
           protected
             final constant Real[56] N={0.12533547935523E-001,0.78957634722828E+001,
@@ -14871,22 +14872,22 @@
           extends Modelica.Icons.BasesPackage;
 
           final constant Real[6] AA={20413.2,1075.5,165.95,1491.75,3235.34,4.5542};
-          final constant Modelica.SIunits.Temperature[6] BB={-33086.5,-30283.3,-19526.8,
+          final constant Modelica.Units.SI.Temperature[6] BB={-33086.5,-30283.3,-19526.8,
               -27488.0,-30807.8,-10973.6};
-          final constant Modelica.SIunits.MolarHeatCapacity[6] CC={-19.5,-65.2,-18.7,
+          final constant Modelica.Units.SI.MolarHeatCapacity[6] CC={-19.5,-65.2,-18.7,
               -3.6,-21.8,-5.6};
-          final constant Modelica.SIunits.MolarInternalEnergy[6] DD={-1.15E+005,
+          final constant Modelica.Units.SI.MolarInternalEnergy[6] DD={-1.15E+005,
               3.03E+005,5.72E+004,3.93E+005,1.5E+005,1.62E+004};
           final constant Real[6] EE(each unit="J.K/mol") = {9.483E+009,7.277E+009,
             3.136E+009,5.826E+009,7.659E+009,9.94E+008};
-          final constant Modelica.SIunits.AbsolutePressure p0=101325
+          final constant Modelica.Units.SI.AbsolutePressure p0=101325
             "Reference pressure";
 
           function U2 "Reaction index for formation of H2"
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.AbsolutePressure p "Pressure";
-            input Modelica.SIunits.Temperature T "Temperature";
-            input Modelica.SIunits.MoleFraction[4] moleFraction "Mole fractions";
+            input Modelica.Units.SI.AbsolutePressure p "Pressure";
+            input Modelica.Units.SI.Temperature T "Temperature";
+            input Modelica.Units.SI.MoleFraction[4] moleFraction "Mole fractions";
             output Real u "Reaction index for H2";
           algorithm
             u := AA[2]*moleFraction[1]/sqrt(moleFraction[3])*(p/p0)^(-0.5)*
@@ -14899,9 +14900,9 @@
 
           function U3 "Reaction index for formation of OH"
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.AbsolutePressure p "Pressure";
-            input Modelica.SIunits.Temperature T "Temperature";
-            input Modelica.SIunits.MoleFraction[4] moleFraction "Mole fractions";
+            input Modelica.Units.SI.AbsolutePressure p "Pressure";
+            input Modelica.Units.SI.Temperature T "Temperature";
+            input Modelica.Units.SI.MoleFraction[4] moleFraction "Mole fractions";
             output Real u "Reaction index for OH";
           algorithm
             u := AA[3]*sqrt(moleFraction[1])*sqrt(sqrt(moleFraction[3]))*(p/p0)^(-0.25)
@@ -14914,9 +14915,9 @@
 
           function U4 "Reaction index for formation of H"
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.AbsolutePressure p "Pressure";
-            input Modelica.SIunits.Temperature T "Temperature";
-            input Modelica.SIunits.MoleFraction[4] moleFraction "Mole fractions";
+            input Modelica.Units.SI.AbsolutePressure p "Pressure";
+            input Modelica.Units.SI.Temperature T "Temperature";
+            input Modelica.Units.SI.MoleFraction[4] moleFraction "Mole fractions";
             output Real u "Reaction index for H";
           algorithm
             u := AA[4]*sqrt(U2(
@@ -14931,9 +14932,9 @@
 
           function U5 "Reaction index for formation of O"
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.AbsolutePressure p "Pressure";
-            input Modelica.SIunits.Temperature T "Temperature";
-            input Modelica.SIunits.MoleFraction[4] moleFraction "Mole fractions";
+            input Modelica.Units.SI.AbsolutePressure p "Pressure";
+            input Modelica.Units.SI.Temperature T "Temperature";
+            input Modelica.Units.SI.MoleFraction[4] moleFraction "Mole fractions";
             output Real u "Reaction index for O";
           algorithm
             u := AA[5]*sqrt(moleFraction[3])*(p/p0)^(-0.5)*Modelica.Math.exp(BB[5]/
@@ -14946,9 +14947,9 @@
 
           function U6 "Reaction index for formation of NO"
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.AbsolutePressure p "Pressure";
-            input Modelica.SIunits.Temperature T "Temperature";
-            input Modelica.SIunits.MoleFraction[4] moleFraction "Mole fractions";
+            input Modelica.Units.SI.AbsolutePressure p "Pressure";
+            input Modelica.Units.SI.Temperature T "Temperature";
+            input Modelica.Units.SI.MoleFraction[4] moleFraction "Mole fractions";
             output Real u "Reaction index for NO";
           algorithm
             u := AA[6]*sqrt(moleFraction[2]*moleFraction[3])*Modelica.Math.exp(BB[6]
@@ -14961,8 +14962,8 @@
 
           function V2 "Energy index for formation of H2"
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.Temperature T "Temperature";
-            output Modelica.SIunits.MolarHeatCapacity v "Energy index for H2";
+            input Modelica.Units.SI.Temperature T "Temperature";
+            output Modelica.Units.SI.MolarHeatCapacity v "Energy index for H2";
           algorithm
             v := CC[2] + DD[2]/T + EE[2]/T^2;
             annotation (
@@ -14973,8 +14974,8 @@
 
           function V3 "Energy index for formation of OH"
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.Temperature T "Temperature";
-            output Modelica.SIunits.MolarHeatCapacity v "Energy index for OH";
+            input Modelica.Units.SI.Temperature T "Temperature";
+            output Modelica.Units.SI.MolarHeatCapacity v "Energy index for OH";
           algorithm
             v := CC[3] + DD[3]/T + EE[3]/T^2;
             annotation (
@@ -14985,8 +14986,8 @@
 
           function V4 "Energy index for formation of H"
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.Temperature T "Temperature";
-            output Modelica.SIunits.MolarHeatCapacity v "Energy index for H";
+            input Modelica.Units.SI.Temperature T "Temperature";
+            output Modelica.Units.SI.MolarHeatCapacity v "Energy index for H";
           algorithm
             v := CC[4] + DD[4]/T + EE[4]/T^2;
             annotation (
@@ -14997,8 +14998,8 @@
 
           function V5 "Energy index for formation of O"
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.Temperature T "Temperature";
-            output Modelica.SIunits.MolarHeatCapacity v "Energy index for O";
+            input Modelica.Units.SI.Temperature T "Temperature";
+            output Modelica.Units.SI.MolarHeatCapacity v "Energy index for O";
           algorithm
             v := CC[5] + DD[5]/T + EE[5]/T^2;
             annotation (
@@ -15009,8 +15010,8 @@
 
           function V6 "Energy index for formation of NO"
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.Temperature T "Temperature";
-            output Modelica.SIunits.MolarHeatCapacity v "Energy index for NO";
+            input Modelica.Units.SI.Temperature T "Temperature";
+            output Modelica.Units.SI.MolarHeatCapacity v "Energy index for NO";
           algorithm
             v := CC[6] + DD[6]/T + EE[6]/T^2;
             annotation (
@@ -15021,9 +15022,9 @@
 
           function U2_der "Derivative reaction index for formation of H2"
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.AbsolutePressure p "Pressure";
-            input Modelica.SIunits.Temperature T "Temperature";
-            input Modelica.SIunits.MoleFraction[4] moleFraction "Mole fractions";
+            input Modelica.Units.SI.AbsolutePressure p "Pressure";
+            input Modelica.Units.SI.Temperature T "Temperature";
+            input Modelica.Units.SI.MoleFraction[4] moleFraction "Mole fractions";
             input Real p_der "Derivative of pressure";
             input Real T_der "Derivative of temperature";
             input Real[4] moleFraction_der "Derivative of mole fractions";
@@ -15047,9 +15048,9 @@
 
           function U3_der "Derivative of reaction index for formation of OH"
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.AbsolutePressure p "Pressure";
-            input Modelica.SIunits.Temperature T "Temperature";
-            input Modelica.SIunits.MoleFraction[4] moleFraction "Mole fractions";
+            input Modelica.Units.SI.AbsolutePressure p "Pressure";
+            input Modelica.Units.SI.Temperature T "Temperature";
+            input Modelica.Units.SI.MoleFraction[4] moleFraction "Mole fractions";
             input Real p_der "Derivative of pressure";
             input Real T_der "Derivative of temperature";
             input Real[4] moleFraction_der "Derivative of mole fractions";
@@ -15072,9 +15073,9 @@
 
           function U4_der "Derivative of reaction index for formation of H"
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.AbsolutePressure p "Pressure";
-            input Modelica.SIunits.Temperature T "Temperature";
-            input Modelica.SIunits.MoleFraction[4] moleFraction "Mole fractions";
+            input Modelica.Units.SI.AbsolutePressure p "Pressure";
+            input Modelica.Units.SI.Temperature T "Temperature";
+            input Modelica.Units.SI.MoleFraction[4] moleFraction "Mole fractions";
             input Real p_der "Derivative of pressure";
             input Real T_der "Derivative of temperature";
             input Real[4] moleFraction_der "Derivative of mole fractions";
@@ -15106,9 +15107,9 @@
 
           function U5_der "Derivative of reaction index for formation of O"
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.AbsolutePressure p "Pressure";
-            input Modelica.SIunits.Temperature T "Temperature";
-            input Modelica.SIunits.MoleFraction[4] moleFraction "Mole fractions";
+            input Modelica.Units.SI.AbsolutePressure p "Pressure";
+            input Modelica.Units.SI.Temperature T "Temperature";
+            input Modelica.Units.SI.MoleFraction[4] moleFraction "Mole fractions";
             input Real p_der "Derivative of pressure";
             input Real T_der "Derivative of temperature";
             input Real[4] moleFraction_der "Derivative of mole fractions";
@@ -15127,9 +15128,9 @@
 
           function U6_der "Derivative of reaction index for formation of NO"
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.AbsolutePressure p "Pressure";
-            input Modelica.SIunits.Temperature T "Temperature";
-            input Modelica.SIunits.MoleFraction[4] moleFraction "Mole fractions";
+            input Modelica.Units.SI.AbsolutePressure p "Pressure";
+            input Modelica.Units.SI.Temperature T "Temperature";
+            input Modelica.Units.SI.MoleFraction[4] moleFraction "Mole fractions";
             input Real p_der "Derivative of pressure";
             input Real T_der "Derivative of temperature";
             input Real[4] moleFraction_der "Derivative of mole fractions";
@@ -15148,7 +15149,7 @@
 
           function V2_der "Derivative of energy index for formation of H2"
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.Temperature T "Temperature";
+            input Modelica.Units.SI.Temperature T "Temperature";
             input Real T_der "Derivative of temperature";
             output Real v_der "Derivative energy index for H2";
           algorithm
@@ -15158,7 +15159,7 @@
 
           function V3_der "Derivative energy index for formation of OH"
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.Temperature T "Temperature";
+            input Modelica.Units.SI.Temperature T "Temperature";
             input Real T_der "Derivative of temperature";
             output Real v_der "Derivative energy index for OH";
           algorithm
@@ -15167,7 +15168,7 @@
 
           function V4_der "Derivative of energy index for formation of H"
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.Temperature T "Temperature";
+            input Modelica.Units.SI.Temperature T "Temperature";
             input Real T_der "Derivative of temperature";
             output Real v_der "Derivative energy index for H";
 
@@ -15177,7 +15178,7 @@
 
           function V5_der "Derivative of energy index for formation of O"
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.Temperature T "Temperature";
+            input Modelica.Units.SI.Temperature T "Temperature";
             input Real T_der "Derivative of temperature";
             output Real v_der "Derivative energy index for O";
           algorithm
@@ -15186,7 +15187,7 @@
 
           function V6_der "Derivative of energy index for formation of NO"
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.Temperature T "Temperature";
+            input Modelica.Units.SI.Temperature T "Temperature";
             input Real T_der "Derivative of temperature";
             output Real v_der "Derivative energy index for NO";
           algorithm
@@ -15201,8 +15202,8 @@
 
           function g2 "Gibbs function for region 2: g(p,T)"
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.Pressure p "Pressure";
-            input Modelica.SIunits.Temperature T "Temperature (K)";
+            input Modelica.Units.SI.Pressure p "Pressure";
+            input Modelica.Units.SI.Temperature T "Temperature (K)";
             output myMedia.Common.GibbsDerivs g "Dimensionless Gibbs function and derivatives w.r.t. pi and tau";
           protected
             Real tau2 "Dimensionless temperature";
@@ -15393,11 +15394,11 @@
 
           function h_pT "Specific enthalpy as function or pressure and temperature"
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.Pressure p "Pressure";
-            input Modelica.SIunits.Temperature T "Temperature";
+            input Modelica.Units.SI.Pressure p "Pressure";
+            input Modelica.Units.SI.Temperature T "Temperature";
             input Integer region=0
               "If 0, region is unknown, otherwise known and this input";
-            output Modelica.SIunits.SpecificEnthalpy h "Specific enthalpy";
+            output Modelica.Units.SI.SpecificEnthalpy h "Specific enthalpy";
 
           protected
             myMedia.Common.GibbsDerivs g;
@@ -15413,11 +15414,11 @@
 
           function s_pT "Temperature as function of pressure and temperature"
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.Pressure p "Pressure";
-            input Modelica.SIunits.Temperature T "Temperature";
+            input Modelica.Units.SI.Pressure p "Pressure";
+            input Modelica.Units.SI.Temperature T "Temperature";
             input Integer region=0
               "If 0, region is unknown, otherwise known and this input";
-            output Modelica.SIunits.SpecificEntropy s "Specific entropy";
+            output Modelica.Units.SI.SpecificEntropy s "Specific entropy";
 
           protected
             myMedia.Common.GibbsDerivs g;
@@ -15431,11 +15432,11 @@
             "Specific heat capacity at constant pressure as function of pressure and temperature"
 
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.Pressure p "Pressure";
-            input Modelica.SIunits.Temperature T "Temperature";
+            input Modelica.Units.SI.Pressure p "Pressure";
+            input Modelica.Units.SI.Temperature T "Temperature";
             input Integer region=0
               "If 0, region is unknown, otherwise known and this input";
-            output Modelica.SIunits.SpecificHeatCapacity cp
+            output Modelica.Units.SI.SpecificHeatCapacity cp
               "Specific heat capacity";
 
           protected
@@ -15449,11 +15450,11 @@
           function cv_pT
             "Specific heat capacity at constant volume as function of pressure and temperature"
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.Pressure p "Pressure";
-            input Modelica.SIunits.Temperature T "Temperature";
+            input Modelica.Units.SI.Pressure p "Pressure";
+            input Modelica.Units.SI.Temperature T "Temperature";
             input Integer region=0
               "If 0, region is unknown, otherwise known and this input";
-            output Modelica.SIunits.SpecificHeatCapacity cv
+            output Modelica.Units.SI.SpecificHeatCapacity cv
               "Specific heat capacity";
 
           protected
@@ -15467,9 +15468,9 @@
 
           function rho_pT "Density as function or pressure and temperature"
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.Pressure p "Pressure";
-            input Modelica.SIunits.Temperature T "Temperature";
-            output Modelica.SIunits.Density rho "Density";
+            input Modelica.Units.SI.Pressure p "Pressure";
+            input Modelica.Units.SI.Temperature T "Temperature";
+            output Modelica.Units.SI.Density rho "Density";
 
           protected
             myMedia.Common.GibbsDerivs g;
@@ -15906,7 +15907,7 @@
 
             record IceConstants
               extends Common.FundamentalConstants;
-              Modelica.SIunits.AbsolutePressure p0;
+              Modelica.Units.SI.AbsolutePressure p0;
             end IceConstants;
 
           protected
@@ -16223,19 +16224,19 @@
 
             function Tsub "Sublimation temperature"
               extends Modelica.Icons.Function;
-              input Modelica.SIunits.AbsolutePressure p "Pressure";
-              output Modelica.SIunits.Temperature T_sub "Temperature";
+              input Modelica.Units.SI.AbsolutePressure p "Pressure";
+              output Modelica.Units.SI.Temperature T_sub "Temperature";
 
             protected
+
               function Tsub_res
                 extends Modelica.Math.Nonlinear.Interfaces.partialScalarFunction;
-                input Modelica.SIunits.AbsolutePressure p "Pressure";
+                input Modelica.Units.SI.AbsolutePressure p "Pressure";
 
               algorithm
                 y := myMedia.Air.ReferenceMoistAir.Utilities.Ice09_Utilities.Basic.psub(u) - p;
 
               end Tsub_res;
-
             algorithm
               T_sub := Modelica.Math.Nonlinear.solveOneNonlinearEquation(
                         function Tsub_res(p=p),
@@ -16281,8 +16282,8 @@
           function ice09BaseProp_pT
             "Intermediate property record for water (p and T preferred states)"
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.Pressure p "Pressure";
-            input Modelica.SIunits.Temperature T "Temperature";
+            input Modelica.Units.SI.Pressure p "Pressure";
+            input Modelica.Units.SI.Temperature T "Temperature";
             output Common.AuxiliaryProperties aux "Auxiliary record";
           protected
             Common.GibbsDerivs2 g "Gibbs function and derivatives w.r.t. p and T";
@@ -16304,10 +16305,10 @@
 
           function rho_props_pT "Density as function or pressure and temperature"
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.Pressure p "Pressure";
-            input Modelica.SIunits.Temperature T "Temperature";
+            input Modelica.Units.SI.Pressure p "Pressure";
+            input Modelica.Units.SI.Temperature T "Temperature";
             input Common.AuxiliaryProperties aux "Auxiliary record";
-            output Modelica.SIunits.Density rho "Density";
+            output Modelica.Units.SI.Density rho "Density";
           algorithm
             rho := aux.rho;
             annotation (
@@ -16318,9 +16319,9 @@
 
           function rho_pT "Density as function or pressure and temperature"
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.Pressure p "Pressure";
-            input Modelica.SIunits.Temperature T "Temperature";
-            output Modelica.SIunits.Density rho "Density";
+            input Modelica.Units.SI.Pressure p "Pressure";
+            input Modelica.Units.SI.Temperature T "Temperature";
+            output Modelica.Units.SI.Density rho "Density";
           algorithm
             rho := rho_props_pT(
                         p,
@@ -16331,8 +16332,8 @@
 
           function rho_pT_der "Derivative function of rho_pT"
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.Pressure p "Pressure";
-            input Modelica.SIunits.Temperature T "Temperature";
+            input Modelica.Units.SI.Pressure p "Pressure";
+            input Modelica.Units.SI.Temperature T "Temperature";
             input Common.AuxiliaryProperties aux "Auxiliary record";
             input Real p_der "Derivative of pressure";
             input Real T_der "Derivative of temperature";
@@ -16345,10 +16346,10 @@
           function h_props_pT
             "Specific enthalpy as function or pressure and temperature"
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.Pressure p "Pressure";
-            input Modelica.SIunits.Temperature T "Temperature";
+            input Modelica.Units.SI.Pressure p "Pressure";
+            input Modelica.Units.SI.Temperature T "Temperature";
             input Common.AuxiliaryProperties aux "Auxiliary record";
-            output Modelica.SIunits.SpecificEnthalpy h "Specific enthalpy";
+            output Modelica.Units.SI.SpecificEnthalpy h "Specific enthalpy";
           algorithm
             h := aux.h;
             annotation (
@@ -16359,9 +16360,9 @@
 
           function h_pT "Specific enthalpy as function or pressure and temperature"
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.Pressure p "Pressure";
-            input Modelica.SIunits.Temperature T "Temperature";
-            output Modelica.SIunits.SpecificEnthalpy h "Specific enthalpy";
+            input Modelica.Units.SI.Pressure p "Pressure";
+            input Modelica.Units.SI.Temperature T "Temperature";
+            output Modelica.Units.SI.SpecificEnthalpy h "Specific enthalpy";
           algorithm
             h := h_props_pT(
                         p,
@@ -16372,8 +16373,8 @@
 
           function h_pT_der "Derivative function of h_pT"
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.Pressure p "Pressure";
-            input Modelica.SIunits.Temperature T "Temperature";
+            input Modelica.Units.SI.Pressure p "Pressure";
+            input Modelica.Units.SI.Temperature T "Temperature";
             input Common.AuxiliaryProperties aux "Auxiliary record";
             input Real p_der "Derivative of pressure";
             input Real T_der "Derivative of temperature";
@@ -16385,10 +16386,10 @@
           function s_props_pT
             "Specific entropy as function of pressure and temperature"
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.Pressure p "Pressure";
-            input Modelica.SIunits.Temperature T "Temperature";
+            input Modelica.Units.SI.Pressure p "Pressure";
+            input Modelica.Units.SI.Temperature T "Temperature";
             input Common.AuxiliaryProperties aux "Auxiliary record";
-            output Modelica.SIunits.SpecificEntropy s "Specific entropy";
+            output Modelica.Units.SI.SpecificEntropy s "Specific entropy";
           algorithm
             s := aux.s;
             annotation (Inline=false, LateInline=true);
@@ -16396,9 +16397,9 @@
 
           function s_pT "Temperature as function of pressure and temperature"
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.Pressure p "Pressure";
-            input Modelica.SIunits.Temperature T "Temperature";
-            output Modelica.SIunits.SpecificEntropy s "Specific entropy";
+            input Modelica.Units.SI.Pressure p "Pressure";
+            input Modelica.Units.SI.Temperature T "Temperature";
+            output Modelica.Units.SI.SpecificEntropy s "Specific entropy";
           algorithm
             s := s_props_pT(
                         p,
@@ -16410,10 +16411,10 @@
           function kappa_props_pT
             "Isothermal compressibility factor as function of pressure and temperature"
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.Pressure p "Pressure";
-            input Modelica.SIunits.Temperature T "Temperature";
+            input Modelica.Units.SI.Pressure p "Pressure";
+            input Modelica.Units.SI.Temperature T "Temperature";
             input Common.AuxiliaryProperties aux "Auxiliary record";
-            output Modelica.SIunits.IsothermalCompressibility kappa
+            output Modelica.Units.SI.IsothermalCompressibility kappa
               "Isothermal compressibility factor";
           algorithm
             kappa := -aux.vp*aux.rho;
@@ -16423,9 +16424,9 @@
           function kappa_pT
             "Isothermal compressibility factor as function of pressure and temperature"
             extends Modelica.Icons.Function;
-            input Modelica.SIunits.Pressure p "Pressure";
-            input Modelica.SIunits.Temperature T "Temperature";
-            output Modelica.SIunits.IsothermalCompressibility kappa
+            input Modelica.Units.SI.Pressure p "Pressure";
+            input Modelica.Units.SI.Temperature T "Temperature";
+            output Modelica.Units.SI.IsothermalCompressibility kappa
               "Isothermal compressibility factor";
           algorithm
             kappa := kappa_props_pT(
@@ -16440,8 +16441,8 @@
         function beta_H "Henry's law constant"
           extends Modelica.Icons.Function;
 
-          input Modelica.SIunits.AbsolutePressure p "Pressure";
-          input Modelica.SIunits.Temperature T "Temperature";
+          input Modelica.Units.SI.AbsolutePressure p "Pressure";
+          input Modelica.Units.SI.Temperature T "Temperature";
           output Real beta_H(unit="1/Pa") "Henry's law constant";
 
         protected
@@ -16469,15 +16470,15 @@
         function f_pT "Enhancement factor as function of pressure and temperature"
           extends Modelica.Icons.Function;
 
-          input Modelica.SIunits.AbsolutePressure p "Pressure";
-          input Modelica.SIunits.Temperature T "Temperature";
+          input Modelica.Units.SI.AbsolutePressure p "Pressure";
+          input Modelica.Units.SI.Temperature T "Temperature";
           output Real f "Vapor-pressure enhancement factor";
 
         protected
           function f_res
             extends Modelica.Math.Nonlinear.Interfaces.partialScalarFunction;
-            input Modelica.SIunits.AbsolutePressure p "Pressure";
-            input Modelica.SIunits.Temperature T "Temperature";
+            input Modelica.Units.SI.AbsolutePressure p "Pressure";
+            input Modelica.Units.SI.Temperature T "Temperature";
 
           protected
             Real x=u;
@@ -16558,11 +16559,11 @@
           "Return density as a function of pressure p, temperature T and composition X"
           extends Modelica.Icons.Function;
 
-          input Modelica.SIunits.AbsolutePressure p "Pressure";
-          input Modelica.SIunits.Temperature T "Temperature";
-          input Modelica.SIunits.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
+          input Modelica.Units.SI.AbsolutePressure p "Pressure";
+          input Modelica.Units.SI.Temperature T "Temperature";
+          input Modelica.Units.SI.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
             "Mass fractions";
-          output Modelica.SIunits.Density d "Density";
+          output Modelica.Units.SI.Density d "Density";
 
         protected
           Real pd;
@@ -16606,9 +16607,9 @@
         function pds_pT "Saturation partial pressure of steam"
           extends Modelica.Icons.Function;
 
-          input Modelica.SIunits.AbsolutePressure p "Pressure";
-          input Modelica.SIunits.Temperature T "Temperature";
-          output Modelica.SIunits.AbsolutePressure pds "Pressure";
+          input Modelica.Units.SI.AbsolutePressure p "Pressure";
+          input Modelica.Units.SI.Temperature T "Temperature";
+          output Modelica.Units.SI.AbsolutePressure pds "Pressure";
 
         protected
           Real Tlim;
@@ -16639,11 +16640,11 @@
         function pd_pTX "partial pressure of steam"
           extends Modelica.Icons.Function;
 
-          input Modelica.SIunits.AbsolutePressure p "Pressure";
-          input Modelica.SIunits.Temperature T "Temperature";
-          input Modelica.SIunits.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
+          input Modelica.Units.SI.AbsolutePressure p "Pressure";
+          input Modelica.Units.SI.Temperature T "Temperature";
+          input Modelica.Units.SI.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
             "Mass fractions";
-          output Modelica.SIunits.AbsolutePressure pd "partial pressure";
+          output Modelica.Units.SI.AbsolutePressure pd "partial pressure";
 
         protected
           Real xw;
@@ -16669,8 +16670,8 @@
         function xws_pT "Humidity ratio (absolute) of saturated humid air"
           extends Modelica.Icons.Function;
 
-          input Modelica.SIunits.AbsolutePressure p "Pressure";
-          input Modelica.SIunits.Temperature T "Temperature";
+          input Modelica.Units.SI.AbsolutePressure p "Pressure";
+          input Modelica.Units.SI.Temperature T "Temperature";
           output Real xws "Absolute humidity ratio";
 
         protected
@@ -16695,9 +16696,9 @@
 
         function phi_pTX "Relative humidity"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.AbsolutePressure p "Pressure";
-          input Modelica.SIunits.Temperature T "Temperature";
-          input Modelica.SIunits.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
+          input Modelica.Units.SI.AbsolutePressure p "Pressure";
+          input Modelica.Units.SI.Temperature T "Temperature";
+          input Modelica.Units.SI.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
             "Mass fractions";
           output Real phi "Relative humidity";
 
@@ -16734,11 +16735,11 @@
 
         function cp_pTX "Specific isobaric heat capacity"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.AbsolutePressure p "Pressure";
-          input Modelica.SIunits.Temperature T "Temperature";
-          input Modelica.SIunits.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
+          input Modelica.Units.SI.AbsolutePressure p "Pressure";
+          input Modelica.Units.SI.Temperature T "Temperature";
+          input Modelica.Units.SI.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
             "Mass fractions";
-          output Modelica.SIunits.SpecificHeatCapacity cp "Specific heat capacity";
+          output Modelica.Units.SI.SpecificHeatCapacity cp "Specific heat capacity";
 
         protected
           Real xw;
@@ -16783,11 +16784,11 @@
 
         function cv_pTX "Specific isochoric heat capacity"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.AbsolutePressure p "Pressure";
-          input Modelica.SIunits.Temperature T "Temperature";
-          input Modelica.SIunits.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
+          input Modelica.Units.SI.AbsolutePressure p "Pressure";
+          input Modelica.Units.SI.Temperature T "Temperature";
+          input Modelica.Units.SI.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
             "Mass fractions";
-          output Modelica.SIunits.SpecificHeatCapacity cv "Specific heat capacity";
+          output Modelica.Units.SI.SpecificHeatCapacity cv "Specific heat capacity";
 
         protected
           Real xw;
@@ -16817,11 +16818,11 @@
 
         function h_pTX "Specific enthalpy of moist air"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.AbsolutePressure p "Pressure";
-          input Modelica.SIunits.Temperature T "Temperature";
-          input Modelica.SIunits.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
+          input Modelica.Units.SI.AbsolutePressure p "Pressure";
+          input Modelica.Units.SI.Temperature T "Temperature";
+          input Modelica.Units.SI.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
             "Mass fractions";
-          output Modelica.SIunits.SpecificEnthalpy h "Specific enthalpy";
+          output Modelica.Units.SI.SpecificEnthalpy h "Specific enthalpy";
 
         protected
           Real xw;
@@ -16869,9 +16870,9 @@
 
         function h_dis_pTX
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.AbsolutePressure p "Pressure";
-          input Modelica.SIunits.Temperature T "Temperature";
-          input Modelica.SIunits.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
+          input Modelica.Units.SI.AbsolutePressure p "Pressure";
+          input Modelica.Units.SI.Temperature T "Temperature";
+          input Modelica.Units.SI.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
             "Mass fractions";
           output Real u "Reaction index";
         protected
@@ -16879,7 +16880,7 @@
           Real invMMX[4] "Inverses of molar weights";
           SI.MolarMass Mmix "Molar mass of mixture";
           MassFraction[4] massFraction "Mass fractions of components";
-          Modelica.SIunits.MoleFraction[4] Y
+          Modelica.Units.SI.MoleFraction[4] Y
             "Mole fractions of individual components (H2O, N2, O2, Ar) of moist air";
         algorithm
           if (useDissociation == false) then
@@ -16935,11 +16936,11 @@
 
         function s_pTX "Specific entropy of moist air"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.AbsolutePressure p "Pressure";
-          input Modelica.SIunits.Temperature T "Temperature";
-          input Modelica.SIunits.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
+          input Modelica.Units.SI.AbsolutePressure p "Pressure";
+          input Modelica.Units.SI.Temperature T "Temperature";
+          input Modelica.Units.SI.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
             "Mass fractions";
-          output Modelica.SIunits.SpecificEntropy s "Specific entropy";
+          output Modelica.Units.SI.SpecificEntropy s "Specific entropy";
 
         protected
           Real xw;
@@ -16984,12 +16985,12 @@
 
         function u_pTX "Internal energy"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.AbsolutePressure p "Pressure";
-          input Modelica.SIunits.Temperature T "Temperature";
-          input Modelica.SIunits.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
-            "Mass fractions";
-          output Modelica.SIunits.SpecificEnergy u "Specific entropy";
 
+          input Modelica.Units.SI.AbsolutePressure p "Pressure";
+          input Modelica.Units.SI.Temperature T "Temperature";
+          input Modelica.Units.SI.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
+            "Mass fractions";
+          output Modelica.Units.SI.SpecificEnergy u "Specific entropy";
         algorithm
           u := myMedia.Air.ReferenceMoistAir.Utilities.h_pTX(
                     p,
@@ -17006,9 +17007,9 @@
 
         function cp_dis_pTX
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.AbsolutePressure p "Pressure";
-          input Modelica.SIunits.Temperature T "Temperature";
-          input Modelica.SIunits.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
+          input Modelica.Units.SI.AbsolutePressure p "Pressure";
+          input Modelica.Units.SI.Temperature T "Temperature";
+          input Modelica.Units.SI.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
             "Mass fractions";
           output Real u "Reaction index";
         protected
@@ -17016,7 +17017,7 @@
           Real invMMX[4] "Inverses of molar weights";
           SI.MolarMass Mmix "Molar mass of mixture";
           MassFraction[4] massFraction "Mass fractions of components";
-          Modelica.SIunits.MoleFraction[4] Y
+          Modelica.Units.SI.MoleFraction[4] Y
             "Mole fractions of individual components (H2O, N2, O2, Ar) of moist air";
         algorithm
           if (useDissociation == false) then
@@ -17067,9 +17068,9 @@
 
         function s_dis_pTX
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.AbsolutePressure p "Pressure";
-          input Modelica.SIunits.Temperature T "Temperature";
-          input Modelica.SIunits.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
+          input Modelica.Units.SI.AbsolutePressure p "Pressure";
+          input Modelica.Units.SI.Temperature T "Temperature";
+          input Modelica.Units.SI.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
             "Mass fractions";
           output Real u "Reaction index";
         protected
@@ -17077,7 +17078,7 @@
           Real invMMX[4] "Inverses of molar weights";
           SI.MolarMass Mmix "Molar mass of mixture";
           MassFraction[4] massFraction "Mass fractions of components";
-          Modelica.SIunits.MoleFraction[4] Y
+          Modelica.Units.SI.MoleFraction[4] Y
             "Mole fractions of individual components (H2O, N2, O2, Ar) of moist air";
         algorithm
           if (useDissociation == false) then
@@ -17134,9 +17135,9 @@
         function pd_pTX_der "Derivative of partial pressure of steam"
           extends Modelica.Icons.Function;
 
-          input Modelica.SIunits.AbsolutePressure p "Pressure";
-          input Modelica.SIunits.Temperature T "Temperature";
-          input Modelica.SIunits.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
+          input Modelica.Units.SI.AbsolutePressure p "Pressure";
+          input Modelica.Units.SI.Temperature T "Temperature";
+          input Modelica.Units.SI.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
             "Mass fractions";
           input Real p_der "Derivative of pressure";
           input Real T_der "Derivative of temperature";
@@ -17174,8 +17175,8 @@
           "Derivative of humidity ration (absolute) of saturated humid air"
           extends Modelica.Icons.Function;
 
-          input Modelica.SIunits.AbsolutePressure p "Pressure";
-          input Modelica.SIunits.Temperature T "Temperature";
+          input Modelica.Units.SI.AbsolutePressure p "Pressure";
+          input Modelica.Units.SI.Temperature T "Temperature";
           input Real p_der "Derivative of pressure";
           input Real T_der "Derivative of temperature";
           output Real xws_der "Derivative of absolute humidity ratio";
@@ -17206,8 +17207,8 @@
         function pds_pT_der "Derivative of saturation partial pressure of steam"
           extends Modelica.Icons.Function;
 
-          input Modelica.SIunits.AbsolutePressure p "Pressure";
-          input Modelica.SIunits.Temperature T "Temperature";
+          input Modelica.Units.SI.AbsolutePressure p "Pressure";
+          input Modelica.Units.SI.Temperature T "Temperature";
           input Real p_der "Derivative of pressure";
           input Real T_der "Derivative of temperature";
           output Real pds_der "Derivative of pressure";
@@ -17237,9 +17238,9 @@
           "Derivative of density as a function of pressure p, temperature T and composition X"
           extends Modelica.Icons.Function;
 
-          input Modelica.SIunits.AbsolutePressure p "Pressure";
-          input Modelica.SIunits.Temperature T "Temperature";
-          input Modelica.SIunits.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
+          input Modelica.Units.SI.AbsolutePressure p "Pressure";
+          input Modelica.Units.SI.Temperature T "Temperature";
+          input Modelica.Units.SI.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
             "Mass fractions";
           input Real p_der "Derivative of pressure";
           input Real T_der "Derivative of temperature";
@@ -17369,9 +17370,9 @@
         function h_dis_pTX_der
           extends Modelica.Icons.Function;
           import ThermofluidStream.Media.myMedia.Air.ReferenceMoistAir.Utilities;
-          input Modelica.SIunits.AbsolutePressure p "Pressure";
-          input Modelica.SIunits.Temperature T "Temperature";
-          input Modelica.SIunits.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
+          input Modelica.Units.SI.AbsolutePressure p "Pressure";
+          input Modelica.Units.SI.Temperature T "Temperature";
+          input Modelica.Units.SI.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
             "Mass fractions";
           input Real p_der "Derivative of pressure";
           input Real T_der "Derivative of temperature";
@@ -17384,7 +17385,7 @@
           Real Mmix_der "Derivative of molar mass of mixture";
           MassFraction[4] massFraction "Mass fractions of components";
           Real[4] massFraction_der "Derivative of mass fractions of components";
-          Modelica.SIunits.MoleFraction[4] Y
+          Modelica.Units.SI.MoleFraction[4] Y
             "Mole fractions of individual components (H2O, N2, O2, Ar) of moist air";
           Real[4] Y_der
             "Derivative of mole fractions of individual components (H2O, N2, O2, Ar) of moist air";
@@ -17565,9 +17566,9 @@
 
         function h_pTX_der "Derivative of specific enthalpy of moist air"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.AbsolutePressure p "Pressure";
-          input Modelica.SIunits.Temperature T "Temperature";
-          input Modelica.SIunits.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
+          input Modelica.Units.SI.AbsolutePressure p "Pressure";
+          input Modelica.Units.SI.Temperature T "Temperature";
+          input Modelica.Units.SI.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
             "Mass fractions";
           input Real p_der "Derivative of pressure";
           input Real T_der "Derivative of temperature";
@@ -17575,7 +17576,7 @@
           output Real h_der "Derivative of specific enthalpy";
 
         protected
-          Modelica.SIunits.SpecificEnthalpy h;
+          Modelica.Units.SI.SpecificEnthalpy h;
           Real xw,      xw_der;
           Real xws,      xws_der;
           Real pd,      pd_der;
@@ -17728,9 +17729,9 @@
 
         function u_pTX_der "Derivative of internal energy"
           extends Modelica.Icons.Function;
-          input Modelica.SIunits.AbsolutePressure p "Pressure";
-          input Modelica.SIunits.Temperature T "Temperature";
-          input Modelica.SIunits.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
+          input Modelica.Units.SI.AbsolutePressure p "Pressure";
+          input Modelica.Units.SI.Temperature T "Temperature";
+          input Modelica.Units.SI.MassFraction X[:]=myMedia.Air.ReferenceMoistAir.reference_X
             "Mass fractions";
           input Real p_der "Derivative of pressure";
           input Real T_der "Derivative of temperature";
@@ -18313,8 +18314,8 @@
         function dynamicViscosityLowPressure
           "Dynamic viscosity of low pressure gases"
           extends Modelica.Icons.Function;
-          input SI.Temp_K T "Gas temperature";
-          input SI.Temp_K Tc "Critical temperature of gas";
+          input SI.Temperature T "Gas temperature";
+          input SI.Temperature Tc "Critical temperature of gas";
           input SI.MolarMass M "Molar mass of gas";
           input SI.MolarVolume Vc "Critical molar volume of gas";
           input Real w "Acentric factor of gas";
@@ -18770,8 +18771,8 @@
         function dynamicViscosityLowPressure
           "Dynamic viscosity of low pressure gases"
           extends Modelica.Icons.Function;
-          input SI.Temp_K T "Gas temperature";
-          input SI.Temp_K Tc "Critical temperature of gas";
+          input SI.Temperature T "Gas temperature";
+          input SI.Temperature Tc "Critical temperature of gas";
           input SI.MolarMass M "Molar mass of gas";
           input SI.MolarVolume Vc "Critical molar volume of gas";
           input Real w "Acentric factor of gas";
@@ -38770,8 +38771,8 @@
       Medium.SpecificInternalEnergy h=Medium.specificEnthalpy(medium.state);
       Medium.SpecificInternalEnergy d=Medium.density(medium.state);
       protected
-      constant Modelica.SIunits.Time timeUnit = 1;
-      constant Modelica.SIunits.Temperature Ta = 1;
+      constant Modelica.Units.SI.Time timeUnit = 1;
+      constant Modelica.Units.SI.Temperature Ta = 1;
     equation
       medium.p = 1.013e5;
       medium.T = Medium.T_min + time/timeUnit*Ta;
@@ -38837,9 +38838,9 @@
         "True if enthalpy is approximated as a function of T only, (p-dependence neglected)";
       constant Boolean densityOfT = size(tableDensity,1) > 1
         "True if density is a function of temperature";
-      constant Modelica.SIunits.Temperature T_min
+      constant Modelica.Units.SI.Temperature T_min
         "Minimum temperature valid for medium model";
-      constant Modelica.SIunits.Temperature T_max
+      constant Modelica.Units.SI.Temperature T_max
         "Maximum temperature valid for medium model";
       constant Temperature T0=273.15 "Reference Temperature";
       constant SpecificEnthalpy h0=0 "Reference enthalpy at T0, reference_p";
@@ -39117,7 +39118,7 @@
       end specificEntropy;
 
       function h_T "Compute specific enthalpy from temperature"
-        import Modelica.SIunits.Conversions.to_degC;
+        import Modelica.Units.Conversions.to_degC;
         extends Modelica.Icons.Function;
         input SI.Temperature T "Temperature";
         output SI.SpecificEnthalpy h "Specific enthalpy at p, T";
@@ -39128,7 +39129,7 @@
       end h_T;
 
       function h_T_der "Compute specific enthalpy from temperature"
-        import Modelica.SIunits.Conversions.to_degC;
+        import Modelica.Units.Conversions.to_degC;
         extends Modelica.Icons.Function;
         input SI.Temperature T "Temperature";
         input Real dT "Temperature derivative";
@@ -39139,7 +39140,7 @@
       end h_T_der;
 
       function h_pT "Compute specific enthalpy from pressure and temperature"
-        import Modelica.SIunits.Conversions.to_degC;
+        import Modelica.Units.Conversions.to_degC;
         extends Modelica.Icons.Function;
         input SI.Pressure p "Pressure";
         input SI.Temperature T "Temperature";
@@ -39634,21 +39635,21 @@
         "Thermodynamic base properties on the phase boundary"
         extends Modelica.Icons.Record;
 
-        Modelica.SIunits.Density d "Density";
-        Modelica.SIunits.SpecificEnthalpy h "Enthalpy";
-        Modelica.SIunits.SpecificEnergy u "Inner energy";
-        Modelica.SIunits.SpecificEntropy s "Entropy";
-        Modelica.SIunits.SpecificHeatCapacity cp
+        Modelica.Units.SI.Density d "Density";
+        Modelica.Units.SI.SpecificEnthalpy h "Enthalpy";
+        Modelica.Units.SI.SpecificEnergy u "Inner energy";
+        Modelica.Units.SI.SpecificEntropy s "Entropy";
+        Modelica.Units.SI.SpecificHeatCapacity cp
           "Heat capacity at constant pressure";
-        Modelica.SIunits.SpecificHeatCapacity cv
+        Modelica.Units.SI.SpecificHeatCapacity cv
           "Heat capacity at constant volume";
-        Modelica.SIunits.IsothermalCompressibility kappa "Isentropic exponent";
-        Modelica.SIunits.Velocity a "Velocity of sound";
+        Modelica.Units.SI.IsothermalCompressibility kappa "Isentropic exponent";
+        Modelica.Units.SI.Velocity a "Velocity of sound";
         myMedia.Interfaces.Types.IsobaricExpansionCoefficient beta "Isobaric expansion coefficient";
-        Modelica.SIunits.IsentropicExponent gamma "Isentropic exponent";
-        Modelica.SIunits.DerPressureByTemperature pt
+        Modelica.Units.SI.IsentropicExponent gamma "Isentropic exponent";
+        Modelica.Units.SI.DerPressureByTemperature pt
           "Derivative of pressure wrt temperature";
-        Modelica.SIunits.DerPressureByDensity pd
+        Modelica.Units.SI.DerPressureByDensity pd
           "Derivative of pressure wrt density";
 
       end PhaseBoundaryProperties;
@@ -39658,11 +39659,11 @@
         extends Modelica.Icons.Record;
 
         Integer phase "Number of phases";
-        Modelica.SIunits.Pressure p "Pressure";
-        Modelica.SIunits.Temperature T "Kelvin-temperature";
-        Modelica.SIunits.Density rho "Density";
-        Modelica.SIunits.SpecificEnthalpy h "Specific enthalpy";
-        Modelica.SIunits.SpecificHeatCapacity cv
+        Modelica.Units.SI.Pressure p "Pressure";
+        Modelica.Units.SI.Temperature T "Kelvin-temperature";
+        Modelica.Units.SI.Density rho "Density";
+        Modelica.Units.SI.SpecificEnthalpy h "Specific enthalpy";
+        Modelica.Units.SI.SpecificHeatCapacity cv
           "Specific heat capacity at constant volume";
         Real pt "Derivative of pressure wrt temperature";
         Real pd "Derivative of pressure wrt density";
@@ -39723,7 +39724,7 @@
         "Compute isochoric specific heat capacity inside the two-phase region"
         extends Modelica.Icons.Function;
 
-        import SI = Modelica.SIunits;
+        import Modelica.Units.SI;
         input PhaseBoundaryProperties liq "Properties on the boiling curve";
         input PhaseBoundaryProperties vap "Properties on the condensation curve";
         input SI.MassFraction x "Vapour mass fraction";
@@ -39785,7 +39786,7 @@
         "Calculate phase boundary property record from dimensionless Helmholtz function"
 
         extends Modelica.Icons.Function;
-        import SI = Modelica.SIunits;
+        import Modelica.Units.SI;
         input myMedia.Common.HelmholtzDerivs f "Dimensionless derivatives of Helmholtz function";
         output PhaseBoundaryProperties sat "Phase boundary property record";
       protected
@@ -39907,9 +39908,9 @@
       protected
         SaturationProperties sat(psat=p, Tsat=0)
           "Saturation temperature and pressure";
-        Modelica.SIunits.SpecificEnthalpy hl=bubbleEnthalpy(sat)
+        Modelica.Units.SI.SpecificEnthalpy hl=bubbleEnthalpy(sat)
           "Liquid enthalpy";
-        Modelica.SIunits.SpecificEnthalpy hv=dewEnthalpy(sat) "Vapor enthalpy";
+        Modelica.Units.SI.SpecificEnthalpy hv=dewEnthalpy(sat) "Vapor enthalpy";
 
       algorithm
         state.p := p;
@@ -39944,10 +39945,10 @@
         "Set state for density and temperature (X not used since single substance)"
       protected
         myMedia.Common.HelmholtzDerivs f "Helmholtz derivatives";
-        Modelica.SIunits.SpecificHeatCapacity R "Specific gas constant";
+        Modelica.Units.SI.SpecificHeatCapacity R "Specific gas constant";
         SaturationProperties sat "Saturation temperature and pressure";
-        Modelica.SIunits.Density dl "Liquid density";
-        Modelica.SIunits.Density dv "Vapor density";
+        Modelica.Units.SI.Density dl "Liquid density";
+        Modelica.Units.SI.Density dv "Vapor density";
 
       algorithm
         R := R134aData.data.R;
@@ -39992,8 +39993,8 @@
         "Set state for pressure and specific entropy (X not used since single substance)"
 
       protected
-        Modelica.SIunits.Pressure delp=1e-2 "Iteration accuracy for pressure";
-        Modelica.SIunits.SpecificEntropy dels=1e-1
+        Modelica.Units.SI.Pressure delp=1e-2 "Iteration accuracy for pressure";
+        Modelica.Units.SI.SpecificEntropy dels=1e-1
           "Iteration accuracy for entropy";
         Integer error "If newton iteration fails (too many calls)";
         myMedia.Common.HelmholtzDerivs f "Helmholtz derivatives";
@@ -40040,7 +40041,7 @@
         "Set state for pressure and temperature (X not used since single substance)"
 
       protected
-          Modelica.SIunits.Pressure delp=1.0e-2
+          Modelica.Units.SI.Pressure delp=1.0e-2
           "Relative error in p in iteration";
 
       algorithm
@@ -40261,7 +40262,7 @@
         SaturationProperties sat "Saturation temperature and pressure";
         Common.PhaseBoundaryProperties vap "Properties on vapor phase boundary";
 
-        Modelica.SIunits.MassFraction x "Vapor quality";
+        Modelica.Units.SI.MassFraction x "Vapor quality";
 
       algorithm
         if getPhase_ph(state.p, state.h) == 2 then
@@ -40344,7 +40345,7 @@
         "Time derivative of saturation temperature in two-phase region"
         extends Modelica.Icons.Function;
 
-        input Modelica.SIunits.AbsolutePressure p "Pressure";
+        input Modelica.Units.SI.AbsolutePressure p "Pressure";
         input Real der_p "Time derivative of pressure";
         output Real der_Tsat "Time derivative of saturation temperature";
       protected
@@ -40994,7 +40995,7 @@
         SaturationProperties sat "Saturation temperature and pressure";
         Common.PhaseBoundaryProperties vap "Properties on vapor phase boundary";
 
-        Modelica.SIunits.MassFraction x "Vapor quality";
+        Modelica.Units.SI.MassFraction x "Vapor quality";
 
       algorithm
         if getPhase_ph(state.p, state.h) == 2 then
@@ -41032,8 +41033,8 @@
         Real omega "Collision integral";
 
         constant Real K=0.021357 "Constant for low density term eta_star";
-        constant Modelica.SIunits.Length sigma=0.50647e-09 "Hard-sphere diameter";
-        constant Modelica.SIunits.Temperature epsilon_k=288.82 "Empirical factor";
+        constant Modelica.Units.SI.Length sigma=0.50647e-09 "Hard-sphere diameter";
+        constant Modelica.Units.SI.Temperature epsilon_k=288.82 "Empirical factor";
         constant Real a[5]={2.218816e-01,-5.079322e-01,1.285776e-01,-8.328165e-02,
             -2.713173e-02} "Coefficients for term of collision integral";
         constant Real b[13]={-1.7999496,4.6692621e+01,-5.3460794e+02,
@@ -41093,27 +41094,27 @@
       protected
         myMedia.Common.HelmholtzDerivs f "Helmholtz derivatives";
         myMedia.Common.HelmholtzDerivs f_ref "Helmholtz derivatives for reference state";
-        Modelica.SIunits.ThermalConductivity lambda_dg
+        Modelica.Units.SI.ThermalConductivity lambda_dg
           "Dilute gas contribution to lambda";
         R134aData.CoeffsThermalConductivity coeff
           "Coefficients of thermal conductivity model";
-        Modelica.SIunits.ThermalConductivity lambda_reduced "Reduced lambda";
-        Modelica.SIunits.ThermalConductivity lambda_crit
+        Modelica.Units.SI.ThermalConductivity lambda_reduced "Reduced lambda";
+        Modelica.Units.SI.ThermalConductivity lambda_crit
           "Enhancement of lambda in the critical region";
-        Modelica.SIunits.ThermalConductivity chi_star "Correlation length";
-        Modelica.SIunits.ThermalConductivity chi_star_ref "Correlation length";
-        Modelica.SIunits.ThermalConductivity delta_chi "Chi_star - chi_star_ref";
+        Modelica.Units.SI.ThermalConductivity chi_star "Correlation length";
+        Modelica.Units.SI.ThermalConductivity chi_star_ref "Correlation length";
+        Modelica.Units.SI.ThermalConductivity delta_chi "Chi_star - chi_star_ref";
         Real rho_molar "Molar density [mol/l]";
         Real dddp "Derivative of density w.r.t. pressure";
         Real dddp_ref "Derivative of density w.r.t. pressure for reference state";
-        Modelica.SIunits.Length xi "Correlation length";
-        Modelica.SIunits.SpecificHeatCapacity cp
+        Modelica.Units.SI.Length xi "Correlation length";
+        Modelica.Units.SI.SpecificHeatCapacity cp
           "Specific heat capacity at constant pressure";
-        Modelica.SIunits.SpecificHeatCapacity cv
+        Modelica.Units.SI.SpecificHeatCapacity cv
           "Specific heat capacity at constant volume";
-        Modelica.SIunits.DynamicViscosity eta "Dynamic viscosity";
-        Modelica.SIunits.ThermalConductivity omega "Crossover function";
-        Modelica.SIunits.ThermalConductivity omega_0 "Crossover function";
+        Modelica.Units.SI.DynamicViscosity eta "Dynamic viscosity";
+        Modelica.Units.SI.ThermalConductivity omega "Crossover function";
+        Modelica.Units.SI.ThermalConductivity omega_0 "Crossover function";
 
       algorithm
         f := f_R134a(state.d, state.T);
@@ -41178,7 +41179,7 @@
       protected
         Real tau "Reduced temperature";
         R134aData.CoeffsSurfaceTension coeff "Polynomial coefficients";
-        Modelica.SIunits.Temperature Tc=374.21 "Critical temperature";
+        Modelica.Units.SI.Temperature Tc=374.21 "Critical temperature";
 
       algorithm
         if sat.Tsat > Tc then
@@ -41469,12 +41470,12 @@
       protected
         SaturationProperties sat(psat=p, Tsat=0)
           "Saturation temperature and pressure";
-        Modelica.SIunits.Pressure delp=1.0e-2 "Relative error in p in iteration";
-        Modelica.SIunits.SpecificEnthalpy delh=1.0e-2
+        Modelica.Units.SI.Pressure delp=1.0e-2 "Relative error in p in iteration";
+        Modelica.Units.SI.SpecificEnthalpy delh=1.0e-2
           "Relative error in h in iteration";
-        Modelica.SIunits.SpecificEnthalpy hvapor=dewEnthalpy(sat=sat)
+        Modelica.Units.SI.SpecificEnthalpy hvapor=dewEnthalpy(sat=sat)
           "Vapor enthalpy";
-        Modelica.SIunits.SpecificEnthalpy hliquid=bubbleEnthalpy(sat=sat)
+        Modelica.Units.SI.SpecificEnthalpy hliquid=bubbleEnthalpy(sat=sat)
           "Liquid enthalpy";
         Integer error "Iteration error";
         Real x "Vapor quality";
@@ -41530,7 +41531,7 @@
         constant Real dv_coef[:, 4]=R134aData.dvcoef
           "Coefficients of cubic spline for rho_vap(p)";
 
-        Modelica.SIunits.SpecificEnthalpy hl "Liquid enthalpy";
+        Modelica.Units.SI.SpecificEnthalpy hl "Liquid enthalpy";
         Boolean liquid "Is liquid";
         Boolean supercritical "Is supercritical";
         Integer int "Interval number";
@@ -41846,10 +41847,10 @@
       protected
         SaturationProperties sat(psat=p, Tsat=0)
           "Saturation temperature and pressure";
-        Modelica.SIunits.SpecificEnthalpy hl=bubbleEnthalpy(sat)
-          "Liquid enthalpy";
-        Modelica.SIunits.SpecificEnthalpy hv=dewEnthalpy(sat) "Vapor enthalpy";
 
+        Modelica.Units.SI.SpecificEnthalpy hl=bubbleEnthalpy(sat)
+          "Liquid enthalpy";
+        Modelica.Units.SI.SpecificEnthalpy hv=dewEnthalpy(sat) "Vapor enthalpy";
       algorithm
         phase := if ((h < hl) or (h > hv) or (p > R134aData.data.FPCRIT)) then 1
            else 2;
@@ -41868,9 +41869,9 @@
       protected
         SaturationProperties sat(psat=p, Tsat=0)
           "Saturation temperature and pressure";
-        Modelica.SIunits.SpecificEntropy sl=bubbleEntropy(sat) "Liquid entropy";
-        Modelica.SIunits.SpecificEntropy sv=dewEntropy(sat) "Vapor entropy";
 
+        Modelica.Units.SI.SpecificEntropy sl=bubbleEntropy(sat) "Liquid entropy";
+        Modelica.Units.SI.SpecificEntropy sv=dewEntropy(sat) "Vapor entropy";
       algorithm
         phase := if ((s < sl) or (s > sv) or (p > R134aData.data.FPCRIT)) then 1
            else 2;
@@ -41889,11 +41890,11 @@
 
       protected
         SaturationProperties sat "Saturation temperature and pressure";
-        Modelica.SIunits.MassFraction x "Vapor quality";
-        Modelica.SIunits.SpecificEntropy sl "Liquid entropy";
-        Modelica.SIunits.SpecificEntropy sv "Vapor entropy";
-        Modelica.SIunits.SpecificEnthalpy hl "Liquid enthalpy";
-        Modelica.SIunits.SpecificEnthalpy hv "Vapor enthalpy";
+        Modelica.Units.SI.MassFraction x "Vapor quality";
+        Modelica.Units.SI.SpecificEntropy sl "Liquid entropy";
+        Modelica.Units.SI.SpecificEntropy sv "Vapor entropy";
+        Modelica.Units.SI.SpecificEnthalpy hl "Liquid enthalpy";
+        Modelica.Units.SI.SpecificEnthalpy hv "Vapor enthalpy";
       algorithm
         sat.psat := p;
         // dummy
@@ -41919,8 +41920,8 @@
         output Common.PhaseBoundaryProperties liq
           "Properties on liquid boundary phase";
       protected
-        Modelica.SIunits.Temperature T_liq "Liquid temperature";
-        Modelica.SIunits.Density d_liq "Liquid density";
+        Modelica.Units.SI.Temperature T_liq "Liquid temperature";
+        Modelica.Units.SI.Density d_liq "Liquid density";
         myMedia.Common.HelmholtzDerivs f "Helmholtz derivatives";
       algorithm
         if T < R134aData.data.TCRIT then
@@ -41944,8 +41945,8 @@
         output Common.PhaseBoundaryProperties vap
           "Properties on vapor boundary phase";
       protected
-        Modelica.SIunits.Temperature T_vap "Vapor temperature";
-        Modelica.SIunits.Density d_vap "Vapor density";
+        Modelica.Units.SI.Temperature T_vap "Vapor temperature";
+        Modelica.Units.SI.Density d_vap "Vapor density";
         myMedia.Common.HelmholtzDerivs f "Helmholtz derivatives";
       algorithm
         if T < R134aData.data.TCRIT then
@@ -41990,11 +41991,11 @@
         "Density as function of pressure and specific enthalpy"
         extends Modelica.Icons.Function;
 
-        input Modelica.SIunits.Pressure p "Pressure";
-        input Modelica.SIunits.SpecificEnthalpy h "Specific enthalpy";
+        input Modelica.Units.SI.Pressure p "Pressure";
+        input Modelica.Units.SI.SpecificEnthalpy h "Specific enthalpy";
         input Common.InverseDerivatives_rhoT derivs
           "Record for the calculation of rho_ph_der";
-        output Modelica.SIunits.Density d "Density";
+        output Modelica.Units.SI.Density d "Density";
       algorithm
         d := derivs.rho;
 
@@ -42165,7 +42166,7 @@
         extends Modelica.Icons.Function;
         input SI.Pressure p "Pressure";
         input SI.Temperature T "Temperature";
-        input Modelica.SIunits.Pressure delp
+        input Modelica.Units.SI.Pressure delp
           "Iteration converged if (p-pre(p) < delp)";
         output SI.SpecificEnthalpy h "Specific Enthalpy";
 
@@ -42188,13 +42189,13 @@
       function phaseBoundaryAssert
         "Assert function for checking threshold to phase boundary"
         extends Modelica.Icons.Function;
-        input Modelica.SIunits.Pressure p "Refrigerant pressure";
-        input Modelica.SIunits.Temperature T "Refrigerant temperature";
+        input Modelica.Units.SI.Pressure p "Refrigerant pressure";
+        input Modelica.Units.SI.Temperature T "Refrigerant temperature";
 
       protected
-        Modelica.SIunits.Temperature T_lim_gas "Upper temperature limit";
-        Modelica.SIunits.Temperature T_lim_liq "Lower temperature limit";
 
+        Modelica.Units.SI.Temperature T_lim_gas "Upper temperature limit";
+        Modelica.Units.SI.Temperature T_lim_liq "Lower temperature limit";
       algorithm
         T_lim_gas := myMedia.R134a.R134a_ph.saturationTemperature(p) + 1;
         T_lim_liq := myMedia.R134a.R134a_ph.saturationTemperature(p) - 1;
@@ -42248,10 +42249,10 @@
     end R134a_ph;
 
     package R134aData "R134a data required by package R134a_ph"
-      import Modelica.SIunits;
+      import Modelica.Units.SI;
 
       extends Modelica.Icons.Package;
-      constant SIunits.SpecificHeatCapacity R=data.R;
+      constant SI.SpecificHeatCapacity R=data.R;
       constant Integer Npoints=478;
       constant Integer Ninterval=Npoints - 1;
       constant Real[Npoints] pbreaks={9.597762848258994e-005,
@@ -48892,19 +48893,19 @@
 
       record crit
         extends Modelica.Icons.Record;
-        constant SIunits.Temperature TCRIT=374.18;
-        constant SIunits.Pressure PCRIT=4056290.0;
-        constant SIunits.Density DCRIT=508.0;
+        constant SI.Temperature TCRIT=374.18;
+        constant SI.Pressure PCRIT=4056290.0;
+        constant SI.Density DCRIT=508.0;
 
       end crit;
 
       record data
-        constant SIunits.SpecificHeatCapacity R=81.4888564372;
+        constant SI.SpecificHeatCapacity R=81.4888564372;
         // 8.314471/0.102032
-        constant SIunits.MolarMass MM=0.102032;
+        constant SI.MolarMass MM=0.102032;
         extends crit;
-        constant SIunits.SpecificEnthalpy HCRIT=389653;
-        constant SIunits.SpecificEntropy SCRIT=1562.135;
+        constant SI.SpecificEnthalpy HCRIT=389653;
+        constant SI.SpecificEntropy SCRIT=1562.135;
         extends fcrit;
         extends triple;
 
@@ -48912,9 +48913,9 @@
 
       record fcrit
         extends Modelica.Icons.Record;
-        constant SIunits.Temperature FTCRIT=374.209;
-        constant SIunits.Pressure FPCRIT=4059280.0;
-        constant SIunits.Density FDCRIT=511.9;
+        constant SI.Temperature FTCRIT=374.209;
+        constant SI.Pressure FPCRIT=4059280.0;
+        constant SI.Density FDCRIT=511.9;
 
       end fcrit;
 
@@ -48926,8 +48927,8 @@
 
       record ReferenceStates
         extends Modelica.Icons.Record;
-        constant SIunits.SpecificEnthalpy h0=1.0;
-        constant SIunits.SpecificEntropy s0=1.0;
+        constant SI.SpecificEnthalpy h0=1.0;
+        constant SI.SpecificEntropy s0=1.0;
 
       end ReferenceStates;
 
@@ -48952,10 +48953,10 @@
 
       record triple
         extends Modelica.Icons.Record;
-        constant SIunits.Temperature TTRIPLE=169.85;
-        constant SIunits.Pressure PTRIPLE=389.563789;
-        constant SIunits.Density DLTRIPLE=1591.107453;
-        constant SIunits.Density DVTRIPLE=0.028172;
+        constant SI.Temperature TTRIPLE=169.85;
+        constant SI.Pressure PTRIPLE=389.563789;
+        constant SI.Density DLTRIPLE=1591.107453;
+        constant SI.Density DVTRIPLE=0.028172;
 
       end triple;
 
@@ -53385,7 +53386,7 @@
             extends Modelica.Icons.Function;
             input SI.Pressure p "Pressure";
             input SI.SpecificEnthalpy h "Specific enthalpy";
-            output SI.Temp_K T "Temperature";
+            output SI.Temperature T "Temperature";
           protected
             constant Real[:] n={-0.133645667811215e-6,0.455912656802978e-5,-0.146294640700979e-4,
                 0.639341312970080e-2,0.372783927268847e3,-0.718654377460447e4,
@@ -53402,7 +53403,7 @@
                 1,1,0,1,0,3,4,5};
             constant SI.SpecificEnthalpy hstar=2300e3 "Normalization enthalpy";
             constant SI.Pressure pstar=100e6 "Normalization pressure";
-            constant SI.Temp_K Tstar=760 "Normalization temperature";
+            constant SI.Temperature Tstar=760 "Normalization temperature";
             Real pi=p/pstar "Normalized specific pressure";
             Real eta=h/hstar "Normalized specific enthalpy";
           algorithm
@@ -53427,7 +53428,7 @@
             extends Modelica.Icons.Function;
             input SI.Pressure p "Pressure";
             input SI.SpecificEnthalpy h "Specific enthalpy";
-            output SI.Temp_K T "Temperature";
+            output SI.Temperature T "Temperature";
           protected
             constant Real[:] n={0.323254573644920e-4,-0.127575556587181e-3,-0.475851877356068e-3,
                 0.156183014181602e-2,0.105724860113781,-0.858514221132534e2,
@@ -53443,7 +53444,7 @@
                 -4,-4,-3,-2,-2,-1,-1,-1,-1,-1,-1,0,0,1,3,5,6,8};
             constant Real[:] J={0,1,0,1,5,10,12,0,1,2,4,10,0,1,2,0,1,5,0,4,2,4,6,10,
                 14,16,0,2,1,1,1,1,1};
-            constant SI.Temp_K Tstar=860 "Normalization temperature";
+            constant SI.Temperature Tstar=860 "Normalization temperature";
             constant SI.Pressure pstar=100e6 "Normalization pressure";
             constant SI.SpecificEnthalpy hstar=2800e3 "Normalization enthalpy";
             Real pi=p/pstar "Normalized specific pressure";
@@ -53557,7 +53558,7 @@
             extends Modelica.Icons.Function;
             input SI.Pressure p "Pressure";
             input SI.SpecificEntropy s "Specific entropy";
-            output SI.Temp_K T "Temperature";
+            output SI.Temperature T "Temperature";
           protected
             constant Real[:] n={0.150042008263875e10,-0.159397258480424e12,
                 0.502181140217975e-3,-0.672057767855466e2,0.145058545404456e4,-0.823889534888890e4,
@@ -53574,7 +53575,7 @@
                 -5,-4,-4,-4,-2,-2,-1,-1,0,0,0,1,2,2,3,8,8,10};
             constant Real[:] J={28,32,4,10,12,14,5,7,8,28,2,6,32,0,14,32,6,10,36,1,
                 4,1,6,0,1,4,0,0,3,2,0,1,2};
-            constant SI.Temp_K Tstar=760 "Normalization temperature";
+            constant SI.Temperature Tstar=760 "Normalization temperature";
             constant SI.Pressure pstar=100e6 "Normalization pressure";
             constant SI.SpecificEntropy sstar=4.4e3 "Normalization entropy";
             Real pi=p/pstar "Normalized specific pressure";
@@ -53602,7 +53603,7 @@
             extends Modelica.Icons.Function;
             input SI.Pressure p "Pressure";
             input SI.SpecificEntropy s "Specific entropy";
-            output SI.Temp_K T "Temperature";
+            output SI.Temperature T "Temperature";
           protected
             constant Real[:] n={0.527111701601660,-0.401317830052742e2,
                 0.153020073134484e3,-0.224799398218827e4,-0.193993484669048,-0.140467557893768e1,
@@ -53616,7 +53617,7 @@
                 -3,-3,-2,0,2,3,4,5,6,8,12,14};
             constant Real[:] J={1,3,4,7,0,1,3,0,2,4,0,1,2,4,6,12,1,6,2,0,1,1,0,24,0,
                 3,1,2};
-            constant SI.Temp_K Tstar=860 "Normalization temperature";
+            constant SI.Temperature Tstar=860 "Normalization temperature";
             constant SI.Pressure pstar=100e6 "Normalization pressure";
             constant SI.SpecificEntropy sstar=5.3e3 "Normalization entropy";
             Real pi=p/pstar "Normalized specific pressure";
@@ -53797,14 +53798,15 @@
         package IceBoundaries
           "The melting line and sublimation line curves from IAPWS"
           extends Modelica.Icons.FunctionsPackage;
+
           function pmIceI_T
             "Melting pressure of ice I (temperature range from 273.16 to 251.165 K)"
             extends Modelica.Icons.Function;
-            input SI.Temp_K T "Temperature";
+            input SI.Temperature T "Temperature";
             output SI.Pressure pm
               "Melting pressure of iceI(for T from 273.16 to 251.165 K)";
           protected
-            constant SI.Temp_K Tn=273.16 "Normalization temperature";
+            constant SI.Temperature Tn=273.16 "Normalization temperature";
             constant SI.Pressure pn=611.657 "Normalization pressure";
             Real sigma=T/Tn "Normalized temperature";
           algorithm
@@ -53825,11 +53827,11 @@
           function pmIceIII_T
             "Melting pressure of ice III (temperature range from 251.165 to 256.164 K)"
             extends Modelica.Icons.Function;
-            input SI.Temp_K T "Temperature";
+            input SI.Temperature T "Temperature";
             output SI.Pressure pm
               "Melting pressure of iceIII(for T from 251.165 to 256.164 K)";
           protected
-            constant SI.Temp_K Tn=251.165 "Normalization temperature";
+            constant SI.Temperature Tn=251.165 "Normalization temperature";
             constant SI.Pressure pn=209.9e6 "Normalization pressure";
             Real sigma=T/Tn "Normalized temperature";
           algorithm
@@ -53849,11 +53851,11 @@
           function pmIceV_T
             "Melting pressure of ice V (temperature range from 256.164 to 273.31 K)"
             extends Modelica.Icons.Function;
-            input SI.Temp_K T "Temperature";
+            input SI.Temperature T "Temperature";
             output SI.Pressure pm
               "Melting pressure of iceV(for T from 256.164 to 273.31 K)";
           protected
-            constant SI.Temp_K Tn=256.164 "Normalization temperature";
+            constant SI.Temperature Tn=256.164 "Normalization temperature";
             constant SI.Pressure pn=350.1e6 "Normalization pressure";
             Real sigma=T/Tn "Normalized temperature";
 
@@ -53874,11 +53876,11 @@
           function sublimationPressure_T
             "Sublimation pressure, valid from 190 to 273.16 K"
             extends Modelica.Icons.Function;
-            input SI.Temp_K T "Temperature";
+            input SI.Temperature T "Temperature";
             output SI.Pressure psubl
               "Sublimation pressure (for T from 190 to 273.16)";
           protected
-            constant SI.Temp_K Tn=273.16 "Normalization temperature";
+            constant SI.Temperature Tn=273.16 "Normalization temperature";
             constant SI.Pressure pn=611.657 "Normalization pressure";
             constant Real[2] a={-13.9281690,34.7078238} "Constant values";
             Real sigma=T/Tn "Normalized temperature";
@@ -53896,7 +53898,6 @@
 </p>
   </html>"));
           end sublimationPressure_T;
-
           annotation (Documentation(info="<html>
 <p>
 The International Association for the Properties of Water and Steam<br>
@@ -54711,7 +54712,7 @@
             input SI.SpecificEntropy s "Specific entropy";
             output SI.SpecificEnthalpy h "Specific enthalpy";
           protected
-            SI.Temp_K Tsat "Saturation temperature";
+            SI.Temperature Tsat "Saturation temperature";
             SI.MassFraction x "Dryness fraction";
             SI.SpecificEntropy sl "Saturated liquid specific entropy";
             SI.SpecificEntropy sv "Saturated vapour specific entropy";
diff -ur "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Processes/FlowResistance.mo" "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Processes/FlowResistance.mo"
--- "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Processes/FlowResistance.mo"	2021-11-16 02:01:59.260483515 +0000
+++ "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Processes/FlowResistance.mo"	2021-11-16 02:02:51.312327058 +0000
@@ -2,7 +2,7 @@
 model FlowResistance "Flow resistance model"
   extends Interfaces.SISOFlow(final L=if computeL then l/(r^2*pi) else L_value, final clip_p_out=true);
 
-  import Modelica.Constants.pi "Constant Pi";
+  import Modelica.Constants.pi ;
 
   parameter SI.Radius r(min=0) "Radius of pipe";
   parameter SI.Length l(min=0) "Length of pipe";
diff -ur "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Processes/Internal/TurboComponent/dp_tau_const_isentrop.mo" "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Processes/Internal/TurboComponent/dp_tau_const_isentrop.mo"
--- "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Processes/Internal/TurboComponent/dp_tau_const_isentrop.mo"	2021-11-16 02:01:59.264483503 +0000
+++ "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Processes/Internal/TurboComponent/dp_tau_const_isentrop.mo"	2021-11-16 02:02:51.172327479 +0000
@@ -1,7 +1,7 @@
 within ThermofluidStream.Processes.Internal.TurboComponent;
 function dp_tau_const_isentrop "Compressor model with parameter characteristic curve and constant isentropic efficiency"
   extends partial_dp_tau;
-  import R_m = Modelica.Constants.R "General gas constant";
+  import R_m = Modelica.Constants.R ;
 
   input Real omega_ref(unit="rad/s")= 1000 "Reference speed, that produces pr=1"
     annotation(Dialog(group="Pressure ratio curve", enable=true));
diff -ur "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Processes/Tests/Power.mo" "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Processes/Tests/Power.mo"
--- "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Processes/Tests/Power.mo"	2021-11-16 02:01:59.264483503 +0000
+++ "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Processes/Tests/Power.mo"	2021-11-16 02:02:50.980328054 +0000
@@ -7,7 +7,7 @@
   parameter SI.Torque tau_max "Max tourque";
 
 protected
-  Modelica.SIunits.AngularVelocity omega = der(flange.phi);
+  Modelica.Units.SI.AngularVelocity omega = der(flange.phi);
   constant Real eps(unit="1") = 1e-7;
 
 equation
diff -ur "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Sensors/DifferenceSensor_Tp.mo" "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Sensors/DifferenceSensor_Tp.mo"
--- "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Sensors/DifferenceSensor_Tp.mo"	2021-11-16 02:01:59.272483479 +0000
+++ "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Sensors/DifferenceSensor_Tp.mo"	2021-11-16 02:02:50.860328414 +0000
@@ -69,21 +69,19 @@
 equation
   inletA.m_flow = 0;
   inletB.m_flow = 0;
-
   if temperatureUnit == "K" then
-    TA =  MediumA.temperature(inletA.state);
-    TB =  MediumB.temperature(inletB.state);
+    TA = MediumA.temperature(inletA.state);
+    TB = MediumB.temperature(inletB.state);
   elseif temperatureUnit == "degC" then
-    TA = SI.Conversions.to_degC(MediumA.temperature(inletA.state));
-    TB = SI.Conversions.to_degC(MediumB.temperature(inletB.state));
+    TA = Modelica.Units.Conversions.to_degC(MediumA.temperature(inletA.state));
+    TB = Modelica.Units.Conversions.to_degC(MediumB.temperature(inletB.state));
   end if;
-
   if pressureUnit == "Pa" then
     pA = MediumA.pressure(inletA.state);
     pB = MediumB.pressure(inletB.state);
   elseif pressureUnit == "bar" then
-    pA = SI.Conversions.to_bar(MediumA.pressure(inletA.state));
-    pB = SI.Conversions.to_bar(MediumB.pressure(inletB.state));
+    pA = Modelica.Units.Conversions.to_bar(MediumA.pressure(inletA.state));
+    pB = Modelica.Units.Conversions.to_bar(MediumB.pressure(inletB.state));
   end if;
 
   direct_T = TA - TB;
diff -ur "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Sensors/Internal/Types.mo" "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Sensors/Internal/Types.mo"
--- "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Sensors/Internal/Types.mo"	2021-11-16 02:01:59.272483479 +0000
+++ "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Sensors/Internal/Types.mo"	2021-11-16 02:02:50.828328510 +0000
@@ -1,4 +1,4 @@
-﻿within ThermofluidStream.Sensors.Internal;
+within ThermofluidStream.Sensors.Internal;
 package Types "Types used in the Sensor Package"
 
   extends Modelica.Icons.TypesPackage;
diff -ur "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Sensors/Internal/getQuantity.mo" "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Sensors/Internal/getQuantity.mo"
--- "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Sensors/Internal/getQuantity.mo"	2021-11-16 02:01:59.272483479 +0000
+++ "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Sensors/Internal/getQuantity.mo"	2021-11-16 02:02:50.776328666 +0000
@@ -18,19 +18,19 @@
   if quantity == Types.Quantities.T_K then
     value := Medium.temperature(state);
   elseif quantity == Types.Quantities.T_C then
-    value := SI.Conversions.to_degC(Medium.temperature(state));
+  value := Modelica.Units.Conversions.to_degC(Medium.temperature(state));
   elseif quantity == Types.Quantities.p_Pa then
     value := Medium.pressure(state);
   elseif quantity == Types.Quantities.p_bar then
-    value := SI.Conversions.to_bar(Medium.pressure(state));
+  value := Modelica.Units.Conversions.to_bar(Medium.pressure(state));
   elseif quantity == Types.Quantities.r_Pa then
     value := r;
   elseif quantity == Types.Quantities.r_bar then
-    value := SI.Conversions.to_bar(r);
+  value := Modelica.Units.Conversions.to_bar(r);
   elseif quantity == Types.Quantities.p_total_Pa then
     value := Medium.pressure(state)+r;
   elseif quantity == Types.Quantities.p_total_bar then
-    value := SI.Conversions.to_bar(Medium.pressure(state)+r);
+  value := Modelica.Units.Conversions.to_bar(Medium.pressure(state) + r);
   elseif quantity == Types.Quantities.h_Jpkg then
     value := Medium.specificEnthalpy(state);
   elseif quantity == Types.Quantities.s_JpkgK then
diff -ur "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Sensors/Internal/getTwoPhaseQuantity.mo" "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Sensors/Internal/getTwoPhaseQuantity.mo"
--- "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Sensors/Internal/getTwoPhaseQuantity.mo"	2021-11-16 02:01:59.272483479 +0000
+++ "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Sensors/Internal/getTwoPhaseQuantity.mo"	2021-11-16 02:02:50.764328702 +0000
@@ -19,15 +19,15 @@
   elseif quantity == Types.TwoPhaseQuantities.p_sat_Pa then
     value := Medium.saturationPressure(Medium.temperature(state));
   elseif quantity == Types.TwoPhaseQuantities.p_sat_bar then
-    value := SI.Conversions.to_bar(Medium.saturationPressure(Medium.temperature(state)));
+  value := Modelica.Units.Conversions.to_bar(Medium.saturationPressure(Medium.temperature(state)));
   elseif quantity == Types.TwoPhaseQuantities.T_sat_K then
     value := Medium.saturationTemperature(Medium.pressure(state));
   elseif quantity == Types.TwoPhaseQuantities.T_sat_C then
-    value := SI.Conversions.to_degC(Medium.saturationTemperature(Medium.pressure(state)));
+  value := Modelica.Units.Conversions.to_degC(Medium.saturationTemperature(Medium.pressure(state)));
   elseif quantity == Types.TwoPhaseQuantities.p_oversat_Pa then
     value := Medium.pressure(state) - Medium.saturationPressure(Medium.temperature(state));
   elseif quantity == Types.TwoPhaseQuantities.p_oversat_bar then
-    value := SI.Conversions.to_bar(Medium.pressure(state) - Medium.saturationPressure(Medium.temperature(state)));
+  value := Modelica.Units.Conversions.to_bar(Medium.pressure(state) - Medium.saturationPressure(Medium.temperature(state)));
   elseif quantity == Types.TwoPhaseQuantities.T_oversat_K then
     value :=  Medium.temperature(state) - Medium.saturationTemperature(Medium.pressure(state));
   else
diff -ur "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Sensors/MultiSensor_Tp.mo" "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Sensors/MultiSensor_Tp.mo"
--- "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Sensors/MultiSensor_Tp.mo"	2021-11-16 02:01:59.272483479 +0000
+++ "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Sensors/MultiSensor_Tp.mo"	2021-11-16 02:02:50.744328761 +0000
@@ -53,17 +53,15 @@
 
 equation
   inlet.m_flow = 0;
-
   if temperatureUnit == "K" then
     direct_T = Medium.temperature(inlet.state);
   elseif temperatureUnit == "degC" then
-    direct_T = SI.Conversions.to_degC(Medium.temperature(inlet.state));
+    direct_T = Modelica.Units.Conversions.to_degC(Medium.temperature(inlet.state));
   end if;
-
   if pressureUnit == "Pa" then
     direct_p = Medium.pressure(inlet.state);
   elseif pressureUnit == "bar" then
-    direct_p = SI.Conversions.to_bar(Medium.pressure(inlet.state));
+    direct_p = Modelica.Units.Conversions.to_bar(Medium.pressure(inlet.state));
   end if;
 
   if filter_output then
diff -ur "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Sensors/MultiSensor_Tpm.mo" "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Sensors/MultiSensor_Tpm.mo"
--- "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Sensors/MultiSensor_Tpm.mo"	2021-11-16 02:01:59.272483479 +0000
+++ "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Sensors/MultiSensor_Tpm.mo"	2021-11-16 02:02:50.724328821 +0000
@@ -71,17 +71,15 @@
   inlet.m_flow + outlet.m_flow = 0;
   outlet.r = inlet.r;
   outlet.state = inlet.state;
-
   if temperatureUnit == "K" then
-    direct_T =  Medium.temperature(inlet.state);
+    direct_T = Medium.temperature(inlet.state);
   elseif temperatureUnit == "degC" then
-    direct_T = SI.Conversions.to_degC(Medium.temperature(inlet.state));
+    direct_T = Modelica.Units.Conversions.to_degC(Medium.temperature(inlet.state));
   end if;
-
   if pressureUnit == "Pa" then
     direct_p = Medium.pressure(inlet.state);
   elseif pressureUnit == "bar" then
-    direct_p = SI.Conversions.to_bar(Medium.pressure(inlet.state));
+    direct_p = Modelica.Units.Conversions.to_bar(Medium.pressure(inlet.state));
   end if;
 
   if massFlowUnit == "(kg/s)" then
diff -ur "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Undirected/FlowControl/Internal/PartialValve.mo" "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Undirected/FlowControl/Internal/PartialValve.mo"
--- "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Undirected/FlowControl/Internal/PartialValve.mo"	2021-11-16 02:01:59.272483479 +0000
+++ "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Undirected/FlowControl/Internal/PartialValve.mo"	2021-11-16 02:02:49.884331341 +0000
@@ -14,17 +14,17 @@
 
   Real u(unit="1") "actuation input for flow calculation";
 
-  parameter Modelica.SIunits.Pressure dp_ref = 1e5 "Reference pressure difference"
+  parameter Modelica.Units.SI.Pressure dp_ref = 1e5 "Reference pressure difference"
     annotation(Dialog(tab="Advanced", group = "Reference values"));
-  parameter Modelica.SIunits.Density rho_ref = 1000 "Reference density"
+  parameter Modelica.Units.SI.Density rho_ref = 1000 "Reference density"
     annotation(Dialog(tab="Advanced", group = "Reference values"));
 
 protected
   constant Real secondsPerHour(final unit="s/h") = 3600 "Parameter for unit conversion";
 
   //Medium properties
-  Modelica.SIunits.Density rho_rear_in = Medium.density(rear.state_forwards);
-  Modelica.SIunits.Density rho_fore_in = Medium.density(fore.state_rearwards);
+  Modelica.Units.SI.Density rho_rear_in = Medium.density(rear.state_forwards);
+  Modelica.Units.SI.Density rho_fore_in = Medium.density(fore.state_rearwards);
 
   SI.MassFlowRate m_flow_ref "Reference mass flow derived from flow coefficient inputs";
   Real k_u(unit="1") "Kv/Kvs, respecting flow characteristics";
diff -ur "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Undirected/FlowControl/SpecificValveType.mo" "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Undirected/FlowControl/SpecificValveType.mo"
--- "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Undirected/FlowControl/SpecificValveType.mo"	2021-11-16 02:01:59.272483479 +0000
+++ "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Undirected/FlowControl/SpecificValveType.mo"	2021-11-16 02:02:49.864331400 +0000
@@ -12,7 +12,7 @@
 
   parameter FlowCoeffType flowCoefficient = FlowCoeffType.Kvs "Select type of flow coefficient" annotation(Dialog(group = "Valve parameters"));
   //Set valve data as parameter
-  parameter Modelica.SIunits.Diameter d_valve "Flow diameter" annotation(Evaluate = true, Dialog(group = "Valve parameters",
+  parameter Modelica.Units.SI.Diameter d_valve "Flow diameter" annotation(Evaluate = true, Dialog(group = "Valve parameters",
   enable = (flowCoefficient == FlowCoeffType.flowDiameter)));
   //Reference Values
   parameter Real Kvs( unit = "m3/h")  "Kvs-value (metric) from data sheet (valve fully open)" annotation(Evaluate = true,
@@ -27,7 +27,7 @@
 
 protected
   constant ZetaValueRecord valveData;
-  Modelica.SIunits.Area A_valve = 0.25*Modelica.Constants.pi*d_valve^2 "Cross-sectional valve area";
+  Modelica.Units.SI.Area A_valve = 0.25*Modelica.Constants.pi*d_valve^2 "Cross-sectional valve area";
 
   Real k_u(unit="1") "Kv/Kvs, respecting flow characteristics";
   Real k_u_zeta(unit="1") "Kv/Kvs respecting zeta curve";
diff -ur "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Undirected/HeatExchangers/DiscretizedHEX.mo" "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Undirected/HeatExchangers/DiscretizedHEX.mo"
--- "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Undirected/HeatExchangers/DiscretizedHEX.mo"	2021-11-16 02:01:59.272483479 +0000
+++ "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Undirected/HeatExchangers/DiscretizedHEX.mo"	2021-11-16 02:02:49.744331761 +0000
@@ -1,4 +1,4 @@
-﻿within ThermofluidStream.Undirected.HeatExchangers;
+within ThermofluidStream.Undirected.HeatExchangers;
 model DiscretizedHEX
 
   replaceable package MediumAir =
@@ -20,8 +20,8 @@
   parameter SI.SpecificEnthalpy h0 = MediumRefrigerant.h_default "Initial enthalpy"
    annotation(Dialog(tab = "Initialization", group = "Enthalpy", enable=(initRef == ThermofluidStream.Undirected.Processes.Internal.InitializationMethodsCondElement.h)));
   parameter Integer nCells = 3 "Number of discretization elements";
-  parameter Modelica.SIunits.Area A = 10 "Conductive area of heat exchanger" annotation(Dialog(group = "Heat transfer parameters"));
-  parameter Modelica.SIunits.Volume V_Hex = 0.001 "Volume for heat transfer calculation" annotation(Dialog(group = "Heat transfer parameters"));
+  parameter Modelica.Units.SI.Area A = 10 "Conductive area of heat exchanger" annotation(Dialog(group = "Heat transfer parameters"));
+  parameter Modelica.Units.SI.Volume V_Hex = 0.001 "Volume for heat transfer calculation" annotation(Dialog(group = "Heat transfer parameters"));
   parameter SI.CoefficientOfHeatTransfer U_nom = 3000 "Nominal coefficient of heat transfer for single-phase side" annotation(Dialog(group = "Heat transfer parameters"));
   parameter SI.CoefficientOfHeatTransfer U_liq_nom = 700 "Nominal coefficient of heat transfer for liquid region" annotation(Dialog(group = "Heat transfer parameters"));
   parameter SI.CoefficientOfHeatTransfer U_vap_nom = 500 "Nominal coefficient of heat transfer for vapour region" annotation(Dialog(group = "Heat transfer parameters"));
@@ -36,9 +36,9 @@
     annotation(Dialog(tab="Advanced"));
 
 //Parameterization of HEX Wall
-  parameter Modelica.SIunits.CoefficientOfHeatTransfer k_wall = 100 "Coefficient of heat transfer for pipe wall" annotation(Dialog(group = "Wall parameters"));
+  parameter Modelica.Units.SI.CoefficientOfHeatTransfer k_wall = 100 "Coefficient of heat transfer for pipe wall" annotation(Dialog(group = "Wall parameters"));
 protected
-  parameter Modelica.SIunits.ThermalConductance G = k_wall*A "Wall thermal conductance" annotation(Dialog(group = "Wall parameters"));
+  parameter Modelica.Units.SI.ThermalConductance G = k_wall*A "Wall thermal conductance" annotation(Dialog(group = "Wall parameters"));
 
 
 public
@@ -95,7 +95,6 @@
    if initializeMassFlow then
     foreAir.m_flow = m_flow_0;
     foreRef.m_flow = m_flow_0;
-  else
   end if;
 equation
 
diff -ur "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Undirected/Processes/FlowResistance.mo" "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Undirected/Processes/FlowResistance.mo"
--- "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Undirected/Processes/FlowResistance.mo"	2021-11-16 02:01:59.276483467 +0000
+++ "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Undirected/Processes/FlowResistance.mo"	2021-11-16 02:02:49.488332528 +0000
@@ -2,7 +2,7 @@
 model FlowResistance "Flow resistance model"
   extends Interfaces.SISOBiFlow(final L=if computeL then l/(r^2*pi) else L_value, final clip_p_out=true);
 
-  import Modelica.Constants.pi "Constant Pi";
+  import Modelica.Constants.pi ;
 
   parameter SI.Radius r(min=0) "Radius of pipe";
   parameter SI.Length l(min=0) "Length of pipe";
diff -ur "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Undirected/Sensors/MultiSensor_Tpm.mo" "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Undirected/Sensors/MultiSensor_Tpm.mo"
--- "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Undirected/Sensors/MultiSensor_Tpm.mo"	2021-11-16 02:01:59.276483467 +0000
+++ "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/Undirected/Sensors/MultiSensor_Tpm.mo"	2021-11-16 02:02:49.312333055 +0000
@@ -68,15 +68,14 @@
 
 equation
   if temperatureUnit == "K" then
-    direct_T =Medium.temperature(state);
+    direct_T = Medium.temperature(state);
   elseif temperatureUnit == "degC" then
-    direct_T = SI.Conversions.to_degC(Medium.temperature(state));
+    direct_T = Modelica.Units.Conversions.to_degC(Medium.temperature(state));
   end if;
-
   if pressureUnit == "Pa" then
-    direct_p =Medium.pressure(state);
+    direct_p = Medium.pressure(state);
   elseif pressureUnit == "bar" then
-    direct_p = SI.Conversions.to_bar(Medium.pressure(state));
+    direct_p = Modelica.Units.Conversions.to_bar(Medium.pressure(state));
   end if;
 
   if massFlowUnit == "(kg/s)" then
diff -ur "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/openmodelica.metadata.json" "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/openmodelica.metadata.json"
--- "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/openmodelica.metadata.json"	2021-11-16 02:01:59.276483467 +0000
+++ "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/openmodelica.metadata.json"	2021-11-16 02:03:50.064151343 +0000
@@ -1 +1 @@
-{"path":"ThermofluidStream", "sha":"46dbb7a258458edbb06cfd6f3b502e2ec2c987fb", "support":"noSupport", "uses":{"Modelica":"3.2.3"}, "version":"0.2.0-main", "zipfile":"https://github.com/DLR-SR/ThermofluidStream/archive/46dbb7a258458edbb06cfd6f3b502e2ec2c987fb.zip"}
+{"path": "ThermofluidStream", "sha": "46dbb7a258458edbb06cfd6f3b502e2ec2c987fb", "support": "noSupport", "uses": {"Modelica": "4.0.0"}, "version": "0.2.0-main", "zipfile": "https://github.com/DLR-SR/ThermofluidStream/archive/46dbb7a258458edbb06cfd6f3b502e2ec2c987fb.zip", "extraInfo": "Conversion script /home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om//Resources/Scripts/Conversion/ConvertModelica_from_3.2.3_to_4.0.0.mos was applied"}
\ No newline at end of file
diff -ur "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/package.mo" "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/package.mo"
--- "/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/package.mo"	2021-11-16 02:01:59.276483467 +0000
+++ "converted-libraries/.openmodelica/libraries/ThermofluidStream 0.2.0-main/package.mo"	2021-11-16 02:03:50.064151343 +0000
@@ -2,11 +2,36 @@
 package ThermofluidStream "Library for the Modelling of Thermofluid Streams"
   extends Modelica.Icons.Package;
 
-  import SI = Modelica.SIunits;
+  import Modelica.Units.SI;
 
-annotation (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  annotation (
   version="0.2",
-  uses(Modelica(version="3.2.3")),
+  uses(Modelica(version= "4.0.0")),
   Documentation(info="<html>
 
 </html>", revisions="<html>
