Skip to content

Commit

Permalink
Issue3606 district icons (#3734)
Browse files Browse the repository at this point in the history
* Correct icon display in Buildings.Experimental.DHC.Loads

---------

Co-authored-by: Ettore <[email protected]>
Co-authored-by: Michael Wetter <[email protected]>
  • Loading branch information
3 people authored Mar 30, 2024
1 parent cdeee72 commit b508ad9
Show file tree
Hide file tree
Showing 18 changed files with 1,917 additions and 167 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ model PartialDirect
final unit="K",
displayUnit="degC")
"Setpoint for the district return temperature (min for cooling, max for heating)"
annotation (Placement(transformation(extent={{-338,-20},{-298,20}})));
annotation (Placement(transformation(extent={{-340,-20},{-300,20}}),
iconTransformation(extent={{-340,-20},{-300,20}})));
Modelica.Blocks.Interfaces.RealOutput Q_flow(
final quantity="HeatFlowRate",
final unit="W",
Expand All @@ -76,8 +77,8 @@ model PartialDirect
displayUnit="kW.h")
"Measured energy consumption at the ETS"
annotation (Placement(transformation(
extent={{300,-180},{340,-140}}), iconTransformation(extent={{300,-130},
{340,-90}})));
extent={{300,-180},{340,-140}}), iconTransformation(extent={{300,-180},
{340,-140}})));
Buildings.Fluid.Sensors.TemperatureTwoPort senTDisSup(
redeclare final package Medium=MediumSer,
final m_flow_nominal=mBui_flow_nominal)
Expand Down Expand Up @@ -167,50 +168,43 @@ protected
"Specific heat capacity of the fluid";
equation
connect(senTDisSup.port_b, senMasFlo.port_a)
annotation (Line(points={{-160,-280},{-120,-280}}, color={0,127,255}));
annotation (Line(points={{-160,-280},{-120,-280}},color={0,127,255}));
connect(senMasFlo.port_b, jun.port_1)
annotation (Line(points={{-100,-280},{-60,-280}}, color={0,127,255}));
annotation (Line(points={{-100,-280},{-60,-280}},color={0,127,255}));
connect(senTBuiRet.port_b, spl.port_1)
annotation (Line(points={{-200,200},{-60,200}}, color={0,127,255}));
annotation (Line(points={{-200,200},{-60,200}},color={0,127,255}));
connect(spl.port_2, conVal.port_a)
annotation (Line(points={{-40,200},{-10,200}}, color={0,127,255}));
annotation (Line(points={{-40,200},{-10,200}},color={0,127,255}));
connect(senMasFlo.m_flow, pro.u2)
annotation (Line(points={{-110,-269},{-110,-192},
{90,-192},{90,-116},{118,-116}}, color={0,0,127}));
annotation (Line(points={{-110,-269},{-110,-192},{90,-192},{90,-116},{118,-116}},color={0,0,127}));
connect(pro.y, cp.u)
annotation (Line(points={{141,-110},{178,-110}}, color={0,0,127}));
annotation (Line(points={{141,-110},{178,-110}},color={0,0,127}));
connect(cp.y, Q_flow)
annotation (Line(points={{201,-110},{248,-110},{248,-120},{320,-120}},
color={0,0,127}));
annotation (Line(points={{201,-110},{248,-110},{248,-120},{320,-120}},color={0,0,127}));
connect(cp.y, int.u)
annotation (Line(points={{201,-110},{248,-110},{248,-160},{258,-160}},
color={0,0,127}));
annotation (Line(points={{201,-110},{248,-110},{248,-160},{258,-160}},color={0,0,127}));
connect(int.y, Q)
annotation (Line(points={{281,-160},{320,-160}}, color={0,0,127}));
annotation (Line(points={{281,-160},{320,-160}},color={0,0,127}));
connect(dTDis.y, pro.u1)
annotation (Line(points={{101,-104},{118,-104}},color={0,0,127}));
connect(conVal.port_b, senTDisRet.port_a)
annotation (Line(points={{10,200},{30,200}}, color={0,127,255}));
annotation (Line(points={{10,200},{30,200}},color={0,127,255}));
connect(senTDisRet.T,dTDis. u1)
annotation (Line(points={{40,211},{40,226},{60,226},{60,-98},{78,-98}},
color={0,0,127}));
annotation (Line(points={{40,211},{40,226},{60,226},{60,-98},{78,-98}},color={0,0,127}));
connect(senTDisSup.T,dTDis. u2)
annotation (Line(points={{-170,-269},{-172,-269},{-172,-184},{60,-184},{60,-110},
{78,-110}}, color={0,0,127}));
annotation (Line(points={{-170,-269},{-172,-269},{-172,-184},{60,-184},{60,-110},{78,-110}},color={0,0,127}));
connect(TDisRetSet, con.u_s)
annotation (Line(points={{-318,0},{-272,0},{-272,250},{-222,250}},
color={0,0,127}));
annotation (Line(points={{-320,0},{-272,0},{-272,250},{-222,250}},color={0,0,127}));
connect(senTBuiRet.T, con.u_m)
annotation (Line(points={{-210,211},{-210,238}},color={0,0,127}));
connect(jun.port_2, senTBuiSup.port_a)
annotation (Line(points={{-40,-280},{220,-280},{220,200},{230,200}}, color={0,127,255}));
annotation (Line(points={{-40,-280},{220,-280},{220,200},{230,200}},color={0,127,255}));
connect(spl.port_3, cheVal.port_a)
annotation (Line(points={{-50,190},{-50,0}}, color={0,127,255}));
connect(cheVal.port_b, jun.port_3)
annotation (Line(points={{-50,-20},{-50,-270}}, color={0,127,255}));
connect(con.y, conVal.y)
annotation (Line(points={{-198,250},{0,250},{0,212}},
color={0,0,127}));
annotation (Line(points={{-198,250},{0,250},{0,212}},color={0,0,127}));
annotation (
defaultComponentName="etsCoo",
Documentation(info="<html>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ partial model PartialETS
constrainedby Modelica.Media.Interfaces.PartialMedium
"Service side medium at heating inlet"
annotation(Dialog(enable=
typ == TypDisSys.CombinedGeneration1 or
typ == TypDisSys.HeatingGeneration1));
typ == Buildings.Experimental.DHC.Types.DistrictSystemType.CombinedGeneration1 or
typ == Buildings.Experimental.DHC.Types.DistrictSystemType.HeatingGeneration1));
replaceable package MediumBui=Buildings.Media.Water
constrainedby Modelica.Media.Interfaces.PartialMedium
"Building side medium";
parameter TypDisSys typ = TypDisSys.CombinedGeneration2to4
parameter TypDisSys typ = Buildings.Experimental.DHC.Types.DistrictSystemType.CombinedGeneration2to4
"Type of district system"
annotation (Evaluate=true, Dialog(group="Configuration"));
parameter Integer nPorts_aHeaWat=0
Expand Down Expand Up @@ -136,7 +136,7 @@ partial model PartialETS
redeclare package Medium = MediumSer,
m_flow(min=if allowFlowReversalSer then -Modelica.Constants.inf else 0),
h_outflow(start=MediumSer.h_default, nominal=MediumSer.h_default))
if typ == TypDisSys.CombinedGeneration5
if typ == Buildings.Experimental.DHC.Types.DistrictSystemType.CombinedGeneration5
"Fluid connector for ambient water service supply line"
annotation (
Placement(transformation(extent={{-310,-210},{-290,-190}}),
Expand All @@ -145,7 +145,7 @@ partial model PartialETS
redeclare package Medium = MediumSer,
m_flow(max=if allowFlowReversalSer then +Modelica.Constants.inf else 0),
h_outflow(start=MediumSer.h_default, nominal=MediumSer.h_default))
if typ == TypDisSys.CombinedGeneration5
if typ == Buildings.Experimental.DHC.Types.DistrictSystemType.CombinedGeneration5
"Fluid connector for ambient water service return line"
annotation (
Placement(transformation(extent={{290,-210},{310,-190}}),
Expand All @@ -154,8 +154,8 @@ partial model PartialETS
redeclare package Medium = MediumSerHea_a,
m_flow(min=if allowFlowReversalSer then -Modelica.Constants.inf else 0),
h_outflow(start=MediumSerHea_a.h_default, nominal=MediumSerHea_a.h_default))
if typ <> TypDisSys.Cooling and
typ <> TypDisSys.CombinedGeneration5
if typ <> Buildings.Experimental.DHC.Types.DistrictSystemType.Cooling and
typ <> Buildings.Experimental.DHC.Types.DistrictSystemType.CombinedGeneration5
"Fluid connector for heating service supply line"
annotation (Placement(
transformation(extent={{-310,-250},{-290,-230}}), iconTransformation(
Expand All @@ -164,8 +164,8 @@ partial model PartialETS
redeclare package Medium = MediumSer,
m_flow(max=if allowFlowReversalSer then +Modelica.Constants.inf else 0),
h_outflow(start=MediumSer.h_default, nominal=MediumSer.h_default))
if typ <> TypDisSys.Cooling and
typ <> TypDisSys.CombinedGeneration5
if typ <> Buildings.Experimental.DHC.Types.DistrictSystemType.Cooling and
typ <> Buildings.Experimental.DHC.Types.DistrictSystemType.CombinedGeneration5
"Fluid connector for heating service return line"
annotation (Placement(
transformation(extent={{290,-250},{310,-230}}), iconTransformation(
Expand All @@ -174,18 +174,18 @@ partial model PartialETS
redeclare package Medium = MediumSer,
m_flow(min=if allowFlowReversalSer then -Modelica.Constants.inf else 0),
h_outflow(start=MediumSer.h_default, nominal=MediumSer.h_default))
if typ == TypDisSys.CombinedGeneration1 or
typ == TypDisSys.CombinedGeneration2to4 or
typ == TypDisSys.Cooling
if typ == Buildings.Experimental.DHC.Types.DistrictSystemType.CombinedGeneration1 or
typ == Buildings.Experimental.DHC.Types.DistrictSystemType.CombinedGeneration2to4 or
typ == Buildings.Experimental.DHC.Types.DistrictSystemType.Cooling
"Fluid connector for cooling service supply line"
annotation (Placement(transformation(extent={{-310,-290},{-290,-270}})));
Modelica.Fluid.Interfaces.FluidPort_b port_bSerCoo(
redeclare package Medium = MediumSer,
m_flow(max=if allowFlowReversalSer then +Modelica.Constants.inf else 0),
h_outflow(start=MediumSer.h_default, nominal=MediumSer.h_default))
if typ == TypDisSys.CombinedGeneration1 or
typ == TypDisSys.CombinedGeneration2to4 or
typ == TypDisSys.Cooling
if typ == Buildings.Experimental.DHC.Types.DistrictSystemType.CombinedGeneration1 or
typ == Buildings.Experimental.DHC.Types.DistrictSystemType.CombinedGeneration2to4 or
typ == Buildings.Experimental.DHC.Types.DistrictSystemType.Cooling
"Fluid connector for cooling service return line"
annotation (Placement(
transformation(extent={{290,-290},{310,-270}}), iconTransformation(
Expand Down Expand Up @@ -322,36 +322,36 @@ First implementation.
pattern=LinePattern.None,
fillColor={255,0,0},
fillPattern=FillPattern.Solid,
visible=typ <> TypDisSys.Cooling and typ <> TypDisSys.CombinedGeneration5),
visible=typ <> Buildings.Experimental.DHC.Types.DistrictSystemType.Cooling and typ <> Buildings.Experimental.DHC.Types.DistrictSystemType.CombinedGeneration5),
Rectangle(
extent={{20,-288},{300,-272}},
lineColor={0,0,255},
pattern=LinePattern.None,
fillColor={0,0,255},
fillPattern=FillPattern.Solid,
visible=typ == TypDisSys.CombinedGeneration1 or typ == TypDisSys.CombinedGeneration2to4
or typ == TypDisSys.Cooling),
visible=typ == Buildings.Experimental.DHC.Types.DistrictSystemType.CombinedGeneration1 or typ == Buildings.Experimental.DHC.Types.DistrictSystemType.CombinedGeneration2to4
or typ == Buildings.Experimental.DHC.Types.DistrictSystemType.Cooling),
Rectangle(
extent={{-300,-208},{-100,-192}},
lineColor={0,0,255},
pattern=LinePattern.None,
fillColor={0,255,255},
fillPattern=FillPattern.Solid,
visible=typ == TypDisSys.CombinedGeneration5),
visible=typ == Buildings.Experimental.DHC.Types.DistrictSystemType.CombinedGeneration5),
Rectangle(
extent={{100,-208},{300,-192}},
lineColor={0,0,255},
pattern=LinePattern.None,
fillColor={0,255,255},
fillPattern=FillPattern.Solid,
visible=typ == TypDisSys.CombinedGeneration5),
visible=typ == Buildings.Experimental.DHC.Types.DistrictSystemType.CombinedGeneration5),
Rectangle(
extent={{-25,-8},{25,8}},
lineColor={0,0,255},
pattern=LinePattern.None,
fillColor={0,255,255},
fillPattern=FillPattern.Solid,
visible=typ == TypDisSys.CombinedGeneration5,
visible=typ == Buildings.Experimental.DHC.Types.DistrictSystemType.CombinedGeneration5,
origin={108,-167},
rotation=90),
Rectangle(
Expand All @@ -360,28 +360,23 @@ First implementation.
pattern=LinePattern.None,
fillColor={0,255,255},
fillPattern=FillPattern.Solid,
visible=typ == TypDisSys.CombinedGeneration5,
visible=typ == Buildings.Experimental.DHC.Types.DistrictSystemType.CombinedGeneration5,
origin={-108,-167},
rotation=90),
Rectangle(
extent={{-140,140},{140,-142}},
lineColor={27,0,55},
fillColor={170,213,255},
fillPattern=FillPattern.Solid),
Rectangle(
extent={{58,-248},{300,-232}},
lineColor={0,0,255},
pattern=LinePattern.None,
fillColor={255,0,0},
fillPattern=FillPattern.Solid,
visible=typ <> TypDisSys.Cooling and typ <> TypDisSys.CombinedGeneration5),
visible=typ <> Buildings.Experimental.DHC.Types.DistrictSystemType.Cooling and typ <> Buildings.Experimental.DHC.Types.DistrictSystemType.CombinedGeneration5),
Rectangle(
extent={{-45,-8},{45,8}},
lineColor={0,0,255},
pattern=LinePattern.None,
fillColor={255,0,0},
fillPattern=FillPattern.Solid,
visible=typ <> TypDisSys.Cooling and typ <> TypDisSys.CombinedGeneration5,
visible=typ <> Buildings.Experimental.DHC.Types.DistrictSystemType.Cooling and typ <> Buildings.Experimental.DHC.Types.DistrictSystemType.CombinedGeneration5,
origin={66,-187},
rotation=90),
Rectangle(
Expand All @@ -390,7 +385,7 @@ First implementation.
pattern=LinePattern.None,
fillColor={255,0,0},
fillPattern=FillPattern.Solid,
visible=typ <> TypDisSys.Cooling and typ <> TypDisSys.CombinedGeneration5,
visible=typ <> Buildings.Experimental.DHC.Types.DistrictSystemType.Cooling and typ <> Buildings.Experimental.DHC.Types.DistrictSystemType.CombinedGeneration5,
origin={-66,-187},
rotation=90),
Rectangle(
Expand All @@ -399,8 +394,8 @@ First implementation.
pattern=LinePattern.None,
fillColor={0,0,255},
fillPattern=FillPattern.Solid,
visible=typ == TypDisSys.CombinedGeneration1 or typ == TypDisSys.CombinedGeneration2to4
or typ == TypDisSys.Cooling,
visible=typ == Buildings.Experimental.DHC.Types.DistrictSystemType.CombinedGeneration1 or typ == Buildings.Experimental.DHC.Types.DistrictSystemType.CombinedGeneration2to4
or typ == Buildings.Experimental.DHC.Types.DistrictSystemType.Cooling,
origin={28,-207},
rotation=90),
Rectangle(
Expand All @@ -409,16 +404,16 @@ First implementation.
pattern=LinePattern.None,
fillColor={0,0,255},
fillPattern=FillPattern.Solid,
visible=typ == TypDisSys.CombinedGeneration1 or typ == TypDisSys.CombinedGeneration2to4
or typ == TypDisSys.Cooling),
visible=typ == Buildings.Experimental.DHC.Types.DistrictSystemType.CombinedGeneration1 or typ == Buildings.Experimental.DHC.Types.DistrictSystemType.CombinedGeneration2to4
or typ == Buildings.Experimental.DHC.Types.DistrictSystemType.Cooling),
Rectangle(
extent={{-65,-8},{65,8}},
lineColor={0,0,255},
pattern=LinePattern.None,
fillColor={0,0,255},
fillPattern=FillPattern.Solid,
visible=typ == TypDisSys.CombinedGeneration1 or typ == TypDisSys.CombinedGeneration2to4
or typ == TypDisSys.Cooling,
visible=typ == Buildings.Experimental.DHC.Types.DistrictSystemType.CombinedGeneration1 or typ == Buildings.Experimental.DHC.Types.DistrictSystemType.CombinedGeneration2to4
or typ == Buildings.Experimental.DHC.Types.DistrictSystemType.Cooling,
origin={-30,-207},
rotation=90),
Rectangle(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ model PartialIndirect
displayUnit="kW.h")
"Measured energy consumption at the ETS"
annotation (Placement(transformation(extent={{300,-180},{340,-140}}),
iconTransformation(extent={{300,-130},{340,-90}})));
iconTransformation(extent={{300,-180},{340,-140}})));
Buildings.Fluid.Sensors.TemperatureTwoPort senTDisSup(
redeclare final package Medium=MediumSer,
final m_flow_nominal=mDis_flow_nominal)
Expand Down
Loading

0 comments on commit b508ad9

Please sign in to comment.