Solution of 2nd order differential equation

조회 수: 1 (최근 30일)
Parthajit
Parthajit 2024년 9월 9일
댓글: Parthajit 2024년 9월 9일
I am trying to validate the plots of a research paper. But whenever I try to solve I don't get the appropriate plot. There is a difference in the plot. I am providing the equation and the values of different constants. I am also providing the plot which is given in the research paper. Kindly guide me for this.
The Highlighted one is the governing equation.
Plot given in the research paper given below.
I m providing you the code I have tried and the result obtained below.
% Constants
m = 0.89694;
m0 = 0.012992;
c = 0.0689097;
g = 9.81;
F0 = 124.728;
alpha = 54.5841;
e = 0.050;
f = 5;
omega = 2 * pi * f;
t = linspace(0, 100, 100000);
Fm = @(x) F0 ./ (1 + alpha * x).^4;
y0 = [0; 0];
[t, sol] = ode45(@(t, y) model(t, y, m, m0, c, g, Fm, omega, e), t, y0);
x = sol(:, 1);
x_dot = sol(:, 2);
% Plot time-displacement
figure(1);
plot(t, x,'r');
xlabel('Time (s)');
ylabel('Displacement (m)');
title('Time vs Displacement');
grid on;
% Define the differential equation
function dydt = model(t, y, m, m0, c, g, Fm, omega, e)
x = y(1); % Displacement
x_dot = y(2); % Velocity
total_mass = m + m0;
% Acceleration term
x_ddot = (Fm(x) + m0 * e * (omega^2) * sin(omega * t) - c * x_dot - total_mass * g) / total_mass;
dydt = [x_dot; x_ddot]; % Return [velocity; acceleration]
end
  댓글 수: 12
VBBV
VBBV 2024년 9월 9일
@Parthajit the values given show that the graphs are computed using Eq. 32 and not Eq. 31
Parthajit
Parthajit 2024년 9월 9일
@VBBV Okay sir I am trying with that, actually no Xst value is provided in the paper, but this Xst value is equal to the initial value of x , which is also not provided directly (can be seen in the plot only).

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by