Class ProcessSafetyReportBuilder
java.lang.Object
neqsim.process.util.report.safety.ProcessSafetyReportBuilder
Builder that collects safety information for a
ProcessSystem. The builder aggregates
condition monitoring messages, equipment safety margins, relief valve diagnostics and
thermodynamic KPIs before serializing the result using the familiar Report utilities.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static interface -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ConditionMonitorprivate static final org.apache.logging.log4j.Loggerprivate final ProcessSystemprivate ReportConfigprivate Stringprivate ProcessSafetyThresholds -
Constructor Summary
ConstructorsConstructorDescriptionProcessSafetyReportBuilder(ProcessSystem processSystem) Create a builder for the supplied process system. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build theProcessSafetyReport.buildReliefAssessment(SafetyReliefValve valve, ProcessSafetyThresholds thresholds) buildReliefAssessment(SafetyValve valve, ProcessSafetyThresholds thresholds) private SeverityLevelclassifyConditionSeverity(String messageLower) private List<ProcessSafetyReport.ConditionFinding> collectConditionFindings(ConditionMonitor monitor) collectReliefAssessments(ProcessSafetyThresholds appliedThresholds) collectSafetyMargins(ProcessSafetyThresholds appliedThresholds) collectSystemKpis(ProcessSafetyThresholds thresholds) private doubleextractMassFlow(StreamInterface stream) private Stringprivate SeverityLevelgradeHighIsBad(double warningThreshold, double criticalThreshold, double value) private SeverityLevelgradeSafetyMargin(ProcessSafetyThresholds thresholds, double marginFraction) private SeverityLevelgradeUtilisation(ProcessSafetyThresholds thresholds, double utilisation) private doubleprivate doublewithConditionMonitor(ConditionMonitor monitor) Provide a pre-configuredConditionMonitor.Configure report serialization options.withScenarioLabel(String label) Optional descriptive scenario label included in serialized output.withThresholds(ProcessSafetyThresholds thresholds) Configure safety thresholds.
-
Field Details
-
logger
private static final org.apache.logging.log4j.Logger logger -
processSystem
-
conditionMonitor
-
thresholds
-
reportConfig
-
scenarioLabel
-
-
Constructor Details
-
ProcessSafetyReportBuilder
Create a builder for the supplied process system.- Parameters:
processSystem- process to analyse
-
-
Method Details
-
withConditionMonitor
Provide a pre-configuredConditionMonitor. If not supplied the builder will instantiate one based on the process itself.- Parameters:
monitor- monitor instance- Returns:
- this builder
-
withThresholds
Configure safety thresholds.- Parameters:
thresholds- thresholds- Returns:
- this builder
-
withReportConfig
Configure report serialization options.- Parameters:
cfg- report configuration- Returns:
- this builder
-
withScenarioLabel
Optional descriptive scenario label included in serialized output.- Parameters:
label- scenario label- Returns:
- this builder
-
build
Build theProcessSafetyReport. The method is thread-safe but will copy internal data to avoid exposing mutable state.- Returns:
- built report
-
collectConditionFindings
private List<ProcessSafetyReport.ConditionFinding> collectConditionFindings(ConditionMonitor monitor) -
classifyConditionSeverity
-
collectSafetyMargins
private List<ProcessSafetyReport.SafetyMarginAssessment> collectSafetyMargins(ProcessSafetyThresholds appliedThresholds) -
gradeSafetyMargin
-
collectReliefAssessments
private List<ProcessSafetyReport.ReliefDeviceAssessment> collectReliefAssessments(ProcessSafetyThresholds appliedThresholds) -
buildReliefAssessment
private ProcessSafetyReport.ReliefDeviceAssessment buildReliefAssessment(SafetyReliefValve valve, ProcessSafetyThresholds thresholds) -
buildReliefAssessment
private ProcessSafetyReport.ReliefDeviceAssessment buildReliefAssessment(SafetyValve valve, ProcessSafetyThresholds thresholds) -
safeDouble
-
extractMassFlow
-
normalizeOpenFraction
-
gradeUtilisation
-
collectSystemKpis
-
gradeHighIsBad
private SeverityLevel gradeHighIsBad(double warningThreshold, double criticalThreshold, double value) -
generateEquipmentJson
-