Skip to content

Commit

Permalink
Changed gas layer to be conditional (#3039)
Browse files Browse the repository at this point in the history
* changed the gas layer to be conditional
  • Loading branch information
JayHuLBL authored May 25, 2022
1 parent c0fe286 commit c3f1375
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
10 changes: 9 additions & 1 deletion Buildings/HeatTransfer/Windows/BaseClasses/CenterOfGlass.mo
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ model CenterOfGlass "Model for center of glass of a window construction"
final gas=glaSys.gas,
each final til=til,
each linearize=linearize,
each final homotopyInitialization=homotopyInitialization)
each final homotopyInitialization=homotopyInitialization) if have_GasLay
"Window gas layer"
annotation (Placement(transformation(extent={{20,10},{40,30}})));

Expand All @@ -64,6 +64,8 @@ model CenterOfGlass "Model for center of glass of a window construction"
protected
final parameter Integer nGlaLay = size(glaSys.glass, 1)
"Number of glass layers";
final parameter Boolean have_GasLay = nGlaLay > 1
"True if it has gas layer";

initial equation
assert(homotopyInitialization, "In " + getInstanceName() +
Expand Down Expand Up @@ -209,6 +211,12 @@ Buildings.HeatTransfer.Windows.InteriorHeatTransferConvective</a>.
revisions="<html>
<ul>
<li>
May 24, 2022, by Jianjun Hu:<br/>
Changed the gas layer to be conditional.<br/>
This is for
<a href=\"https://github.com/lbl-srg/modelica-buildings/issues/3026\">#3026</a>.
</li>
<li>
April 14, 2020, by Michael Wetter:<br/>
Changed <code>homotopyInitialization</code> to a constant.<br/>
This is for
Expand Down
12 changes: 11 additions & 1 deletion Buildings/package.mo
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,16 @@ have been <b style=\"color:blue\">improved</b> in a
<b style=\"color:blue\">backward compatible</b> way:
</p>
<table class=\"releaseTable\" summary=\"summary\" border=\"1\" cellspacing=\"0\" cellpadding=\"2\" style=\"border-collapse:collapse;\">
<tr><td colspan=\"2\"><b>Buildings.HeatTransfer</b>
</td>
</tr>
<tr><td valign=\"top\">Buildings.HeatTransfer.Windows.BaseClasses.CenterOfGlass
</td>
<td valign=\"top\">Changed the gas layer to be conditional.<br/>
This is for
<a href=\"https://github.com/lbl-srg/modelica-buildings/issues/3026\">#3026</a>.
</td>
</tr>
<tr><td colspan=\"2\"><b>Buildings.Controls</b>
</td>
</tr>
Expand Down Expand Up @@ -10149,4 +10159,4 @@ requirements definition or providing feedback regarding the model applicability
to solve specific problems.
</p>
</html>"));
end Buildings;
end Buildings;

0 comments on commit c3f1375

Please sign in to comment.