Skip to content

Commit

Permalink
Window models BuildingSystems.Buildings.Constructions.Windows.Window …
Browse files Browse the repository at this point in the history
…and BuildingSystems.Buildings.Constructions.Windows.SlidingWindow updated
  • Loading branch information
nytschgeusen committed Jan 15, 2018
1 parent 5bf5273 commit b1e9b9f
Show file tree
Hide file tree
Showing 22 changed files with 286 additions and 409 deletions.
16 changes: 12 additions & 4 deletions BuildingSystems/Applications/DistrictSimulation/HCBC.mo
Original file line number Diff line number Diff line change
Expand Up @@ -38,25 +38,33 @@ model HCBC
width=parameterMap.widthWin1,
height=parameterMap.heightWin1,
angleDegAzi=parameterMap.angleDegAziWin1,
UVal=parameterMap.windowU)
constructionData.UValGla=parameterMap.windowU,
constructionData.UValFra=parameterMap.windowU,
constructionData.g = 0.6)
annotation (Placement(transformation(extent={{-40,-60},{-20,-40}})));
BuildingSystems.Buildings.Constructions.Windows.Window rightWindow(
width=parameterMap.widthWin2,
height=parameterMap.heightWin2,
angleDegAzi=parameterMap.angleDegAziWin2,
UVal=parameterMap.windowU)
constructionData.UValGla=parameterMap.windowU,
constructionData.UValFra=parameterMap.windowU,
constructionData.g = 0.6)
annotation (Placement(transformation(extent={{-20,-60},{0,-40}})));
BuildingSystems.Buildings.Constructions.Windows.Window frontWindow(
width=parameterMap.widthWin3,
height=parameterMap.heightWin3,
angleDegAzi=parameterMap.angleDegAziWin3,
UVal=parameterMap.windowU)
constructionData.UValGla=parameterMap.windowU,
constructionData.UValFra=parameterMap.windowU,
constructionData.g = 0.6)
annotation (Placement(transformation(extent={{0,-60},{20,-40}})));
BuildingSystems.Buildings.Constructions.Windows.Window backWindow(
width=parameterMap.widthWin4,
height=parameterMap.heightWin4,
angleDegAzi=parameterMap.angleDegAziWin4,
UVal=parameterMap.windowU)
constructionData.UValGla=parameterMap.windowU,
constructionData.UValFra=parameterMap.windowU,
constructionData.g = 0.6)
annotation (Placement(transformation(extent={{20,-60},{40,-40}})));
BuildingSystems.Buildings.Data.Constructions.OpaqueThermalConstruction
outerConstruction(
Expand Down
191 changes: 191 additions & 0 deletions BuildingSystems/Buildings/BaseClasses/WindowGeneral.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
within BuildingSystems.Buildings.BaseClasses;
partial model WindowGeneral
"General window model"
extends BuildingSystems.Buildings.BaseClasses.ConstructionGeneral(
width = 1.0,
height = 1.0,
final abs_1 = 0.0,
final abs_2 = 0.0);

replaceable parameter BuildingSystems.Buildings.Data.Constructions.TransparentConstruction constructionData
"Data of the thermal construction"
annotation(Dialog(tab = "General", group = "Construction"), choicesAllMatching=true);
parameter Real framePortion = 0.2
"Frame portion of the window"
annotation(Dialog(tab = "General", group = "Geometry"));
final parameter Modelica.SIunits.Length thicknessPane = sum(constructionData.thickness)
"Thickness of all panes"
annotation(Dialog(tab = "General", group = "Geometry"));
constant Modelica.SIunits.Density rhoPane = 2000.0
"Density of the panes"
annotation(Dialog(tab = "General", group = "Thermal properties"));
constant Modelica.SIunits.SpecificHeatCapacity cPane = 1000.0
"Specific heat capacity of the panes"
annotation(Dialog(tab = "General", group = "Thermal properties"));
final parameter Modelica.SIunits.CoefficientOfHeatTransfer UVal
= (1.0 - framePortion) * constructionData.UValGla + framePortion * constructionData.UValFra
"Mean U-value of the window"
annotation(Dialog(tab = "General", group = "Thermal properties"));
final parameter Real tauDir0 = constructionData.g
"Transmittance of direct radiation for perpendicular irradiation"
annotation(Dialog(tab = "General", group = "Optical properties"));
final parameter Real tauDif = constructionData.g
"Transmittance of diffuse radiation"
annotation(Dialog(tab = "General", group = "Optical properties"));
final parameter Real b0 = constructionData.g
"Coefficient for radiation transmision curve"
annotation(Dialog(tab = "General", group = "Optical properties"));
parameter Boolean use_GSC_in = false
"= true, use input for geometric shading coefficient GSC"
annotation(Dialog(tab = "General", group = "Shadowing"));
Modelica.Blocks.Interfaces.RealOutput GSC_constant(
min = 0.0,
max = 1.0) = 0.0
"Constant shading coefficient (if use_GSC_in = true)"
annotation(Dialog(tab = "General", group = "Shadowing"));
input Modelica.Blocks.Interfaces.RealInput GSC_in if use_GSC_in
"Shading coefficient"
annotation (Placement(transformation(extent={{-10,-10},{10,10}},rotation=90, origin={0,-62}),
iconTransformation(extent={{-8,-8},{8,8}},rotation=90, origin={0,-76})));
parameter Boolean show_TSur = false
"Show surface temperatures on both sides"
annotation(Dialog(tab = "Advanced", group = "Surface variables"));
BuildingSystems.Interfaces.Temp_KOutput TSur_1 = toSurfacePort_1.heatPort.T if show_TSur
"Temperature on surface side 1"
annotation (Placement(transformation(extent={{-10,-10},{10,10}},rotation=180,origin={-46,10}),iconTransformation(extent={{-10,10},{-30,30}})));
BuildingSystems.Interfaces.Temp_KOutput TSur_2 = toSurfacePort_2.heatPort.T if show_TSur
"Temperature on surface side 2"
annotation (Placement(transformation(extent={{-10,-10},{10,10}},origin={46,10}),iconTransformation(extent={{10,10},{30,30}})));
parameter Modelica.SIunits.Temp_K T_start=293.15
"Start temperature of the window"
annotation (Dialog(tab="Initialization"));
BuildingSystems.Buildings.Interfaces.SurfaceToConstructionPort toSurfacePort_2(
abs = abs_2,
geo(
angleDegAzi = angleDegAzi,
angleDegTil = angleDegTil,
width = width,
height = height,
zMean = zLevel + Modelica.Math.sin(Modelica.Constants.pi/180.0*angleDegTil) * height,
point(
x = {0.0,width,width,0.0},
y = {0.0,0.0,height,height},
z = {0.0,0.0,0.0,0.0})),
epsilon = epsilon_2)
annotation (Placement(transformation(extent={{10,-10},{30,10}}), iconTransformation(extent={{10,-10},{30,10}})));
BuildingSystems.Buildings.Interfaces.SurfaceToConstructionPort toSurfacePort_1(
abs = abs_1,
geo(
angleDegAzi = angleDegAzi,
angleDegTil = angleDegTil,
width = width,
height = height,
zMean = zLevel + Modelica.Math.sin(Modelica.Constants.pi/180.0*angleDegTil) * height,
point(
x = {0.0,width,width,0.0},
y = {0.0,0.0,height,height},
z = {0.0,0.0,0.0,0.0})),
epsilon = epsilon_1)
annotation (Placement(transformation(extent={{-30,-10},{-10,10}}), iconTransformation(extent={{-30,-10},{-10,10}})));
BuildingSystems.HAM.HeatConduction.HeatConduction1D heatTransfer(
material(
lambda = UVal*thicknessPane,
rho = rhoPane,
c = cPane),
lengthX=thicknessPane,
lengthY=width,
lengthZ=height,
T_start=T_start)
annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
BuildingSystems.HAM.HeatAndMoistureTransport.Sources.MoistureFlowFixed moistBcPort1(
m_flow_constant=0.0)
annotation (Placement(transformation(extent={{-48,-8},{-32,8}})));
BuildingSystems.HAM.HeatAndMoistureTransport.Sources.MoistureFlowFixed moistBcPort2(
m_flow_constant=0.0)
annotation (Placement(transformation(extent={{48,-8},{32,8}})));
BuildingSystems.Buildings.Constructions.Windows.RadiationTransmission.RadiationTransmissionSimple radTra1to2(
tauDir0=tauDir0,
b0=b0,
tauDif=tauDif,
framePortion=framePortion)
annotation (Placement(transformation(extent={{-10,30},{10,50}})));
BuildingSystems.Buildings.Constructions.Windows.RadiationTransmission.RadiationTransmissionSimple radTra2to1(
tauDir0=tauDir0,
b0=b0,
tauDif=tauDif,
framePortion=framePortion)
annotation (Placement(transformation(extent={{-10,-50},{10,-30}})));
protected
Modelica.Blocks.Interfaces.RealInput GSC_internal
"Shading coefficient";
equation
// Shadowing
if use_GSC_in then
connect(GSC_internal,GSC_in);
else
connect(GSC_internal,GSC_constant);
end if;
connect(GSC_internal, radTra2to1.GSC);
connect(GSC_internal, radTra1to2.GSC);
// Solar Transmittance
connect(radTra1to2.radiationPort_in, toSurfacePort_1.radiationPort_in)
annotation (Line(
points={{-1,40},{-20,40},{-20,0}},
color={0,0,0},
pattern=LinePattern.Solid,
smooth=Smooth.None));
connect(radTra1to2.radiationPort_out, toSurfacePort_2.radiationPort_out)
annotation (Line(
points={{1,40},{20,40},{20,0}},
color={0,0,0},
pattern=LinePattern.Solid,
smooth=Smooth.None));
connect(radTra2to1.radiationPort_in, toSurfacePort_2.radiationPort_in)
annotation (Line(
points={{-1,-40},{20,-40},{20,0}},
color={0,0,0},
pattern=LinePattern.Solid,
smooth=Smooth.None));
connect(radTra2to1.radiationPort_out, toSurfacePort_1.radiationPort_out)
annotation (Line(
points={{1,-40},{-20,-40},{-20,0}},
color={0,0,0},
pattern=LinePattern.Solid,
smooth=Smooth.None));
// Heat transfer
connect(heatTransfer.heatPort_x2, toSurfacePort_2.heatPort) annotation (Line(
points={{8,0},{20,0}},
color={191,0,0},
smooth=Smooth.None));
connect(heatTransfer.heatPort_x1, toSurfacePort_1.heatPort) annotation (Line(
points={{-8,0},{-20,0}},
color={191,0,0},
smooth=Smooth.None));
// Moisture transport
connect(moistBcPort1.moisturePort, toSurfacePort_1.moisturePort) annotation (
Line(
points={{-35.2,0},{-20,0}},
color={120,0,120},
smooth=Smooth.None));
connect(moistBcPort2.moisturePort, toSurfacePort_2.moisturePort) annotation (
Line(
points={{35.2,0},{20,0}},
color={120,0,120},
smooth=Smooth.None));

annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}}),graphics={
Rectangle(extent={{-20,80},{20,-80}},lineColor={230,230,230},fillColor={230,230,230},fillPattern = FillPattern.Solid),
Line(points={{-20,80},{-20,-80}},color={0,0,255},smooth=Smooth.None,thickness=0.5)}),
Documentation(info="<html>
<p>
This is partial model description of a win dow.
</p>
</html>", revisions="<html>
<ul>
<li>
January 14, 2018 by Christoph Nytsch-Geusen:<br/>
First implementation.
</li>
</ul>
</html>"));
end WindowGeneral;
1 change: 1 addition & 0 deletions BuildingSystems/Buildings/BaseClasses/package.order
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ SurfaceGeneral
WallGeneral
WallHygroThermalGeneral
WallThermalGeneral
WindowGeneral
ZoneTemplateGeneral
OpaqueConstruction
11 changes: 10 additions & 1 deletion BuildingSystems/Buildings/BuildingTemplates/Building1Zone0D.mo
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ model Building1Zone0D
parameter Modelica.SIunits.CoefficientOfHeatTransfer UValWin[nWindows] = fill(1.0,nWindows)
"Heat loss coefficient of each window"
annotation(Dialog(tab="Constructions",group="Windows"));
parameter Real gWin[nWindows](each unit = "1") = fill(0.6,nWindows)
"g-value of the window";
annotation(Dialog(tab="Constructions",group="Windows"));
parameter Real framePortionWin[nWindows](each unit = "1") = fill(0.2,nWindows)
"Frame portion of the window"
annotation(Dialog(tab = "Constructions", group = "Windows"));

BuildingSystems.Buildings.Zones.ZoneTemplateAirvolumeMixed zone(
final prescribedAirchange = prescribedAirchange,
Expand Down Expand Up @@ -116,7 +122,10 @@ model Building1Zone0D
BuildingSystems.Buildings.Constructions.Windows.Window window[nWindows](
final angleDegAzi= {angleDegAziWin[i] + angleDegAziBuilding for i in 1:nWindows},
final angleDegTil = angleDegTilWin,
UVal = UValWin,
final constructionData.UValGla = UValWin,
final constructionData.UValFra = UValWin,
final constructionData.g = gWin,
final framePortion = framePortionWin,
each final width = 1.0,
final height={AWin[i] for i in 1:nWindows})
annotation (Placement(transformation(extent={{-10,-10},{10,10}},rotation=180,origin={-40,20})));
Expand Down
16 changes: 4 additions & 12 deletions BuildingSystems/Buildings/BuildingTemplates/Building1Zone1DBox.mo
Original file line number Diff line number Diff line change
Expand Up @@ -435,9 +435,7 @@ model Building1Zone1DBox
framePortion = framePortionWindow1,
angleDegAzi = 90.0 + angleDegAziBuilding,
angleDegTil = 90.0,
UVal = (1.0 - framePortionWindow1) * constructionWindow1.UValGla + framePortionWindow1 * constructionWindow1.UValFra,
tauDir0 = constructionWindow1.g,
tauDif = constructionWindow1.g,
constructionData = constructionWindow1,
T_start = TWindow1_start,
use_GSC_in = true)
"Window 1 (west oriented if angleDegAzi is 0 degree)"
Expand All @@ -449,9 +447,7 @@ model Building1Zone1DBox
framePortion = framePortionWindow2,
angleDegAzi = 180.0 + angleDegAziBuilding,
angleDegTil = 90.0,
UVal = (1.0 - framePortionWindow2) * constructionWindow2.UValGla + framePortionWindow2 * constructionWindow2.UValFra,
tauDir0 = constructionWindow2.g,
tauDif = constructionWindow2.g,
constructionData = constructionWindow2,
T_start = TWindow2_start)
"Window 2 (north oriented if angleDegAzi is 0 degree)"
annotation (Dialog(tab = "Transparent constructions", group = "model type"),
Expand All @@ -462,9 +458,7 @@ model Building1Zone1DBox
framePortion = framePortionWindow3,
angleDegAzi = -90.0 + angleDegAziBuilding,
angleDegTil = 90.0,
UVal = (1.0 - framePortionWindow3) * constructionWindow3.UValGla + framePortionWindow3 * constructionWindow3.UValFra,
tauDir0 = constructionWindow3.g,
tauDif = constructionWindow3.g,
constructionData = constructionWindow3,
T_start = TWindow3_start)
"Window 3 (east oriented if angleDegAzi is 0 degree)"
annotation (Dialog(tab = "Transparent constructions", group = "model type"),
Expand All @@ -475,9 +469,7 @@ model Building1Zone1DBox
framePortion = framePortionWindow4,
angleDegAzi = 0.0 + angleDegAziBuilding,
angleDegTil = 90.0,
UVal = (1.0 - framePortionWindow4) * constructionWindow4.UValGla + framePortionWindow4 * constructionWindow4.UValFra,
tauDir0 = constructionWindow4.g,
tauDif = constructionWindow4.g,
constructionData = constructionWindow4,
T_start = TWindow4_start)
"Window 4 (south oriented if angleDegAzi is 0 degree)"
annotation (Dialog(tab = "Transparent constructions", group = "model type"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ model SlidingWindow
height=2.0,
width=2.0,
widthOpen = 1.0,
UVal=0.5,
redeclare BuildingSystems.Buildings.Data.Constructions.Transparent.DoubleGlazing constructionData,
LClo=0.01)
annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
BuildingSystems.Buildings.Surfaces.SurfaceToAir surface1
Expand Down
3 changes: 2 additions & 1 deletion BuildingSystems/Buildings/Constructions/Examples/Window.mo
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ model Window
BuildingSystems.Buildings.Constructions.Windows.Window window(
height=1.0,
width=1.0,
use_GSC_in=true)
use_GSC_in=true,
redeclare BuildingSystems.Buildings.Data.Constructions.Transparent.DoubleGlazing constructionData)
annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
BuildingSystems.Buildings.Surfaces.SurfaceToAir surface2
annotation (Placement(transformation(extent={{2,-10},{22,10}})));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ model WindowWithAirpathes
BuildingSystems.Buildings.Constructions.Windows.Window window(
height=2.0,
width=1.0,
UVal=0.5,
redeclare BuildingSystems.Buildings.Data.Constructions.Transparent.DoubleGlazing constructionData,
calcAirchange=true)
annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
BuildingSystems.Buildings.Surfaces.SurfaceToAir surface1
Expand Down
Loading

0 comments on commit b1e9b9f

Please sign in to comment.