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

solar collector, correct flow resistance for parallel configurations, and make computeFlowResistance final #3600

Merged
merged 2 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 9 additions & 0 deletions Buildings/Fluid/SolarCollectors/ASHRAE93.mo
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,15 @@ capacity of copper.
</html>", revisions="<html>
<ul>
<li>
December 11, 2023, by Michael Wetter:<br/>
Corrected implementation of pressure drop calculation for the situation where the collectors are in parallel,
e.g., if <code>sysConfig == Buildings.Fluid.SolarCollectors.Types.SystemConfiguration.Parallel</code>.<br/>
Changed assignment of <code>computeFlowResistance</code> to <code>final</code> based on
<code>dp_nominal</code>.<br/>
This is for
<a href=\"https://github.com/lbl-srg/modelica-buildings/issues/3597\">Buildings, #3597</a>.
</li>
<li>
September 16, 2021, by Michael Wetter:<br/>
Changed <code>lat</code> from being a parameter to an input from weather bus.<br/>
This is for
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
within Buildings.Fluid.SolarCollectors.BaseClasses;
model PartialSolarCollector "Partial model for solar collectors"
extends Buildings.Fluid.Interfaces.LumpedVolumeDeclarations;
extends Buildings.Fluid.Interfaces.TwoPortFlowResistanceParameters(final dp_nominal = dp_nominal_final);
extends Buildings.Fluid.Interfaces.TwoPortFlowResistanceParameters(
final dp_nominal = dp_nominal_final,
final computeFlowResistance=(abs(dp_nominal) > Modelica.Constants.eps));
extends Buildings.Fluid.Interfaces.PartialTwoPortInterface(
final m_flow_nominal=perPar.mperA_flow_nominal*perPar.A);
final m_flow_nominal=m_flow_nominal_final);

constant Boolean homotopyInitialization = true "= true, use homotopy method"
annotation(HideResult=true);
Expand Down Expand Up @@ -125,9 +127,14 @@ protected
"Partial performance data"
annotation(choicesAllMatching=true);

Modelica.Blocks.Interfaces.RealInput shaCoe_internal
Modelica.Blocks.Interfaces.RealInput shaCoe_internal
"Internally used shading coefficient";

final parameter Modelica.Units.SI.MassFlowRate m_flow_nominal_final(
displayUnit="kg/s") = if sysConfig == Buildings.Fluid.SolarCollectors.Types.SystemConfiguration.Parallel
then nPanels_internal*perPar.mperA_flow_nominal*perPar.A else perPar.mperA_flow_nominal*perPar.A
"Nominal mass flow rate through the system of collectors";

final parameter Modelica.Units.SI.PressureDifference dp_nominal_final(
displayUnit="Pa") = if sysConfig == Buildings.Fluid.SolarCollectors.Types.SystemConfiguration.Series
then nPanels_internal*perPar.dp_nominal else perPar.dp_nominal
Expand Down Expand Up @@ -242,6 +249,15 @@ CEN 2006, European Standard 12975-1:2006, European Committee for Standardization
revisions="<html>
<ul>
<li>
December 11, 2023, by Michael Wetter:<br/>
Corrected implementation of pressure drop calculation for the situation where the collectors are in parallel,
e.g., if <code>sysConfig == Buildings.Fluid.SolarCollectors.Types.SystemConfiguration.Parallel</code>.<br/>
Changed assignment of <code>computeFlowResistance</code> to <code>final</code> based on
<code>dp_nominal</code>.<br/>
This is for
<a href=\"https://github.com/lbl-srg/modelica-buildings/issues/3597\">Buildings, #3597</a>.
</li>
<li>
September 16, 2021, by Michael Wetter:<br/>
Changed <code>lat</code> from being a parameter to an input from weather bus.<br/>
This is for
Expand Down
11 changes: 10 additions & 1 deletion Buildings/Fluid/SolarCollectors/EN12975.mo
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,15 @@ capacity of copper.
</html>", revisions="<html>
<ul>
<li>
December 11, 2023, by Michael Wetter:<br/>
Corrected implementation of pressure drop calculation for the situation where the collectors are in parallel,
e.g., if <code>sysConfig == Buildings.Fluid.SolarCollectors.Types.SystemConfiguration.Parallel</code>.<br/>
Changed assignment of <code>computeFlowResistance</code> to <code>final</code> based on
<code>dp_nominal</code>.<br/>
This is for
<a href=\"https://github.com/lbl-srg/modelica-buildings/issues/3597\">Buildings, #3597</a>.
</li>
<li>
September 16, 2021, by Michael Wetter:<br/>
Changed <code>lat</code> from being a parameter to an input from weather bus.<br/>
This is for
Expand All @@ -134,7 +143,7 @@ First implementation.
</html>"),
Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,
100}}),
graphics={
graphics={
Rectangle(
extent={{-84,100},{84,-100}},
lineColor={27,0,55},
Expand Down
13 changes: 11 additions & 2 deletions Buildings/Fluid/SolarCollectors/Examples/Tubular.mo
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,15 @@ model Tubular "Example showing the use of Tubular"
Modelica.Blocks.Sources.Sine sine(
f=3/86400,
offset=101325,
amplitude=-1.5*solCol.dp_nominal)
amplitude=-0.1*solCol.dp_nominal)
annotation (Placement(transformation(extent={{-100,-20},{-80,0}})));
Buildings.Fluid.Sources.Boundary_pT sou(
redeclare package Medium = Medium,
T=273.15 + 10,
nPorts=1,
use_p_in=true,
p(displayUnit="Pa")) "Inlet for water flow" annotation (Placement(
p(displayUnit="Pa")) "Inlet for water flow"
annotation (Placement(
transformation(
extent={{10,-10},{-10,10}},
rotation=180,
Expand Down Expand Up @@ -92,6 +93,14 @@ equation
revisions="<html>
<ul>
<li>
December 11, 2023, by Michael Wetter:<br/>
Changed design flow rate. This is due to correction for the
implementation of the pressure drop calculation for the situation where collectors are in parallel,
e.g., if <code>sysConfig == Buildings.Fluid.SolarCollectors.Types.SystemConfiguration.Parallel</code>.<br/>
This is for
<a href=\"https://github.com/lbl-srg/modelica-buildings/issues/3597\">Buildings, #3597</a>.
</li>
<li>
September 16, 2021, by Michael Wetter:<br/>
Removed parameter assignment for <code>lat</code>.<br/>
This is for
Expand Down
Loading