rxnarang,
You may find this tedious but this is how we did it for certain two phase relieving scenarios in several of our oil&gas upstream projects, but with fairly good results.
For the calculation, we used HYSYS and PIPESIM. We first used HYSYS to do a isentropic flash calculation, for the relieving fluid, to estimate the liquid, gas and mixed phase densities at various decrements of pressure starting from the relieving pressure to the required outlet pressure. These were inputted to an in-house EXCEL spreadsheet which calculated the mass flux at the various decrements of pressure. The corresponding decremented pressure, at which the spreadsheet calculated the maximum value of mass flux, was noted.
Then PIPESIM calulation was done for relief discharge line by defining the sink conditions and estimated the source conditions at an assumed pipe size. The source pressure would be compared with the above decremented pressure. Obviously, it may not match exactly, but if the deviation was within + or- 1% then the next step was to check the back pressure and the Mach number from the PIPESIM output file. If this was OK, then the pipesize was acceptable otherwise we either decrease or increase the pipesize and re-run PIPESIM till we get the desired results.
Anyways, all this was done prior to the company acquiring FLARENET (
this was a recent mandatory requirement from the client) after which all the above time consuming exercise was stopped. Unfortuantely when this software had arrived, I could not use it extensively as I had left that company by then. However, before leaving, I did validate some of my earlier "tedious" calculations on this software and was glad to see that the results came quite close.
Cheers