Skip to content

Commit

Permalink
merged master
Browse files Browse the repository at this point in the history
  • Loading branch information
JayHuLBL committed Dec 18, 2024
2 parents 4ee7c98 + 27020e5 commit b5b1f9b
Show file tree
Hide file tree
Showing 1,277 changed files with 70,421 additions and 17,198 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ env:
global:
- DOCKER_REPONAME=lbnlblum
- BUILDINGSPY_VERSION=BuildingsPy@0bc654fd913c83f64163be167807e8989eff0293
- OMC_VERSION=ubuntu-2204-omc:1.23.0-1
- OMC_VERSION=ubuntu-2204-omc:1.24.0-1
- OPTIMICA_VERSION=travis-ubuntu-2204-optimica:1.51.6
- DYMOLA_VERSION=travis_ubuntu-2004_dymola:2024xRefresh1-x86_64
- DYMOLA_VERSION=travis_ubuntu-2004_dymola:2025x-x86_64
- ENERGYPLUS_9_6_0=EnergyPlus-9.6.0-f420c06a69-Linux-Ubuntu20.04-x86_64
- ENERGYPLUS_23_1_0=EnergyPlus-23.1.0-87ed9199d4-Linux-Ubuntu20.04-x86_64
- MODELICA_JSON_VERSION=6d950c3592fa021aa914ba4ff34a67cbb69962c6
Expand Down
149 changes: 141 additions & 8 deletions Buildings/.copiedFiles.txt

Large diffs are not rendered by default.

