Nghiên cứu động lực học đường cáp vận chuyển trái thanh long ở vùng Tây Nam Bộ - 21


Phlc: Các chương trình tính toán trên

Matlab

1) Tính các thông số nhịp cáp

function tinh_thong_so_nhip_cap clc;

%============= Doc tu file EXCEL

=========================================


Ten_ghi = 'SoLieu_EXCEL_MATLAB.xlsx'; [num txt]=xlsread(Ten_ghi);

So_cua=zeros(); Ton_hao_cua = zeros();

Có thể bạn quan tâm!

Xem toàn bộ 196 trang tài liệu này.

So_cua(1) = 4; So_cua(2) = 5; So_cua(3) = 6; So_cua(4) = 7;

So_cua(5) = 8;

Nghiên cứu động lực học đường cáp vận chuyển trái thanh long ở vùng Tây Nam Bộ - 21

Tong_S=num(4,1); f1=zeros(); N=num(2,1);

A=zeros(N); VP=zeros(); Nhap = zeros(N,4); Nhap0 = zeros(N,4); U=zeros(); q=zeros();d=zeros(); S=zeros(); d0=zeros();

B = zeros(); B1 = zeros(); f = zeros(); fw = zeros(); Li = zeros(); L1 =zeros();

DEL_U=zeros(N,1); VP0 = zeros(N,1);


tgL=zeros(); tgS=0; Gia_do =zeros(N,3);

R =zeros(); R1=zeros(); R2=zeros();


S0=zeros(); h=zeros(); L=zeros(); q0=zeros(); saiso = 10^(-6);

Nghiem01=zeros(N,3); for j=1:N

Nhap0(j,1)=num(4,j+2);

Nhap0(j,2)= num(6,j+2);

Nhap0(j,4)=num(5,j+2);

tgL(j) =sqrt(Nhap0(j,1)^2+Nhap0(j,2)^2); tgS=tgS+ tgL(j);

Nhap(j,1)=Nhap0(j,1);

Nhap(j,2)= abs(Nhap0(j,2));

Nhap(j,4)=Nhap0(j,4);

d(j)= Nhap(j,2); q(j)= Nhap(j,4); S(j) = Nhap(j,1); d0(j)= Nhap0(j,2);

end


Tong_S=tgS; Tong_L0=num(3,1) Bang_ghi = zeros();

%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&( 1

)&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& for K_lap =1:1

Tong_L = Tong_L0 ; Bang_ghi(K_lap,1) = Tong_L;

T = zeros(); H = zeros();

%

$$$$$$$$$$$$$$$$&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&========================= if (Tong_L > Tong_S) & (Tong_S > 0)

hs = Tong_L/Tong_S; for j=1:N

Nhap(j,3)= hs*tgL(j) ;

end

%===================================================================

=======

%$$$$$$$$$$$ Tinh cac gia tri U ban dau for k=1:N

Nhap_vao = zeros(); for j=1: 4

Nhap_vao(j) = Nhap(k,j); end

if Nhap_vao(2)>0 Nghiem0=Tinh_vong_lech(Nhap_vao);

Nghiem01(k,1)= Nghiem0(1); Nghiem01(k,2)= Nghiem0(2); Nghiem01(k,3)= Nghiem0(3); U(k)= Nghiem0(1);

end % if h > 0


%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$44444444444444 444444

if Nhap_vao(2)==0 Nghiem0=Tinh_vong(Nhap_vao);

Nghiem01(k,1)= Nghiem0(1); Nghiem01(k,2)= Nghiem0(2); Nghiem01(k,3)= Nghiem0(3);

U(k)= Nghiem0(1); end

end % for k=1:N va Tinh xong Nghiem U ban dau

%============ Nhap cac gia tri cua ma tran he so tinh theo Newton- raphson

for k=1:N-1

A(k,k)= 1/(q(k)*S(k));

A(k,k+1)= - 1/(q(k+1)*S(k+1));

end

