Bug fixes for variable step solver resolves #656 #702
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR does a few things to make WEC-Sim output compatible with a variable step solver:
To_Workspacelibrary blocks to use a sample time ofsimu.dtOut. The previous decimation ofround(simu.dtOut,simu.dt,0)is removed.clock_outin the global reference frame. This overwritessimu.timeafter the simulation so that the true simulation time-stepping is savedwaves.calculateElevation()method (except for user defined wave elevation). This is done so that the true simulation time can be used to calculate the elevation, instead of the assumed fixed-step time series. Some cleanup and refactoring is done to make these calculations easier to readOther minor clean up:
clear; clc; close allfrom bemio scripts so that they don't unnecessarily erase other workspace data and plots.This resolves issue #656