Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with writing ServoDyn input file via fast-io Rosco-Toolbox #165

Closed
Yuksel-Rudy opened this issue Aug 20, 2022 · 2 comments
Closed

Comments

@Yuksel-Rudy
Copy link
Contributor

Yuksel-Rudy commented Aug 20, 2022

Hello developers,
So I was trying to use the reading and writing capabilities of fast-io in ROSCO toolbox. I ran into an issue with the method write_ServoDyn in FAST_writer.py, specifically when writing input data under - STRUCTURAL CONTROL - section. The issue was with writing StC file names. For example:

Intended output for line 67 in ServoDyn input file:
"unused" BStCfiles - Name of the files for blade structural controllers (quoted strings) [unused when NumBStC==0]
actual output using write_ServoDyn:
"u" "n" "u" "s" "e" "d" BStCfiles - Name of the files for blade structural controllers (quoted strings) [unused when NumBStC==0]

I fixed the issue in my forked version by changing lines 1296, 1298,1300, and 1302 in FAST_writer.py as follows:

Old:
f.write('{!s:<22} {:<11} {:}'.format('"' + '" "'.join(self.fst_vt['ServoDyn'] ...
New:
f.write('{!s:<22} {:<11} {:}'.format('"' + ''.join(self.fst_vt['ServoDyn'] ...

To replicate the error using a simple python script:

import os
from ROSCO_toolbox.ofTools.fast_io.FAST_reader import InputReader_OpenFAST
from ROSCO_toolbox.ofTools.fast_io.FAST_writer import InputWriter_OpenFAST 

this_dir = os.path.dirname(os.path.abspath(__file__))

fast = InputReader_OpenFAST(FAST_ver='OpenFAST')

fast.FAST_InputFile = 'IEA-15-240-RWT-UMaineSemi.fst'  # FAST input file (ext=.fst)
fast.FAST_directory = os.path.join(this_dir,'../Test_Cases/IEA-15-240-RWT-UMaineSemi') # FAST directory

fast.read_ServoDyn()

fastout = InputWriter_OpenFAST(FAST_ver='OpenFAST')
fastout.fst_vt = fast.fst_vt

fastout.write_ServoDyn()

I hope this helps.
Best

@dzalkind
Copy link
Collaborator

Thanks, Rudy! I have seen this before, too. Thanks for the nice instructions and sorry for the long delay. I'll leave this open until we implement your suggested fix.

Dan

@dzalkind
Copy link
Collaborator

Hi Rudy,

I implemented this fix in #167 Thanks!

Dan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants