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

Issue1451 add pvt model #1458

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
within AixLib.DataBase.PhotovoltaicThermal;
record ElectricalGlazedPVTWithLowEmissionCoating
"elecrical properties of pvt module"
extends PhotovoltaicThermalBaseDataDefinitionElectrical(eta_zero = 0.11819, m = -0.5033);
annotation(Documentation(info="<html>
<p><b><span style=\"color: #008000;\">Overview</span> </b></p>
<p>Derived from the simulated results of a glazed PVT Collector with low-emission coating from this <a href=\"https://www.researchgate.net/publication/327882787_Thermal_management_of_PVT_collectors_development_and_modelling_of_highly_efficient_glazed_flat_plate_PVT_collectors_with_low_emissivity_coatings_and_overheating_protection\">thesis</a> p.43 Figure 3.12.</p>
<p><b><span style=\"color: #008000;\">References</span> </b></p>
Philipp-Schmitz marked this conversation as resolved.
Show resolved Hide resolved
<p>Record is used in model <a href=\"AixLib.Fluid.Solar.Thermal.SolarThermal\">AixLib.Fluid.Solar.Thermal.SolarThermal</a>. </p>
Philipp-Schmitz marked this conversation as resolved.
Show resolved Hide resolved
<p>October 2013, Marcus Fuchs </p>
<ul>
<li>implemented </li>
Philipp-Schmitz marked this conversation as resolved.
Show resolved Hide resolved
</ul>
</html>"));
end ElectricalGlazedPVTWithLowEmissionCoating;
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
within AixLib.DataBase.PhotovoltaicThermal;
record ElectricalGlazedPVTWithoutLowEmissionCoating
"electrical properties of pvt module"
extends PhotovoltaicThermalBaseDataDefinitionElectrical(eta_zero = 0.8, m=-0.5378);
annotation(Documentation(info="<html>
<p><b><span style=\"color: #008000;\">Overview</span> </b></p>
<p>Derived from the simulated results of a glazed PVT Collector without low-emission coating from this <a href=\"https://www.researchgate.net/publication/327882787_Thermal_management_of_PVT_collectors_development_and_modelling_of_highly_efficient_glazed_flat_plate_PVT_collectors_with_low_emissivity_coatings_and_overheating_protection\">thesis</a> p.43 Figure 3.12.</p>
<p><b><span style=\"color: #008000;\">References</span> </b></p>
<p>Record is used in model <a href=\"AixLib.Fluid.Solar.Thermal.SolarThermal\">AixLib.Fluid.Solar.Thermal.SolarThermal</a>. </p>
<p>October 2013, Marcus Fuchs </p>
<ul>
<li>implemented </li>
</ul>
Philipp-Schmitz marked this conversation as resolved.
Show resolved Hide resolved
</html>"));
end ElectricalGlazedPVTWithoutLowEmissionCoating;
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
within AixLib.DataBase.PhotovoltaicThermal;
record PhotovoltaicThermalBaseDataDefinitionElectrical
"Base Data Definition for the electrical part of a photovoltaic thermal collector"
extends Modelica.Icons.Record;
parameter Modelica.Units.SI.Efficiency eta_zero(max=1)
"Conversion factor/Efficiency at Q = 0";
parameter Real m(unit = "W/(m.m.K)") "gradient of linear approximation";
FWuellhorst marked this conversation as resolved.
Show resolved Hide resolved

annotation(Documentation(revisions="<html><ul>
<li>
<i>October 25, 2016</i> by Philipp Mehrfeld:<br/>
correct units
</li>
<li>
<i>April 2014</i>, Mark Wesseling:<br/>
corrected Units
</li>
<li>
<i>October 2013</i>, Marcus Fuchs:<br/>
implemented
</li>
</ul>
</html>", info="<html>
<h4>
<span style=\"color:#008000\">Overview</span>
</h4>
<p>
This base record defines the values conversion factor and loss
coefficients for solar thermal collectors.
</p>
<h4>
<span style=\"color:#008000\">References</span>
</h4>
<p>
Base data definition for record to be used in model <a href=
Philipp-Schmitz marked this conversation as resolved.
Show resolved Hide resolved
\"AixLib.Fluid.Solar.Thermal.SolarThermal\">AixLib.Fluid.Solar.Thermal.SolarThermal</a>.
</p>
</html>"));
end PhotovoltaicThermalBaseDataDefinitionElectrical;
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
within AixLib.DataBase.PhotovoltaicThermal;
record SolarThermalBaseDataDefinition
"Base Data Definition for Solar thermal collectors"
extends Modelica.Icons.Record;
parameter Modelica.Units.SI.Efficiency eta_zero(max=1)
"Conversion factor/Efficiency at Q = 0";
parameter Real c1(unit = "W/(m.m.K)") "Loss coefficient c1";
parameter Real c2(unit = "W/(m.m.K.K)") "Loss coefficient c2";
annotation(Documentation(revisions="<html><ul>
<li>
<i>October 25, 2016</i> by Philipp Mehrfeld:<br/>
correct units
</li>
<li>
<i>April 2014</i>, Mark Wesseling:<br/>
corrected Units
</li>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this file added now?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok, it was copied from SolarThermal. Does it differ in any way from the other record? If not, we don't need this here.

<li>
<i>October 2013</i>, Marcus Fuchs:<br/>
implemented
</li>
</ul>
</html>", info="<html>
<h4>
<span style=\"color:#008000\">Overview</span>
</h4>
<p>
This base record defines the values conversion factor and loss
coefficients for solar thermal collectors.
</p>
<h4>
<span style=\"color:#008000\">References</span>
</h4>
<p>
Base data definition for record to be used in model <a href=
\"AixLib.Fluid.Solar.Thermal.SolarThermal\">AixLib.Fluid.Solar.Thermal.SolarThermal</a>.
</p>
</html>"));
end SolarThermalBaseDataDefinition;
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
within AixLib.DataBase.PhotovoltaicThermal;
record ThermalGlazedPVTWithLowEmissionCoating
"thermal properties of pvt module"
extends SolarThermalBaseDataDefinition(eta_zero = 0.66091, c1 = 3.824, c2 = 0.0211);
annotation(Documentation(info="<html>
<p><b><span style=\"color: #008000;\">Overview</span> </b></p>
<p>Derived from the simulated results of a glazed PVT Collector with low-emission coating from this <a href=\"https://www.researchgate.net/publication/327882787_Thermal_management_of_PVT_collectors_development_and_modelling_of_highly_efficient_glazed_flat_plate_PVT_collectors_with_low_emissivity_coatings_and_overheating_protection\">thesis</a> p.43 Figure 3.12.</p>
<p><b><span style=\"color: #008000;\">References</span> </b></p>
<p>Record is used in model <a href=\"AixLib.Fluid.Solar.Thermal.SolarThermal\">AixLib.Fluid.Solar.Thermal.SolarThermal</a>. </p>
</html>"));
end ThermalGlazedPVTWithLowEmissionCoating;
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
within AixLib.DataBase.PhotovoltaicThermal;
record ThermalGlazedPVTWithoutLowEmissionCoating
"thermal properties of pvt module"
extends SolarThermalBaseDataDefinition(eta_zero = 0.65458, c1 = 6.6356, c2 = 0.0235);
annotation(Documentation(info="<html>
<p><b><span style=\"color: #008000;\">Overview</span> </b></p>
<p>Derived from the simulated results of a glazed PVT Collector without low-emission coating from this <a href=\"https://www.researchgate.net/publication/327882787_Thermal_management_of_PVT_collectors_development_and_modelling_of_highly_efficient_glazed_flat_plate_PVT_collectors_with_low_emissivity_coatings_and_overheating_protection\">thesis</a> p.43 Figure 3.12.</p>
<p><b><span style=\"color: #008000;\">References</span> </b></p>
<p>Record is used in model <a href=\"AixLib.Fluid.Solar.Thermal.SolarThermal\">AixLib.Fluid.Solar.Thermal.SolarThermal</a>. </p>
</html>"));
end ThermalGlazedPVTWithoutLowEmissionCoating;
10 changes: 10 additions & 0 deletions AixLib/DataBase/PhotovoltaicThermal/package.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
within AixLib.DataBase;
package PhotovoltaicThermal "Properties for efficiency of photovoltaic thermal modules"
extends Modelica.Icons.Package;






Philipp-Schmitz marked this conversation as resolved.
Show resolved Hide resolved
end PhotovoltaicThermal;
6 changes: 6 additions & 0 deletions AixLib/DataBase/PhotovoltaicThermal/package.order
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
SolarThermalBaseDataDefinition
Philipp-Schmitz marked this conversation as resolved.
Show resolved Hide resolved
PhotovoltaicThermalBaseDataDefinitionElectrical
ThermalGlazedPVTWithLowEmissionCoating
ThermalGlazedPVTWithoutLowEmissionCoating
ElectricalGlazedPVTWithLowEmissionCoating
ElectricalGlazedPVTWithoutLowEmissionCoating
1 change: 1 addition & 0 deletions AixLib/DataBase/package.order
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ CHP
Chiller
HeatPump
Media
PhotovoltaicThermal
Pipes
Pools
Profiles
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
within AixLib.Fluid.Solar.Thermal.BaseClasses;
model PVT_SolarThermalEfficiency
"Calculates the efficiency of a thermal component of pvt"
parameter AixLib.DataBase.PhotovoltaicThermal.SolarThermalBaseDataDefinition
Collector=AixLib.DataBase.PhotovoltaicThermal.PVT_thermal()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the same model as the existing model? If so, do we really need it?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created the extra model, because i did not want to mix the new thermal properties of the pvt model with the existing solar thermal paramters. This way when working with the pvt model, only the right kind of parameters are possible to select.

"Thermal properties of Photovoltaic thermal Collector" annotation (choicesAllMatching=true);
Modelica.Blocks.Interfaces.RealInput T_air(
quantity="ThermodynamicTemperature",
unit="K",
displayUnit="degC") "Air temperature" annotation (Placement(transformation(
extent={{-20,-20},{20,20}},
rotation=270,
origin={-50,106})));
Modelica.Blocks.Interfaces.RealInput G(quantity="Irradiance", unit="W/m2")
"Global solar irradiation in W/m2" annotation (Placement(transformation(
extent={{-20,-20},{20,20}},
rotation=270,
origin={10,106})));
Modelica.Blocks.Interfaces.RealInput T_col(
quantity="ThermodynamicTemperature",
unit="K",
displayUnit="degC") "Collector temperature" annotation (Placement(
transformation(
extent={{-20,-20},{20,20}},
rotation=90,
origin={-50,-106})));
Modelica.Blocks.Interfaces.RealOutput Q_flow(quantity="HeatFlux", unit="W/m2")
"Useful heat flow from solar collector in W/m2"
annotation (Placement(transformation(extent={{98,-10},{118,10}})));
protected
Modelica.Units.SI.Efficiency eta(max=Collector.eta_zero)
"Efficiency of solar thermal collector";
Modelica.Units.SI.TemperatureDifference dT
"Temperature difference between collector and air in K";
equation
dT = T_col - T_air;
eta = max(0,
min(Collector.eta_zero,
Collector.eta_zero - Collector.c1*dT/max(G,
Modelica.Constants.eps) -
Collector.c2*dT*dT/max(G, Modelica.Constants.eps)));
Q_flow = G*eta;
annotation (Documentation(info="<html><h4>
<span style=\"color:#008000\">Overview</span>
</h4>
<p>
Model for the efficiency of a solar thermal collector. Inputs are
outdoor air temperature, fluid temperature and solar irradiation.
Based on these values and the collector properties from database,
this model calculates the heat flow to the fluid circuit. We assume
that the fluid temperature is equal to the collector temperature.
</p>
<ul>
<li>
<i>Febraury 7, 2018</i> by Peter Matthes:<br/>
Adds quatity information to RealInputs and RealOutputs.
</li>
<li>
<i>February 1, 2018&#160;</i> by Philipp Mehrfeld:<br/>
eta must be between 0 and eta_zero optical efficiency
</li>
<li>
<i>October 25, 2017</i> by Philipp Mehrfeld:<br/>
Limit eta to 0 and eta_zero.<br/>
Add correct units.<br/>
Avoid dividing by G=0.
</li>
<li>
<i>December 15, 2016&#160;</i> by Moritz Lauster:<br/>
moved
</li>
<li>
<i>November 11, 2013&#160;</i> by Marcus Fuchs:<br/>
implemented
</li>
Philipp-Schmitz marked this conversation as resolved.
Show resolved Hide resolved
</ul>
</html>"));
end PVT_SolarThermalEfficiency;
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
within AixLib.Fluid.Solar.Thermal.BaseClasses;
model SolarElectricalEfficiency
"simplified calculation for the electrical efficiency of a photovoltaic thermal collector"
parameter AixLib.DataBase.PhotovoltaicThermal.PhotovoltaicThermalBaseDataDefinitionElectrical
Collector=AixLib.DataBase.PhotovoltaicThermal.ElectricalGlazedPVTWithLowEmissionCoating()
Philipp-Schmitz marked this conversation as resolved.
Show resolved Hide resolved
"Electrical properties of Photovoltaic thermal Collector" annotation (choicesAllMatching=true);
Modelica.Blocks.Interfaces.RealInput T_air(
Philipp-Schmitz marked this conversation as resolved.
Show resolved Hide resolved
quantity="ThermodynamicTemperature",
unit="K",
displayUnit="degC") "Air temperature" annotation (Placement(transformation(
extent={{-20,-20},{20,20}},
rotation=270,
origin={-50,106})));
Modelica.Blocks.Interfaces.RealInput G(quantity="Irradiance", unit="W/m2")
"Global solar irradiation in W/m2" annotation (Placement(transformation(
extent={{-20,-20},{20,20}},
rotation=270,
origin={10,106})));
Modelica.Blocks.Interfaces.RealInput T_col(
Philipp-Schmitz marked this conversation as resolved.
Show resolved Hide resolved
quantity="ThermodynamicTemperature",
unit="K",
displayUnit="degC") "Collector temperature" annotation (Placement(
transformation(
extent={{-20,-20},{20,20}},
rotation=90,
origin={-50,-106})));
Modelica.Blocks.Interfaces.RealOutput P_el(quantity="ElectricPower", unit="W/m2")
Philipp-Schmitz marked this conversation as resolved.
Show resolved Hide resolved
"Useful electric power output from solar collector in W/m2"
annotation (Placement(transformation(extent={{98,-10},{118,10}})));
protected
Modelica.Units.SI.Efficiency eta(max=Collector.eta_zero)
"Efficiency of electricity generation of pvt collector";
Modelica.Units.SI.TemperatureDifference dT
"Temperature difference between collector and air in K";
equation
dT = T_col - T_air;
eta = max(0,
min(Collector.eta_zero,
Collector.eta_zero + Collector.m*dT/max(G,
Modelica.Constants.eps)));
P_el = G*eta;
annotation (Documentation(info="<html>
<p><b><span style=\"color: #008000;\">Overview</span> </b></p>
Philipp-Schmitz marked this conversation as resolved.
Show resolved Hide resolved
<p>Simplified Model for the electrical efficiency of a photovoltaic thermal collector. Inputs are outdoor air temperature, fluid temperature and solar irradiation. Based on these values and the collector properties from database, this model calculates the electrical power output of the collector. We assume that the fluid temperature is equal to the collector temperature. </p>
</html>"));
end SolarElectricalEfficiency;
2 changes: 2 additions & 0 deletions AixLib/Fluid/Solar/Thermal/BaseClasses/package.order
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
SolarThermalEfficiency
SolarElectricalEfficiency
PVT_SolarThermalEfficiency
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
within AixLib.Fluid.Solar.Thermal.Examples;
model PhotovoltaicThermalCollector
"Example to demonstrate the function of the photovoltaic thermal collector model"
extends Modelica.Icons.Example;

replaceable package Medium = AixLib.Media.Water constrainedby
Modelica.Media.Interfaces.PartialMedium "Medium model";

Sources.Boundary_pT source(
nPorts=1,
redeclare package Medium = Medium,
p=system.p_ambient + pVT_Modul.pressureDropCoeff*(pVT_Modul.m_flow_nominal/
995)^2 + pipe.dp_nominal)
annotation (Placement(transformation(extent={{-80,-10},{-60,10}})));
Sources.Boundary_pT sink(nPorts=1, redeclare package Medium =
Medium,
p=system.p_ambient)
annotation (Placement(transformation(extent={{100,-10},{80,10}})));
AixLib.Fluid.Sensors.MassFlowRate massFlowSensor(redeclare package Medium =
Medium)
annotation (Placement(transformation(extent={{-54,-10},{-34,10}})));
AixLib.Fluid.Sensors.TemperatureTwoPort T1(redeclare package Medium = Medium,
m_flow_nominal=system.m_flow_nominal)
annotation (Placement(transformation(extent={{-28,-10},{-8,10}})));
AixLib.Fluid.FixedResistances.PressureDrop pipe(
redeclare package Medium = Medium,
m_flow_nominal=system.m_flow_nominal,
dp_nominal=200)
annotation (Placement(transformation(extent={{54,-10},{74,10}})));
AixLib.Fluid.Sensors.TemperatureTwoPort T2(redeclare package Medium = Medium,
m_flow_nominal=system.m_flow_nominal)
annotation (Placement(transformation(extent={{28,-10},{48,10}})));
Modelica.Blocks.Sources.CombiTimeTable hotSummerDay(
extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic,
table=[0,21,0; 3600,20.6,0; 7200,20.5,0; 10800,20.4,0; 14400,20,6; 18000,20.5,
106; 21600,22.4,251; 25200,24.1,402; 28800,26.3,540; 32400,28.4,657; 36000,
30,739; 39600,31.5,777; 43200,31.5,778; 46800,32.5,737; 50400,32.5,657;
54000,32.5,544; 57600,32.5,407; 61200,32.5,257; 64800,31.6,60; 68400,30.8,
5; 72000,22.9,0; 75600,21.2,0; 79200,20.6,0; 82800,20.3,0],
offset={273.15,0.01})
annotation (Placement(transformation(extent={{-26,62},{-6,82}})));
inner Modelica.Fluid.System system(
T_ambient=298.15,
m_flow_start=system.m_flow_nominal,
use_eps_Re=true,
m_flow_nominal=1.5*pVT_Modul.A/60*995/1000,
p_ambient=300000)
annotation (Placement(transformation(extent={{-90,70},{-70,90}})));
AixLib.Fluid.Solar.Thermal.PhotovoltaicThermal pVT_Modul(
Philipp-Schmitz marked this conversation as resolved.
Show resolved Hide resolved
redeclare package Medium = AixLib.Media.Water,
m_flow_nominal=system.m_flow_nominal,
A=2,
volPip=0.05,
Collector=AixLib.DataBase.SolarThermal.AirCollector(),
pVT_SolarThermalEfficiency(Collector=
AixLib.DataBase.PhotovoltaicThermal.ThermalGlazedPVTWithLowEmissionCoating()),
solarElectricalEfficiency(Collector=
AixLib.DataBase.PhotovoltaicThermal.ElectricalGlazedPVTWithLowEmissionCoating()))
annotation (Placement(transformation(extent={{-4,-10},{20,12}})));
equation
connect(massFlowSensor.port_b, T1.port_a)
annotation (Line(points={{-34,0},{-28,0}}, color={0,127,255}));
connect(T2.port_b, pipe.port_a)
annotation (Line(points={{48,0},{54,0}}, color={0,127,255}));
connect(source.ports[1], massFlowSensor.port_a)
annotation (Line(points={{-60,0},{-54,0}}, color={0,127,255}));
connect(pipe.port_b, sink.ports[1])
annotation (Line(points={{74,0},{80,0}}, color={0,127,255}));
connect(T1.port_b, pVT_Modul.port_a)
annotation (Line(points={{-8,0},{-6,0},{-6,1},{-4,1}},
color={0,127,255}));
connect(T2.port_a, pVT_Modul.port_b)
annotation (Line(points={{28,0},{24,0},{24,1},{20,1}},
color={0,127,255}));
connect(hotSummerDay.y[1], pVT_Modul.T_air)
annotation (Line(points={{-5,72},{0.8,72},{0.8,12}},
color={0,0,127}));
connect(hotSummerDay.y[2], pVT_Modul.Irradiation)
annotation (Line(points={{-5,72},{8,72},{8,12}}, color={0,0,127}));
annotation (
experiment(StopTime=82600, Interval=3600),
__Dymola_experimentSetupOutput(events=false),
Documentation(info="<html>
<p><b><span style=\"color: #008000;\">Overview</span></b> </p>
<p>This test demonstrates the photovoltaic thermal collector model. Different types of collectors can be tested at fixed boundary conditions. </p>
</html>"),
__Dymola_Commands(file(ensureSimulated=true)=
"Resources/Scripts/Dymola/Fluid/Solar/Thermal/Examples/SolarThermalCollector.mos"));
end PhotovoltaicThermalCollector;
1 change: 1 addition & 0 deletions AixLib/Fluid/Solar/Thermal/Examples/package.order
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
SolarThermalCollector
PhotovoltaicThermalCollector