Using MATLAB's symbolic tool to find functional relationships

44 Views Asked by At

I am working with MATLAB's symbolic tools to rearrange some equations to find the functional relationship between the three.

My equations are...

Pi1, Pi2, Pi3

All the terms in the above equations are related by

V and tau where dP/dx is constant and my goal is to get an answer in the form f.

This is the start of my code.

syms V u v H mu rho dPdx tau % u and v replace V1 and V2
eqn1 = Pi_1 == tau/(rho*V^2);
eqn2 = Pi_2 == (rho*V*H)/mu;
eqn3 = Pi_3 == (dPdx*H)/(rho*V^2);

eqnA = V == (u+v)/2 - H^2/(12*mu)*dPdx;
eqnB = tau == (H/2)*dPdx + mu*(u-v)/2;

A = solve(eqn1,tau);
B = solve(eqn2,V);
C = solve(eqn3,dPdx);

eqnA2 = subs(eqnA,[V,dPdx],[B,subs(C,V,B)]);
eqnB2 = subs(subs(eqnB,dPdx,C),V,B);

eqns = [eqnA2;eqnB2];

S = solve(eqns);
u = S.u;   % V1
v = S.v;   % V2

But now if I take that solution for u and v and plug it into eqnB and solve for Pi_1 I get Pi_1 = Pi_1 which is not what I'm looking for.

0

There are 0 best solutions below