Response of a uniaxial bar for a ramp loading
Version 1.0.0 (46.9 KB) by
amara fethallah
Calcul dynamic
% FETHALLAH AMARA
% central difference method
% problem parameters
Area=10e-5;E=100e9;rho=4000;L=1/3;Fmax=0.001*Area*E;tmax=3e-3;
Dt=21e-6;Nmax=round(tmax/Dt)+1;
t=linspace(0,tmax,Nmax);
% Global Matrix
K=(Area*E/L)*[2,-1,0;-1,2,-1;0,-1,1];
M=(rho*Area*L/6)*[4,1,0;1,4,1;0,1,2];
F=[zeros(2,Nmax);linspace(0,Fmax,round(Nmax/2)), Fmax*ones(1,Nmax-round(Nmax/2))];
Q=zeros(3,Nmax);
% Time integration
Minv=(Dt^2)*(inv(M));
Q(:,2)=Q(:,1)+Dt*zeros(3,1);
for n=2:Nmax-1
Q(:,n+1)=2*Q(:,n)-Q(:,n-1)+Minv*(F(:,n)-K*Q(:,n));
end
% Static solution
Qs=K\F;
plot(t,Q(3,:),t,Qs(3,:),'--','LineWidth',2);
xlabel('Time(sec)','FontSize',13,'Color','k')
ylabel('Displacement(m)','FontSize',13,'Color','k')
hleg1 = legend('Central finite difference',' Static solution','Location','Best');
Cite As
amara fethallah (2023). Response of a uniaxial bar for a ramp loading (https://www.mathworks.com/matlabcentral/fileexchange/104160-response-of-a-uniaxial-bar-for-a-ramp-loading), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2013a
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0 |