Skip to content

Feature request: apply nsubsteps to dynamics equality constraint #307

Description

@rebeccamccabe

Feature description.
Right now nsubsteps only applies to the user-defined constraints, but I propose that it also applies to the internal dynamics equality constraint. This is needed when running with a regular wave and limiting the frequencies to a few harmonics of the excitation wave, so nfreq is rather small (ie 5), and therefore the dynamics are not enforced at very many timesteps (9). Or, allowing the user to specify nt rather than fixing it to ncomponents would work too.

If we figured out how to quantify the error as a function of number of collocation points in the pseudospectral method, perhaps in the long term nt could be calculated based on a user-specified error tolerance, which is how the step size is chosen in a regular ODE solver. But for now, any option in the API to change nt independently from nfreq would be helpful, whether it is directly or through nsubsteps.

Describe alternatives you've considered
Currently I am just setting nfreq higher than I otherwise would, in order to get enough timesteps. This is fine for now but eventually when I am doing bigger problems, the increased size of the optimization problem could interfere with performance.

Interest in leading this feature development?
This is more of an API thing so I'm not particularly interested. Perhaps it aligns with the work being done in #292.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions