OpenFAST / openfast

Main repository for the NREL-supported OpenFAST whole-turbine and FAST.Farm wind farm simulation codes.
http://openfast.readthedocs.io
Apache License 2.0
668 stars 452 forks source link

Linearization of the model #738

Closed AbdElhamidNabeel closed 6 months ago

AbdElhamidNabeel commented 3 years ago

Hello,

I have tried many OpenFAST CertTests and it worked well, actually i have few questions :

1- Where to find the offshore models/tests, as all i see is 5MW Onshore tests ? 2- How can i perform linearization on the model, is there any manual guide for this in OpenFAST ? 3- How to select certain input/output for the state-space output linearized model, i want to select the collective pitch angle as input and the GenSpeed only as output ? as i found only three cases to choose from : (0) none, (1) standard (6 inputs/60 outputs) or all inputs 4- How to determine certain states of the linearized output model ?

Thanks

jjonkman commented 3 years ago

Dear @AbdElhamidNabeel,

Here are my answers to your questions: 1) There are several models of the NREL 5-MW baseline wind turbine in various offshore configurations in the OpenFAST r-test, including fixed-bottom monopile, tripod, and jacket configurations and floating barge, spar, semisubmersible, and TLP configurations: https://github.com/OpenFAST/r-test/tree/main/glue-codes/openfast. 2) The linearization process has been discussed many times on this issues page, on our forum (https://wind.nrel.gov/forum/wind/), in various publications (including theoretical details and case studies), and documentation (FAST v7 User's Guide, FAST v8 ReadMe file, MATLAB Toolbox, MBC3). But a complete step-by-step guide is not yet available in the OpenFAST documentation. 3) The standard set of linearization inputs inherent in the linearized system (avaialable with LinInputs=1) includes collective blade pitch and other inputs, which are documented in the FAST v8 ReadMe file: https://drive.google.com/file/d/17LDwMnCVmLfbRWSaVFxxqphVrtawMwlj/view?usp=sharing. With LinOutputs = 1, every output you've identified in the various OutList sections of each module are included in the linearized system; GenSpeed can be included by including GenSpeed in the OutList of ElastoDyn. 4) The states inherent in the linearized system are determined by which DOFs/features are enabled in the modules that are enabled when linearizing.

Best regards,

AbdElhamidNabeel commented 3 years ago

Dear @jjonkman,

Thanks for your reply, actually i have figured out some of what you said and there are still some questions rolling in my mind:

1- I apologies for my ignorance about some parts in the different offshore models as i'm an electrical engineer and i don't have enough knowledge about the the aerodynamics and hydrodynamics of the models, i used before FAST V7 offshore model and actually there weren't all that varieties of models to choose from, so i want to know what is the best model to mimic the uploaded files Linearized_Offshore_model_FASTV7

2- In primary.lin file of FASTV7 (included in the uploaded files), how to output linearization for different Azimuth angles in openfast? . Also previously, the States matrix includes only the Drivetrain rotational-flexibility and GenSpeed states (4x4 matrix), but in openFAST, based on the information you have provided i tried for simplicity the "5MW_OC4Semi_Linear" model and i can't figure out how to determine the number of I/Os and also the states (it gives out the ED States which i need and also the HD states which aren't of my interest so i want to discard the later )

3- Can i perform linearization of already existent nonlinear offshore model i.e "5MW_OC4Jckt_DLL_WTurb_WavesIrr_MGrowth", as i have tried and turned on the linearization parameter value to TRUE But MATLAB gives me error in SFUNC when i try to run the model. so what are the parameters to be modified in that case?.

So, please i want recommendation for the model choice and the parameters to be configured in the model to obtain similar results obtained from FASTV7. Thanks in advance and sorry for taking some of your time to help me.

Best Regards,

ebranlard commented 3 years ago

Dear @AbdElhamidNabeel

I'm trying to put together some documentation and scripts for the linearization. I must say, Offshore cases might require a bit more work at the moment.

Can you have a look at the following page (in particular the troubleshooting section, and the linearization sections). https://ebranlard-openfast.readthedocs.io/en/doc/source/working.html

I'm hoping to make this part of the openfast documentation (see #308), after it has received some feedback from colleagues. Any feedback from your end would be great, in particular if any of this documentation does not cover your questions, I'll try to add to the documentation.

Thanks,

Emmanuel

jjonkman commented 3 years ago

Dear @AbdElhamidNabeel,

@ebranlard's work-in-progress documentation is very useful.

Here are my answers to your direct questions: 1) From my brief look, it looks like your FAST v7 model is of a land-based configuration of the NREL 5-MW baseline wind turbine (with no hydrodynamics or offshore substructure). The following model in the OpenFAST r-test would be closest to that: https://github.com/OpenFAST/r-test/tree/main/glue-codes/openfast/5MW_Land_ModeShapes. 2) Set NLinTimes > 1 to linearize at multiple azimuth positions (e.g., setting CalcSteady = True with NLinTimes = 36 will result in a linearization every 10degrees azimuth). Running the model I link to in (1) is land-based and will not involve hydrodynamic states. 3) This offshore jacket model makes use of SubDyn, which was not linearizeable as part of OpenFAST's full-system linearization capability until this pull request was recently merged into the dev branch of OpenFAST. But this capability is still in the dev branch, and has not yet been migrated to main (this should happen soon in OpenFAST v3.0).

Best regards,

AbdElhamidNabeel commented 3 years ago

Thanks @ebranlard i wish it workout so we can use your valuable documents in the very soon !

Dear @jjonkman,

Thank you for this valuable recommendations, actually i have tried the recommended model but upon running it in MATLAB it generates errors. here are the files of the model after making the following modifications Land_Modeshapes_Model

Actually i have tried bunch of things of both models (5MW_Land_Modeshapes / 5MW_Land_BD_Linear) and i want to share what i have reached recently: 1- changed the PCMode, VSContrl, HSSBrMode, YCMode values from 0(none for linearization) or 4 for simulink and it doesn't have an effect in 5MW_Land_Modeshapes it gives error / it worked well in 5MW_Land_BD_Linear both linearization mode and simulation mode

2- I discarded some outputs from the linearization output model from the input files and it doesn't affect the linearization process

3- I tried the settings (CalcSteady = True with NLinTimes = 36) in 5MW_Land_BD_Linear and actually the linearization process haven't done at all !!!, when i set the settings to (CalcSteady = True with NLinTimes = 1), the linearization begins and actually it doesn't compute at NAzimsteps = 36 like in FASTV7, but it do the linearization actually in random times / random angles which i couldn't figure out the pattern of the steps in azimuth angles !!!! here are the results and the settings 5MW_Land_BD_Linear_Model

4- when i tried to introduce the NRELOffshrBsline5MW_Onshore_AeroDyn15.dat file in the 5MW_Land_BD_Linear.fst input files model and tried to perform linearization to mimic the situation in the Previous FASTV7 Model , actually MATLAB throw error in the SFUNC. so is the AeroDyn is linearizable in OpenFAST ? and if it's linearizable, how can i modify in the 5MW_Land_BD_Linear model to enable the linearization feature of this part (I tried putting the setting of CompAero = 2 to enable AeroDynV15, and copied the NRELOffshrBsline5MW_Onshore_AeroDyn15.dat from 5MW_Land_BD_DLL_WTurb files to the 5MW_Land_BD_Linear directory )

5- I want to perform linearization at Windspeed = 18 m/s, so i tried to add the NRELOffshrBsline5MW_InflowWind_Steady13mps.dat file in the 5MW_Land_BD_Linear.fst input files with CompInflow = 1, and changed the settings in the .dat file as following (WindType = 1 (steady) + HWindSpeed = 18 ). But also trying to perform linearization at this case, MATLAB throw error in SFUNC. So, is it linearizable or not ? and if it's how can i obtain this feature

So, to summarize. How to enable the features of AeroDynV15 and InflowWind in linearized model and how to determine clearly the azimuth angles steps in the linearization process

Best Regards,

jjonkman commented 3 years ago

Dear @AbdElhamidNabeel,

Here are my answers to your questions:

  1. The OpenFAST S-Function in MATLAB / Simulink does not have a way of linearizing what is in the Simulink model. So, the OpenFAST S-Function requires that you do not select to receive controls commands from Simulink when linearization is enabled, so, PCMode, VSContrl, HSSBrMode, and YCMode cannot be set to 4 in ServoDyn when Linearize = True in the OpenFAST primary input file.
  2. I'm not really sure I understand what you are stating.
  3. I'm not really understanding what you are doing. It does not appear that the OpenFAST input files and linearization output files contained in this archive are for the same simulation. This is because your _5MW_Land_BDLinear.fst file says CalcSteady = True with NLinTimes = 1, but you have 10 linearization output files (_5MW_Land_BDLinear.SFunc.1.lin, _5MW_Land_BDLinear.SFunc.2.lin, ... _5MW_Land_BDLinear.SFunc.10.lin), as if NLinTimes = 10.
  4. OpenFAST is linearizable when CompInflow = 1 and CompAero = 2, depending on which features you've enabled in InflowWind and AeroDyn. What is the error message you are receiving?
  5. What you are describing sounds fine; again, what is the error message you are receiving?

When linearizing, the azimuth angle is written near the top of the linearization file (line 10).

Best regards,

AbdElhamidNabeel commented 3 years ago

Dear Prof @jjonkman,

Thank you very much for your help, actually i have successfully run the linearization.

for answering the questions 4 and 5 ---> The error is Error using Run_OpenLoop (line 19) Error reported by S-function 'FAST_SFunc' in 'OpenLoop/FAST Nonlinear Wind Turbine/S-Function':

I solved it by the following:

1- in AeroDyn15.dat file, by modifying the value to be AFAeroMod = 1 and enabling the FrozenWake = True

2- exchanged NRELOffshrBsline5MW_InflowWind_Steady13mps.dat with NRELOffshrBsline5MW_InflowWind_Steady8mps.dat of the input inflow_wind file in .fst file and modified the required WindType = 1 (Steady) and changed the HWindSpeed = 18, i noticed that the following line is missing in the NRELOffshrBsline5MW_InflowWind_Steady13mps.dat file in the 5MW_Baseline files << 0 VFlowAng - Upflow angle (degrees) (not used for native Bladed format WindType=7) >>

Actually, i have a last very tiny question. Upon performing linearization for NLinTimes = 36 and CalcSteady = True, MATLAB doesn't stop at the 36 linearized model but it continue to perform the 37,38,... inf linearization (like the first 36 linearized model and the next 36 (up to 72 totally now) have the same results and so on up to inf !!!! is there any explanation for this why it generates the same 36 linearized models without stoping ! As i expect after performing the 36 linearization it has to stop !!

rafmudaf commented 3 years ago

Hi @AbdElhamidNabeel

The problem of the linearization continuing after NLinTimes is a bug in the FAST_Library. We have identified the issue and I'll be submitting a fix very soon. I'll report back here when it's ready.

bjonkman commented 3 years ago

You can see if MATLAB stops after finding the trim solution in https://github.com/bjonkman/openfast/tree/b/Simulink_TrimLinear

AbdElhamidNabeel commented 3 years ago

Thanks prof @bjonkman,

Actually i have some questions regarding the latest updates in the program:

1- i have tried to build the openfast version that you have recommended and actually i receive errors during building in SysMatlabWindows.f90 file, and i have read the note mentioned in the openfast v2.6 regarding this point but i didn't actually understand how to overcome this issue.

2- i tried to use the ready-made files uploaded (MAP_x64.dll, FAST_SFunc.mexw64, and OpenFAST-Simulink_x64.dll), and the linearization files contain some creepy outputs of aerodynamics. These creepy outputs place error while using the MBC3 toolbox using the fx_getMats command

The error : Error using findBladeTriplets (line 63) Could not find blade number in rotating channel "AD".

Error in fx_getMats (line 223) [matData.RotTripletIndicesCntrlInpt, matData.n_RotTripletInputs] = findBladeTriplets(data(1).u_rotFrame,matData.DescCntrlInpt );

Error in Linearization (line 99) [matData, data] = fx_getMats(FileNames);

Here are the settings and the outputs of the linearization Linearization output and linearization settings

3- Is there any method to include certain inputs during the linearization .... i want to include only the (ED Extended input: collective blade-pitch command, rad input) in the linearization process, i'm not interested in other inputs.

Thanks

