Simulation of tensile test

28 visualizaciones (últimos 30 días)
Henrik Kristiansen
Henrik Kristiansen el 1 de Nov. de 2019
Respondida: darova el 1 de Nov. de 2019
Hello :)
We are trying to make an simulation of a tensile test of a fiber compsite.
umaxa=163
umaxb=167
n=10000
area=0.064
rng('shuffle')
Umax=umaxa + (umaxb-umaxa).*randn(n,1);
for F=1:10000
K1(F,1)=(F*50)/(n*area);
end
while K1(F,1) < Umax(:,1)
onoff = K1(F,1) < Umax(n,1);
nny = sum(onoff,1);
nn = n-nny;
K1(F,1)=(F*10)/(nn*area);
end
end
We are using randn to define maximum tensile strenght for each fiber, n is the amount of fibers.
We want to step on the force from 1 to 10000, so when the force increase on each fiber the tensile strenght is increasing.
Each fiber is getting evulated if their tensile strenght excess the maximum tensile strenght, if there is no fiber which breaks the force is being increased by the for loop.
If there is a fiber which excess the maximum tensile strenght it needs to be removed and the while loop shall calculate how many fibers which should be removed.
When there is a fiber removed we need to run the while loop again because of the tensile strenght is increased untill there is no more fiber getting removed at the value of the force. So the For loop can increase the force again and it runs all over. Untill there is zero fibers left.
The code above is our attempt to write it, but we cant manage to remove the amount of fibers and with this code it gets a K1 vektor with inf entries because the n value will reach below zero.

Respuestas (1)

darova
darova el 1 de Nov. de 2019
An example
clc,clear
% umaxa=163;
umaxa=113;
umaxb=167;
n = 20;
area=0.064;
rng('shuffle')
Umax=umaxa + (umaxb-umaxa).*rand(n,1);
nn = n;
cm = jet(100); % colormap
F = 1; % start force
while (nn > 0) && (F < 10000)
stress = (F*50)/(nn*area); % stress of each fiber
on = stress < Umax; % fibers remain
nn = sum(on); % actual number of fibres
% F = F + 1;
F = F + nn/n/10;
cla
title(sprintf('Stress = %0.2f',stress))
hold on
for i = 1:n
if on(i) % if fiber exists
ind = round(100*stress/Umax(i)); % color index
plot([i i],[0 n],'color',cm(ind,:)) % plot fiber
str = sprintf('Umax = %0.0f',Umax(i)); % label
text(i,n/2,str,'ROtation',90) % plot label
end
end
hold off
pause(1)
end

Categorías

Más información sobre Stress and Strain en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by