www.pudn.com > ship.zip > duo.m, change:2016-08-31,size:1298b


function F=duo(X) 
global L B  Cb rou V n Dp Cpp H wp wr P AR gs A K s; 
 
%% 需要输入的变量量:u,v,r,δ 
u=X(1); 
v=X(2); 
xr=-0.45*L; 
xrn=-0.45;%舵的无因次坐标 
r=X(3)*pi/180; 
rn=r*L/V;%无因次r 
beta=-atan(v/u);%漂角 
delta=X(4)*pi/180;%转化为弧度 
 
%% 舵的有效来流速度和有效舵角 
%系数kr 
kr(1)=(-4.1+4*Cb+0.9*L/B)*10^(-3); 
kr(2)=(2.8+12*Cb-0.7*L/B)*10^(-3); 
%整流系数 
ZL(1)=0.7+0.36*(beta-xrn*rn)*10^(-3); 
ZL(2)=0.5; 
 
wr0=1-1.225+0.3*Cb; 
for i=1:2 
    wr(i)=wr0-kr(i)*(V-xrn*rn); 
    A=Dp/H; 
    K(i)=0.6*(1-wp(i))/(1-wr(i)); 
    s(i)=0.2; 
    %s(i)=1-u*(1-wp(i))/(n*P); 
    gs(i)=A*K(i)*(2-(2-K(i))*s(i))*s(i)/(1-s(i))^2; 
    VR(i)=V*(1-wr(i))*(1+gs(i))^0.5; 
    alphaR(i)=delta-ZL(i)*(beta-2*xrn*rn)/(1-wr(i)); 
end 
 
%% 船后舵修正系数和舵法向力系数 
tR=1-(0.7382-0.0539*Cb+0.1755*Cb^2); 
for i=1:2 
   CN(i)=1.743*alphaR(i)+7.201*abs(alphaR(i))*alphaR(i)-11.77*alphaR(i)^3; 
   FN(i)=0.5*rou*AR*VR(i)^2*CN(i); 
end 
 
%% 舵力和力矩 
aH=0.05; 
if delta>=0 
    a=1; 
else 
    a=-1; 
end 
XR=-(1-tR)*(FN(1)+FN(2))*sin(delta); 
YR=-(1+aH)*(FN(1)+FN(2))*cos(delta); 
NR=-(1+aH)*xr*(FN(1)+FN(2))*cos(delta)-(1-tR)*Cpp*a*(FN(1)-FN(2))*sin(delta); 
F=[XR YR NR]; 
%XRn=XR/(0.5*rou*V^2*L^2); 
%YRn=YR/(0.5*rou*V^2*L^2); 
%NRn=NR/(0.5*rou*V^2*L^3); 
%F=[XRn YRn NRn];