Class AnnularLeakagePath
java.lang.Object
neqsim.util.NamedBaseClass
neqsim.process.SimulationBaseClass
neqsim.process.equipment.ProcessEquipmentBaseClass
neqsim.process.equipment.reservoir.AnnularLeakagePath
- All Implemented Interfaces:
Serializable, Runnable, ProcessEquipmentInterface, ProcessElementInterface, SimulationInterface, NamedInterface
Models fluid leakage through compromised well cement or micro-annulus between zones.
This class calculates leakage flow through two mechanisms:
- Channel flow (cubic law): Flow through a narrow gap between casing and formation, applicable when debonding creates a micro-annulus. The volumetric flow rate follows: q = w * delta^3 / (12 * mu) * dP/L
- Porous cement (Darcy flow): Flow through degraded or poorly-placed cement with non-zero permeability: q = k * A / (mu * L) * dP
The class can be wired into a ProcessSystem as a parallel flow path alongside the main wellbore to quantify the behind-casing contribution to out-of-zone injection.
Usage Example
AnnularLeakagePath leakage = new AnnularLeakagePath("cement leak");
leakage.setPathGeometry(1500.0, 1600.0, 0.10, 0.001); // 100m path, 0.1m wide, 1mm gap
leakage.setFluid(reservoirFluid.clone());
leakage.calculate(350.0, 250.0); // 350 bara source, 250 bara sink
System.out.println("Channel leak rate: " + leakage.getChannelLeakageRate("m3/day") + " m3/day");
System.out.println("Cement leak rate: " + leakage.getCementLeakageRate("m3/day") + " m3/day");
- Version:
- 1.0
- Author:
- ESOL
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumLeakage mechanism type. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate doubleAnnular fluid gradient in bar/m.private doubleCasing burst rating at surface in bara.private doubleprivate doubleprivate doubleprivate doubleprivate doubleprivate doubleprivate doubleprivate doubleprivate SystemInterfaceprivate doubleprivate doubleprivate doubleFracture pressure at shoe in bara.private static final org.apache.logging.log4j.Loggerprivate doubleComputed MAASP in bara.private doubleSafety factor for burst MAASP per API RP 90.private doubleSafety factor for collapse MAASP per API RP 90.private StringMAASP limiting criterion.private doubleprivate static final longprivate doubleShoe depth in m TVD.private doubleprivate doubleprivate doubleprivate doubleTubing collapse rating in bara.Fields inherited from class ProcessEquipmentBaseClass
conditionAnalysisMessage, energyStream, hasController, isSolved, properties, reportFields inherited from class SimulationBaseClass
calcIdentifier, calculateSteadyState, timeFields inherited from class NamedBaseClass
name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcalculate(double sourcePressureBara, double sinkPressureBara) Calculate leakage flow rates between source and sink pressures.doubleCalculate MAASP (Maximum Allowable Annular Surface Pressure) per API RP 90.private doubleconvertFlowRate(double rateM3s, String unit) Convert flow rate from m³/s to the requested unit.doublegetCementLeakageRate(String unit) Get cement porous-flow leakage rate.doublegetChannelLeakageRate(String unit) Get channel (micro-annulus) leakage rate.Get the dominant leakage mechanism based on calculated rates.private doubleGet effective viscosity from NeqSim fluid or fallback value.doublegetMAASP()Get the calculated MAASP value.Get the criterion that limits the MAASP.doubleGet the path length.doublegetTotalLeakageRate(String unit) Get total leakage rate (channel + cement).booleanisAnnularPressureExceeded(double annularPressureBara) Check if annular pressure exceeds MAASP.voidIn this method all thermodynamic and unit operations will be calculated in a steady state calculation.voidsetCementCrossSectionArea(double area) Set the cement annulus cross-section area for Darcy flow.voidsetCementPermeability(double permeability, String unit) Set cement permeability for the porous flow model.voidsetFluid(SystemInterface fluid) Set the fluid for viscosity calculation.voidsetFluidDensity(double density) Set fluid density directly.voidsetFluidViscosity(double viscosity) Set fluid viscosity directly (used when no SystemInterface is available).voidSet the leakage mechanism to use.voidsetMAASPParameters(double casingBurstRating, double tubingCollapseRating, double shoeDepth, double fracPressureAtShoe, double annularFluidGradient) Set parameters for MAASP (Maximum Allowable Annular Surface Pressure) calculation.voidsetMAASPSafetyFactors(double burstSF, double collapseSF) Set MAASP safety factors from standards (typically loaded from API RP 90 CSV data).voidsetPathGeometry(double depthTop, double depthBottom, double width, double gap) Set the leakage path geometry.Methods inherited from class ProcessEquipmentBaseClass
addCapacityConstraint, addController, copy, displayResult, equals, getAvailableMargin, getAvailableMarginPercent, getBottleneckConstraint, getCapacityConstraints, getConditionAnalysisMessage, getConstraintEvaluationReport, getController, getController, getControllers, getEffectiveCapacityFactor, getEnergyStream, getEntropyProduction, getExergyChange, getFailureMode, getMassBalance, getMassBalance, getMaxUtilization, getMaxUtilizationPercent, getMechanicalDesign, getMinimumFlow, getPressure, getPressure, getProperty, getReferenceDesignation, getReport_json, getResultTable, getSpecification, getTemperature, getTemperature, getThermoSystem, getUtilizationSummary, hashCode, initElectricalDesign, initializeDefaultConstraints, initInstrumentDesign, initMechanicalDesign, isActive, isActive, isCapacityAnalysisEnabled, isCapacityExceeded, isFailed, isHardLimitExceeded, isNearCapacityLimit, isSetEnergyStream, reportResults, restoreFromFailure, run_step, runConditionAnalysis, setCapacityAnalysisEnabled, setController, setEnergyStream, setEnergyStream, setFailureMode, setFlowValveController, setMinimumFlow, setPressure, setReferenceDesignation, setRegulatorOutSignal, setSpecification, setTemperature, simulateDegradedOperation, simulateTrip, solved, toJson, toJsonMethods inherited from class SimulationBaseClass
getCalculateSteadyState, getCalculationIdentifier, getTime, increaseTime, isRunInSteps, setCalculateSteadyState, setCalculationIdentifier, setRunInSteps, setTimeMethods inherited from class NamedBaseClass
getName, getTagNumber, setName, setTagNumberMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface NamedInterface
getName, getTagName, getTagNumber, setName, setTagName, setTagNumberMethods inherited from interface ProcessEquipmentInterface
getCapacityDuty, getCapacityMax, getElectricalDesign, getEquipmentState, getExergyChange, getExergyDestruction, getExergyDestruction, getFluid, getInletStreams, getInstrumentDesign, getOperatingEnvelopeViolation, getOutletFlowRate, getOutletPressure, getOutletStreams, getOutletTemperature, getReferenceDesignationString, getRestCapacity, getSimulationValidationErrors, isSimulationValid, isWithinOperatingEnvelope, needRecalculation, validateSetupMethods inherited from interface SimulationInterface
getCalculateSteadyState, getCalculationIdentifier, getTime, increaseTime, isRunInSteps, run, run_step, runTransient, runTransient, setCalculateSteadyState, setCalculationIdentifier, setRunInSteps, setTime
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
logger
private static final org.apache.logging.log4j.Logger logger -
mechanism
-
depthTop
private double depthTop -
depthBottom
private double depthBottom -
pathLength
private double pathLength -
channelWidth
private double channelWidth -
channelGap
private double channelGap -
cementPermeability
private double cementPermeability -
cementCrossSectionArea
private double cementCrossSectionArea -
fluidViscosity
private double fluidViscosity -
fluidDensity
private double fluidDensity -
sourcePressure
private double sourcePressure -
sinkPressure
private double sinkPressure -
channelLeakageRate
private double channelLeakageRate -
cementLeakageRate
private double cementLeakageRate -
totalLeakageRate
private double totalLeakageRate -
fluid
-
casingBurstRating
private double casingBurstRatingCasing burst rating at surface in bara. -
tubingCollapseRating
private double tubingCollapseRatingTubing collapse rating in bara. -
shoeDepth
private double shoeDepthShoe depth in m TVD. -
fracPressureAtShoe
private double fracPressureAtShoeFracture pressure at shoe in bara. -
annularFluidGradient
private double annularFluidGradientAnnular fluid gradient in bar/m. -
maaspBurstSafetyFactor
private double maaspBurstSafetyFactorSafety factor for burst MAASP per API RP 90. -
maaspCollapseSafetyFactor
private double maaspCollapseSafetyFactorSafety factor for collapse MAASP per API RP 90. -
maasp
private double maaspComputed MAASP in bara. -
maaspLimitingCriterion
MAASP limiting criterion.
-
-
Constructor Details
-
AnnularLeakagePath
Create an annular leakage path model.- Parameters:
name- equipment name
-
-
Method Details
-
setPathGeometry
public void setPathGeometry(double depthTop, double depthBottom, double width, double gap) Set the leakage path geometry.- Parameters:
depthTop- top depth of leakage path (m TVD)depthBottom- bottom depth of leakage path (m TVD)width- circumferential width of channel (m), typically 0.01 - 0.3gap- radial aperture of micro-annulus (m), typically 0.0001 - 0.005
-
setCementPermeability
Set cement permeability for the porous flow model.- Parameters:
permeability- cement permeability valueunit- permeability unit ("mD", "D", "m2")
-
setCementCrossSectionArea
public void setCementCrossSectionArea(double area) Set the cement annulus cross-section area for Darcy flow.- Parameters:
area- cross-section area (m²)
-
setFluid
Set the fluid for viscosity calculation.- Parameters:
fluid- NeqSim fluid system
-
setFluidViscosity
public void setFluidViscosity(double viscosity) Set fluid viscosity directly (used when no SystemInterface is available).- Parameters:
viscosity- dynamic viscosity (cP)
-
setFluidDensity
public void setFluidDensity(double density) Set fluid density directly.- Parameters:
density- density (kg/m³)
-
setLeakageMechanism
Set the leakage mechanism to use.- Parameters:
mechanism- leakage mechanism
-
calculate
public void calculate(double sourcePressureBara, double sinkPressureBara) Calculate leakage flow rates between source and sink pressures.- Parameters:
sourcePressureBara- source zone pressure (bara)sinkPressureBara- sink zone pressure (bara)
-
getEffectiveViscosity
private double getEffectiveViscosity()Get effective viscosity from NeqSim fluid or fallback value.- Returns:
- viscosity in cP
-
getChannelLeakageRate
Get channel (micro-annulus) leakage rate.- Parameters:
unit- flow rate unit ("m3/s", "m3/day", "l/min")- Returns:
- channel leakage rate
-
getCementLeakageRate
Get cement porous-flow leakage rate.- Parameters:
unit- flow rate unit ("m3/s", "m3/day", "l/min")- Returns:
- cement leakage rate
-
getTotalLeakageRate
Get total leakage rate (channel + cement).- Parameters:
unit- flow rate unit ("m3/s", "m3/day", "l/min")- Returns:
- total leakage rate
-
getDominantMechanism
Get the dominant leakage mechanism based on calculated rates.- Returns:
- dominant mechanism description
-
getPathLength
public double getPathLength()Get the path length.- Returns:
- path length (m)
-
convertFlowRate
Convert flow rate from m³/s to the requested unit.- Parameters:
rateM3s- rate in m³/sunit- target unit- Returns:
- converted rate
-
setMAASPParameters
public void setMAASPParameters(double casingBurstRating, double tubingCollapseRating, double shoeDepth, double fracPressureAtShoe, double annularFluidGradient) Set parameters for MAASP (Maximum Allowable Annular Surface Pressure) calculation.MAASP is calculated per API RP 90 and NORSOK D-010 Section 9 as the minimum of:
- Casing burst rating / safety factor
- Tubing collapse rating / safety factor
- Fracture pressure at shoe minus hydrostatic head of annular fluid
- Parameters:
casingBurstRating- casing burst rating at surface (bara)tubingCollapseRating- tubing collapse rating (bara)shoeDepth- shoe depth (m TVD)fracPressureAtShoe- fracture pressure at shoe (bara)annularFluidGradient- annular fluid pressure gradient (bar/m), default ~0.098 for water
-
setMAASPSafetyFactors
public void setMAASPSafetyFactors(double burstSF, double collapseSF) Set MAASP safety factors from standards (typically loaded from API RP 90 CSV data).- Parameters:
burstSF- burst safety factor (default 1.10 per API RP 90)collapseSF- collapse safety factor (default 1.00 per API RP 90)
-
calculateMAASP
public double calculateMAASP()Calculate MAASP (Maximum Allowable Annular Surface Pressure) per API RP 90.MAASP = min(P_burst/SF_burst, P_collapse_tubing/SF_collapse, P_frac_shoe - rho*g*h_shoe)
- Returns:
- MAASP in bara
-
getMAASP
public double getMAASP()Get the calculated MAASP value.- Returns:
- MAASP in bara
-
getMAASPLimitingCriterion
Get the criterion that limits the MAASP.- Returns:
- limiting criterion description
-
isAnnularPressureExceeded
public boolean isAnnularPressureExceeded(double annularPressureBara) Check if annular pressure exceeds MAASP.- Parameters:
annularPressureBara- current annular pressure (bara)- Returns:
- true if pressure exceeds MAASP
-
run
In this method all thermodynamic and unit operations will be calculated in a steady state calculation.
- Parameters:
id- UUID
-