agentleFS
equinorequinor/neqsim/.github/skills/neqsim-ccs-hydrogen/SKILL.md

neqsim-ccs-hydrogen

Skill167 starsChanged 7 months agoApache-2.0View on GitHub

CO2 capture, transport, storage (CCS) and hydrogen systems patterns for NeqSim. USE WHEN: modeling CO2 pipelines, injection wells, impurity effects on phase behavior, CO2 dense phase transport, hydrogen blending, electrolysis, or any CCS/H2 value chain analysis. Covers CO2 phase behavior, impurity management, well integrity, and hydrogen systems.

The file

Files
SKILL.md

CCS and Hydrogen Systems with NeqSim

Guide for modeling carbon capture and storage (CCS) value chains and hydrogen systems, including CO2 transport, injection wells, impurity effects, and H2 blending.

When to Use This Skill

  • CO2 pipeline design and phase behavior
  • CO2 injection well analysis and safety
  • Impurity effects on CO2 phase envelope (H2, N2, O2, H2S, CH4)
  • Dense phase CO2 transport conditions
  • CO2 dehydration requirements
  • Hydrogen blending with natural gas
  • Water electrolysis and green hydrogen
  • Blue hydrogen (SMR/ATR + CCS)
  • Hydrogen pipeline transport

Applicable Standards

DomainStandardsKey Requirements
CO2 pipelineDNV-RP-F104, ISO 27913, DNV-ST-F101Project composition/phase envelope, transport hydraulics, structural design, fracture/materials/corrosion and lifecycle evidence
CO2 storageISO 27914, EU CCS DirectiveStorage site characterization
CO2 transportISO 27913Composition specs, phase management
CO2 qualityISO 27916CO2 stream specification
Hydrogen pipelineASME B31.12H2 piping and pipelines
Hydrogen qualityISO 14687 (fuel cell), EN 16726 (grid)Purity requirements

1. CO2 Phase Behavior

CO2 Critical Point and Phase Envelope

The pure-CO2 critical point is useful for model verification, but it is not a transport acceptance boundary for an impure project stream. Calculate and validate the phase envelope for the actual bounded composition and operating path.

// Pure CO2 phase behavior
SystemInterface co2 = new SystemSrkEos(273.15 + 25, 80.0);
co2.addComponent("CO2", 1.0);
co2.setMixingRule("classic");

ThermodynamicOperations ops = new ThermodynamicOperations(co2);
ops.calcPTphaseEnvelope();
// Inspect the calculated phase state; do not infer F104 acceptance from pure-CO2 P/T alone.

Impurity Effects on CO2 Phase Envelope

Impurities widen the phase envelope and raise the cricondenbar, creating risk of two-phase flow in pipelines designed for dense phase operation.

// CO2 with typical impurities from post-combustion capture
SystemInterface co2Mix = new SystemSrkEos(273.15 + 10, 110.0);
co2Mix.addComponent("CO2", 0.95);
co2Mix.addComponent("nitrogen", 0.02);
co2Mix.addComponent("oxygen", 0.005);
co2Mix.addComponent("water", 0.005);
co2Mix.addComponent("H2S", 0.001);
co2Mix.addComponent("hydrogen", 0.005);
co2Mix.addComponent("methane", 0.014);
co2Mix.setMixingRule("classic");
co2Mix.setMultiPhaseCheck(true);

ThermodynamicOperations ops = new ThermodynamicOperations(co2Mix);
ops.calcPTphaseEnvelope();
// Compare cricondenbar with pure CO2 — impurities raise it significantly
// N2, H2, O2 have the largest effect on raising cricondenbar

Impurity Impact Ranking (on phase envelope)

ImpurityEffect on CricondenbarEffect on DensityCorrosion Risk
N2Large increaseDecreaseNone
H2Large increaseLarge decreaseEmbrittlement
O2Moderate increaseSlight decreaseOxidation
ArModerate increaseSlight decreaseNone
CH4Moderate increaseDecreaseNone
H2SSmall increaseSlight increaseHigh (sour)
SO2Small effectSlight increaseHigh (acid)
H2OMinimal on vapor—Corrosion with CO2

2. CO2 Pipeline Design

Caller-controlled F104 transport-envelope screening

