How do i transform this equation system in to three dimensions?
조회 수: 1 (최근 30일)
이전 댓글 표시
댓글 수: 1
Sam Chak
2021년 12월 9일
Looks like a motion of a rigid body with mass m that is constrained to the 2-dimensional x-y plane.
답변 (1개)
Bjorn Gustavsson
2021년 12월 9일
Since this looks like the equations of motion for a solid body falling in a constant gravitational field with some velocity-dependent drag you only have to realize that the motion will be in a vertical plane, Therefore you can always select a coordinate-system such that one of the two horizontal components (both position and velocity) are identical to zero. Conversely, since the horizontal propagation-direction remains constant you can simply convert the x and vx into two components in an arbitrarily rotated coordinate system. Just integrate the 2-D equations of motion (I'd shift the initial x-coordinate to zero). Then it should be as simple as:
phi0 = pi/sqrt(3);
r0v0_original = [0,1,3,4*cos(phi0),4*sin(phi0),5];
r0v0_for2D = [0,r0v0_original(3),sqrt(r0v0_original(4)^2+r0v0_original(5)),r0v0_original(6)];
[t,rv] = ode45(... % etc
x1 = r0v0_original(1) + rv(:,1)*cos(phi0);
x2 = r0v0_original(2) + rv(:,2)*sin(phi0);
vx1 = rv(:,4)*cos(phi0);
vx2 = rv(:,5)*sin(phi0);
Here I've assumed that you have the position-components as the first 3 (2 in the eqs-of-motion function) and the velocity-components as the last 3 (last 2 in the equation-of-motion).
HTH
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Assembly에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!