18 changes: 7 additions & 11 deletions Buildings/Air/Systems/SingleZone/VAV/ChillerDXHeatingEconomizer.mo
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,12 @@ model ChillerDXHeatingEconomizer
final m_flow_nominal=mAir_flow_nominal,
final nominalValuesDefineDefaultPressureCurve=true,
final dp_nominal=875,
final per(
final etaHydMet=Buildings.Fluid.Movers.BaseClasses.Types.HydraulicEfficiencyMethod.NotProvided,
final etaMotMet=Buildings.Fluid.Movers.BaseClasses.Types.MotorEfficiencyMethod.NotProvided),
final per(final etaHydMet=Buildings.Fluid.Movers.BaseClasses.Types.HydraulicEfficiencyMethod.NotProvided,
final etaMotMet=Buildings.Fluid.Movers.BaseClasses.Types.MotorEfficiencyMethod.NotProvided),
final energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
final allowFlowReversal=false,
final use_inputFilter=false,
redeclare package Medium = MediumA)
"Supply fan"
final use_riseTime=false,
redeclare package Medium = MediumA) "Supply fan"
annotation (Placement(transformation(extent={{-30,30},{-10,50}})));
Buildings.Fluid.FixedResistances.PressureDrop totalRes(
final m_flow_nominal=mAir_flow_nominal,
Expand Down Expand Up @@ -182,7 +180,7 @@ model ChillerDXHeatingEconomizer
extent={{10,-10},{-10,10}},
origin={138,-174})));
Buildings.Fluid.Movers.FlowControlled_m_flow pumChiWat(
final use_inputFilter=false,
final use_riseTime=false,
final allowFlowReversal=false,
redeclare package Medium = MediumW,
final energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
Expand All @@ -195,9 +193,7 @@ model ChillerDXHeatingEconomizer
final dp_nominal=12000,
final inputType=Buildings.Fluid.Types.InputType.Continuous,
final nominalValuesDefineDefaultPressureCurve=true)
"Pump for chilled water loop"
annotation (
Placement(transformation(
"Pump for chilled water loop" annotation (Placement(transformation(
extent={{-10,-10},{10,10}},
rotation=90,
origin={120,-90})));
Expand Down Expand Up @@ -664,4 +660,4 @@ First implementation.
</li>
</ul>
</html>"));
end ChillerDXHeatingEconomizer;
end ChillerDXHeatingEconomizer;
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ model ConventionalWinter
extends Buildings.Air.Systems.SingleZone.VAV.Examples.OptimalStart.ConventionalSpring;

annotation (experiment(
StartTime=0,
StopTime=604800,
Tolerance=1e-06),
__Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Air/Systems/SingleZone/VAV/Examples/OptimalStart/ConventionalWinter.mos"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ model Guideline36Winter
extends Buildings.Air.Systems.SingleZone.VAV.Examples.OptimalStart.Guideline36Spring;

annotation (experiment(
StartTime=0,
StopTime=604800,
Tolerance=1e-06),
__Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Air/Systems/SingleZone/VAV/Examples/OptimalStart/Guideline36Winter.mos"
Expand Down
13 changes: 9 additions & 4 deletions Buildings/Airflow/Multizone/BaseClasses/DoorDiscretized.mo
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ partial model DoorDiscretized
Modelica.Units.SI.Velocity vTop "Velocity at top of opening from A to B";
Modelica.Units.SI.Velocity vBot "Velocity at bottom of opening from A to B";

protected
parameter Modelica.Units.SI.Length dh=hOpe/nCom "Height of each compartment";

input Modelica.Units.SI.Length dh=hOpe/nCom "Height of each compartment";
protected
parameter Medium.ThermodynamicState sta_default=Medium.setState_pTX(
T=Medium.T_default,
p=Medium.p_default,
Expand All @@ -28,11 +28,11 @@ protected
parameter Modelica.Units.SI.Density rho_default=Medium.density(sta_default)
"Density, used to compute fluid volume";

parameter Real hAg[nCom](each unit="m2/s2")=
input Real hAg[nCom](each unit="m2/s2")=
{Modelica.Constants.g_n*(hA - (i - 0.5)*dh) for i in 1:nCom}
"Product g*h_i for each compartment";

parameter Real hBg[nCom](each unit="m2/s2")=
input Real hBg[nCom](each unit="m2/s2")=
{Modelica.Constants.g_n*(hB - (i - 0.5)*dh) for i in 1:nCom}
"Product g*h_i for each compartment";
Modelica.Units.SI.AbsolutePressure pA[nCom](each nominal=101325)
Expand Down Expand Up @@ -118,6 +118,11 @@ using the model for a door that can be open or closed.
revisions="<html>
<ul>
<li>
October 29, 2024, by Klaas De Jonge:<br/>
Unprotected <code>dh</code> and changed prefixes of <code>dh</code>,<code>hAg</code> and <code>hBg</code> to <code>input</code>.<br/>
This is for <a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1935\">#1935</a>.
</li>
<li>
January 8, 2019, by Michael Wetter:<br/>
Moved parameter <code>CD</code> from
<a href=\"modelica://Buildings.Airflow.Multizone.BaseClasses.DoorDiscretized\">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ model ElectricChillerParallel "Multiple identical electric chillers"
redeclare final Buildings.Fluid.Chillers.ElectricEIR chi[num](
final per=per));

replaceable parameter Buildings.Fluid.Chillers.Data.ElectricEIR.Generic per[num]
"Performance data"
annotation (choicesAllMatching = true,
Placement(transformation(extent={{42,74},{62,94}})));
replaceable parameter Buildings.Fluid.Chillers.Data.ElectricEIR.Generic per[
numAct] "Performance data" annotation (choicesAllMatching=true, Placement(
transformation(extent={{42,74},{62,94}})));
annotation ( Documentation(info="<html>
<p>
This model implements a chiller parallel with <code>num</code> identical chillers. For the chiller model please see
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ model ElectricChillerParallel "Model that test electric chiller parallel"
per2 "Chiller performance data"
annotation (Placement(transformation(extent={{32,50},{52,70}})));
Buildings.Applications.BaseClasses.Equipment.ElectricChillerParallel chiPar(
num=2,
redeclare package Medium1 = Medium1,
redeclare package Medium2 = Medium2,
m1_flow_nominal=mEva_flow_nominal,
Expand Down Expand Up @@ -104,10 +103,10 @@ equation
annotation (Line(points={{-20,-50},{-16,-50},{-16,-26},{-10,-26}},
color={0,127,255}));
connect(greaterThreshold.y, chiPar.on[1])
annotation (Line(points={{-19,60},{-16,60},{-16,-17},{-12,-17}},
annotation (Line(points={{-19,60},{-16,60},{-16,-16},{-12,-16}},
color={255,0,255}));
connect(greaterThreshold.y, chiPar.on[2])
annotation (Line(points={{-19,60},{-16,60},{-16,-15},{-12,-15}},
annotation (Line(points={{-19,60},{-16,60},{-16,-16},{-12,-16}},
color={255,0,255}));
connect(TSet.y, chiPar.TSet)
annotation (Line(points={{-59,30},{-28,30},{-28,-20},{-12,-20}},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ model PumpParallel "Example that tests the model pump parallels"
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
threshold=thr1,
tau=1,
use_inputFilter=false)
"Pumps with speed controlled"
use_riseTime=false) "Pumps with speed controlled"
annotation (Placement(transformation(extent={{-18,30},{2,50}})));

Buildings.Fluid.FixedResistances.PressureDrop dp2(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,19 @@ model ConstantSpeedPumpStage "Staging control for constant speed pumps"

Modelica.Blocks.Interfaces.IntegerInput cooMod
"Cooling mode - 0:off, 1: free cooling mode; 2: partially mechanical cooling; 3: fully mechanical cooling"
annotation (Placement(transformation(extent={{-140,30},{-100,70}})));
annotation (Placement(transformation(extent={{-140,40},{-100,80}}),
iconTransformation(extent={{-140,40},{-100,80}})));
Modelica.Blocks.Interfaces.BooleanInput on
"On signal of the plant"
annotation (Placement(transformation(extent={{-140,-40},{-100,0}}),
iconTransformation(extent={{-140,-20},{-100,20}})));
Modelica.Blocks.Interfaces.IntegerInput numOnChi
"The number of running chillers"
annotation (Placement(transformation(extent={{-140,-70},{-100,-30}})));
annotation (Placement(transformation(extent={{-140,-80},{-100,-40}}),
iconTransformation(extent={{-140,-80},{-100,-40}})));
Modelica.Blocks.Interfaces.RealOutput y[2] "On/off signal - 0: off; 1: on"
annotation (Placement(transformation(extent={{100,-10},{120,10}})));
annotation (Placement(transformation(extent={{100,30},{120,50}}),
iconTransformation(extent={{100,-10},{120,10}})));

Modelica.StateGraph.Transition con1(
enableTimer=true,
Expand All @@ -33,13 +40,13 @@ model ConstantSpeedPumpStage "Staging control for constant speed pumps"
rotation=-90,
origin={-40,10})));
Modelica.StateGraph.InitialStep off(nIn=1, nOut=1)
"Free cooling mode"
"Free cooling mode"
annotation (Placement(transformation(
extent={{-10,10},{10,-10}},
rotation=-90,
origin={-40,70})));
Modelica.StateGraph.StepWithSignal twoOn(nIn=1, nOut=1)
"Two chillers are commanded on"
"Two chillers are commanded on"
annotation (Placement(transformation(
extent={{-10,10},{10,-10}},
rotation=-90,
Expand Down Expand Up @@ -80,19 +87,24 @@ model ConstantSpeedPumpStage "Staging control for constant speed pumps"
inner Modelica.StateGraph.StateGraphRoot stateGraphRoot
annotation (Placement(transformation(extent={{60,60},{80,80}})));
Modelica.Blocks.Tables.CombiTable1Ds combiTable1Ds(table=[0,0,0; 1,1,0; 2,1,1])
annotation (Placement(transformation(extent={{70,-10},{90,10}})));

annotation (Placement(transformation(extent={{70,30},{90,50}})));
Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt(
final integerTrue=1,
final integerFalse=0)
annotation (Placement(transformation(extent={{20,-50},{40,-30}})));
annotation (Placement(transformation(extent={{20,-60},{40,-40}})));
Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt1(
final integerFalse=0, final integerTrue=2)
annotation (Placement(transformation(extent={{20,-90},{40,-70}})));
Buildings.Controls.OBC.CDL.Integers.Add addInt
annotation (Placement(transformation(extent={{60,-70},{80,-50}})));
annotation (Placement(transformation(extent={{60,-80},{80,-60}})));
Buildings.Controls.OBC.CDL.Conversions.IntegerToReal intToRea
annotation (Placement(transformation(extent={{40,-10},{60,10}})));
annotation (Placement(transformation(extent={{40,30},{60,50}})));
Buildings.Controls.OBC.CDL.Integers.Switch intSwi
"Disable pumps when the plant is disabled"
annotation (Placement(transformation(extent={{60,-10},{80,10}})));
Buildings.Controls.OBC.CDL.Integers.Sources.Constant zer(final k=0)
"Constant zero"
annotation (Placement(transformation(extent={{20,-30},{40,-10}})));

equation
connect(off.outPort[1], con1.inPort)
Expand All @@ -102,12 +114,12 @@ equation
pattern=LinePattern.Dash));
connect(con1.outPort, oneOn.inPort[1])
annotation (Line(
points={{-40,38.5},{-40,26},{-40.5,26},{-40.5,21}},
points={{-40,38.5},{-40,26},{-39.75,26},{-39.75,21}},
color={0,0,0},
pattern=LinePattern.Dash));
connect(con2.inPort, oneOn.outPort[1])
annotation (Line(
points={{-40,-36},{-40,-10},{-40.25,-10},{-40.25,-0.5}},
points={{-40,-36},{-40,-10},{-39.875,-10},{-39.875,-0.5}},
color={0,0,0},
pattern=LinePattern.Dash));
connect(con2.outPort, twoOn.inPort[1])
Expand All @@ -127,30 +139,36 @@ equation
pattern=LinePattern.Dash));
connect(con3.outPort, oneOn.inPort[2])
annotation (Line(
points={{-10,-38.5},{-10,26},{-39.5,26},{-39.5,21}},
points={{-10,-38.5},{-10,26},{-40.25,26},{-40.25,21}},
color={0,0,0},
pattern=LinePattern.Dash));
connect(con4.inPort, oneOn.outPort[2])
annotation (Line(
points={{-8,66},{-8,-10},{-39.75,-10},{-39.75,-0.5}},
points={{-8,66},{-8,-10},{-40.125,-10},{-40.125,-0.5}},
color={0,0,0},
pattern=LinePattern.Dash));
connect(combiTable1Ds.y, y)
annotation (Line(points={{91,0},{91,0},{110,0}},
color={0,0,127}));
connect(oneOn.active, booToInt.u) annotation (Line(points={{-29,10},{12,10},{
12,-40},{18,-40}}, color={255,0,255}));
annotation (Line(points={{91,40},{110,40}}, color={0,0,127}));
connect(oneOn.active, booToInt.u) annotation (Line(points={{-29,10},{12,10},{12,
-50},{18,-50}}, color={255,0,255}));
connect(twoOn.active, booToInt1.u)
annotation (Line(points={{-29,-80},{18,-80}}, color={255,0,255}));
connect(booToInt.y, addInt.u1) annotation (Line(points={{41,-40},{48,-40},{48,
-54},{58,-54}}, color={255,127,0}));
connect(booToInt1.y, addInt.u2) annotation (Line(points={{41,-80},{48,-80},{
48,-66},{58,-66}}, color={255,127,0}));
annotation (Line(points={{-29,-80},{18,-80}}, color={255,0,255}));
connect(booToInt.y, addInt.u1) annotation (Line(points={{42,-50},{48,-50},{48,
-64},{58,-64}}, color={255,127,0}));
connect(booToInt1.y, addInt.u2) annotation (Line(points={{42,-80},{48,-80},{48,
-76},{58,-76}}, color={255,127,0}));
connect(intToRea.y, combiTable1Ds.u)
annotation (Line(points={{61,0},{68,0}}, color={0,0,127}));
connect(addInt.y, intToRea.u) annotation (Line(points={{81,-60},{88,-60},{88,
-20},{30,-20},{30,0},{38,0}}, color={255,127,0}));
annotation ( Documentation(info="<html>
annotation (Line(points={{62,40},{68,40}}, color={0,0,127}));
connect(on, intSwi.u2) annotation (Line(points={{-120,-20},{0,-20},{0,0},{58,0}},
color={255,0,255}));
connect(addInt.y, intSwi.u1) annotation (Line(points={{82,-70},{90,-70},{90,-30},
{48,-30},{48,8},{58,8}}, color={255,127,0}));
connect(zer.y, intSwi.u3) annotation (Line(points={{42,-20},{54,-20},{54,-8},{
58,-8}}, color={255,127,0}));
connect(intSwi.y, intToRea.u) annotation (Line(points={{82,0},{90,0},{90,20},{
30,20},{30,40},{38,40}}, color={255,127,0}));

annotation (Documentation(info="<html>
<p>
This model describes a simple staging control for two constant-speed pumps in
a chilled water plant with two chillers and a waterside economizer (WSE). The staging sequence
Expand All @@ -168,9 +186,15 @@ equals to the number of running chillers.
</html>", revisions="<html>
<ul>
<li>
September 3, 2024, by Jianjun Hu:<br/>
Added plant on signal to pumps control.
This is for
<a href=\"https://github.com/lbl-srg/modelica-buildings/issues/3989\">issue 3989</a>.
</li>
<li>
September 11, 2017, by Michael Wetter:<br/>
Revised switch that selects the operation mode for
<a href=\"https://github.com/lbl-srg/modelica-buildings/issues/921\">issue 921</a>
<a href=\"https://github.com/lbl-srg/modelica-buildings/issues/921\">issue 921</a>.
</li>
<li>
September 2, 2017, by Michael Wetter:<br/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,31 @@ model ConstantSpeedPumpStage
conSpePumSta(
tWai=30)
"Staging controller for constant speed pumps"
annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
annotation (Placement(transformation(extent={{60,-10},{80,10}})));
Modelica.Blocks.Sources.IntegerTable cooMod(
table=[0,0; 360,1;
720,2; 1080,3])
"Cooling mode"
annotation (Placement(transformation(extent={{-60,40},{-40,60}})));
annotation (Placement(transformation(extent={{-80,40},{-60,60}})));
Modelica.Blocks.Sources.IntegerTable chiNumOn(
table=[0,0; 360,1; 540,2; 720,1;
900,2; 1080,1; 1260,2; 1440,1])
"The number of running chillers"
annotation (Placement(transformation(extent={{-60,-40},{-40,-20}})));
annotation (Placement(transformation(extent={{-80,-60},{-60,-40}})));
Buildings.Controls.OBC.CDL.Integers.GreaterThreshold plaOn
"Check if the plant is on"
annotation (Placement(transformation(extent={{0,-10},{20,10}})));
equation
connect(cooMod.y, conSpePumSta.cooMod)
annotation (Line(points={{-39,50},{-20,50},{-20,5},{-12,5}},
annotation (Line(points={{-59,50},{40,50},{40,6},{58,6}},
color={255,127,0}));
connect(chiNumOn.y,conSpePumSta.numOnChi)
annotation (Line(points={{-39,-30},{-20,-30},{-20,-5},{-12,-5}},
annotation (Line(points={{-59,-50},{40,-50},{40,-6},{58,-6}},
color={255,127,0}));
connect(plaOn.y, conSpePumSta.on)
annotation (Line(points={{22,0},{58,0}}, color={255,0,255}));
connect(cooMod.y, plaOn.u) annotation (Line(points={{-59,50},{-20,50},{-20,0},
{-2,0}}, color={255,127,0}));
annotation ( __Dymola_Commands(file=
"modelica://Buildings/Resources/Scripts/Dymola/Applications/DataCenters/ChillerCooled/Controls/Validation/ConstantSpeedPumpStage.mos"
"Simulate and plot"),
Expand All @@ -39,6 +46,12 @@ Buildings.Applications.DataCenters.ChillerCooled.Controls.ConstantSpeedPumpStage
</html>", revisions="<html>
<ul>
<li>
September 3, 2024, by Jianjun Hu:<br/>
Added plant on signal to pumps control.
This is for
<a href=\"https://github.com/lbl-srg/modelica-buildings/issues/3989\">issue 3989</a>.
</li>
<li>
August 25, 2017, by Yangyang Fu:<br/>
First implementation.
</li>
Expand Down
Loading

0 comments on commit b5b1f9b

Please sign in to comment.