Skip to content

polykin.flow.prv¤

area_relief_liquid ¤

area_relief_liquid(
    Q: float,
    P1: float,
    P2: float,
    mu: float,
    Gl: float,
    Kd: float = 0.65,
    Kw: float = 1.0,
    Kc: float = 1.0,
) -> float

Calculate the required effective discharge area of a pressure relief device in liquid service (single-phase flow).

The calculation is done according to the API standard 520, assuming the capacity of the valves is certified, as required by the ASME code.

References

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

Required relieving volume flow rate (L/min).

TYPE: float

P1

Upstream relieving pressure (bar). It can be absolute or gauge, as long as it is consistent with P2.

TYPE: float

P2

Downstream back pressure (bar). It can be absolute or gauge, as long as it is consistent with P1.

TYPE: float

mu

Viscosity at the relieving temperature (cP).

TYPE: float

Gl

Relative density of the liquid at the relieving temperature with respect to water at standard conditions.

TYPE: float

Kd

Effective discharge coefficient. Use Kd=0.65 when sizing a PRV and Kd=0.62 when sizing a rupture disk without PRV.

TYPE: float DEFAULT: 0.65

Kw

Backpressure correction factor for balanced bellows valves. The value can be obtained from the manufacturer or estimated with the help of Figure 32 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

RETURNS DESCRIPTION
float

Effective discharge area (mm²).

Examples:

Estimate the required discharge area of a pressure relief valve in liquid service, according to the API standard 520. The required flow is 6814 L/min, the relieving pressure is 18.96 barg, the back pressure is 3.45 barg, the liquid relative density is 0.9, the liquid viscosity is 396 cP, and the valve back pressure correction factor is 0.97.

>>> from polykin.flow import area_relief_liquid
>>> A = area_relief_liquid(Q=6814, P1=18.96, P2=3.45, mu=396, Gl=0.9, Kw=0.97)
>>> print(f"Effective discharge area: {A:.0f} mm²")
Effective discharge area: 3172 mm²
Source code in src/polykin/flow/prv.py
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
def area_relief_liquid(Q: float,
                       P1: float,
                       P2: float,
                       mu: float,
                       Gl: float,
                       Kd: float = 0.65,
                       Kw: float = 1.0,
                       Kc: float = 1.0,
                       ) -> float:
    r"""Calculate the required effective discharge area of a pressure relief
    device in liquid service (single-phase flow). 

    The calculation is done according to the API standard 520, assuming the
    capacity of the valves is certified, as required by the ASME code.

    **References**

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

    Parameters
    ----------
    Q : float
        Required relieving volume flow rate (L/min).
    P1 : float
        Upstream relieving pressure (bar). It can be absolute or gauge, as long
        as it is consistent with `P2`.
    P2 : float
        Downstream back pressure (bar). It can be absolute or gauge, as long as
        it is consistent with `P1`.
    mu : float
        Viscosity at the relieving temperature (cP).
    Gl : float
        Relative density of the liquid at the relieving temperature with respect 
        to water at standard conditions.
    Kd : float
        Effective discharge coefficient. Use `Kd=0.65` when sizing a PRV and
        `Kd=0.62` when sizing a rupture disk without PRV.
    Kw : float
        Backpressure correction factor for balanced bellows valves. The value
        can be obtained from the manufacturer or estimated with the help of 
        Figure 32 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.

    Returns
    -------
    float
        Effective discharge area (mm²).

    Examples
    --------
    Estimate the required discharge area of a pressure relief valve in liquid 
    service, according to the API standard 520. The required flow is 6814 L/min,
    the relieving pressure is 18.96 barg, the back pressure is 3.45 barg, the
    liquid relative density is 0.9, the liquid viscosity is 396 cP, and the valve
    back pressure correction factor is 0.97.
    >>> from polykin.flow import area_relief_liquid
    >>> A = area_relief_liquid(Q=6814, P1=18.96, P2=3.45, mu=396, Gl=0.9, Kw=0.97)
    >>> print(f"Effective discharge area: {A:.0f} mm²")
    Effective discharge area: 3172 mm²
    """

    # Convert pressures from bar to kPa
    P1 *= 1e2
    P2 *= 1e2

    A = 0.0
    A_old = 0.0
    converged = False
    MAX_ITER = 50
    for i in range(MAX_ITER):

        if i == 0:
            Kv = 1.0
        else:
            Re = 18800*Q*Gl/(mu*sqrt(A))
            Kv = 1/(0.9935 + 2.878/Re**0.5 + 342.75/Re**1.5)

        A = 11.78*Q/(Kd*Kw*Kc*Kv)*sqrt(Gl/(P1 - P2))

        if abs((A - A_old)/A) < 1e-5:
            converged = True
            break
        else:
            A_old = A

    if not converged:
        raise ValueError(f"Failed to converge after {MAX_ITER} iterations.")

    return A