|
| 1 | +within OpenIPSL.Electrical.Renewables.PSSE.AddOnBlocks; |
| 2 | +model IrradianceToPower "PV Array Power Output from Irradiance." |
| 3 | + |
| 4 | + parameter Modelica.Units.SI.ApparentPower M_b = 100000000 "Equipment apparent power"; |
| 5 | + parameter Modelica.Units.SI.ActivePower Ypv = 1000 "Rated capacity of the PV array"; |
| 6 | + parameter Modelica.Units.SI.Temperature Tcstc = 25 "PV cell temperature under standard test conditions"; |
| 7 | + parameter Real fpv = 0.9 "PV derating factor"; |
| 8 | + parameter Real ap = -0.48 "Temperature coefficient of power"; |
| 9 | + parameter Modelica.Units.SI.RadiantEnergyFluenceRate Gtstc = 1000 "Radiant energy fluence rate of PV array"; |
| 10 | + |
| 11 | + Modelica.Blocks.Interfaces.RealOutput Ppv |
| 12 | + annotation (Placement(transformation(extent={{100,-10},{120,10}}))); |
| 13 | + Modelica.Blocks.Sources.CombiTimeTable SolarRadiation(table= |
| 14 | + SolarRadiationTable) |
| 15 | + annotation (Placement(transformation(extent={{-80,40},{-60,60}}))); |
| 16 | + Modelica.Blocks.Sources.CombiTimeTable SolarArrayTemperature(table= |
| 17 | + SolarArrayTemperatureTable) |
| 18 | + annotation (Placement(transformation(extent={{-80,-60},{-60,-40}}))); |
| 19 | + |
| 20 | + parameter Real SolarRadiationTable[:,:]=fill(0.0, 0, 2) |
| 21 | + "Table matrix (time = first column; e.g., table=[0, 0; 1, 1; 2, 4])"; |
| 22 | + parameter Real SolarArrayTemperatureTable[:,:]=fill(0.0, 0, 2) |
| 23 | + "Table matrix (time = first column; e.g., table=[0, 0; 1, 1; 2, 4])"; |
| 24 | +equation |
| 25 | + |
| 26 | + Ppv = (Ypv/M_b)*fpv*(SolarRadiation.y[1]/Gtstc)*(1 + ap*(SolarArrayTemperature.y[1] - Tcstc)); |
| 27 | + |
| 28 | + annotation (Icon(coordinateSystem(preserveAspectRatio=false), graphics={ |
| 29 | + Rectangle(extent={{-100,100},{100,-100}}, lineColor={28,108,200}), |
| 30 | + Polygon( |
| 31 | + points={{-100,-60},{-60,-100},{-100,-100},{-100,-60}}, |
| 32 | + lineColor={0,0,0}, |
| 33 | + fillColor={255,170,85}, |
| 34 | + fillPattern=FillPattern.Solid), |
| 35 | + Polygon( |
| 36 | + points={{-100,-20},{-20,-100},{-60,-100},{-100,-60},{-100,-20}}, |
| 37 | + lineColor={0,0,0}, |
| 38 | + fillColor={255,255,170}, |
| 39 | + fillPattern=FillPattern.Solid), |
| 40 | + Polygon( |
| 41 | + points={{-100,20},{20,-100},{-20,-100},{-100,-20},{-100,20}}, |
| 42 | + lineColor={0,0,0}, |
| 43 | + fillColor={255,170,85}, |
| 44 | + fillPattern=FillPattern.Solid), |
| 45 | + Polygon( |
| 46 | + points={{-100,60},{60,-100},{20,-100},{-100,20},{-100,60}}, |
| 47 | + lineColor={0,0,0}, |
| 48 | + fillColor={255,255,170}, |
| 49 | + fillPattern=FillPattern.Solid), |
| 50 | + Polygon( |
| 51 | + points={{-100,100},{100,-100},{60,-100},{-100,60},{-100,100}}, |
| 52 | + lineColor={0,0,0}, |
| 53 | + fillColor={255,170,85}, |
| 54 | + fillPattern=FillPattern.Solid), |
| 55 | + Polygon( |
| 56 | + points={{-100,100},{100,-100},{100,-60},{-60,100},{-100,100}}, |
| 57 | + lineColor={0,0,0}, |
| 58 | + fillColor={255,255,170}, |
| 59 | + fillPattern=FillPattern.Solid), |
| 60 | + Polygon( |
| 61 | + points={{-20,100},{100,-20},{100,-60},{-60,100},{-20,100}}, |
| 62 | + lineColor={0,0,0}, |
| 63 | + fillColor={255,170,85}, |
| 64 | + fillPattern=FillPattern.Solid), |
| 65 | + Polygon( |
| 66 | + points={{-20,100},{100,-20},{100,20},{20,100},{-20,100}}, |
| 67 | + lineColor={0,0,0}, |
| 68 | + fillColor={255,255,170}, |
| 69 | + fillPattern=FillPattern.Solid), |
| 70 | + Polygon( |
| 71 | + points={{60,100},{100,60},{100,20},{20,100},{60,100}}, |
| 72 | + lineColor={0,0,0}, |
| 73 | + fillColor={255,170,85}, |
| 74 | + fillPattern=FillPattern.Solid), |
| 75 | + Polygon( |
| 76 | + points={{60,100},{100,60},{100,60},{100,100},{60,100}}, |
| 77 | + lineColor={0,0,0}, |
| 78 | + fillColor={255,255,170}, |
| 79 | + fillPattern=FillPattern.Solid), |
| 80 | + Text( |
| 81 | + extent={{-100,100},{100,-100}}, |
| 82 | + textColor={0,0,255}, |
| 83 | + textString="Irradiance |
| 84 | +to |
| 85 | +Power")})); |
| 86 | +end IrradianceToPower; |
0 commit comments