0% found this document useful (0 votes)
14 views2 pages

Main f95

The FIV_Check program calculates flow-induced vibration (FIV) metrics for a gas pipe with specific parameters including diameter, flow rate, pressure, and temperature. It computes actual flow conditions, gas velocity, dynamic pressure, acoustic velocity, and the Strouhal number, ultimately assessing the risk of FIV based on established criteria. The program outputs key results and indicates whether there is a potential risk of FIV based on the calculated values.

Uploaded by

Said Ferdjallah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views2 pages

Main f95

The FIV_Check program calculates flow-induced vibration (FIV) metrics for a gas pipe with specific parameters including diameter, flow rate, pressure, and temperature. It computes actual flow conditions, gas velocity, dynamic pressure, acoustic velocity, and the Strouhal number, ultimately assessing the risk of FIV based on established criteria. The program outputs key results and indicates whether there is a potential risk of FIV based on the calculated values.

Uploaded by

Said Ferdjallah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

program FIV_Check

implicit none
!===========================================================
! Flow Induced Vibration (FIV) Screening for Gas Pipe
! Pipe data:
! - Diameter: 20 inches
! - Material: A106 Gr B
! - Flow rate: 350000 Nm3/h
! - Gas MW: 23 g/mol
! - Pressure: 96 bar
! - Temperature: 50 °C
! - Density: 45 kg/m3
!
! Program calculates:
! 1. Actual flow conditions
! 2. Gas velocity
! 3. Dynamic pressure
! 4. Acoustic velocity & Strouhal number
! 5. FIV risk index compared with screening criteria
!
!===========================================================

!-------------------------
! Variable declarations
!-------------------------
real(kind=8) :: D_inch, D_m ! Pipe diameter (inch and m)
real(kind=8) :: Qn, Q_act ! Normal and actual gas flow (m3/h)
real(kind=8) :: T_op, P_op ! Operating temperature (K) and pressure (Pa)
real(kind=8) :: rho ! Gas density (kg/m3)
real(kind=8) :: A, V ! Pipe area (m2) and velocity (m/s)
real(kind=8) :: q_m ! Mass flow rate (kg/s)
real(kind=8) :: q_v ! Volumetric flow rate (m3/s)
real(kind=8) :: P_dyn ! Dynamic pressure (Pa)
real(kind=8) :: MW, R, a_sound ! Molecular weight, gas constant, speed of
sound
real(kind=8) :: St ! Strouhal number (dimensionless)
real(kind=8), parameter :: pi = 3.141592653589793d0

!-------------------------
! Inputs
!-------------------------
D_inch = 20.0d0 ! Pipe diameter in inches
Qn = 350000.0d0 ! Flow at normal conditions (Nm3/h)
P_op = 96.0d0 * 1.0d5 ! Operating pressure in Pa (1 bar = 1e5 Pa)
T_op = 50.0d0 + 273.15d0 ! Operating temperature in K
rho = 45.0d0 ! Gas density at operating conditions (kg/m3)
MW = 23.0d-3 ! Molecular weight in kg/mol
R = 8.314d0 / MW ! Specific gas constant (J/kg-K)

!-------------------------
! Calculations
!-------------------------

! Convert diameter to meters


D_m = D_inch * 0.0254d0

! Cross-sectional area of pipe


A = pi * (D_m**2) / 4.0d0
! Convert flow to actual conditions:
! Here Qn is already given as Nm3/h (normalized),
! but since density at op cond is known (45 kg/m3),
! we directly compute actual volumetric flow:
q_m = Qn * (1.293d0/3600.0d0) ! Approx mass flow from Nm3/h (1.293 kg/m3 at
NTP)
q_v = q_m / rho ! Actual volumetric flow in m3/s
Q_act = q_v * 3600.0d0 ! Actual volumetric flow in m3/h

! Velocity in pipe
V = q_v / A

! Dynamic pressure
P_dyn = 0.5d0 * rho * V**2

! Speed of sound (ideal gas approximation, γ≈1.3 for natural gas)


a_sound = sqrt(1.3d0 * R * T_op)

! Strouhal number check (simplified, f*D/V ~ 0.2, assume shedding freq ~ V/D)
St = 0.2d0

!-------------------------
! Results
!-------------------------
print *, "================ FIV Screening Report ================"
print *, "Pipe diameter (m): ", D_m
print *, "Pipe area (m2): ", A
print *, "Mass flow (kg/s): ", q_m
print *, "Actual volumetric flow (m3/h): ", Q_act
print *, "Gas velocity (m/s): ", V
print *, "Dynamic pressure (Pa): ", P_dyn
print *, "Speed of sound (m/s): ", a_sound
print *, "Strouhal number: ", St

! Screening Criterion (per Energy Institute guidelines):


! Risk if: Velocity > 20 m/s AND Dynamic pressure > 2000 Pa
if (V > 20.0d0 .and. P_dyn > 2000.0d0) then
print *, ">> Potential risk of Flow Induced Vibration (FIV)."
else
print *, ">> FIV risk is low under given conditions."
end if
print *, "======================================================"

end program FIV_Check

You might also like