Skip to content

Bug report: openfast_io/FAST_reader.py, array index for ServoDyn/GenTrq_TLU #3150

@LKa505

Description

@LKa505

Hello!

Bug description
There is a tiny bug in openfast_io/FAST_reader.py, in the read_ServoDyn method, when digesting the GenSpd_TLU/GenTrq_TLU table below the DLL_NumTrq parameter:

    self.fst_vt['ServoDyn']['DLL_NumTrq'] = int(f.readline().split()[0])
    f.readline()
    f.readline()
    self.fst_vt['ServoDyn']['GenSpd_TLU'] = [None] * self.fst_vt['ServoDyn']['DLL_NumTrq']
    self.fst_vt['ServoDyn']['GenTrq_TLU'] = [None] * self.fst_vt['ServoDyn']['DLL_NumTrq']
    for i in range(self.fst_vt['ServoDyn']['DLL_NumTrq']):
        data = f.readline().split()
        self.fst_vt['ServoDyn']['GenSpd_TLU'][i]  = float_read(data[0])
        self.fst_vt['ServoDyn']['GenTrq_TLU'][i]  = float_read(data[0])

To fix the bug, the last line should read:

        self.fst_vt['ServoDyn']['GenTrq_TLU'][i]  = float_read(data[1])

otherwise it will read the first table column again instead of the second column.

OpenFAST Version
This is on v4.1.2, and also the current dev branch.

Best Regards,
Ludwig

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions