Skip to content

Merged NREL dev into the branch and addressed merge conflicts#13

Merged
HaymanConsulting merged 10 commits intoHaymanConsulting:f/FloatingLinfrom
bjonkman:f/FloatingLin
Jan 14, 2020
Merged

Merged NREL dev into the branch and addressed merge conflicts#13
HaymanConsulting merged 10 commits intoHaymanConsulting:f/FloatingLinfrom
bjonkman:f/FloatingLin

Conversation

@bjonkman
Copy link

No description provided.

rafmudaf and others added 10 commits November 13, 2019 12:35
Merge pull request OpenFAST#357 from OpenFAST/dev
)

* AD15 update for more than 99 nodes with DBG_OUTS

* add leading zeros AD15 node output names
- Fix a bug when running the linearization cases in parallel -> copying the case files can result in an error if theyre copied at the same time
- Chose better test cases to run -> the openfast reg test cases will ultimately need to be reworked since they are overly sensitive to compiler and hardware differences, so here I’ve removed some that almost always fail and added others that dont
* AD: updated AFI module with 2D interp code

This code came from GHayman in Feb 2018; I fixed some merge conflicts and some minor details. It compiles (with the exception of UA driver) and gives same results as before.

I did not add the AFI driver or move the AFI code into a separate source-code directory,

* AFI: change default interpolation to linear

Any airfoils that use "default" interpolation will see different results.

* AD big fix: calculation of Re

BEMTU_Wind was calculating Re based on dynamic viscosity instead of kinematic viscosity as reported here: OpenFAST#71

Fixed the calculation and cleaned up calling routines that don't need the airDens variable anymore.

* Registry: modified auto-generated ExtrapInterp routines for AFI

- These shouldn't cause errors if there are no input or output types in a module any more (-noextrap command isn't as critical now)
- AirfoilInfo module will have extrap-interp routines generated for Output Type and UA_BL_Type data structures.

* AeroDyn updates for 2D airfoil interpolation

- added `UserProp` input to AeroDyn for 2D airfoil interpolation (currently not implemented in OpenFAST driver)
- changed Registry so that it generates extrap-interp routines for AFI output type and UA_BL (parameter) types
- removed fitpack from build (was used only in previous code for 2D cubic splines, which are not used now)\
- fixed a bug that could cause a seg fault if the first airfoil contained coordinates, but other airfoil files did not contain the same number of coordinates.
- moved the small amount of code in `fmin_fcn.f90` to `mod_root1dim.f90` and deleted it.
- removed some unused variables
- moved checks on AirfoilInfo init input data from AeroDyn to AirfoilInfo (so other drivers can perform the same checks)
- moved checks on AirfoilInfo Unsteady Aero data to the UnsteadyAero module (so other drivers can perform the same checks)
- moved checks on UnsteadyAero input data to the UnsteadyAero module (so other drivers can perform the same checks)
- added `AFTabMod` to the AeroDyn input files
- fixed spelling of "Gonzalez" in a few places
- replaced `GetSteadyOutputs` with `AFI_ComputeAirfoilCoefs`, which basically does the same thing.
- replaced `ComputeSteadyAirfoilCoefs` with `AFI_ComputeAirfoilCoefs`, which basically does the same thing.
- modified arguments to `BEMTU_Wind`, and moved call to it inside `BEMTU_InductionWithResidual` (This routine computes `Re` with inductions set to zero.
  this assumption is now contained in one place, so we may be able to include that in the solve with Re-interpolated airfoil tables)
- Made inductions an optional output of the `BEMTU_InductionWithResidual` routine, then 
  replaced calls to `UncoupledErrFn` with it.
- replaced `AFI_GetAirfoilParams` with `AFI_ComputeAirfoilCoefs`
- removed condition that all airfoil tables must have the same number of alphas
- airfoilInfo interpolates on log of Reynolds number if 2D Reynolds number interpolation is requested
- changed some of the interpolation in AirfoilInfo, including required subroutine arguements. AFI takes care of calling appropriate subroutine for 
  desired interpolation method.
- removed compiler warnings of unused variables in auto-generated types files using vs-build debug mode
- removed unused variables

* Updated example input files in documentation

* updated documentation for AD/Airfoils

* updated comment in example airfoil file

default interpolation order is now 1

* fixed format in SysGnuWin.f90

* rename files that git thinks were deleted (not renamed) on nrel/dev

* Update auto-generated types files

- intent on extrap/interp routines is IN instead of INOUT where there are no meshes in the data type (from Registry change)
- changes to aerodyn data structures

* fix syntax in UnsteadyAero.vfproj file

* Update pointer to r-test for updated comments on InterpOrd

