Skip to content

Commit 166fa76

Browse files
author
Rudy Alkarem
committed
update for FFarm compatible moordyn output:
- removing anchors as bodies in the moorpy system before unloading.
1 parent 4bbf5e2 commit 166fa76

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

famodel/project.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4874,6 +4874,16 @@ def FFarmCompatibleMDOutput(self, filename, MDoptionsDict=None, **kwargs):
48744874
from moorpy.helpers import lengthAwareSegmentation
48754875

48764876
lengthAwareSegmentation(ms_temp.lineList)
4877+
4878+
# Remove anchors from ms_temp
4879+
bodies_to_be_deleted = []
4880+
for body in ms_temp.bodyList:
4881+
if body.r6[2] < 0:
4882+
# this is an anchor, remove it
4883+
bodies_to_be_deleted.append(body)
4884+
for body in bodies_to_be_deleted:
4885+
ms_temp.bodyList.remove(body)
4886+
48774887
ms_temp.unload(fileName=filename, phi=phi, MDoptionsDict=MDoptionsDict, outputList=outputList, flag=flag)
48784888

48794889
# rename Body to Turbine if needed

0 commit comments

Comments
 (0)