Class SafetyInstrumentedFunction
java.lang.Object
neqsim.process.safety.risk.sis.SafetyInstrumentedFunction
- All Implemented Interfaces:
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
| 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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for SafetyInstrumentedFunction.static enumSIF categories. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StringArchitecture (1oo1, 1oo2, 2oo3, etc.).SIF category (ESD, HIPPS, Fire and Gas, etc.).private StringSIF description.private StringSIF identifier.private StringInitiating event that triggers this SIF.private DateLast proof test date.private doubleMean Time To Repair in hours.private StringSIF name.private StringNotes and comments.private doubleProbability of Failure on Demand (average).Equipment protected by this SIF.private StringSafe state description.private static final longprivate intSafety Integrity Level (1-4).private doubleSpurious trip rate per year.private doubleTest interval in hours. -
Constructor Summary
ConstructorsConstructorDescriptionCreates an empty SIF.SafetyInstrumentedFunction(String name, int sil, double pfd) Creates a SIF with basic parameters. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProtectedEquipment(String equipment) builder()Creates a builder for SafetyInstrumentedFunction.static doublecalculatePfd1oo1(double lambdaDU, double testInterval) Calculates PFD from component failure rates (simplified 1oo1 model).static doublecalculatePfd1oo2(double lambdaDU, double testInterval) Calculates PFD for 1oo2 architecture.static doublecalculatePfd2oo3(double lambdaDU, double testInterval) Calculates PFD for 2oo3 architecture.static doublecalculateRequiredPfd(double unmitigatedFrequency, double targetFrequency) Calculates required SIF capability for target risk reduction.doublegetAvailabilityWithSpuriousTrips(double baseAvailability, double mttrHours) Calculates availability including SIF spurious trips.getId()static doublegetMaxPfdForSil(int sil) Gets the maximum PFD allowed for a given SIL level.doublegetMitigatedFrequency(double unmitigatedFrequency) Calculates the mitigated frequency after SIF credit.doublegetMttr()getName()getNotes()doubledoubleGets proof test interval in years.static intgetRequiredSil(double targetPfd) Determines required SIL for a target PFD.doubleCalculates the Risk Reduction Factor.intgetSil()doubledoublevoidsetArchitecture(String arch) voidvoidsetDescription(String description) voidvoidsetInitiatingEvent(String event) voidsetMttr(double hours) voidvoidvoidsetPfdAvg(double pfd) voidsetProtectedEquipment(List<String> equipment) voidsetSafeState(String state) voidsetSil(int sil) voidsetSpuriousTripRate(double rate) voidsetTestIntervalHours(double hours) toJson()Converts to JSON string.toMap()Converts to map for JSON serialization.toString()private doublevalidatePfd(double pfd, int sil) private intvalidateSil(int sil)
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
id
SIF identifier. -
name
SIF name. -
description
SIF description. -
sil
private int silSafety Integrity Level (1-4). -
pfdAvg
private double pfdAvgProbability of Failure on Demand (average). -
testIntervalHours
private double testIntervalHoursTest interval in hours. -
mttr
private double mttrMean Time To Repair in hours. -
protectedEquipment
-
initiatingEvent
Initiating event that triggers this SIF. -
safeState
Safe state description. -
category
SIF category (ESD, HIPPS, Fire and Gas, etc.). -
architecture
Architecture (1oo1, 1oo2, 2oo3, etc.). -
spuriousTripRate
private double spuriousTripRateSpurious trip rate per year. -
lastProofTest
Last proof test date. -
notes
Notes and comments.
-
-
Constructor Details
-
SafetyInstrumentedFunction
public SafetyInstrumentedFunction()Creates an empty SIF. -
SafetyInstrumentedFunction
Creates a SIF with basic parameters.- Parameters:
name- SIF namesil- Safety Integrity Level (1-4)pfd- Probability of Failure on Demand
-
-
Method Details
-
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 frequencytargetFrequency- 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 tripsmttrHours- mean time to restore after spurious trip- Returns:
- availability accounting for spurious trips
-
getId
-
getName
-
getDescription
-
getSil
public int getSil() -
getPfdAvg
public double getPfdAvg() -
getTestIntervalHours
public double getTestIntervalHours() -
getMttr
public double getMttr() -
getProtectedEquipment
-
getInitiatingEvent
-
getSafeState
-
getCategory
-
getArchitecture
-
getSpuriousTripRate
public double getSpuriousTripRate() -
getNotes
-
setId
-
setName
-
setDescription
-
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
-
addProtectedEquipment
-
setInitiatingEvent
-
setSafeState
-
setCategory
-
setArchitecture
-
setSpuriousTripRate
public void setSpuriousTripRate(double rate) -
setNotes
-
toMap
-
toJson
-
toString
-