* Airfoil-interp PR: Update r-test for new baseline

Also removed precompilier directive for SPLINE_INTERP now that we are satisfied with r-test baseline results using linear interp of airfoils in AD15

* Update Git hash for r-test

* Bug fixes in Dockerfiles
* add interactive plots

* remove extraneous feature

* update calculated norms in regression testing

* vectorization of for loops on arrays

* update regression test execution for new plotting and norm outputs

* update for new results structure

* update plotting for a few errors

* update some formatting and argparse arguments

* update argparse arguments

* update for consistency between files and to work with errorPlotting.py

* update plotting functionality and script/div processing

* update to final PR version

Final updates include:
 - .../plots is removed entirely rather than its contents
 - -p and -v flags are fixed to act as expected
 - all channels are plot instead of only failing channels for a failing case

* fix last bug
- Added `WP_Baseline` to list of directories to copy
- Replaced `is` and `is not` with `==` and `!=` when comparing with a string literal (else they would always return false)
Baseline and local were switched
also fix syntax of legend label
* Update of Unsteady Aero model UAMod=2, corrections and added parameters

* UA bug fix: xd%tau_V was updated too early

- tau_V was reset at n+1 before setting other states that required values at n.
- also removed some comments

* UA: updated comments

this commit should affect spacing and comments only

* UA: fix condition around vortex shedding - incomplete?

   factor = (alpha_filt_cur - alpha0) * Kalpha_f     
   if (xd%tau_V(i,j) > T_VL .AND. (factor > 0)) then  
         ! The assertion is the T_V will always equal T_V0/2 when this condition is satisfied 
 
      becomes [note sign change and comment regarding value of sigma3, BUT: Code still needs a fix which is incomplete regarding the 2nd comment.  If you fall into that if block, then  we must continue to eliminate the vortex feed until we begin tracking another vortex, i.e., tau_V is reset to 0.0, this may mean the addition of a new flag.]
 
   if (xd%tau_V(i,j) > T_VL .AND. (Kalpha_f*dalpha0 < 0)) then ! .AND. (.not. LESF) 
         ! We no longer require that T_V will always equal T_V0/2 when this condition is satisfied as was the case in AD v13 GJH 7/20/2017 
         ! If we fall into this condition, we need to require we stay here until the current vortex is shed (i.e., tauV is reset to zero) 
      Cn_v = xd%Cn_v_minus1(i,j)*exp(-ds/T_V)   ! Eqn 1.52     
   else       
      Cn_v = Get_ExpEqn( ds, T_V, xd%Cn_v_minus1(i,j), C_V, xd%C_V_minus1(i,j) )   ! Eqn 1.47

* UA: Changed definition of VRTX

Email dated July 28, 2017: From Greg Hayman/Rick Damiani to Envision Energy:

We changed the definition of VRTX:
 
was:  
    VRTX = (xd%tau_V(i,j) <= 2.0_ReKi*T_VL) .and. (xd%tau_V(i,j) > 0.0_ReKi) 
 now:
      ! Is the vortex over the chord?   
   VRTX = (xd%tau_V(i,j) > 0.0_ReKi) .and. (xd%tau_V(i,j) <= T_VL) 
 
Because of this change in the definition of VRTX all if tests related to VRTX have been changed:
    if ( VRTX .and. (xd%tau_V(i,j) <= T_VL) ) then  ! Still shedding a vortex? 
 becomes
    if ( VRTX ) then  ! Still shedding a vortex, i.e., the current vortex is still over the chord?
 and
    if ( VRTX .and. (xd%tau_V(i,j) <= T_VL) ) then
 becomes  [ NOTE This is part of a logic change in the sigma3 section, see below]
    else if ( VRTX ) then

* UA bug fixes from merge of Alvaro's code

1. fprimeprime_m wasn't initialized in UAMod 2, but was still used to compue cm_FS. I initialized to 0 until Alvaro can comment as to what it should be.
2. Df_c was changed to use T_fc instead of T_f, but T_fc was static when UAMod/=2 (it is based on a new state variable for UAMod==2). I modified the OtherState%sigma1c variable to be equal to the old %sigma1 to get the same results here.

* UA: cleaned up some logic and removed non-standard tab formatting

* UA: Removed comment that doesn't seem to apply

* UA: removed unused variables

* UA: reverted some code I had changed from Alvaro

His fix changes the calculation of DF_c.

* UA: Fixed definition of fprimeprime_m from bad merge

* Some proposed corrections to merge the UA model Gonzalez with the Envision changes

* AD: updated AFI module with 2D interp code

This code came from GHayman in Feb 2018; I fixed some merge conflicts and some minor details. It compiles (with the exception of UA driver) and gives same results as before.