For the current DNV-RP-F104 2021-02+AMD:2021-09 catalog basis, use DnvRpF104Co2PipelineEnvelopeScreeningKernel. Supply project-controlled composition limits, MAOP, design temperatures, and a verified minimum single-phase pressure boundary at each ordered pressure-temperature profile point. The minimum-pressure interpretation must be validated for the specific composition, EOS, temperature, path, and uncertainty basis.

The kernel reports composition and operating margins only. Negative margins are calculated findings, not DNV decisions. Missing composition/EOS/profile/limits/integrity/lifecycle evidence blocks execution. Use StandardRequirementPackRegistry.lookup(StandardType.DNV_RP_F104) to discover bounded related capabilities; the pack is not a requirements-coverage claim.

StandardEdition edition = StandardEdition.defaultEdition(StandardType.DNV_RP_F104);
DnvRpF104Co2PipelineEnvelopeScreeningKernel.Input input =
    DnvRpF104Co2PipelineEnvelopeScreeningKernel.Input
        .builder(edition, "Pipeline")
        .co2MoleFraction(projectCo2MoleFraction)
        .minimumCo2MoleFraction(projectMinimumCo2MoleFraction)
        .waterMoleFraction(projectWaterMoleFraction)
        .maximumWaterMoleFraction(projectMaximumWaterMoleFraction)
        .otherImpuritiesWithinProjectSpecification(otherImpuritiesWithinSpecification)
        .designMinimumTemperatureK(projectMinimumTemperatureK)
        .designMaximumTemperatureK(projectMaximumTemperatureK)
        .maximumAllowableOperatingPressurePaAbsolute(projectMaopPaAbsolute)
        .addOperatingPoint(new DnvRpF104Co2PipelineEnvelopeScreeningKernel.OperatingPoint(
            "inlet", 0.0, inletPressurePaAbsolute, inletTemperatureK,
            inletMinimumSinglePhasePressurePaAbsolute))
        .co2PipelineApplicabilityVerified(true)
        .compositionAndSpecificationVerified(true)
        .thermodynamicModelVerified(true)
        .singlePhaseBoundaryInterpretationVerified(true)
        .operatingProfileVerified(true)
        .pressureTemperatureLimitsVerified(true)
        .materialsCorrosionAndFractureBasisVerified(true)
        .safetyConstructionOperationsAndRequalificationReviewed(true)
        .build();
EngineeringCalculationResult<DnvRpF104Co2PipelineEnvelopeAssessment> result =
    new DnvRpF104Co2PipelineEnvelopeScreeningKernel().calculate(input, null);

Hydraulic and thermal profile

// Demonstration conditions only; use the controlled project operating envelope.
Stream co2Feed = new Stream("CO2 Feed", co2Mix);
co2Feed.setFlowRate(1000000.0, "kg/hr");  // ~1 Mt/yr
co2Feed.setTemperature(25.0, "C");
co2Feed.setPressure(110.0, "bara");

PipeBeggsAndBrills pipeline = new PipeBeggsAndBrills("CO2 Pipeline", co2Feed);
pipeline.setLength(150000.0);     // 150 km
pipeline.setDiameter(0.508);       // 20 inch
pipeline.setPipeWallRoughness(5e-5);
pipeline.setOuterTemperature(277.15);  // 4°C seabed
pipeline.run();

double outP = pipeline.getOutletStream().getPressure();
double outT = pipeline.getOutletStream().getTemperature() - 273.15;
// Compare the complete profile with composition-specific, externally verified phase boundaries.

CO2 Dehydration Requirement

// Use the controlled project water specification; do not embed a universal ppm limit.
// Use CPA for accurate water in CO2 modeling
SystemInterface wetCO2 = new SystemSrkCPAstatoil(273.15 + 25, 110.0);
wetCO2.addComponent("CO2", 0.99);
wetCO2.addComponent("water", 0.01);
wetCO2.setMixingRule(10);
wetCO2.setMultiPhaseCheck(true);

ThermodynamicOperations ops = new ThermodynamicOperations(wetCO2);
ops.TPflash();
wetCO2.initProperties();

// Check water content in CO2-rich phase
double waterInCO2 = wetCO2.getPhase("gas").getComponent("water").getx();
// Convert to the project specification basis and retain the sampling/model uncertainty.

3. CO2 Injection Well Analysis

Full-Stack Well Analysis

