Q = @(v) sym(v);
Pi = Q(pi);
syms D n L
%density
p = Q(1000);
%Specific Heat
Cp = Q(4182);
k = Q(598)/Q(10)^3;
Pr = Q(701) / Q(10)^2;
%dynamic visc
m = Q(1002)/Q(10)^6;
%pressure drop
dP = Q(5000);
%mass flow rate
m_dot = Q(239234)/Q(10)^4;
%Cmin
C_min = Q(322581)/Q(10)^1;
%UA
UA = Q(125634);
%Reynold's Number
Re = Q(383994)/Q(10)^1*(1/(n*D));
%Friction Factor
f = simplify((Q(79)/Q(10)^2*log(Re)-Q(164)/Q(10)^2)^-2)
%Pressure Drop Relation
%eqn1 = 5000==f*((16*m_dot^2*L)/(p*pi^2*D^4))*(1/(2*D))
h = simplify(Cp*((Q(4)*m_dot)/(n*Pi*D^2))*(Q(1)/Q(2))*f*Pr^(Q(-2)/Q(3)))
Notice that if you take the denominator of f, the term involving log(n), and multiply the two parts by 100, that the expression becomes the same as the 79*log(191997/(5*D*n)) - 164 that shows up in h. So later in the calculations those two log terms cancel, leaving only a fraction.