%++++++++++=================== j=0; KTr =1;

while KTr > saiso j=j+1;

for k=1:N-1


end

tgd = d(k)/(q(k)*S(k)^2) -d(k+1)/(q(k+1)*S(k+1)^2);

VP(k) = U(k+1)/(q(k+1)*S(k+1))- U(k)/(q(k)*S(k)) +tgd ;

% ================================

for k=1:N if d(k)==0

B(k)= -1; B1(k) =0;

end

if d(k)>0

B(k) = 2* d(k)/(U(k) *S(k)) -1 ;

B1(k) = -2* d(k)/(U(k)^2 *S(k)) ; end


end

% ================================

for k=1:N

tg1 = sqrt(1+U(k)^2) + log(U(k)+sqrt(1+U(k)^2))/U(k);

tg2= - B(k)*sqrt(1+(B(k)*U(k))^2) -

log(U(k)*B(k)+sqrt(1+(B(k)*U(k))^2))/U(k); V(k) = tg1+tg2;

tg3 = sqrt(1+U(k)^2)/U(k) - log(U(k)+sqrt(1+U(k)^2))/U(k)^2;

tg4 = -(B(k)+2*U(k)*B1(k))*sqrt(1+(B(k)*U(k))^2)/U(k)

+log(U(k)*B(k)+sqrt(1+(B(k)*U(k))^2))/U(k)^2; V1(k) = tg3 + tg4;

end

% ================================

tg1=0; tg2=0; for k=1:N

tg2 = 1/(S(k)*U(k)- d(k));

A(N,k) = 0.25*S(k)^2*( -d(k)* tg2^2*V(k) + U(k)*tg2*V1(k));

L1(k)=0.5*S(k)* V(k)/(1-B(k));

tg1=tg1+ L1(k); end

% ================================

VP(N)= Tong_L-tg1;

% ================================

Thu = det(A) G = inv(A);

DEl_U = G*VP';


% DEl_U = AVP'; U = U + DEl_U';

VP0= A*DEl_U;

tg3=0; tg4=0; for k=1:N tg3=tg3+VP0(k)^2; tg4 =tg4+ VP(k)^2; end

KTr = sqrt(tg3) end

%++++++++++========================= while KTr > saiso

for k=1:N

Li(k) = S(k)^2*U(k) /(S(k)*U(k) - d(k)); end

f= (Li.*U)/4;

f1=f-abs(d); for k=1:N

H(k)= 0.5* q(k)*Li(k)/U(k); end

for k=1:N-1



end

if d0(k) > 0

Gia_do(k,2)= H(k)*U(k)*abs(1-2*S(k)/Li(k)); Gia_do(k+1,1)= H(k)*U(k);

fw(k)= f(k)- d(k); end

if d0(k) == 0 Gia_do(k,2)= H(k)*U(k);

Gia_do(k+1,1)= H(k)*U(k); fw(k)= f(k);

end

if d0(k) < 0

Gia_do(k,2)= H(k)*U(k);

Gia_do(k+1,1)= H(k)*U(k)*abs(1-2*S(k)/Li(k)); fw(k)= f(k);

end

if d0(N) > 0

Gia_do(N,2)= H(N)*U(N)*abs(1-2*S(N)/Li(N)); Gia_do(1,1)= H(N)*U(N);

fw(N)= f(N)- d(N);

end

if d0(N) == 0 Gia_do(N,2)= H(N)*U(N);

Gia_do(1,1)= H(N)*U(N); fw(N)= f(N);

end

if d0(N) < 0

Gia_do(N,2)= H(N)*U(N);

Gia_do(1,1)= H(N)*U(N)*abs(1-2*S(N)/Li(N)); fw(N)= f(N);

end for k=1:N

Gia_do(k,3) = Gia_do(k,1) + Gia_do(k,2);

% T(k)=H(k)*sqrt(1+ q(k)^2*Li(k)^2/(4*H(k)^2));

