Class SafetyInstrumentedFunction

java.lang.Object
neqsim.process.safety.risk.sis.SafetyInstrumentedFunction
All Implemented Interfaces:
Serializable

public class SafetyInstrumentedFunction extends Object implements Serializable
Represents a Safety Instrumented Function (SIF) for risk reduction calculation.

A SIF is a safety function implemented by a Safety Instrumented System (SIS) that brings the process to a safe state when a dangerous condition is detected. Key metrics include:

  • Safety Integrity Level (SIL 1-4)
  • Probability of Failure on Demand (PFD)
  • Risk Reduction Factor (RRF = 1/PFD)

SIL Levels and PFD Ranges

Safety Integrity Level Requirements
SIL PFD Range RRF Range
1 0.01 - 0.1 10 - 100
2 0.001 - 0.01 100 - 1,000
3 0.0001 - 0.001 1,000 - 10,000
4 0.00001 - 0.0001 10,000 - 100,000

Example Usage


SafetyInstrumentedFunction hipps = SafetyInstrumentedFunction.builder().name("HIPPS-001")
    .description("High Integrity Pipeline Protection System").sil(3).pfd(0.001)
    .protectedEquipment(Arrays.asList("Export Pipeline", "Riser"))
    .initiatingEvent("Overpressure").build();

double unmitigatedFrequency = 0.1; // per year
double mitigatedFrequency = hipps.getMitigatedFrequency(unmitigatedFrequency);
// mitigatedFrequency = 0.0001 per year

