Class HydrogenMaterialAssessment
- All Implemented Interfaces:
Serializable
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
| Standard | Scope |
|---|---|
| API 941 | Nelson curves for HTHA boundaries |
| ASME B31.12 | Hydrogen piping — material limits, derating, hardness |
| NACE MR0175 / ISO 15156 | Sour service material requirements |
| EIGA 121/14 | Hydrogen pipeline material compatibility |
| NORSOK M-001 | General material selection framework |
| CGA G-5.6 | Hydrogen 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 Summary
FieldsModifier and TypeFieldDescriptionprivate doubleDesign factor for hydrogen piping per ASME B31.12.private doubleChloride concentration in mg/L.private booleanWhether this is cyclic service (fatigue considerations).private doubleDesign life in years.private doubleDesign temperature in degrees Celsius.private booleanWhether evaluation has been performed.private booleanWhether the system has free water present.private doubleHydrogen mole fraction in the bulk/feed fluid [0-1].private doubleHydrogen mole fraction in the gas phase [0-1].private doubleHydrogen partial pressure in bar.private doubleH2S partial pressure in bar (for combined sour + H2 assessment).private doubleActual hardness [HRC], if known. -1 means unknown.private booleanWhether HE is acceptable per ASME B31.12.private StringHydrogen embrittlement risk.private StringHIC risk (sour service).private booleanWhether HTHA is acceptable (below Nelson curve).private StringHTHA risk per API 941.private doubleHydrogen derating factor per ASME B31.12.private StringMaterial grade (e.g., "X42", "X52", "X65", "SA-516-70", "316L").private static final doubleMaximum hardness for H2 service per ASME B31.12 [HRC].private static final doubleMaximum allowable SMYS for H2 service per ASME B31.12 [MPa].private doubleMaximum operating temperature in degrees Celsius.private NelsonCurveAssessmentReference to Nelson curve assessment.private StringOverall risk level: "Low", "Medium", "High", "Very High".private booleanWhether post-weld heat treatment (PWHT) has been applied.Material recommendations list.private StringRecommended material.private static final longSerialization version UID.private doubleSpecified minimum yield strength [MPa].private booleanWhether sour service requirements are met.Standards applied.private doubleTotal system pressure in bar.private doubleWall thickness [mm].Warning notes. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new HydrogenMaterialAssessment with default parameters. -
Method Summary
Modifier and TypeMethodDescriptionprivate doubleCalculates the hydrogen derating factor per ASME B31.12 Table IX-5A.voidevaluate()Runs the complete hydrogen material assessment.private voidEvaluates combined risk from all mechanisms.private voidEvaluates high-temperature hydrogen attack (HTHA) risk per API 941.private voidEvaluates hydrogen embrittlement risk per ASME B31.12.private voidEvaluates sour service requirements per NACE MR0175/ISO 15156.private voidGenerates material recommendations.doubleGets the H2 mole fraction in the gas phase.doubleGets the hydrogen partial pressure.Gets the HIC/sour service risk level.Gets the HTHA risk level per API 941.doubleGets the hydrogen derating factor per ASME B31.12.Gets the hydrogen embrittlement risk level.Gets the Nelson curve assessment object for detailed HTHA results.Gets the overall risk level.Gets all material recommendations.Gets the recommended material.Gets the list of standards applied in the assessment.Gets all warnings.booleanChecks whether the evaluation has been performed.booleanChecks whether HTHA is acceptable per API 941 Nelson curves.booleanChecks whether hydrogen embrittlement is acceptable.booleanChecks whether sour service requirements are met.private StringMaps material grade to Nelson curve material type.private intConverts risk string to numeric score.private StringscoreToRisk(int score) Converts numeric score to risk level string.voidsetChlorideMgL(double mgL) Sets the chloride concentration.voidsetCyclicService(boolean cyclic) Sets whether this is cyclic service.voidsetDesignLifeYears(double years) Sets the design life.voidsetDesignTemperatureC(double temperatureC) Sets the design temperature.voidsetFluid(SystemInterface fluid) Sets hydrogen conditions from a NeqSim thermodynamic system.voidsetFreeWaterPresent(boolean present) Sets whether free water is present.voidsetH2MoleFractionGas(double fraction) Sets the hydrogen mole fraction in the gas phase.voidsetH2PartialPressureBar(double pressureBar) Sets the hydrogen partial pressure directly.voidsetH2SPartialPressureBar(double pressureBar) Sets the H2S partial pressure for combined sour + H2 assessment.voidsetHardnessHRC(double hrc) Sets the material hardness.voidsetMaterialGrade(String grade) Sets the material grade.voidsetMaxOperatingTemperatureC(double temperatureC) Sets the maximum operating temperature.voidsetPwhtApplied(boolean applied) Sets whether post-weld heat treatment has been applied.voidsetSmysMPa(double smys) Sets the specified minimum yield strength directly.voidsetTotalPressureBar(double pressureBar) Sets the total system pressure.voidsetWallThicknessMm(double thicknessMm) Sets the wall thickness.toJson()Returns the assessment results as a JSON string.toMap()Returns the assessment results as a Map.private voidUpdates SMYS from material grade string.
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version UID.- See Also:
-
h2PartialPressureBar
private double h2PartialPressureBarHydrogen partial pressure in bar. -
totalPressureBar
private double totalPressureBarTotal system pressure in bar. -
h2MoleFractionGas
private double h2MoleFractionGasHydrogen mole fraction in the gas phase [0-1]. -
h2MoleFractionBulk
private double h2MoleFractionBulkHydrogen mole fraction in the bulk/feed fluid [0-1]. -
h2sPartialPressureBar
private double h2sPartialPressureBarH2S partial pressure in bar (for combined sour + H2 assessment). -
designTemperatureC
private double designTemperatureCDesign temperature in degrees Celsius. -
maxOperatingTemperatureC
private double maxOperatingTemperatureCMaximum operating temperature in degrees Celsius. -
materialGrade
Material grade (e.g., "X42", "X52", "X65", "SA-516-70", "316L"). -
smysMPa
private double smysMPaSpecified minimum yield strength [MPa]. -
hardnessHRC
private double hardnessHRCActual hardness [HRC], if known. -1 means unknown. -
wallThicknessMm
private double wallThicknessMmWall thickness [mm]. -
pwhtApplied
private boolean pwhtAppliedWhether post-weld heat treatment (PWHT) has been applied. -
freeWaterPresent
private boolean freeWaterPresentWhether the system has free water present. -
chlorideMgL
private double chlorideMgLChloride concentration in mg/L. -
designLifeYears
private double designLifeYearsDesign life in years. -
cyclicService
private boolean cyclicServiceWhether this is cyclic service (fatigue considerations). -
overallRiskLevel
Overall risk level: "Low", "Medium", "High", "Very High". -
heRisk
Hydrogen embrittlement risk. -
heAcceptable
private boolean heAcceptableWhether HE is acceptable per ASME B31.12. -
hthaRisk
HTHA risk per API 941. -
hthaAcceptable
private boolean hthaAcceptableWhether HTHA is acceptable (below Nelson curve). -
hicRisk
HIC risk (sour service). -
sourServiceOk
private boolean sourServiceOkWhether sour service requirements are met. -
hydrogenDeratingFactor
private double hydrogenDeratingFactorHydrogen derating factor per ASME B31.12. -
b3112DesignFactor
private double b3112DesignFactorDesign factor for hydrogen piping per ASME B31.12. -
MAX_SMYS_H2
private static final double MAX_SMYS_H2Maximum allowable SMYS for H2 service per ASME B31.12 [MPa].- See Also:
-
MAX_HARDNESS_H2
private static final double MAX_HARDNESS_H2Maximum hardness for H2 service per ASME B31.12 [HRC].- See Also:
-
recommendedMaterial
Recommended material. -
recommendations
-
warnings
-
standardsApplied
-
evaluated
private boolean evaluatedWhether evaluation has been performed. -
nelsonCurve
Reference to Nelson curve assessment.
-
-
Constructor Details
-
HydrogenMaterialAssessment
public HydrogenMaterialAssessment()Creates a new HydrogenMaterialAssessment with default parameters.
-
-
Method Details
-
setFluid
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
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
Maps material grade to Nelson curve material type.- Returns:
- Nelson curve material identifier
-
updateSmysFromGrade
private void updateSmysFromGrade()Updates SMYS from material grade string. -
riskScore
Converts risk string to numeric score.- Parameters:
risk- risk level string- Returns:
- numeric score (0-4)
-
scoreToRisk
Converts numeric score to risk level string.- Parameters:
score- numeric score (0-4)- Returns:
- risk level string
-
getOverallRiskLevel
Gets the overall risk level.- Returns:
- risk level: "Low", "Medium", "High", or "Very High"
-
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
-
isHTHAAcceptable
public boolean isHTHAAcceptable()Checks whether HTHA is acceptable per API 941 Nelson curves.- Returns:
- true if operating point is below Nelson curve
-
getHICRisk
-
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
Gets the recommended material.- Returns:
- recommended material string
-
getRecommendations
-
getWarnings
-
getStandardsApplied
-
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
-
toJson
Returns the assessment results as a JSON string.- Returns:
- JSON representation of the assessment
-