Final 12
Final 12
Final 12
%iteration number
N=100;
%tolerance
t=10^-5;
%constants.....................................
D=22.23;
gama_o1=1;
epsi1=0;
epsi2=0.3926990817;
epsi3=0.7853981634;
epsi4=1.1780972451;
epsi5=1.5707963268;
epsi6=1.9634954085;
epsi7=2.3561944902;
epsi8=2.7488935719;
epsi9=3.1415926536;
gama_i1=1;
r i=¿11.63
r o =¿11.63
SSU =40 (mineral oil)
E =2060 n/ mm2
a i= 2.64 mm
b i=0.324 mm
a o=2.56 mm
b o=0.3754 mm
Fa=22500 N
G =10000 mm/ sec
ρoil =0.00085 g/mm3
ρball =7.81 g/ mm3
I 0 =0.0014 mm
I 0 = 0.062 mm
outer
d i= 102.8 mm
Db = 63.5 mm,
ξ i= 0.3,
Ei = 206900 n/mm2,
E s= 206900 n/mm2,
D s = 90 mm
ξ s = 0.3,
Dh = 160 mm
ρ s = 0.00785 g/mm2
d o =147.7 mm
ρi = 0.00785 g/mm2
Γ i =¿ 11.7 e-6 mm/mm/oc
Γ s=¿11.7 e-6 mm/mm/oc
∆ T i=¿ 100 c o
∆ T s =127.8 c o
Do = 160 mm,
d o =147 mm,
ξ 0= 0.3 ,
E o=206900 n/ mm2,
Eh =206900 n/ mm2,
Dh=203.2 mm,
ξ h=0.3,
ρo = 0.00785 g/mm2,
ω o= 0.0,
ρh = 0.00785 g/mm2,
∆ T o=100 ℃ ,
∆ T h= 150 ℃ ,
Γ o= 11.7 e-6 mm/mm/℃ ,
Γ h = 11.7 e-6 mm/mm/℃ .
N= 10000 rpm
ω = 0.0 1047.2 rad/ sec
Z =16.
االضافه
Fa=Qsinα
ri
f i=
D
ro
f o=
D
B=f i +f o−1
himin
,o
=3.63 U 0.68
i,o G
0.49 −0.073
QZ ( 1−e−.068 k ) R x
13.6986
i,o
K oil =6.4066 ×10 h min
8 −14.6986
U
9.3157
G
6.7123
É R x
15.6986
( 1−e−0.68 k )
i ,o
η o U i ,o
U=
2 É Rx
dm
U i=
2
[ ( 1−γ ) ( ω−ω m ) +γ ωR ]
dm
Uo=
2
[ ( 1+γ ) ωm + γ ω R ]
' E
E= 2
1−ξ
D
R xi= (1−γ )
2
D
R xo= (1+γ )
2
G= λE'
( )
0.163
vo
λ=0.1122 4
10
−3 1.95
v o=2.26 . 10 SSU −
SSU
' D
γ=
dm
a
k=
b
Q
Q z= 2
E ' Rxi
ηb =ν ρ b oil G
α is in radian unit.
1
d m = ( d i+ d o )
2
Pd =d o −d i−2 D
2π N
ω=
60
2 π nm
ω m=
60
2 π nR
ωR =
60
1
n m= N (1−γ )
2
1 dm (
N 1−γ )
2
n R=
2 D
D cos α
γ=
dm
ωm 1
=
ω ( 1+γ ' cos α 0 ) ( cos α i +tan β sin α i )
1+
( 1−γ ' cos α i )( cos α o + tan β sin α o )
ωR −1
=
( )
ω cos α o + tan β sin α o cos α i + tan β sin α i '
+ γ cos β
1+ γ ' cos α o 1−γ ' cos α i
sin α o
tan β = '
cos α o+ γ
' D
γ=
dm
( )
2
1 2 ωm
F c= d m ω
2 ω
M =J ( ) ( ) ω sin β
ω ω R m 2
gj
ω ω j j
1 5
J= ρ πD
60 ball
dm o
Ri= + ( f i−0.5 ) D cos α
2
∘
α =cos
−1
( 1−
Pw
2A )
o
F a=Q sin α
Pw =P d +∆ Pd
∆ P d=−∆r −∆ h
2I s
( )
di
Db
{[ ] [ ]}
∆ r=
(( ) ) (( ) )
2 2
di Db
+1 +1
[(( ) ) ] (( ) )
di
2 Db Ei Ds
−1 + ξi + −ξ s
(( ) )
Db di 2 Es Db 2
−1 −1
Db Ds
I s=I 0−∆ I c −∆ I T
∆ I c =∆ D s−∆ D b
−11
ρs ω2 ( Db + Ds ) 3
∆ D s=3.13 ×10 ×
Es
2 3
−11
ρ i ω ( Db + d i )
∆ D b=3.13 ×10 ×
Ei
∆ I T =Γ i ∆ T i Db −Γ s ∆ T s Ds
2 Ih
( )
Do
do
{[ ] [ ]}
∆ h=
(( ) ) (( ) )
2 2
Do Dh
+1 +1
[(( ) ) ] (( ) ) do Do
2
Do Eo
−1 +ξ o + −ξ h
(( ) )
do Do 2 Eh Dh 2
−1 −1
do Do
I h=I 0 −∆ I c −∆ I T
outer outer outer
∆ I c =∆ Do −∆ Dh
outer
−11
ρo ωo2 ( Do +d o )3
∆ D o=3.13 ×10 ×
Eo
2 3
−11
ρ h ω o ( D h+ D o )
∆ D h=3.13 ×10 ×
Eh
∆ I T =Γ o ∆ T o Do−Γ h ∆ T h Dh
1.5
Qij =K Ti j δ ij
1.5
Qoj =K Ti j δ oj
2 √2
( E
2 )
( )
3
1−ξ 1
K i= 2
1
δ i¿
3 ( ∑ ρi ) 2
2 √2
( 1−ξE ) 2
( )
3
1
Ko= 2
1
δ o¿
3 ( ∑ ρo ) 2
( )
3
Q
Li= ci
Q ei
( ) ( )
0.41 1.39 0.3
2fi ( 1−γ i ) γi 1.8
−1
3
Q ci =93.2∗ D Z
2 f i−1 1
cos α i
( 1+γ i ) 3
'
Qci =Qci ( 1−0.33 sin α i )
( )
3
Qco
Lo =
Qeo
1
( ) ( 1+ γ o )
( )
0.41 3 0.3 −1
2fo γo 1.8 3
Qco =93.2∗ D Z
2 f o −1 1
cos α o
( 1−γ o ) 3
−1.11 −0.9
L=( Li )
−1.11
+ Lo
L
LH=
N∗60
The Coding:
xx=[];
X_data=xlsread('Book1.xlsx');
for kk=1:length(X_data)
kk
delta_r(kk)=X_data(kk,1);
delta_a(kk)=X_data(kk,2);
theta(kk)=X_data(kk,3);
%equations...............................
syms X11 X21 delta_i1 delta_o1 X12 X22 delta_i2 delta_o2 X13 X23 delta_i3
delta_o3 X14 X24 delta_i4 delta_o4 X15 X25 delta_i5 delta_o5 X16 X26
delta_i6 delta_o6 X17 X27 delta_i7 delta_o7 X18 X28 delta_i8 delta_o8
X19 X29 delta_i9 delta_o9
F1=((B*D*sin(alpha)+delta_a(kk))+(Ri*theta(kk)*cos(epsi1)-X11))^2+((B*D*cos(alpha)
+delta_r(kk))-X21)^2-((fi-0.5)*D + delta_i1)^2;
F2=((X11)^2+(X21)^2)-((fi-0.5)*D+delta_o1)^2;
V=(((gama_o1*Mo*X21)/D)-(Ko1*((delta_o1)^1.5)*X11))/(((fo-0.5)*D)+delta_o1);
U=((Ki1*((delta_i1)^1.5))*((B*D*sin(alpha)+delta_a(kk))+(Ri*theta(kk)*cos(epsi1)-
X11))-(((gama_i1*Mi)/D)*((B*D*cos(alpha)+delta_r(kk))-X21)))/(((fi-0.5)*D)
+delta_i1);
F3=V+U;
V1=((Ko1*((delta_o1)^1.5)*X21)+((gama_o1*Mo*X11)/D))/(((fo-0.5)*D)+delta_o1);
U1=(((Ki1*((delta_i1)^1.5))*((B*D*cos(alpha)+delta_r(kk))-X21))+(((gama_i1*Mi)/
D)*((B*D*sin(alpha)+delta_a(kk))+(Ri*theta(kk)*cos(epsi1)-X11))))/(((fi-0.5)*D)
+delta_i1);
F4=V1-U1-Fc1;
F5=((B*D*sin(alpha)+delta_a(kk))+(Ri*theta(kk)*cos(epsi2)-X12))^2+((B*D*cos(alpha)
+delta_r(kk))-X22)^2-((fi-0.5)*D + delta_i2)^2;
F6=((X12)^2+(X22)^2)-((fi-0.5)*D+delta_o2)^2;
V2=(((gama_o1*Mo*X22)/D)-(Ko1*((delta_o2)^1.5)*X12))/(((fo-0.5)*D)+delta_o2);
U2=((Ki1*((delta_i2)^1.5))*((B*D*sin(alpha)+delta_a(kk))+(Ri*theta(kk)*cos(epsi2)-
X12))-(((gama_i1*Mi)/D)*((B*D*cos(alpha)+delta_r(kk))-X22)))/(((fi-0.5)*D)
+delta_i2);
F7=V2+U2;
V12=((Ko1*((delta_o2)^1.5)*X22)+((gama_o1*Mo*X12)/D))/(((fo-0.5)*D)+delta_o2);
U12=(((Ki1*((delta_i2)^1.5))*((B*D*cos(alpha)+delta_r(kk))-X22))+(((gama_i1*Mi)/
D)*((B*D*sin(alpha)+delta_a(kk))+(Ri*theta(kk)*cos(epsi2)-X12))))/(((fi-0.5)*D)
+delta_i2);
F8=V12-U12-Fc1;
F9=((B*D*sin(alpha)+delta_a(kk))+(Ri*theta(kk)*cos(epsi3)-X13))^2+((B*D*cos(alpha)
+delta_r(kk))-X23)^2-((fi-0.5)*D + delta_i3)^2;
F10=((X13)^2+(X23)^2)-((fi-0.5)*D+delta_o3)^2;
V3=(((gama_o1*Mo*X23)/D)-(Ko1*((delta_o3)^1.5)*X13))/(((fo-0.5)*D)+delta_o3);
U3=((Ki1*((delta_i3)^1.5))*((B*D*sin(alpha)+delta_a(kk))+(Ri*theta(kk)*cos(epsi3)-
X13))-(((gama_i1*Mi)/D)*((B*D*cos(alpha)+delta_r(kk))-X23)))/(((fi-0.5)*D)
+delta_i3);
F11=V3+U3;
V13=((Ko1*((delta_o3)^1.5)*X23)+((gama_o1*Mo*X13)/D))/(((fo-0.5)*D)+delta_o3);
U13=(((Ki1*((delta_i3)^1.5))*((B*D*cos(alpha)+delta_r(kk))-X23))+(((gama_i1*Mi)/
D)*((B*D*sin(alpha)+delta_a(kk))+(Ri*theta(kk)*cos(epsi3)-X13))))/(((fi-0.5)*D)
+delta_i3);
F12=V13-U13-Fc1;
F13=((B*D*sin(alpha)+delta_a(kk))+(Ri*theta(kk)*cos(epsi4)-X14))^2+
((B*D*cos(alpha)+delta_r(kk))-X24)^2-((fi-0.5)*D + delta_i4)^2;
F14=((X14)^2+(X24)^2)-((fi-0.5)*D+delta_o4)^2;
V4=(((gama_o1*Mo*X24)/D)-(Ko1*((delta_o4)^1.5)*X14))/(((fo-0.5)*D)+delta_o4);
U4=((Ki1*((delta_i4)^1.5))*((B*D*sin(alpha)+delta_a(kk))+(Ri*theta(kk)*cos(epsi4)-
X14))-(((gama_i1*Mi)/D)*((B*D*cos(alpha)+delta_r(kk))-X24)))/(((fi-0.5)*D)
+delta_i4);
F15=V4+U4;
V14=((Ko1*((delta_o4)^1.5)*X24)+((gama_o1*Mo*X14)/D))/(((fo-0.5)*D)+delta_o4);
U14=(((Ki1*((delta_i4)^1.5))*((B*D*cos(alpha)+delta_r(kk))-X24))+(((gama_i1*Mi)/
D)*((B*D*sin(alpha)+delta_a(kk))+(Ri*theta(kk)*cos(epsi4)-X14))))/(((fi-0.5)*D)
+delta_i4);
F16=V14-U14-Fc1;
F17=((B*D*sin(alpha)+delta_a(kk))+(Ri*theta(kk)*cos(epsi5)-X15))^2+
((B*D*cos(alpha)+delta_r(kk))-X25)^2-((fi-0.5)*D + delta_i5)^2;
F18=((X15)^2+(X25)^2)-((fi-0.5)*D+delta_o5)^2;
V5=(((gama_o1*Mo*X25)/D)-(Ko1*((delta_o5)^1.5)*X15))/(((fo-0.5)*D)+delta_o5);
U5=((Ki1*((delta_i5)^1.5))*((B*D*sin(alpha)+delta_a(kk))+(Ri*theta(kk)*cos(epsi5)-
X15))-(((gama_i1*Mi)/D)*((B*D*cos(alpha)+delta_r(kk))-X25)))/(((fi-0.5)*D)
+delta_i5);
F19=V5+U5;
V15=((Ko1*((delta_o5)^1.5)*X25)+((gama_o1*Mo*X15)/D))/(((fo-0.5)*D)+delta_o5);
U15=(((Ki1*((delta_i5)^1.5))*((B*D*cos(alpha)+delta_r(kk))-X25))+(((gama_i1*Mi)/
D)*((B*D*sin(alpha)+delta_a(kk))+(Ri*theta(kk)*cos(epsi5)-X15))))/(((fi-0.5)*D)
+delta_i5);
F20=V15-U15-Fc1;
F21=((B*D*sin(alpha)+delta_a(kk))+(Ri*theta(kk)*cos(epsi6)-X16))^2+
((B*D*cos(alpha)+delta_r(kk))-X26)^2-((fi-0.5)*D + delta_i6)^2;
F22=((X16)^2+(X26)^2)-((fi-0.5)*D+delta_o6)^2;
V6=(((gama_o1*Mo*X26)/D)-(Ko1*((delta_o6)^1.5)*X16))/(((fo-0.5)*D)+delta_o6);
U6=((Ki1*((delta_i6)^1.5))*((B*D*sin(alpha)+delta_a(kk))+(Ri*theta(kk)*cos(epsi6)-
X16))-(((gama_i1*Mi)/D)*((B*D*cos(alpha)+delta_r(kk))-X26)))/(((fi-0.5)*D)
+delta_i6);
F23=V6+U6;
V16=((Ko1*((delta_o6)^1.5)*X26)+((gama_o1*Mo*X16)/D))/(((fo-0.5)*D)+delta_o6);
U16=(((Ki1*((delta_i6)^1.5))*((B*D*cos(alpha)+delta_r(kk))-X26))+(((gama_i1*Mi)/
D)*((B*D*sin(alpha)+delta_a(kk))+(Ri*theta(kk)*cos(epsi6)-X16))))/(((fi-0.5)*D)
+delta_i6);
F24=V16-U16-Fc1;
F25=((B*D*sin(alpha)+delta_a(kk))+(Ri*theta(kk)*cos(epsi7)-X17))^2+
((B*D*cos(alpha)+delta_r(kk))-X27)^2-((fi-0.5)*D + delta_i7)^2;
F26=((X17)^2+(X27)^2)-((fi-0.5)*D+delta_o7)^2;
V7=(((gama_o1*Mo*X27)/D)-(Ko1*((delta_o7)^1.5)*X17))/(((fo-0.5)*D)+delta_o7);
U7=((Ki1*((delta_i7)^1.5))*((B*D*sin(alpha)+delta_a(kk))+(Ri*theta(kk)*cos(epsi7)-
X17))-(((gama_i1*Mi)/D)*((B*D*cos(alpha)+delta_r(kk))-X27)))/(((fi-0.5)*D)
+delta_i7);
F27=V7+U7;
V17=((Ko1*((delta_o7)^1.5)*X27)+((gama_o1*Mo*X17)/D))/(((fo-0.5)*D)+delta_o7);
U17=(((Ki1*((delta_i7)^1.5))*((B*D*cos(alpha)+delta_r(kk))-X27))+(((gama_i1*Mi)/
D)*((B*D*sin(alpha)+delta_a(kk))+(Ri*theta(kk)*cos(epsi7)-X17))))/(((fi-0.5)*D)
+delta_i7);
F28=V17-U17-Fc1;
F29=((B*D*sin(alpha)+delta_a(kk))+(Ri*theta(kk)*cos(epsi8)-X18))^2+
((B*D*cos(alpha)+delta_r(kk))-X28)^2-((fi-0.5)*D + delta_i8)^2;
F30=((X18)^2+(X28)^2)-((fi-0.5)*D+delta_o8)^2;
V8=(((gama_o1*Mo*X28)/D)-(Ko1*((delta_o8)^1.5)*X18))/(((fo-0.5)*D)+delta_o8);
U8=((Ki1*((delta_i8)^1.5))*((B*D*sin(alpha)+delta_a(kk))+(Ri*theta(kk)*cos(epsi8)-
X18))-(((gama_i1*Mi)/D)*((B*D*cos(alpha)+delta_r(kk))-X28)))/(((fi-0.5)*D)
+delta_i8);
F31=V8+U8;
V18=((Ko1*((delta_o8)^1.5)*X28)+((gama_o1*Mo*X18)/D))/(((fo-0.5)*D)+delta_o8);
U18=(((Ki1*((delta_i8)^1.5))*((B*D*cos(alpha)+delta_r(kk))-X28))+(((gama_i1*Mi)/
D)*((B*D*sin(alpha)+delta_a(kk))+(Ri*theta(kk)*cos(epsi8)-X18))))/(((fi-0.5)*D)
+delta_i8);
F32=V18-U18-Fc1;
F33=((B*D*sin(alpha)+delta_a(kk))+(Ri*theta(kk)*cos(epsi9)-X19))^2+
((B*D*cos(alpha)+delta_r(kk))-X29)^2-((fi-0.5)*D + delta_i9)^2;
F34=((X19)^2+(X29)^2)-((fi-0.5)*D+delta_o9)^2;
V9=(((gama_o1*Mo*X29)/D)-(Ko1*((delta_o9)^1.5)*X19))/(((fo-0.5)*D)+delta_o9);
U9=((Ki1*((delta_i9)^1.5))*((B*D*sin(alpha)+delta_a(kk))+(Ri*theta(kk)*cos(epsi9)-
X19))-(((gama_i1*Mi)/D)*((B*D*cos(alpha)+delta_r(kk))-X29)))/(((fi-0.5)*D)
+delta_i9);
F35=V9+U9;
V19=((Ko1*((delta_o9)^1.5)*X29)+((gama_o1*Mo*X19)/D))/(((fo-0.5)*D)+delta_o9);
U19=(((Ki1*((delta_i9)^1.5))*((B*D*cos(alpha)+delta_r(kk))-X29))+(((gama_i1*Mi)/
D)*((B*D*sin(alpha)+delta_a(kk))+(Ri*theta(kk)*cos(epsi9)-X19))))/(((fi-0.5)*D)
+delta_i9);
F36=V19-U19-Fc1;
fs=[F1;F2;F3;F4;F5;F6;F7;F8;F9;F10;F11;F12;F13;F14;F15;F16;F17;F18;F19;F20;F21;F22
;F23;F24;F25;F26;F27;F28;F29;F30;F31;F32;F33;F34;F35;F36];
xs=[X11;X21;delta_i1;delta_o1;X12;X22;delta_i2;delta_o2;X13;X23;delta_i3;delta_o3;
X14;X24;delta_i4;delta_o4;X15;X25;delta_i5;delta_o5;X16;X26;delta_i6;delta_o6;X17;
X27;delta_i7;delta_o7;X18;X28;delta_i8;delta_o8;X19;X29;delta_i9;delta_o9];
jac=jacobian(fs,xs);
x=[2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2;2];
for ii=1:N
f=double(subs(fs,xs,x));
jj=double(subs(jac,xs,x));
x=x-inv(jj)*f;
err=abs(inv(jj)*f);
if(err<t)
break;
end
end
xx=[x']
end