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

Issue2859 dual source TES #2899

Merged
merged 473 commits into from
Aug 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
473 commits
Select commit Hold shift + click to select a range
24abd2c
reinstated check valve in NetworkConnection
hcasperfu Oct 4, 2022
ceee876
removed delay blocks
hcasperfu Oct 4, 2022
bba06f8
adjusted graphics
hcasperfu Oct 5, 2022
db53741
updated var names in mos
hcasperfu Oct 6, 2022
919f704
improved documentation
hcasperfu Oct 6, 2022
194b7a3
[ci skip]
hcasperfu Oct 6, 2022
a4c989b
More details for DualSource schematic
hcasperfu Oct 6, 2022
c2003d2
updated usersguide
hcasperfu Oct 7, 2022
5e833d8
revised validation for NetworkConnection
hcasperfu Oct 7, 2022
d835429
added filter to flow source
hcasperfu Oct 7, 2022
37bfa11
updated documentation [ci skip]
hcasperfu Oct 7, 2022
f7a4a79
added ReturnValve block
hcasperfu Oct 21, 2022
bbd8412
changed vars in mos
hcasperfu Oct 21, 2022
27d6711
added PipeEnd model
hcasperfu Oct 21, 2022
b0a6049
unified direction & usage of Connection2Pipe
hcasperfu Oct 21, 2022
6941be9
added pressure loss in district
hcasperfu Oct 21, 2022
6783c49
created ParallelJunctions model
hcasperfu Oct 31, 2022
0172c5d
renamed fluid ports
hcasperfu Nov 1, 2022
a46f9af
exposed volume start temperatures as parameters
hcasperfu Nov 1, 2022
8750f7c
replaced Connection2Pipe with ParallelJunctions
hcasperfu Nov 1, 2022
a0252c5
adjusted IdealUser model
hcasperfu Nov 1, 2022
e8f547a
corrected pump pressure curves
hcasperfu Nov 1, 2022
6f88ed7
adjusted ideal flow source filter
hcasperfu Nov 1, 2022
1d83930
adjusted graphics
hcasperfu Nov 1, 2022
8150a25
removed pumSup1.allowFlowReversal=false
hcasperfu Nov 1, 2022
ab4d6c4
m_flow_nominal is no longer final
hcasperfu Nov 1, 2022
0dc4404
Revert "removed ParallelPipes model"
hcasperfu Nov 1, 2022
01a71d9
improved parameterisation of ParallelPipes
hcasperfu Oct 20, 2022
2092927
added district resistance back
hcasperfu Nov 1, 2022
eb467dc
changed mos for DualSource
hcasperfu Nov 2, 2022
fd0d064
corrected variable descriptions
hcasperfu Nov 2, 2022
710331a
improved pump parameterisation
hcasperfu Nov 2, 2022
fc9532d
removed PressureDrop in IdealUser, adjustments
hcasperfu Nov 2, 2022
5e9305f
specified displayUnit
hcasperfu Nov 2, 2022
77d5783
improved parameterisation of DualSource
hcasperfu Nov 3, 2022
1f52528
replace FluidPassThrough with LosslessPipe
hcasperfu Nov 3, 2022
641ebaa
deleted FluidPassThrough
hcasperfu Nov 3, 2022
50a91e4
added missing parameter keyword
hcasperfu Nov 3, 2022
60ffab5
created ReversibleConnection
hcasperfu Nov 4, 2022
c865f92
added flow rate variables in ReversibleConnection
hcasperfu Nov 4, 2022
1ad94a7
adjusted graphics Validation.NetworkConnection
hcasperfu Nov 4, 2022
ff8842a
renamed variables in mos
hcasperfu Nov 4, 2022
69dec82
adjusted parameterisation of ReversibleConnection
hcasperfu Nov 4, 2022
9ce33bd
added return branch to NetworkConnection
hcasperfu Nov 4, 2022
0cedcb4
adjusted junctions RevesibleConnection
hcasperfu Nov 7, 2022
8510c45
deleted vars no longer needed
hcasperfu Nov 7, 2022
048518c
corrected package order
hcasperfu Nov 8, 2022
c3b01cc
split RemoteCharging block for supply and return
hcasperfu Nov 8, 2022
3a6e628
graphic adjustment
hcasperfu Nov 8, 2022
8003afe
adjusted pressure drop structure
hcasperfu Nov 8, 2022
be6550f
renamed validation model
hcasperfu Nov 8, 2022
361e2a0
prepared model for extension
hcasperfu Nov 8, 2022
b8de29c
changed icon
hcasperfu Nov 8, 2022
8f85139
grouped pump valve control signals to arrays
hcasperfu Nov 8, 2022
e7748b1
renaming in mos
hcasperfu Nov 8, 2022
1953c19
adjusted SingleSource graphic
hcasperfu Nov 8, 2022
18c7274
removed condition of perRet
hcasperfu Nov 8, 2022
21121ee
changed reverseActing parameterisation
hcasperfu Nov 8, 2022
cc3cc7f
preliminary OpenTank validation model
hcasperfu Nov 9, 2022
e3f5d71
created IdealConnection model
hcasperfu Nov 11, 2022
7b78c88
added limiter for flow and pressure individually
hcasperfu Nov 11, 2022
3bf509a
created IdealOpenTank model
hcasperfu Nov 11, 2022
7a038fc
added signal filter
hcasperfu Nov 11, 2022
132cf91
created IdealDualSource
hcasperfu Nov 12, 2022
f452748
documentation [ci skip]
hcasperfu Nov 12, 2022
9eb0247
created IdealReversibleConnection
hcasperfu Jan 8, 2023
71922f3
exposed constant efficiency as parameter
hcasperfu Jan 8, 2023
2dd6f81
improved block icon
hcasperfu Jan 8, 2023
a46dbf4
added filter for stpt signal
hcasperfu Jan 8, 2023
13e5591
changed defaultComponentName
hcasperfu Jan 8, 2023
f56a760
improved icon
hcasperfu Jan 8, 2023
81cd0ac
moved model
hcasperfu Jan 8, 2023
80b27ef
partial ideal network for validation models
hcasperfu Jan 9, 2023
3777a1f
specialised the base model for remote charging
hcasperfu Jan 10, 2023
5860ba9
added input filter
hcasperfu Jan 10, 2023
5500773
created validation model with coupled pressure
hcasperfu Jan 10, 2023
f73b5bb
created vali model with decoupled pressure
hcasperfu Jan 10, 2023
97b61a8
deleted unneeded flow meters
hcasperfu Jan 10, 2023
7f8efab
graphics adjustements
hcasperfu Jan 10, 2023
77d8fa0
removed old validation models
hcasperfu Jan 10, 2023
f386ca5
further simplified the IdealUser model
hcasperfu Jan 11, 2023
998daee
added filter for setpoint signal
hcasperfu Jan 11, 2023
7355d62
created much simplified closed tank example
hcasperfu Jan 11, 2023
1c8bc38
minor tweaks
hcasperfu Jan 11, 2023
92f09d8
created model script
hcasperfu Jan 11, 2023
d090a79
created open tank example with coupled pressure
hcasperfu Jan 11, 2023
369a23b
created decoupled example
hcasperfu Jan 12, 2023
4313ade
copied over documentation pending update
hcasperfu Jan 12, 2023
d450e89
deleted old example models
hcasperfu Jan 12, 2023
c3cd8e4
deleted assets no longer useful
hcasperfu Jan 13, 2023
4b61a32
move power computation block
hcasperfu Jan 13, 2023
ca8cb9c
removed branch ports model
hcasperfu Jan 13, 2023
1dd6a96
renamed tank branch ports
hcasperfu Jan 13, 2023
6a25cc5
updated figures
hcasperfu Jan 13, 2023
b9f3321
updated documentation
hcasperfu Jan 13, 2023
9d536c6
reorganised imagies in folders
hcasperfu Jan 13, 2023
e10b5a7
reorganised code
hcasperfu Jan 13, 2023
d6de65b
cleaned out use of the nominal record
hcasperfu Jan 14, 2023
eb39c33
completed documentation
hcasperfu Jan 17, 2023
8eb7c41
deleted folder
hcasperfu Jan 17, 2023
e0de37c
corrected tank flow var name in validation models
hcasperfu Jan 17, 2023
d8ff3c4
Small edits to documentation
dhblum Jan 27, 2023
7e2e1c8
created IdealTemperatureSource
hcasperfu Feb 8, 2023
6087196
added IdealTemperatureSource to IdealUser
hcasperfu Feb 8, 2023
fa5d466
added IdealTemperatureSource to example models
hcasperfu Feb 8, 2023
32ca8b7
added final to various modifications
hcasperfu Feb 8, 2023
5968e2e
renamed variables for clarification
hcasperfu Feb 8, 2023
64eb143
exposed tank parameters at branch component
hcasperfu Feb 9, 2023
b9fae26
adjusted and corrected values of T_start
hcasperfu Feb 10, 2023
cac4213
created tank temperature validation model
hcasperfu Feb 13, 2023
0980f65
started adding temp to example models
hcasperfu Feb 15, 2023
6005848
created SOC block and added it to validation model
hcasperfu Feb 15, 2023
cc5985c
made icon and documentation
hcasperfu Feb 15, 2023
43acf4e
cleaned up mos files
hcasperfu Feb 15, 2023
afd1ea5
applied multiplexer blocks for routing
hcasperfu Feb 15, 2023
532f651
refactored TankTemperature
hcasperfu Feb 20, 2023
f1ad8c3
created state graph for flow control
hcasperfu Feb 21, 2023
447c3eb
refactored TankTemperature to use state graph
hcasperfu Feb 21, 2023
7e270f7
improved and corrected the state graph
hcasperfu Feb 21, 2023
31fc45e
adjusted .mos file
hcasperfu Feb 21, 2023
2075d45
renamed validation model
hcasperfu Feb 21, 2023
3d3751a
documentation
hcasperfu Feb 21, 2023
6987fa1
tidied code
hcasperfu Feb 21, 2023
c0819d9
implemented FlowControl for examples (ongoing)
hcasperfu Feb 22, 2023
a9fd9d3
added filter to FlowControl output
hcasperfu Feb 22, 2023
ef9adff
made the output filter conditional
hcasperfu Feb 22, 2023
f83372f
corrected var names
hcasperfu Feb 22, 2023
5a351ab
updated .mos files
hcasperfu Feb 22, 2023
092b195
adjusted example model schedule
hcasperfu Feb 23, 2023
cec14f0
changed filter frequency
hcasperfu Feb 23, 2023
d1f8af2
minor adjustments to output interfaces
hcasperfu Feb 23, 2023
b49dd05
removed duplicate filters, adjusted frequency
hcasperfu Feb 23, 2023
c33cec6
changed solver selection in mos
hcasperfu Feb 23, 2023
68159c0
made icon for FlowControl
hcasperfu Feb 23, 2023
01b4b2f
adjusted icons and graphics
hcasperfu Feb 23, 2023
deed693
merged master
hcasperfu Feb 23, 2023
ec6706f
removed old schedule blocks
hcasperfu Feb 23, 2023
d23e627
replaced pumps with new preconfigured models
hcasperfu Feb 23, 2023
806151a
updated documentation
hcasperfu Feb 23, 2023
21b58d2
improved and corrected state graph
hcasperfu Feb 24, 2023
fbee95e
control block documentation
hcasperfu Feb 24, 2023
cbf46ab
minor html fix
hcasperfu Feb 24, 2023
26b07ab
ensured some filters are synced
hcasperfu Feb 24, 2023
fca7b13
changed solver settings in mos
hcasperfu Feb 24, 2023
ed5b82d
removed unnecessary filter in IdealUser
hcasperfu Feb 24, 2023
c15513f
updated usersguide and schematic [ci skip]
hcasperfu Feb 25, 2023
9f73836
added control diagram to usersguide [ci skip]
hcasperfu Feb 28, 2023
b2af8a5
deleted decoupled validation model
hcasperfu Mar 20, 2023
faf5889
renamed validation model
hcasperfu Mar 20, 2023
1f8a6ea
updated documentation
hcasperfu Mar 20, 2023
aaeee10
deleted example models
hcasperfu Mar 20, 2023
487dfd6
renamed models
hcasperfu Mar 20, 2023
fe39d84
deleted files
hcasperfu Mar 20, 2023
b65fb68
updated documentations
hcasperfu Mar 20, 2023
cbdbfd8
created connection with speed pump
hcasperfu Mar 23, 2023
66037e1
merged two validation models
hcasperfu Mar 24, 2023
42bc6b8
cleaned out mos files
hcasperfu Mar 24, 2023
e02270a
deleted ideal connection model
hcasperfu Mar 27, 2023
ed50353
updated schematics
hcasperfu Mar 28, 2023
1a327ac
updated usersguide [ci skip]
hcasperfu Mar 28, 2023
397e2e0
changed user valve filter dynamics
hcasperfu Apr 12, 2023
78b1dfa
organised TankBranch parameters in dialog
hcasperfu Apr 13, 2023
4ae46d6
renamed SOC to TankStatus
hcasperfu Apr 13, 2023
19f75c8
replaced heat port w signal input
hcasperfu Apr 13, 2023
45fd407
recreated TankStatus as block w state graph
hcasperfu Apr 17, 2023
d1f1ee9
replaced the TankStatus block
hcasperfu Apr 17, 2023
7e5f47a
added overcool control, needs improvement
hcasperfu Apr 18, 2023
809302b
improved implementation of overcool state
hcasperfu Apr 18, 2023
a8b39bc
adjusted validation model schedule and docu
hcasperfu Apr 18, 2023
f8fa0ef
adjusted schedule and docu of example model
hcasperfu Apr 19, 2023
46ca996
documentation for the new TankStatus block
hcasperfu Apr 19, 2023
f5758e9
deleted old TankStatus class
hcasperfu Apr 19, 2023
63b7a42
removed one unnecessary step
hcasperfu Apr 19, 2023
cc84e19
documentation and icon
hcasperfu Apr 19, 2023
aacaec2
renamed commands
hcasperfu Apr 20, 2023
e644fa6
adjusted icon
hcasperfu Apr 20, 2023
889e933
corrected parameterisation in ReversibleConnection
hcasperfu Apr 21, 2023
2cec743
updated schematics in usersguide
hcasperfu Apr 21, 2023
40facfd
updated usersguide
hcasperfu Apr 21, 2023
171353f
adjusted IdealTemperatureSource validation
hcasperfu Apr 21, 2023
da78a94
documentation for ReversibleConnection [ci skip]
hcasperfu Apr 21, 2023
263aebe
merged master [ci skip]
hcasperfu Apr 21, 2023
8a2c4ed
removed PipeEnd model
hcasperfu Apr 28, 2023
45336c3
replaced MSL flow sensor with on from MBL
hcasperfu Apr 28, 2023
c0dcfff
packaged the storage plant to one component
hcasperfu Apr 28, 2023
17b513e
documentation
hcasperfu Apr 28, 2023
f00d828
improved icons
hcasperfu Apr 28, 2023
900dc1c
deleted validation model
hcasperfu Apr 28, 2023
f24392b
updated schematics
hcasperfu Apr 28, 2023
2f0751a
updated usersguide
hcasperfu Apr 28, 2023
f03ef0d
reorganised the package
hcasperfu Apr 29, 2023
02d42c6
setup unit test
hcasperfu Apr 29, 2023
46b658d
deleted old omc scripts
hcasperfu May 1, 2023
9a0d786
merged master
hcasperfu May 18, 2023
b556b10
replaced IdealTemperatureSource w PropertySource_T
hcasperfu May 18, 2023
20c5175
removed IdealTemperatureSource
hcasperfu May 18, 2023
36c764e
Small doc edits
dhblum May 26, 2023
8e0181b
Small doc edit [ci skip]
dhblum May 26, 2023
4705f3b
renamed chiIsOnl to chiEnaSta
hcasperfu May 30, 2023
086e59b
added and adjusted description strings
hcasperfu May 30, 2023
1803275
added more missing description strings
hcasperfu May 30, 2023
0f2a49e
unified wording for chiller status
hcasperfu May 30, 2023
de2a54a
moved chiller out of StoragePlant component
hcasperfu May 31, 2023
9a8c304
adjusted connection lines for neatness [ci skip]
hcasperfu May 31, 2023
9b8ce2f
improved documentation
hcasperfu May 31, 2023
1658dd9
moved content of usersguide to documentation
hcasperfu May 31, 2023
71d9673
moved package to Experimental.DHC.Plants.Cooling
hcasperfu May 31, 2023
07d9352
integrated some unnecessary subclasses
hcasperfu Jun 1, 2023
6dbad57
made the junction components protected
hcasperfu Jun 1, 2023
47eaf87
removed unnecessary components
hcasperfu Jun 1, 2023
21ff088
added component name to icon
hcasperfu Jun 1, 2023
2f32991
added missing documentation
hcasperfu Jun 1, 2023
d5ac1c7
changed overcooled state out-transition
hcasperfu Jun 1, 2023
20c1089
added dp signal output from storage plant for P1
hcasperfu Jun 1, 2023
faf6e74
updated documentation and schematics
hcasperfu Jun 2, 2023
9fab7a3
Some doc edits
dhblum Jun 22, 2023
bd1e577
renamed example model
hcasperfu Jun 22, 2023
df77d02
improved documentation
hcasperfu Jun 22, 2023
223c59d
reworded the "hold tank" as "no command"
hcasperfu Jun 22, 2023
88b93e6
corrected mos
hcasperfu Jun 22, 2023
325e04c
decoupled dp sizing of supp pum and ret val
hcasperfu Jun 23, 2023
dcbf236
added output signal for remote charging status
hcasperfu Jun 23, 2023
213c455
implemented min dp signal selection
hcasperfu Jun 23, 2023
c3e6a43
revised parameterisation
hcasperfu Jun 23, 2023
ec4747f
updated results
hcasperfu Jun 23, 2023
7f02e31
excluded model from omc for translation failure
hcasperfu Jun 23, 2023
846b64c
updated schematics
hcasperfu Jun 23, 2023
e8b4e2a
merged master
hcasperfu Jun 29, 2023
df061c8
updated release notes
hcasperfu Jul 7, 2023
72efb48
Merge branch 'master' into issue2859_dualSourceTES
mwetter Jul 30, 2023
d948dac
Removed non-needed parameter T_CWHS_nominal
mwetter Jul 31, 2023
4ae9b49
Reviewed and revised implementation
mwetter Jul 31, 2023
36878ed
Reviewed and revised implementation
mwetter Jul 31, 2023
2970901
moved docu text concerning ideal chiller
hcasperfu Aug 7, 2023
ec75f6f
reverted changes to file
hcasperfu Aug 9, 2023
cdc984b
removed overcool logic
hcasperfu Aug 11, 2023
7bfc87a
updated documentation
hcasperfu Aug 11, 2023
ef62800
updated wording in documentation
hcasperfu Aug 11, 2023
b45bc22
corrected TankStatus block signal index
hcasperfu Aug 11, 2023
9a21325
updated scripts and results
hcasperfu Aug 11, 2023
27eaa8f
corrected unit
hcasperfu Aug 11, 2023
096973f
created validation model for TankStatus block
hcasperfu Aug 11, 2023
7a85b68
updated documentation
hcasperfu Aug 14, 2023
6e0460f
updated schematics
hcasperfu Aug 14, 2023
9135bfa
Revised documentation [ci skip]
mwetter Aug 15, 2023
8137f96
TankStatus no longer uses dTHys as error margin
hcasperfu Aug 17, 2023
5011bdf
added assert(THig > TLow)
hcasperfu Aug 17, 2023
67b95b2
redesigned TankStatus validation model
hcasperfu Aug 17, 2023
0cdef0f
merged master
hcasperfu Aug 17, 2023
441c672
Reformulated to comply with CDL
mwetter Aug 18, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,10 @@ model VariableSpeedPumpStage "Staging control for variable speed pumps"
final integerFalse=0, final integerTrue=2)
annotation (Placement(transformation(extent={{20,-80},{40,-60}})));
Buildings.Controls.OBC.CDL.Integers.Add addInt
"Outputs how many pumps are to be commanded on"
annotation (Placement(transformation(extent={{60,-56},{80,-36}})));
Buildings.Controls.OBC.CDL.Conversions.IntegerToReal intToRea
"Comparison from integer to real signal for number of pumps"
annotation (Placement(transformation(extent={{40,-10},{60,10}})));

