# ode 45, big matrices, I can not get result because of

2 views (last 30 days)
Gloria on 7 Sep 2020
Commented: Rik on 23 Sep 2020
function deneme
S=0.02;
rpm=111; %rpm
w(1)=rpm*2*pi/60;
AA=0.4;
P=0.8;
Z=4;
DD=6.15;
p=1025;
n=1.85;
AR=0.22087*Z/AA;
c211=0.13925-0.48179*AA-0.14175*P+0.27711*AA^2-0.0094311*P^2+0.17407*AA*P;
LSC=0.80988-0.63077*AR^-2+1.3909*P*AR^-1+7.5424*AR^-3-15.689*P*AR^-3-8.0097*AR^-4+17.665*P*AR^-4;
c21=p*n*DD^4*c211*LSC;
m211=0.0012195+0.017664*AA-0.0085938*P-0.023615*AA^2+0.0094301*P^2-0.026146*AA*P;
LSCC=0.65348+0.28788*P+0.39805*AR^-1-0.42582*AR^-2-0.61189*P*AR^-1+0.33373*P*AR^-2;
m21=p*DD^4*m211*LSCC;
J(1)=5000; J(2)=2479; J(3)=7040; J(4)=7519; J(5)=7040; J(6)=7040; J(7)=7519; J(8)=4257; J(9)=4893; J(10)=124; J(11)=47; J(12)=58; J(13)=93; J(14)=35026;
kt(1)=0.17112e10 ;kt(2)=1/6.63e-10; kt(3)=1/8.30e-10; kt(4)=1/8.30e-10; kt(5)=1/8.38e-10; kt(6)=1/8.30e-10; kt(7)=1/6.48e-10; kt(8)=1/4.86e-10; kt(9)=1/2.607e-8; kt(10)=1/1.743e-9; kt(11)=1/9.148e-10; kt(12)=1/2.603e-9; kt(13)=1/3.141e-9;
dt(1)=0.2590e10; dx(1)=0.2590e10;
m(1)=8322; m(2)=13914; m(3)=10941; m(4)=1620; m(5)=5897; m(6)=6138; m(7)=23067;
kx(1)=0.77e11 ;kx(2)=0.47e10; kx(3)=0.64e11; kx(4)=0.55e11; kx(5)=1/8.38e-10; kx(6)=1/8.30e-10;
%Forcing function
ft=@(time) 1000*sin(w(1)*time); %N.m %516
fx=@(time) 1000*sin(w(1)*time); %N %3424.9 %
%Mass Matrix
JJ = [J(1) 0 0 0 0 0 0 0 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) 0
0 0 0 0 0 0 0 0 0 0 0 -kt(12) kt(12)+kt(13) -kt(13)
0 0 0 0 0 0 0 0 0 0 0 0 -kt(13) kt(13)];
KX = [kx(1) -kx(1) 0 0 0 0 0
-kx(1) kx(1)+kx(2) -kx(2) 0 0 0 0
0 -kx(2) kx(2)+kx(3) -kx(3) 0 0 0
0 0 -kx(3) kx(3)+kx(4) -kx(4) 0 0
0 0 0 -kx(4) kx(4)+kx(5) -kx(5) 0
0 0 0 0 kx(5) kx(5)+kx(6) -kx(6)
0 0 0 0 0 -kx(6) kx(6)] ; % K matrix
K=[KT W
Y KX];
KT=S*[ W KT
KX Y];
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ZERO=zeros(21,21);
I=eye(21,21);
A=[ZERO , I; -inv(AA)*(K-KT), -inv(AA)*D];
B=[ZERO; inv(AA)];
F=@(TIME) [0 ; 0 ; 0 ; 0 ; 0 ; 0 ; 0 ; 0 ; 0 ; 0 ;0 ; 0 ; 0 ; ft(TIME) ; 0 ; 0 ; 0 ; 0 ; 0 ; 0 ; fx(TIME)]; % Force Vector
sdot=@(t,s) A*s(1:42)+B*F(t);
%%%%%%%% Initial Conditions %%%%%%%%%%%%
IC=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Time span(seconds)
t0=0; tf=30;
tspan=[t0,tf];
%Numerical Integration
[time,state_values]=ode45(sdot,tspan,IC);
theta14=state_values(:,14);
%Plot Results
figure(1), clf
title('\theta Angular Displacement vs. Time')
end
Error using .'
Out of memory. Type HELP MEMORY for your options.
Error in odefinalize (line 47)
solver_output{2} = yout(:,1:nout).';
Error in ode45 (line 474)
solver_output = odefinalize(solver_name, sol,...
Error in deneme (line 169)
[time,state_values]=ode45(sdot,tspan,IC);
##### 2 CommentsShowHide 1 older comment
Rik on 23 Sep 2020
Before you try to delete it I will post a copy of your code. If you didn't want it online you shouldn't have posted it. You can still use it your thesis, since it is your own code. You can't however claim it hasn't been published before.
Original title:
ode 45, big matrices, I can not get result because of
function deneme
S=0.02;
rpm=111; %rpm
w(1)=rpm*2*pi/60;
AA=0.4;
P=0.8;
Z=4;
DD=6.15;
p=1025;
n=1.85;
AR=0.22087*Z/AA;
c211=0.13925-0.48179*AA-0.14175*P+0.27711*AA^2-0.0094311*P^2+0.17407*AA*P;
LSC=0.80988-0.63077*AR^-2+1.3909*P*AR^-1+7.5424*AR^-3-15.689*P*AR^-3-8.0097*AR^-4+17.665*P*AR^-4;
c21=p*n*DD^4*c211*LSC;
m211=0.0012195+0.017664*AA-0.0085938*P-0.023615*AA^2+0.0094301*P^2-0.026146*AA*P;
LSCC=0.65348+0.28788*P+0.39805*AR^-1-0.42582*AR^-2-0.61189*P*AR^-1+0.33373*P*AR^-2;
m21=p*DD^4*m211*LSCC;
J(1)=5000; J(2)=2479; J(3)=7040; J(4)=7519; J(5)=7040; J(6)=7040; J(7)=7519; J(8)=4257; J(9)=4893; J(10)=124; J(11)=47; J(12)=58; J(13)=93; J(14)=35026;
kt(1)=0.17112e10 ;kt(2)=1/6.63e-10; kt(3)=1/8.30e-10; kt(4)=1/8.30e-10; kt(5)=1/8.38e-10; kt(6)=1/8.30e-10; kt(7)=1/6.48e-10; kt(8)=1/4.86e-10; kt(9)=1/2.607e-8; kt(10)=1/1.743e-9; kt(11)=1/9.148e-10; kt(12)=1/2.603e-9; kt(13)=1/3.141e-9;
dt(1)=0.2590e10; dx(1)=0.2590e10;
m(1)=8322; m(2)=13914; m(3)=10941; m(4)=1620; m(5)=5897; m(6)=6138; m(7)=23067;
kx(1)=0.77e11 ;kx(2)=0.47e10; kx(3)=0.64e11; kx(4)=0.55e11; kx(5)=1/8.38e-10; kx(6)=1/8.30e-10;
%Forcing function
ft=@(time) 1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 0 0 0 0 0 0 -kt(10) kt(10)+kt(11) -kt(11) 0 0
0 0 0 0 0 0 0 0 0 0 -kt(11) kt(11)+kt(12) -kt(12) 0
0 0 0 0 0 0 0 0 0 0 0 -kt(12) kt(12)+kt(13) -kt(13)
0 0 0 0 0 0 0 0 0 0 0 0 -kt(13) kt(13)];
KX = [kx(1) -kx(1) 0 0 0 0 0
-kx(1) kx(1)+kx(2) -kx(2) 0 0 0 0
0 -kx(2) kx(2)+kx(3) -kx(3) 0 0 0
0 0 -kx(3) kx(3)+kx(4) -kx(4) 0 0
0 0 0 -kx(4) kx(4)+kx(5) -kx(5) 0
0 0 0 0 kx(5) kx(5)+kx(6) -kx(6)
0 0 0 0 0 -kx(6) kx(6)] ; % K matrix
K=[KT W
Y KX];
KT=S*[ W KT
KX Y];
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ZERO=zeros(21,21);
I=eye(21,21);
A=[ZERO , I; -inv(AA)*(K-KT), -inv(AA)*D];
B=[ZERO; inv(AA)];
F=@(TIME) [0 ; 0 ; 0 ; 0 ; 0 ; 0 ; 0 ; 0 ; 0 ; 0 ;0 ; 0 ; 0 ; ft(TIME) ; 0 ; 0 ; 0 ; 0 ; 0 ; 0 ; fx(TIME)]; % Force Vector
sdot=@(t,s) A*s(1:42)+B*F(t);
%%%%%%%% Initial Conditions %%%%%%%%%%%%
IC=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Time span(seconds)
t0=0; tf=30;
tspan=[t0,tf];
%Numerical Integration
[time,state_values]=ode45(sdot,tspan,IC);
theta14=state_values(:,14);
%Plot Results
figure(1), clf
title('\theta Angular Displacement vs. Time')
end
Error using .'
Out of memory. Type HELP MEMORY for your options.
Error in odefinalize (line 47)
solver_output{2} = yout(:,1:nout).';
Error in ode45 (line 474)
solver_output = odefinalize(solver_name, sol,...
Error in deneme (line 169)
[time,state_values]=ode45(sdot,tspan,IC);

Walter Roberson on 7 Sep 2020
By the way, you can reduce the equations to
[ S(22);
S(23);
S(24);
S(25);
S(26);
S(27);
S(28);
S(29);
S(30);
S(31);
S(32);
S(33);
S(34);
S(35);
S(36);
S(37);
S(38);
S(39);
S(40);
S(41);
S(42);
342240.0*S(2) - 342240.0*S(1) + 6844.8*S(8) - 6844.8*S(9) - 518000.0*S(22) + 518000.0*S(23);
690278.33803953207097947597503662*S(1) - 1298707.3924738543573766946792603*S(2) + 608429.05443432228639721870422363*S(3) - 13805.566760790641637868247926235*S(8) + 25974.147849477089039282873272896*S(9) - 12168.581088686445582425221800804*S(10) + 1044776.1194029850885272026062012*S(22) - 1044776.1194029850885272026062012*S(23);
214246.53777594954590313136577606*S(2) - 385385.63963794300798326730728149*S(3) + 171139.10186199340387247502803802*S(4) - 4284.9307555189907361636869609356*S(9) + 7707.71279275885990500682964921*S(10) - 3422.7820372398682593484409153461*S(11);
160236.63746621011523529887199402*S(3) - 320473.27493242023047059774398804*S(4) + 160236.63746621011523529887199402*S(5) - 3204.7327493242019045283086597919*S(10) + 6409.4654986484038090566173195839*S(11) - 3204.7327493242019045283086597919*S(12);
169505.31568669993430376052856445*S(6) - 340644.41754869336728006601333618*S(5) - 171139.10186199340387247502803802*S(4) + 3422.7820372398682593484409153461*S(11) + 6812.8883509738670909428037703037*S(12) - 3390.1063137339988315943628549576*S(13);
169505.31568669993430376052856445*S(5) - 340644.41754869336728006601333618*S(6) + 171139.10186199340387247502803802*S(7) - 3390.1063137339988315943628549576*S(12) + 6812.8883509738670909428037703037*S(13) - 3422.7820372398682593484409153461*S(14);
160236.63746621011523529887199402*S(6) - 365478.00952941132709383964538574*S(7) + 205241.37206320121185854077339172*S(8) - 3204.7327493242019045283086597919*S(13) + 7309.5601905882276696502231061459*S(14) - 4104.8274412640248556272126734257*S(15);
362511.1290916631114669144153595*S(7) - 845859.30121388053521513938903809*S(8) + 483348.1721222175401635468006134*S(9) - 7250.2225818332626658957451581955*S(14) + 16917.186024277612887090072035789*S(15) - 9666.963442444350221194326877594*S(16);
420521.80027064785826951265335083*S(8) - 428361.2170305839972570538520813*S(9) + 7839.4167599361271641100756824017*S(10) - 8410.4360054129574564285576343536*S(15) + 8567.2243406116795085836201906204*S(16) - 156.78833519872256374583230353892*S(17);
309340.85650296346284449100494385*S(9) - 4936142.995936272665858268737793*S(10) + 4626802.1394333085045218467712402*S(11) - 6186.8171300592694024089723825455*S(16) + 98722.859918725444003939628601074*S(17) - 92536.042788666178239509463310242*S(18);
12206882.240207027643918991088867*S(10) - 35465076.101904504001140594482422*S(11) + 23258193.861697476357221603393555*S(12) - 244137.64480414055287837982177734*S(17) + 709301.5220380900427699089050293*S(18) - 465163.87723394948989152908325195*S(19);
18847157.094823814928531646728516*S(11) - 25470814.148356214165687561035156*S(12) + 6623657.0535323964431881904602051*S(13) - 376943.14189647632883861660957336*S(18) + 509416.28296712430892512202262878*S(19) - 132473.14107064792187884449958801*S(20);
4130882.8936008499003946781158447*S(12) - 7554215.644967615604400634765625*S(13) + 3423332.7513667661696672439575195*S(14) - 82617.657872016992769204080104828*S(19) + 151084.31289935231325216591358185*S(20) - 68466.65502733532048296183347702*S(21);
9089.5319441874398762593045830727*S(13) - 9089.5319441874398762593045830727*S(14) - 181.79063888374878388276556506753*S(20) + 181.79063888374878388276556506753*S(21) + 0.028550219836692742534117512704848*sin(11.623892818282234982311780518134*T);
185051.67027156930998899042606354*S(1) - 185051.67027156930998899042606354*S(2) - 9252583.5135784670710563659667969*S(15) + 9252583.5135784670710563659667969*S(16);
117435.67629725455481093376874924*S(2) - 110679.89075751040945760905742645*S(1) - 6755.7855397441417153459042310715*S(3) + 5533994.5378755209967494010925293*S(15) - 5871783.814862728118896484375*S(16) + 337789.2769872071221470832824707*S(17);
125582.67068823690351564437150955*S(3) - 8591.5364226304718613391742110252*S(2) - 116991.1342656064371112734079361*S(4) + 429576.82113152364036068320274353*S(16) - 6279133.5344118447974324226379395*S(17) + 5849556.713280322030186653137207*S(18);
1469135.8024691357277333736419678*S(4) - 790123.45679012348409742116928101*S(3) - 679012.34567901236005127429962158*S(5) + 39506172.839506171643733978271484*S(17) - 73456790.123456791043281555175781*S(18) + 33950617.283950619399547576904297*S(19);
190582.72824295191094279289245605*S(5) - 186535.5265389181149657815694809*S(4) - 4047.2017040338059814530424773693*S(6) + 9326776.3269459046423435211181641*S(18) - 9529136.4121475946158170700073242*S(19) + 202360.0852016902936156839132309*S(20);
3888.2939799099626725364942103624*S(5) + 7814.0654921564073447370901703835*S(6) - 3925.7715122464437627058941870928*S(7) - 194414.69899549815454520285129547*S(19) - 390703.27460782037815079092979431*S(20) + 196288.57561232222360558807849884*S(21);
1044.6258959625731677078874781728*S(7) - 1044.6258959625731677078874781728*S(6) + 52231.294798128656111657619476318*S(20) - 52231.294798128656111657619476318*S(21) + 0.043351974682446785451077296570859*sin(11.623892818282234982311780518134*T);
]
##### 2 CommentsShowHide 1 older comment
Walter Roberson on 7 Sep 2020
Your 22'nd and 23'rd output get very bumpy starting at about pi/2 seconds. Because of that, ode45 ends up needing to integrate a lot of points.
A situation like this often hints that you should be using a stiff solver.