Skip to content

Commit

Permalink
Refs #27: Change lambda1 to lambda_i
Browse files Browse the repository at this point in the history
  • Loading branch information
christiankral committed Apr 13, 2020
1 parent fab4d35 commit 85d9b63
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 6 deletions.
6 changes: 4 additions & 2 deletions WindPowerPlants/Components/PitchWindTurbine.mo
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@ equation
<p>The wind turbine model determined the power coefficient
<img src=\"modelica://WindPowerPlants/Resources/Images/cp.png\"/>
as a function of the input <img src=\"modelica://WindPowerPlants/Resources/Images/beta.png\"/> and the quantity
<img src=\"modelica://WindPowerPlants/Resources/Images/lambda1.png\"/>.
<img src=\"modelica://WindPowerPlants/Resources/Images/lambda_i.png\"/>.
The coefficients <img src=\"modelica://WindPowerPlants/Resources/Images/c1...c6.png\"/>
are determined from a parameter record in
<a href=\"modelica://WindPowerPlants.Records.TurbineData\">TurbineData</a> </p>
</html>"), Icon(coordinateSystem(extent = {{-100, -100}, {100, 100}}, preserveAspectRatio = false, grid = {2, 2}), graphics={ Line(origin = {-59.6474, -0.17987}, points = {{-0.706547, 0.533853}, {-20.3526, 80.1799}, {-0.3526, 100.18}, {19.6474, 80.1799}, {-20.3526, -79.8201}, {-0.3526, -99.8201}, {21.6474, -79.8201}, {0.00141724, 0.179871}}), Ellipse(fillColor = {95, 95, 95}, fillPattern = FillPattern.HorizontalCylinder, extent = {{-100, 10}, {-60, -10}}, endAngle = 360), Rectangle(fillColor = {95, 95, 95}, fillPattern = FillPattern.HorizontalCylinder, extent = {{-80, 10}, {100, -10}}), Text(origin = {0, 121}, lineColor = {0, 0, 255}, extent = {{-100, 9}, {100, -11}}, textString = "%name"), Line(points = {{0, 40}, {0, -100}}, color = {255, 0, 255}), Line(points={{-40,20},{-6,40},{20,80},{80,80}}, color = {255, 0, 255})}));
</html>"), Icon(coordinateSystem(extent = {{-100, -100}, {100, 100}}, preserveAspectRatio = false, grid = {2, 2}), graphics={ Line(origin = {-59.6474, -0.17987}, points = {{-0.706547, 0.533853}, {-20.3526, 80.1799}, {-0.3526, 100.18}, {19.6474, 80.1799}, {-20.3526, -79.8201}, {-0.3526, -99.8201}, {21.6474, -79.8201}, {0.00141724, 0.179871}}), Ellipse(fillColor = {95, 95, 95},
fillPattern = FillPattern.HorizontalCylinder, extent = {{-100, 10}, {-60, -10}}, endAngle = 360), Rectangle(fillColor = {95, 95, 95},
fillPattern = FillPattern.HorizontalCylinder, extent = {{-80, 10}, {100, -10}}), Text(origin = {0, 121}, lineColor = {0, 0, 255}, extent = {{-100, 9}, {100, -11}}, textString = "%name"), Line(points = {{0, 40}, {0, -100}}, color = {255, 0, 255}), Line(points={{-40,20},{-6,40},{20,80},{80,80}}, color = {255, 0, 255})}));
end PitchWindTurbine;
6 changes: 3 additions & 3 deletions WindPowerPlants/Functions/cpVal.mo
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ function cpVal "Power coefficient"
input Real beta "Pitch angle in degree";
output Real cp "Power coefficient";
protected
Real lambda1 "Internal lambda";
Real lambda_i "Internal lambda";
algorithm
lambda1 := 1 / (1 / (lambda + 0.08*beta + Modelica.Constants.eps) - 0.035 / (beta ^ 3 + 1));
cp := turbineData.c1 * (turbineData.c2 / lambda1 - turbineData.c3 * beta - turbineData.c4) * exp(-turbineData.c5 / lambda1) + turbineData.c6 * lambda1;
lambda_i := 1 / (1 / (lambda + 0.08*beta + Modelica.Constants.eps) - 0.035 / (beta ^ 3 + 1));
cp := turbineData.c1 * (turbineData.c2 / lambda_i - turbineData.c3 * beta - turbineData.c4) * exp(-turbineData.c5 / lambda_i) + turbineData.c6 * lambda_i;
cp := max(0, cp);
annotation(Documentation(info = "<html>
This function determines the power coefficient cp from <code>lambda</code>, <code>beta</code>
Expand Down
2 changes: 1 addition & 1 deletion WindPowerPlants/Records/TurbineData/Generic.mo
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ record Generic "Gerneric wind turbine record"
<img src=\"modelica://WindPowerPlants/Resources/Images/cpturbine.png\"/>
</p>
<p>
<img src=\"modelica://WindPowerPlants/Resources/Images/lambda1turbine.png\"/>
<img src=\"modelica://WindPowerPlants/Resources/Images/lambda_i_turbine.png\"/>
</p>
</html>"));
end Generic;
Binary file modified WindPowerPlants/Resources/Images/cpturbine.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions WindPowerPlants/Resources/Images/cpturbine.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
c_p = c_1 \left(\dfrac {c_2}{\lambda_i} - c_3 \beta - c_4 \right ) e^{\frac {-c_5}{\lambda_i}} + c_6 \lambda_i
Binary file removed WindPowerPlants/Resources/Images/lambda1.png
Binary file not shown.
Binary file removed WindPowerPlants/Resources/Images/lambda1turbine.png
Binary file not shown.
Binary file added WindPowerPlants/Resources/Images/lambda_i.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions WindPowerPlants/Resources/Images/lambda_i_turbine.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
\lambda_i = \dfrac {1} {\dfrac{1}{\lambda+0.08\beta} + \dfrac{0.035}{\beta^3+1}}
6 changes: 6 additions & 0 deletions WindPowerPlants/UsersGuide/ReleaseNotes.mo
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ class ReleaseNotes "Release Notes"
extends Modelica.Icons.ReleaseNotes;
annotation(preferredView = "info", Documentation(info="<html>
<h5>Version 1.X.X, 2020-XX-XX</h5>
<ul>
<li>Changed internal variable <code>lambda1</code> to <code>lambda_i</code>
<a href=\"https://github.com/christiankral/WindPowerPlants/issues/27\">#27</a></li>
</ul>
<h5>Version 1.3.0, 2019-10-29</h5>
<ul>
<li>Use full qualified class names in exammples, see
Expand Down

0 comments on commit 85d9b63

Please sign in to comment.