T(k)= (0.5*q(k)*Li(k)/U(k))* sqrt(1+ U(k)^2);


R(k)= Gia_do(k,3); R1(k)= Gia_do(k,1);R2(k)= Gia_do(k,2); end

% Gia_do

% T

%+++++++================================

TongMasat =0; TongLuckeo=0; TaiTrong =0; for k=1: N

TongMasat = TongMasat+ R(k); % don vi N TongLuckeo = TongLuckeo + q(k)*fw(k); % don vi N

end

VanToc = 2; % 2 km/h

VanToc = VanToc*1000/3600; % m/s TongMasat = TongMasat * 0.01;

Congsuat = TongLuckeo* VanToc + TongMasat*VanToc; for i =1: 5

Ton_hao_cua(i) = H(1)*sqrt(2)*So_cua(i)*0.01*VanToc; Mang_conguat(i)= Ton_hao_cua(i)+Congsuat;

end

ghi =1; % Ghi cac thong so tinh duoc tren nhip cap vao EXCEL if ghi ==1

Tieu_de1 = {'f(cm)' ' H (N)' ' T(N)' 'R(N)' 'R1(N)' 'R2(N)'

'fw(cm)' 'So cua' 'Cong suat kéo(W=W(so_cua)='} for i=1:4

xlswrite(Ten_ghi, Tieu_de1(i), 1, [ 'B' num2str(15+i)]);

end

xlswrite(Ten_ghi, KTr, 1, ['A' num2str(16)]); xlswrite(Ten_ghi, { 'Do dai L (cm)'}, 1, [ 'B' num2str(15)]);

xlswrite(Ten_ghi, L1, 1, [ 'C' num2str(15)]); xlswrite(Ten_ghi, f1, 1, [ 'C' num2str(16)]); xlswrite(Ten_ghi, H, 1, [ 'C' num2str(17)]);

xlswrite(Ten_ghi, T, 1, [ 'C' num2str(18)]);

xlswrite(Ten_ghi, R, 1, [ 'C' num2str(19)]); for i=1:5

xlswrite(Ten_ghi, Tieu_de1(4+i), 1, [ 'B' num2str(20+i)]);

end

xlswrite(Ten_ghi, R1, 1, [ 'C' num2str(21)]); xlswrite(Ten_ghi, R2, 1, [ 'C' num2str(22)]); xlswrite(Ten_ghi, fw, 1, [ 'C' num2str(23)]); xlswrite(Ten_ghi, So_cua, 1, [ 'C' num2str(24)]);

xlswrite(Ten_ghi, Mang_conguat, 1, [ 'C' num2str(25)]); end % if ghi =1

end % if (Tong_L > Tong_S) & (Tong_S > 0)

%

$$$$$$$$$$$$$$$$&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&========================= if (~((Tong_L > Tong_S) & (Tong_S > 0)))

bay= ' Do dai L cua day Cap phai > ' ; son=num2str(Tong_S);

bay=[bay son]; disp(bay ); end

end % end K_lap

%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& Cac ham con &&&&&&&&&&&&&&&&&&&&&&&&&

function Nghiem = Tinh_vong(Nhap0) S0=Nhap0(1) ; h=Nhap0(2); L=Nhap0(3); q0=Nhap0(4); tgA= 2*L/S0;

a=sqrt(tgA^2-2*tgA) ; b=sqrt(tgA^2-1);


if L > S0

%===========

tgu0=hamU(a,b);

% Tinh luc H :

tgH = 0.5*q0*S0 /tgu0; Nghiem(1)=tgu0; Nghiem(2)=S0; Nghiem(3)= tgH;

% ==========

end end

%+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

++++++++

function Nghiem_Lech = Tinh_vong_lech(Nhap0)

Nhap01=Nhap0;

S0=Nhap01(1) ; h=Nhap01(2); L = Nhap01(3); q0=Nhap01(4);

