-
Notifications
You must be signed in to change notification settings - Fork 58
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
Issue1337 temperature setpoint partial zone #1391
base: master
Are you sure you want to change the base?
Changes from all commits
b475a32
dcb5db1
5a4693c
1f0d7dc
e7b9981
0d0e788
96a3b88
0f8a8bc
bdfab9c
8952d6b
4e5d92b
3969b04
48ac411
a1b567d
b5b22ff
0831ac9
c38310f
253072a
350cee7
1953f38
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -4,9 +4,9 @@ model BoundaryWall "Opaque wall with optional prescribed heat flow rate or tempe | |||||
final custom_q50=0, | ||||||
final use_custom_q50=true, | ||||||
final nWin=1, | ||||||
QTra_design=U_value*A*(273.15 + 21 - TRef_a), | ||||||
dT_nominal_a=-1, | ||||||
add_cracks=false, | ||||||
QTra_design(fixed=false), | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same comment for other components (internal wall, outer wall, ...) |
||||||
layMul(disableInitPortB=use_T_in or use_T_fixed, monLay(monLayDyn(each | ||||||
addRes_b=(sim.lineariseDymola and (use_T_in or use_T_fixed)))))); | ||||||
|
||||||
|
@@ -15,20 +15,25 @@ model BoundaryWall "Opaque wall with optional prescribed heat flow rate or tempe | |||||
annotation(Dialog(group="Boundary conditions")); | ||||||
parameter Modelica.Units.SI.Temperature T_fixed=294.15 | ||||||
"Fixed boundary temperature" | ||||||
annotation (Dialog(group="Boundary conditions", enable=use_T_fixed)); | ||||||
annotation (Dialog(group="Boundary conditions",enable=use_T_fixed)); | ||||||
parameter Boolean use_T_in = false | ||||||
"Get the boundary temperature from the input connector" | ||||||
annotation(Dialog(group="Boundary conditions")); | ||||||
parameter Modelica.Units.SI.Temperature T_in_nom=T_fixed | ||||||
"Nominal boundary temperature, for calculation of design heat loss" | ||||||
annotation (Dialog(group="Design power", tab="Advanced",enable=use_T_fixed or use_T_in)); | ||||||
parameter Boolean use_Q_in = false | ||||||
"Get the boundary heat flux from the input connector" | ||||||
annotation(Dialog(group="Boundary conditions")); | ||||||
|
||||||
parameter Modelica.Units.SI.HeatFlowRate Q_in_nom=0 | ||||||
"Nominal boundary heat flux, for calculation of design heat loss (positive if entering the wall)" | ||||||
annotation (Dialog(group="Design power", tab="Advanced", enable=use_Q_in)); | ||||||
Modelica.Blocks.Interfaces.RealInput T if use_T_in | ||||||
"Input for boundary temperature" annotation (Placement( | ||||||
transformation(extent={{-120,10},{-100,30}}),iconTransformation(extent={{-120,10}, | ||||||
{-100,30}}))); | ||||||
Modelica.Blocks.Interfaces.RealInput Q_flow if use_Q_in | ||||||
"Input for boundary heat flow rate entering the wall" annotation (Placement( | ||||||
"Input for boundary heat flow rate entering the wall (positive)" annotation (Placement( | ||||||
transformation(extent={{-120,-30},{-100,-10}}), | ||||||
iconTransformation(extent={{-120, | ||||||
-30},{-100,-10}}))); | ||||||
|
@@ -64,6 +69,8 @@ protected | |||||
IDEAS.Buildings.Components.Interfaces.WeaBus weaBus(final numSolBus=sim.numIncAndAziInBus, | ||||||
outputAngles=sim.outputAngles) "Weather bus" | ||||||
annotation (Placement(transformation(extent={{40,-80},{60,-60}}))); | ||||||
initial equation | ||||||
QTra_design=if use_T_in or use_T_fixed then U_value*A*(TRefZon - T_in_nom) else -Q_in_nom; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||||
equation | ||||||
assert(not (use_T_in and use_Q_in or use_T_in and use_T_fixed or use_Q_in and use_T_fixed), | ||||||
"In "+getInstanceName()+": Only one of the following options can be used simultaneously: use_T_in, use_Q_in, use_T_fixed"); | ||||||
|
@@ -169,11 +176,18 @@ to enable an input for a prescribed boundary condition temperature or heat flow | |||||
Alternatively, parameters <code>use_T_fixed</code> and <code>T_fixed</code> can be used | ||||||
to specify a fixed boundary condition temperature. | ||||||
It is not allowed to enabled multiple of these three options. | ||||||
If all are disabled then an adiabatic boundary (<code>Q_flow=0</code>) is used. | ||||||
If all are disabled then an adiabatic boundary (<code>Q_flow=0</code>) is used.</p> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
Parameters <code>T_in_nom</code> and <code>Q_in_nom</code> are used for the calculation | ||||||
of heat losses, when the temperature boundary condition and heat flow boundary condition are applied, respectively. | ||||||
</p> | ||||||
</html>", revisions="<html> | ||||||
<ul> | ||||||
<li> | ||||||
November 7, 2024, by Anna Dell'Isola and Jelger Jansen:<br/> | ||||||
Update calculation of transmission design losses. | ||||||
See <a href=\"https://github.com/open-ideas/IDEAS/issues/1337\">#1337</a> | ||||||
</li> | ||||||
<li> | ||||||
April 26, 2020, by Filip Jorissen:<br/> | ||||||
Refactored <code>SolBus</code> to avoid many instances in <code>PropsBus</code>. | ||||||
See <a href=\"https://github.com/open-ideas/IDEAS/issues/1131\"> | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,8 +34,11 @@ model PartialZone "Building zone model" | |
parameter Boolean calculateViewFactor = false | ||
"Explicit calculation of view factors: works well only for rectangular zones!" | ||
annotation(Dialog(tab="Advanced", group="Radiative heat exchange")); | ||
parameter Modelica.Units.SI.Temperature TZon_design=294.15 | ||
"Reference zone temperature for calculation of design heat load" | ||
annotation (Dialog(group="Design heat load", tab="Advanced")); | ||
final parameter Modelica.Units.SI.Power QInf_design=1012*1.204*V/3600*n50_int | ||
/n50toAch*(273.15 + 21 - sim.Tdes) | ||
/n50toAch*(TZon_design - sim.Tdes) | ||
"Design heat losses from infiltration at reference outdoor temperature"; | ||
final parameter Modelica.Units.SI.Power QRH_design=A*fRH | ||
"Additional power required to compensate for the effects of intermittent heating"; | ||
|
@@ -192,6 +195,9 @@ model PartialZone "Building zone model" | |
|
||
|
||
protected | ||
Modelica.Blocks.Sources.RealExpression TRefZon[nSurf](each y=TZon_design) | ||
"Reference zone temperature for the surfaces connected to this zone, for calculation of design heat load"; | ||
|
||
parameter Real n50_int(unit="1/h",min=0.01,fixed= false) | ||
"n50 value cfr airtightness, i.e. the ACH at a pressure diffence of 50 Pa" | ||
annotation(Dialog(enable=use_custom_n50,tab="Airflow", group="Airtightness")); | ||
|
@@ -298,8 +304,6 @@ end Setq50; | |
|
||
|
||
initial equation | ||
|
||
|
||
n50_int = if use_custom_n50 and not setq50.allSurfacesCustom then n50 else sum(propsBusInt.v50)/V; | ||
|
||
Q_design=QInf_design+QRH_design+QTra_design; //Total design load for zone (additional ventilation losses are calculated in the ventilation system) | ||
|
@@ -504,7 +508,9 @@ end for; | |
connect(setq50.use_custom_n50s, propsBusInt.use_custom_n50) annotation (Line(points={{-60.8, | ||
-92.8},{-60,-92.8},{-60,-92},{-80.1,-92},{-80.1,39.9}}, color={ | ||
255,0,255})); | ||
annotation (Placement(transformation(extent={{ | ||
connect(TRefZon.y, propsBusInt.TRefZon); | ||
annotation (Dialog(group="Design heat load", tab="Advanced"), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this |
||
Placement(transformation(extent={{ | ||
140,48},{100,88}})), | ||
Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}}), | ||
graphics), | ||
|
@@ -513,6 +519,11 @@ end for; | |
</html>", revisions="<html> | ||
<ul> | ||
<li> | ||
November 7, 2024, by Anna Dell'Isola and Jelger Jansen:<br/> | ||
Add parameter <code>TZon_design</code> to be used when calculating <code>Q_design</code>. | ||
See <a href=\"https://github.com/open-ideas/IDEAS/issues/1337\">#1337</a> | ||
</li> | ||
<li> | ||
April 26, 2024 by Jelger Jansen:<br/> | ||
Added parameter <code>ignAss</code> to ignore view factor asserts for non-physical unit test models. | ||
This is for <a href=https://github.com/open-ideas/IDEAS/issues/1272>#1272</a>. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,7 +41,7 @@ protected | |
if sim.interZonalAirFlowType <> IDEAS.BoundaryConditions.Types.InterZonalAirFlow.None | ||
"Mass flow rate multiplier for port 1" | ||
annotation (Placement(transformation(extent={{-10,-170},{10,-150}}))); | ||
Modelica.Blocks.Math.Gain QTra_desgin(k=k) "Design heat flow rate" | ||
Modelica.Blocks.Math.Gain QTra_design(k=k) "Design heat flow rate" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. good catch! |
||
annotation (Placement(transformation(extent={{-10,178},{10,198}}))); | ||
Modelica.Blocks.Math.Gain area(k=k) "Heat exchange surface area" | ||
annotation (Placement(transformation(extent={{-10,150},{10,170}}))); | ||
|
@@ -80,10 +80,13 @@ protected | |
Modelica.Blocks.Routing.BooleanPassThrough use_custom_q50 | ||
"0 if the surface has a custom q50" | ||
annotation (Placement(transformation(extent={{-12,-296},{8,-276}}))); | ||
Modelica.Blocks.Routing.RealPassThrough TRefZon | ||
"Reference zone temperature for calculation of design heat load" | ||
annotation (Placement(transformation(extent={{8,-356},{-12,-336}}))); | ||
equation | ||
connect(QTra_desgin.u, propsBus_a.QTra_design) annotation (Line(points={{-12,188}, | ||
connect(QTra_design.u, propsBus_a.QTra_design) annotation (Line(points={{-12,188}, | ||
{-100.1,188},{-100.1,0.1}}, color={0,0,127})); | ||
connect(QTra_desgin.y, propsBus_b.QTra_design) annotation (Line(points={{11,188}, | ||
connect(QTra_design.y, propsBus_b.QTra_design) annotation (Line(points={{11,188}, | ||
{100.1,188},{100.1,-0.1}},color={0,0,127})); | ||
connect(area.u, propsBus_a.area) annotation (Line(points={{-12,160},{-100.1, | ||
160},{-100.1,0.1}},color={0,0,127})); | ||
|
@@ -162,6 +165,10 @@ equation | |
connect(use_custom_n50.y, propsBus_a.use_custom_n50) annotation (Line(points={{-13, | ||
-314},{-100,-314},{-100,0.1},{-100.1,0.1}}, | ||
color={255,0,255})); | ||
connect(TRefZon.u, propsBus_b.TRefZon) annotation (Line(points={{10,-346},{ | ||
100.1,-346},{100.1,-0.1}}, color={0,0,127})); | ||
connect(TRefZon.y, propsBus_a.TRefZon) annotation (Line(points={{-13,-346},{ | ||
-100.1,-346},{-100.1,0.1}}, color={0,0,127})); | ||
annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-180}, | ||
{100,200}}), graphics={ | ||
Polygon( | ||
|
@@ -186,6 +193,11 @@ equation | |
Documentation(revisions="<html> | ||
<ul> | ||
<li> | ||
November 7, 2024, by Anna Dell'Isola and Jelger Jansen:<br/> | ||
Add connector <code>TRefZon</code> to be used when calculating <code>QTra_design</code>. | ||
See <a href=\"https://github.com/open-ideas/IDEAS/issues/1337\">#1337</a> | ||
</li> | ||
<li> | ||
August 10, 2020, by Filip Jorissen:<br/> | ||
Modifications for supporting interzonal airflow. | ||
See <a href=\"https://github.com/open-ideas/IDEAS/issues/1066\"> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,8 +8,8 @@ model InternalWall "interior opaque wall between two zones" | |
E(y=if sim.computeConservationOfEnergy then layMul.E else 0), | ||
Qgai(y=(if sim.openSystemConservationOfEnergy or not sim.computeConservationOfEnergy | ||
then 0 else sum(port_emb.Q_flow))), | ||
final QTra_design=U_value*A*(TRef_a - TRef_b), | ||
q50_zone(v50_surf=0)); | ||
q50_zone(v50_surf=0), | ||
QTra_design(fixed=false)); | ||
//using custom q50 since this model is not an external component | ||
|
||
parameter Boolean linIntCon_b=sim.linIntCon | ||
|
@@ -18,10 +18,8 @@ model InternalWall "interior opaque wall between two zones" | |
parameter Modelica.Units.SI.TemperatureDifference dT_nominal_b=1 | ||
"Nominal temperature difference used for linearisation, negative temperatures indicate the solid is colder" | ||
annotation (Dialog(tab="Convection")); | ||
parameter Modelica.Units.SI.Temperature TRef_b=291.15 | ||
"Reference temperature of zone on side of propsBus_b, for calculation of design heat loss" | ||
annotation (Dialog(group="Design power", tab="Advanced")); | ||
|
||
Modelica.Units.SI.Temperature TRef_b = propsBus_b.TRefZon | ||
"Reference temperature of zone on side of propsBus_b, for calculation of design heat loss"; | ||
// open door modelling | ||
parameter Boolean hasCavity = false | ||
"=true, to model open door or cavity in wall" | ||
|
@@ -98,7 +96,7 @@ protected | |
"convective surface heat transimission on the interior side of the wall" | ||
annotation (Placement(transformation(extent={{-22,-10},{-42,10}}))); | ||
Modelica.Blocks.Sources.RealExpression QDesign_b(y=-QTra_design); | ||
//Negative, because of its losses from zone side b to zone side a, oposite of calculation of QTra_design | ||
//Negative, because of its losses from zone side b to zone side a, opposite of calculation of QTra_design | ||
|
||
Modelica.Blocks.Sources.RealExpression incExp1(y=incInt + Modelica.Constants.pi) | ||
"Inclination angle"; | ||
|
@@ -141,6 +139,8 @@ public | |
if hasCavity and sim.interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.OnePort | ||
"1-port model for open door" | ||
annotation (Placement(transformation(extent={{-10,58},{10,78}}))); | ||
initial equation | ||
QTra_design=U_value*A*(TRefZon - TRef_b); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TRefZon refers to |
||
equation | ||
assert(hasCavity == false or IDEAS.Utilities.Math.Functions.isAngle(incInt, IDEAS.Types.Tilt.Wall), | ||
"In " + getInstanceName() + ": Cavities are only supported for vertical walls, but inc=" + String(incInt) + ". The model is not accurate.", | ||
|
@@ -203,7 +203,6 @@ equation | |
-58},{56,20.1},{-100.1,20.1}}, color={0,0,127})); | ||
connect(q50_zone.using_custom_q50, propsBus_b.use_custom_q50) annotation (Line(points={{79,-52}, | ||
{56,-52},{56,20.1},{-100.1,20.1}}, color={0,0,127})); | ||
|
||
annotation ( | ||
Icon(coordinateSystem(preserveAspectRatio=false,extent={{-60,-100},{60,100}}), | ||
graphics={ | ||
|
@@ -264,6 +263,11 @@ We assume that the value of <code>A</code> excludes the surface area of the cavi | |
</html>", revisions="<html> | ||
<ul> | ||
<li> | ||
November 7, 2024, by Anna Dell'Isola and Jelger Jansen:<br/> | ||
Update calculation of transmission design losses. | ||
See <a href=\"https://github.com/open-ideas/IDEAS/issues/1337\">#1337</a> | ||
</li> | ||
<li> | ||
August 2, 2022, by Filip Jorissen:<br/> | ||
Activating thermal model when using OnePorts. | ||
See <a href=\"https://github.com/open-ideas/IDEAS/issues/1291\"> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am a bit confused with all booleans, i.e.
use_T_in
anduse_T_fixed
. It is one or the other (this is specified in the documentation), so I suggest removing one of the two. Also, now the documentation string for both booleans is the same, which is not correct. If one of the booleans is removed, the assert statement can be simplified.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently,
use_T_fixed
anduse_T_in
have different functions, i.e. for the boundary wall and for the heat design calculation respectively.use_T_in
anduse_Q_in
should be moved to the Advanced > Design power tab.