P and T are dependent on each other .. as per the ideal gas equations in themrodynamics ..
Energy Balance Differential Equation
15 views (last 30 days)
Guru Mohanty on 22 Jan 2020
Hi, I understand you are trying to solve the equation. You can do this using dsolve. Here is a sample code.
syms rho cp T(t) mn V Tin P(t) heff Tamb k
P=k*T; % Ideal Gas Equation
eqn= rho*cp*diff(T,1) + mn*cp*(T-Tin)/V - diff(P,1) + heff*(T-Tamb) ==0;