u0=2*h/S0; u1= u0/2; u2 = sqrt(16*L^2 -S0^2)/S0; L0=0.5*S0*(sqrt(1+u0^2)+log(u0+sqrt(1+u0^2))/u0); LKT = sqrt(S0^2+h^2);


if L > LKT

%==========

if L < L0

a=u1; b=u0 ; end


if L > L0

a=u0; b=u2;

end


if L==L0

tgu0=u0; else

tgu0=hamU_lech(a,b);

end


% Tinh luc H :


tgLi = S0*tgu0 /(tgu0 - h/S0); tgH = 0.5*q0*tgLi /tgu0; Nghiem_Lech(1)=tgu0; Nghiem_Lech(2)=tgLi; Nghiem_Lech(3)= tgH;

% ============

end end

%+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

++++++++

function hamf =ham(x) tgf=(2*h/S0 - x)/x ;

tg0 = tgf*sqrt(1+(x*tgf)^2)-log(x*tgf+sqrt(1+(x*tgf)^2))/x;

hamf =0.5*S0*(sqrt(1+x^2)+log(x+sqrt(1+x^2))/x - tg0)-(1-tgf)*L; end

%+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

++++++++

function hamf1 =ham1(x)

hamf1 =sqrt(1+x^2)+log(x+sqrt(1+x^2))/x-2*L/S0;

end


%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

+++

function hamU1 = hamU_lech(a01,b01) a0=a01; b0=b01;

KT = abs(b0-a0); while KT > saiso c=(a0+b0)/2;

f1= ham(c); f2= ham(b0);

B01=f1*f2; if B01<0

a0 =c;

end

if B01 >=0

b0=c;


end

end

KT = abs(b0-a0);


hamU1=(a0+b0)/2; end


%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

+++

function U1 = hamU(a01,b01) a0=a01; b0=b01;

KT = abs(b0-a0); while KT > saiso c=(a0+b0)/2;

f1= ham1(c); f2= ham1(b0);

B01=f1*f2; if B01<0

a0 =c;

end

if B01 >=0

b0=c;


end

end

KT = abs(b0-a0);

U1=(a0+b0)/2;

end

%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

+++

end

2) Tính độ vòng của nhịp cáp hai trụ đỡ có độ cao chênh nhau

function tinh_do_vong_lech_tru_chuan clc;

Ten_ghi = ['SoLieu_EXCEL_MATLAB.xlsx'] L1=2500; q= 0.2;

Mangh=[10 20 40 50];

MangL=[2501 2501.4 2501.7];

KetQuaf=zeros(); KetQuaRyc=zeros();KetQuaRyt=zeros();KetQuaH=zeros();

KetQuaLi=zeros(); for j=2:5

KetQuaf(1,j)= Mangh(j-1); KetQuaRyc(1,j)= Mangh(j-1); KetQuaRyt(1,j)= Mangh(j-1); KetQuaH(1,j)= Mangh(j-1);

KetQuaLi(1,j)= Mangh(j-1);

end


for i=1:3

L = MangL(i);

KetQuaf(i+1,1)=L;

KetQuaRyc(i+1,1)=L;KetQuaRyt(i+1,1)=L;KetQuaH(i+1,1)=L; KetQuaLi(i+1,1)=L;


for j=1:4

h=Mangh(j);

%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$


% h=100; L = 2520;

if h>0


% n1=20 ; n2 = 50 ; N= n1+n2;


saiso = 10^(-6);


u0=2*h/L1; u1= u0/2; u2 = sqrt(16*L^2 -L1^2)/L1; L0=0.5*L1*(sqrt(1+u0^2)+log(u0+sqrt(1+u0^2))/u0); LKT = sqrt(L1^2+h^2);

if L > LKT

%========================================


if L < L0

a=u1; b=u0 ; end


if L > L0

a=u0; b=u2;

end


if L==L0

u=u0; else

u=hamU_lech(a,b);

..... Xem trang tiếp theo?
⇦ Trang trước - Trang tiếp theo ⇨

Ngày đăng: 21/07/2022