Skip to content

polykin.flow.prv¤

area_relief_2phase ¤

area_relief_2phase(
    W: float,
    P1: float,
    P2: float,
    v1: float,
    v9: float,
    Kd: float = 0.85,
    Kb: float = 1.0,
    Kc: float = 1.0,
    Kv: float = 1.0,
) -> PRVResult

Calculate the required effective discharge area of a pressure relief device for two-phase flashing or non-flashing flow using the omega method.

The calculation is done according to the API standard 520, Appendix C.2.2.

This method can also be used for liquids that are saturated (but not subcooled) as they enter the relief device.

References

  • Sizing, Selection, and Installation of Pressure-relieving Devices in Refineries: Part I—Sizing and Selection, API Standard 520, 10th ed., 2020.
PARAMETER DESCRIPTION
W

Required relieving mass flow rate (kg/h).

TYPE: float

P1

Upstream relieving pressure, absolute (bara).

TYPE: float

P2

Downstream back pressure, absolute (bara).

TYPE: float

v1

Overall specific volume of the two-phase mixture at upstream relieving conditions (m³/kg).

TYPE: float

v9

Overall specific volume of the two-phase mixture evaluated at 90% of the upstream pressure (m³/kg). The flash calculation should be carried out isentropically, but an isenthalpic (adiabatic) flash is sufficient for low-vapor-content mixtures far from the thermodynamic critical point.

TYPE: float

Kd

Effective discharge coefficient. Use Kd=0.85 for a preliminary size estimation.

TYPE: float DEFAULT: 0.85

Kb

Backpressure correction factor for balanced bellows valves. The value can be obtained from the manufacturer or estimated with the help of Figure 31 of the API standard 520.

TYPE: float DEFAULT: 1.0

Kc

Combination correction factor for installations with a rupture disk upstream of the PRV. Use Kc=1.0 if there is no rupture disk, and Kc=0.9 if there is a rupture disk.

TYPE: float DEFAULT: 1.0

Kv

Viscosity correction factor. Use Kv=1.0 if the liquid phase has a viscosity less or equal than 0.1 Pa·s.

TYPE: float DEFAULT: 1.0

RETURNS DESCRIPTION
PRVResult

Dataclass containing the results of the calculation.

Examples:

Estimate the required discharge area of a pressure relief device handling a two-phase mixture, according to the API standard 520. The required flow is 216560 kg/h, the upstream relieving pressure is 5.564 bara, the downstream back pressure is 2.045 bara, the overall specific volume of the two-phase mixture at upstream relieving conditions is 0.01945 m³/kg, and the overall specific volume of the two-phase mixture evaluated at 90% of the upstream pressure is 0.02265 m³/kg.

>>> from polykin.flow import area_relief_2phase
>>> area_relief_2phase(W=216560, P1=5.564, P2=2.045, v1=0.01945, v9=0.02265)
PRVResult(Pcf=3.65e+00 bara, critical_flow=True, A=2.45e+04 mm²)
Source code in src/polykin/flow/prv.py
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
def area_relief_2phase(W: float,
                       P1: float,
                       P2: float,
                       v1: float,
                       v9: float,
                       Kd: float = 0.85,
                       Kb: float = 1.0,
                       Kc: float = 1.0,
                       Kv: float = 1.0
                       ) -> PRVResult:
    r"""Calculate the required effective discharge area of a pressure relief
    device for two-phase flashing or non-flashing flow using the omega method.

    The calculation is done according to the API standard 520, Appendix C.2.2.

    This method can also be used for liquids that are saturated (but not 
    subcooled) as they enter the relief device.

    **References**

    * Sizing, Selection, and Installation of Pressure-relieving Devices in
      Refineries: Part I—Sizing and Selection, API Standard 520, 10th ed., 2020.

    Parameters
    ----------
    W : float
        Required relieving mass flow rate (kg/h).
    P1 : float
        Upstream relieving pressure, absolute (bara).
    P2 : float
        Downstream back pressure, absolute (bara).
    v1 : float
        Overall specific volume of the two-phase mixture at upstream relieving
        conditions (m³/kg).
    v9 : float
        Overall specific volume of the two-phase mixture evaluated at 90% of
        the upstream pressure (m³/kg). The flash calculation should be carried
        out isentropically, but an isenthalpic (adiabatic) flash is sufficient
        for low-vapor-content mixtures far from the thermodynamic critical point.
    Kd : float
        Effective discharge coefficient. Use `Kd=0.85` for a preliminary size
        estimation.
    Kb : float
        Backpressure correction factor for balanced bellows valves. The value
        can be obtained from the manufacturer or estimated with the help of 
        Figure 31 of the API standard 520.
    Kc : float
        Combination correction factor for installations with a rupture disk
        upstream of the PRV. Use `Kc=1.0` if there is no rupture disk, and
        `Kc=0.9` if there is a rupture disk.
    Kv : float
        Viscosity correction factor. Use `Kv=1.0` if the liquid phase has a
        viscosity less or equal than 0.1 Pa·s.

    Returns
    -------
    PRVResult
        Dataclass containing the results of the calculation.

    Examples
    --------
    Estimate the required discharge area of a pressure relief device handling a
    two-phase mixture, according to the API standard 520. The required flow is
    216560 kg/h, the upstream relieving pressure is 5.564 bara, the downstream
    back pressure is 2.045 bara, the overall specific volume of the two-phase
    mixture at upstream relieving conditions is 0.01945 m³/kg, and the overall
    specific volume of the two-phase mixture evaluated at 90% of the upstream
    pressure is 0.02265 m³/kg.
    >>> from polykin.flow import area_relief_2phase
    >>> area_relief_2phase(W=216560, P1=5.564, P2=2.045, v1=0.01945, v9=0.02265)
    PRVResult(Pcf=3.65e+00 bara, critical_flow=True, A=2.45e+04 mm²)
    """

    # Convert pressures from bar to Pa
    P1 *= 1e5
    P2 *= 1e5

    # Omega parameter
    w = 9*(v9/v1 - 1)

    # Critical pressure ratio
    ηc = (1 + (1.0446 - 0.0093431*sqrt(w))*w**(-0.56261)
          )**(-0.70356+0.014685*log(w))

    # Critical pressure
    Pcf = P1 * ηc
    critical_flow = (P2 <= Pcf)

    # Mass flux (kg/s.m²)
    if critical_flow:
        G = ηc*sqrt(P1/(v1*w))
    else:
        ηa = P2/P1
        G = sqrt(-2*(w*log(ηa) + (w - 1)*(1 - ηa))) * \
            sqrt(P1/v1)/(w*(1/ηa - 1) + 1)

    # Area (mm²)
    A = 277.8*W/(Kd*Kb*Kc*Kv*G)

    return PRVResult(Pcf/1e5, critical_flow, A)