diff --git a/Complex.mo b/Complex.mo index ea62a21702..a6d6013d49 100644 --- a/Complex.mo +++ b/Complex.mo @@ -182,6 +182,7 @@ operator record Complex "Complex number with overloaded operators"

This function returns the given Complex number c1 to the power of the Complex number c2.

")); end complexPower; + function integerPower "Integer power of complex number" import Complex; input Complex c1 "Complex number"; diff --git a/Modelica/Blocks/Sources.mo b/Modelica/Blocks/Sources.mo index a75cd1203f..136f17e14f 100644 --- a/Modelica/Blocks/Sources.mo +++ b/Modelica/Blocks/Sources.mo @@ -301,7 +301,7 @@ If parameter duration is set to 0.0, the limiting case of a Step signal is achie if continuous then y = offset + amplitude*smooth(0, (if time < startTime then Modelica.Math.sin(phase) else Modelica.Math.sin(2*pi*f*(time - startTime) + phase))); - else + else y = offset + (if time < startTime then 0 else amplitude*Modelica.Math.sin(2 *pi*f*(time - startTime) + phase)); end if; @@ -614,7 +614,7 @@ and that the parameter startTime is omitted since the voltage can b SI.Angle x=2*pi*f*(time - startTime); equation if continuous then - y = offset + amplitude*smooth(1, (if time < startTime then 1 else + y = offset + amplitude*smooth(1, (if time < startTime then 1 else (if noEvent(time - startTime < eps) then 1 else (sin(x))/x))); else y = offset + (if time < startTime then 0 else amplitude* diff --git a/Modelica/Clocked/RealSignals/TimeBasedSources/Sine.mo b/Modelica/Clocked/RealSignals/TimeBasedSources/Sine.mo index 65204c38ee..cb69ebef89 100644 --- a/Modelica/Clocked/RealSignals/TimeBasedSources/Sine.mo +++ b/Modelica/Clocked/RealSignals/TimeBasedSources/Sine.mo @@ -10,8 +10,7 @@ block Sine "Generate sine signal" "Output = offset for time < startTime"; protected constant Real pi=Modelica.Constants.pi; -protected - SI.Time simTime; + SI.Time simTime; equation simTime = sample(time); y = offset + (if simTime < startTime then 0 else amplitude* diff --git a/Modelica/Electrical/Analog/Examples/Utilities/DirectCapacitor.mo b/Modelica/Electrical/Analog/Examples/Utilities/DirectCapacitor.mo index 17213f5048..3a6bb8044e 100644 --- a/Modelica/Electrical/Analog/Examples/Utilities/DirectCapacitor.mo +++ b/Modelica/Electrical/Analog/Examples/Utilities/DirectCapacitor.mo @@ -45,11 +45,9 @@ equation connect(currentSource.p, ground.p) annotation (Line(points={{-40,-10},{-20,-10}}, color={0,0,255})); connect(ground.p, capacitor.n) - annotation (Line(points={{-20,-10},{0,-10}}, - color={0,0,255})); + annotation (Line(points={{-20,-10},{0,-10}}, color={0,0,255})); connect(currentSource.n, capacitor.p) - annotation (Line(points={{-40,10},{0,10}}, - color={0,0,255})); + annotation (Line(points={{-40,10},{0,10}}, color={0,0,255})); annotation (Icon(coordinateSystem( preserveAspectRatio=false, extent={{-100,-100},{100,100}}), graphics={Text( diff --git a/Modelica/Electrical/Digital.mo b/Modelica/Electrical/Digital.mo index ecd490a3c6..7f28cc815f 100644 --- a/Modelica/Electrical/Digital.mo +++ b/Modelica/Electrical/Digital.mo @@ -6112,9 +6112,9 @@ NC = no change annotation (Placement(transformation(extent={{80,-20},{100,0}}), iconTransformation(extent={{80,-20},{100,0}}))); protected - D.Interfaces.Logic nextstate(start=L.'U'); - D.Interfaces.DigitalOutput yy(start=L.'U'); - D.Delay.InertialDelaySensitive inertialDelaySensitive(tLH=tLH, tHL=tHL,y(start=L.'U', fixed=true)); + D.Interfaces.Logic nextstate(start=L.'U'); + D.Interfaces.DigitalOutput yy(start=L.'U'); + D.Delay.InertialDelaySensitive inertialDelaySensitive(tLH=tLH, tHL=tHL,y(start=L.'U', fixed=true)); algorithm nextstate := T.NXferTable[enable, x]; yy := nextstate; @@ -6194,9 +6194,9 @@ UX: if dataIn == U then U else X annotation (Placement(transformation(extent={{80,-20},{100,0}}), iconTransformation(extent={{80,-20},{100,0}}))); protected - D.Interfaces.Logic nextstate(start=L.'U'); - D.Interfaces.DigitalOutput yy(start=L.'U'); - D.Delay.InertialDelaySensitive inertialDelaySensitive(tLH=tLH, tHL=tHL, y(start=L.'U', fixed=true)); + D.Interfaces.Logic nextstate(start=L.'U'); + D.Interfaces.DigitalOutput yy(start=L.'U'); + D.Delay.InertialDelaySensitive inertialDelaySensitive(tLH=tLH, tHL=tHL, y(start=L.'U', fixed=true)); algorithm nextstate := T.NRXferTable[enable, x]; yy := nextstate; @@ -6276,9 +6276,9 @@ Strength Reduced: 0 -> L, 1 -> H, X -> W annotation (Placement(transformation(extent={{80,-20},{100,0}}), iconTransformation(extent={{80,-20},{100,0}}))); protected - D.Interfaces.Logic nextstate(start=L.'U'); - D.Interfaces.DigitalOutput yy(start=L.'U'); - D.Delay.InertialDelaySensitive inertialDelaySensitive(tLH=tLH, tHL=tHL); + D.Interfaces.Logic nextstate(start=L.'U'); + D.Interfaces.DigitalOutput yy(start=L.'U'); + D.Delay.InertialDelaySensitive inertialDelaySensitive(tLH=tLH, tHL=tHL); algorithm nextstate := T.PXferTable[enable, x]; yy := nextstate; @@ -6358,9 +6358,9 @@ UX: if dataIn == U then U else X annotation (Placement(transformation(extent={{80,-20},{100,0}}), iconTransformation(extent={{80,-20},{100,0}}))); protected - D.Interfaces.Logic nextstate(start=L.'U'); - D.Interfaces.DigitalOutput yy(start=L.'U'); - D.Delay.InertialDelaySensitive inertialDelaySensitive(tLH=tLH, tHL=tHL); + D.Interfaces.Logic nextstate(start=L.'U'); + D.Interfaces.DigitalOutput yy(start=L.'U'); + D.Delay.InertialDelaySensitive inertialDelaySensitive(tLH=tLH, tHL=tHL); algorithm nextstate := T.PRXferTable[enable, x]; yy := nextstate; @@ -6440,9 +6440,9 @@ UX: if dataIn == U then U else X annotation (Placement(transformation(extent={{80,-20},{100,0}}), iconTransformation(extent={{80,-20},{100,0}}))); protected - D.Interfaces.Logic nextstate(start=L.'U'); - D.Interfaces.DigitalOutput yy(start=L.'U'); - D.Delay.InertialDelaySensitive inertialDelaySensitive(tLH=tLH, tHL=tHL, y(start=L.'U', fixed=true)); + D.Interfaces.Logic nextstate(start=L.'U'); + D.Interfaces.DigitalOutput yy(start=L.'U'); + D.Delay.InertialDelaySensitive inertialDelaySensitive(tLH=tLH, tHL=tHL, y(start=L.'U', fixed=true)); algorithm nextstate := T.Buf3sTable[strength, T.UX01Conv[enable], T.UX01Conv[x]]; yy := nextstate; @@ -6519,9 +6519,9 @@ DataOut*: Strength map for DataOut according to tristate table Buf3sTable annotation (Placement(transformation(extent={{80,-20},{100,0}}), iconTransformation(extent={{80,-20},{100,0}}))); protected - D.Interfaces.Logic nextstate(start=L.'U'); - D.Interfaces.DigitalOutput yy(start=L.'U'); - D.Delay.InertialDelaySensitive inertialDelaySensitive(tLH=tLH, tHL=tHL); + D.Interfaces.Logic nextstate(start=L.'U'); + D.Interfaces.DigitalOutput yy(start=L.'U'); + D.Delay.InertialDelaySensitive inertialDelaySensitive(tLH=tLH, tHL=tHL); algorithm nextstate := T.Buf3slTable[strength, T.UX01Conv[enable], T.UX01Conv[x]]; yy := nextstate; @@ -6598,9 +6598,9 @@ DataOut*: Strength map for DataOut according to tristate table Buf3slTable annotation (Placement(transformation(extent={{80,-20},{100,0}}), iconTransformation(extent={{80,-20},{100,0}}))); protected - D.Interfaces.Logic nextstate(start=L.'U'); - D.Interfaces.DigitalOutput yy(start=L.'U'); - D.Delay.InertialDelaySensitive inertialDelaySensitive(tLH=tLH, tHL=tHL, y(start=L.'U',fixed=true)); + D.Interfaces.Logic nextstate(start=L.'U'); + D.Interfaces.DigitalOutput yy(start=L.'U'); + D.Delay.InertialDelaySensitive inertialDelaySensitive(tLH=tLH, tHL=tHL, y(start=L.'U',fixed=true)); algorithm nextstate := T.Buf3sTable[strength, T.UX01Conv[enable], T.UX01Conv[T.NotTable[x]]]; yy := nextstate; @@ -6682,9 +6682,9 @@ DataOut*: Strength map for DataOut according to tristate table Buf3sTable annotation (Placement(transformation(extent={{80,-20},{100,0}}), iconTransformation(extent={{80,-20},{100,0}}))); protected - D.Interfaces.Logic nextstate(start=L.'U'); - D.Interfaces.DigitalOutput yy(start=L.'U'); - D.Delay.InertialDelaySensitive inertialDelaySensitive(tLH=tLH, tHL=tHL); + D.Interfaces.Logic nextstate(start=L.'U'); + D.Interfaces.DigitalOutput yy(start=L.'U'); + D.Delay.InertialDelaySensitive inertialDelaySensitive(tLH=tLH, tHL=tHL); algorithm nextstate := T.Buf3sTable[strength, T.UX01Conv[T.NotTable[enable]], T.UX01Conv[T.NotTable[x]]]; yy := nextstate; @@ -7004,9 +7004,9 @@ Z = L.'Z' iconTransformation(extent={{80,-10},{100,10}}))); protected - D.Interfaces.Logic nextstate(start=L.'U'); - D.Interfaces.DigitalOutput yy(start=L.'U'); - D.Delay.InertialDelaySensitive inertialDelaySensitive(tLH=tLH, tHL=tHL, y(start=L.'U',fixed=true)); + D.Interfaces.Logic nextstate(start=L.'U'); + D.Interfaces.DigitalOutput yy(start=L.'U'); + D.Delay.InertialDelaySensitive inertialDelaySensitive(tLH=tLH, tHL=tHL, y(start=L.'U',fixed=true)); algorithm nextstate := T.MUX2x1Table[T.UX01Conv[in1], T.UX01Conv[sel], T.UX01Conv[in0]]; diff --git a/Modelica/Electrical/Machines/Examples/DCMachines/DCPM_CurrentControlled.mo b/Modelica/Electrical/Machines/Examples/DCMachines/DCPM_CurrentControlled.mo index 9a03793dc9..3b06bee359 100644 --- a/Modelica/Electrical/Machines/Examples/DCMachines/DCPM_CurrentControlled.mo +++ b/Modelica/Electrical/Machines/Examples/DCMachines/DCPM_CurrentControlled.mo @@ -90,8 +90,7 @@ equation connect(dcpm.flange, loadInertia.flange_a) annotation (Line( points={{20,-20},{40,-20}})); connect(dcpm.pin_an, ground.p) - annotation (Line(points={{4,-10},{4,0},{-8,0}}, - color={0,0,255})); + annotation (Line(points={{4,-10},{4,0},{-8,0}}, color={0,0,255})); connect(signalVoltage.p, currentSensor.p) annotation (Line(points={{20,30},{20,20}}, color={0,0,255})); connect(currentSensor.n, dcpm.pin_ap) diff --git a/Modelica/Electrical/Machines/Sensors/CurrentQuasiRMSSensor.mo b/Modelica/Electrical/Machines/Sensors/CurrentQuasiRMSSensor.mo index 7be025fa04..0f003d1a32 100644 --- a/Modelica/Electrical/Machines/Sensors/CurrentQuasiRMSSensor.mo +++ b/Modelica/Electrical/Machines/Sensors/CurrentQuasiRMSSensor.mo @@ -39,8 +39,7 @@ equation connect(ToSpacePhasor1.y, ToPolar1.u) annotation (Line( points={{0,-1},{0,-18}}, color={0,0,127})); connect(ToPolar1.y[1], Gain1.u) annotation (Line( - points={{0,-41},{0,-50.5},{0,-58}}, - color={0,0,127})); + points={{0,-41},{0,-50.5},{0,-58}}, color={0,0,127})); connect(Gain1.y, I) annotation (Line( points={{0,-81},{0,-110}}, color={0,0,127})); annotation (defaultComponentName="currentRMSSensor", diff --git a/Modelica/Electrical/PowerConverters/Examples/ACAC/SoftStarter.mo b/Modelica/Electrical/PowerConverters/Examples/ACAC/SoftStarter.mo index 7d15468838..aa2f6c7b22 100644 --- a/Modelica/Electrical/PowerConverters/Examples/ACAC/SoftStarter.mo +++ b/Modelica/Electrical/PowerConverters/Examples/ACAC/SoftStarter.mo @@ -151,8 +151,7 @@ equation connect(multiSensor.pc, multiSensor.pv) annotation (Line(points={{-10,40},{-10,50},{0,50}}, color={0,0,255})); connect(multiSensor.nv,star2. plug_p) - annotation (Line(points={{0,30},{0,10}}, - color={0,0,255})); + annotation (Line(points={{0,30},{0,10}}, color={0,0,255})); connect(terminalBox.plug_sn, imc.plug_sn) annotation (Line(points={{14,10},{14,10}}, color={0,0,255})); connect(terminalBox.plug_sp, imc.plug_sp) diff --git a/Modelica/Fluid/Pipes.mo b/Modelica/Fluid/Pipes.mo index 8f88e05545..6c3ac9adac 100644 --- a/Modelica/Fluid/Pipes.mo +++ b/Modelica/Fluid/Pipes.mo @@ -940,7 +940,7 @@ This also allows for taking into account friction losses with respect to the act // Assumptions parameter Boolean allowFlowReversal=system.allowFlowReversal - "= true, if flow reversal is enabled, otherwise restrict flow to design direction (states[1] -> states[n+1])" + "= true, if flow reversal is enabled, otherwise restrict flow to design direction (states[1] -> states[n+1])" annotation(Dialog(tab="Internal interface",enable=false,group="Assumptions"), Evaluate=true); parameter Modelica.Fluid.Types.Dynamics momentumDynamics=system.momentumDynamics "Formulation of momentum balance" diff --git a/Modelica/Math/isPowerOf2.mo b/Modelica/Math/isPowerOf2.mo index 30b9e5c835..ad2c53ae94 100644 --- a/Modelica/Math/isPowerOf2.mo +++ b/Modelica/Math/isPowerOf2.mo @@ -3,7 +3,7 @@ function isPowerOf2 "Determine if the integer input is a power of 2" extends Modelica.Icons.Function; input Integer i(min=1) "Integer scalar"; output Boolean result "= true, if integer scalar is a power of 2"; -protected +protected Integer target; Integer powOf2; algorithm diff --git a/Modelica/Media/Air/ReferenceAir.mo b/Modelica/Media/Air/ReferenceAir.mo index 89511e4b5f..eba53e9444 100644 --- a/Modelica/Media/Air/ReferenceAir.mo +++ b/Modelica/Media/Air/ReferenceAir.mo @@ -2149,4 +2149,4 @@ Some parts of this library refer to the ThermoFluid library developed at Lund Un Copyright © 2013-2020, Modelica Association and contributors

