I got a questions about how did the source code run when I use MATLAB simulink model specifically when using S function in MATLAB.
There is a subroutine “TimeMarch()” in source code file “FAST.f90”. In “TimeMarch”, the subroutine “Solver” was called to compute motions of all DOFs. I am wondering “Solver” will be used when I use S function in MATLAB? Why I am asking this is because I checked “FASTSimulink.f90”, a source code file and found a subroutine “FASTDYNAMICS (ZTime_s, QT_s, QDT_s, …etc)” which solveed equations of motion and can be seen form the following picture.
It is different from subroutine “Solver” which was called in subroutine"TimeMarch".Because Adams-Bashforth predictor and Adams-Moulton corrector integration scheme was used in “Solver” to calculate the motions of all DOFs. Hence, I am wondering if the outputs obtained in MATLAB simulink model was calculated using “Solver” or “FASTDYNAMICS”?
In the Simulink-FAST v7 interface, routines TimeMarch() and Solver() are never called. Instead, Simulink is responsible for time-integrating the structural states of FAST.
Note that the Simulink-FAST v8 interface is very different. In the Simulink-FAST v8 interface, the states of FAST are integrated within the FAST S-Function.
So you mean Adams-Bashforth predictor and Adams-Moulton corrector integration scheme won’t be used in the Simulink-FAST v7 interface, right? I am wondering how to calculate “Q” and “QD” of next time step in the Simulink-FAST v7 interface because “RtHS” could only compute “QD2” given “Q” and “QD” in one time step.
Correct. The time-integration of the structural states in FAST v7 is based on whatever you’ve defined as the integrator in Simulink.
You can access the states (Q and QD) by opening up the block labeled “FAST Nonlinear Wind Turbine” within Simulink, where you can then see the integrators and the FAST S-Function block.