Skip to content
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

Add simulate and plot script for thermal zone example #1386

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
last-generated=2022-10-27
statistics-initialization=
{
"linear": "5"
}
statistics-simulation=
{
"linear": "0, 4, 0",
"nonlinear": "0, 1, 0, 1, 0, 1",
"number of continuous time states": "4",
"numerical Jacobians": "0"
}
time=[0e+00, 3.1536e+07]
thermalZone.TAir=[2.931499938964844e+02, 2.939956009525829e+02, 2.904515156589692e+02, 2.913479235418912e+02, 2.923981077774711e+02, 2.911221313476562e+02, 2.909044363839286e+02, 2.912737492152623e+02, 2.908111405806108e+02, 2.920210560191761e+02, 2.926732177734375e+02, 2.918830159505208e+02, 2.92578760111107e+02, 2.941394451789136e+02, 2.937545940692608e+02, 2.940667114257812e+02, 2.954526656462339e+02, 2.948152124741498e+02, 2.974445446777344e+02, 2.947479749137972e+02, 2.964570922851562e+02, 2.963392780742569e+02, 2.957645264015638e+02, 2.943156127929688e+02, 2.97041030559134e+02, 2.958955078125e+02, 2.970004590905231e+02, 2.964367411295573e+02, 2.96342276436942e+02, 2.964649186567827e+02, 2.977899780273438e+02, 2.96416515971339e+02, 2.972695695744005e+02, 2.986957882151884e+02, 2.976408386230469e+02, 2.976631164550781e+02, 2.978370108255526e+02, 2.976593627929688e+02, 2.980536201396174e+02, 2.973616180272209e+02, 2.977684936523438e+02, 2.994753209164268e+02, 2.979511378036188e+02, 2.987989030317827e+02, 2.987054006215689e+02, 2.981044311523438e+02, 2.96933837890625e+02, 2.974979256766183e+02, 2.966857019042969e+02, 2.976509489171645e+02, 2.983914184570312e+02, 2.982022775503305e+02, 2.986041693731186e+02, 3.005298665364583e+02, 2.986517914802797e+02, 2.992860412597656e+02, 2.999570249360183e+02, 2.989721801757813e+02, 2.993976455816702e+02, 2.996332831982745e+02, 2.995137634277344e+02, 3.003933573978048e+02, 2.995268046061198e+02, 2.994086837768555e+02, 3.012526691143329e+02, 2.988336486816406e+02, 2.989706690171186e+02, 2.99570625e+02, 2.99452290562221e+02, 2.996168212890625e+02, 3.005712280273438e+02, 2.999140055888408e+02, 3.006709566983309e+02, 3.017910991467928e+02, 3.000839072779605e+02, 2.99694091796875e+02, 3.015026010366586e+02, 2.994344289679277e+02, 3.003104553222656e+02, 2.992368729754192e+02, 2.994088439941406e+02, 3.003967590332031e+02, 2.981862623762376e+02, 2.974215194347293e+02, 2.976022471351706e+02, 2.955316162109375e+02, 2.948944507945668e+02, 2.95693612234933e+02, 2.946064798990885e+02, 2.958296097465183e+02, 2.953695678710938e+02, 2.950099539249501e+02, 2.941277160644531e+02, 2.951639811197917e+02, 2.927270096759407e+02, 2.934303283691406e+02, 2.939335515385739e+02, 2.92596591796875e+02, 2.931383598554598e+02, 2.93019380457261e+02, 2.922508239746094e+02]
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
simulateModel("AixLib.ThermalZones.ReducedOrder.Examples.ThermalZone", tolerance=1e-6, stopTime=3.1536e+007, numberOfIntervals=0, outputInterval=3600, method="Radau", resultFile="ThermalZone");
createPlot(id = 1,
position = {55, 50, 697, 502},
x = "time",
y = {"thermalZone.TAir"},
autoscale = true,
autoerase = true,
autoreplot = true,
grid = true,
color = true,
leftTitleType = 1,
bottomTitleType = 1);

9 changes: 6 additions & 3 deletions AixLib/ThermalZones/ReducedOrder/Examples/ThermalZone.mo
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ model ThermalZone "Illustrates the use of ThermalZone"

equation
connect(weaDat.weaBus, thermalZone.weaBus) annotation (Line(
points={{-72,30},{-34,30},{-34,0},{-10,0}},
points={{-72,30},{-34,30},{-34,6},{-10,6}},
color={255,204,51},
larissakuehn marked this conversation as resolved.
Show resolved Hide resolved
thickness=0.5));
connect(internalGains.y, thermalZone.intGains)
Expand All @@ -148,8 +148,11 @@ equation
connect(sine.y, gain1.u) annotation (Line(points={{73,0},{70,0},{70,-18},{67.2,
-18}}, color={0,0,127}));
annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
coordinateSystem(preserveAspectRatio=false)),experiment(StopTime=
3.1536e+007, Interval=3600),
coordinateSystem(preserveAspectRatio=false)),
experiment(Tolerance=1e-6,StopTime=3.1536e+007,Interval=3600),
__Dymola_Commands(file=
"modelica://AixLib/Resources/Scripts/Dymola/ThermalZones/ReducedOrder/Examples/ThermalZone.mos"
"Simulate and plot"),
Documentation(revisions="<html><ul>
<li>September 29, 2016, by Moritz Lauster:<br/>
Implemented.
Expand Down