Skip to the content.

API 14C SAFE Chart and NORSOK P-002 Compliance

Class Purpose Standard
Api14cSafeChartBuilder Enumerate equipment and check required protective devices API RP 14C / ISO 10418
NorsokP002ComplianceChecker Screen flare/blowdown/vent hydraulics and drainage NORSOK P-002
MultiVesselBlowdownStudy Superimpose coupled blowdown sources and check header Mach API 521 §7 / NORSOK P-002

Classes live under neqsim.process.safety.api14c, neqsim.process.safety.compliance, and neqsim.process.safety.depressurization.

API 14C SAFE chart

The equipment screen lists recognized process components and the protective device types in NeqSim’s screening table. Declare the devices actually installed, then build the chart against a ProcessSystem:

import java.util.EnumSet;
import neqsim.process.safety.api14c.Api14cSafeChartBuilder;
import neqsim.process.safety.api14c.Api14cDeviceType;

Api14cSafeChartBuilder chart = new Api14cSafeChartBuilder()
    .declarePresent("HP separator",
        EnumSet.of(Api14cDeviceType.PSH, Api14cDeviceType.PSV))
    .build(process);

boolean complete = chart.isComplete();   // false → some required devices missing
chart.getItems();                        // per-equipment coverage items
chart.getGaps();                         // equipment with missing required devices
String md = chart.toMarkdown();          // SAFE chart as a markdown table
String json = chart.toJson();

buildAssumingComplete(process) enumerates the equipment and assumes full device coverage — useful to generate the SAFE-chart skeleton before populating the installed devices. Markdown and JSON identify these rows as ASSUMED_TEMPLATE. The legacy isComplete() accessor measures row completeness, including on a template. Device types come from Api14cDeviceType (PSH, PSL, LSH, LSL, TSH, TSL, USV, SDV, BDV, PSV, FSV, FIRE, GAS) and equipment categories from Api14cEquipmentCategory (e.g. PRESSURE_VESSEL).

Linking relief and shutdown evidence to project equipment

Add an Api14cDeviceDeclaration through EngineeringProject.addApi14cDevice for each documented equipment tag, device type, device tag and evidence reference. Supply a sequence ID for a shutdown function. The engineering calculation report and DEXPI package calculation file include an apiRp14cProtectionReview row for each non-stream unit. Unclassified equipment is marked for review. Generated P&ID proposals do not enter the declared device list.

Function Evidence in the equipment row
PSV Matching protected equipment and PSV tags link to the installed-device screen, including API 520 area and piping checks for each credible API 521 relief demand.
Shutdown device or sensor Matching protected equipment and sequence ID link to the initiating cause, actions, final positions, requirements, and dynamic verification status. A missing, wrong-equipment or ambiguous link stays unresolved.
Device without a declaration The screening device type appears in undeclaredDeviceTypes. Review applicability and document omissions in the project safety analysis.

The trace shows what the project has declared, calculated and simulated. It still requires a component-specific safety analysis, review of justified deviations and independent verification of installation and proof-test records. The offshore export regression in NorsokOffshoreEngineeringBuilderTest exercises the complete package path.

NORSOK P-002 process-design compliance

NorsokP002ComplianceChecker is a fluent screen for the flare/blowdown/vent and drainage criteria in NORSOK P-002. Each check…/record… call adds a finding; the checker aggregates them into a single compliant/non-compliant verdict.

import neqsim.process.safety.compliance.NorsokP002ComplianceChecker;

NorsokP002ComplianceChecker c = new NorsokP002ComplianceChecker()
    .checkFlareLineMach("Header", 0.5)             // ≤ 0.7 Mach
    .checkBlowdownRhoV2("BDV-1", 150000.0)         // ρv² ≤ 200 000 kg/(m·s²)
    .checkVentGasVelocity("Vent", 45.0)            // ≤ 60 m/s
    .checkLiquidCarryOver("V-100", 1.0e-4)         // ≤ 0.1 vol%
    .checkErosionalVelocity("Line-200", 80000.0)
    .recordDepressurisationValve("BDV-2", true, "Sized for fire case")
    .recordDrainSlope("CD-1", true, "1:100 slope OK");

boolean compliant = c.isCompliant();
int failures = c.countNonCompliant();
String json = c.toJson();   // findings tagged with P002Criterion codes

Findings reference the P002Criterion enum (FLARE_LINE_MACH_07, BLOWDOWN_RHO_V2, EROSIONAL_VELOCITY, VENT_GAS_VELOCITY, LIQUID_CARRY_OVER, DEPRESSURISATION_VALVE_SIZE, DRAIN_SLOPE_CAPACITY).

Coupled multi-vessel blowdown header load

When several vessels blow down to a common header, MultiVesselBlowdownStudy superimposes their mass-flow profiles onto a common time grid and checks the resulting header Mach number against the NORSOK P-002 / API 521 limit.

import neqsim.process.safety.depressurization.MultiVesselBlowdownStudy;
import neqsim.process.safety.depressurization.MultiVesselBlowdownStudy.MultiVesselBlowdownResult;

MultiVesselBlowdownStudy study = new MultiVesselBlowdownStudy()
    .setGridStep(1.0)
    .addSourceResult("HP-sep", hpSepDepressurizationResult)
    .addSourceResult("Inlet-sep", inletSepDepressurizationResult)
    .setHeader(0.80, 1.5, 288.15, 0.020, 1.30);   // D[m], P[bara], T[K], MW, gamma

MultiVesselBlowdownResult res = study.run();
double peak = res.getPeakTotalMassFlowKgPerS();      // combined peak [kg/s]
double tPeak = res.getPeakTimeS();                   // time of combined peak [s]
res.getPeakContributionKgPerS();                     // per-source contribution at peak
double mach = res.getHeaderMach();
boolean headerOk = res.isHeaderMachAcceptable();     // Mach ≤ 0.70

Each source is a DepressurizationResult from DepressurizationSimulator (see Depressurization per API 521).

Verification

./mvnw test -Dtest=Api14cSafeChartBuilderTest,NorsokP002ComplianceCheckerTest,MultiVesselBlowdownStudyTest