I did not add the AFI driver or move the AFI code into a separate source-code directory,

* AFI: change default interpolation to linear

Any airfoils that use "default" interpolation will see different results.

* AD big fix: calculation of Re

BEMTU_Wind was calculating Re based on dynamic viscosity instead of kinematic viscosity as reported here: OpenFAST#71

Fixed the calculation and cleaned up calling routines that don't need the airDens variable anymore.

* Registry: modified auto-generated ExtrapInterp routines for AFI

- These shouldn't cause errors if there are no input or output types in a module any more (-noextrap command isn't as critical now)
- AirfoilInfo module will have extrap-interp routines generated for Output Type and UA_BL_Type data structures.

* AeroDyn updates for 2D airfoil interpolation

- added `UserProp` input to AeroDyn for 2D airfoil interpolation (currently not implemented in OpenFAST driver)
- changed Registry so that it generates extrap-interp routines for AFI output type and UA_BL (parameter) types
- removed fitpack from build (was used only in previous code for 2D cubic splines, which are not used now)\
- fixed a bug that could cause a seg fault if the first airfoil contained coordinates, but other airfoil files did not contain the same number of coordinates.
- moved the small amount of code in `fmin_fcn.f90` to `mod_root1dim.f90` and deleted it.
- removed some unused variables
- moved checks on AirfoilInfo init input data from AeroDyn to AirfoilInfo (so other drivers can perform the same checks)
- moved checks on AirfoilInfo Unsteady Aero data to the UnsteadyAero module (so other drivers can perform the same checks)
- moved checks on UnsteadyAero input data to the UnsteadyAero module (so other drivers can perform the same checks)
- added `AFTabMod` to the AeroDyn input files
- fixed spelling of "Gonzalez" in a few places
- replaced `GetSteadyOutputs` with `AFI_ComputeAirfoilCoefs`, which basically does the same thing.
- replaced `ComputeSteadyAirfoilCoefs` with `AFI_ComputeAirfoilCoefs`, which basically does the same thing.
- modified arguments to `BEMTU_Wind`, and moved call to it inside `BEMTU_InductionWithResidual` (This routine computes `Re` with inductions set to zero.
  this assumption is now contained in one place, so we may be able to include that in the solve with Re-interpolated airfoil tables)
- Made inductions an optional output of the `BEMTU_InductionWithResidual` routine, then 
  replaced calls to `UncoupledErrFn` with it.
- replaced `AFI_GetAirfoilParams` with `AFI_ComputeAirfoilCoefs`
- removed condition that all airfoil tables must have the same number of alphas
- airfoilInfo interpolates on log of Reynolds number if 2D Reynolds number interpolation is requested
- changed some of the interpolation in AirfoilInfo, including required subroutine arguements. AFI takes care of calling appropriate subroutine for 
  desired interpolation method.
- removed compiler warnings of unused variables in auto-generated types files using vs-build debug mode
- removed unused variables

* Updated example input files in documentation

* updated documentation for AD/Airfoils

* fix typos; replace 1.44 with already-defined parameter

* updated comment in example airfoil file

default interpolation order is now 1

* UA: updated calculation of Cn_FS for UAmod = 3

also updated some numerics to account for periodicity in differences of angles

* fixed format in SysGnuWin.f90

* rename files that git thinks were deleted (not renamed) on nrel/dev

* Update auto-generated types files

- intent on extrap/interp routines is IN instead of INOUT where there are no meshes in the data type (from Registry change)
- changes to aerodyn data structures

* updated types files

* UA: add (unnecessary) initialization to avoid compiler warning

* Update baselines

Co-authored-by: alvarogonzalezsalcedo <35765400+alvarogonzalezsalcedo@users.noreply.github.com>
Co-authored-by: Rafael M Mudafort <rafmudaf@gmail.com>
@rafmudaf
Copy link

@ghaymanNREL is this good to merge?

@HaymanConsulting HaymanConsulting merged commit 4fbb3f4 into HaymanConsulting:f/FloatingLin Jan 14, 2020
@bjonkman bjonkman deleted the f/FloatingLin branch January 14, 2020 19:57
HaymanConsulting pushed a commit that referenced this pull request Aug 3, 2020
stall angle passed, bugs tno fixed, cleaner code
HaymanConsulting pushed a commit that referenced this pull request Aug 3, 2020
HaymanConsulting pushed a commit that referenced this pull request Jun 22, 2021
HaymanConsulting pushed a commit that referenced this pull request Jun 22, 2021
This change makes it easier to scan and find information in each section of the API documentation by bringing any information that is outside of a table to the top of the section.
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

Successfully merging this pull request may close these issues.

6 participants