Hi,
I have a system upon which a force of the following type is exerted:
That is, at a certain point, the force smoothly increases from 0 to its peak during a very short transient of a few milliseconds. In most scenarios, I guess this transient is irrelevant, but in my particular case I want to study the dynamics of the system in the red area.
(a) My idea was to detect the event where the transient starts, and then reduce the maximum integration step size until the transient is over, and then reset the maximum step size to its original value. Even if this seems plausible, is there a more direct way of doing this? My concern is that, in spite of using an adaptive step-size integrator, it could be that it "skips" the red area directly to the yellow one.
(b) Another question that arises is the following: if I have an event handler or reporter triggering more often than the actual integration steps, how is this handled under the hood? Is there some kind of interpolation going on, or is the system forced to be solved at the time stamp given by the event handler/reporter? Sorry if this is already explained in the documentation, I might have missed it.
Thanks a lot for your invaluable support!
Best regards,
Simone
Integrate over short transients
- Michael Sherman
- Posts: 809
- Joined: Fri Apr 01, 2005 6:05 pm
Re: Integrate over short transients
Hi Simone. If you use one of SImbody's variable step integrators, it should be able to figure out to take small steps over the rapid transition automatically.
Regards,
Sherm
Regards,
Sherm
- Simone Hendriks
- Posts: 15
- Joined: Thu Nov 16, 2023 6:31 am
Re: Integrate over short transients
Hi Sherm,
Thanks for the feedback. With sufficiently tight accuracy values (1e-6 in my case), the integrator takes enough steps during the transition. Regarding question (b), if the reporting period is much smaller than the average step size, is the system solved at the reporting step, or is interpolation used instead?
Best regards,
Simone
Thanks for the feedback. With sufficiently tight accuracy values (1e-6 in my case), the integrator takes enough steps during the transition. Regarding question (b), if the reporting period is much smaller than the average step size, is the system solved at the reporting step, or is interpolation used instead?
Best regards,
Simone
- Michael Sherman
- Posts: 809
- Joined: Fri Apr 01, 2005 6:05 pm
Re: Integrate over short transients
Hi, Simone. Simbody's integrators interpolate when a reporting time doesn't coincide with a step completion.
That's on by default but can be controlled by Integrator methods like setAllowInterpolation().
Regards,
Sherm
That's on by default but can be controlled by Integrator methods like setAllowInterpolation().
Regards,
Sherm
- Simone Hendriks
- Posts: 15
- Joined: Thu Nov 16, 2023 6:31 am
Re: Integrate over short transients
Hi Sherm,
It's all clear now, thank you for your help!
Best regards,
Simone
It's all clear now, thank you for your help!
Best regards,
Simone