bjonkman commented 3 years ago
  1. You will have to remove the two lines mentioned in this comment: https://github.com/OpenFAST/openfast/issues/548#issuecomment-863339334
  2. It looks like the linearization files have a bug in the description of inputs for the user properties, which is making the Matlab script fail. I recall fixing an issue with these descriptions in the recent past, but I do not know which branch those changes are in now. It might be dev.
  3. The "standard input" option you have chosen is the only way currently to get something other than all or none of the inputs for the linearization files. It looks like when the user properties were added to AeroDyn linearization, they were chosen to be "standard inputs" for linearization. I do not know why they were chosen to be in that section, especially since they are not generally used. Someone who worked on that TCF project may know more about that design decision. You could edit the code to get rid of them from the AD standard inputs. In FAST_Lin.f90, remove or comment out these lines:
      ! AD standard inputs: UserProp(NumBlNodes,NumBl)
      if (p_FAST%CompAero == MODULE_AD) then
         do j=1,NumBl*NumBlNodes
            y_FAST%Lin%Modules(MODULE_AD)%Instance(1)%use_u(y_FAST%Lin%Modules(MODULE_AD)%Instance(1)%SizeLin(LIN_INPUT_COL)+1-j) = .true.
         end do
      end if

    and then rebuild.

If you don't want to change/build the OpenFAST code, you can otherwise change the Rotating Frame? column to say F for the AD rows in the .lin files (maybe just the first one?), or you can change findBladeTriplets.m to not give you an error when it can't find a blade number.

AbdElhamidNabeel commented 3 years ago

@bjonkman I actually had tried the recommended changes and i still receive errors during compilation regarding FAST_Library.f90 and FAST_Subs.f90 files (I have chosen release_matlab - x64 options for building). It seems that SCDataEx_Types.h file or SCDataEx_Types.f90 doesn't exist !!! .Finally, i had to remove the aerodynamics inputs from .lin manually and change no. of inputs as well to overcome the problem. But, i perform the linearization for like 8 times for different windspeeds and for 36 azimuth angle (8*36 .lin files) !!! that would be such great effort for me to do that manually !!! . So, i hope you can find a programmable solution in the very soon. Thank you for your efforts

