Class IncompressiblePipeFlow
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.AdiabaticPipe
neqsim.process.equipment.pipeline.IncompressiblePipeFlow
- All Implemented Interfaces:
Serializable, Runnable, AutoSizeable, CapacityConstrainedEquipment, PipeLineInterface, ProcessEquipmentInterface, TwoPortInterface, SimulationInterface, NamedInterface
Incompressible pipe flow model for liquid flow with fittings.
This class models incompressible (liquid) flow through pipes using the Darcy-Weisbach equation.
It extends AdiabaticPipe and inherits fitting support from the Pipeline base
class.
Pressure Drop Calculation
The total pressure drop consists of friction loss and elevation change:
ΔP_total = ΔP_friction + ΔP_elevation ΔP_friction = f × (L_eff / D) × (ρV² / 2) ΔP_elevation = ρg(z_in - z_out)
where:
- f = Darcy friction factor
- L_eff = effective length (physical + fittings equivalent)
- D = pipe internal diameter
- ρ = fluid density
- V = fluid velocity
- g = gravitational acceleration
- z = elevation
Equivalent Length Method for Fittings
Pipe fittings (bends, valves, tees, etc.) add pressure loss that is accounted for using the equivalent length method. Each fitting is assigned an L/D ratio representing the length of straight pipe (in diameters) that would produce the same pressure drop.
L_eff = L_physical + Σ(L/D)_i × D
Usage Example
// Create water stream
SystemInterface water = new SystemSrkEos(298.15, 5.0);
water.addComponent("water", 100.0, "kg/hr");
Stream feed = new Stream("Water", water);
feed.run();
// Create pipe with fittings
IncompressiblePipeFlow pipe = new IncompressiblePipeFlow("Process Line", feed);
pipe.setLength(100.0); // 100 m physical length
pipe.setDiameter(0.05); // 50 mm diameter
pipe.setPipeWallRoughness(4.5e-5); // Commercial steel
// Add fittings
pipe.addFitting("90-degree elbow", 30.0); // L/D = 30
pipe.addFitting("90-degree elbow", 30.0); // Another elbow
pipe.addFittingFromDatabase("Gate valve, fully open"); // From database
// Set elevation change
pipe.setInletElevation(10);
pipe.setOutletElevation(0);
pipe.run();
// Results
double pressureDrop = pipe.getInletPressure() - pipe.getOutletPressure();
double effectiveLength = pipe.getEffectiveLength(); // Physical + fittings
- Version:
- 2.0
- Author:
- Even Solbraa
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) doubleMomentum term for pressure drop calculation (ρV²).private static final longSerialization version UID.Fields inherited from class AdiabaticPipe
dH, inletPressure, insideDiameter, pipeSpecification, pipeWallRoughnessLocal, pressureOut, setPressureOut, setTemperature, temperatureOutFields 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
ConstructorsConstructorDescriptionIncompressiblePipeFlow(String name) Constructor for IncompressiblePipeFlow.IncompressiblePipeFlow(String name, StreamInterface inStream) Constructor for IncompressiblePipeFlow with inlet stream. -
Method Summary
Modifier and TypeMethodDescriptiondoubleCalculate the outlet pressure based on friction and elevation losses.static voidExample usage demonstrating pipe flow with fittings.voidIn this method all thermodynamic and unit operations will be calculated in a steady state calculation.Methods inherited from class AdiabaticPipe
autoSize, autoSize, autoSize, calcFlow, calculateFRMS, calculateFRMS, calculateLOF, calcWallFrictionFactor, disableRhonePoulencVelocity, displayResult, getDiameter, getErosionalVelocity, getErosionalVelocity, getFIVAnalysis, getFIVAnalysisJson, getFlowRegime, getFrictionFactor, getInletElevation, getLength, getMaxAllowableVelocity, getMaxVelocityMethod, getMixtureVelocity, getOutletElevation, getPipe, getPipeWallRoughness, getPipeWallThickness, getPressureDrop, getReynoldsNumber, getRhonePoulencCalculator, getRhonePoulencMaxVelocity, getSizingReport, getSizingReportJson, getSupportArrangement, getVelocity, initializeCapacityConstraints, isAutoSized, isRhonePoulencEnabled, setDiameter, setInitialFlowPattern, setInletElevation, setLength, setMaxDesignFRMS, setMaxDesignLOF, setMaxDesignVelocity, setOutletElevation, setOutletPressure, setOutletTemperature, setPipeSpecification, setPipeWallRoughness, setPipeWallThickness, setRhonePoulencServiceType, setRhonePoulencServiceType, setSupportArrangement, useRhonePoulencVelocityMethods inherited from class Pipeline
addCapacityConstraint, addFitting, addFittingFromDatabase, addFittings, addStandardFitting, addStandardFittings, calculateHoopStress, calculateMAOP, calculateMinimumWallThickness, calculateOverallHeatTransferCoefficient, calculateTestPressure, calculateVonMisesStress, clearCapacityConstraints, clearFittings, generateMechanicalDesignReport, getAmbientTemperature, getAngle, getBottleneckConstraint, getBurialDepth, getCapacityConstraints, getCapacityDuty, getCapacityMax, getCoatingConductivity, getCoatingThickness, getCorrosionAllowance, getDesignCode, getDesignPressure, getDesignTemperature, getEffectiveLength, getElevation, getEntropyProduction, getEquivalentLength, getFittings, getHeatTransferCoefficient, getInnerHeatTransferCoefficient, getInsulationConductivity, getInsulationThickness, getInsulationType, getLiquidHoldup, getLiquidHoldupProfile, getLocationClass, getMAOP, getMaterialGrade, getMaxUtilization, getMechanicalDesign, getMechanicalDesignCalculator, getNumberOfFittings, getNumberOfIncrements, getNumberOfLegs, getOuterHeatTransferCoefficient, getOutletPressure, getOutletTemperature, getPipeMaterial, getPipeSchedule, getPipeWallConductivity, getPressureProfile, getSoilConductivity, getSuperficialVelocity, getSuperficialVelocity, getTemperatureProfile, getTimes, getTotalFittingsLdRatio, getWallThickness, initMechanicalDesign, isAdiabatic, isBuried, isCapacityExceeded, isHardLimitExceeded, isMechanicalDesignSafe, isUseFittings, printFittingsSummary, removeCapacityConstraint, runTransient, setAdiabatic, setAmbientTemperature, setAmbientTemperatures, setAngle, setBurialDepth, setBuried, setCoatingConductivity, setCoatingThickness, setConstantSurfaceTemperature, setCorrosionAllowance, setDesignCode, setDesignPressure, setDesignPressure, setDesignTemperature, setElevation, setEquilibriumHeatTransfer, setEquilibriumMassTransfer, setHeatTransferCoefficient, setHeightProfile, setInnerHeatTransferCoefficient, setInsulationConductivity, setInsulationThickness, setInsulationType, setLegPositions, setLocationClass, setMaterialGrade, setNumberOfIncrements, setNumberOfLegs, setNumberOfNodesInLeg, setOuterHeatTransferCoefficient, setOuterHeatTransferCoefficients, setOuterTemperatures, setOutputFileName, setPipeDiameters, setPipeMaterial, setPipeOuterHeatTransferCoefficients, setPipeSchedule, setPipeWallConductivity, setPipeWallHeatTransferCoefficients, 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:
-
momentum
double momentumMomentum term for pressure drop calculation (ρV²).
-
-
Constructor Details
-
IncompressiblePipeFlow
Constructor for IncompressiblePipeFlow.- Parameters:
name- name of pipeline
-
IncompressiblePipeFlow
Constructor for IncompressiblePipeFlow with inlet stream.- Parameters:
name- name of pipeinStream- input stream
-
-
Method Details
-
calcPressureOut
public double calcPressureOut()Calculate the outlet pressure based on friction and elevation losses.Uses the Darcy-Weisbach equation with effective length (physical + fittings):
ΔP_friction = f × (L_eff / D) × (ρV² / 2)
- Overrides:
calcPressureOutin classAdiabaticPipe- Returns:
- the outlet pressure in bara
-
run
In this method all thermodynamic and unit operations will be calculated in a steady state calculation.
- Specified by:
runin interfaceSimulationInterface- Overrides:
runin classAdiabaticPipe- Parameters:
id- UUID
-
main
Example usage demonstrating pipe flow with fittings.- Parameters:
name- command line arguments (not used)
-