Version:
1.0
Author:
NeqSim Development Team
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • id

      private String id
      SIF identifier.
    • name

      private String name
      SIF name.
    • description

      private String description
      SIF description.
    • sil

      private int sil
      Safety Integrity Level (1-4).
    • pfdAvg

      private double pfdAvg
      Probability of Failure on Demand (average).
    • testIntervalHours

      private double testIntervalHours
      Test interval in hours.
    • mttr

      private double mttr
      Mean Time To Repair in hours.
    • protectedEquipment

      private List<String> protectedEquipment
      Equipment protected by this SIF.
    • initiatingEvent

      private String initiatingEvent
      Initiating event that triggers this SIF.
    • safeState

      private String safeState
      Safe state description.
    • category

      SIF category (ESD, HIPPS, Fire and Gas, etc.).
    • architecture

      private String architecture
      Architecture (1oo1, 1oo2, 2oo3, etc.).
    • spuriousTripRate

      private double spuriousTripRate
      Spurious trip rate per year.
    • lastProofTest

      private Date lastProofTest
      Last proof test date.
    • notes

      private String notes
      Notes and comments.
  • Constructor Details

    • SafetyInstrumentedFunction

      public SafetyInstrumentedFunction()
      Creates an empty SIF.
    • SafetyInstrumentedFunction

      public SafetyInstrumentedFunction(String name, int sil, double pfd)
      Creates a SIF with basic parameters.
      Parameters:
      name - SIF name
      sil - Safety Integrity Level (1-4)
      pfd - Probability of Failure on Demand
  • Method Details

    • builder

      public static SafetyInstrumentedFunction.Builder builder()
      Creates a builder for SafetyInstrumentedFunction.
      Returns:
      new builder
    • validateSil

      private int validateSil(int sil)
    • validatePfd

      private double validatePfd(double pfd, int sil)
    • getRiskReductionFactor

      public double getRiskReductionFactor()
      Calculates the Risk Reduction Factor.
      Returns:
      RRF = 1/PFD
    • getMitigatedFrequency

      public double getMitigatedFrequency(double unmitigatedFrequency)
      Calculates the mitigated frequency after SIF credit.
      Parameters:
      unmitigatedFrequency - base event frequency (per year)
      Returns:
      mitigated frequency (per year)
    • calculateRequiredPfd

      public static double calculateRequiredPfd(double unmitigatedFrequency, double targetFrequency)
      Calculates required SIF capability for target risk reduction.
      Parameters:
      unmitigatedFrequency - current frequency
      targetFrequency - target frequency
      Returns:
      required PFD
    • getRequiredSil

      public static int getRequiredSil(double targetPfd)
      Determines required SIL for a target PFD.
      Parameters:
      targetPfd - target PFD
      Returns:
      minimum SIL required
    • getMaxPfdForSil

      public static double getMaxPfdForSil(int sil)
      Gets the maximum PFD allowed for a given SIL level.
      Parameters:
      sil - Safety Integrity Level (1-4)
      Returns:
      maximum PFD for that SIL
    • getProofTestIntervalYears

      public double getProofTestIntervalYears()
      Gets proof test interval in years.
      Returns:
      test interval in years
    • calculatePfd1oo1

      public static double calculatePfd1oo1(double lambdaDU, double testInterval)
      Calculates PFD from component failure rates (simplified 1oo1 model).
      Parameters:
      lambdaDU - dangerous undetected failure rate (per hour)
      testInterval - proof test interval (hours)
      Returns:
      average PFD
    • calculatePfd1oo2

      public static double calculatePfd1oo2(double lambdaDU, double testInterval)
      Calculates PFD for 1oo2 architecture.
      Parameters:
      lambdaDU - dangerous undetected failure rate per channel (per hour)
      testInterval - proof test interval (hours)
      Returns:
      average PFD
    • calculatePfd2oo3

      public static double calculatePfd2oo3(double lambdaDU, double testInterval)
      Calculates PFD for 2oo3 architecture.
      Parameters:
      lambdaDU - dangerous undetected failure rate per channel (per hour)
      testInterval - proof test interval (hours)
      Returns:
      average PFD
    • getAvailabilityWithSpuriousTrips

      public double getAvailabilityWithSpuriousTrips(double baseAvailability, double mttrHours)
      Calculates availability including SIF spurious trips.
      Parameters:
      baseAvailability - baseline availability without spurious trips
      mttrHours - mean time to restore after spurious trip
      Returns:
      availability accounting for spurious trips
    • getId

      public String getId()
    • getName

      public String getName()
    • getDescription

      public String getDescription()
    • getSil

      public int getSil()
    • getPfdAvg

      public double getPfdAvg()
    • getTestIntervalHours

      public double getTestIntervalHours()
    • getMttr

      public double getMttr()
    • getProtectedEquipment

      public List<String> getProtectedEquipment()
    • getInitiatingEvent

      public String getInitiatingEvent()
    • getSafeState

      public String getSafeState()
    • getCategory

    • getArchitecture

      public String getArchitecture()
    • getSpuriousTripRate

      public double getSpuriousTripRate()
    • getNotes

      public String getNotes()
    • setId

      public void setId(String id)
    • setName

      public void setName(String name)
    • setDescription

      public void setDescription(String description)
    • setSil

      public void setSil(int sil)
    • setPfdAvg

      public void setPfdAvg(double pfd)
    • setTestIntervalHours

      public void setTestIntervalHours(double hours)
    • setMttr

      public void setMttr(double hours)
    • setProtectedEquipment

      public void setProtectedEquipment(List<String> equipment)
    • addProtectedEquipment

      public void addProtectedEquipment(String equipment)
    • setInitiatingEvent

      public void setInitiatingEvent(String event)
    • setSafeState

      public void setSafeState(String state)
    • setCategory

      public void setCategory(SafetyInstrumentedFunction.SIFCategory category)
    • setArchitecture

      public void setArchitecture(String arch)
    • setSpuriousTripRate

      public void setSpuriousTripRate(double rate)
    • setNotes

      public void setNotes(String notes)
    • toMap

      public Map<String,Object> toMap()
      Converts to map for JSON serialization.
      Returns:
      map representation
    • toJson

      public String toJson()
      Converts to JSON string.
      Returns:
      JSON representation
    • toString

      public String toString()
      Overrides:
      toString in class Object