From 15d1158cfcf44f24f25fedf023ab6ee95cf4b911 Mon Sep 17 00:00:00 2001
From: Michael Wetter
+This package contains validation models for the classes in
+
+Buildings.Applications.DataCenters.ChillerCooled.Equipment.
+
+Note that most validation models contain simple input data
+which may not be realistic, but for which the correct
+output can be obtained through an analytic solution.
+The examples plot various outputs, which have been verified against these
+solutions. These model outputs are stored as reference data and
+used for continuous validation whenever models in the library change.
+
Enumeration for the type of days.
-The possible values are
+The possible values are:
+Enumeration for the type of extrapolation that is used when reading data from a table.
+The possible values are:
+ The following initialization alternatives are available:
+Enumeration for the type of initialization that is used for state variables.
+The possible values are:
+
-Enumeration to define the choice of integrator reset
-(to be selected via choices menu):
+Enumeration to define the choice of integrator reset.
+Possible values are:
+Enumeration to define the type of the controller.
+Possible values are:
+
+Enumeration for the type of smoothness that is used when interpolating data from a table.
+The possible values are:
+
-",
- revisions="
+", revisions="
diff --git a/Buildings/Controls/OBC/CDL/Types/Extrapolation.mo b/Buildings/Controls/OBC/CDL/Types/Extrapolation.mo
index 54ec3a47764..9e6fed56dfa 100644
--- a/Buildings/Controls/OBC/CDL/Types/Extrapolation.mo
+++ b/Buildings/Controls/OBC/CDL/Types/Extrapolation.mo
@@ -1,8 +1,33 @@
within Buildings.Controls.OBC.CDL.Types;
type Extrapolation = enumeration(
- HoldLastPoint
- "Hold the first/last table point outside of the table scope",
+ HoldLastPoint "Hold the first/last table point outside of the table scope",
+
LastTwoPoints
"Extrapolate by using the derivative at the first/last table points outside of the table scope",
+
Periodic "Repeat the table scope periodically")
- "Enumeration defining the extrapolation of time table interpolation";
+ "Enumeration defining the extrapolation of time table interpolation"
+ annotation (Documentation(info="
+
+
+"));
diff --git a/Buildings/Controls/OBC/CDL/Types/Init.mo b/Buildings/Controls/OBC/CDL/Types/Init.mo
index ef6b939a040..8aaec6a5d0c 100644
--- a/Buildings/Controls/OBC/CDL/Types/Init.mo
+++ b/Buildings/Controls/OBC/CDL/Types/Init.mo
@@ -1,23 +1,24 @@
within Buildings.Controls.OBC.CDL.Types;
type Init = enumeration(
- NoInit
- "No initialization (start values are used as guess values with fixed=false)",
+ NoInit "No initialization (start values are used as guess values)",
InitialState "Initialization with initial states",
- InitialOutput
- "Initialization with initial outputs (and steady state of the states if possible)")
+ InitialOutput "Initialization with initial outputs")
"Enumeration defining initialization of a block" annotation (Evaluate=true,
- Documentation(info="
-
+
+Enumeration
+Description
+
+HoldLastPoint
+Hold the first or last point outside of the table scope.
+
+
+LastTwoPoints
+Extrapolate by using the derivative at the first or last table points outside of the table scope.
+
+
+Periodic
+Repeat the table scope periodically.
+
-
-
-NoInit
No initialization (start values are used as guess values with fixed=false
)
-SteadyState
Steady state initialization (derivatives of states are zero)
-InitialState
Initialization with initial states
+InitialOutput
Initialization with initial outputs (and steady state of the states if possible)
+NoInit
No initialization (start values are used as guess values with fixed=false
).
+
+
+InitialState
Initialization with initial states.
+InitialOutput
Initialization with initial outputs (and steady state of the states if possible).
+
-
- ", revisions="
+", revisions="
diff --git a/Buildings/Controls/OBC/CDL/Types/Reset.mo b/Buildings/Controls/OBC/CDL/Types/Reset.mo
index 01c66d0ae4a..2d6ab82ca24 100644
--- a/Buildings/Controls/OBC/CDL/Types/Reset.mo
+++ b/Buildings/Controls/OBC/CDL/Types/Reset.mo
@@ -2,32 +2,30 @@ within Buildings.Controls.OBC.CDL.Types;
type Reset = enumeration(
Disabled "Disabled",
Parameter "Use parameter value",
- Input "Use input signal") "Options for integrator reset"
- annotation (
- Documentation(info="
+ Input "Use input signal") "Options for integrator reset" annotation (
+ Documentation(info="
-",
- revisions="
+", revisions="
-Enumeration
Description Disabled
+
-Disabled
Use this setting to disable the integrator reset.
Parameter
+
-Parameter
Use this setting to use reset the integrator to the value of the parameter.
Input
+Input
Use this setting to reset the integrator to the value obtained
from the input signal.
diff --git a/Buildings/Controls/OBC/CDL/Types/SimpleController.mo b/Buildings/Controls/OBC/CDL/Types/SimpleController.mo
index 4ca0287290d..20500426644 100644
--- a/Buildings/Controls/OBC/CDL/Types/SimpleController.mo
+++ b/Buildings/Controls/OBC/CDL/Types/SimpleController.mo
@@ -5,4 +5,37 @@ type SimpleController = enumeration(
PD "PD controller",
PID "PID controller")
"Enumeration defining P, PI, PD, or PID simple controller type" annotation (
- Evaluate=true);
+ Evaluate=true, Documentation(info="
+
+
+", revisions="
+
+
+Enumeration
+Description
+
+P
+Controller with proportional term.
+
+
+PI
+Controller with proportional and integral terms.
+
+
+PD
+Controller with proportional and derivative term.
+
+
+PID
+Controller with proportional, integral and derivative terms.
+
+
+"));
diff --git a/Buildings/Controls/OBC/CDL/Types/Smoothness.mo b/Buildings/Controls/OBC/CDL/Types/Smoothness.mo
index 0cd5f3c6168..f70c49d1ffc 100644
--- a/Buildings/Controls/OBC/CDL/Types/Smoothness.mo
+++ b/Buildings/Controls/OBC/CDL/Types/Smoothness.mo
@@ -3,4 +3,24 @@ type Smoothness = enumeration(
LinearSegments "Table points are linearly interpolated",
ConstantSegments
"Table points are not interpolated, but the previous tabulated value is returned")
- "Enumeration defining the smoothness of table interpolation";
+ "Enumeration defining the smoothness of table interpolation" annotation (
+ Documentation(info="
+
+First implementation.
+
+
+"));
diff --git a/Buildings/Examples/DualFanDualDuct/Controls/Examples/RoomMixingBox.mo b/Buildings/Examples/DualFanDualDuct/Controls/Examples/RoomMixingBox.mo
index de3225102b4..707e9ef46fd 100644
--- a/Buildings/Examples/DualFanDualDuct/Controls/Examples/RoomMixingBox.mo
+++ b/Buildings/Examples/DualFanDualDuct/Controls/Examples/RoomMixingBox.mo
@@ -1,6 +1,5 @@
within Buildings.Examples.DualFanDualDuct.Controls.Examples;
model RoomMixingBox "Test model for room mixing box"
- import Buildings;
extends Modelica.Icons.Example;
Buildings.Examples.DualFanDualDuct.Controls.RoomMixingBox conMix(m_flow_min=1)
"Controller for mixing box"
diff --git a/Buildings/Examples/DualFanDualDuct/Controls/RoomMixingBox.mo b/Buildings/Examples/DualFanDualDuct/Controls/RoomMixingBox.mo
index b2d22868246..9f9ed143ff9 100644
--- a/Buildings/Examples/DualFanDualDuct/Controls/RoomMixingBox.mo
+++ b/Buildings/Examples/DualFanDualDuct/Controls/RoomMixingBox.mo
@@ -1,6 +1,5 @@
within Buildings.Examples.DualFanDualDuct.Controls;
block RoomMixingBox "Controller for room mixing box"
- import Buildings;
extends Modelica.Blocks.Icons.Block;
parameter Modelica.SIunits.MassFlowRate m_flow_min "Minimum mass flow rate";
Buildings.Controls.OBC.CDL.Continuous.LimPID conHea(
diff --git a/Buildings/Examples/DualFanDualDuct/ThermalZones/SupplyBranch.mo b/Buildings/Examples/DualFanDualDuct/ThermalZones/SupplyBranch.mo
index 6f3a81adc9d..6280b4eba4d 100644
--- a/Buildings/Examples/DualFanDualDuct/ThermalZones/SupplyBranch.mo
+++ b/Buildings/Examples/DualFanDualDuct/ThermalZones/SupplyBranch.mo
@@ -1,6 +1,5 @@
within Buildings.Examples.DualFanDualDuct.ThermalZones;
model SupplyBranch "Supply branch of a dual duct system"
- import Buildings;
replaceable package MediumA = Modelica.Media.Interfaces.PartialMedium
"Medium model for air" annotation (choicesAllMatching=true);
Modelica.Fluid.Interfaces.FluidPort_a port_aHot(redeclare package Medium =
diff --git a/Buildings/Examples/ScalableBenchmarks/BuildingVAV/Examples/OneFloor_OneZone.mo b/Buildings/Examples/ScalableBenchmarks/BuildingVAV/Examples/OneFloor_OneZone.mo
index 1869d9e8346..54f166cb7a9 100644
--- a/Buildings/Examples/ScalableBenchmarks/BuildingVAV/Examples/OneFloor_OneZone.mo
+++ b/Buildings/Examples/ScalableBenchmarks/BuildingVAV/Examples/OneFloor_OneZone.mo
@@ -459,7 +459,7 @@ equation
48},{-161.636,48},{-146,48},{-146,163.2},{12.6,163.2}}, color={255,0,
255}));
annotation (
- experiment(StopTime=604800, Tolerance=1e-06,__Dymola_Algorithm="Radau"),
+ experiment(StopTime=604800, Tolerance=1e-06),
__Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Examples/ScalableBenchmarks/BuildingVAV/Examples/OneFloor_OneZone.mos"
"Simulate and plot"),
Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-360,-120},{140,200}})),
diff --git a/Buildings/Examples/ScalableBenchmarks/BuildingVAV/Examples/TwoFloor_TwoZone.mo b/Buildings/Examples/ScalableBenchmarks/BuildingVAV/Examples/TwoFloor_TwoZone.mo
index 0284412f6ba..1ec0f762cce 100644
--- a/Buildings/Examples/ScalableBenchmarks/BuildingVAV/Examples/TwoFloor_TwoZone.mo
+++ b/Buildings/Examples/ScalableBenchmarks/BuildingVAV/Examples/TwoFloor_TwoZone.mo
@@ -5,7 +5,7 @@ model TwoFloor_TwoZone "Closed-loop model with 2 zone in 2 floor"
nZon=2);
annotation (
- experiment(StopTime=604800, Tolerance=1e-06,__Dymola_Algorithm="Radau"),
+ experiment(StopTime=604800, Tolerance=1e-06),
__Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Examples/ScalableBenchmarks/BuildingVAV/Examples/TwoFloor_TwoZone.mos"
"Simulate and plot"),
Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-360,-120},{140,200}})),
diff --git a/Buildings/Examples/ScalableBenchmarks/BuildingVAV/ThermalZones/Validation/MultiZone.mo b/Buildings/Examples/ScalableBenchmarks/BuildingVAV/ThermalZones/Validation/MultiZone.mo
index 33ed7e4b387..fe420aa2c71 100644
--- a/Buildings/Examples/ScalableBenchmarks/BuildingVAV/ThermalZones/Validation/MultiZone.mo
+++ b/Buildings/Examples/ScalableBenchmarks/BuildingVAV/ThermalZones/Validation/MultiZone.mo
@@ -23,7 +23,7 @@ equation
thickness=0.5));
annotation (
- experiment(StopTime=604800, Tolerance=1e-06, __Dymola_Algorithm="Radau"),
+ experiment(StopTime=604800, Tolerance=1e-06),
__Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Examples/ScalableBenchmarks/BuildingVAV/ThermalZones/Validation/MultiZone.mos"
"Simulate and plot"),
Documentation(info="
diff --git a/Buildings/Examples/ScalableBenchmarks/BuildingVAV/ThermalZones/Validation/ThermalZone.mo b/Buildings/Examples/ScalableBenchmarks/BuildingVAV/ThermalZones/Validation/ThermalZone.mo
index c7c6c9e439e..e9f9e3662d1 100644
--- a/Buildings/Examples/ScalableBenchmarks/BuildingVAV/ThermalZones/Validation/ThermalZone.mo
+++ b/Buildings/Examples/ScalableBenchmarks/BuildingVAV/ThermalZones/Validation/ThermalZone.mo
@@ -19,7 +19,7 @@ equation
color={255,204,51}, thickness=0.5));
annotation (
- experiment(StopTime=604800, Tolerance=1e-06, __Dymola_Algorithm="Radau"),
+ experiment(StopTime=604800, Tolerance=1e-06),
__Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Examples/ScalableBenchmarks/BuildingVAV/ThermalZones/Validation/ThermalZone.mos"
"Simulate and plot"),
Documentation(info="
diff --git a/Buildings/Examples/VAVReheat/ASHRAE2006.mo b/Buildings/Examples/VAVReheat/ASHRAE2006.mo
index 0ce4967512f..a96ddf132d8 100644
--- a/Buildings/Examples/VAVReheat/ASHRAE2006.mo
+++ b/Buildings/Examples/VAVReheat/ASHRAE2006.mo
@@ -1,10 +1,10 @@
within Buildings.Examples.VAVReheat;
model ASHRAE2006
"Variable air volume flow system with terminal reheat and five thermal zones"
- import Buildings;
extends Modelica.Icons.Example;
- extends Buildings.Examples.VAVReheat.BaseClasses.PartialOpenLoop(heaCoi(
- show_T=true), cooCoi(show_T=true));
+ extends Buildings.Examples.VAVReheat.BaseClasses.PartialOpenLoop(
+ heaCoi(show_T=true),
+ cooCoi(show_T=true));
Modelica.Blocks.Sources.Constant TSupSetHea(y(
final quantity="ThermodynamicTemperature",
diff --git a/Buildings/Fluid/HeatPumps/Examples/ScrollWaterToWater_OneRoomRadiator.mo b/Buildings/Fluid/HeatPumps/Examples/ScrollWaterToWater_OneRoomRadiator.mo
index 8e132e7e169..a1ced604b99 100644
--- a/Buildings/Fluid/HeatPumps/Examples/ScrollWaterToWater_OneRoomRadiator.mo
+++ b/Buildings/Fluid/HeatPumps/Examples/ScrollWaterToWater_OneRoomRadiator.mo
@@ -1,6 +1,6 @@
within Buildings.Fluid.HeatPumps.Examples;
model ScrollWaterToWater_OneRoomRadiator
- "7th part of the system model, which implements the on/off control using a state machine"
+ "Heat pump with scroll compressor connected to a simple room model with radiator"
extends Modelica.Icons.Example;
replaceable package MediumA =
Buildings.Media.Air "Medium model for air";
@@ -15,7 +15,7 @@ model ScrollWaterToWater_OneRoomRadiator
"Radiator nominal return water temperature";
parameter Modelica.SIunits.MassFlowRate mHeaPum_flow_nominal=
- Q_flow_nominal/4200/(5)
+ Q_flow_nominal/4200/5
"Heat pump nominal mass flow rate";
//------------------------------------------------------------------------------//
diff --git a/Buildings/HeatTransfer/Conduction/SingleLayer.mo b/Buildings/HeatTransfer/Conduction/SingleLayer.mo
index 8d1df94818d..e3859469c9b 100644
--- a/Buildings/HeatTransfer/Conduction/SingleLayer.mo
+++ b/Buildings/HeatTransfer/Conduction/SingleLayer.mo
@@ -192,12 +192,9 @@ equation
end for;
else
// Regular material
- // when sample(0, 2*60) then // fixme: remove for final release
for i in 1:nSta loop
- // T[i] = pre(T[i]) + 2*60 * (pre(Q_flow[i])-pre(Q_flow[i+1]))*CInv[i];
der(T[i]) = (Q_flow[i]-Q_flow[i+1])*CInv[i];
end for;
- // end when;
for i in 1:nSta loop
u[i]=0; // u is not required in this case
end for;
From aa21ae66cb964f98b752c893d228db5939c3f343 Mon Sep 17 00:00:00 2001
From: Michael Wetter
+
+Enumeration
+Description
+
+LinearSegments
+Linearly interpolate table points.
+
+
+ConstantSegments
+Do not interpolate, but rather use the previously tabulated value.
+ 2.4.1. Overdetermined initialization problem and inconsistent equationsWe will now explain how state variables, such as temperature and pressure, can be initialized.
Consider a model consisting of a mass flow source Modelica.Fluid.Sources.MassFlowSource_T
, a fluid volume Buildings.Fluid.MixingVolumes.MixingVolume
and
a fixed boundary condition Buildings.Fluid.Sources.FixedBoundary
, connected in series as shown in the figure below. Note that the instance bou
implements an equation that sets the medium pressure at its port, i.e., the port pressure bou.ports.p
is fixed.
In Modelica, connecting fluid ports as shown below leads to ideal mixing at the junction. In some situation, such as the configuration below, connecting multiple connectors to a fluid port represents the physical phenomena that was intended to model.
-However, in more complex flow configurations, one may want to explicitly control what branches of a piping or duct network mix. This may be achieved by using an instance of the model -SplitterFixedResistanceDpM as shown in the left figure below, which is the test model +PressureDrop as shown in the left figure below, which is the test model BoilerPolynomialClosedLoop
-Fig. 2.3 Correct (left) and wrong (right) connection of components with use of a mixer or splitter model.
This section explains how to set a reference pressure for incompressible fluids. For fluids that model density as a function of temperature, the section also shows how to account for the thermal expansion of the fluid.
Consider the flow circuit shown below that consists of a pump or fan, a flow resistance and a volume.
-Fig. 2.4 Schematic diagram of a flow circuit without means
to set a reference pressure, or to account for
@@ -521,7 +521,7 @@ 2.4.3. Use of sensors in fluid flow systemsBuildings.Fluid.Storage.ExpansionVessel
to form the system model shown below.
Fig. 2.5 Schematic diagram of a flow circuit with expansion vessel that
adds a pressure source and accounts for the thermal expansion
@@ -537,7 +537,7 @@ 2.4.3. Use of sensors in fluid flow systemsBuildings.Fluid.Storage.ExpansionVessel conserves energy.
However, since the thermal expansion of the fluid is usually small, this effect can be neglected in most building HVAC applications.
Fig. 2.6 Schematic diagram of a flow circuit with a boundary model that adds
a fixed pressure source and accounts for any thermal expansion
@@ -588,7 +588,7 @@ Fig. 2.7 Schematic diagram of a controller that switches a coil on and off.
In the top configuration, the hysteresis avoids numerical problems
@@ -805,7 +805,7 @@ Fig. 2.9 Block diagram of part of the economizer control that computes the outside air damper
control signal. This implementation triggers many events. Fig. 2.10 Block diagram of part of the revised economizer control that computes the outside air damper
control signal. Links to papers that describe or used the Buildings library are available at http://simulationresearch.lbl.gov/modelica/publications.html.
The model documentation from the download page contains user guides that describe the individual packages of the Buildings library. The IEA EBC Annex 60 final report
+summarizes the development of Modelica models, approaches and tools
+for co-simulation based on the Functional Mockup Interface standard,
+Building Information Modeling technologies based on the Industry Foundation Classes,
+as well as tools for workflow automation.
+It also contains numerous examples that apply these technologies to the
+design and operation of building and community energy systems. For questions that are specific to Modelica but not the Buildings libray, see http://stackoverflow.com/search?q=modelica For questions that are specific to Modelica but not the Buildings libray, see https://stackoverflow.com/search?q=modelica In fluid flow systems, flow junctions where mass flow rates separate and mix can couple non-linear systems of equations. This leads to larger systems of coupled equations that need to be solved, which often causes larger computing time and can sometimes cause convergence problems.
-To decouple these systems of equations, in the model of a flow splitter or mixer (model Buildings.Fluid.FixedResistances.SplitterFixedResistanceDpM), or in models for fans or pumps (such as the model Buildings.Fluid.Movers.SpeedControlled_y), the parameter Suppose the parameters are2.4.5. Nominal ValuesFixedResistanceDpM.
+See PressureDrop.
@@ -730,7 +730,7 @@ m_flow_nominal
m_flow_small
2.6. Avoiding events
2.7. Controls¶
-
2.8.1. State events\(t=0.95e7\)
seconds,
there was a spike as shown in the figure below.2.8.1. State events
+
2.8.1. State events\(0.2\) Kelvin, and now the model runs fine
for the whole year.
-
2.8.2. State variables that dominate the error controlef410ee),
the simulation time was very slow during part of the
simulation, as shown in Fig. 2.11.
-
1.1. Literature for UsersAlthough the Modelica Language Tutorial is for an older version (Modelica 1.4), it is still instructive and relevant to understand the concepts of the language.
1.2. Literature for Developers¶
diff --git a/Buildings/Resources/Documentation/userGuide/build/html/help.html b/Buildings/Resources/Documentation/userGuide/build/html/help.html
index b96cd8369ae..84f7a77d82f 100644
--- a/Buildings/Resources/Documentation/userGuide/build/html/help.html
+++ b/Buildings/Resources/Documentation/userGuide/build/html/help.html
@@ -197,7 +197,7 @@ 6. HelpFor general questions regarding the Buildings library, use
https://unmethours.com/questions/.
This is an open group and everyone can join it. No invitation is needed.
-
3.1. Avoiding step changes
3.2. Breaking algebraic loops¶
dynamicBalance
can be set to true
. This adds a control volume at the fluid junction that can decouple the system of equations.dynamicBalance
can be set to true
. This adds a control volume at the fluid junction that can decouple the system of equations.
3.3. Reducing nonlinear equations of serially connected flow resistances¶
@@ -258,7 +258,7 @@ 3.3. Reducing nonlinear equations of serially connected flow resistancesFig. 3.4 Schematic diagram of a fixed flow resistance and a valve in series that connect a source and a volume.
Buildings.Fluid.FixedResistances.FixedResistanceDpM res(
+
Buildings.Fluid.FixedResistances.PressureDrop res(
redeclare package Medium = Medium,
m_flow_nominal=0.2,
dp_nominal=10000);
diff --git a/Buildings/Resources/Documentation/userGuide/source/bestPractice.rst b/Buildings/Resources/Documentation/userGuide/source/bestPractice.rst
index 1b1dd86cc57..a2218f71d63 100644
--- a/Buildings/Resources/Documentation/userGuide/source/bestPractice.rst
+++ b/Buildings/Resources/Documentation/userGuide/source/bestPractice.rst
@@ -231,7 +231,7 @@ In some situation, such as the configuration below, connecting multiple connecto
Connection of three components without explicitly introducing a mixer or splitter model.
However, in more complex flow configurations, one may want to explicitly control what branches of a piping or duct network mix. This may be achieved by using an instance of the model
-`SplitterFixedResistanceDpM