Class HydrogenMaterialAssessment

java.lang.Object
neqsim.process.corrosion.HydrogenMaterialAssessment
All Implemented Interfaces:
Serializable

public class HydrogenMaterialAssessment extends Object implements Serializable
Comprehensive hydrogen material compatibility assessment.

Evaluates whether materials are suitable for hydrogen-containing service based on multiple degradation mechanisms and industry standards. Integrates with NeqSim thermodynamic systems to extract hydrogen partial pressures and phase conditions.

Degradation Mechanisms Assessed

  • Hydrogen Embrittlement (HE) — Loss of ductility and fracture toughness at ambient temperatures. Controlled by ASME B31.12 and EIGA 121. Severity increases with H2 partial pressure, material strength (SMYS), and cold work.
  • High-Temperature Hydrogen Attack (HTHA) — Internal decarburisation at elevated temperatures (>200°C). Carbon reacts with dissolved H2 to form methane at grain boundaries. Assessed using API 941 Nelson curves.
  • Hydrogen-Induced Cracking (HIC) — Blistering and stepwise cracking in wet H2S environments. H2S promotes atomic hydrogen uptake. Controlled by NACE MR0175/ISO 15156.
  • Stress Corrosion Cracking (SCC) — Combined effect of H2S, chlorides, and stress. Assessed per ISO 15156-2 (carbon steels) and ISO 15156-3 (CRAs).
  • Hydrogen Permeation — Molecular and atomic hydrogen transport through steel walls. Relevant for containment integrity and leak rate estimation.

Standards Implemented

Standards used for hydrogen material assessment
StandardScope
API 941Nelson curves for HTHA boundaries
ASME B31.12Hydrogen piping — material limits, derating, hardness
NACE MR0175 / ISO 15156Sour service material requirements
EIGA 121/14Hydrogen pipeline material compatibility
NORSOK M-001General material selection framework
CGA G-5.6Hydrogen pipeline systems

Usage

// From NeqSim fluid
SystemInterface fluid = new SystemSrkEos(273.15 + 25.0, 90.0);
fluid.addComponent("CO2", 0.96);
fluid.addComponent("hydrogen", 0.0075);
fluid.addComponent("nitrogen", 0.02);
fluid.setMixingRule("classic");

HydrogenMaterialAssessment assessment = new HydrogenMaterialAssessment();
assessment.setFluid(fluid);
assessment.setMaterialGrade("X52");
assessment.setDesignTemperatureC(120.0);
assessment.evaluate();

