I want to find the pressure decay of two volumes V1 and V2 having orifices d1 and d2 at their outlets respectively. The differential equations for the pressure and temperature for the two volumes are given below. i solved these equations using RK4 method. The solutions I got are quite realistic. But the solutions fails when : both the volumes are at same pressure (P2=P1) outlet of V2 is closed at t=0. It is suddenly opened at t=0. when we solve the above DE for P2, k1 in this case is negative (since first term becomes 0) whereas k2 becomes positive. This causes k3 to be imaginary! Can anyone help me with this? Thanks in advance!