www.pudn.com > SHIPCONTROL.rar > bolangliceshimoxing.m, change:2011-01-06,size:3626b


close all; 
clear all; 
 
m=55000*10^3; 
L=280; 
D=9.45; 
B=35.5; 
midu=1000; 
CB=0.597; 
ZG=14; 
H=2.9; 
T=0.058*D; 
Dp=4.3; 
np=3; 
tp=0.08; 
b1=6.5; 
b2=4.6; 
P=3.7; 
hR=7.2; 
epxlong=0.92; 
hs=6.9; 
delta=pi/6; 
nw=20; 
deltaomiga=0.1; 
h13=3; 
Zb=9; 
boxiangjiao=pi/20; 
V=9.2; 
ts=1000; 
 
%波浪主扰动力 
deltaomiga=0.1; 
kafang=pi/8; 
Ab=L*cos(kafang)/(2*9.8); 
Bb=B*sin(kafang)/(2*9.8); 
Cbb=4*midu*9.8^3/cos(kafang); 
Cbc=4*midu*9.8^3/sin(kafang); 
Db=V*cos(kafang)/9.8; 
omiga=zeros(1,nw); 
E=zeros(1,nw); 
zsx=zeros(1,nw); 
Skexi=zeros(1,nw); 
bochangbi=zeros(1,nw); 
Cxwd=zeros(1,nw); 
Cywd=zeros(1,nw); 
Cnwd=zeros(1,nw); 
Xw1=0; 
Yw1=0; 
Kw1=0; 
Nw1=0; 
Xw=zeros(1,ts); 
Yw=zeros(1,ts); 
Kw=zeros(1,ts); 
Nw=zeros(1,ts); 
 
Xd=0; 
Yd=0; 
Nd=0; 
 
for t=1:ts 
      
    for i=1:nw 
    omiga(i)=deltaomiga*i; 
    Skexi(i)=(8.1*10^(-3)*9.8^2/omiga(i)^5)*exp(-3.11/(h13^2*omiga(i)^4));    
    E(i)=sqrt(2*Skexi(i)*deltaomiga); 
    zsx(i)=1-exp(-omiga(i)^2*D/9.8); 
    Xw1=Xw1-(Cbc/omiga(i)^4)*E(i)*zsx(i)*sin(omiga(i)^2*Ab)*sin(omiga(i)^2*Bb)*sin((omiga(i)-omiga(i)^2*Db)*t-2*pi*0.5); 
   
    Yw1=Yw1+(Cbb/omiga(i)^4)*E(i)*zsx(i)*sin(omiga(i)^2*Ab)*sin(omiga(i)^2*Bb)*sin((omiga(i)-omiga(i)^2*Db)*t-2*pi*rand);    
    Kw1=Kw1-(Cbb/(omiga(i)^4))*E(i)*zsx(i)*sin((omiga(i)^2)*Ab)*sin((omiga(i)^2)*Bb)*sin((omiga(i)-(omiga(i)^2)*Db)*t-2*3.14159*rand)*Zb+... 
       (Cbb/(2*9.8*(omiga(i)^2)))*E(i)*zsx(i)*sin((omiga(i)^2)*Ab)*sin((omiga(i)-(omiga(i)^2)*Db)*t-2*3.14159*rand)*... 
       ((2*(9.8^2)*sin((omiga(i)^2)*Bb))/((omiga(i)^4)*(sin(kafang)^2))-(B*9.8*cos((omiga(i)^2)*Bb))/((omiga(i)^2)*sin(kafang))); 
    Nw1=Nw1-((sin(kafang)*Cbc)/(2*9.8*(omiga(i)^2)))*E(i)*zsx(i)*sin((omiga(i)^2)*Bb)*cos((omiga(i)-(omiga(i)^2)*Db)*t-2*3.14159*rand)*... 
      ((2*(9.8^2)*sin((omiga(i)^2)*Ab))/((omiga(i)^4)*(cos(kafang)^2))-(L*9.8*cos((omiga(i)^2)*Bb))/((omiga(i)^2)*cos(kafang))); 
   
  %波浪漂移力 
   bochangbi(i)=(2*pi*9.8)/(omiga(i)^2*L); 
   Cxwd(i)=0.05-0.2*bochangbi(i)+0.75*bochangbi(i)^2-0.51*bochangbi(i)^3; 
   Cywd(i)=0.46+6.83*bochangbi(i)-15.65*bochangbi(i)^2+8.44*bochangbi(i)^3; 
   Cnwd(i)=-0.11+0.68*bochangbi(i)-0.79*bochangbi(i)^2+0.21*bochangbi(i)^3; 
   
  Xd=Xd+midu*9.8*L*cos(kafang)*Cxwd(i)*Skexi(i)*deltaomiga; 
  Yd=Yd+midu*9.8*L*sin(kafang)*Cywd(i)*Skexi(i)*deltaomiga; 
  Nd=Nd+midu*9.8*L^2*sin(kafang)*Cnwd(i)*Skexi(i)*deltaomiga; 
 
   
   
end 
 
   Xw1   
       
       
      Xw(t)=Xw1; 
      Yw(t)=Yw1; 
      Kw(t)=Kw1; 
      Nw(t)=Nw1;  
       
      Xw1=0; 
      Yw1=0; 
      Kw1=0; 
      Nw1=0; 
       
      Xd=0; 
      Yd=0; 
      Nd=0; 
       
       
end 
 
 
 
plot(Xw),axis([1,1.8*ts,1.1*min(Xw),1.1*max(Xw)]); 
figure 
plot(Yw),axis([1,1.8*ts,1.1*min(Yw),1.1*max(Yw)]); 
figure 
plot(Kw),axis([1,1.8*ts,1.1*min(Kw),1.1*max(Kw)]); 
figure 
plot(Nw),axis([1,1.8*ts,1.1*min(Nw),1.1*max(Nw)]); 
figure 
plot(Xw+Xd),axis([1,1.8*ts,1.1*min(Xw),1.1*max(Xw)]); 
figure 
plot(Yw+Yd),axis([1,1.8*ts,1.1*min(Yw),1.1*max(Yw)]); 
figure 
plot(Kw),axis([1,1.8*ts,1.1*min(Kw),1.1*max(Kw)]); 
figure 
plot(Nw+Nd),axis([1,1.8*ts,1.1*min(Nw),1.1*max(Nw)]); 
%   
%   %波浪漂移力 
%    bochangbi(i)=(2*pi*9.8)/(omiga(i)^2*L); 
%    Cxwd(i)=0.05-0.2*bochangbi(i)+0.75*bochangbi(i)^2-0.51*bochangbi(i)^3; 
%    Cywd(i)=0.46+6.83*bochangbi(i)-15.65*bochangbi(i)^2+8.44*bochangbi(i)^3; 
%    Cnwd(i)=-0.11+0.68*bochangbi(i)-0.79*bochangbi(i)^2+0.21*bochangbi(i)^3; 
%    
%   Xd=Xd+midu*9.8*L*cos(kafang)*Cxwd(i)*Skexi(i)*deltaomiga; 
%   Yd=Yd+midu*9.8*L*sin(kafang)*Cywd(i)*Skexi(i)*deltaomiga; 
%   Nd=Nd+midu*9.8*L^2*sin(kafang)*Cnwd(i)*Skexi(i)*deltaomiga; 
%  
%