Class CO2InjectionWellAnalyzer

java.lang.Object
neqsim.process.equipment.pipeline.CO2InjectionWellAnalyzer

public class CO2InjectionWellAnalyzer extends Object
High-level safety analysis module for CO2 injection wells. Combines steady-state wellbore flow simulation, phase boundary analysis, impurity enrichment mapping, shutdown assessment, choke JT analysis, and depressurization timeline into a single analysis tool.

This analyzer integrates multiple NeqSim capabilities:

Usage example:

CO2InjectionWellAnalyzer analyzer = new CO2InjectionWellAnalyzer("SmeaheiaWell");
analyzer.setFluid(co2Fluid);
analyzer.setWellGeometry(1300.0, 0.1571, 4.5e-5);
analyzer.setOperatingConditions(90.0, 25.0, 150000.0);
analyzer.setFormationTemperature(4.0, 43.0);
analyzer.runFullAnalysis();
Map<String, Object> results = analyzer.getResults();
boolean safe = analyzer.isSafeToOperate();
Version:
1.0
Author:
neqsim
  • Field Details

    • name

      private final String name
      Well name/tag.
    • fluid

      private SystemInterface fluid
      The injection fluid (will be cloned for each analysis).
    • wellDepth

      private double wellDepth
      Well depth in meters.
    • tubingID

      private double tubingID
      Tubing inner diameter in meters.
    • roughness

      private double roughness
      Pipe roughness in meters.
    • wellheadPressure

      private double wellheadPressure
      Wellhead pressure in bara.
    • wellheadTemperatureC

      private double wellheadTemperatureC
      Wellhead temperature in Celsius.
    • designFlowRate

      private double designFlowRate
      Design mass flow rate in kg/hr.
    • formationTempTopC

      private double formationTempTopC
      Formation temperature at wellhead in Celsius.
    • formationTempBottomC

      private double formationTempBottomC
      Formation temperature at bottom-hole in Celsius.
    • trackedComponents

      private final List<String> trackedComponents
      Components to track for impurity enrichment.
    • alarmThresholds

      private final Map<String,Double> alarmThresholds
      Alarm thresholds for tracked components (mole fraction in gas phase).
    • results

      private final Map<String,Object> results
      Results from the full analysis.
    • analysisComplete

      private boolean analysisComplete
      Whether the analysis has been run.
  • Constructor Details

    • CO2InjectionWellAnalyzer

      public CO2InjectionWellAnalyzer(String name)
      Constructor for CO2InjectionWellAnalyzer.
      Parameters:
      name - the analyzer name/tag
  • Method Details

    • setFluid

      public void setFluid(SystemInterface fluid)
      Sets the injection fluid.
      Parameters:
      fluid - the thermodynamic system representing the injection fluid
    • setWellGeometry

      public void setWellGeometry(double depthMeters, double tubingIDMeters, double roughnessMeters)
      Sets the well geometry parameters.
      Parameters:
      depthMeters - the well measured depth in meters
      tubingIDMeters - the tubing inner diameter in meters
      roughnessMeters - the pipe roughness in meters
    • setOperatingConditions

      public void setOperatingConditions(double pressureBara, double temperatureC, double flowRateKgPerHr)
      Sets the operating conditions at the wellhead.
      Parameters:
      pressureBara - wellhead pressure in bara
      temperatureC - wellhead temperature in Celsius
      flowRateKgPerHr - design mass flow rate in kg/hr
    • setFormationTemperature

      public void setFormationTemperature(double topTempC, double bottomTempC)
      Sets the formation (geothermal) temperature at the wellhead and bottom-hole.
      Parameters:
      topTempC - formation temperature at wellhead in Celsius
      bottomTempC - formation temperature at bottom-hole in Celsius
    • addTrackedComponent

      public void addTrackedComponent(String componentName, double alarmMolFrac)
      Adds a component to track for impurity enrichment analysis.
      Parameters:
      componentName - the component name (e.g., "hydrogen")
      alarmMolFrac - the gas phase mole fraction alarm threshold (e.g., 0.04 for 4%)
    • runFullAnalysis

      public void runFullAnalysis()
      Runs the full analysis: steady-state, phase boundary scan, enrichment map, and shutdown assessment.
    • runDesignCase

      private Map<String,Object> runDesignCase()
      Runs the steady-state design case using PipeBeggsAndBrills. Returns BHP, BHT, flow regime.
      Returns:
      map of design case results
    • runPhaseBoundaryScan

      private Map<String,Object> runPhaseBoundaryScan()
      Scans the P-T space to identify two-phase conditions.
      Returns:
      map with two-phase boundary information
    • runEnrichmentMap

      private Map<String,Object> runEnrichmentMap()
      Maps impurity enrichment across the two-phase region for all tracked components.
      Returns:
      map of enrichment data
    • runShutdownAssessment

      private Map<String,Object> runShutdownAssessment()
      Assesses the wellbore safety after shutdown at various trapped pressures.
      Returns:
      map of shutdown assessment results
    • determineSafeEnvelope

      private Map<String,Object> determineSafeEnvelope()
      Determines the safe operating envelope: minimum WHP to avoid two-phase conditions.
      Returns:
      map with safe envelope parameters
    • isSafeToOperate

      public boolean isSafeToOperate()
      Whether the well is safe to operate (no alarms exceeded at design conditions).
      Returns:
      true if design conditions are single-phase and no alarms are exceeded
    • getResults

      public Map<String,Object> getResults()
      Gets all analysis results.
      Returns:
      a map of result category to result data
    • getName

      public String getName()
      Gets the analyzer name.
      Returns:
      the analyzer name
    • isAnalysisComplete

      public boolean isAnalysisComplete()
      Whether the analysis has been completed.
      Returns:
      true if runFullAnalysis() has been called