Skip to content

Commit

Permalink
Correction to line volume and getNodePos:
Browse files Browse the repository at this point in the history
- Corrected missing d term in line volume calculation
  in Line::setup.
- Corrected line indexing in getNodePos.
- Thanks to @ahmedmetin for noting these bugs.
  • Loading branch information
mattEhall committed Mar 9, 2021
1 parent fe529a5 commit ea5ccf8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Line.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ void Line::setup(int number_in, LineProps props, double UnstrLen_in, int NumNode

for (int i=0; i<N; i++)
{ l[i] = UnstrLen/double(N); // distribute line length evenly over segments
V[i] = l[i]*0.25*pi*d;
V[i] = l[i]*0.25*pi*d*d;
}

// moved output file creation to Line::Initialize
Expand Down
6 changes: 3 additions & 3 deletions MoorDyn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* along with MoorDyn. If not, see <http://www.gnu.org/licenses/>.
*/

// This is version 1.01.02. Feb 14, 2021.
// This is version 1.01.03. March 9, 2021.

#include "Misc.h"
#include "MoorDyn.h"
Expand Down Expand Up @@ -269,7 +269,7 @@ int DECLDIR LinesInit(double X[], double XD[])
#endif

// ---------------------------- MoorDyn title message ----------------------------
cout << "\n Running MoorDyn (v1.01.02C, 2021-02-14)\n Copyright (c) Matt Hall, licensed under GPL v3.\n";
cout << "\n Running MoorDyn (v1.01.03C, 2021-03-09)\n Copyright (c) Matt Hall and NREL, licensed under GPL v3.\n";

//dt = *dTime; // store time step from FAST

Expand Down Expand Up @@ -1399,7 +1399,7 @@ int DECLDIR GetNodePos(int LineNum, int NodeNum, double pos[3])
// output LINE fairlead (top end) tensions
if ((LineNum > 0) && (LineNum <= nLines))
{
int worked = LineList[LineNum].getNodePos(NodeNum, pos); // call line member function to fill in coordinates of the node of interest
int worked = LineList[LineNum-1].getNodePos(NodeNum, pos); // call line member function to fill in coordinates of the node of interest
if (worked >= 0)
return 0; // success
}
Expand Down

0 comments on commit ea5ccf8

Please sign in to comment.