-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue1389 crash course package #1403
Closed
LoneMeertens
wants to merge
4
commits into
open-ideas:master
from
LoneMeertens:issue1389_CrashCoursePackage
Closed
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
0b2a127
Create separate package within IDEAS.Examples.Tutorial for Modelica c…
LoneMeertens b006ec3
Add documentation to the main exercise packages
LoneMeertens 0d8e426
Add package DetailedHouse
LoneMeertens c65e1df
SimpleHouse.mo model at same level as Tutorial package to keep consis…
LoneMeertens File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
402 changes: 402 additions & 0 deletions
402
IDEAS/Examples/Tutorial/CrashCourse/Exercise1/SimpleHouse.mo
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
within IDEAS.Examples.Tutorial.CrashCourse; | ||
package Exercise1 "Exercise 1 Modelica crash course: Exploring Dymola, MSL and IDEAS" | ||
annotation (Documentation(info="<html> | ||
<p> | ||
This exercise introduces the Dymola environment, the Modelica Standard Library | ||
(MSL), and the IDEAS library. The objective is to help users become familiar with | ||
model simulation, parameter adaptation, and result visualization using Dymola. | ||
</p> | ||
</html>")); | ||
end Exercise1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
SimpleHouse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
within IDEAS.Examples.Tutorial.CrashCourse; | ||
package Exercise2 "Exercise 2 Modelica crash course: IDEAS SimpleHouse" | ||
|
||
annotation (Documentation(info="<html> | ||
<p> | ||
This exercise focuses on developing familiarity with Modelica and the IDEAS library. | ||
It emphasizes graphical modeling using library components rather than equation-based | ||
modeling. The exercise involves constructing and incrementally extending a simple | ||
house model. | ||
</p> | ||
<p> | ||
Use the step-by-step approach outlined in <a href=\"modelica://IDEAS.Examples.Tutorial.SimpleHouse\"> | ||
IDEAS.Examples.Tutorial.SimpleHouse</a> for detailed guidance on each stage of the exercise. | ||
</p> | ||
The graphical representation of the final model is given below. | ||
</p> | ||
<p align=\"center\"> | ||
<img alt=\"Graphical representation of the final simple house model.\" | ||
src=\"modelica://IDEAS/Resources/Images/Examples/Tutorial/SimpleHouse/simpleHouse.png\"/> | ||
</p> | ||
</html>")); | ||
end Exercise2; |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
IDEAS/Examples/Tutorial/Example2.mo → ...utorial/CrashCourse/Exercise3/Example2.mo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
IDEAS/Examples/Tutorial/Example3.mo → ...utorial/CrashCourse/Exercise3/Example3.mo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
IDEAS/Examples/Tutorial/Example4.mo → ...utorial/CrashCourse/Exercise3/Example4.mo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
within IDEAS.Examples.Tutorial.CrashCourse.Exercise3; | ||
model Example5 "New model with 2 coupled zones" | ||
extends Modelica.Icons.Example; | ||
replaceable package Medium = IDEAS.Media.Air "Air medium"; | ||
|
||
parameter Modelica.Units.SI.Length l=8 "Zone length"; | ||
parameter Modelica.Units.SI.Length w=4 "Zone width"; | ||
parameter Modelica.Units.SI.Length h=2.7 "Zone height"; | ||
|
||
inner BoundaryConditions.SimInfoManager sim | ||
annotation (Placement(transformation(extent={{-100,80},{-80,100}}))); | ||
Buildings.Components.RectangularZoneTemplate rectangularZoneTemplate( | ||
redeclare package Medium = Medium, | ||
aziA=IDEAS.Types.Azimuth.N, | ||
h=h, | ||
bouTypA=IDEAS.Buildings.Components.Interfaces.BoundaryType.OuterWall, | ||
bouTypB=IDEAS.Buildings.Components.Interfaces.BoundaryType.OuterWall, | ||
bouTypD=IDEAS.Buildings.Components.Interfaces.BoundaryType.OuterWall, | ||
redeclare Buildings.Validation.Data.Constructions.HeavyWall conTypA, | ||
redeclare Buildings.Validation.Data.Constructions.HeavyWall conTypB, | ||
redeclare Buildings.Validation.Data.Constructions.HeavyWall conTypC, | ||
redeclare Buildings.Validation.Data.Constructions.HeavyWall conTypD, | ||
bouTypC=IDEAS.Buildings.Components.Interfaces.BoundaryType.InternalWall, | ||
bouTypFlo=IDEAS.Buildings.Components.Interfaces.BoundaryType.InternalWall, | ||
bouTypCei=IDEAS.Buildings.Components.Interfaces.BoundaryType.External, | ||
l=w, | ||
w=l/2, | ||
hasWinA=true, | ||
A_winA=2*1.3, | ||
redeclare TwinHouses.BaseClasses.Data.Materials.Glazing glazingA, | ||
redeclare Buildings.Validation.Data.Constructions.HeavyWall conTypFlo) | ||
"North part of the zone" | ||
annotation (Placement(transformation(extent={{-10,20},{10,40}}))); | ||
Buildings.Components.RectangularZoneTemplate rectangularZoneTemplate1( | ||
redeclare package Medium = Medium, | ||
aziA=IDEAS.Types.Azimuth.N, | ||
h=h, | ||
bouTypB=IDEAS.Buildings.Components.Interfaces.BoundaryType.OuterWall, | ||
bouTypC=IDEAS.Buildings.Components.Interfaces.BoundaryType.OuterWall, | ||
bouTypD=IDEAS.Buildings.Components.Interfaces.BoundaryType.OuterWall, | ||
bouTypFlo=IDEAS.Buildings.Components.Interfaces.BoundaryType.InternalWall, | ||
bouTypCei=IDEAS.Buildings.Components.Interfaces.BoundaryType.External, | ||
redeclare Buildings.Validation.Data.Constructions.HeavyWall conTypB, | ||
redeclare Buildings.Validation.Data.Constructions.HeavyWall conTypC, | ||
redeclare Buildings.Validation.Data.Constructions.HeavyWall conTypD, | ||
redeclare Buildings.Validation.Data.Constructions.HeavyWall conTypFlo, | ||
bouTypA=IDEAS.Buildings.Components.Interfaces.BoundaryType.External, | ||
l=w, | ||
w=l/2, | ||
hasWinC=true, | ||
A_winC=2*1.3, | ||
redeclare TwinHouses.BaseClasses.Data.Materials.Glazing glazingC) | ||
"South part of the zone" | ||
annotation (Placement(transformation(extent={{-10,-40},{10,-20}}))); | ||
equation | ||
connect(rectangularZoneTemplate.proBusFlo, rectangularZoneTemplate.proBusCei) | ||
annotation (Line( | ||
points={{0,24},{28,24},{28,36},{-0.2,36}}, | ||
color={255,204,51}, | ||
thickness=0.5)); | ||
connect(rectangularZoneTemplate1.proBusA, rectangularZoneTemplate.proBusC) | ||
annotation (Line( | ||
points={{-6,-21},{-6,2},{6.8,2},{6.8,20.2}}, | ||
color={255,204,51}, | ||
thickness=0.5)); | ||
connect(rectangularZoneTemplate1.proBusCei, rectangularZoneTemplate1.proBusFlo) | ||
annotation (Line( | ||
points={{-0.2,-24},{28,-24},{28,-36},{0,-36}}, | ||
color={255,204,51}, | ||
thickness=0.5)); | ||
annotation (Documentation(revisions="<html> | ||
<ul> | ||
<li> | ||
September 18, 2019 by Filip Jorissen:<br/> | ||
First implementation for the IDEAS crash course. | ||
</li> | ||
</ul> | ||
</html>", info="<html> | ||
<p> | ||
This example demonstrates the use of the RectangularZoneTemplate. | ||
The one-zone implementation with one window of example 1 is repeated here as | ||
a two-zone implementation with two windows that are north and south oriented. | ||
Note the different temperature responses of the zones. | ||
</p> | ||
</html>"), experiment( | ||
StartTime=10000000, | ||
StopTime=11000000, | ||
__Dymola_NumberOfIntervals=5000, | ||
Tolerance=1e-06, | ||
__Dymola_Algorithm="Lsodar")); | ||
end Example5; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
within IDEAS.Examples.Tutorial.CrashCourse; | ||
package Exercise3 "Exercise 3 Modelica crash course: Detailed Building Envelope Modeling" | ||
|
||
annotation (Documentation(info="<html> | ||
<p> | ||
This exercise introduces the IDEAS.Buildings package in Modelica and focuses on | ||
building a simple house model with detailed building envelope components. | ||
Starting from scratch, the model will be incrementally developed, leveraging the | ||
Modelica extends clause to build upon the previous step's model. | ||
</p> | ||
</html>")); | ||
end Exercise3; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Example1 | ||
Example2 | ||
Example3 | ||
Example4 | ||
Example5 |
4 changes: 2 additions & 2 deletions
4
IDEAS/Examples/Tutorial/Example10.mo → ...torial/CrashCourse/Exercise4/Example10.mo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
IDEAS/Examples/Tutorial/Example8.mo → ...utorial/CrashCourse/Exercise4/Example8.mo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
within IDEAS.Examples.Tutorial.CrashCourse; | ||
package Exercise4 "Exercise 4 Modelica crash course: Extending the Simple House Model with HVAC and Complementary Components" | ||
|
||
annotation (Documentation(info="<html> | ||
<p> | ||
This exercise explores the Modelica packages of IDEAS that complement the | ||
IDEAS.Buildings package used in Exercise 3. The goal is to extend the simple house | ||
model with HVAC systems and other components, starting from a predefined example. | ||
Incremental development will be used to enhance the model, employing the Modelica | ||
extends clause to build upon each step’s model.</p> | ||
</html>")); | ||
end Exercise4; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Example6 | ||
Example7 | ||
Example8 | ||
Example9 | ||
Example10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Exercise1 | ||
Exercise2 | ||
Exercise3 | ||
Exercise4 |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see quite some unintended changes, due to different Dymola versions. Sometimes Dymola changes other lines in the text if you save a model. However, it is a good practice to check the lines of code that you commit and only commit the lines that you really want to change. You can discard all other changes.
As there are many, and you will change the structure anyway, I propose to start from a new branch, which is easier than reverting these changes.