CO2InjectionWellAnalyzer analyzer = new CO2InjectionWellAnalyzer("InjWell-1");
analyzer.setFluid(co2Fluid);
analyzer.setWellGeometry(1300.0, 0.1571, 5e-5);  // depth, ID, roughness
analyzer.setOperatingConditions(90.0, 25.0, 150000.0);  // P, T, flow
analyzer.setFormationTemperature(4.0, 43.0);  // surface T, bottomhole T
analyzer.addTrackedComponent("hydrogen", 0.10);  // impurity limit
analyzer.runFullAnalysis();

boolean safe = analyzer.isSafeToOperate();
// Checks: phase transitions in wellbore, impurity enrichment, thermal stress

Wellbore Temperature Profile

PipeBeggsAndBrills wellbore = new PipeBeggsAndBrills("CO2 Injector", co2Feed);
wellbore.setLength(1300.0);
wellbore.setElevation(-1300.0);  // vertical injection well
wellbore.setDiameter(0.1571);     // 6-5/8 inch tubing
wellbore.setPipeWallRoughness(5e-5);
wellbore.setFormationTemperatureGradient(4.0, -0.03, "C");
wellbore.run();

double bhp = wellbore.getOutletStream().getPressure();
double bht = wellbore.getOutletStream().getTemperature() - 273.15;

Impurity Enrichment Monitoring

During phase transitions in the wellbore, light impurities (H2, N2) concentrate in the gas phase, potentially exceeding well material limits.

ImpurityMonitor monitor = new ImpurityMonitor("H2-Monitor", stream);
monitor.addTrackedComponent("hydrogen", 0.10);   // 10 mol% limit
monitor.addTrackedComponent("H2S", 0.001);        // 0.1% limit
monitor.addTrackedComponent("oxygen", 0.005);     // 0.5% limit

double h2Enrichment = monitor.getEnrichmentFactor("hydrogen");
boolean h2Safe = !monitor.exceedsLimit("hydrogen");

Shutdown Transient Analysis

TransientWellbore wellbore = new TransientWellbore("Shutdown", co2Feed);
wellbore.setWellDepth(1300.0);
wellbore.setFormationTemperature(277.15, 316.15);  // surface, bottom (K)
wellbore.setShutdownCoolingRate(6.0);  // °C/hr cooling rate
wellbore.runShutdownSimulation(48.0, 1.0);  // 48 hours, 1 hr timestep

// Check for phase transition during cooldown
// Risk: CO2 may transition to two-phase, causing pressure surges

CO2 Flow Corrections

// Static utility for CO2-specific flow adjustments
boolean dense = CO2FlowCorrections.isDensePhase(system);
double holdupCorr = CO2FlowCorrections.getLiquidHoldupCorrectionFactor(system);
// Legacy heuristic only; this pure-CO2 critical-point check is not F104 evidence.

4. Hydrogen Systems

Hydrogen Blending with Natural Gas

// Evaluate H2 blending impact on existing gas network
SystemInterface blendedGas = new SystemSrkEos(273.15 + 15, 70.0);
blendedGas.addComponent("hydrogen", 0.10);   // 10% H2 blend
blendedGas.addComponent("methane", 0.81);
blendedGas.addComponent("ethane", 0.05);
blendedGas.addComponent("propane", 0.02);
blendedGas.addComponent("nitrogen", 0.02);
blendedGas.setMixingRule("classic");

ThermodynamicOperations ops = new ThermodynamicOperations(blendedGas);
ops.TPflash();
blendedGas.initProperties();

// Key impacts of H2 blending:
double density = blendedGas.getDensity("kg/m3");       // Decreases with H2
double gcv = blendedGas.getPhase("gas").getCp("J/kgK"); // Changes energy content
double z = blendedGas.getZ();                            // Compressibility changes

// For Wobbe index and calorific value:
Standard_ISO6976 iso = new Standard_ISO6976(blendedGas);
iso.calculate();
double wobbe = iso.getValue("SuperiorWobbeIndex");
// H2 reduces Wobbe index — check against pipeline spec limits

Hydrogen Pipeline Transport

// H2 has very low density — requires higher velocities or larger diameters
Stream h2Feed = new Stream("H2 Feed", h2Fluid);
h2Feed.setFlowRate(10000.0, "kg/hr");
h2Feed.setPressure(70.0, "bara");

PipeBeggsAndBrills h2Pipe = new PipeBeggsAndBrills("H2 Pipeline", h2Feed);
h2Pipe.setLength(100000.0);   // 100 km
h2Pipe.setDiameter(0.508);     // 20 inch
h2Pipe.setPipeWallRoughness(5e-5);
h2Pipe.run();

