我正在尝试求解另一个方程:
(1) M Q''+ K Q + C * Q'=-P
所以首先我要搜索此等式的特定解决方案:
function [A,qperm,AAA1] = tes_8(~,~,~)
format short
syms m c b1 b2 tt qperm11 vperm11 aperm11 aperm qperm vperm qst ksi p0 k omega bt A ccr bt qst p0
syms bt1 bt2 bt3 bt4 bt5 bt6 bt7 ksi SSn qst1 qst2 qst3 qst4 qst5 qst6 qst7 C K m k c
syms SSn1 SSn2 SSn3 SSn4 SSn5 SSn6 SSn7 ttt P0 M C K FFn FFn1 FFn2 FFn3 FFn4 FFn5 FFn6 FFn7
syms qst1_1 qst1_2 qst1_3 qst1_4 qst1_5 qst1_6 qst1_7 m21 m22 m23 m24 m25 m26 m27
syms Fn1_1 Fn1_2 Fn1_3 Fn1_4 Fn1_5 Fn1_6 Fn1_7 c21 c22 c23 c24 c25 c26 c27
syms M1 M2 M3 M4 M5 M6 M7 mpi P01 P02 P03 P04 P05 P06 P07 P01_1 P01_2 P01_3 P01_4 P01_5 P01_6 P01_7
Qperm11=A*exp(1i*omega*tt);
Vperm11=diff(Qperm11,tt,1);
Aperm11=diff(Qperm11,tt,2);
% EQS scritta sulla base delle coord reali
EQS=-P0*exp(1i*omega*tt)==M*Aperm11+C*Vperm11+K*Qperm11;
% Condizioni al contorno
f3 = subs(EQS);
% Soluzione sistema di equazioni delle condizioni al contorno
% nelle 8 costanti di integrazione incognite
sol = solve(f3,A);
A=simplify(sol);
A=subs(A,C,FFn'*c*FFn);
A=subs(A,c,ksi*2*m*SSn);
A=subs(A,M,FFn'*m*FFn);
A=subs(A,m,k/SSn^2);
A=subs(A,omega,bt*SSn);
A=subs(A,P0,qst*K);
A=subs(A,K,FFn'*k*FFn);
% A6=subs(A5,p0,-qst*k*FFn);
A=subs(A,k,(FFn')^(-1)*K*FFn^(-1));
A=subs(A,c,(FFn')^(-1)*C*FFn^(-1));
A=subs(A,m,(FFn')^(-1)*M*FFn^(-1));
A=simplify(A);
% Sostituzione delle costanti nelle funzioni di spostamento
AAA1=subs(A,bt,bt1);
AAA1=subs(AAA1,qst,qst1);
AAA1=subs(AAA1,FFn,FFn1);
AAA1=subs(AAA1,K,K1);
AAA1=subs(AAA1,C,C1);
AAA1=subs(AAA1,M,M1);
AAA1=subs(AAA1,P0,P01);
end
然后我用这个来找到齐次解和另外两个积分常数::
function [Q1_1,V1_1,A1_1] = tes_9(~,~,~)
format short
syms B1 B2 tt qst ksi p0 omega bt qperm qtrans A ttt c
syms FFn m k Q0 V0 Fn1 Fn2 Fn3 Fn4 Fn5 Fn6 Fn7 mpi SSn1 SSn SSd SSd1 Fn1_1 Fn1_2 Fn1_3 Fn1_4 Fn1_5 Fn1_6 Fn1_7
syms bt1 bt2 bt3 bt4 bt5 bt6 bt7 ksi qst1 qst2 qst3 qst4 qst5 qst6 qst7 C K M1 M2 M3 M4 M5 M6 M7 M
syms qst1_1 qst1_2 qst1_3 qst1_4 qst1_5 qst1_6 qst1_7 K1 C1 K2 C2 K3 C3 K4 C4 K5 C5 K6 C6 K7 C7
syms k11 k12 k13 k14 k15 k16 k17 p m22 p0 omega tt mpi m qst ag
syms m11 m12 m13 m14 m15 m16 m17 c11 c12 c13 c14 c15 c16 c17
syms P0 P01 P02 P03 P04 P05 P06 P07 P01_1 P01_2 P01_3 P01_4 P01_5 P01_6 P01_7
qtrans=exp(-SSn*ksi*tt).*(B1*cos(SSd*tt)+B2*sin(SSd*tt));
[A,qperm,~] = tes_8;
q11(tt)=qtrans+qperm;
v11(tt)=diff(q11,tt,1);
a11(tt)=diff(q11,tt,2);
% Condizioni al contorno
f1 = subs(q11,tt,0)-FFn*m*Q0; % q(t=0) = q0
f2 = subs(v11,tt,0)-FFn*m*V0; % v(t=0) = v0
% Soluzione sistema di equazioni delle condizioni al contorno
% nelle 8 costanti di integrazione incognite
Sol = solve([f2,f1],[B1,B2]);
B1 = Sol.B1; % SOLUZIONE GENERALE
B1=subs(B1,m,mpi);
B1_1=subs(B1,FFn,Fn1);
B1_1=subs(B1_1,qst,qst1);
B1_1=subs(B1_1,bt,bt1);
B1_1=subs(B1_1,SSn,SSn1); % SOLUZIONE PER PRIMO MODO DI VIBRARE
B1_1=subs(B1_1,K,K1);
B1_1=subs(B1_1,C,C1);
B1_1=subs(B1_1,M,M1);
B1_1=subs(B1_1,P0,P01);
B1_1_1=subs(B1_1,qst1,qst1_1);
B1_1_1=subs(B1_1_1,Fn1,Fn1_1);
B1_1_1=subs(B1_1_1,P01,P01_1);
B2 = Sol.B2;
B2=subs(B2,m,mpi);
B2_1=subs(B2,SSn,SSn1);
B2_1=subs(B2_1,SSd,SSd1);
B2_1=subs(B2_1,qst,qst1);
B2_1=subs(B2_1,FFn,Fn1);
B2_1=subs(B2_1,m,mpi);
B2_1=subs(B2_1,bt,bt1); % SOLUZIONE PER PRIMO MODO DI VIBRARE
B2_1=subs(B2_1,K,K1);
B2_1=subs(B2_1,C,C1);
B2_1=subs(B2_1,M,M1);
B2_1=subs(B2_1,P0,P01);
B2_1_1=subs(B2_1,qst1,qst1_1);
B2_1_1=subs(B2_1_1,Fn1,Fn1_1);
B2_1_1=subs(B2_1_1,P01,P01_1);
% Sostituzione delle costanti nelle funzioni di spostamento
%% GENERALE + PRIMO GDL
qtrans1 = subs(qtrans);
qtrans1=subs(qtrans1,bt,bt1);
qtrans1=subs(qtrans1,FFn,Fn1);
qtrans1=subs(qtrans1,qst,qst1);
qtrans1=subs(qtrans1,SSn,SSn1);
qtrans1=subs(qtrans1,SSd,SSd1);
qtrans1=subs(qtrans1,m,mpi);
qtrans1=subs(qtrans1,K,K1);
qtrans1=subs(qtrans1,C,C1);
qtrans1=subs(qtrans1,M,M1);
qtrans1=subs(qtrans1,P0,P01);
qtrans1_1=subs(qtrans1,qst1,qst1_1);
qtrans1_1=subs(qtrans1_1,Fn1,Fn1_1);
qtrans1_1=subs(qtrans1_1,P01,P01_1);
Q1 = subs(q11);
Q1=subs(Q1,bt,bt1);
Q1=subs(Q1,FFn,Fn1);
Q1=subs(Q1,qst,qst1);
Q1=subs(Q1,SSn,SSn1);
Q1=subs(Q1,SSd,SSd1);
Q1=subs(Q1,m,mpi);
Q1=subs(Q1,K,K1);
Q1=subs(Q1,C,C1);
Q1=subs(Q1,M,M1);
Q1=subs(Q1,P0,P01);
Q1_1=subs(Q1,qst1,qst1_1);
Q1_1=subs(Q1_1,Fn1,Fn1_1);
Q1_1=subs(Q1_1,P01,P01_1);
V1 = subs(v11);
V1=subs(V1,bt,bt1);
V1=subs(V1,FFn,Fn1);
V1=subs(V1,qst,qst1);
V1=subs(V1,SSn,SSn1);
V1=subs(V1,SSd,SSd1);
V1=subs(V1,m,mpi);
V1=subs(V1,K,K1);
V1=subs(V1,C,C1);
V1=subs(V1,M,M1);
V1=subs(V1,P0,P01);
V1_1=subs(V1,qst1,qst1_1);
V1_1=subs(V1_1,Fn1,Fn1_1);
V1_1=subs(V1_1,P01,P01_1);
A1 = subs(a11);
A1=subs(A1,bt,bt1);
A1=subs(A1,FFn,Fn1);
A1=subs(A1,qst,qst1);
A1=subs(A1,SSn,SSn1);
A1=subs(A1,SSd,SSd1);
A1=subs(A1,m,mpi);
A1=subs(A1,K,K1);
A1=subs(A1,C,C1);
A1=subs(A1,M,M1);
A1=subs(A1,P0,P01);
A1_1=subs(A1,qst1,qst1_1);
A1_1=subs(A1_1,Fn1,Fn1_1);
A1_1=subs(A1_1,P01,P01_1);
end
然后将所有这些内容放入主脚本中 并尝试通过该初始方程式来控制平衡:
(2) 0 = M1 * A1_1 + K1 * Q1_1 + C1 * V1_1 + P1_1
所以所有应该为零 但是不是
相反,这种平衡是可以的:
(3) 0 = M1 * A1_1 + K1 * Q1_1 + C1 * V1_1
这个等于零
所以看来我发现我的解决方案偏离了最后一个方程式。 但是我使用像输入式(1)...
我已经检查了所有积分常数(也是手动方式)-并且它们是正确的 所以我找不到我的错误(
有人可以帮我吗?)
我在Matlab代码的某处错了吗?还是我的设置有问题?
谢谢!!!