Class MultiphasePipe
java.lang.Object
neqsim.util.NamedBaseClass
neqsim.process.SimulationBaseClass
neqsim.process.equipment.ProcessEquipmentBaseClass
neqsim.process.equipment.TwoPortEquipment
neqsim.process.equipment.pipeline.Pipeline
neqsim.process.equipment.pipeline.MultiphasePipe
- All Implemented Interfaces:
Serializable, Runnable, CapacityConstrainedEquipment, PipeLineInterface, ProcessEquipmentInterface, TwoPortInterface, SimulationInterface, NamedInterface
Multiphase pipe flow simulation model using non-equilibrium two-phase flow.
This class provides a process equipment wrapper around TwoPhasePipeFlowSystem, making it
compatible with the standard NeqSim process simulation framework through the
PipeLineInterface.
Features
- Non-equilibrium mass transfer between phases (Krishna-Standart film model)
- Interphase heat transfer with finite flux corrections
- Multiple flow patterns: stratified, annular, slug, droplet/mist, bubble
- Automatic flow pattern detection (optional)
- Wall heat transfer with insulation and burial conditions
- Transient simulation capability
Usage Example
// Create a multiphase fluid
SystemInterface fluid = new SystemSrkEos(295.0, 50.0);
fluid.addComponent("methane", 0.8);
fluid.addComponent("ethane", 0.1);
fluid.addComponent("nC10", 0.1);
fluid.createDatabase(true);
fluid.setMixingRule(2);
Stream inlet = new Stream("inlet", fluid);
inlet.setFlowRate(50000, "kg/hr");
inlet.run();
// Create multiphase pipe
MultiphasePipe pipe = new MultiphasePipe("pipeline", inlet);
pipe.setLength(5000.0); // 5 km
pipe.setDiameter(0.2); // 200 mm
pipe.setElevation(100.0); // 100 m rise
pipe.setInsulationType("polyurethane");
pipe.setInsulationThickness(0.05);
pipe.setAmbientTemperature(278.0);
pipe.run();
double pressureDrop = pipe.getPressureDrop();
String flowRegime = pipe.getFlowRegime();
- Version:
- 1.0
- Author:
- Even Solbraa
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected TwoPhasePipeFlowSystemThe underlying two-phase pipe flow system.protected doubleMaximum simulation time for transient simulations in seconds.protected booleanWhether to use non-equilibrium heat transfer.protected booleanWhether to use non-equilibrium mass transfer.private static final longSerialization version UID.protected StringSolver type for the flow system.protected doubleTime step for transient simulations in seconds.Fields inherited from class Pipeline
adiabatic, ambientTemperature, angle, burialDepth, buried, coatingConductivity, coatingThickness, corrosionAllowance, designCode, designPressure, designTemperature, diameter, elevation, equilibriumHeatTransfer, equilibriumMassTransfer, fileName, fittings, flowPattern, flowRegime, frictionFactor, heatTransferCoefficient, inletElevation, innerHeatTransferCoefficient, insulationConductivity, insulationThickness, insulationType, legHeights, legPositions, length, liquidHoldup, liquidHoldupProfile, locationClass, logger, materialGrade, mechanicalDesignCalculator, numberOfIncrements, numberOfLegs, numberOfNodesInLeg, outerHeatTransferCoefficient, outerHeatTransferCoeffs, outerTemperature, outletElevation, pipe, pipeDiameters, pipelineMechanicalDesign, pipeMaterial, pipeSchedule, pipeWallConductivity, pipeWallRoughness, pressureDrop, pressureProfile, reynoldsNumber, roughness, soilConductivity, surfaceTemperature, system, temperatureProfile, times, useFittings, velocity, wallHeatTransferCoeffs, wallThicknessFields inherited from class TwoPortEquipment
inStream, outStreamFields inherited from class ProcessEquipmentBaseClass
conditionAnalysisMessage, energyStream, hasController, isSolved, properties, reportFields inherited from class SimulationBaseClass
calcIdentifier, calculateSteadyState, timeFields inherited from class NamedBaseClass
name -
Constructor Summary
ConstructorsConstructorDescriptionMultiphasePipe(String name) Constructor for MultiphasePipe.MultiphasePipe(String name, StreamInterface inStream) Constructor for MultiphasePipe with inlet stream. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidConfigure the pipe geometry for the flow system.private voidConfigure heat transfer settings for the flow system.private voidConfigure the solver based on settings.private voidCreate the outlet stream from flow system results.voidDisable non-equilibrium heat transfer.voidDisable non-equilibrium mass transfer (use equilibrium assumption).voidEnable non-equilibrium heat transfer between phases.voidEnable non-equilibrium mass transfer between phases.private voidExtract results from the flow system.Get the determined flow regime.Get the underlying TwoPhasePipeFlowSystem.double[]Get the liquid holdup profile along the pipe.doubleGet the maximum simulation time.getPipe()Get the underlying flow system (for advanced models).double[]Get the pressure profile along the pipe.Get the solver type.double[]Get the temperature profile along the pipe.doubleGet the time step.doubleGet the flow velocity in the pipe.voidIn this method all thermodynamic and unit operations will be calculated in a steady state calculation.voidrunTransient(double dt, UUID id) runTransientvoidsetMaxSimulationTime(double time) Set the maximum simulation time for transient simulations.voidsetSolverType(String solverType) Set the solver type for the flow system.voidsetTimeStep(double dt) Set the time step for transient simulations.Methods inherited from class Pipeline
addCapacityConstraint, addFitting, addFittingFromDatabase, addFittings, addStandardFitting, addStandardFittings, calculateHoopStress, calculateMAOP, calculateMinimumWallThickness, calculateOverallHeatTransferCoefficient, calculateTestPressure, calculateVonMisesStress, clearCapacityConstraints, clearFittings, displayResult, generateMechanicalDesignReport, getAmbientTemperature, getAngle, getBottleneckConstraint, getBurialDepth, getCapacityConstraints, getCapacityDuty, getCapacityMax, getCoatingConductivity, getCoatingThickness, getCorrosionAllowance, getDesignCode, getDesignPressure, getDesignTemperature, getDiameter, getEffectiveLength, getElevation, getEntropyProduction, getEquivalentLength, getFittings, getFrictionFactor, getHeatTransferCoefficient, getInletElevation, getInnerHeatTransferCoefficient, getInsulationConductivity, getInsulationThickness, getInsulationType, getLength, getLiquidHoldup, getLocationClass, getMAOP, getMaterialGrade, getMaxUtilization, getMechanicalDesign, getMechanicalDesignCalculator, getNumberOfFittings, getNumberOfIncrements, getNumberOfLegs, getOuterHeatTransferCoefficient, getOutletElevation, getOutletPressure, getOutletTemperature, getPipeMaterial, getPipeSchedule, getPipeWallConductivity, getPipeWallRoughness, getPressureDrop, getReynoldsNumber, getSoilConductivity, getSuperficialVelocity, getSuperficialVelocity, getTimes, getTotalFittingsLdRatio, getWallThickness, initializeCapacityConstraints, initMechanicalDesign, isAdiabatic, isBuried, isCapacityExceeded, isHardLimitExceeded, isMechanicalDesignSafe, isUseFittings, printFittingsSummary, removeCapacityConstraint, setAdiabatic, setAmbientTemperature, setAmbientTemperatures, setAngle, setBurialDepth, setBuried, setCoatingConductivity, setCoatingThickness, setConstantSurfaceTemperature, setCorrosionAllowance, setDesignCode, setDesignPressure, setDesignPressure, setDesignTemperature, setDiameter, setElevation, setEquilibriumHeatTransfer, setEquilibriumMassTransfer, setHeatTransferCoefficient, setHeightProfile, setInitialFlowPattern, setInletElevation, setInnerHeatTransferCoefficient, setInsulationConductivity, setInsulationThickness, setInsulationType, setLegPositions, setLength, setLocationClass, setMaterialGrade, setNumberOfIncrements, setNumberOfLegs, setNumberOfNodesInLeg, setOuterHeatTransferCoefficient, setOuterHeatTransferCoefficients, setOuterTemperatures, setOutletElevation, setOutletPressure, setOutletTemperature, setOutputFileName, setPipeDiameters, setPipeMaterial, setPipeOuterHeatTransferCoefficients, setPipeSchedule, setPipeSpecification, setPipeWallConductivity, setPipeWallHeatTransferCoefficients, setPipeWallRoughness, setPipeWallRoughness, setSoilConductivity, setTimeSeries, setUseFittings, setWallHeatTransferCoefficients, setWallThickness, toJson, toJsonMethods inherited from class TwoPortEquipment
getInletPressure, getInletStream, getInletTemperature, getMassBalance, getOutletPressure, getOutletStream, getOutletTemperature, setInletPressure, setInletStream, setInletTemperature, setOutletPressure, setOutletStream, setOutletTemperature, validateSetupMethods inherited from class ProcessEquipmentBaseClass
copy, equals, getConditionAnalysisMessage, getController, getEffectiveCapacityFactor, getEnergyStream, getExergyChange, getFailureMode, getMassBalance, getMinimumFlow, getPressure, getPressure, getProperty, getReport_json, getResultTable, getSpecification, getTemperature, getTemperature, getThermoSystem, hashCode, isActive, isActive, isCapacityAnalysisEnabled, isFailed, isSetEnergyStream, reportResults, restoreFromFailure, run_step, runConditionAnalysis, setCapacityAnalysisEnabled, setController, setEnergyStream, setEnergyStream, setFailureMode, setFlowValveController, setMinimumFlow, setPressure, setRegulatorOutSignal, setSpecification, setTemperature, simulateDegradedOperation, simulateTrip, solvedMethods inherited from class SimulationBaseClass
getCalculateSteadyState, getCalculationIdentifier, getTime, increaseTime, isRunInSteps, setCalculateSteadyState, setCalculationIdentifier, setRunInSteps, setTimeMethods inherited from class NamedBaseClass
getName, getTagName, setName, setTagNameMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CapacityConstrainedEquipment
disableAllConstraints, enableAllConstraints, getAvailableMargin, getAvailableMarginPercent, getMaxUtilizationPercent, getUtilizationSummary, isCapacityAnalysisEnabled, isNearCapacityLimit, setCapacityAnalysisEnabledMethods inherited from interface NamedInterface
getName, getTagName, setName, setTagNameMethods inherited from interface PipeLineInterface
setOutPressure, setOutTemperatureMethods inherited from interface ProcessEquipmentInterface
getExergyChange, getFluid, getOperatingEnvelopeViolation, getRestCapacity, getSimulationValidationErrors, isSimulationValid, isWithinOperatingEnvelope, needRecalculationMethods inherited from interface SimulationInterface
getCalculateSteadyState, getCalculationIdentifier, getTime, increaseTime, isRunInSteps, run, run_step, run_step, runTransient, setCalculateSteadyState, setCalculationIdentifier, setRunInSteps, setTime, solvedMethods inherited from interface TwoPortInterface
getInletPressure, getInletStream, getInletTemperature, getInStream, getOutletPressure, getOutletStream, getOutletTemperature, getOutStream, setInletPressure, setInletStream, setInletTemperature, setOutletPressure, setOutletStream, setOutletTemperature, setOutPressure, setOutTemperature
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version UID.- See Also:
-
flowSystem
The underlying two-phase pipe flow system. -
nonEquilibriumMassTransfer
protected boolean nonEquilibriumMassTransferWhether to use non-equilibrium mass transfer. -
nonEquilibriumHeatTransfer
protected boolean nonEquilibriumHeatTransferWhether to use non-equilibrium heat transfer. -
maxSimulationTime
protected double maxSimulationTimeMaximum simulation time for transient simulations in seconds. -
timeStep
protected double timeStepTime step for transient simulations in seconds. -
solverType
Solver type for the flow system.
-
-
Constructor Details
-
MultiphasePipe
Constructor for MultiphasePipe.- Parameters:
name- the equipment name
-
MultiphasePipe
Constructor for MultiphasePipe with inlet stream.- Parameters:
name- the equipment nameinStream- the inlet stream
-
-
Method Details
-
enableNonEquilibriumMassTransfer
public void enableNonEquilibriumMassTransfer()Enable non-equilibrium mass transfer between phases.When enabled, mass transfer is calculated using the Krishna-Standart film model, which accounts for finite-rate mass transfer at the gas-liquid interface.
-
disableNonEquilibriumMassTransfer
public void disableNonEquilibriumMassTransfer()Disable non-equilibrium mass transfer (use equilibrium assumption). -
enableNonEquilibriumHeatTransfer
public void enableNonEquilibriumHeatTransfer()Enable non-equilibrium heat transfer between phases.When enabled, interphase heat transfer is calculated with finite flux corrections.
-
disableNonEquilibriumHeatTransfer
public void disableNonEquilibriumHeatTransfer()Disable non-equilibrium heat transfer. -
setSolverType
Set the solver type for the flow system.Solver types:
- SIMPLE - Only mass and heat transfer. Fast but no pressure drop.
- DEFAULT - Momentum, phase fraction, and energy equations.
- FULL - All equations including composition changes.
- Parameters:
solverType- the solver type ("SIMPLE", "DEFAULT", or "FULL")
-
getSolverType
-
setMaxSimulationTime
public void setMaxSimulationTime(double time) Set the maximum simulation time for transient simulations.- Parameters:
time- maximum simulation time in seconds
-
getMaxSimulationTime
public double getMaxSimulationTime()Get the maximum simulation time.- Returns:
- maximum simulation time in seconds
-
setTimeStep
public void setTimeStep(double dt) Set the time step for transient simulations.- Parameters:
dt- time step in seconds
-
getTimeStep
public double getTimeStep()Get the time step.- Returns:
- time step in seconds
-
getFlowSystem
Get the underlying TwoPhasePipeFlowSystem.- Returns:
- the flow system
-
getPipe
Get the underlying flow system (for advanced models).- Specified by:
getPipein interfacePipeLineInterface- Overrides:
getPipein classPipeline- Returns:
- flow system interface or null if not applicable
-
run
In this method all thermodynamic and unit operations will be calculated in a steady state calculation.
- Specified by:
runin interfaceSimulationInterface- Overrides:
runin classPipeline- Parameters:
id- UUID
-
configureGeometry
private void configureGeometry()Configure the pipe geometry for the flow system. -
configureHeatTransfer
private void configureHeatTransfer()Configure heat transfer settings for the flow system. -
configureSolver
private void configureSolver()Configure the solver based on settings. -
extractResults
private void extractResults()Extract results from the flow system. -
createOutletStream
private void createOutletStream()Create the outlet stream from flow system results. -
runTransient
runTransient
This method calculates thermodynamic and unit operations using difference equations if available and calculateSteadyState is true. Use setCalculateSteadyState to set the parameter. Sets calc identifier UUID.- Specified by:
runTransientin interfaceSimulationInterface- Overrides:
runTransientin classPipeline- Parameters:
dt- Delta time [s]id- Calculation identifier
-
getPressureProfile
public double[] getPressureProfile()Get the pressure profile along the pipe.- Specified by:
getPressureProfilein interfacePipeLineInterface- Overrides:
getPressureProfilein classPipeline- Returns:
- array of pressures in bar at each increment
-
getTemperatureProfile
public double[] getTemperatureProfile()Get the temperature profile along the pipe.- Specified by:
getTemperatureProfilein interfacePipeLineInterface- Overrides:
getTemperatureProfilein classPipeline- Returns:
- array of temperatures in Kelvin at each increment
-
getLiquidHoldupProfile
public double[] getLiquidHoldupProfile()Get the liquid holdup profile along the pipe.- Specified by:
getLiquidHoldupProfilein interfacePipeLineInterface- Overrides:
getLiquidHoldupProfilein classPipeline- Returns:
- array of liquid holdup values at each increment
-
getFlowRegime
Get the determined flow regime.- Specified by:
getFlowRegimein interfacePipeLineInterface- Overrides:
getFlowRegimein classPipeline- Returns:
- flow regime as string (e.g., "stratified", "slug", "annular", "dispersed bubble")
-
getVelocity
public double getVelocity()Get the flow velocity in the pipe.- Specified by:
getVelocityin interfacePipeLineInterface- Overrides:
getVelocityin classPipeline- Returns:
- velocity in m/s
-