2nd Order, Non-Linear ODE (Forced response/MCK system)
- May 24, 2017
- 6 replies
- 5685 views
Dear All,
I am new to both MathCAD and the problem in hand, so have some novice questions and also hoping for some general strategy and where-to-go-from-here guidance …
I’ve derived an equation of motion for a mechanism, which is a 2nd order, non-linear ODE. It’s an M-C-K type equation describing both angular and linear motion. I’ve rewritten it with all angular terms re-defined as linear terms which has made it quite cumbersome. I want to solve for displacement and time.
I tried using Odesolve, but couldn’t make this work with the full ODE (smaller chunks tested the syntax as OK, but seems it can’t cope with the full equation). I’ve now manually re-written it as a 1st order equation and use rkfixed which seems to work.It's probably not the most elegant/efficient approach so will appreciate any suggestions for improvement here.
I stripped all units out while trying to make Odesolve work, and haven’t yet attempted to reinsert them, is doing so advisable with rkfixed? I guess without units, the user must ensure the inputs are correct then apply units to the output manually? I’ve currently used dummy values for constants while I worked on solving the ODE so the values won’t make sense yet.
Also, is it possible to use Lagrangian notation in rkfixed? I found I had to swap to Leibniz to get it to work so the derivation (10 pages) uses one system and solution the other. It would be nice to be consistent without having to re-write the whole derivation in Leibniz!
Having solved it with RKFixed, my challenge now is the equation contains a damping term which is a function of mechanism velocity. This means I need to update that damping term (Moody friction factor) during the solution so damping corresponds to the calculated velocity - presumably this requires some programming in the solve process to update values? Could anyone point me at a good starting point for achieving this? I hope I can just modify the existing content to interrupt the solve and execute a subroutine calculation at each time step, but haven’t started looking into it. I’m up against a tight deadline so any pointers in that respect would also be appreciated!
Many thanks in anticipation,
Standish.

