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!