Help with iteration!!?
정보
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
이전 댓글 표시
Can anyone help me with iteration and convergence? I need my new Wd to converge with the old Wd in my loop.
ci=174.0453; %Cone index in psi
hr=15.1; %rear tire section height (in)
br=19; %unloaded tire section width rear (in)
dr=80.8; %unloaded overall diameter (in)
SLRR= 37; %static loaded radius of rear tire (in)
Wsar=22575; %the static rear axle load
t=18*(pi/180); %18 degree angle
deltar= ((80.8/2)-27);
dbh=20.5; %drawbar height (in)
bf=16.5; %unloaded tire section width (in)
hf=14.06; %front tire section height (in)
df=62.6; %unloaded overall diameter (in)
SLRF= 28.4; %static loaded radius of rear tire (in)
Wsaf=17455; %the static rear axle load
deltaf= ((62.5/2)-28.4);
s=.01:.001:.2; %slip range 1-20 increments of .1
Wstf= Wsaf/4;
Wstr=Wsar/6;
Wdf=Wstf;
Wdr=Wstr;
for s=.01:.001:.2;
Bnf=((ci*bf*df)/Wdf)*((1+5*(deltaf/hf))/(1+3*(bf/df)));
Bnr=((ci*bf*dr)/Wdr)*((1+5*(deltar/hr))/(1+3*(br/dr)));
NTf=Wdf*(.88*(1-exp(-.1*Bnf))*(1-exp(-7.5*s))-(1/Bnf)-((.5*s)/sqrt(Bnf)));
NTr=Wdr*(.88*(1-exp(-.1*Bnr))*(1-exp(-7.5*s))-(1/Bnr)-((.5*s)/sqrt(Bnr)));
Px=NTf+NTr;
omega= 72*(pi/180);
Py= ((Px/sin(omega))*sin(t));
P=sqrt((Py).^2+(Px).^2);
Wd=Wstf-Py;
Wd1=Wstr-Py;
while (Wdf-Wd)> 0.0001;
(Wdr-Wd1)>0.0001;
Wd1=Wdr;
Wd=Wdf;
end
end
댓글 수: 1
Kuifeng
2016년 4월 9일
can you edit your message with a empty space in front of the code?.
%space ... then the code
답변 (1개)
Roger Stafford
2016년 4월 9일
0 개 추천
Your while-loop does not seem to be very useful. On the first pass through it sets Wd equal to Wdf and because the "(Wdf-Wd)> 0.0001" condition will then fail, that is also its last pass through the loop. You need to rethink what you are trying to accomplish here.
댓글 수: 2
Garrett
2016년 4월 9일
Roger Stafford
2016년 4월 9일
You will have to do some explaining about what you are trying to accomplish. We don't know what you mean by the "old W" and the "new W". Give a good explanation in plain English about what you are trying to achieve with your variable Wd and Wd1.
이 질문은 마감되었습니다.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!