Modelica.Blocks.Interfaces.BooleanInput on
Expand All @@ -115,12 +117,12 @@ equation
pattern=LinePattern.Dash));
connect(con1.outPort, oneOn.inPort[1])
annotation (Line(
points={{-50,38.5},{-50,26},{-50.5,26},{-50.5,21}},
points={{-50,38.5},{-50,26},{-49.75,26},{-49.75,21}},
color={0,0,0},
pattern=LinePattern.Dash));
connect(con2.inPort, oneOn.outPort[1])
annotation (Line(
points={{-50,-26},{-50,-10},{-50.25,-10},{-50.25,-0.5}},
points={{-50,-26},{-50,-10},{-49.875,-10},{-49.875,-0.5}},
color={0,0,0},
pattern=LinePattern.Dash));
connect(con2.outPort, twoOn.inPort[1])
Expand All @@ -140,12 +142,12 @@ equation
pattern=LinePattern.Dash));
connect(con3.outPort, oneOn.inPort[2])
annotation (Line(
points={{-10,-38.5},{-10,26},{-49.5,26},{-49.5,21}},
points={{-10,-38.5},{-10,26},{-50.25,26},{-50.25,21}},
color={0,0,0},
pattern=LinePattern.Dash));
connect(con4.inPort, oneOn.outPort[2])
annotation (Line(
points={{-22,48},{-22,-10},{-49.75,-10},{-49.75,-0.5}},
points={{-22,48},{-22,-10},{-50.125,-10},{-50.125,-0.5}},
color={0,0,0},
pattern=LinePattern.Dash));
connect(combiTable1Ds.y, y)
Expand Down
194 changes: 194 additions & 0 deletions Buildings/Experimental/DHC/Plants/Cooling/BaseClasses/IdealUser.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
within Buildings.Experimental.DHC.Plants.Cooling.BaseClasses;
model IdealUser "Ideal user model"
replaceable package Medium =
Modelica.Media.Interfaces.PartialMedium "Medium package";

