Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore

This file was deleted.

44 changes: 4 additions & 40 deletions .impact/project.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "Gitdemo",
"name": "Modelonexamples_10",
"format": "1.0.0",
"dependencies": [
{
Expand All @@ -9,47 +9,11 @@
],
"content": [
{
"relpath": "Resources/Views",
"contentType": "VIEWS",
"defaultDisabled": false,
"id": "d049e25f59784e9dbdb3c20787f96d28"
},
{
"relpath": "Resources/Favorites",
"contentType": "FAVORITES",
"defaultDisabled": false,
"id": "aec8e400200c449d8b85a62a04bfd30e"
},
{
"relpath": "Resources/CustomFunctions",
"contentType": "CUSTOM_FUNCTIONS",
"defaultDisabled": false,
"id": "406f14bcf0914ae5a7f298d7ca23dc94"
},
{
"relpath": "Resources/Custom",
"contentType": "GENERIC",
"defaultDisabled": false,
"id": "3e90195b07f6455fa38dd2dd168b8209"
},
{
"relpath": "ReferenceResults",
"contentType": "REFERENCE_RESULTS",
"defaultDisabled": false,
"id": "8ae62e121ce54595981e0a806cf7b6f6"
},
{
"relpath": "Resources/ExperimentDefinitions",
"contentType": "EXPERIMENT_DEFINITIONS",
"defaultDisabled": false,
"id": "642bdb01133c42b8a7d46f0f8386e48e"
},
{
"relpath": "Test",
"relpath": "TestPackage",
"contentType": "MODELICA",
"name": "Test",
"name": "TestPackage",
"defaultDisabled": false,
"id": "438ad9f417f141b79910fd749a9a9ec1"
"id": "77d3ee4fbe1743f5b16633a829e027de"
}
],
"executionOptions": []
Expand Down
61 changes: 0 additions & 61 deletions Test/DoublePendulum.mo

This file was deleted.

3 changes: 0 additions & 3 deletions Test/package.mo

This file was deleted.

1 change: 0 additions & 1 deletion Test/package.order

This file was deleted.

92 changes: 92 additions & 0 deletions TestPackage/SignConvention.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
within TestPackage;

model SignConvention "Examples for the used sign conventions"
extends .Modelica.Icons.Example;
.Modelica.Mechanics.Translational.Components.Mass mass1(
L=1,
s(fixed=true),
v(fixed=true),
m=1) annotation (Placement(transformation(extent={{40,60},{60,80}})));
.Modelica.Mechanics.Translational.Sources.Force force1 annotation (Placement(transformation(
extent={{0,60},{20,80}})));
.Modelica.Blocks.Sources.Constant constant1(k=1) annotation (Placement(
transformation(extent={{-40,60},{-20,80}})));
.Modelica.Mechanics.Translational.Components.Mass mass2(
L=1,
s(fixed=true),
v(fixed=true),
m=1) annotation (Placement(transformation(extent={{40,0},{60,20}})));
.Modelica.Mechanics.Translational.Sources.Force force2 annotation (Placement(transformation(
extent={{0,20},{20,40}})));
.Modelica.Blocks.Sources.Constant constant2(k=1) annotation (Placement(
transformation(extent={{-40,20},{-20,40}})));
.Modelica.Mechanics.Translational.Components.Mass mass3(
L=1,
s(fixed=true),
v(fixed=true),
m=1) annotation (Placement(transformation(extent={{-40,-40},{-20,-20}})));
.Modelica.Mechanics.Translational.Sources.Force force3(useSupport=false)
annotation (Placement(
transformation(extent={{20,-40},{0,-20}})));
.Modelica.Blocks.Sources.Constant constant3(k=1) annotation (Placement(
transformation(extent={{60,-40},{40,-20}})));
.Modelica.Mechanics.Translational.Components.Fixed fixed
annotation (Placement(transformation(extent={{0,-60},{20,-40}})));
equation
connect(constant1.y, force1.f)
annotation (Line(points={{-19,70},{-2,70}}, color={0,0,127}));
connect(constant2.y, force2.f)
annotation (Line(points={{-19,30},{-2,30}}, color={0,0,127}));
connect(constant3.y, force3.f)
annotation (Line(points={{39,-30},{22,-30}}, color={0,0,127}));
connect(force1.flange, mass1.flange_a) annotation (Line(
points={{20,70},{40,70}}, color={0,127,0}));
connect(force2.flange, mass2.flange_b) annotation (Line(
points={{20,30},{70,30},{70,10},{60,10}}, color={0,127,0}));
connect(mass3.flange_b, force3.flange) annotation (Line(
points={{-20,-30},{0,-30}}, color={0,127,0}));
connect(fixed.flange, force3.support) annotation (Line(
points={{10,-50},{10,-40}}, color={0,127,0}));
annotation (
Documentation(info="<html>
<p>
If all arrows point in the same direction, a positive force
results in a positive acceleration&nbsp;<var>a</var>, velocity&nbsp;<var>v</var> and position&nbsp;<var>s</var>.
</p>
<p>
For a force of 1&nbsp;N and a mass of 1&nbsp;kg this leads to
</p>
<blockquote><pre>
a = 1 m/s2
v = 1 m/s after 1 s (SlidingMass1.v)
s = 0.5 m after 1 s (SlidingMass1.s)
</pre></blockquote>
<p>
The acceleration is not available for plotting.
</p>
<p>
System 1) and 2) are equivalent. It doesn't matter whether the
force pushes at flange_a in system&nbsp;1 or pulls at flange_b in system&nbsp;2.
</p><p>
It is of course possible to ignore the arrows and connect the models
in an arbitrary way. But then it is hard see in what direction the
force acts.
</p><p>
In the third system the two arrows are opposed which means that the
force acts in the opposite direction (in the same direction as in
the two other examples).
</p>
</html>"),
Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},
{100,100}}),graphics={Text(
extent={{-100,80},{-82,60}},
textString="1)",
lineColor={0,0,255}),Text(
extent={{-100,40},{-82,20}},
textString="2)",
lineColor={0,0,255}),Text(
extent={{-100,-20},{-82,-40}},
textString="3)",
lineColor={0,0,255})}),
experiment(StopTime=1.0, Interval=0.001));
end SignConvention;
3 changes: 3 additions & 0 deletions TestPackage/package.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package TestPackage extends .Modelica.Icons.Package;
annotation(uses(Modelica(version = "4.0.0")));
end TestPackage;
1 change: 1 addition & 0 deletions TestPackage/package.order
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SignConvention