Skip to content

Commit

Permalink
Changed data record to ratings based on EN12975
Browse files Browse the repository at this point in the history
  • Loading branch information
mwetter committed Nov 21, 2017
1 parent 02a7f23 commit e19b958
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 33 deletions.
49 changes: 24 additions & 25 deletions Buildings/Fluid/SolarCollectors/Validation/EN12975NPanels.mo
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ model EN12975NPanels
extends Modelica.Icons.Example;
replaceable package Medium = Buildings.Media.Water "Medium in the system";

parameter Integer nPanels = 10 "Number of panels";
parameter Integer nPanels=10 "Number of panels";

Buildings.Fluid.SolarCollectors.EN12975
solCol(
Buildings.Fluid.SolarCollectors.EN12975 solCol(
redeclare package Medium = Medium,
per=Data.GlazedFlatPlate.FP_GuangdongFSPTY95(),
per=datSolCol,
shaCoe=0,
azi=0,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
Expand All @@ -23,7 +22,7 @@ model EN12975NPanels
annotation (Placement(transformation(extent={{20,20},{40,40}})));

Buildings.BoundaryConditions.WeatherData.ReaderTMY3 weaDat(filNam=
"modelica://Buildings/Resources/weatherdata/USA_CA_San.Francisco.Intl.AP.724940_TMY3.mos")
"modelica://Buildings/Resources/weatherdata/USA_CA_San.Francisco.Intl.AP.724940_TMY3.mos")
"Weather data file reader"
annotation (Placement(transformation(extent={{-40,60},{-20,80}})));
Buildings.Fluid.Sources.Boundary_pT sou(
Expand All @@ -37,13 +36,12 @@ model EN12975NPanels
redeclare package Medium = Medium,
use_m_flow_in=true,
use_T_in=false,
T=293.15)
"Inlet for water flow, at a prescribed flow rate and temperature"
T=303.15) "Inlet for water flow, at a prescribed flow rate and temperature"
annotation (Placement(transformation(extent={{-12,20},{8,40}})));

Buildings.Fluid.SolarCollectors.EN12975 solCol1(
redeclare package Medium = Medium,
per=Data.GlazedFlatPlate.FP_GuangdongFSPTY95(),
per=datSolCol,
shaCoe=0,
azi=0,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
Expand All @@ -66,22 +64,23 @@ model EN12975NPanels
redeclare package Medium = Medium,
use_m_flow_in=true,
use_T_in=false,
T=293.15)
"Inlet for water flow, at a prescribed flow rate and temperature"
T=303.15) "Inlet for water flow, at a prescribed flow rate and temperature"
annotation (Placement(transformation(extent={{-12,-40},{8,-20}})));
Modelica.Blocks.Math.Gain gaiNPan(k=nPanels) "Gain for number of panels"
annotation (Placement(transformation(extent={{-52,-32},{-32,-12}})));
Modelica.Blocks.Sources.RealExpression difHeaGai(
y=solCol.heaGai[30].Q_flow - solCol1.heaGai[30].Q_flow/nPanels)
Modelica.Blocks.Sources.RealExpression difHeaGai(y=solCol.heaGai[30].Q_flow
- solCol1.heaGai[30].Q_flow/nPanels)
"Difference in heat gain at last panel between model with 1 and with 30 panels"
annotation (Placement(transformation(extent={{-68,-72},{-48,-52}})));
Modelica.Blocks.Sources.RealExpression difHeaLos(
y=solCol.QLos[30].Q_flow - solCol1.QLos[30].Q_flow/nPanels)
Modelica.Blocks.Sources.RealExpression difHeaLos(y=solCol.QLos[30].Q_flow -
solCol1.QLos[30].Q_flow/nPanels)
"Difference in heat loss at last panel between model with 1 and with 30 panels"
annotation (Placement(transformation(extent={{-68,-92},{-48,-72}})));
Modelica.Blocks.Sources.Constant m_flow_nominal(k=2*0.02)
Modelica.Blocks.Sources.Constant m_flow_nominal(k=datSolCol.A*datSolCol.mperA_flow_nominal)
"Nominal flow rate for one panel"
annotation (Placement(transformation(extent={{-92,28},{-72,48}})));
annotation (Placement(transformation(extent={{-88,30},{-68,50}})));
parameter Data.Concentrating.C_VerificationModel datSolCol
annotation (Placement(transformation(extent={{60,60},{80,80}})));
equation
connect(weaDat.weaBus, solCol1.weaBus) annotation (Line(
points={{-20,70},{14,70},{14,-20},{20,-20},{20,-20.4}},
Expand All @@ -106,10 +105,10 @@ equation
points={{20,39.6},{18,39.6},{18,40},{14,40},{14,70},{-20,70}},
color={255,204,51},
thickness=0.5));
connect(m_flow_nominal.y, bou.m_flow_in)
annotation (Line(points={{-71,38},{-12,38}}, color={0,0,127}));
connect(gaiNPan.u, m_flow_nominal.y) annotation (Line(points={{-54,-22},{-60,-22},
{-60,38},{-71,38}}, color={0,0,127}));
connect(m_flow_nominal.y, bou.m_flow_in) annotation (Line(points={{-67,40},{-22,
40},{-22,38},{-12,38}}, color={0,0,127}));
connect(gaiNPan.u, m_flow_nominal.y) annotation (Line(points={{-54,-22},{-60,
-22},{-60,40},{-67,40}}, color={0,0,127}));
annotation (
Documentation(info="<html>
<p>
Expand All @@ -123,8 +122,7 @@ The instances <code>difHeaGai</code> and <code>difHeaLos</code>
compare the heat gain and heat loss between the two models.
The output of these blocks should be zero, except for rounding errors.
</p>
</html>",
revisions="<html>
</html>", revisions="<html>
<ul>
<li>
November 21, 2017, by Michael Wetter:<br/>
Expand All @@ -133,7 +131,8 @@ First implementation to validate
</li>
</ul>
</html>"),
__Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Fluid/SolarCollectors/Validation/EN12975NPanels.mos"
"Simulate and plot"),
experiment(Tolerance=1e-6, StopTime=86400));
__Dymola_Commands(file=
"modelica://Buildings/Resources/Scripts/Dymola/Fluid/SolarCollectors/Validation/EN12975NPanels.mos"
"Simulate and plot"),
experiment(Tolerance=1e-6, StopTime=86400));
end EN12975NPanels;
Loading

0 comments on commit e19b958

Please sign in to comment.