Here is the error i received while compiling: 3>FAST_Subs.f90 3>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Subs.f90(26): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [SC_DATAEX] 3>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Subs.f90(88): error #6457: This derived type name has not been declared. [SCDATAEX_DATA] 3>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Subs.f90(3834): error #6457: This derived type name has not been declared. [SCDATAEX_DATA] 3>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Subs.f90(4411): error #6457: This derived type name has not been declared. [SCDATAEX_DATA] 3>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Subs.f90(51): error #6460: This is not a component name that is defined in the encompassing structure. [SC_DX] 3>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Subs.f90(71): error #6404: This name does not have a type, and must have an explicit type. [SC_DX] 3>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Subs.f90(193): error #6460: This is not a component name that is defined in the encompassing structure. [USESC] 3>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Subs.f90(193): error #6303: The assignment operation or the binary expression operation is invalid for the data types of the two operands. 3>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Subs.f90(196): error #6460: This is not a component name that is defined in the encompassing structure. [NUMSC2CTRLGLOB] 3>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Subs.f90(197): error #6303: The assignment operation or the binary expression operation is invalid for the data types of the two operands. 3>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Subs.f90(453): error #6460: This is not a component name that is defined in the encompassing structure. [ROTORS] 3>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Subs.f90(464): error #6285: There is no matching specific subroutine for this generic subroutine call. [ALLOCARY] 3>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Subs.f90(466): error #6285: There is no matching specific subroutine for this generic subroutine call. [ALLOCARY] 3>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Subs.f90(483): error #6366: The shapes of the array expressions do not conform. 3>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Subs.f90(484): error #6366: The shapes of the array expressions do not conform. 3>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Subs.f90(500): error #6460: This is not a component name that is defined in the encompassing structure. [ROTORS] 3>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Subs.f90(500): error #5270: Internal Compiler Error: symbol not a SYMTOK 3>fortcom: Fatal: There has been an internal compiler error (C0000005). 3>compilation aborted for D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Subs.f90 (code 1) 3> 3>Build log written to "file://D:\Abdelhamid%20Work\Thesis\openfast\vs-build\FASTlib\x64\Release_Matlab\BuildLog.htm" 3>FASTlib - 21 error(s), 13 warning(s) 4>------ Build started: Project: OpenFAST-Simulink, Configuration: Release_Matlab x64 ------ 4>Compiling with Intel® Fortran Compiler Classic 2021.2.0 [Intel(R) 64]... 4>FAST_Library.f90 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(40): warning #7025: This directive is not standard F2003. 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(72): warning #7025: This directive is not standard F2003. 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(89): warning #7025: This directive is not standard F2003. 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(167): warning #7025: This directive is not standard F2003. 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(241): warning #7025: This directive is not standard F2003. 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(355): warning #7025: This directive is not standard F2003. 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(368): warning #7025: This directive is not standard F2003. 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(410): warning #7025: This directive is not standard F2003. 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(464): warning #7025: This directive is not standard F2003. 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(596): warning #7025: This directive is not standard F2003. 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(621): warning #7025: This directive is not standard F2003. 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(734): warning #7025: This directive is not standard F2003. 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(15): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [FAST_SUBS] 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(21): error #6683: A kind type parameter must be a compile-time constant. [DBKI] 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(21): warning #8586: Implicit type is given to allow out-of-order declaration. Non-standard extension. [DBKI] 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(21): error #6592: This symbol must be a defined parameter, an enumerator, or an argument of an inquiry function that evaluates to a compile-time constant. [DBKI] 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(21): error #6975: A kind-param must be a digit-string or a scalar-int-constant-name. [DBKI] 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(22): error #6683: A kind type parameter must be a compile-time constant. [INTKI] 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(24): error #6683: A kind type parameter must be a compile-time constant. [INTKI] 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(25): error #6683: A kind type parameter must be a compile-time constant. [INTKI] 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(26): error #6683: A kind type parameter must be a compile-time constant. [INTKI] 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(30): error #6457: This derived type name has not been declared. [FAST_TURBINETYPE] 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(31): error #6683: A kind type parameter must be a compile-time constant. [INTKI] 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(32): error #6683: A kind type parameter must be a compile-time constant. [INTKI] 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(101): warning #8586: Implicit type is given to allow out-of-order declaration. Non-standard extension. [CHANLEN] 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(101): warning #6187: Fortran 2003 requires an INTEGER data type in this context. 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(106): error #6457: This derived type name has not been declared. [FAST_EXTERNINITTYPE] 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(182): error #6683: A kind type parameter must be a compile-time constant. [REKI] 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(184): error #6683: A kind type parameter must be a compile-time constant. [INTKI] 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(253): error #6683: A kind type parameter must be a compile-time constant. [REKI] 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(254): error #6683: A kind type parameter must be a compile-time constant. [INTKI] 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(255): error #6683: A kind type parameter must be a compile-time constant. [INTKI] 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(378): error #6683: A kind type parameter must be a compile-time constant. [INTKI] 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(379): error #6683: A kind type parameter must be a compile-time constant. [INTKI] 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(424): error #6683: A kind type parameter must be a compile-time constant. [INTKI] 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(425): error #6683: A kind type parameter must be a compile-time constant. [INTKI] 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(426): error #6683: A kind type parameter must be a compile-time constant. [DBKI] 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(427): error #6683: A kind type parameter must be a compile-time constant. [INTKI] 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(483): error #6457: This derived type name has not been declared. [OPFM_INPUTTYPE_C] 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(484): error #6457: This derived type name has not been declared. [OPFM_OUTPUTTYPE_C] 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(485): error #6457: This derived type name has not been declared. [SC_DX_INPUTTYPE_C] 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(486): error #6457: This derived type name has not been declared. [SC_DX_OUTPUTTYPE_C] 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(493): error #6457: This derived type name has not been declared. [FAST_EXTERNINITTYPE] 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(631): error #6457: This derived type name has not been declared. [OPFM_INPUTTYPE_C] 4>D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90(632): error #6457: This derived type name has not been declared. [OPFM_OUTPUTTYPE_C] 4>C:\Users\kcsstore.com\AppData\Local\Temp\808013.i90(761): catastrophic error: Too many errors, exiting 4>compilation aborted for D:\Abdelhamid Work\Thesis\openfast\modules\openfast-library\src\FAST_Library.f90 (code 1) 4> 4>Build log written to "file://D:\Abdelhamid%20Work\Thesis\openfast\vs-build\OpenFAST-Simulink\x64\Release_Matlab\BuildLog.htm" 4>OpenFAST-Simulink - 31 error(s), 15 warning(s) ========== Build: 2 succeeded, 2 failed, 0 up-to-date, 0 skipped ==========

bjonkman commented 3 years ago

It looks like your build did not recognize the supercontroller data exchange types. This may be because the OpenFAST Registry needs to be run again, or you may just need to build it again (Visual Studio doesn't always build the *_Types.f90 files after they are generated by the Registry, but will build them if you build the solution again.) The other errors seem to be caused by that first issue.

Hopefully you can get that to build now. If you do need to change those .lin files by hand, I'd recommend writing a script to do it.