Linking windfiles in AeroDyn

Provide feedback, request enhancements, and get help with wind-turbine computer-aided engineering tools.

Moderators: Bonnie.Jonkman, Jason.Jonkman

Tim.Gerloff
Posts: 8
Joined: Mon Oct 31, 2011 4:40 am
Organization: "self"
Location: Germany

Linking windfiles in AeroDyn

Postby Tim.Gerloff » Thu Jul 19, 2012 10:36 am

Dear Bonnie, dear Jason,

I would like to link the XXX.ipt file to an arbitrary folder containing a XXX.wnd file. Unfortunately , as far as I know, it is only possible to link subfolders with XXX.wnd files starting from the folder containing the XXX.ipt file. Is it somehow possible to get it working in the same way as FAST does the linking?
I would change the code on my own, if you could give me a hint where to start.

Best Regards.
Tim

Bonnie.Jonkman
Posts: 569
Joined: Thu Nov 10, 2005 10:51 am
Organization: Envision Energy USA
Location: Colorado
Location: Boulder, CO
Contact:

Re: Linking windfiles in AeroDyn

Postby Bonnie.Jonkman » Fri Jul 20, 2012 2:46 pm

Tim,

All file names in FAST v7.01.00a-bjj are relative to the input file in which they are specified, unless you hard-code the absolute path (i.e., you could specify the wind file as "C:\WindFiles\MyWindFile.wnd"). The FAST input file asks for the name of the AeroDyn input file (so the AeroDyn .ipt file is relative to the FAST file); the wind file is specified in the AeroDyn input file (so the wind file .wnd file is relative to the location of the AeroDyn .ipt file).

If you have a need to change the way this works, you can modify the code without too much trouble. Just look for wherever the NWTC Library subroutine called PathIsRelative is used.
Bonnie Jonkman

Envision Energy USA, 2016-
National Renewable Energy Laboratory, 2003-2016

Ana.Carrillo
Posts: 16
Joined: Thu Jan 13, 2011 2:53 am
Organization: self
Location: Spain

Re: Linking windfiles in AeroDyn

Postby Ana.Carrillo » Mon May 06, 2013 1:35 am

Good morning,

I downloaded FAST v7.02.00 d-bjj and NWTC Library v1.07.00b-mlb last week because I need forces in various nodes (blade and tower). I'd like to work with absolute paths (to the current work directory) in all my input files (AeroDyn and FAST). I did:

1. I found the subroutine PathIsRelative in NWTC_IO.f90
2. I changed this subroutine (just commented some lines -red color-. You can see it below). Thank other proposals.
3. ???? What's the next step? I think I have to compile NWTC_IO.f90; am I right? If so, what will be the result or the next step? I haven't experience in this issue and I don't know how do it. I can't do any test because I don't have Fortran.

Thanks in advance



MODIFIED SUBROUTINE PathIsRelative


!=======================================================================
FUNCTION PathIsRelative ( GivenFil )


! Let's determine in the given file name is absolute or relative.
!
! We'll consider an absolute path one that satisfies one of the
! following four criteria:
! 1) It contains ":/"
! 2) It contains ":\"
! 3) It starts with "/"
! 4) It starts with "\"
! All others are considered relative.



! Argument declarations.

CHARACTER(*), INTENT(IN) :: GivenFil ! The name of the given file.
LOGICAL :: PathIsRelative ! The function return value


! Determine if file name begins with an absolute path name or if it is relative

PathIsRelative = .FALSE.

! IF ( ( INDEX( GivenFil, ':/') == 0 ) .AND. ( INDEX( GivenFil, ':\') == 0 ) ) THEN ! No drive is specified (by ':\' or ':/')

! IF ( INDEX( '/\', GivenFil(1:1) ) == 0 ) THEN ! The file name doesn't start with '\' or '/'

! PathIsRelative = .TRUE.

! END IF

! END IF


RETURN
END FUNCTION PathIsRelative ! ( GivenFil )

Best Regards,

Ana Carrillo

Marshall.Buhl
Posts: 437
Joined: Fri Oct 21, 2005 10:22 am
Organization: NREL/NWTC
Location: Boulder, CO
Location: Boulder, CO
Contact:

Re: Linking windfiles in AeroDyn

Postby Marshall.Buhl » Mon May 06, 2013 1:02 pm

You get absolute paths if you start the file name with "/", "\", or something like "C:\". Unless I misunderstood what you asked, it is not necessary to modify the code.
Mr. Marshall L. Buhl Jr.
NWTC-3811
National Renewable Energy Laboratory
Golden, CO 80401 USA
Marshall.Buhl@nrel.gov
Voice: +1 (303) 384-6914
Cell: +1 (303) 915-6623
Fax: +1 (303) 384-7079

Bonnie.Jonkman
Posts: 569
Joined: Thu Nov 10, 2005 10:51 am
Organization: Envision Energy USA
Location: Colorado
Location: Boulder, CO
Contact:

Re: Linking windfiles in AeroDyn

Postby Bonnie.Jonkman » Mon May 06, 2013 2:08 pm

I agree with Marshall. If you want to use the absolute paths, you only need to specify them in the appropriate input files; no modifying the code is necessary. You can also specify either absolute or relative names for the input file when you call FAST from the command line. For example,

Examples of relative file names:

Code: Select all

FAST myInputFile.fst
FAST ..\myInputFile.fst
Examples of absolute file names:

Code: Select all

FAST C:\MyDir\myInputFile.fst
FAST \\here.com\MyDir\myInputFile.fst

In my opinion, It is often more useful to use the relative names in the input files, though. For instance, the latest versions of FAST allow you to specify all of the input files relative to the location of the primary FAST input file. That allows you to (1) run the code from any directory, and (2) easily move input files to another location without having to change all of your input files.

The changes you made in your source code will basically tell the code that all files are relative to the directory you are working in. Instead of changing the code or source files (and then compiling), you could just move your primary FAST input file (.fst) to the directory you want to work in (if it isn't there already).
Bonnie Jonkman

Envision Energy USA, 2016-
National Renewable Energy Laboratory, 2003-2016

Ana.Carrillo
Posts: 16
Joined: Thu Jan 13, 2011 2:53 am
Organization: self
Location: Spain

Re: Linking windfiles in AeroDyn

Postby Ana.Carrillo » Tue May 07, 2013 2:56 am

Thanks Marshall, thanks Bonnie,

I,ve get to run FAST following your tips but I'd like to say how I was working to help other users. I use the interface FAST-Simulink (I don't call FAST from the command line) and I'm running all design load cases. Therefore, I have a lot of .fst input files in different directories but I just need, e.g., one .dat tower file (common for all simulations), so if I work with absolute paths I avoid repeated files. I run each simulation from the Command Window of MatLab by a script. My parameter input_fast is a string and contains both the path (absolute to my current work directory) and the file name. If it starts with "/" or "\" FAST, obviously, doesn't find the file; then I tried to type the full path (e.g. C:\...) and it worked.

Thanks again,

Best Regards

Ana Carrillo


Return to “Computer-Aided Engineering Software Tools”

Who is online

Users browsing this forum: No registered users and 1 guest