Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/Formatting' into Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
HansOlsson committed Dec 14, 2023
2 parents 5b6d6f9 + 19d926d commit d4cb1d4
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 34 deletions.
28 changes: 13 additions & 15 deletions Modelica/Electrical/Digital.mo
Original file line number Diff line number Diff line change
Expand Up @@ -1165,7 +1165,7 @@ sum <strong>Adder4</strong>.c_out <strong>Adder4.s</strong> <strong>Adder3.s
points={{-58,2},{-34,2},{-34,24.55},{-5.3,24.55}}, color={127,0,127}));
annotation (experiment(StopTime=400),
Documentation(info="<html>
<p>This example is a simple and incomplete test of a single DLATRAM component . After simulation until 400 s plot dLATRAM.addr[1], dLATRAM.addr[2], and dLATRAM.dataOUT[1], dLATRAM.dataOut[2]. The address inputs are prescribed with all possible combinations of logic values. It can be checked in which cases of address values the output is 'X' or '0'.</p>
<p>This example is a simple and incomplete test of a single DLATRAM component. After simulation until 400 s plot dLATRAM.addr[1], dLATRAM.addr[2], and dLATRAM.dataOUT[1], dLATRAM.dataOut[2]. The address inputs are prescribed with all possible combinations of logic values. It can be checked in which cases of address values the output is 'X' or '0'.</p>
</html>"));
end RAM;

Expand Down Expand Up @@ -1312,7 +1312,7 @@ sum <strong>Adder4</strong>.c_out <strong>Adder4.s</strong> <strong>Adder3.s
extent={{90,60},{110,80}})));
D.Interfaces.DigitalOutput qn annotation (Placement(transformation(
extent={{90,-80},{110,-60}})));
D.Delay.TransportDelay TD1(delayTime=delayTime,y0=q0)
D.Delay.TransportDelay TD1(final delayTime=delayTime, final y0=q0)
annotation (Placement(transformation(extent={{-60,-64},{-40,-44}})));
equation
connect(s, Nor1.x[2]) annotation (Line(points={{-100,70},{-32,70}}, color={127,0,127}));
Expand Down Expand Up @@ -1379,19 +1379,17 @@ sum <strong>Adder4</strong>.c_out <strong>Adder4.s</strong> <strong>Adder3.s
annotation (Placement(transformation(extent={{90,-80},{110,-60}})));
D.Interfaces.DigitalInput clk annotation (Placement(transformation(
extent={{-110,-10},{-90,10}})));
D.Examples.Utilities.RS RS1(delayTime=delayTime,q0=q0)
D.Examples.Utilities.RS RS1(final delayTime=delayTime, final q0=q0)
annotation (Placement(transformation(
extent={{-10,-40},{70,40}})));
D.Basic.And And1 annotation (Placement(transformation(extent={{-70,
8},{-30,48}})));
D.Basic.And And2 annotation (Placement(transformation(extent={{-70,
-48},{-30,-8}})));
equation
connect(And2.y, RS1.r)
annotation (Line(
connect(And2.y, RS1.r) annotation (Line(
points={{-30,-28},{-10,-28}}, color={127,0,127}));
connect(And1.y, RS1.s)
annotation (Line(
connect(And1.y, RS1.s) annotation (Line(
points={{-30,28},{-10,28}}, color={127,0,127}));
connect(s, And1.x[2]) annotation (Line(
points={{-100,70},{-70,70},{-70,36},{-62,36}}, color={127,0,127}));
Expand All @@ -1407,7 +1405,7 @@ sum <strong>Adder4</strong>.c_out <strong>Adder4.s</strong> <strong>Adder3.s
points={{70,-28},{80,-28},{80,-70},{100,-70}}, color={127,0,127}));
annotation (
Documentation(info="<html>
<p>Basing on the RS component RSFF is a RS (set-reset) flipflop composed according the schematic. Its parameter delayTime is the delay time of the RS component transport delay, q0 is the initial value of that delay.</p>
<p>Basing on the <a href=\"modelica://Modelica.Electrical.Digital.Examples.Utilities.RS\">RS</a> component RSFF is a RS (set-reset) flipflop composed according to the schematic. Its parameter delayTime is the delay time of the RS component transport delay, q0 is the initial value of that delay.</p>
</html>"), Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},
{100,100}}), graphics={
Rectangle(
Expand Down Expand Up @@ -1447,8 +1445,8 @@ sum <strong>Adder4</strong>.c_out <strong>Adder4.s</strong> <strong>Adder3.s
import D = Modelica.Electrical.Digital;
import L = Modelica.Electrical.Digital.Interfaces.Logic;

parameter SI.Time Tdel=0.01 "Delay time";
parameter L QInit=L.'U' "Initial value";
parameter SI.Time delayTime=0.01 "Delay time";
parameter L q0=L.'U' "Initial value";
D.Interfaces.DigitalInput d annotation (Placement(transformation(extent=
{{-110,60},{-90,80}})));
D.Interfaces.DigitalOutput q annotation (Placement(transformation(extent=
Expand All @@ -1457,7 +1455,7 @@ sum <strong>Adder4</strong>.c_out <strong>Adder4.s</strong> <strong>Adder3.s
annotation (Placement(transformation(extent={{90,-80},{110,-60}})));
D.Interfaces.DigitalInput clk annotation (Placement(transformation(
extent={{-110,-10},{-90,10}})));
D.Examples.Utilities.RSFF RSFF1 annotation (Placement(transformation(
D.Examples.Utilities.RSFF RSFF1(final delayTime=delayTime, final q0=q0) annotation (Placement(transformation(
extent={{-10,-40},{70,40}})));
D.Basic.Not Not1 annotation (Placement(transformation(extent={{-70,
-48},{-30,-8}})));
Expand All @@ -1479,7 +1477,7 @@ sum <strong>Adder4</strong>.c_out <strong>Adder4.s</strong> <strong>Adder3.s
points={{-100,0},{-10,0}}, color={127,0,127}));
annotation (
Documentation(info="<html>
<p>Basing on the RS component DFF is a D flipflop composed according the schematic. Its parameter delayTime is the delay time of the RS component transport delay, q0 is the initial value of that delay.</p>
<p>Basing on the <a href=\"modelica://Modelica.Electrical.Digital.Examples.Utilities.RS\">RS</a> component DFF is a D flipflop composed according to the schematic. Its parameter delayTime is the delay time of the RS component transport delay, q0 is the initial value of that delay.</p>
</html>"), Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},
{100,100}}), graphics={
Rectangle(
Expand Down Expand Up @@ -1528,10 +1526,10 @@ sum <strong>Adder4</strong>.c_out <strong>Adder4.s</strong> <strong>Adder3.s
extent={{-110,-10},{-90,10}})));
D.Interfaces.DigitalInput k annotation (Placement(transformation(extent=
{{-110,-80},{-90,-60}})));
D.Examples.Utilities.RS RS1(delayTime=delayTime,q0=q0)
D.Examples.Utilities.RS RS1(final delayTime=delayTime, final q0=q0)
annotation (Placement(transformation(
extent={{30,-24},{70,16}})));
D.Examples.Utilities.RS RS2(delayTime=delayTime,q0=q0)
D.Examples.Utilities.RS RS2(final delayTime=delayTime, final q0=q0)
annotation (Placement(transformation(
extent={{-44,-20},{-4,20}})));
D.Basic.And And1(n=3) annotation (Placement(transformation(extent={{-70,
Expand Down Expand Up @@ -1575,7 +1573,7 @@ sum <strong>Adder4</strong>.c_out <strong>Adder4.s</strong> <strong>Adder3.s
-70}}, color={127,0,127}));
annotation (
Documentation(info="<html>
<p>Basing on the RS component JKFF is a J-K-flipflop composed according the schematic. Its parameter delayTime is the delay time of the RS component transport delay, q0 is the initial value of that delay.</p>
<p>Based on the <a href=\"modelica://Modelica.Electrical.Digital.Examples.Utilities.RS\">RS</a> component JKFF is a J-K-flipflop composed according to the schematic. Its parameter delayTime is the delay time of the RS component transport delay, q0 is the initial value of that delay.</p>
</html>"), Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},
{100,100}}), graphics={
Rectangle(
Expand Down
2 changes: 1 addition & 1 deletion Modelica/Fluid/Examples/HeatExchanger.mo
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ package HeatExchanger "Demo of a heat exchanger model"
Modelica.Fluid.Pipes.BaseClasses.HeatTransfer.ConstantFlowHeatTransfer
(alpha0=2000),
Twall_start=300,
dT=10,
dT=1,
T_start_1=304,
T_start_2=300) annotation (Placement(transformation(extent={{
-26,-14},{34,46}})));
Expand Down
3 changes: 1 addition & 2 deletions Modelica/Fluid/Sources.mo
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ package Sources "Define fixed or prescribed boundary conditions"
"Boundary specific enthalpy"
annotation (Dialog(group="Boundary temperature or boundary specific enthalpy",
enable = not use_T));
parameter Medium.MassFraction X[Medium.nX](
quantity=Medium.substanceNames) = Medium.X_default
parameter Medium.MassFraction X[Medium.nX] = Medium.X_default
"Boundary mass fractions m_i/m"
annotation (Dialog(group = "Only for multi-substance flow", enable=Medium.nXi > 0));
parameter Medium.ExtraProperty C[Medium.nC](
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ model ArmatureStroke
"Armature stroke of both moving coil actuator models after a voltage step at time t=0"

extends Modelica.Icons.Example;

constant Modelica.Units.SI.Current steadyStateCurrent = 1.5;
Modelica.Electrical.Analog.Basic.Ground pmGround annotation (Placement(
transformation(extent={{-80,-70},{-60,-50}})));
Modelica.Electrical.Analog.Sources.StepVoltage pmSource(startTime=0, V=
pmActuator.R*1.5) "Steady state current 1.5A" annotation (
pmActuator.R*steadyStateCurrent) annotation (
Placement(transformation(
origin={-70,-30},
extent={{-10,10},{10,-10}},
Expand All @@ -26,7 +26,7 @@ model ArmatureStroke
Modelica.Electrical.Analog.Basic.Ground cGround annotation (Placement(
transformation(extent={{-80,0},{-60,20}})));
Modelica.Electrical.Analog.Sources.StepVoltage cSource(startTime=0, V=
cActuator.R*1.5) "Steady state current 1.5A" annotation (
cActuator.R*steadyStateCurrent) annotation (
Placement(transformation(
origin={-70,40},
extent={{-10,10},{10,-10}},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,12 +357,10 @@ Simulate for 30 seconds and plot (versus <code>rotorAngleM3.rotorDisplacementAng
pattern=LinePattern.Dash),Text(
extent={{10,16},{70,8}},
textStyle={TextStyle.Bold},
textString="%m-phase machine
"), Text(
textString="%m-phase machine"), Text(
extent={{10,-52},{70,-60}},
textStyle={TextStyle.Bold},
textString="Three-phase machine
"), Rectangle(
textString="Three-phase machine"), Rectangle(
extent={{-50,-60},{100,-100}},
fillColor={255,255,170},
fillPattern=FillPattern.Solid,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,10 +301,8 @@ and accelerate the inertias. Two equivalent machines with different numbers of p
pattern=LinePattern.Dash),Text(
extent={{40,-54},{100,-62}},
textStyle={TextStyle.Bold},
textString="Three-phase machine
"), Text(
textString="Three-phase machine"), Text(
extent={{40,-44},{100,-52}},
textStyle={TextStyle.Bold},
textString="%m-phase machine
")}));
textString="%m-phase machine")}));
end SMPM_Inverter_Polyphase;
Original file line number Diff line number Diff line change
Expand Up @@ -276,12 +276,10 @@ Simulate for 1.5 seconds and plot (versus time):
pattern=LinePattern.Dash),Text(
extent={{40,-44},{100,-52}},
textStyle={TextStyle.Bold},
textString="%m-phase machine
"), Text(
textString="%m-phase machine"), Text(
extent={{40,-54},{100,-62}},
textStyle={TextStyle.Bold},
textString="Three-phase machine
"), Rectangle(
textString="Three-phase machine"), Rectangle(
extent={{-20,-60},{100,-100}},
fillColor={255,255,170},
fillPattern=FillPattern.Solid,
Expand Down
2 changes: 1 addition & 1 deletion ModelicaReference/package.mo
Original file line number Diff line number Diff line change
Expand Up @@ -1902,7 +1902,7 @@ The external C-functions may be defined in the following way:
} MyTable;
<strong>void</strong>* initMyTable(const char* fileName, const char* tableName) {
MyTable* table = malloc(sizeof(MyTable));
MyTable* table = (MyTable*) malloc(sizeof(MyTable));
<strong>if</strong> ( table == NULL ) ModelicaError(\"Not enough memory\");
// read table from file and store all data in *table
<strong>return</strong> (void*) table;
Expand Down

0 comments on commit d4cb1d4

Please sign in to comment.