vibration of a rod using spectral element method

4 ビュー (過去 30 日間)
Foil
Foil 2021 年 3 月 14 日
コメント済み: Foil 2021 年 3 月 14 日
Hi, everyone
I want to simulate the wave propagation in a rod with one side clamped, and another side experience a step force of duration 0.01s, as shown below. I have tried to write the matlab code but it didn’t work well. I have been puzzled by this problem for a long time. For the matlab code, it will be greatly appreciated if you could share some suggestions with me.
dt=0.0002; % time increment
N=5000; % sample points
tp=N*dt; % total time
t=0:dt:tp; % time discretization
F=1000e3*(stepfun(t,0)-stepfun(t,0.01)); % force duration= 0.01s
f=1/dt; % maximum frequency
fre=0:f/N:f; % frequency discretization
y=fft(F); % FFT amplitude
A=0.01; % area
E=2.1e11; % Young’s modulus
rho=7850; % density
l=10; % length
k=fre*2*pi*(rho/E)^0.5; % wave number
u2f=y.*tan(k*l)./(E*A*k); % displacement in frequency domain % solved by u1=y/k11
u2=ifft(u2f) % displacement in time domain

回答 (1 件)

Alan Stevens
Alan Stevens 2021 年 3 月 14 日
I don't know if it solves your problem, but your last line should probably have ifft(u2f) not ifft(u2) on the right hand side.
  2 件のコメント
Foil
Foil 2021 年 3 月 14 日
Thanks. Problem fixed.
Foil
Foil 2021 年 3 月 14 日
I mean the code is now fixed, but the numerical results are still wrong.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeAcoustics, Noise and Vibration についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by