diff --git a/glue-codes/simulink/examples/Run_OpenLoop.m b/glue-codes/simulink/examples/Run_OpenLoop.m index c8425596b..2df5fb485 100644 --- a/glue-codes/simulink/examples/Run_OpenLoop.m +++ b/glue-codes/simulink/examples/Run_OpenLoop.m @@ -1,32 +1,12 @@ -% make sure the FASTv8\bin directory is in the MATLAB path +% make sure the OpenFAST directory where the FAST_SFunc.mex* file is located +% is in the MATLAB path (also make sure any other OpenFAST library files that +% are needed are on the MATLAB path) % (relative path names are not recommended in addpath()): -% addpath('C:\Users\bjonkman\Documents\CAETools\FASTv8\bin'); +% addpath('../../../build/bin'); % install location for Windows Visual Studio builds +% addpath(genpath('../../../install')); % cmake default install location +% these variables are defined in the OpenLoop model's FAST_SFunc block: +FAST_InputFileName = '../../../reg_tests/r-test/glue-codes/openfast/5MW_Land_DLL_WTurb/5MW_Land_DLL_WTurb.fst'; +TMax = 60; % seconds -CertTest_Dir = '..\..\CertTest'; - -CertTest_TMax=[20, 20, 20, 70, 30, ... - 35, 70, 20, 40, 25, ... - 20, 20, 40, 0, 20, ... - 20, 70, 60, 60, 60, ... - 60, 60, 60, 60, 60, ... - 20 ]; - - for iTest = [1:13 15:26] - - %------------------------------------------------------------------ - % Set up and run the Simulink OpenLoop model - %------------------------------------------------------------------ - - FileRoot = sprintf( 'Test%02.0f', iTest ); - - disp('***********************************************'); - disp( ['FAST_SFunc certification test for ' FileRoot] ); - disp('***********************************************'); - - FAST_InputFileName = [CertTest_Dir filesep FileRoot '.fst']; - TMax = CertTest_TMax(iTest); - - sim('OpenLoop.mdl',[0,TMax]); - - end \ No newline at end of file +sim('OpenLoop.mdl',[0,TMax]); diff --git a/glue-codes/simulink/examples/Run_Test01_SIG.m b/glue-codes/simulink/examples/Run_Test01_SIG.m index 137f304cd..77b9062c4 100644 --- a/glue-codes/simulink/examples/Run_Test01_SIG.m +++ b/glue-codes/simulink/examples/Run_Test01_SIG.m @@ -1,17 +1,17 @@ -% make sure the FASTv8\bin directory is in the MATLAB path +% make sure the OpenFAST directory where the FAST_SFunc.mex* file is located +% is in the MATLAB path (also make sure any other OpenFAST library files that +% are needed are on the MATLAB path) % (relative path names are not recommended in addpath()): -% cd ..\..\ -% FASTv8_root_directory = pwd; -% cd Simulink\Samples -% addpath([ FASTv8_root_directory '\bin']); +% addpath('../../../build/bin'); % install location for Windows Visual Studio builds +% addpath(genpath('../../../install')); % cmake default install location % Simple Induction Generator Example ====================================== % To model a simple induction generator in Simulink use model Test01_SIG.mdl. % The following parameters duplicate those used in Certification Test #01. -% Change Test01.fst as follows: -% set VSContrl = 4 in ..\..\CertTest\AWT27\Test01_ServoDyn.dat +% Change AWT_YFix_WSt.fst (formerly Test01.fst) as follows: +% set VSContrl = 4 in ../../../reg_tests/r-test/glue-codes/openfast/AWT_YFix_WSt/AWT_YFix_WSt_ServoDyn.dat GenEff = 100.0; % - Generator efficiency [ignored by the Thevenin and user-defined generator models] (%) @@ -28,11 +28,12 @@ % parameters required for the S-Function block: -FAST_InputFileName = '..\..\CertTest\Test01.fst'; +OpenFASTRoot = '../../../reg_tests/r-test/glue-codes/openfast/AWT_YFix_WSt/'; +FAST_InputFileName = [ OpenFASTRoot 'AWT_YFix_WSt.fst' ]; TMax = 20; % run the model sim('Test01_SIG.mdl',[0,TMax]); % look at results: -% PlotFASToutput({'../../CertTest/Test01.SFunc.out','../../CertTest/Test01.out'},{'SFunc','exe'}); \ No newline at end of file +% PlotFASToutput({[ OpenFASTRoot 'AWT_YFix_WSt.SFunc.out'],[ OpenFASTRoot 'windows-intel/AWT_YFix_WSt.out']},{'SFunc','exe'}); \ No newline at end of file diff --git a/glue-codes/simulink/src/create_FAST_SFunc.m b/glue-codes/simulink/src/create_FAST_SFunc.m index f97fb2b41..1892c1846 100644 --- a/glue-codes/simulink/src/create_FAST_SFunc.m +++ b/glue-codes/simulink/src/create_FAST_SFunc.m @@ -58,13 +58,13 @@ fprintf( 'Creating %s\n\n', [outDir filesep mexname '.' mexext] ); mex('-largeArrayDims', ... + ... % '-v', ... %add this line for "verbose" output (for debugging) ['-L' libDir], ... ['-l' libName], ... ['-I' includeDir], ... '-I../../../modules/supercontroller/src', ... % needed for visual studio builds to find "SuperController_Types.h" '-I../../../modules/openfoam/src', ... % needed for visual studio builds to find "OpenFOAM_Types.h" '-outdir', outDir, ... - 'COMPFLAGS=$COMPFLAGS -MT -D', ... - ['S_FUNCTION_NAME=' mexname], ... + ['COMPFLAGS=$COMPFLAGS -MT -DS_FUNCTION_NAME=' mexname], ... '-output', mexname, ... 'FAST_SFunc.c'); diff --git a/vs-build/FASTlib/FASTlib.vfproj b/vs-build/FASTlib/FASTlib.vfproj index 4efd3db98..95f55dbe7 100644 --- a/vs-build/FASTlib/FASTlib.vfproj +++ b/vs-build/FASTlib/FASTlib.vfproj @@ -59,8 +59,8 @@ - - + + @@ -68,8 +68,8 @@ - - + +