1.
2.
Matlab 代码
% Md = f(Q,H,rou,omega,yita)
% Md = F*L = m*g*L kg*m*s^(-2)*m = kg*m^2*s^(-2)
% Md = 1 2 -2
% Q = V/t m^3*s^(-1)
% Q = 0 3 -1
% H m
% H = 0 1 0
% rou kg*m^(-3)
% rou = 1 -3 0
% omega = rad/t s^(-1)
% omega = 0 0 -1
clear;
Md = [1 2 -2]';
Q = [0 3 -1]';
H = [0 1 0]';
rou = [1 -3 0]';
omega = [0 0 -1]';
A = [H Q rou];
pi1_co = A\(-Md);
pi2_co = A\(-omega);
fprintf('Π1 = Md*H^%d*Q^%d*rou^%d',pi1_co(1),pi1_co(2),pi1_co(3));
fprintf('Π2 = omega*H^%d*Q^%d*rou^%d',pi2_co(1),pi2_co(2),pi2_co(3));
fprintf('Π3 = yita')
fprintf('根据 Π1 = f(Π2,Π3) 得');
fprintf('Md*H^%d*Q^%d*rou^%d = f(omega*H^%d*Q^%d*rou^%d,yita)',pi1_co(1),pi1_co(2),pi1_co(3),pi2_co(1),pi2_co(2),pi2_co(3));
fprintf('即');
fprintf('Md = H^%d*Q^%d*rou^%d*f(omega*H^%d*Q^%d*rou^%d,yita)',-pi1_co(1),-pi1_co(2),-pi1_co(3),pi2_co(1),pi2_co(2),pi2_co(3));
输出结果
Π1 = Md*H^1*Q^-2*rou^-1
Π2 = omega*H^3*Q^-1*rou^0
Π3 = yita
根据 Π1 = f(Π2,Π3) 得
Md*H^1*Q^-2*rou^-1 = f(omega*H^3*Q^-1*rou^0,yita)
即
Md = H^-1*Q^2*rou^1*f(omega*H^3*Q^-1*rou^0,yita)
3.
Matlab 代码
% D m
% 0 1 0
% rou_b kg*m^3
% 1 3 0
% v m*s^(-1)
% 0 1 -1
% rou_liq kg*m^3
% 1 3 0
% g m*s^(-2)
% 0 1 -2
% miu N*s*m^(-2) = kg*m*s^(-2)*s*m^(-2) = kg*m^(-1)*s^(-1)
% 1 -1 -1
clear;
v = [0 1 -1]';
rou_liq = [1 3 0]';
g = [0 1 -2]';
miu = [1 -1 -1]';
A = [rou_liq g miu];
pi3_co = A\(-v);
% 因为小数表达很丑,所以尝试另一种写法
syms rou_liq g miu v real;
v = 1*(rou_liq^pi3_co(1)*g^pi3_co(2)*miu^pi3_co(3))^(-1);
disp('v 的表达式为');
disp(v);
输出结果
v 的表达式为
4.
Matlab 代码
% v m*s^(-1)
% 0 1 -1
% miu N*s*m^(-2) = kg*m*s^(-2)*s*m^(-2) = kg*m^(-1)*s^(-1)
% 1 -1 -1
% R m
% 0 1 0
% rou kg*m^3
% 1 3 0
% g m*s^(-2)
% 0 1 -2
clear;
v = [0 1 -1]';
R = [0 1 0]';
rou = [1 3 0]';
g = [0 1 -2]';
A = [R rou g];
pi1_co = A\(-v);
syms R rou g v real;
v = 1*(R^pi1_co(1)*rou^pi1_co(2)*g^pi1_co(3))^(-1);
disp('v 的表达式为');
disp(v);
输出结果
v 的表达式为
麻了,rou 的单位写错了 算了懒得改了……
|