Skip to content

Conversation

@akeeste
Copy link
Contributor

@akeeste akeeste commented Sep 13, 2021

This PR does a few things to make WEC-Sim output compatible with a variable step solver:

  • Update all To_Workspace library blocks to use a sample time of simu.dtOut. The previous decimation of round(simu.dtOut,simu.dt,0) is removed.
  • Assign the clock time to clock_out in the global reference frame. This overwrites simu.time after the simulation so that the true simulation time-stepping is saved
  • Move all wave elevation and wave gauge calculations to the waves.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 read

Other minor clean up:

  • remove clear; clc; close all from bemio scripts so that they don't unnecessarily erase other workspace data and plots.

This resolves issue #656

@akeeste akeeste added Bug bug in WEC-Sim source, high priority Simulation Class Simulation Class (simulationClass.m) Wave Class Wave Classs (waveClass.m) labels Sep 13, 2021
@akeeste akeeste linked an issue Sep 13, 2021 that may be closed by this pull request
@kmruehl kmruehl self-requested a review September 15, 2021 14:28
@kmruehl kmruehl changed the title Bug fixes for variable step solver Bug fixes for variable step solver resolves #656 Sep 15, 2021
@kmruehl kmruehl merged commit a645fa8 into WEC-Sim:master Sep 15, 2021
@akeeste akeeste deleted the bug_dtOut branch September 22, 2021 20:45
@kmruehl kmruehl mentioned this pull request Oct 7, 2021
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug bug in WEC-Sim source, high priority Simulation Class Simulation Class (simulationClass.m) Wave Class Wave Classs (waveClass.m)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Developer Issue] Output time step with variable step solvers

2 participants