String overallRisk = assessment.getOverallRiskLevel();
boolean h2Compatible = assessment.isHydrogenEmbrittlementAcceptable();
boolean hthaOk = assessment.isHTHAAcceptable();
String json = assessment.toJson();
Version:
1.0
Author:
ESOL
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Serialization version UID.
      See Also:
    • h2PartialPressureBar

      private double h2PartialPressureBar
      Hydrogen partial pressure in bar.
    • totalPressureBar

      private double totalPressureBar
      Total system pressure in bar.
    • h2MoleFractionGas

      private double h2MoleFractionGas
      Hydrogen mole fraction in the gas phase [0-1].
    • h2MoleFractionBulk

      private double h2MoleFractionBulk
      Hydrogen mole fraction in the bulk/feed fluid [0-1].
    • h2sPartialPressureBar

      private double h2sPartialPressureBar
      H2S partial pressure in bar (for combined sour + H2 assessment).
    • designTemperatureC

      private double designTemperatureC
      Design temperature in degrees Celsius.
    • maxOperatingTemperatureC

      private double maxOperatingTemperatureC
      Maximum operating temperature in degrees Celsius.
    • materialGrade

      private String materialGrade
      Material grade (e.g., "X42", "X52", "X65", "SA-516-70", "316L").
    • smysMPa

      private double smysMPa
      Specified minimum yield strength [MPa].
    • hardnessHRC

      private double hardnessHRC
      Actual hardness [HRC], if known. -1 means unknown.
    • wallThicknessMm

      private double wallThicknessMm
      Wall thickness [mm].
    • pwhtApplied

      private boolean pwhtApplied
      Whether post-weld heat treatment (PWHT) has been applied.
    • freeWaterPresent

      private boolean freeWaterPresent
      Whether the system has free water present.
    • chlorideMgL

      private double chlorideMgL
      Chloride concentration in mg/L.
    • designLifeYears

      private double designLifeYears
      Design life in years.
    • cyclicService

      private boolean cyclicService
      Whether this is cyclic service (fatigue considerations).
    • overallRiskLevel

      private String overallRiskLevel
      Overall risk level: "Low", "Medium", "High", "Very High".
    • heRisk

      private String heRisk
      Hydrogen embrittlement risk.
    • heAcceptable

      private boolean heAcceptable
      Whether HE is acceptable per ASME B31.12.
    • hthaRisk

      private String hthaRisk
      HTHA risk per API 941.
    • hthaAcceptable

      private boolean hthaAcceptable
      Whether HTHA is acceptable (below Nelson curve).
    • hicRisk

      private String hicRisk
      HIC risk (sour service).
    • sourServiceOk

      private boolean sourServiceOk
      Whether sour service requirements are met.
    • hydrogenDeratingFactor

      private double hydrogenDeratingFactor
      Hydrogen derating factor per ASME B31.12.
    • b3112DesignFactor

      private double b3112DesignFactor
      Design factor for hydrogen piping per ASME B31.12.
    • MAX_SMYS_H2

      private static final double MAX_SMYS_H2
      Maximum allowable SMYS for H2 service per ASME B31.12 [MPa].
      See Also:
    • MAX_HARDNESS_H2

      private static final double MAX_HARDNESS_H2
      Maximum hardness for H2 service per ASME B31.12 [HRC].
      See Also:
    • recommendedMaterial

      private String recommendedMaterial
      Recommended material.
    • recommendations

      private List<String> recommendations
      Material recommendations list.
    • warnings

      private List<String> warnings
      Warning notes.
    • standardsApplied

      private List<String> standardsApplied
      Standards applied.
    • evaluated

      private boolean evaluated
      Whether evaluation has been performed.
    • nelsonCurve

      private transient NelsonCurveAssessment nelsonCurve
      Reference to Nelson curve assessment.
  • Constructor Details

    • HydrogenMaterialAssessment

      public HydrogenMaterialAssessment()
      Creates a new HydrogenMaterialAssessment with default parameters.
  • Method Details

    • setFluid

      public void setFluid(SystemInterface fluid)
      Sets hydrogen conditions from a NeqSim thermodynamic system.

      Extracts hydrogen partial pressure, mole fractions, and system conditions from the fluid. The fluid should have been flashed (TPflash) before calling this method.

      Parameters:
      fluid - the NeqSim thermodynamic system (must be flashed)
    • setH2PartialPressureBar

      public void setH2PartialPressureBar(double pressureBar)
      Sets the hydrogen partial pressure directly.
      Parameters:
      pressureBar - hydrogen partial pressure in bar
    • setTotalPressureBar

      public void setTotalPressureBar(double pressureBar)
      Sets the total system pressure.
      Parameters:
      pressureBar - total pressure in bar
    • setH2MoleFractionGas

      public void setH2MoleFractionGas(double fraction)
      Sets the hydrogen mole fraction in the gas phase.
      Parameters:
      fraction - hydrogen mole fraction [0-1]
    • setH2SPartialPressureBar

      public void setH2SPartialPressureBar(double pressureBar)
      Sets the H2S partial pressure for combined sour + H2 assessment.
      Parameters:
      pressureBar - H2S partial pressure in bar
    • setDesignTemperatureC

      public void setDesignTemperatureC(double temperatureC)
      Sets the design temperature.
      Parameters:
      temperatureC - design temperature in degrees Celsius
    • setMaxOperatingTemperatureC

      public void setMaxOperatingTemperatureC(double temperatureC)
      Sets the maximum operating temperature.
      Parameters:
      temperatureC - maximum operating temperature in degrees Celsius
    • setMaterialGrade

      public void setMaterialGrade(String grade)
      Sets the material grade.
      Parameters:
      grade - material grade per API 5L or ASTM (e.g., "X42", "X52", "SA-516-70", "316L")
    • setSmysMPa

      public void setSmysMPa(double smys)
      Sets the specified minimum yield strength directly.
      Parameters:
      smys - SMYS in MPa
    • setHardnessHRC

      public void setHardnessHRC(double hrc)
      Sets the material hardness.
      Parameters:
      hrc - hardness in HRC, or -1 if unknown
    • setWallThicknessMm

      public void setWallThicknessMm(double thicknessMm)
      Sets the wall thickness.
      Parameters:
      thicknessMm - wall thickness in mm
    • setPwhtApplied

      public void setPwhtApplied(boolean applied)
      Sets whether post-weld heat treatment has been applied.
      Parameters:
      applied - true if PWHT has been performed
    • setFreeWaterPresent

      public void setFreeWaterPresent(boolean present)
      Sets whether free water is present.
      Parameters:
      present - true if free water is present
    • setChlorideMgL

      public void setChlorideMgL(double mgL)
      Sets the chloride concentration.
      Parameters:
      mgL - chloride concentration in mg/L
    • setDesignLifeYears

      public void setDesignLifeYears(double years)
      Sets the design life.
      Parameters:
      years - design life in years
    • setCyclicService

      public void setCyclicService(boolean cyclic)
      Sets whether this is cyclic service.
      Parameters:
      cyclic - true if cyclic service (fatigue relevant)
    • evaluate

      public void evaluate()
      Runs the complete hydrogen material assessment.

      Evaluates all degradation mechanisms and produces an overall risk level and material recommendations. Call setters for all known parameters before invoking this method.

    • evaluateHydrogenEmbrittlement

      private void evaluateHydrogenEmbrittlement()
      Evaluates hydrogen embrittlement risk per ASME B31.12.

      Assessment criteria:

      • Maximum SMYS: 480 MPa (69.6 ksi) per Table IX-5A
      • Maximum hardness: 22 HRC per ASME B31.12
      • Design factor: 0.5 for hydrogen (vs 0.72 for natural gas)
      • PWHT required for weld joints
      • Derating factor based on material grade and H2 fraction
    • evaluateHTHA

      private void evaluateHTHA()
      Evaluates high-temperature hydrogen attack (HTHA) risk per API 941.

      Uses Nelson curve boundaries to assess whether operating conditions (temperature, H2 partial pressure) are within safe limits for the selected material.

    • evaluateSourService

      private void evaluateSourService()
      Evaluates sour service requirements per NACE MR0175/ISO 15156.

      When H2S is present alongside H2, there is a combined risk: H2S promotes atomic hydrogen uptake into the steel, increasing susceptibility to HIC, SSC, and SOHIC. Even trace H2S significantly increases hydrogen-related degradation.

    • evaluateCombinedRisk

      private void evaluateCombinedRisk()
      Evaluates combined risk from all mechanisms.
    • generateRecommendation

      private void generateRecommendation()
      Generates material recommendations.
    • calculateDeratingFactor

      private double calculateDeratingFactor()
      Calculates the hydrogen derating factor per ASME B31.12 Table IX-5A.
      Returns:
      derating factor [0-1]
    • mapGradeToNelsonMaterial

      private String mapGradeToNelsonMaterial()
      Maps material grade to Nelson curve material type.
      Returns:
      Nelson curve material identifier
    • updateSmysFromGrade

      private void updateSmysFromGrade()
      Updates SMYS from material grade string.
    • riskScore

      private int riskScore(String risk)
      Converts risk string to numeric score.
      Parameters:
      risk - risk level string
      Returns:
      numeric score (0-4)
    • scoreToRisk

      private String scoreToRisk(int score)
      Converts numeric score to risk level string.
      Parameters:
      score - numeric score (0-4)
      Returns:
      risk level string
    • getOverallRiskLevel

      public String getOverallRiskLevel()
      Gets the overall risk level.
      Returns:
      risk level: "Low", "Medium", "High", or "Very High"
    • getHydrogenEmbrittlementRisk

      public String getHydrogenEmbrittlementRisk()
      Gets the hydrogen embrittlement risk level.
      Returns:
      HE risk level
    • isHydrogenEmbrittlementAcceptable

      public boolean isHydrogenEmbrittlementAcceptable()
      Checks whether hydrogen embrittlement is acceptable.
      Returns:
      true if HE risk is acceptable per ASME B31.12
    • getHTHARisk

      public String getHTHARisk()
      Gets the HTHA risk level per API 941.
      Returns:
      HTHA risk level
    • isHTHAAcceptable

      public boolean isHTHAAcceptable()
      Checks whether HTHA is acceptable per API 941 Nelson curves.
      Returns:
      true if operating point is below Nelson curve
    • getHICRisk

      public String getHICRisk()
      Gets the HIC/sour service risk level.
      Returns:
      HIC risk level
    • isSourServiceOk

      public boolean isSourServiceOk()
      Checks whether sour service requirements are met.
      Returns:
      true if material meets NACE MR0175/ISO 15156
    • getHydrogenDeratingFactor

      public double getHydrogenDeratingFactor()
      Gets the hydrogen derating factor per ASME B31.12.
      Returns:
      derating factor [0-1]
    • getH2PartialPressureBar

      public double getH2PartialPressureBar()
      Gets the hydrogen partial pressure.
      Returns:
      H2 partial pressure [bar]
    • getH2MoleFractionGas

      public double getH2MoleFractionGas()
      Gets the H2 mole fraction in the gas phase.
      Returns:
      mole fraction [0-1]
    • getRecommendedMaterial

      public String getRecommendedMaterial()
      Gets the recommended material.
      Returns:
      recommended material string
    • getRecommendations

      public List<String> getRecommendations()
      Gets all material recommendations.
      Returns:
      list of recommendations
    • getWarnings

      public List<String> getWarnings()
      Gets all warnings.
      Returns:
      list of warnings
    • getStandardsApplied

      public List<String> getStandardsApplied()
      Gets the list of standards applied in the assessment.
      Returns:
      list of standard identifiers
    • getNelsonCurveAssessment

      public NelsonCurveAssessment getNelsonCurveAssessment()
      Gets the Nelson curve assessment object for detailed HTHA results.
      Returns:
      Nelson curve assessment
    • isEvaluated

      public boolean isEvaluated()
      Checks whether the evaluation has been performed.
      Returns:
      true if evaluate() has been called
    • toMap

      public Map<String,Object> toMap()
      Returns the assessment results as a Map.
      Returns:
      results as linked hash map
    • toJson

      public String toJson()
      Returns the assessment results as a JSON string.
      Returns:
      JSON representation of the assessment