Loop 계산
Loop에 속한 Line들의 Pressure Drop (Static), Pressure @ Pipe end point를 구한다
- p_eq_input
- 시작, 끝 기기의 압력과 높이를 구한다
$pressure_0 = \text{pressure of equipment} \\
elevation_0 = \text{elevation of equipment} \\
pressure_{count-1} = \text{pressure of equipment} \\
elevation_{count-1} = \text{elevation of equipment}
$
- 기기의 dP와 elevation을 구한다
$ \text{for i=2 to count - 3 step 3} \\
\qquad \text{pressure drop}_i = \text{pressure drop of equipment} \\
\qquad elevation_i = \text{elevation of equipment} \\
\qquad elevation_{i+1} = \text{elevation of equipment} \\
$
- discharge_cal
- discharge_den
- discharge_static_cal
- density를 구함
$ density=
\begin{cases}
density , & \text{if unit = }kg/m^3 \\
density*16.0186 , & otherwise
\end{cases}
$
- 앞,뒤 기기의 elevation을 구함
$
el_{i+1} \\
el_{i-1}
$
- $\text{static pressure = }(el_{i+1} - el_{i-1}) * density / 1000 * 9.80665 / 101.325$
- $\text{press drop}_{i-1} =
\begin{cases}
\text{static pressure}*1.033 & \text{if unit is }kg/cm^2 \\
\text{static pressure}*14.7 & \text{if unit is }psi \\
\text{static pressure} & \text{if unit is }atm \\
\text{static pressure}*1.013 & \text{if unit is }bar \\
\text{static pressure}*760 & \text{if unit is }mmHg \\
\text{static pressure}*101.325 & \text{if unit is }kPa \\
\text{static pressure}*0.101325 & \text{if unit is }MPa
\end{cases}
$
- discharge_p_cal() if phase is 'Liquid' or 'Mixed'
- $pressure_i = pressure_{i+1} + \text{pressure drop}_i$
- $\text{if i > 1} \\
\qquad pressure_{i-1} = pressure_i + \text{pressure drop}_{i-1} \\
\qquad \text{if pressure drop}_{i-2} \\
\qquad \qquad pressure_{i-2}=
\begin{cases}
pressure_{i-1} - \text{pressure drop}_{i-2} & \text{if name is 'L_P' or 'R_P' or 'V_P' or 'R_K' or 'L_K'} \\
pressure_{i-1} + \text{pressure drop}_{i-2} & otherwise
\end{cases} \\
\qquad \text{else break}
$
- suction_cal
- suction_find_line
- suction_static_cal
***
$
\text{pressure drop}_i = \text{pressure drop friction of data}
$
- suction_p_cal
$
pressure_i = pressure_{i-1} - \text{pressure drop}_{i-1} \\
pressure_{i+1} = pressure_{i} - \text{pressure drop}_{i} \\
\text{if pressure drop}_{i+1} \\
\qquad pressure_{i+2}=
\begin{cases}
pressure_{i+1}+\text{pressure drop}_{i+1} & \text{if name is 'L_P' or 'R_P' or 'V_P' or 'R_K' or 'L_K'} \\
pressure_{i+1}-\text{pressure drop}_{i+1} & otherwise
\end{cases} \\
\text{else break}
$
- press drop 계산
- $\text{press drop}_i = \text{press drop friction of stream data} \\
pressure_i = pressure_{i+1} + \text{press drop}_i \\
pressure_{i-1} = pressure_i + \text{press drop}_{i-1} \\
\begin{cases}
\text{break loop}, & \bbox[yellow]{\text{if not }\text{pressure drop}_{i-2}} \\
\hline
pressure_{i-2} =
\begin{cases}
pressure_{i-1} - \text{pressure drop}_{i-2}, & \text{if name is [L_P, R_P, V_P, R_K, L_K]} \\
pressure_{i-1} + \text{pressure drop}_{i-2}, & otherwise
\end{cases} , & otherwise
\end{cases}
$