Class WellBarrierSchematic

java.lang.Object
neqsim.process.mechanicaldesign.subsea.WellBarrierSchematic
All Implemented Interfaces:
Serializable

public class WellBarrierSchematic extends Object implements Serializable
Well barrier schematic per NORSOK D-010 Section 5.

A well barrier schematic defines the primary and secondary barrier envelopes and validates them against standard requirements. It implements the two-independent-barrier principle from NORSOK D-010:

  • Every well must have two independent well barrier envelopes
  • Each envelope must have at least 2 tested and verified barrier elements
  • Producer wells require a DHSV (SSSV/SCSSV) in the primary envelope
  • Injector wells require an ISV in the primary envelope (NORSOK D-010 Table 36)
  • Annular pressure must be monitored (API RP 90)

Usage Example

WellBarrierSchematic schematic = new WellBarrierSchematic();
schematic.setWellType("OIL_PRODUCER");

BarrierEnvelope primary = new BarrierEnvelope("Primary");
primary.addElement(new BarrierElement(BarrierElement.ElementType.TUBING, "Production Tubing"));
primary.addElement(new BarrierElement(BarrierElement.ElementType.DHSV, "DHSV"));
primary.addElement(new BarrierElement(BarrierElement.ElementType.XMAS_TREE, "Xmas Tree"));
schematic.setPrimaryEnvelope(primary);

BarrierEnvelope secondary = new BarrierEnvelope("Secondary");
secondary.addElement(new BarrierElement(BarrierElement.ElementType.CASING, "Prod Casing"));
secondary.addElement(new BarrierElement(BarrierElement.ElementType.CEMENT, "Casing Cement"));
secondary.addElement(new BarrierElement(BarrierElement.ElementType.WELLHEAD, "Wellhead"));
schematic.setSecondaryEnvelope(secondary);

schematic.validate();
System.out.println("Passed: " + schematic.isPassed());
Version:
1.0
Author:
ESOL
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • DEFAULT_MIN_ELEMENTS

      private static final int DEFAULT_MIN_ELEMENTS
      Minimum barrier elements per envelope (NORSOK D-010).
      See Also:
    • primaryEnvelope

      private BarrierEnvelope primaryEnvelope
      Primary barrier envelope.
    • secondaryEnvelope

      private BarrierEnvelope secondaryEnvelope
      Secondary barrier envelope.
    • wellType

      private String wellType
      Well type string (e.g. "OIL_PRODUCER", "WATER_INJECTOR").
    • minPrimaryElements

      private int minPrimaryElements
      Minimum elements per envelope (loaded from standards).
    • minSecondaryElements

      private int minSecondaryElements
      Minimum elements for secondary envelope.
    • dhsvRequired

      private boolean dhsvRequired
      Whether DHSV is required (producers).
    • isvRequired

      private boolean isvRequired
      Whether ISV is required (injectors per NORSOK D-010 Table 36).
    • annulusMonitoringRequired

      private boolean annulusMonitoringRequired
      Whether annulus pressure monitoring is required.
    • passed

      private boolean passed
      Validation passed flag.
    • issues

      private final List<String> issues
      Validation issues found.
    • appliedStandards

      private final List<String> appliedStandards
      Applied standards references.
  • Constructor Details

    • WellBarrierSchematic

      public WellBarrierSchematic()
      Create an empty well barrier schematic.
  • Method Details

    • setWellType

      public void setWellType(String wellType)
      Set the well type for validation rules.
      Parameters:
      wellType - well type string (e.g. "OIL_PRODUCER", "WATER_INJECTOR")
    • updateRequirements

      private void updateRequirements()
      Update barrier requirements based on well type.
    • setPrimaryEnvelope

      public void setPrimaryEnvelope(BarrierEnvelope envelope)
      Set the primary barrier envelope.
      Parameters:
      envelope - primary barrier envelope
    • setSecondaryEnvelope

      public void setSecondaryEnvelope(BarrierEnvelope envelope)
      Set the secondary barrier envelope.
      Parameters:
      envelope - secondary barrier envelope
    • getPrimaryEnvelope

      public BarrierEnvelope getPrimaryEnvelope()
      Get the primary barrier envelope.
      Returns:
      primary envelope
    • getSecondaryEnvelope

      public BarrierEnvelope getSecondaryEnvelope()
      Get the secondary barrier envelope.
      Returns:
      secondary envelope
    • setMinimumElements

      public void setMinimumElements(int minPrimary, int minSecondary)
      Set barrier element count requirements (from standards data).
      Parameters:
      minPrimary - minimum elements in primary envelope
      minSecondary - minimum elements in secondary envelope
    • setDhsvRequired

      public void setDhsvRequired(boolean required)
      Override DHSV requirement.
      Parameters:
      required - true if DHSV is required
    • setIsvRequired

      public void setIsvRequired(boolean required)
      Override ISV requirement.
      Parameters:
      required - true if ISV is required
    • setAnnulusMonitoringRequired

      public void setAnnulusMonitoringRequired(boolean required)
      Set whether annulus monitoring is required.
      Parameters:
      required - true if required
    • validate

      public boolean validate()
      Validate the barrier schematic against NORSOK D-010 requirements.

      Checks the two-barrier principle, minimum element counts, safety valve requirements (DHSV for producers, ISV for injectors), and envelope integrity.

      Returns:
      true if all checks pass
    • hasSafetyValve

      private boolean hasSafetyValve(BarrierElement.ElementType type)
      Check if a specific safety valve type exists in any envelope.
      Parameters:
      type - the element type to search for
      Returns:
      true if found in primary or secondary envelope
    • isPassed

      public boolean isPassed()
      Check if the validation passed.
      Returns:
      true if all checks passed
    • getIssueCount

      public int getIssueCount()
      Get the number of issues found.
      Returns:
      issue count
    • getIssues

      public List<String> getIssues()
      Get all validation issues and notes.
      Returns:
      unmodifiable list of issues
    • getAppliedStandards

      public List<String> getAppliedStandards()
      Get applied standards references.
      Returns:
      list of applied standard references
    • getWellType

      public String getWellType()
      Get the well type.
      Returns:
      well type string
    • toMap

      public Map<String,Object> toMap()
      Get a summary map for JSON reporting.
      Returns:
      map of schematic status and details