Integrate over short transients

Simbody is useful for internal coordinate and coarse grained molecule modeling, large scale mechanical models like skeletons, and anything else that can be modeled as bodies interconnected by joints, acted upon by forces, and restricted by constraints.
POST REPLY
User avatar
Simone Hendriks
Posts: 14
Joined: Thu Nov 16, 2023 6:31 am

Integrate over short transients

Post by Simone Hendriks » Fri Aug 02, 2024 3:55 am

Hi,

I have a system upon which a force of the following type is exerted:
Screenshot 2024-08-02 123917.png
Screenshot 2024-08-02 123917.png (13.24 KiB) Viewed 1448 times
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

User avatar
Michael Sherman
Posts: 807
Joined: Fri Apr 01, 2005 6:05 pm

Re: Integrate over short transients

Post by Michael Sherman » Wed Aug 07, 2024 2:20 pm

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

User avatar
Simone Hendriks
Posts: 14
Joined: Thu Nov 16, 2023 6:31 am

Re: Integrate over short transients

Post by Simone Hendriks » Wed Sep 04, 2024 9:29 am

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

User avatar
Michael Sherman
Posts: 807
Joined: Fri Apr 01, 2005 6:05 pm

Re: Integrate over short transients

Post by Michael Sherman » Wed Sep 04, 2024 11:40 am

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

User avatar
Simone Hendriks
Posts: 14
Joined: Thu Nov 16, 2023 6:31 am

Re: Integrate over short transients

Post by Simone Hendriks » Fri Sep 06, 2024 10:43 am

Hi Sherm,

It's all clear now, thank you for your help! :)

Best regards,
Simone

POST REPLY