Skip to content

Commit 478dcd3

Browse files
author
Rudy Alkarem
committed
using length-aware segmentation scheme in FFarmCompatibleMDOutput for better MD input file extraction:
- It focuses on enhancing the choice of segment lengths based on the line length for better convergence during initialization.
1 parent d619637 commit 478dcd3

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

famodel/project.py

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4397,17 +4397,10 @@ def FFarmCompatibleMDOutput(self, filename, MDoptionsDict=None, **kwargs):
43974397
else:
43984398
phi = None
43994399

4400-
# Setup nNodes of lines manually <<< TODO: Need to figure out a more automatic way of signing those numbers
4401-
for line in ms_temp.lineList:
4402-
if 0 < line.L < 20:
4403-
line.nNodes = 3
4404-
elif 20 <= line.L < 100:
4405-
line.nNodes = 6
4406-
elif 100 <= line.L < 700:
4407-
line.nNodes = 11
4408-
elif line.L >= 700:
4409-
line.nNodes = 16
4410-
4400+
# Setup nNodes of lines manually based on the segment length desired.
4401+
from moorpy.helpers import lengthAwareSegmentation
4402+
4403+
lengthAwareSegmentation(ms_temp.lineList)
44114404
ms_temp.unload(fileName=filename, phi=phi, MDoptionsDict=MDoptionsDict, outputList=outputList, flag=flag)
44124405

44134406
# rename Body to Turbine if needed

0 commit comments

Comments
 (0)