parameter Modelica.Units.SI.MassFlowRate m_flow_nominal
"Nominal mass flow rate";

parameter Modelica.Units.SI.Temperature T_CHWR_nominal
"Nominal temperature of CHW return";
parameter Modelica.Units.SI.PressureDifference dp_nominal(
final displayUnit="Pa")
"Nominal pressure drop when valve is fully open";

Buildings.Fluid.Actuators.Valves.TwoWayEqualPercentage val(
redeclare final package Medium = Medium,
final use_inputFilter=true,
final dpValve_nominal=dp_nominal/2,
final init=Modelica.Blocks.Types.Init.InitialState,
final dpFixed_nominal=dp_nominal/2,
final m_flow_nominal=m_flow_nominal,
y_start=0) "User control valve"
annotation (Placement(transformation(extent={{0,50},{20,70}})));
Buildings.Controls.Continuous.LimPID conPI(
controllerType=Modelica.Blocks.Types.SimpleController.PI,
k=0.5,
Ti=20,
final reverseActing=true) "PI controller" annotation (Placement(transformation(
extent={{-10,-10},{10,10}},
rotation=0,
origin={-30,80})));
Modelica.Blocks.Interfaces.RealInput mPre_flow(
final quantity = "MassFlowRate",
final unit = "kg/s")
"Load in terms of flow rate prescription" annotation (Placement(
transformation(
extent={{-10,-10},{10,10}},
rotation=0,
origin={-110,80}), iconTransformation(
extent={{-10,-10},{10,10}},
rotation=0,
origin={-110,80})));
Modelica.Blocks.Interfaces.RealOutput yVal_actual(
final unit = "1")
"Consumer control valve actuator position" annotation (Placement(
transformation(
extent={{-10,-10},{10,10}},
rotation=0,
origin={110,80}), iconTransformation(
extent={{10,-10},{-10,10}},
rotation=180,
origin={110,80})));
Buildings.Fluid.Sensors.RelativePressure senRelPre(
redeclare final package Medium = Medium)
"Differential pressure sensor" annotation (Placement(
transformation(
extent={{-10,10},{10,-10}},
rotation=-90,
origin={-72,20})));
Modelica.Blocks.Interfaces.RealOutput dp(
final quantity="PressureDifference",
final unit="Pa",
displayUnit="Pa")
"Differential pressure from the sensor" annotation (Placement(
transformation(
extent={{-10,-10},{10,10}},
rotation=0,
origin={110,20}), iconTransformation(
extent={{10,-10},{-10,10}},
rotation=180,
origin={110,40})));
Modelica.Fluid.Interfaces.FluidPort_a port_a(
p(start=Medium.p_default),
redeclare final package Medium = Medium,
h_outflow(start=Medium.h_default, nominal=Medium.h_default))
"Fluid connector a (positive design flow direction is from port_a to port_b)"
annotation (Placement(transformation(extent={{-110,50},{-90,70}}),
iconTransformation(extent={{-110,50},{-90,70}})));
Modelica.Fluid.Interfaces.FluidPort_b port_b(
p(start=Medium.p_default),
redeclare final package Medium = Medium,
h_outflow(start=Medium.h_default, nominal=Medium.h_default))
"Fluid connector b (positive design flow direction is from port_a to port_b)"
annotation (Placement(transformation(extent={{-90,-70},{-110,-50}}),
iconTransformation(extent={{-90,-70},{-110,-50}})));
Buildings.Fluid.Sensors.MassFlowRate senMasFlo(
redeclare final package Medium = Medium)
"Mass flow rate sensor"
annotation (Placement(transformation(extent={{-20,-70},{-40,-50}})));
Buildings.Fluid.Sources.PropertySource_T proSou(
redeclare final package Medium = Medium,
final use_T_in=true) "Ideal temperature source" annotation (Placement(
transformation(
extent={{10,-10},{-10,10}},
rotation=0,
origin={10,-60})));
Modelica.Blocks.Sources.Constant TRet(final k=T_CHWR_nominal)
"Constant CHW return temperature"
annotation (Placement(transformation(extent={{-20,-40},{0,-20}})));
equation
connect(senRelPre.p_rel, dp) annotation (Line(points={{-63,20},{110,20}},
color={0,0,127}));
connect(val.y_actual, yVal_actual)
annotation (Line(points={{15,67},{40,67},{40,80},{110,80}},
color={0,0,127}));
connect(senRelPre.port_a, port_a) annotation (Line(
points={{-72,30},{-72,60},{-100,60}},
color={0,127,255},
pattern=LinePattern.Dash));
connect(senRelPre.port_b, port_b) annotation (Line(
points={{-72,10},{-72,-60},{-100,-60}},
color={0,127,255},
pattern=LinePattern.Dash));
connect(conPI.y, val.y)
annotation (Line(points={{-19,80},{10,80},{10,72}}, color={0,0,127}));
connect(senMasFlo.port_b, port_b)
annotation (Line(points={{-40,-60},{-100,-60}}, color={0,127,255}));
connect(senMasFlo.m_flow, conPI.u_m)
annotation (Line(points={{-30,-49},{-30,68}}, color={0,0,127}));
connect(port_a, val.port_a)
annotation (Line(points={{-100,60},{0,60}}, color={0,127,255}));
connect(conPI.u_s, mPre_flow)
annotation (Line(points={{-42,80},{-110,80}}, color={0,0,127}));
connect(senMasFlo.port_a, proSou.port_b)
annotation (Line(points={{-20,-60},{0,-60}}, color={0,127,255}));
connect(proSou.port_a, val.port_b) annotation (Line(points={{20,-60},{40,-60},
{40,60},{20,60}}, color={0,127,255}));
connect(TRet.y, proSou.T_in)
annotation (Line(points={{1,-30},{14,-30},{14,-48}}, color={0,0,127}));
annotation (
defaultComponentName = "ideUse",
Documentation(info="<html>
<p>
This is a simple ideal user model used by
<a href=\"Modelica://Buildings.Experimental.DHC.Plants.Cooling.Examples.StoragePlantDualSource\">
Buildings.Experimental.DHC.Plants.Cooling.Examples.StoragePlantDualSource</a>.
The load of the user is described by a varying mass flow rate setpoint.
The valve is controlled to maintain the requested mass flow rate.
The model sets its leaving water temperature to the user-specified temperature
<code>T_CHWR_nominal</code>.
</p>
</html>", revisions="<html>
<ul>
<li>
July 31, 2023, by Michael Wetter:<br/>
Revised implementation, removed unused parameter.
</li>
<li>
February 18, 2022 by Hongxiang Fu:<br/>
First implementation. This is for
<a href=\"https://github.com/lbl-srg/modelica-buildings/issues/2859\">#2859</a>.
</li>
</ul>
</html>"),
Icon(graphics={
Rectangle(
extent={{-100,100},{100,-100}},
lineColor={0,0,0},
fillColor={255,255,255},
fillPattern=FillPattern.Solid),
Rectangle(
extent={{-40,40},{40,-40}},
fillColor={175,175,175},
fillPattern=FillPattern.Solid,
pattern=LinePattern.None),
Rectangle(
extent={{-34,34},{-4,6}},
pattern=LinePattern.None,
fillColor={255,255,255},
fillPattern=FillPattern.Solid,
lineColor={0,0,0}),
Rectangle(
extent={{6,34},{34,6}},
pattern=LinePattern.None,
fillColor={255,255,255},
fillPattern=FillPattern.Solid,
lineColor={0,0,0}),
Rectangle(
extent={{-34,-4},{-4,-34}},
pattern=LinePattern.None,
fillColor={255,255,255},
fillPattern=FillPattern.Solid,
lineColor={0,0,0}),
Rectangle(
extent={{6,-4},{34,-34}},
pattern=LinePattern.None,
fillColor={255,255,255},
fillPattern=FillPattern.Solid,
lineColor={0,0,0}),
Text(
extent={{-151,-100},{149,-140}},
textColor={0,0,255},
textString="%name")}));
end IdealUser;
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
within Buildings.Experimental.DHC.Plants.Cooling.BaseClasses;
model ParallelJunctions "A pair of junctions in parallel"

replaceable package Medium =
Modelica.Media.Interfaces.PartialMedium "Medium package";

parameter Modelica.Units.SI.MassFlowRate m_flow_nominal
"Design mass flow rate (used to approximate dynamics"
annotation (Dialog(group="Nominal condition"));
parameter Modelica.Units.SI.Time tau=30 "Time constant at nominal flow"
annotation (Dialog(tab="Dynamics", group="Nominal condition"));
parameter Modelica.Units.SI.Temperature T1_start=Medium.T_default
"Start temperature of the volume"
annotation(Dialog(tab = "Initialization"));
parameter Modelica.Units.SI.Temperature T2_start=Medium.T_default
"Start temperature of the volume"
annotation(Dialog(tab = "Initialization"));

Modelica.Fluid.Interfaces.FluidPort_a port_a2(
redeclare final package Medium = Medium,
p(final displayUnit="Pa")) "Fluid connector" annotation (
Placement(transformation(extent={{90,-70},{110,-50}}), iconTransformation(
extent={{90,-70},{110,-50}})));
Modelica.Fluid.Interfaces.FluidPort_b port_b1(
redeclare final package Medium = Medium,
p(final displayUnit="Pa")) "Fluid connector" annotation (
Placement(transformation(extent={{90,50},{110,70}}), iconTransformation(
extent={{90,50},{110,70}})));
Modelica.Fluid.Interfaces.FluidPort_b port_b2(
redeclare final package Medium = Medium,
p(final displayUnit="Pa")) "Fluid connector" annotation (
Placement(transformation(extent={{-110,-70},{-90,-50}}),
iconTransformation(extent={{-110,-70},{-90,-50}})));
Modelica.Fluid.Interfaces.FluidPort_a port_a1(
redeclare final package Medium = Medium,
p(final displayUnit="Pa")) "Fluid connector" annotation (
Placement(transformation(extent={{-110,50},{-90,70}}), iconTransformation(
extent={{-110,50},{-90,70}})));
Modelica.Fluid.Interfaces.FluidPort_a port_c1(
redeclare final package Medium = Medium,
p(final displayUnit="Pa")) "Fluid connector" annotation (
Placement(transformation(extent={{-70,90},{-50,110}}), iconTransformation(
extent={{-70,90},{-50,110}})));
Modelica.Fluid.Interfaces.FluidPort_b port_c2(
redeclare final package Medium = Medium,
p(final displayUnit="Pa")) "Fluid connector" annotation (
Placement(transformation(extent={{50,90},{70,110}}), iconTransformation(
extent={{50,90},{70,110}})));
Buildings.Fluid.FixedResistances.Junction jun1(
redeclare final package Medium = Medium,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
final tau=tau,
final T_start=T1_start,
final m_flow_nominal={-m_flow_nominal,-m_flow_nominal,m_flow_nominal},
final dp_nominal={0,0,0})
"Junction"
annotation (Placement(transformation(extent={{-70,70},{-50,50}})));
Buildings.Fluid.FixedResistances.Junction jun2(
redeclare final package Medium = Medium,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
final tau=tau,
final T_start=T2_start,
final m_flow_nominal={m_flow_nominal,m_flow_nominal,-m_flow_nominal},
final dp_nominal={0,0,0})
"Junction"
annotation (Placement(transformation(extent={{50,-50},{70,-70}})));
equation
connect(port_a1, jun1.port_1)
annotation (Line(points={{-100,60},{-70,60}}, color={0,127,255}));
connect(jun1.port_3,port_c1)
annotation (Line(points={{-60,70},{-60,100}}, color={0,127,255}));
connect(jun1.port_2, port_b1)
annotation (Line(points={{-50,60},{100,60}}, color={0,127,255}));
connect(port_b2, jun2.port_1)
annotation (Line(points={{-100,-60},{50,-60}}, color={0,127,255}));
connect(jun2.port_2, port_a2)
annotation (Line(points={{70,-60},{100,-60}}, color={0,127,255}));
connect(jun2.port_3,port_c2)
annotation (Line(points={{60,-50},{60,100}}, color={0,127,255}));
annotation (Icon(coordinateSystem(preserveAspectRatio=false), graphics={
Rectangle(
extent={{-100,100},{100,-100}},
lineColor={0,0,0},
fillColor={255,255,255},
fillPattern=FillPattern.Solid),
Rectangle(
extent={{-1.5,-100.5},{1.5,100.5}},
fillColor={0,0,0},
fillPattern=FillPattern.Solid,
pattern=LinePattern.None,
lineColor={0,0,0},
origin={-0.5,59.5},
rotation=90),
Rectangle(
extent={{-1.5,-100.5},{1.5,100.5}},
fillColor={0,0,0},
fillPattern=FillPattern.Solid,
pattern=LinePattern.None,
lineColor={0,0,0},
origin={-0.5,-60.5},
rotation=90),
Rectangle(
extent={{-19.5,-1.5},{19.5,1.5}},
fillColor={0,0,0},
fillPattern=FillPattern.Solid,
pattern=LinePattern.None,
lineColor={0,0,0},
origin={-59.5,79.5},
rotation=90),
Rectangle(
extent={{-17.5,-1.5},{17.5,1.5}},
fillColor={0,0,0},
fillPattern=FillPattern.Solid,
pattern=LinePattern.None,
lineColor={0,0,0},
origin={60.5,81.5},
rotation=90),
Rectangle(
extent={{-57.5,-1.5},{57.5,1.5}},
fillColor={0,0,0},
fillPattern=FillPattern.Solid,
pattern=LinePattern.None,
lineColor={0,0,0},
origin={60.5,-2.5},
rotation=90),
Text(
extent={{-141,-99},{159,-139}},
textColor={0,0,255},
fillPattern=FillPattern.HorizontalCylinder,
fillColor={0,127,255},
textString="%name")}), Diagram(
coordinateSystem(preserveAspectRatio=false)),
defaultComponentName = "parJun",
Documentation(info="<html>
<p>
This model provides junction models in parallel on the distribution pipe lines.
This model is for breaking algebraic loops only and has no pressure drop.
</p>
</html>", revisions="<html>
<ul>
<li>
July 31, 2023, by Michael Wetter:<br/>
Propagated parameters, and introduced design flow rate <code>m_flow_nominal</code>.
</li>
<li>
October 31, 2022 by Hongxiang Fu:<br/>
First implementation. This is for
<a href=\"https://github.com/lbl-srg/modelica-buildings/issues/2859\">#2859</a>.
</li>
</ul>
</html>"));
end ParallelJunctions;
Loading