Skip to content

Commit

Permalink
Remove weird line-breaks and format equation consistently.
Browse files Browse the repository at this point in the history
  • Loading branch information
HansOlsson committed Jan 11, 2024
1 parent 79005b5 commit 179e969
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 58 deletions.
36 changes: 12 additions & 24 deletions ModelicaTest/Electrical/QuasiStatic/Polyphase.mo
Original file line number Diff line number Diff line change
Expand Up @@ -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})));
Expand All @@ -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})));
Expand Down Expand Up @@ -94,13 +86,11 @@ 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}})));
Expand Down Expand Up @@ -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})));
Expand Down Expand Up @@ -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}));
Expand Down
21 changes: 7 additions & 14 deletions ModelicaTest/Fluid/Dissipation.mo
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions ModelicaTest/Fluid/TestComponents/NewFittings.mo
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,7 @@ This model executes pressure loss calculations out of the <strong> 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 =
Expand Down
6 changes: 3 additions & 3 deletions ModelicaTest/Math.mo
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
10 changes: 5 additions & 5 deletions ModelicaTest/Tables/CombiTable2Ds.mo
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down Expand Up @@ -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},
Expand Down Expand Up @@ -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},
Expand Down Expand Up @@ -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},
Expand Down Expand Up @@ -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},
Expand Down
4 changes: 2 additions & 2 deletions ModelicaTest/Tables/CombiTable2Dv.mo
Original file line number Diff line number Diff line change
Expand Up @@ -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}));
Expand Down Expand Up @@ -1038,5 +1038,5 @@ double mydummyfunc(double dummy_in) {
experiment(
StartTime=-1,
StopTime=4));
end OneSidedDerivative2D;
end OneSidedDerivative2D;
end CombiTable2Dv;

0 comments on commit 179e969

Please sign in to comment.