How to use matlab for dynamic collision simulation?

I have derived a dynamic equation of an elastic icosahedral structure.The dynamic equation is an expression of the acceleration of each node of the structure.
Now I use matlab to program and want to verify this dynamic equation.
I encountered a problem in the simulation of touchdown.
I use ode45 and event functions to solve the coordinates of nodes according to the dynamic equations.
I use the event function to judge whether the structure has landed. The essence is whether the Z coordinate is zero. When the Z coordinate is zero, I stop the current ode calculation process, reverse and attenuate the velocity, substitute the velocity and coordinates at this time into the dynamic equation as a new initial condition, and then use Ode to solve it again.
In my simulation process, the structure often falls into the ground and cannot rebound, that is, the Z coordinate is less than zero,
My question is how to better realize the dynamic simulation of touchdown rebound and ground friction without using some physical engines, such as simscape? Are there any good solving tools?
My event function is as follows:
function [value,isterminal,direction] = lqmyevent(t,y,tData)
value(1,1) = y(3);
value(2,1) = y(6);
value(3,1) = y(9);
value(4,1) = y(12);
value(5,1) = y(15);
value(6,1) = y(18);
value(7,1) = y(21);
value(8,1) = y(24);
value(9,1) = y(27);
value(10,1) = y(30);
value(11,1) = y(33);
value(12,1) = y(36);
isterminal = ones(12,1);
direction = -1*ones(12,1);
end
y(3) y(6) y(9)....is the Z coordinate of each endpoint,I judge whether the structure touches the ground according to whether the Z coordinate is zero.

Answers (0)

Categories

Find more on Numerical Integration and Differential Equations in Help Center and File Exchange

Products

Release

R2021b

Asked:

on 11 Jan 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!