Skip to content

[Developer Issue] Output time step with variable step solvers #656

@akeeste

Description

@akeeste

Note: italicized text below is include as an example and should be updated before submission. If you feel any section is not applicable to your request, please replace with 'N/A' rather than delete a section.

Project
WEC-Sim development

Describe the issue
The output time step simu.dtOut is not robust in variable step WEC-Sim simulations. Library To Workspace blocks currently use a decimation of round(simu.dtOut/simu.dt,0). For fixed step solvers this is fine, but with variable step solvers this becomes inaccurate. For example, if simu.dt = 1, simu.dtOut=5, WEC-Sim outputs every 5th data point. However when using a variable step solver, the actual time step can become 0.01. Then the output time step is effectively 0.05, not 5 seconds.

This can be fixed by changing all To Workspace blocks in the library to use the SampleTime = simu.dtOut

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugbug in WEC-Sim source, high prioritySimulation ClassSimulation Class (simulationClass.m)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions