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

Added TurbSim to OpenFAST #47

Merged
merged 102 commits into from
Sep 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
c42cffe
Initial import of TurbSim v1.50.
bjonkman Jan 23, 2012
04fdd08
Version 1.05.01b-bjj (updated to new numbering scheme)
bjonkman Jan 24, 2012
24e99de
v1.05.01c-bjj 24-Feb-2012 B. Jonkman
bjonkman Mar 19, 2012
4537685
Added TurbSim.docx to the trunk.
bjonkman Sep 4, 2012
78b4694
folder access changes and line endings updated in FFTMod.f90
bjonkman Sep 25, 2012
e37f8ac
v1.06.00 as posted to the web
bjonkman Sep 25, 2012
0e06252
v1.06.01a-bjj 19-Oct-2012 B. Jonkman
bjonkman Oct 18, 2012
50c5f3a
Added fclose to readTSgrid.m so that the files get closed. (bug found…
bjonkman Oct 23, 2012
69e66c8
Added files for web site maintenance.
bjonkman Nov 2, 2012
15a55c8
Added property for TSVN to require a minimum log message length.
Jan 10, 2013
414c113
A user pointed out that the certification test was missing the HYDRO_…
bjonkman May 30, 2013
2c07549
+ I put the subroutines in BlankModVKM.f90 in an interface (I'm passi…
bjonkman Oct 23, 2013
264292b
merged PeriodicOutput branch
bjonkman Jul 9, 2014
d8af8b4
updated input files (with FAST2Matlab utility) for consistency
bjonkman Jul 9, 2014
785eeb7
fixed comment in source file
bjonkman Jul 9, 2014
cd16464
merged APIABSWnd branch into trunk. The API model could use some work…
bjonkman Jul 11, 2014
e978adf
updated TurbSim.docx with discussion on how periodic files can be cre…
bjonkman Jul 11, 2014
20c6948
Created new branch to update TurbSim code to be more modular, hopeful…
bjonkman Jul 11, 2014
c0b8d56
+ replaced LAPACK routine with prebuilt library, like FAST v8.08 uses
bjonkman Jul 17, 2014
660e7ab
+ added "SpecModel", an integer that indicates which spectral/turbule…
bjonkman Jul 17, 2014
2e75204
moved more code from TurbSim.f90 main program to subroutines
bjonkman Jul 17, 2014
faa6c51
+ added NWTC_Library v2.0
bjonkman Jul 18, 2014
b7b1b58
moved more coherent structure code to CohStructures.f90
bjonkman Jul 18, 2014
a232844
also added forward FFT to FFTMod (ApplyFFT_f) for future work on TurbSim
bjonkman Jul 18, 2014
8517e7b
+ made SigmaIEC an array of 3 elements
bjonkman Jul 19, 2014
de73666
+ moved some more variables to types (mostly IEC parameters)
bjonkman Jul 19, 2014
fda0aa1
+ moved more variables around
bjonkman Jul 21, 2014
9a1c1a2
+ moved/renamed more variables
bjonkman Jul 22, 2014
f83deba
+ removed fftpack/fftmod and replaced with netlib routines in nwtc_li…
bjonkman Jul 22, 2014
0b2a976
+ removed interface for getWindSpeed (not sure how that will work wit…
bjonkman Aug 4, 2014
cb9ec8b
+ moved more variables
bjonkman Aug 8, 2014
66878a3
+ added test cases for user-defined spectra, user-defined scaling wit…
bjonkman Aug 9, 2014
0e958e2
moved more global variables
bjonkman Aug 9, 2014
be4b968
MOVED TURBMODEL and TMname, renamed specModel to TurbModel_ID
bjonkman Aug 10, 2014
003f2b1
made hub-height files use HH_HFlowAng instead if HFlowAng, just in ca…
bjonkman Aug 10, 2014
b975dfe
started getting rid of "Use TSMods" statements in CohStructures.f90
bjonkman Aug 10, 2014
4ca8a7d
made a TurbSim_ParameterType and put the met, grid, RandNum, etc vari…
bjonkman Aug 12, 2014
a91f258
+ moved more variables from Modules.f90.
bjonkman Aug 13, 2014
8041497
+ I took out the requirements that the number of steps be at least 8 …
bjonkman Aug 13, 2014
0ef5175
+ more rearranging, trying to get calculations out of main program
bjonkman Aug 13, 2014
da74bbd
moved hub interpolation statistics to TS_FileIO.f90. now we also inte…
bjonkman Aug 13, 2014
32ff918
minor spacing changes to input files
bjonkman Aug 14, 2014
7f766a9
+ added 2 lines to the primary input file: Echo and UserInputFile, wh…
bjonkman Aug 14, 2014
ac9f978
+ renamed readTSgrid.m readfile_BTS.m because I kept forgetting if TS…
bjonkman Aug 17, 2014
581cb45
+ replaced USR_Freq and USR_S with usr%f and usr%s
bjonkman Aug 29, 2014
4f32c7c
more clean up, especially with hub indices
bjonkman Aug 29, 2014
052ab3c
+ changed NSize to NPacked to indicate it is the number of entries in…
bjonkman Aug 29, 2014
2948c80
changed containsW to nComp in user time-series input
bjonkman Aug 29, 2014
4fc367c
added index array for tower points
bjonkman Aug 30, 2014
8d81c44
+ made Y and Z to be the size of NPoints instead of YLim and ZLim
bjonkman Aug 30, 2014
736507d
+ Added logic so user-specified points can replace grid (or tower) po…
bjonkman Aug 30, 2014
2d3578e
+ added "TS" wind profile type for the TIMESR model
bjonkman Sep 3, 2014
15c1229
fixed bug in preprocessor directive part of code
bjonkman Sep 3, 2014
1fdb5c7
added Matlab function to write user-input time series files in TurbSi…
bjonkman Sep 3, 2014
c0fe8da
+ removed TS_Warn()
bjonkman Sep 5, 2014
a083da0
+ removed all calls to TS_Abort and thus removed tempErrorHandling.f90
bjonkman Sep 9, 2014
8b83db3
+ renamed Modules.f90 to TurbSim_Types.f90
bjonkman Sep 9, 2014
ebeb4db
+ Moved CalcIECScalingParams to TS_FileIO.f90/ReadInputFile for consi…
bjonkman Sep 9, 2014
7b8405e
+ removed debugging code (if I don't use it, I don't know who does!)
bjonkman Sep 9, 2014
f8a1d3d
more cleanup; commented out all the PSD_OUT code (I don't think I've …
bjonkman Sep 9, 2014
058e402
reorganized some coherent structure data types. Moved events and y_Co…
bjonkman Sep 10, 2014
3fc62cd
+ updated ReadInputFile routine in TS_FileIO.f90 to look at little cl…
bjonkman Sep 12, 2014
851655d
+ modified cod so IEC models also read the non-IEC boundary condition…
bjonkman Sep 12, 2014
ca10da9
+ Added functionality for SCMod inputs (which aren't currently input)
bjonkman Sep 12, 2014
642f38b
moved Nyquist information to other places in summary file so that I d…
bjonkman Sep 13, 2014
8284c0a
+ added several lines to the input file: ProfileFile, SCMod1, SCMod2,…
bjonkman Sep 13, 2014
edb4195
+ found and fixed a bug in user-defined wind direction profile interp…
bjonkman Sep 16, 2014
88de2f3
+ added vertical angle (profile) for user-defined time series
bjonkman Oct 2, 2014
93bdecf
+ added input file for time-series inputs in the inertial frame
bjonkman Oct 2, 2014
1197d71
+ renamed folders to match FAST organization
bjonkman Oct 7, 2014
95943ff
version sent to Siemens 9-Oct-2014:
bjonkman Oct 10, 2014
36d9a2a
+renamed some routines:
bjonkman Oct 14, 2014
bbdeb80
updated NWTC_Library and NetLib dependencies; added makefile for gfor…
bjonkman Apr 6, 2015
dd980d9
added type to constants to help compile in double precision; did not …
bjonkman Apr 6, 2015
fb8c237
fixed a few more constants so they're ReKi
bjonkman Apr 6, 2015
bf23007
git-svn-id: https://windsvn2.nrel.gov/TurbSim/branches/Modularization…
jennirinker Apr 7, 2015
87a9d9d
I tried to debug a problem a user was having (getting NaNs for IECKAI…
bjonkman Jan 3, 2016
a88d7a7
fixed indexing problem when NumGrid_Z /= NumGrid_Y
bjonkman Jan 31, 2016
475d7fa
fixed some error handling, including the MOST important error check i…
bjonkman Feb 4, 2016
ea0afa8
updated the version/date
bjonkman Feb 4, 2016
0cebb48
fixed type error that would cause problem when the reference user-def…
bjonkman Feb 5, 2016
785991e
changed work array in Coeffs2TimeSeries to allocatable to remove it f…
bjonkman Feb 24, 2016
21e2f7b
fixed problem where message would be written to fort.10 when summary …
bjonkman Feb 24, 2016
8d05d8e
+ fixed issue with very long user-defined time-series input: the chec…
bjonkman Feb 25, 2016
26609af
+ fixed bug reported by Ashenafi.Araya on forums: https://wind.nrel.g…
bjonkman May 17, 2016
1180f90
* updated API documentation in TurbSim.docx
bjonkman Jun 2, 2016
d3f1401
v2.00.006-bjj 6-Jun-2016 on the web.
bjonkman Jun 7, 2016
a03c02e
fixed copy-paste error that prevented API model from running with val…
bjonkman Jun 14, 2016
bd8881d
added files for git
bjonkman Jul 6, 2016
527cf52
Replaced NWTC_Library and NetLib with submodule
bjonkman Aug 10, 2016
a355768
bug fix: API spectra was missing an operator
bjonkman Aug 18, 2017
2c2068e
Updated gitignore
bjonkman Aug 18, 2017
95a662c
fixed comment character
bjonkman Aug 18, 2017
cb02760
updated version number
bjonkman Aug 18, 2017
4b437a9
removed files and directories we do not want in the OpenFAST repo
Sep 12, 2017
8152eb9
Moved files from TurbSim repo locations to the OpenFAST locations, ma…
Sep 12, 2017
d064f6d
Merge branch 'master' of ../../../NWTC-Github/TurbSim into dev
Sep 12, 2017
1e8933e
Added TurbSim project to vs-build
Sep 12, 2017
c9c869f
remove the module level version info
rafmudaf Sep 13, 2017
6d8a57f
configure turbsim with cmake
rafmudaf Sep 13, 2017
ab2c1e9
add turbsim to highest openfast cmake list
rafmudaf Sep 13, 2017
00c6d8a
Merge pull request #2 from rafaelmudafort/feature/turbsim_cmake
Sep 13, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ set(FAST_MODULES_LOCAL
extptfm
openfoam
supercontroller
turbsim
fast-library
)

Expand Down
37 changes: 37 additions & 0 deletions modules-local/turbsim/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#
# Copyright 2016 National Renewable Energy Laboratory
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

set(MODULE_SOURCES
src/BlankModVKM.f90
src/CohStructures.f90
src/Profiles.f90
src/RandNum.f90
src/Root_Searching.f90
src/TS_FileIO.f90
src/TSsubs.f90
src/TurbSim.f90
src/TurbSim_Types.f90
src/VelocitySpectra.f90
)

add_library(turbsimlib ${MODULE_SOURCES})
target_link_libraries(turbsimlib nwtclibs)

install(TARGETS turbsimlib
EXPORT "${CMAKE_PROJECT_NAME}Libraries"
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
15 changes: 15 additions & 0 deletions modules-local/turbsim/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# TurbSim
A stochastic, full-field, turbulence simulator, primarialy for use with [InflowWind](https://nwtc.nrel.gov/InflowWind "InflowWind")-based simulation tools

**Authors**: Neil Kelley and [Bonnie Jonkman](mailto:[email protected]), NREL

TurbSim is a stochastic, full-field, turbulent-wind simulator. It uses a statistical model (as opposed to a physics-based model) to
numerically simulate time series of three-component wind-speed vectors at points in a two-dimensional vertical rectangular
grid that is fixed in space.

Spectra of velocity components and spatial coherence are defined in the frequency domain, and
an inverse Fourier transform produces time series. The underlying theory behind this method of
simulating time series assumes a stationary process.

For more information, please refer to documentation on the [TurbSim web site](https://nwtc.nrel.gov/TurbSim).

75 changes: 75 additions & 0 deletions modules-local/turbsim/src/BlankModVKM.f90
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
MODULE ModifiedvKrm_mod

USE NWTC_Library

IMPLICIT NONE

CONTAINS
!=======================================================================
SUBROUTINE Mod_vKrm ( Ht, Ucmp, Spec )

! This subroutine defines the "Improved" von Karman PSD model.
! The use of this subroutine requires that all variables have the units of meters and seconds.
IMPLICIT NONE

!Passed variables

REAL(ReKi), INTENT(IN) :: Ht ! height
REAL(ReKi), INTENT(IN) :: UCmp ! wind speed
REAL(ReKi), INTENT( OUT) :: Spec (:,:)


RETURN
END SUBROUTINE Mod_vKrm
!=======================================================================
SUBROUTINE ScaleMODVKM(Ht,UCmp, LambdaU, LambdaV, LambdaW)

! THIS SUBROUTINE DEFINES HUB SCALE PARMS FOR Modified von KARMAN PSD MODEL
IMPLICIT NONE

REAL(ReKi), INTENT(IN) :: Ht ! height
REAL(ReKi), INTENT(IN) :: UCmp ! wind speed

REAL(ReKi) :: LambdaU
REAL(ReKi) :: LambdaV
REAL(ReKi) :: LambdaW

RETURN
END SUBROUTINE ScaleMODVKM
!=======================================================================
FUNCTION FindZ0(z, sigma, U, f)

! This function is used in the Modified von Karman model to
! determine the necessary surface roughness length for a given sigma.
IMPLICIT NONE

REAL(ReKi) :: FindZ0 ! Estimated surface roughness length
REAL(ReKi),INTENT(IN) :: z ! Hub height
REAL(ReKi),INTENT(IN) :: sigma ! Target std deviation
REAL(ReKi),INTENT(IN) :: U ! Hub height wind speed
REAL(ReKi),INTENT(IN) :: f ! Coriolis parameter

FindZ0 = 1.0 ! a default value

RETURN
END FUNCTION FindZ0
!=======================================================================
FUNCTION CalcDiff(z0Guess, z, sigma, U, f)

! This function calculates the difference between the specified
! sigma and the calculated one.
IMPLICIT NONE

REAL(ReKi) :: CalcDiff ! Output - will be nearly zero if surface roughness is correct
REAL(ReKi), INTENT(IN) :: z0Guess ! estimated surface roughness
REAL(ReKi), INTENT(IN) :: z ! Hub height (m)
REAL(ReKi), INTENT(IN) :: sigma ! Target standard deviation (m/s)
REAL(ReKi), INTENT(IN) :: U ! Mean hub-height wind speed (m/s)
REAL(ReKi), INTENT(IN) :: f ! Coriolis parameter

CalcDiff = 0.0

RETURN
END FUNCTION CalcDiff
!=======================================================================
END MODULE ModifiedvKrm_mod
Loading