Commit 8fdbb660 authored by Gerrit Erichsen's avatar Gerrit Erichsen
Browse files

First idea of a hot fix for problem with co-dependent turbines at 3 turbines...

First idea of a hot fix for problem with co-dependent turbines at 3 turbines for wind placement algorithm. not tested.
parent 8c0ef4b3
......@@ -717,10 +717,14 @@ Wind::Wind(string name, double installedPower, double hubHeight, double rotorDia
* m_entrainmentConstant * k);
double y = yNew - (sin(PI / 180. * windDirections[i])
* m_entrainmentConstant * k);
size_t xNewId = static_cast<size_t>(int(x / m_rotorDiameter));
size_t yNewId = static_cast<size_t>(int(y / m_rotorDiameter));
if (xNewId < static_cast<size_t>(m_nCellsRow)
int xNewIdInt = static_cast<int>(x / m_rotorDiameter);
int yNewIdInt = static_cast<int>(y / m_rotorDiameter);
size_t xNewId = static_cast<size_t>(xNewIdInt);
size_t yNewId = static_cast<size_t>(yNewIdInt);
if (xNewIdInt >= 0 && yNewIdInt >= 0
&& xNewId < static_cast<size_t>(m_nCellsRow)
&& yNewId < static_cast<size_t>(m_nCellsColumn))
{
if (m_gridToTurbineIdMap[yNewId][xNewId] >= 0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment