Code covered by the BSD License  

Highlights from
Rotor Dynamics toolbox (RotFE)

image thumbnail

Rotor Dynamics toolbox (RotFE)

by

 

Toolbox models rotating, elastic shafts with disks

K=stiff_conical(r,ri,
function K=stiff_conical(r,ri,
%

 K=zeros(8);
 
c =1 /( 80640/pi*L^3/E);
%sym2m(simple(expand(K*80640/pi*L^3/E)),'K');
      t1 = dob*dob;
      t2 = phi*t1;
      t3 = dia*dib;
      t4 = t2*t3;
      t5 = 105.0*t4;
      t6 = doa*dob;
      t7 = t6*t3;
      t9 = phi*doa;
      t10 = dia*dia;
      t12 = t9*dob*t10;
      t13 = 210.0*t12;
      t14 = doa*doa;
      t15 = phi*t14;
      t16 = t15*t3;
      t17 = 210.0*t16;
      t18 = dib*dib;
      t20 = t9*dob*t18;
      t21 = 105.0*t20;
      t22 = t14*doa;
      t24 = phi*t22*dob;
      t25 = 420.0*t24;
      t26 = t14*t1;
      t28 = t1*t1;
      t30 = t14*t14;
      t31 = 210.0*t30;
      t32 = t22*dob;
      t34 = phi*t30;
      t35 = 210.0*t34;
      t36 = t1*t10;
      t38 = t1*dob;
      t39 = doa*t38;
      t41 = t14*t18;
      t43 = t5+336.0*t7+t13+t17+t21-t25-504.0*t26-66.0*t28-t31-420.0*t32-t35+84.0*t36-294.0*t39+84.0*t41;
      t44 = phi*t28;
      t45 = 42.0*t44;
      t46 = t1*t18;
      t48 = t6*t18;
      t50 = t1*dia;
      t51 = t50*dib;
      t53 = t15*t18;
      t54 = 70.0*t53;
      t55 = t9*t38;
      t56 = 210.0*t55;
      t57 = t15*t1;
      t58 = 420.0*t57;
      t59 = t14*dia;
      t60 = t59*dib;
      t62 = t2*t10;
      t63 = 70.0*t62;
      t64 = t6*t10;
      t66 = t2*t18;
      t67 = 42.0*t66;
      t68 = t15*t10;
      t69 = 210.0*t68;
      t72 = t9*dob*dia*dib;
      t73 = 280.0*t72;
      t74 = t14*t10;
      t75 = 210.0*t74;
      t76 = -t45+66.0*t46+147.0*t48+147.0*t51+t54-t56-t58+210.0*t60+t63+210.0*t64+t67+t69+t73+t75;
      t79 = power(1.0+phi,2.0);
      t80 = 1/t79;
      t82 = 72.0*(t43+t76)*t80;
      t95 = 42.0*t4+196.0*t7+140.0*t12+140.0*t16+42.0*t20-280.0*t24-294.0*t26-38.0*t28-t31-280.0*t32-t35+49.0*t36-168.0*t39+49.0*t41;
      t108 = -14.0*t44+38.0*t46+84.0*t48+84.0*t51+35.0*t53-84.0*t55-210.0*t57+140.0*t60+35.0*t62+140.0*t64+14.0*t66+t69+140.0*t72+t75;
      t112 = 36.0*L*(t95+t108)*t80;
      t125 = 168.0*t4+476.0*t7+280.0*t12+280.0*t16+168.0*t20-560.0*t24-714.0*t26-94.0*t28-t31-560.0*t32-t35+119.0*t36-420.0*t39+119.0*t41;
      t138 = -70.0*t44+94.0*t46+210.0*t48+210.0*t51+105.0*t53-336.0*t55-630.0*t57+280.0*t60+105.0*t62+280.0*t64+70.0*t66+t69+420.0*t72+t75;
      t142 = 36.0*L*(t125+t138)*t80;
      t143 = diff(Omega(t),t);
      t144 = rho*t143;
      t145 = L*L;
      t147 = 5.0*t28;
      t160 = 5.0*t46;
      t161 = -t147+42.0*t74-72.0*t26+12.0*t36+12.0*t41-42.0*t30+42.0*t60+42.0*t64+15.0*t51-84.0*t32+15.0*t48+48.0*t7-30.0*t39+t160;
      t163 = 1/E;
      t166 = 36.0*t144*t145*t161*t80*t163;
      t168 = t144*t145*L;
      t176 = 14.0*t30;
      t177 = 56.0*t32;
      t178 = 70.0*t34;
      t182 = 16.0*t4-40.0*t7+56.0*t12+56.0*t16+16.0*t20-112.0*t24+60.0*t26+t147+t176+t177-t178-10.0*t36+28.0*t39-10.0*t41;
      t186 = 14.0*t53;
      t188 = 84.0*t57;
      t189 = 28.0*t60;
      t190 = 14.0*t62;
      t191 = 28.0*t64;
      t193 = 70.0*t68;
      t194 = 56.0*t72;
      t195 = 14.0*t74;
      t196 = -5.0*t44-t160-14.0*t48-14.0*t51+t186-32.0*t55-t188-t189+t190-t191+5.0*t66+t193+t194-t195;
      t201 = 9.0*t168*(t182+t196)*t80*t163;
      t211 = 40.0*t4+16.0*t7+84.0*t12+84.0*t16+40.0*t20-168.0*t24-24.0*t26-t147+t176-t178+4.0*t36-20.0*t39;
      t222 = 4.0*t41-15.0*t44+t160+10.0*t48+10.0*t51+28.0*t53-80.0*t55-168.0*t57+28.0*t62+15.0*t66+t193+112.0*t72-t195;
      t227 = 9.0*t168*(t211+t222)*t80*t163;
      t236 = 840.0*t30;
      t237 = 840.0*t32;
      t239 = 1050.0*t34;
      t249 = -t239+112.0*t36-336.0*t39+112.0*t41-t45+72.0*t46+168.0*t48+168.0*t51+140.0*t53-294.0*t55-840.0*t57;
      t251 = 420.0*t60;
      t253 = 420.0*t64;
      t254 = 1050.0*t68;
      t256 = 840.0*t74;
      t257 = phi*phi;
      t258 = t30*t257;
      t259 = 210.0*t258;
      t260 = t28*t257;
      t261 = 42.0*t260;
      t262 = dib*t257;
      t263 = t59*t262;
      t264 = 210.0*t263;
      t267 = t6*t18*t257;
      t270 = t6*t10*t257;
      t271 = 210.0*t270;
      t272 = t50*t262;
      t275 = t6*t3*t257;
      t277 = t39*t257;
      t279 = t46*t257;
      t281 = t32*t257;
      t282 = 420.0*t281;
      t283 = t74*t257;
      t285 = t36*t257;
      t287 = t41*t257;
      t289 = t26*t257;
      t291 = 105.0*t267+t271+105.0*t272+280.0*t275-210.0*t277+42.0*t279-t282+210.0*t283+70.0*t285+70.0*t287-420.0*t289;
      t296 = 6.0*t145*(147.0*t4+448.0*t7+630.0*t12+630.0*t16+147.0*t20-1260.0*t24-672.0*t26-72.0*t28-t236-t237+t249+t251+140.0*t62+t253+t67+t254+560.0*t72+t256-t259-t261+t264+t291)*t80;
      t308 = t35-182.0*t36+672.0*t39-182.0*t41+t45-156.0*t46-336.0*t48-336.0*t51-t54+t56+t58;
      t316 = 6.0*t145*(-t5-728.0*t7-t13-t17-t21+t25+1092.0*t26+156.0*t28+420.0*t30+t237+t308-t251-t63-t253-t67-t69-t73-420.0*t74-t259-t261+t264+t291)*t80;
      t317 = t145*t145;
      t319 = t317*rho*t143;
      t328 = 56.0*t30;
      t331 = 22.0*t39;
      t335 = 11.0*t48;
      t336 = 11.0*t51;
      t338 = -t178+8.0*t36-t331+8.0*t41+7.0*t44+4.0*t46+t335+t336-t186+40.0*t55+t188;
      t341 = 56.0*t74;
      t342 = 140.0*t258;
      t344 = 70.0*t263;
      t347 = 70.0*t270;
      t352 = 140.0*t281;
      t353 = 140.0*t283;
      t357 = 14.0*t267+t347+14.0*t272+56.0*t275-28.0*t277+4.0*t279-t352+t353+14.0*t285+14.0*t287-84.0*t289;
      t363 = 3.0*t319*(-20.0*t4+32.0*t7-28.0*t12-28.0*t16-20.0*t20+56.0*t24-48.0*t26-4.0*t28-t328-t177+t338+t189-t190+t191-7.0*t66+t193-t194+t341-t342-4.0*t260+t344+t357)*t80*t163;
      t379 = t178-6.0*t36+t331-6.0*t41+10.0*t44-t160-t335-t336-21.0*t53+56.0*t55+126.0*t57;
      t398 = 28.0*t267+t347+28.0*t272+84.0*t275-56.0*t277+10.0*t279-t352+70.0*t283+21.0*t285+21.0*t287-126.0*t289;
      t404 = 3.0*t319*(-28.0*t4-24.0*t7-70.0*t12-70.0*t16-28.0*t20+140.0*t24+36.0*t26+t147+t176+28.0*t32+t379-14.0*t60-21.0*t62-14.0*t64-10.0*t66-t193-84.0*t72-t195-70.0*t258-10.0*t260+t344+t398)*t80*t163;
      t425 = -t239+532.0*t36-1848.0*t39+532.0*t41-378.0*t44+408.0*t46+924.0*t48+924.0*t51+560.0*t53-1806.0*t55-3360.0*t57;
      t437 = 6.0*t145*(903.0*t4+2128.0*t7+1470.0*t12+1470.0*t16+903.0*t20-2940.0*t24-3192.0*t26-408.0*t28-t236-2520.0*t32+t425+1260.0*t60+560.0*t62+1260.0*t64+378.0*t66+t254+2240.0*t72+t256-t259-t261+t264+t291)*t80;
      t458 = -t178+36.0*t36-130.0*t39+36.0*t41-75.0*t44+30.0*t46+65.0*t48+65.0*t51+84.0*t53-320.0*t55-504.0*t57;
      t475 = 140.0*t267+t271+140.0*t272+336.0*t275-280.0*t277+60.0*t279-t282+t353+84.0*t285+84.0*t287-504.0*t289;
      t481 = 3.0*t319*(160.0*t4+144.0*t7+168.0*t12+168.0*t16+160.0*t20-336.0*t24-216.0*t26-30.0*t28-t328-168.0*t32+t458+84.0*t60+84.0*t62+84.0*t64+75.0*t66+t193+336.0*t72+t341-t342-60.0*t260+t264+t475)*t80*t163;
      K(1,1) = -t82;
      K(1,2) = -t112;
      K(1,3) = t82;
      K(1,4) = -t142;
      K(1,5) = -t166;
      K(1,6) = t201;
      K(1,7) = t166;
      K(1,8) = t227;
      K(2,1) = -t112;
      K(2,2) = -t296;
      K(2,3) = t112;
      K(2,4) = t316;
      K(2,5) = t201;
      K(2,6) = -t363;
      K(2,7) = -t201;
      K(2,8) = -t404;
      K(3,1) = t82;
      K(3,2) = t112;
      K(3,3) = -t82;
      K(3,4) = t142;
      K(3,5) = t166;
      K(3,6) = -t201;
      K(3,7) = -t166;
      K(3,8) = -t227;
      K(4,1) = -t142;
      K(4,2) = t316;
      K(4,3) = t142;
      K(4,4) = -t437;
      K(4,5) = t227;
      K(4,6) = -t404;
      K(4,7) = -t227;
      K(4,8) = -t481;
      K(5,1) = t166;
      K(5,2) = -t201;
      K(5,3) = -t166;
      K(5,4) = -t227;
      K(5,5) = -t82;
      K(5,6) = -t112;
      K(5,7) = t82;
      K(5,8) = -t142;
      K(6,1) = -t201;
      K(6,2) = t363;
      K(6,3) = t201;
      K(6,4) = t404;
      K(6,5) = -t112;
      K(6,6) = -t296;
      K(6,7) = t112;
      K(6,8) = t316;
      K(7,1) = -t166;
      K(7,2) = t201;
      K(7,3) = t166;
      K(7,4) = t227;
      K(7,5) = t82;
      K(7,6) = t112;
      K(7,7) = -t82;
      K(7,8) = t142;
      K(8,1) = -t227;
      K(8,2) = t404;
      K(8,3) = t227;
      K(8,4) = t481;
      K(8,5) = -t142;
      K(8,6) = t316;
      K(8,7) = t142;
      K(8,8) = -t437;
diary off
diary on
sym2m(simple(expand(K*80640/pi*L^3/E)),'K');
      t1 = dob*dob;
      t2 = t1*dia;
      t3 = dib*phi;
      t4 = t2*t3;
      t5 = 105.0*t4;
      t6 = doa*doa;
      t7 = t6*dia;
      t8 = t7*t3;
      t9 = 210.0*t8;
      t10 = doa*dob;
      t11 = dia*dia;
      t13 = t10*t11*phi;
      t14 = 210.0*t13;
      t15 = dib*dib;
      t17 = t10*t15*phi;
      t18 = 105.0*t17;
      t19 = dia*dib;
      t20 = t10*t19;
      t23 = t10*t19*phi;
      t24 = 280.0*t23;
      t25 = t6*t6;
      t26 = 210.0*t25;
      t27 = t1*t1;
      t29 = t6*t11;
      t30 = 210.0*t29;
      t31 = t25*phi;
      t32 = 210.0*t31;
      t33 = t6*t15;
      t35 = t6*t1;
      t37 = t1*t15;
      t40 = doa*t1*dob;
      t42 = t5+t9+t14+t18+336.0*t20+t24-t26-66.0*t27+t30-t32+84.0*t33-504.0*t35+66.0*t37-294.0*t40;
      t43 = t1*t11;
      t46 = t6*doa*dob;
      t48 = t27*phi;
      t49 = 42.0*t48;
      t50 = t29*phi;
      t51 = 210.0*t50;
      t52 = t33*phi;
      t53 = 70.0*t52;
      t54 = t37*phi;
      t55 = 42.0*t54;
      t56 = t40*phi;
      t57 = 210.0*t56;
      t58 = t10*t15;
      t60 = t35*phi;
      t61 = 420.0*t60;
      t62 = t2*dib;
      t64 = t46*phi;
      t65 = 420.0*t64;
      t66 = t43*phi;
      t67 = 70.0*t66;
      t68 = t7*dib;
      t70 = t10*t11;
      t72 = 84.0*t43-420.0*t46-t49+t51+t53+t55-t57+147.0*t58-t61+147.0*t62-t65+t67+210.0*t68+210.0*t70;
      t75 = power(1.0+phi,2.0);
      t76 = 1/t75;
      t78 = 72.0*(t42+t72)*t76;
      t90 = 42.0*t4+140.0*t8+140.0*t13+42.0*t17+196.0*t20+140.0*t23-t26-38.0*t27+t30-t32+49.0*t33-294.0*t35+38.0*t37-168.0*t40;
      t104 = 49.0*t43-280.0*t46-14.0*t48+t51+35.0*t52+14.0*t54-84.0*t56+84.0*t58-210.0*t60+84.0*t62-280.0*t64+35.0*t66+140.0*t68+140.0*t70;
      t108 = 36.0*L*(t90+t104)*t76;
      t120 = 168.0*t4+280.0*t8+280.0*t13+168.0*t17+476.0*t20+420.0*t23-t26-94.0*t27+t30-t32+119.0*t33-714.0*t35+94.0*t37-420.0*t40;
      t134 = 119.0*t43-560.0*t46-70.0*t48+t51+105.0*t52+70.0*t54-336.0*t56+210.0*t58-630.0*t60+210.0*t62-560.0*t64+105.0*t66+280.0*t68+280.0*t70;
      t138 = 36.0*L*(t120+t134)*t76;
      t139 = diff(Omega(t),t);
      t140 = rho*t139;
      t141 = L*L;
      t143 = 5.0*t27;
      t156 = 5.0*t37;
      t157 = -t143+42.0*t29-72.0*t35+12.0*t43+12.0*t33-42.0*t25+42.0*t68+42.0*t70+15.0*t62-84.0*t46+15.0*t58+48.0*t20-30.0*t40+t156;
      t159 = 1/E;
      t162 = 36.0*t140*t141*t157*t76*t159;
      t164 = t140*t141*L;
      t170 = 56.0*t23;
      t171 = 14.0*t25;
      t172 = 14.0*t29;
      t173 = 70.0*t31;
      t177 = 16.0*t4+56.0*t8+56.0*t13+16.0*t17-40.0*t20+t170+t171+t143-t172-t173-10.0*t33+60.0*t35-t156+28.0*t40;
      t179 = 56.0*t46;
      t181 = 70.0*t50;
      t182 = 14.0*t52;
      t186 = 84.0*t60;
      t189 = 14.0*t66;
      t190 = 28.0*t68;
      t191 = 28.0*t70;
      t192 = -10.0*t43+t179-5.0*t48+t181+t182+5.0*t54-32.0*t56-14.0*t58-t186-14.0*t62-112.0*t64+t189-t190-t191;
      t197 = 9.0*t164*(t177+t192)*t76*t159;
      t206 = 40.0*t4+84.0*t8+84.0*t13+40.0*t17+16.0*t20+112.0*t23+t171-t143-t172-t173+4.0*t33-24.0*t35;
      t218 = t156-20.0*t40+4.0*t43-15.0*t48+t181+28.0*t52+15.0*t54-80.0*t56+10.0*t58-168.0*t60+10.0*t62-168.0*t64+28.0*t66;
      t223 = 9.0*t164*(t206+t218)*t76*t159;
      t230 = 840.0*t25;
      t232 = 840.0*t29;
      t233 = 1050.0*t31;
      t240 = 840.0*t46;
      t241 = 1050.0*t50;
      t244 = 112.0*t33-672.0*t35+72.0*t37-336.0*t40+112.0*t43-t240-t49+t241+140.0*t52+t55-294.0*t56;
      t251 = 420.0*t68;
      t252 = 420.0*t70;
      t253 = phi*phi;
      t254 = t46*t253;
      t255 = 420.0*t254;
      t256 = dib*t253;
      t257 = t7*t256;
      t258 = 210.0*t257;
      t260 = t10*t15*t253;
      t261 = 105.0*t260;
      t264 = t10*t11*t253;
      t265 = 210.0*t264;
      t266 = t2*t256;
      t268 = t25*t253;
      t270 = t40*t253;
      t272 = t33*t253;
      t274 = t37*t253;
      t276 = t43*t253;
      t278 = t29*t253;
      t280 = t35*t253;
      t282 = t27*t253;
      t285 = t10*t19*t253;
      t287 = t265+105.0*t266-210.0*t268-210.0*t270+70.0*t272+42.0*t274+70.0*t276+210.0*t278-420.0*t280-42.0*t282+280.0*t285;
      t292 = 6.0*t141*(147.0*t4+630.0*t8+630.0*t13+147.0*t17+448.0*t20+560.0*t23-t230-72.0*t27+t232-t233+t244+168.0*t58-840.0*t60+168.0*t62-1260.0*t64+140.0*t66+t251+t252-t255+t258+t261+t287)*t76;
      t303 = -182.0*t33+1092.0*t35-156.0*t37+672.0*t40-182.0*t43+t240+t49-t51-t53-t55+t57;
      t312 = 6.0*t141*(-t5-t9-t14-t18-728.0*t20-t24+420.0*t25+156.0*t27-420.0*t29+t32+t303-336.0*t58+t61-336.0*t62+t65-t67-t251-t252-t255+t258+t261+t287)*t76;
      t313 = t141*t141;
      t315 = t313*rho*t139;
      t321 = 56.0*t25;
      t323 = 56.0*t29;
      t328 = 22.0*t40;
      t333 = 8.0*t33-48.0*t35+4.0*t37-t328+8.0*t43-t179+7.0*t48+t181-t182-7.0*t54+40.0*t56;
      t335 = 11.0*t58;
      t336 = 11.0*t62;
      t338 = 140.0*t254;
      t339 = 70.0*t257;
      t342 = 70.0*t264;
      t344 = 140.0*t268;
      t349 = 140.0*t278;
      t353 = t342+14.0*t266-t344-28.0*t270+14.0*t272+4.0*t274+14.0*t276+t349-84.0*t280-4.0*t282+56.0*t285;
      t359 = 3.0*t315*(-20.0*t4-28.0*t8-28.0*t13-20.0*t17+32.0*t20-t170-t321-4.0*t27+t323-t173+t333+t335+t186+t336+56.0*t64-t189+t190+t191-t338+t339+14.0*t260+t353)*t76*t159;
      t375 = -6.0*t33+36.0*t35-t156+t328-6.0*t43+28.0*t46+10.0*t48-t181-21.0*t52-10.0*t54+56.0*t56;
      t394 = t342+28.0*t266-70.0*t268-56.0*t270+21.0*t272+10.0*t274+21.0*t276+70.0*t278-126.0*t280-10.0*t282+84.0*t285;
      t400 = 3.0*t315*(-28.0*t4-70.0*t8-70.0*t13-28.0*t17-24.0*t20-84.0*t23+t171+t143-t172+t173+t375-t335+126.0*t60-t336+140.0*t64-21.0*t66-14.0*t68-14.0*t70-t338+t339+28.0*t260+t394)*t76*t159;
      t419 = 532.0*t33-3192.0*t35+408.0*t37-1848.0*t40+532.0*t43-2520.0*t46-378.0*t48+t241+560.0*t52+378.0*t54-1806.0*t56;
      t433 = 6.0*t141*(903.0*t4+1470.0*t8+1470.0*t13+903.0*t17+2128.0*t20+2240.0*t23-t230-408.0*t27+t232-t233+t419+924.0*t58-3360.0*t60+924.0*t62-2940.0*t64+560.0*t66+1260.0*t68+1260.0*t70-t255+t258+t261+t287)*t76;
      t452 = 36.0*t33-216.0*t35+30.0*t37-130.0*t40+36.0*t43-168.0*t46-75.0*t48+t181+84.0*t52+75.0*t54-320.0*t56;
      t471 = t265+140.0*t266-t344-280.0*t270+84.0*t272+60.0*t274+84.0*t276+t349-504.0*t280-60.0*t282+336.0*t285;
      t477 = 3.0*t315*(160.0*t4+168.0*t8+168.0*t13+160.0*t17+144.0*t20+336.0*t23-t321-30.0*t27+t323-t173+t452+65.0*t58-504.0*t60+65.0*t62-336.0*t64+84.0*t66+84.0*t68+84.0*t70-t255+t258+140.0*t260+t471)*t76*t159;
      K(1,1) = -t78;
      K(1,2) = -t108;
      K(1,3) = t78;
      K(1,4) = -t138;
      K(1,5) = -t162;
      K(1,6) = t197;
      K(1,7) = t162;
      K(1,8) = t223;
      K(2,1) = -t108;
      K(2,2) = -t292;
      K(2,3) = t108;
      K(2,4) = t312;
      K(2,5) = t197;
      K(2,6) = -t359;
      K(2,7) = -t197;
      K(2,8) = -t400;
      K(3,1) = t78;
      K(3,2) = t108;
      K(3,3) = -t78;
      K(3,4) = t138;
      K(3,5) = t162;
      K(3,6) = -t197;
      K(3,7) = -t162;
      K(3,8) = -t223;
      K(4,1) = -t138;
      K(4,2) = t312;
      K(4,3) = t138;
      K(4,4) = -t433;
      K(4,5) = t223;
      K(4,6) = -t400;
      K(4,7) = -t223;
      K(4,8) = -t477;
      K(5,1) = t162;
      K(5,2) = -t197;
      K(5,3) = -t162;
      K(5,4) = -t223;
      K(5,5) = -t78;
      K(5,6) = -t108;
      K(5,7) = t78;
      K(5,8) = -t138;
      K(6,1) = -t197;
      K(6,2) = t359;
      K(6,3) = t197;
      K(6,4) = t400;
      K(6,5) = -t108;
      K(6,6) = -t292;
      K(6,7) = t108;
      K(6,8) = t312;
      K(7,1) = -t162;
      K(7,2) = t197;
      K(7,3) = t162;
      K(7,4) = t223;
      K(7,5) = t78;
      K(7,6) = t108;
      K(7,7) = -t78;
      K(7,8) = t138;
      K(8,1) = -t223;
      K(8,2) = t400;
      K(8,3) = t223;
      K(8,4) = t477;
      K(8,5) = -t138;
      K(8,6) = t312;
      K(8,7) = t138;
      K(8,8) = -t433;
      
      K=K*c;

Contact us