Cnnn!
I will give you some approximate method which I have been following. (Make sure that your compressor is not pumping nitrogen into the tank - simply shut of the valve)
You have a receiver capacity of 40 cu.m and the pressure is 40 bar. At atmospheric pressure it would be 1600 cu.m
(40 bar*40 cu.m). When the pressure reduces to 30 bar there is 1200 cu.m (30 bar*40 cu.m). So your net flow out is
400 cu.m. Note down the time for the pressure drop. Devide the flow (1200) with the time and you will get flow rate.
Note: I considered 30 and 40 bar as absolute pressures. If not add 1.01bar to both.
Regards,
Truth: Even the hardest of the problems will have atleast one simple solution. Mine may not be one.