Structured hazard-identification workflows — HAZOP worksheets with the seven IEC 61882 guidewords, deviation→calculation auto-population that maps each guideword/parameter deviation to the NeqSim calculator that quantifies its consequence (overpressure, vacuum collapse, deadhead, surge, backflow/water-hammer, low-temperature/MDMT, fire case, runaway reaction), FMEA failure-mode tables with RPN/criticality scoring, event-tree analysis (ETA) for outcome frequency, fault-tree analysis (FTA) with β-factor common-cause modelling and minimal cut sets, and escalation-graph (domino) screening. USE WHEN: a task requires systematic hazard identification, qualitative-to-quantitative scenario development, mapping HAZOP/HAZID deviations to quantitative process-safety calculations, top-event decomposition, or escalation/domino analysis between adjacent equipment. Anchors on neqsim.process.safety.hazid, neqsim.process.safety.risk.eta, neqsim.process.safety.risk.fta, neqsim.process.safety.escalation.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
A direct command skips the review prompt. Inspect the source before running it.
Structured hazard-identification workflows — HAZOP worksheets with the seven IEC 61882 guidewords, deviation→calculation auto-population that maps each guideword/parameter deviation to the NeqSim calculator that quantifies its consequence (overpressure, vacuum collapse, deadhead, surge, backflow/water-hammer, low-temperature/MDMT, fire case, runaway reaction), FMEA failure-mode tables with RPN/criticality scoring, event-tree analysis (ETA) for outcome frequency, fault-tree analysis (FTA) with β-factor common-cause modelling and minimal cut sets, and escalation-graph (domino) screening. USE WHEN: a task requires systematic hazard identification, qualitative-to-quantitative scenario development, mapping HAZOP/HAZID deviations to quantitative process-safety calculations, top-event decomposition, or escalation/domino analysis between adjacent equipment. Anchors on neqsim.process.safety.hazid, neqsim.process.safety.risk.eta, neqsim.process.safety.risk.fta, neqsim.process.safety.escalation.
The four canonical hazard-identification and scenario-development techniques in
one place — used together they produce auditable HAZOP / SIL / QRA documentation
per IEC 61882, IEC 61508/61511, ISO 17776 and the CCPS guideline series.
When to Use
HAZOP node walkdown — apply guidewords to design intent at every node
FMEA / FMECA — equipment-level failure-mode tabulation with RPN scoring
Event-tree analysis (ETA) — outcome-frequency development from initiating event
CCPS Guidelines for Hazard Evaluation Procedures (3rd ed.)
ISO 17776 — major-accident hazard management
Method 1 — HAZOP Worksheet
import neqsim.process.safety.hazid.HAZOPTemplate;
HAZOPTemplatews=newHAZOPTemplate("V-100", "HP separator pressure control node");
ws.addDeviation(HAZOPTemplate.GuideWord.MORE, HAZOPTemplate.Parameter.PRESSURE,
"PCV stuck open",
"Vessel rupture, gas release",
"PSV-101; Operator response",
"Verify PSV sizing per API 521");
Stringreport= ws.report();
The seven IEC 61882 guidewords are defined in HAZOPTemplate.GuideWord.
Use addDeviation(...) once per (guideWord, parameter) deviation per node,
or generateGrid(...) to create empty rows for selected parameters.
For STID/P&ID + plant-data + NeqSim simulation workflows, use MCP runHAZOP.
It accepts a standard runProcess JSON definition plus extracted nodes,
safeguards, evidence references, failure modes, and an optional barrier register.
It returns HAZOP rows with scenario-simulation evidence and report markdown.
To quantify a single deviation from a P&ID Safety Analyser / AI-HAZOP front-end,
use MCP runHazopScenario (neqsim.mcp.runners.HazopScenarioRunner). The
deviation→calculation auto-population is driven by
neqsim.process.safety.hazid.HazopConsequenceAutoPopulator.quantify(...), and
each HazopConsequenceFinding records a verdict, a standardReference, and a
limitBasis provenance string (default screening limit vs per-unit data-sheet
override from HazopQuantificationLimits). See
docs/safety/ai_hazop_input_format.md.
RPN = S × O × D (IEC 60812). Items above the company threshold (often RPN > 100
or S ≥ 9) trigger design changes. The criticalEntries(threshold) helper returns
the subset above a cut-off.
Gate types: AND, OR, VOTING (k-of-n). Common-cause is applied via
withCCF(β). Minimal cut sets are returned by brute-force enumeration up to a
user-specified cardinality (sufficient for typical < 20-basic-event trees).
β-factor common-cause semantics
The implementation uses the IEC 61508 convex-combination form:
For redundant (AND) configurations this increases the failure probability —
the dominant safety effect. For series (OR) configurations it decreases the
disjunction probability because the common-mode replaces independent
co-occurrence.
Used to screen plot-plan layouts before detailed CFD (KFX / FLACS) runs.
Method 6 — ISO 17776 Major-Accident-Hazard Bow-Tie
Generate a pre-populated bow-tie (threats → top event → consequences, with
prevention/mitigation barriers) for each ISO 17776 major accident hazard from
MahCatalogue / MahBowTieBuilder:
import neqsim.process.safety.hazid.MahType;
import neqsim.process.safety.hazid.MahCatalogue;
import neqsim.process.safety.hazid.MahBowTieBuilder;
import neqsim.process.safety.risk.bowtie.BowTieModel;
// One call builds a complete bow-tie with default threat freq + barrier PFDBowTieModelbt= MahBowTieBuilder.build(MahType.TOPSIDE_HYDROCARBON_RELEASE);
bt.getThreats(); // ≥ 4 standard threats
bt.getConsequences(); // ≥ 3 standard consequences
bt.getBarriers(); // ≥ 5 prevention/mitigation barriers// Or inspect the raw catalogue lists to tailor a custom bow-tie
MahCatalogue.threatsFor(MahType.WELL_BLOWOUT);
MahCatalogue.consequencesFor(MahType.FIRE_EXPLOSION);
MahCatalogue.barriersFor(MahType.TOXIC_RELEASE);
MahType covers the standard offshore MAHs: TOPSIDE_HYDROCARBON_RELEASE,
RISER_LEAK, WELL_BLOWOUT, STRUCTURAL_COLLAPSE, DROPPED_OBJECT,
HELICOPTER_LOSS, SHIP_COLLISION, FIRE_EXPLOSION, TOXIC_RELEASE,
LOSS_OF_BUOYANCY, EXTREME_WEATHER. Defaults exposed as
MahBowTieBuilder.DEFAULT_THREAT_FREQUENCY and DEFAULT_BARRIER_PFD. Quantify
the assembled BowTieModel with the bow-tie analyzer (see
neqsim-process-safety). Verified by MahBowTieBuilderTest.
Method 7 — EI AVIFF Flow-Induced-Vibration Screening
Screen piping for flow-induced vibration (FIV) likelihood-of-failure per the
Energy Institute AVIFF guidelines with PipingFivScreening (static helpers):
Turn an empty HAZOP grid into a simulation-backed worksheet: each guideword ×
parameter deviation is mapped to the NeqSim calculator that quantifies its
consequence, the governing standard, and a typical safeguard. This replaces the
"TBD" placeholders produced by generateGrid(...) or fromProcessSystem(...)
with engineered consequence and safeguard text.
import neqsim.process.safety.hazid.HAZOPTemplate;
import neqsim.process.safety.hazid.HazopConsequenceAutoPopulator;
import neqsim.process.safety.hazid.HazopConsequenceMapping;
// 1. Build a first-pass grid (or use HAZOPTemplate.fromProcessSystem(process))HAZOPTemplatenode=newHAZOPTemplate("Node-1: V-100", "HP separator");
node.generateGrid(HAZOPTemplate.Parameter.PRESSURE,
HAZOPTemplate.Parameter.FLOW, HAZOPTemplate.Parameter.TEMPERATURE);
// 2. Auto-populate consequence / safeguard / recommendation columnsHazopConsequenceAutoPopulatorpopulator=newHazopConsequenceAutoPopulator();
HAZOPTemplatepopulated= populator.populate(node); // returns a NEW nodeStringreport= populated.report();
// 3. Inspect a single mapping (e.g. for routing to the right calculator)HazopConsequenceMappingm= populator.mappingFor(
HAZOPTemplate.GuideWord.OTHER_THAN, HAZOPTemplate.Parameter.REACTION);
m.getRecommendedCalculator(); // "RunawayReactionAnalyzer"
m.getStandardReference(); // "DIERS / API 521"StringcatalogueJson= populator.catalogueToJson();
The populate(...) method preserves any already-filled (non-"TBD") cells and
builds a new template (HAZOP deviation rows are immutable). The catalogue maps:
These closed the previously-flagged 🟡 partial gaps in HAZOP coverage: vacuum
collapse (VacuumCollapseAnalyzer), pump deadhead / min-flow
(PumpDeadheadAnalyzer), settle-out and gas blow-by
(SettleOutPressureAnalyzer, GasBlowbyAnalyzer), and runaway reaction
(RunawayReactionAnalyzer). Verified by HazopConsequenceAutoPopulatorTest.
Workflow — From STID to Simulation-backed HAZOP
Retrieve STID/P&ID, C&E, SRS, line-list, and operating-data documents into
the task references folder.
Extract nodes with nodeId, designIntent, equipment, safeguards, and
evidenceRefs using the technical-document-reading and STID-retriever skills.
Build a NeqSim process JSON definition from extracted topology or existing
models.
Run runHAZOP with selected failure modes, or enable all failure modes.
Review generated rows, scenario results, failed simulations, and evidence
references with the chaired HAZOP team.
Pass accepted safeguards to runBarrierRegister, LOPA, SIL, bow-tie, and QRA
workflows.
Detailed user documentation: docs/safety/automated_hazop_from_stid.md.
Workflow — From HAZOP to LOPA in One Notebook
HAZOP the node → identify deviation, cause, consequence
FTA the cause → quantify cause frequency from basic events
ETA the consequence → split into outcome branches
Probit + IRPA — see neqsim-consequence-analysis
LOPA + SIL — see neqsim-process-safety
A reference end-to-end workflow lives in the test class
HAZOPFMEATest + EscalationGraphAnalyzerTest.
Common Pitfalls
Guideword ≠ cause — HAZOP guidewords describe the deviation, not the
cause. Every deviation can have multiple causes; document each separately.
RPN inflation — companies vary on detection scales. Document the scale
used (CCPS 1–10 vs IEC 60812 1–10) at the top of every FMEA.
β-factor for OR gates — does not represent "more failure" the way it does
for AND gates. See semantics box above.
Cut-set explosion — limit maxCardinality to 4–6 for trees with > 15
basics; the enumeration is O(2^n) in basic-event count.
Verification Tests
./mvnw test -Dtest=HAZOPFMEATest,EventTreeAnalyzerTest,FaultTreeAnalyzerTest,EscalationGraphAnalyzerTest,MahBowTieBuilderTest,PipingFivScreeningTest,HazopConsequenceAutoPopulatorTest,VacuumCollapseAnalyzerTest,SettleOutPressureAnalyzerTest,GasBlowbyAnalyzerTest,PumpDeadheadAnalyzerTest,RunawayReactionAnalyzerTest