You are on page 1of 2

# -*- coding: utf-8 -*-

"""
Created on Mon Nov 28 10:01:56 2022

"""

# Wall thickness calculation as per NEN3650


# Very shallow waters; WT driven by pressure containment

# Import libraries
import numpy as np

# Constants
g=9.806 #m/s2

# Input data
asset='pipeline'
# Code & Standard NEN3650-1/2 & 3655 (2020)
# Partial Safety factors
loc_NEN=str(input("Enter location for safety class determination Z1 or Z2:\n"))
if loc_NEN=='Z1':
#fi_Z1=1.39 ; fe_Z1=1.39 #NEN 3650-2 2020 uses 1.25 for incidental at field
section
f_hp=1.25 #NEN 3650-2: 2020, Table 2, BC 2, the partial factor for normal route
else: #loc_NEN==Z2:
#fi_Z2=1.50 ; fe_Z2=1.50 #NEN 3650-2 2020 uses 1.50/1.1 for incidental at
station
f_hp=1.5/1.1 #NEN3650-2: 2020, § 8.5.2, the partial factor for internal
pressure on 500 zone
f_hyd=1.30 #taken from NEN-EN 1594 for natural gas
gamma_m=1.1 # NEN 3650-2:2020 table 3, D.3.1 & NEN 3650-2: 2020, table D.2.

# Geometry
x=float(input("Enter the pipe outer diameter in inches:\n")) #inches
OD=x*25.4 #m

# Metocean ref to MRD K14-FA-1C Block 14, 1 Oct 2012)


rho_sw=1025 #kg/m3
h_MSL=float(input("Enter the water depth (in m) relative to MSL:\n"))
tide_MSL_LAT=1.16 #m
surge_neg100=-0.55 #m 100 yr negtive still water level relative to LAT
surge_pos100=4.08 #m 100 yr negtive still water level relative to LAT
Hmax_100=16.6#
WD_min=h_MSL-tide_MSL_LAT+surge_neg100-0.5*Hmax_100
WD_max=h_MSL-tide_MSL_LAT+surge_neg100+0.5*Hmax_100
if asset=='pipeline' or asset=='spool':
Pe_min=rho_sw*g*WD_min #Pa external pressure at min WD
else: #asset==riser
Pe_min=0.0 #Pa external pressure at min WD
Pe_max=rho_sw*g*WD_max #Pa external pressure at min WD
# Operating & Design Limits
rho_CO2=660 #kg/m3 worst case density of CO2
rho_water=1000.0 #kg/m3 density of test water
Pd=200.0 #barg @ pipeline inlet onshore Maasvlakte
href=6.0 #m inlet level relative to LAT
Pi=Pd*10**5+rho_CO2*g*(href+h_MSL-tide_MSL_LAT) #Pa
Tdes=float(input("Enter the upper design temperature in degC:\n")) #degC

# Material type and grade


mat_type=str(input("Select material type among CS, 22Cr, 25Cr:\n"))
if mat_type=='CS':
tcor=float(input("Enter the corrosion allowance in mm:\n")) #mm
grade='X65' #str(input("Select API5L grade among X65:\n"))
if grade=='X65':
SMYS=450.0; SMTS=535.0
# Temperature derating for CS in-line with NEN 3650-2 Table B.1
T_R=[0, 50.0, 100.0, 150.0, 200.0]
SMYS_R=[450.0, 450.0, 402.0, 373.0, 208.0]
Re=np.interp(Tdes, T_R, SMYS_R) #Tamb #
SMYS_Re=Re
else:
pass
elif mat_type=='22Cr':
tcor=0.0 #mm
grade='LC65-2205' #str(input("Select API5LC grade among LC65-2205:\n"))
if grade=='LC65-2205': #API5LC
SMYS=448.0; SMTS=621.0
# Temperature derating for 22Cr in-line with DNV-ST-F101 Figure 5-2
T_R=[0, 20.0, 50.0, 100.0]
SMYS_R=[448.0, 448.0, 408.0, 358.0]
Re=np.interp(Tdes, T_R, SMYS_R) #Tamb #
SMYS_Re=Re
else:
pass
elif mat_type=='25Cr':
tcor=0.0 #mm
grade=str(input("Select API5LC grade among LC65-2506:\n"))
if grade=='LC65-2506': #API5LC
SMYS=448.0; SMTS=656.0
# Temperature derating for 25Cr in-line with DNV-ST-F101 Figure 5-2
T_R=[0, 20.0, 50.0, 100.0]
SMYS_R=[550.0, 550.0, 510.0, 460.0]
Re=np.interp(Tdes, T_R, SMYS_R) #Tamb #
SMYS_Re=Re
else:
pass
else:
pass

You might also like