")); -end ReferenceAir; + end ReferenceAir; diff --git a/Modelica/Media/Air/ReferenceMoistAir.mo b/Modelica/Media/Air/ReferenceMoistAir.mo index fa8ae0f1df..c783b8c278 100644 --- a/Modelica/Media/Air/ReferenceMoistAir.mo +++ b/Modelica/Media/Air/ReferenceMoistAir.mo @@ -1859,7 +1859,7 @@ package ReferenceMoistAir rho := max(p/(g.R_s*T*g.pi*g.gpi), 1e-9); h_der := (1/rho - T*vt)*p_der - g.R_s*g.tau*g.tau*g.gtautau*T_der; end h_pT_der; - annotation (Documentation(info=" + annotation (Documentation(info="

This is a makeshift package avoiding the region validity checks of the IF97 utility functions BaseIF97.Basic.g2, diff --git a/Modelica/Media/IdealGases/Common/package.mo b/Modelica/Media/IdealGases/Common/package.mo index 38f64cf045..f1cc4e2b1e 100644 --- a/Modelica/Media/IdealGases/Common/package.mo +++ b/Modelica/Media/IdealGases/Common/package.mo @@ -147,7 +147,7 @@ Temperature T (= " + String(T) + " K) is not in the allowed range end setState_dTX; redeclare function extends setSmoothState - "Return thermodynamic state so that it smoothly approximates: if x > 0 then state_a else state_b" + "Return thermodynamic state so that it smoothly approximates: if x > 0 then state_a else state_b" algorithm state := ThermodynamicState(p=Media.Common.smoothStep(x, state_a.p, state_b.p, x_small), T=Media.Common.smoothStep(x, state_a.T, state_b.T, x_small)); @@ -687,7 +687,7 @@ required from medium model \"" + mediumName + "\"."); end setState_dTX; redeclare function extends setSmoothState - "Return thermodynamic state so that it smoothly approximates: if x > 0 then state_a else state_b" + "Return thermodynamic state so that it smoothly approximates: if x > 0 then state_a else state_b" algorithm state := ThermodynamicState(p=Media.Common.smoothStep(x, state_a.p, state_b.p, x_small), T=Media.Common.smoothStep(x, state_a.T, state_b.T, x_small), @@ -943,7 +943,7 @@ end gasMixtureViscosity; redeclare replaceable function extends dynamicViscosity "Return mixture dynamic viscosity" - protected + protected DynamicViscosity[nX] etaX "Component dynamic viscosities"; algorithm for i in 1:nX loop @@ -1206,7 +1206,7 @@ end lowPressureThermalConductivity; "Return thermal conductivity for low pressure gas mixtures" input Integer method=methodForThermalConductivity "Method to compute single component thermal conductivity"; - protected + protected ThermalConductivity[nX] lambdaX "Component thermal conductivities"; DynamicViscosity[nX] eta "Component thermal dynamic viscosities"; SpecificHeatCapacity[nX] cp "Component heat capacity"; diff --git a/Modelica/Media/package.mo b/Modelica/Media/package.mo index 4a2932585d..81515f5229 100644 --- a/Modelica/Media/package.mo +++ b/Modelica/Media/package.mo @@ -4544,7 +4544,7 @@ This function computes an isentropic state transformation: input ThermodynamicState state "Thermodynamic state record"; output MassFraction Xi[nXi] "Independent mass fractions"; end massFraction; - + type MassFlowRate = SI.MassFlowRate ( quantity="MassFlowRate." + mediumName, min=-1.0e5, diff --git a/Modelica/Thermal/FluidHeatFlow/Examples/ParallelCooling.mo b/Modelica/Thermal/FluidHeatFlow/Examples/ParallelCooling.mo index 062453a81e..51217d1442 100644 --- a/Modelica/Thermal/FluidHeatFlow/Examples/ParallelCooling.mo +++ b/Modelica/Thermal/FluidHeatFlow/Examples/ParallelCooling.mo @@ -9,7 +9,7 @@ model ParallelCooling "Cooling circuit with parallel branches" output SI.TemperatureDifference dTSource1= prescribedHeatFlow1.port.T-TAmb "Temperature difference between heat source 1 and ambient condition"; output SI.TemperatureDifference dTtoPipe1=prescribedHeatFlow1.port.T-pipe1.T_q - "Temperature difference between heat source 1 and coolant in pipe 1"; + "Temperature difference between heat source 1 and coolant in pipe 1"; output SI.TemperatureDifference dTCoolant1=pipe1.dT "Coolant1's temperature increase in pipe 1"; output SI.TemperatureDifference dTSource2= diff --git a/Modelica/Thermal/FluidHeatFlow/Sensors/RelTemperatureSensor.mo b/Modelica/Thermal/FluidHeatFlow/Sensors/RelTemperatureSensor.mo index 590ce346fb..8a3c22eb27 100644 --- a/Modelica/Thermal/FluidHeatFlow/Sensors/RelTemperatureSensor.mo +++ b/Modelica/Thermal/FluidHeatFlow/Sensors/RelTemperatureSensor.mo @@ -4,7 +4,7 @@ model RelTemperatureSensor "Temperature difference sensor" extends FluidHeatFlow.Interfaces.RelativeSensorBase; Modelica.Blocks.Interfaces.RealOutput y(unit="K") "Temperature difference as output signal" - annotation (absoluteValue = false, Placement(transformation( + annotation (absoluteValue = false, Placement(transformation( origin={0,-110}, extent={{10,-10},{-10,10}}, rotation=90))); diff --git a/Modelica/Utilities/Streams.mo b/Modelica/Utilities/Streams.mo index d6bac5d591..ceed866f44 100644 --- a/Modelica/Utilities/Streams.mo +++ b/Modelica/Utilities/Streams.mo @@ -211,8 +211,7 @@ See Ex output Real matrix[nrow, ncol] "2D Real array"; external "C" ModelicaIO_readRealMatrix(fileName, matrixName, matrix, size(matrix, 1), size(matrix, 2), verboseRead) annotation(IncludeDirectory="modelica://Modelica/Resources/C-Sources", Include="#include \"ModelicaIO.h\"", Library={"ModelicaIO", "ModelicaMatIO", "zlib"}); - annotation( -Documentation(info=" + annotation(Documentation(info="

Syntax

 matrix = Streams.readRealMatrix(fileName, matrixName, nrow, ncol, verboseRead)
diff --git a/Modelica/package.mo b/Modelica/package.mo
index c44e2f4de8..f2ecdeb40c 100644
--- a/Modelica/package.mo
+++ b/Modelica/package.mo
@@ -1300,6 +1300,49 @@ be defined like:
       tab=\"Controller\",
       group=\"Speed control\"));
 
+ +

Whitespace and Indentation

+

+Trailing white-space (i.e., white-space at the end of the lines) shall not be used. +The tab-character shall not be used, since the tab-stops are not standardized. +

+

+The code in a class shall be indented relative to the class in steps of two spaces; +except that the headings public, protected, equation, +algorithm, and end of class marker shall not be indented. +The keywords public and protected are headings for a group +of declarations. +

+

+Long modifier lists shall be split into several indented lines with at most one modifier per line. +

+

+Full class definitions shall be separated by an empty line. +

+ +
Example
+ +
+package MyPackage
+  partial model BaseModel
+    parameter Real p;
+    input Real u(unit=\"m/s\");
+  protected
+    Real y;
+    Real x(
+      start=1,
+      unit=\"m\",
+      nominal=10);
+  equation
+    der(x) = u;
+    y = 2*x;
+  end BaseModel;
+
+  model ModelP2
+    extends BaseModel(p=2);
+  end ModelP2;
+end MyPackage;
+
")); end Format; diff --git a/ModelicaTest/Electrical/QuasiStatic/Polyphase.mo b/ModelicaTest/Electrical/QuasiStatic/Polyphase.mo index 76b907914d..6ad080eece 100644 --- a/ModelicaTest/Electrical/QuasiStatic/Polyphase.mo +++ b/ModelicaTest/Electrical/QuasiStatic/Polyphase.mo @@ -14,26 +14,19 @@ package Polyphase "Polyphase quasi-static package" annotation (Placement(transformation(extent={{-90,20},{-70,40}}))); Modelica.Electrical.QuasiStatic.Polyphase.Basic.Admittance admittance(Y_ref=fill(Complex(0.5,0.5),m), m=m) annotation (Placement(transformation(extent={{-60,20},{-40,40}}))); - Modelica.Electrical.QuasiStatic.Polyphase.Basic.VariableResistor variableResistor(m=m) - annotation (Placement(transformation(extent={{-30,20},{-10,40}}))); - Modelica.Electrical.QuasiStatic.Polyphase.Basic.VariableConductor variableConductor(m=m) - annotation (Placement(transformation(extent={{0,20},{20,40}}))); - Modelica.Electrical.QuasiStatic.Polyphase.Basic.Conductor conductor(G_ref=fill(1,m), m=m) - annotation (Placement(transformation( + Modelica.Electrical.QuasiStatic.Polyphase.Basic.VariableResistor variableResistor(m=m) annotation (Placement(transformation(extent={{-30,20},{-10,40}}))); + Modelica.Electrical.QuasiStatic.Polyphase.Basic.VariableConductor variableConductor(m=m) annotation (Placement(transformation(extent={{0,20},{20,40}}))); + Modelica.Electrical.QuasiStatic.Polyphase.Basic.Conductor conductor(G_ref=fill(1,m), m=m) annotation (Placement(transformation( extent={{-10,-10},{10,10}}, rotation=90, origin={-90,10}))); - Modelica.Electrical.QuasiStatic.Polyphase.Basic.VariableCapacitor variableCapacitor(m=m) - annotation (Placement(transformation(extent={{30,20},{50,40}}))); - Modelica.Electrical.QuasiStatic.Polyphase.Basic.VariableInductor variableInductor(m=m) - annotation (Placement(transformation(extent={{60,20},{80,40}}))); - Modelica.Electrical.QuasiStatic.Polyphase.Basic.VariableImpedance variableImpedance(m=m) - annotation (Placement(transformation( + Modelica.Electrical.QuasiStatic.Polyphase.Basic.VariableCapacitor variableCapacitor(m=m) annotation (Placement(transformation(extent={{30,20},{50,40}}))); + Modelica.Electrical.QuasiStatic.Polyphase.Basic.VariableInductor variableInductor(m=m) annotation (Placement(transformation(extent={{60,20},{80,40}}))); + Modelica.Electrical.QuasiStatic.Polyphase.Basic.VariableImpedance variableImpedance(m=m) annotation (Placement(transformation( extent={{-10,-10},{10,10}}, rotation=180, origin={70,-40}))); - Modelica.Electrical.QuasiStatic.Polyphase.Basic.VariableAdmittance variableAdmittance(m=m) - annotation (Placement(transformation( + Modelica.Electrical.QuasiStatic.Polyphase.Basic.VariableAdmittance variableAdmittance(m=m) annotation (Placement(transformation( extent={{-10,-10},{10,10}}, rotation=180, origin={40,-40}))); @@ -54,8 +47,7 @@ package Polyphase "Polyphase quasi-static package" duration=1, offset=10, startTime=0) annotation (Placement(transformation(extent={{-100,-30},{-80,-10}}))); - Modelica.Electrical.QuasiStatic.Polyphase.Basic.Star star(m=m) - annotation (Placement(transformation( + Modelica.Electrical.QuasiStatic.Polyphase.Basic.Star star(m=m) annotation (Placement(transformation( extent={{10,-10},{-10,10}}, rotation=90, origin={-50,-60}))); @@ -94,16 +86,14 @@ package Polyphase "Polyphase quasi-static package" extends Modelica.Icons.Example; parameter Integer m = 3 "Number of phases" annotation(Evaluate=true); output SI.ComplexCurrent I[m] = currentSensor.i "Current"; - Modelica.Electrical.QuasiStatic.Polyphase.Ideal.Idle idle(m=m) - annotation (Placement(transformation( + Modelica.Electrical.QuasiStatic.Polyphase.Ideal.Idle idle(m=m) annotation (Placement(transformation( extent={{-10,-10},{10,10}}, rotation=270, origin={-50,10}))); - Modelica.Electrical.QuasiStatic.Polyphase.Ideal.Short short(m=m) - annotation (Placement(transformation(extent={{-80,20},{-60,40}}))); + Modelica.Electrical.QuasiStatic.Polyphase.Ideal.Short short(m=m) annotation (Placement(transformation(extent={{-80,20},{-60,40}}))); Modelica.Electrical.QuasiStatic.Polyphase.Ideal.IdealCommutingSwitch idealCommutingSwitch(m=m, Ron=fill(1E-5, m), - Goff=fill(1E-5, m)) annotation (Placement(transformation(extent={{30,20},{50,40}}))); + Goff=fill(1E-5, m)) annotation (Placement(transformation(extent={{30,20},{50,40}}))); Modelica.Electrical.QuasiStatic.Polyphase.Ideal.IdealIntermediateSwitch idealIntermediateSwitch(m=m, Ron=fill(1E-5, m), Goff=fill(1E-5, m)) annotation (Placement(transformation(extent={{60,20},{80,40}}))); @@ -163,8 +153,7 @@ package Polyphase "Polyphase quasi-static package" Modelica.ComplexBlocks.Sources.ComplexConstant const_admittance[m](k=fill(Complex(0.5, 0.5), m)) annotation (Placement(transformation(extent={{-60,-50},{-40,-30}}))); Modelica.ComplexBlocks.Sources.ComplexConstant const_impedance[m](k=fill(Complex(2, 2), m)) annotation (Placement(transformation(extent={{-30,-70},{-10,-50}}))); Modelica.Electrical.QuasiStatic.Polyphase.Sensors.CurrentSensor currentSensor annotation (Placement(transformation(extent={{-60,-30},{-80,-10}}))); - Modelica.Electrical.QuasiStatic.Polyphase.Basic.Star star(m=m) - annotation (Placement(transformation( + Modelica.Electrical.QuasiStatic.Polyphase.Basic.Star star(m=m) annotation (Placement(transformation( extent={{-10,-10},{10,10}}, rotation=270, origin={-90,-40}))); @@ -226,8 +215,7 @@ package Polyphase "Polyphase quasi-static package" fStart=0.01, fStop=100) annotation (Placement(transformation(extent={{-20,-60},{-40,-40}}))); Modelica.Electrical.QuasiStatic.Polyphase.Basic.Capacitor capacitor(C=fill(1, 3)) annotation (Placement(transformation(extent={{-40,-30},{-20,-10}}))); - Modelica.Electrical.QuasiStatic.Polyphase.Basic.Star starI - annotation (Placement(transformation(extent={{-20,-90},{-40,-70}}))); + Modelica.Electrical.QuasiStatic.Polyphase.Basic.Star starI annotation (Placement(transformation(extent={{-20,-90},{-40,-70}}))); Modelica.Electrical.QuasiStatic.SinglePhase.Basic.Ground groundI annotation (Placement(transformation(extent={{-70,-100},{-50,-80}}))); equation connect(voltageSource.plug_p, inductor.plug_p) annotation (Line(points={{-40,50},{-50,50},{-50,80},{-40,80}}, color={85,170,255})); diff --git a/ModelicaTest/Fluid/Dissipation.mo b/ModelicaTest/Fluid/Dissipation.mo index d36dff61a3..1288152bf9 100644 --- a/ModelicaTest/Fluid/Dissipation.mo +++ b/ModelicaTest/Fluid/Dissipation.mo @@ -1397,10 +1397,8 @@ extends Modelica.Icons.ExamplesPackage; annotation (Placement(transformation(extent={{40,-20},{60,0}}))); //output variables - SI.MassFlowRate m_flow[n] "Mass flow rate" - annotation (Dialog(group="Output")); - SI.NusseltNumber Nu[n] "Nusselt number" - annotation (Dialog(group="Output")); + SI.MassFlowRate m_flow[n] "Mass flow rate" annotation (Dialog(group="Output")); + SI.NusseltNumber Nu[n] "Nusselt number" annotation (Dialog(group="Output")); public Modelica.Blocks.Sources.Ramp input_Re( @@ -1660,10 +1658,8 @@ extends Modelica.Icons.ExamplesPackage; annotation (Placement(transformation(extent={{40,-20},{60,0}}))); //output variables - SI.MassFlowRate m_flow[n] "Mass flow rate" - annotation (Dialog(group="Output")); - SI.NusseltNumber Nu[n] "Nusselt number" - annotation (Dialog(group="Output")); + SI.MassFlowRate m_flow[n] "Mass flow rate" annotation (Dialog(group="Output")); + SI.NusseltNumber Nu[n] "Nusselt number" annotation (Dialog(group="Output")); public Modelica.Blocks.Sources.Ramp input_Re( @@ -5857,8 +5853,7 @@ extends Modelica.Icons.ExamplesPackage; SI.Length K[1]={0} "Roughness (average height of surface asperities)" annotation (Dialog(group="Straight pipe")); - SI.Length L=1 "Length" - annotation (Dialog(group="Straight pipe")); + SI.Length L=1 "Length" annotation (Dialog(group="Straight pipe")); //fluid property variables SI.DynamicViscosity eta=1e-3 @@ -5975,8 +5970,7 @@ extends Modelica.Icons.ExamplesPackage; SI.Length K[4]={0,2e-4*d_hyd,2e-3*d_hyd,2e-2*d_hyd} "Roughness (average height of surface asperities)" annotation (Dialog(group="Straight pipe")); - SI.Length L=1 "Length" - annotation (Dialog(group="Straight pipe")); + SI.Length L=1 "Length" annotation (Dialog(group="Straight pipe")); //fluid property variables SI.DynamicViscosity eta=1e-3 @@ -6105,8 +6099,7 @@ extends Modelica.Icons.ExamplesPackage; SI.Length K[4]={0,2e-4*d_hyd,2e-3*d_hyd,2e-2*d_hyd} "Roughness (average height of surface asperities)" annotation (Dialog(group="Straight pipe")); - SI.Length L=1 "Length" - annotation (Dialog(group="Straight pipe")); + SI.Length L=1 "Length" annotation (Dialog(group="Straight pipe")); //fluid property variables SI.DynamicViscosity eta=1e-3 diff --git a/ModelicaTest/Fluid/TestComponents/NewFittings.mo b/ModelicaTest/Fluid/TestComponents/NewFittings.mo index 659ddaa91d..efc3c96e7c 100644 --- a/ModelicaTest/Fluid/TestComponents/NewFittings.mo +++ b/ModelicaTest/Fluid/TestComponents/NewFittings.mo @@ -100,8 +100,7 @@ This model executes pressure loss calculations out of the Fluid.Dissipa model ThickEdgedOrifice extends Modelica.Icons.Example; parameter - Modelica.Fluid.Fittings.BaseClasses.Orifices.ThickEdgedOrifice.Geometry - geometry= + Modelica.Fluid.Fittings.BaseClasses.Orifices.ThickEdgedOrifice.Geometry geometry= Modelica.Fluid.Fittings.BaseClasses.Orifices.ThickEdgedOrifice.Choices.circular(diameter=0.1, venaDiameter=0.01, venaLength=0.001) annotation (Placement(transformation(extent={{12,72},{32,92}}))); extends ModelicaTest.Fluid.TestComponents.NewFittings.PartialFittingTest( redeclare model FittingComponent = diff --git a/ModelicaTest/Math.mo b/ModelicaTest/Math.mo index dce3dc1d95..26d07b7cc9 100644 --- a/ModelicaTest/Math.mo +++ b/ModelicaTest/Math.mo @@ -762,7 +762,7 @@ extends Modelica.Icons.ExamplesPackage; model TestMatricesExamplesSolveLinearEquations extends Modelica.Icons.Example; - equation + equation Modelica.Math.Matrices.Examples.solveLinearEquations(); annotation (experiment(StopTime=0)); end TestMatricesExamplesSolveLinearEquations; @@ -828,9 +828,9 @@ extends Modelica.Icons.ExamplesPackage; Real x, y, xIntegrated; Integer i; parameter Real p=1 "So that the variable is integrated"; - initial equation + initial equation xIntegrated=x; - equation + equation (x,i)=Modelica.Math.Vectors.interpolate(tabx, taby, time); y=der(x); der(xIntegrated)=p*y; diff --git a/ModelicaTest/Tables/CombiTable2Ds.mo b/ModelicaTest/Tables/CombiTable2Ds.mo index 043309a21d..c4673691e3 100644 --- a/ModelicaTest/Tables/CombiTable2Ds.mo +++ b/ModelicaTest/Tables/CombiTable2Ds.mo @@ -535,7 +535,7 @@ double mydummyfunc(double dummy_in) { Modelica.Blocks.Tables.CombiTable2Ds combiTable2DT( table=transpose([1,0,6;2,4,4;3,9,9;4,16,16]), smoothness=Modelica.Blocks.Types.Smoothness.ConstantSegments) annotation(Placement(transformation(extent={{-95,-60},{-75,-40}}))); - equation + equation connect(combiTable1D.u,clock1.y) annotation(Line( points={{-97,10},{-102,10},{-104,10},{-104,75},{-109,75}}, color={0,0,127}, @@ -593,7 +593,7 @@ double mydummyfunc(double dummy_in) { Modelica.Blocks.Continuous.Der der3 annotation(Placement(transformation(extent={{-60,0},{-40,20}}))); Modelica.Blocks.Continuous.Der der4 annotation(Placement(transformation(extent={{-60,-30},{-40,-10}}))); Modelica.Blocks.Continuous.Der der5 annotation(Placement(transformation(extent={{-60,-60},{-40,-40}}))); - equation + equation connect(combiTable1D.u,clock1.y) annotation(Line( points={{-97,10},{-102,10},{-104,10},{-104,75},{-109,75}}, color={0,0,127}, @@ -676,7 +676,7 @@ double mydummyfunc(double dummy_in) { Modelica.Blocks.Continuous.Der der3 annotation(Placement(transformation(extent={{-60,0},{-40,20}}))); Modelica.Blocks.Continuous.Der der4 annotation(Placement(transformation(extent={{-60,-30},{-40,-10}}))); Modelica.Blocks.Continuous.Der der5 annotation(Placement(transformation(extent={{-60,-60},{-40,-40}}))); - equation + equation connect(combiTable1D.u,clock1.y) annotation(Line( points={{-97,10},{-102,10},{-104,10},{-104,75},{-109,75}}, color={0,0,127}, @@ -772,7 +772,7 @@ double mydummyfunc(double dummy_in) { phase=Modelica.Constants.pi/2, offset=18) annotation(Placement(transformation(extent={{-130,-10},{-110,10}}))); Modelica.Blocks.Sources.Constant const_L(k=82) annotation(Placement(transformation(extent={{-130,-45},{-110,-25}}))); - equation + equation connect(der_1R.u,combiTable2D_1R.y) annotation(Line( points={{-32,65},{-37,65},{-44,65},{-49,65}}, color={0,0,127}, @@ -888,7 +888,7 @@ double mydummyfunc(double dummy_in) { f=1/3, offset=82, startTime=1) annotation(Placement(transformation(extent={{-130,-45},{-110,-25}}))); - equation + equation connect(der_1R.u,combiTable2D_1R.y) annotation(Line( points={{-32,65},{-37,65},{-44,65},{-49,65}}, color={0,0,127}, diff --git a/ModelicaTest/Tables/CombiTable2Dv.mo b/ModelicaTest/Tables/CombiTable2Dv.mo index 82b9255e6e..b91496f85e 100644 --- a/ModelicaTest/Tables/CombiTable2Dv.mo +++ b/ModelicaTest/Tables/CombiTable2Dv.mo @@ -1003,7 +1003,7 @@ double mydummyfunc(double dummy_in) { -70}))); Modelica.Blocks.Continuous.Der der3 annotation (Placement(transformation(extent={{-10,-10},{10,10}}, origin={30,-70}))); - equation + equation connect(combiTable2Dv.y[2], der2.u) annotation (Line(points={{44,40},{72,40},{72,30},{78,30}}, color={0,0,127})); @@ -1038,5 +1038,5 @@ double mydummyfunc(double dummy_in) { experiment( StartTime=-1, StopTime=4)); - end OneSidedDerivative2D; + end OneSidedDerivative2D; end CombiTable2Dv; diff --git a/ModelicaTest/Tables/CombiTimeTable.mo b/ModelicaTest/Tables/CombiTimeTable.mo index 5840540f22..13768e1465 100644 --- a/ModelicaTest/Tables/CombiTimeTable.mo +++ b/ModelicaTest/Tables/CombiTimeTable.mo @@ -927,7 +927,7 @@ double mydummyfunc(double* dummy_in) { smoothness=Modelica.Blocks.Types.Smoothness.ContinuousDerivative) annotation(Placement(transformation(extent={{-40,-30},{-20,-10}}))); Modelica.Blocks.Continuous.Der d_t_new_2 annotation(Placement(transformation(extent={{0,-30},{20,-10}}))); Modelica.Blocks.Continuous.Der d2_t_new_2 annotation(Placement(transformation(extent={{40,-30},{60,-10}}))); - equation + equation connect(t_new_2.y[1], d_t_new_2.u) annotation(Line(points={{-19,-20},{-2,-20}}, color={0,0,127})); connect(d_t_new_2.y, d2_t_new_2.u) annotation(Line(points={{21,-20},{26,-20},{33,-20},{38,-20}}, color={0,0,127})); annotation (experiment(StartTime=0, StopTime=4)); @@ -943,7 +943,7 @@ double mydummyfunc(double* dummy_in) { smoothness=Modelica.Blocks.Types.Smoothness.ContinuousDerivative) annotation(Placement(transformation(extent={{-40,-30},{-20,-10}}))); Modelica.Blocks.Continuous.Der d_t_new_2 annotation(Placement(transformation(extent={{0,-30},{20,-10}}))); Modelica.Blocks.Continuous.Der d2_t_new_2 annotation(Placement(transformation(extent={{40,-30},{60,-10}}))); - equation + equation connect(t_new_2.y[1], d_t_new_2.u) annotation(Line(points={{-19,-20},{-2,-20}}, color={0,0,127})); connect(d_t_new_2.y, d2_t_new_2.u) annotation(Line(points={{21,-20},{26,-20},{33,-20},{38,-20}}, color={0,0,127})); annotation (experiment(StartTime=0, StopTime=15)); @@ -959,7 +959,7 @@ double mydummyfunc(double* dummy_in) { smoothness=Modelica.Blocks.Types.Smoothness.ContinuousDerivative) annotation(Placement(transformation(extent={{-40,-30},{-20,-10}}))); Modelica.Blocks.Continuous.Der d_t_new_2 annotation(Placement(transformation(extent={{0,-30},{20,-10}}))); Modelica.Blocks.Continuous.Der d2_t_new_2 annotation(Placement(transformation(extent={{40,-30},{60,-10}}))); - equation + equation connect(t_new_2.y[1], d_t_new_2.u) annotation(Line(points={{-19,-20},{-2,-20}}, color={0,0,127})); connect(d_t_new_2.y, d2_t_new_2.u) annotation(Line(points={{21,-20},{26,-20},{33,-20},{38,-20}}, color={0,0,127})); annotation (experiment(StartTime=7.99, StopTime=20)); @@ -983,7 +983,7 @@ double mydummyfunc(double* dummy_in) { smoothness=Modelica.Blocks.Types.Smoothness.ContinuousDerivative) annotation(Placement(transformation(extent={{-40,-30},{-20,-10}}))); Modelica.Blocks.Continuous.Der d_t_new_2 annotation(Placement(transformation(extent={{0,-30},{20,-10}}))); Modelica.Blocks.Continuous.Der d2_t_new_2 annotation(Placement(transformation(extent={{40,-30},{60,-10}}))); - equation + equation connect(t_new_2.y[1], d_t_new_2.u) annotation(Line(points={{-19,-20},{-2,-20}}, color={0,0,127})); connect(d_t_new_2.y, d2_t_new_2.u) annotation(Line(points={{21,-20},{26,-20},{33,-20},{38,-20}}, color={0,0,127})); annotation (experiment(StartTime=0, StopTime=4)); @@ -999,7 +999,7 @@ double mydummyfunc(double* dummy_in) { smoothness=Modelica.Blocks.Types.Smoothness.ContinuousDerivative) annotation(Placement(transformation(extent={{-40,-30},{-20,-10}}))); Modelica.Blocks.Continuous.Der d_t_new_2 annotation(Placement(transformation(extent={{0,-30},{20,-10}}))); Modelica.Blocks.Continuous.Der d2_t_new_2 annotation(Placement(transformation(extent={{40,-30},{60,-10}}))); - equation + equation connect(t_new_2.y[1], d_t_new_2.u) annotation(Line(points={{-19,-20},{-2,-20}}, color={0,0,127})); connect(d_t_new_2.y, d2_t_new_2.u) annotation(Line(points={{21,-20},{26,-20},{33,-20},{38,-20}}, color={0,0,127})); annotation (experiment(StartTime=0, StopTime=15)); @@ -1015,7 +1015,7 @@ double mydummyfunc(double* dummy_in) { smoothness=Modelica.Blocks.Types.Smoothness.ContinuousDerivative) annotation(Placement(transformation(extent={{-40,-30},{-20,-10}}))); Modelica.Blocks.Continuous.Der d_t_new_2 annotation(Placement(transformation(extent={{0,-30},{20,-10}}))); Modelica.Blocks.Continuous.Der d2_t_new_2 annotation(Placement(transformation(extent={{40,-30},{60,-10}}))); - equation + equation connect(t_new_2.y[1], d_t_new_2.u) annotation(Line(points={{-19,-20},{-2,-20}}, color={0,0,127})); connect(d_t_new_2.y, d2_t_new_2.u) annotation(Line(points={{21,-20},{26,-20},{33,-20},{38,-20}}, color={0,0,127})); annotation (experiment(StartTime=7.99, StopTime=20)); @@ -1118,7 +1118,7 @@ double mydummyfunc(double* dummy_in) { Modelica.Blocks.Continuous.Der d2_t_new_3 annotation(Placement(transformation(extent={{40,-60},{60,-40}}))); Modelica.Blocks.Continuous.Der d_t_new_4 annotation(Placement(transformation(extent={{0,-90},{20,-70}}))); Modelica.Blocks.Continuous.Der d2_t_new_4 annotation(Placement(transformation(extent={{40,-90},{60,-70}}))); - equation + equation connect(t_new_2.y[1], d_t_new_2.u) annotation(Line(points={{-19,-20},{-2,-20}}, color={0,0,127})); connect(d_t_new_2.y, d2_t_new_2.u) annotation(Line(points={{21,-20},{26,-20},{33,-20},{38,-20}}, color={0,0,127})); connect(d_t_new_3.y,d2_t_new_3.u) annotation(Line(points={{21,-50},{26,-50},{33,-50},{38,-50}}, color={0,0,127})); @@ -1149,7 +1149,7 @@ double mydummyfunc(double* dummy_in) { Modelica.Blocks.Continuous.Der d2_t_new_3 annotation(Placement(transformation(extent={{40,-60},{60,-40}}))); Modelica.Blocks.Continuous.Der d_t_new_4 annotation(Placement(transformation(extent={{0,-90},{20,-70}}))); Modelica.Blocks.Continuous.Der d2_t_new_4 annotation(Placement(transformation(extent={{40,-90},{60,-70}}))); - equation + equation connect(t_new_2.y[1], d_t_new_2.u) annotation(Line(points={{-19,-20},{-2,-20}}, color={0,0,127})); connect(d_t_new_2.y, d2_t_new_2.u) annotation(Line(points={{21,-20},{26,-20},{33,-20},{38,-20}}, color={0,0,127})); connect(d_t_new_3.y,d2_t_new_3.u) annotation(Line(points={{21,-50},{26,-50},{33,-50},{38,-50}}, color={0,0,127}));