Class MultiCompartmentReservoir
java.lang.Object
neqsim.util.NamedBaseClass
neqsim.process.SimulationBaseClass
neqsim.process.equipment.ProcessEquipmentBaseClass
neqsim.process.equipment.reservoir.MultiCompartmentReservoir
- All Implemented Interfaces:
Serializable, Runnable, ProcessEquipmentInterface, ProcessElementInterface, SimulationInterface, NamedInterface
Multi-compartment reservoir model for tracking pressure evolution across connected zones.
Models multiple reservoir compartments connected by inter-zone transmissibilities. Each compartment has its own fluid (SystemInterface), pore volume, and pressure. Injectors and producers can be placed in specific compartments.
The material balance equation for each compartment per timestep is:
V_i * ct_i * dP_i/dt = q_inj,i - q_prod,i + SUM_j(T_ij * (P_j - P_i))
where ct_i is total compressibility, T_ij is the transmissibility between compartments i and j.
Usage Example
MultiCompartmentReservoir reservoir = new MultiCompartmentReservoir("Field");
// Add zones
reservoir.addCompartment("Target Sand", targetFluid, 1.0e7, 250.0);
reservoir.addCompartment("Thief Zone", thiefFluid, 5.0e6, 230.0);
reservoir.addCompartment("Aquifer", aquiferFluid, 1.0e9, 260.0);
// Set inter-zone transmissibilities
reservoir.setTransmissibility("Target Sand", "Thief Zone", 0.5);
reservoir.setTransmissibility("Target Sand", "Aquifer", 0.1);
// Add wells
reservoir.addInjectionRate("INJ-1", "Target Sand", 5000.0); // Sm3/day
reservoir.addProductionRate("PROD-1", "Target Sand", 3000.0);
// Time-step the reservoir
for (int step = 0; step < 365; step++) {
reservoir.runTimeStep(86400.0); // 1 day
double p = reservoir.getCompartmentPressure("Target Sand", "bara");
double flow = reservoir.getInterZoneFlowRate("Target Sand", "Thief Zone", "Sm3/day");
}
- Version:
- 1.0
- Author:
- ESOL
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents a single reservoir compartment.static classRepresents a transmissibility connection between two compartments. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.apache.logging.log4j.Loggerprivate static final longprivate doubleFields inherited from class ProcessEquipmentBaseClass
conditionAnalysisMessage, energyStream, hasController, isSolved, properties, reportFields inherited from class SimulationBaseClass
calcIdentifier, calculateSteadyState, timeFields inherited from class NamedBaseClass
name -
Constructor Summary
ConstructorsConstructorDescriptionCreates a multi-compartment reservoir model. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCompartment(String name, SystemInterface fluid, double poreVolume, double pressure) Add a reservoir compartment.voidaddInjectionRate(String wellName, String compartmentName, double rateSm3day) Add injection rate to a compartment.voidaddProductionRate(String wellName, String compartmentName, double rateSm3day) Add production rate from a compartment.getCompartment(String name) Get a compartment by name.getCompartmentFluid(String name) Get the fluid in a compartment.doublegetCompartmentPressure(String name, String unit) Get the current pressure of a compartment.doublegetInterZoneFlowRate(String name1, String name2, String unit) Get the inter-zone flow rate between two compartments.intGet the number of compartments.doublegetSimulationTime(String unit) Get the cumulative simulation time.voidreset()Reset all compartment pressures to initial values.voidIn this method all thermodynamic and unit operations will be calculated in a steady state calculation.voidrunTimeStep(double dtSeconds) Advance the reservoir state by one timestep using explicit Euler integration.voidsetCompressibility(String compartmentName, double compressibility) Set total compressibility for a compartment.voidsetInjectionRate(String compartmentName, double rateSm3day) Set injection rate for a compartment (replaces any previous rate).voidsetProductionRate(String compartmentName, double rateSm3day) Set production rate for a compartment (replaces any previous rate).voidsetTransmissibility(String name1, String name2, double transmissibility) Set transmissibility between two compartments.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 -
compartments
-
connections
-
compartmentIndex
-
simulationTime
private double simulationTime
-
-
Constructor Details
-
MultiCompartmentReservoir
Creates a multi-compartment reservoir model.- Parameters:
name- reservoir name
-
-
Method Details
-
addCompartment
Add a reservoir compartment.- Parameters:
name- compartment identifierfluid- NeqSim fluid system for this compartmentporeVolume- pore volume (m³)pressure- initial pressure (bara)
-
setCompressibility
Set total compressibility for a compartment.- Parameters:
compartmentName- compartment namecompressibility- total compressibility (1/bar)
-
setTransmissibility
-
addInjectionRate
-
addProductionRate
-
setInjectionRate
Set injection rate for a compartment (replaces any previous rate).- Parameters:
compartmentName- compartment namerateSm3day- injection rate (Sm3/day)
-
setProductionRate
Set production rate for a compartment (replaces any previous rate).- Parameters:
compartmentName- compartment namerateSm3day- production rate (Sm3/day)
-
runTimeStep
public void runTimeStep(double dtSeconds) Advance the reservoir state by one timestep using explicit Euler integration.For each compartment the pressure update is: dP_i = dt / (V_i * ct_i) * (q_inj,i - q_prod,i + SUM(T_ij * (P_j - P_i)))
- Parameters:
dtSeconds- timestep size (seconds)
-
getCompartmentPressure
-
getInterZoneFlowRate
-
getNumberOfCompartments
public int getNumberOfCompartments()Get the number of compartments.- Returns:
- number of compartments
-
getSimulationTime
Get the cumulative simulation time.- Parameters:
unit- time unit ("s", "days", "years")- Returns:
- cumulative simulation time
-
getCompartmentFluid
Get the fluid in a compartment.- Parameters:
name- compartment name- Returns:
- SystemInterface for the compartment, or null
-
getCompartment
Get a compartment by name.- Parameters:
name- compartment name- Returns:
- Compartment or null if not found
-
reset
public void reset()Reset all compartment pressures to initial values. -
run
In this method all thermodynamic and unit operations will be calculated in a steady state calculation.
- Parameters:
id- UUID
-