// H2 pressure drop is lower per unit mass but energy density is much lower
// Consider: material compatibility (H2 embrittlement), safety zones

Blue Hydrogen (SMR + CCS)

// Steam Methane Reforming produces H2 + CO2
// CH4 + H2O -> CO + 3H2 (reforming)
// CO + H2O -> CO2 + H2 (water-gas shift)

// Model with GibbsReactor for equilibrium
SystemInterface syngasFluid = new SystemSrkEos(273.15 + 850, 30.0);
syngasFluid.addComponent("methane", 0.25);
syngasFluid.addComponent("water", 0.75);
syngasFluid.setMixingRule("classic");

GibbsReactor reformer = new GibbsReactor("SMR", syngasFeed);
reformer.run();
// Outlet: H2, CO, CO2, H2O, unconverted CH4

5. CCS Value Chain Integration

Capture → Transport → Storage Workflow

// 1. Post-combustion capture outlet (after amine scrubbing)
SystemInterface capturedCO2 = new SystemSrkEos(273.15 + 40, 2.0);
capturedCO2.addComponent("CO2", 0.995);
capturedCO2.addComponent("nitrogen", 0.003);
capturedCO2.addComponent("water", 0.002);
capturedCO2.setMixingRule("classic");

// 2. Compression to pipeline pressure
Stream co2Stream = new Stream("Captured CO2", capturedCO2);
co2Stream.setFlowRate(500000.0, "kg/hr");

// Multi-stage compression with intercooling
Compressor comp1 = new Compressor("Stage 1", co2Stream);
comp1.setOutletPressure(5.0);
Cooler cooler1 = new Cooler("IC 1", comp1.getOutletStream());
cooler1.setOutTemperature(273.15 + 30);

Compressor comp2 = new Compressor("Stage 2", cooler1.getOutletStream());
comp2.setOutletPressure(20.0);
Cooler cooler2 = new Cooler("IC 2", comp2.getOutletStream());
cooler2.setOutTemperature(273.15 + 30);

Compressor comp3 = new Compressor("Stage 3", cooler2.getOutletStream());
comp3.setOutletPressure(80.0);
Cooler cooler3 = new Cooler("IC 3", comp3.getOutletStream());
cooler3.setOutTemperature(273.15 + 30);

// 3. Pump to pipeline pressure (above critical — dense phase)
// CO2 is liquid above ~65 bara at 30°C, pump is more efficient than compressor
Compressor pump = new Compressor("Pump", cooler3.getOutletStream());
pump.setOutletPressure(150.0);

// 4. Pipeline transport
PipeBeggsAndBrills pipeline = new PipeBeggsAndBrills("CO2 Export", pump.getOutletStream());
pipeline.setLength(200000.0);  // 200 km
pipeline.setDiameter(0.508);
pipeline.setOuterTemperature(277.15);

// 5. Injection well
// See CO2InjectionWellAnalyzer above

ProcessSystem ccsProcess = new ProcessSystem();
ccsProcess.add(co2Stream);
ccsProcess.add(comp1); ccsProcess.add(cooler1);
ccsProcess.add(comp2); ccsProcess.add(cooler2);
ccsProcess.add(comp3); ccsProcess.add(cooler3);
ccsProcess.add(pump);
ccsProcess.add(pipeline);
ccsProcess.run();

double totalPower = comp1.getPower("kW") + comp2.getPower("kW")
                  + comp3.getPower("kW") + pump.getPower("kW");

6. Common Pitfalls

PitfallSolution
Unintended CO2 phase splitValidate the actual-composition phase envelope and keep the full operating path inside the project-controlled single-phase region with uncertainty margin
Using SRK for CO2+waterUse CPA (SystemSrkCPAstatoil) for accurate water solubility
Ignoring impurity effect on phase envelopeAlways calculate phase envelope with impurities included
H2 density too highVerify EOS handles low-density H2 correctly at high P
CO2 injection below fracture PCheck bottomhole P vs formation fracture gradient
Ignoring JT cooling in CO2 expansionCO2 expands significantly — can cause solid CO2 below -56.6°C
Hydrogen embrittlement not flaggedUse ASME B31.12 for H2 service; flag H2 partial pressure > limits

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.