Class AdiabaticPipe
- All Implemented Interfaces:
Serializable, Runnable, AutoSizeable, CapacityConstrainedEquipment, PipeLineInterface, ProcessEquipmentInterface, TwoPortInterface, SimulationInterface, NamedInterface
- Direct Known Subclasses:
IncompressiblePipeFlow
This class models a simple adiabatic (no heat transfer) pipe for single-phase flow using basic gas flow equations. It calculates pressure drop from friction and elevation changes.
Calculation Modes
- Calculate outlet pressure - Given inlet conditions and flow rate
- Calculate flow rate - Given inlet and outlet pressures (when outlet pressure is set)
The pipeline implements CapacityConstrainedEquipment (inherited from Pipeline) with constraints:
- Velocity - SOFT limit based on erosional velocity
- LOF (Likelihood of Failure) - SOFT limit for flow-induced vibration
- FRMS - SOFT limit for flow-induced vibration intensity
- Volume flow - DESIGN limit from mechanical design
Example Usage
// Create gas stream
SystemInterface gas = new SystemSrkEos(278.15, 220.0);
gas.addComponent("methane", 24.0, "MSm^3/day");
gas.setMixingRule("classic");
Stream inlet = new Stream("inlet", gas);
inlet.run();
// Create adiabatic pipe
AdiabaticPipe pipe = new AdiabaticPipe("pipeline", inlet);
pipe.setLength(700000.0); // 700 km
pipe.setDiameter(0.7112); // ~28 inches
pipe.setPipeWallRoughness(5e-6);
pipe.run();
System.out.println("Outlet pressure: " + pipe.getOutletPressure("bara") + " bara");
- Version:
- 2.0
- Author:
- Even Solbraa
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanFlag indicating if pipe has been auto-sized.(package private) double(package private) double(package private) doubleprivate doubleMaximum design FRMS value.private doubleMaximum design LOF value.private doubleMaximum design velocity in m/s.(package private) String(package private) doubleprivate doubleWall thickness in meters.protected doubleprivate RhonePoulencVelocityRhone-Poulenc velocity calculator.private static final longSerialization version UID.(package private) boolean(package private) booleanprivate StringSupport arrangement for FIV calculations.protected doubleFields 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
ConstructorsConstructorDescriptionAdiabaticPipe(String name) Constructor for AdiabaticPipe.AdiabaticPipe(String name, StreamInterface inStream) Constructor for AdiabaticPipe. -
Method Summary
Modifier and TypeMethodDescriptionvoidautoSize()Automatically size using default safety factor (1.2 = 20% margin).voidautoSize(double safetyFactor) Automatically size the equipment based on connected stream conditions.voidAutomatically size using company-specific design standards.doublecalcFlow()Calculate the flow rate required to achieve the specified outlet pressure.doubleCalculate the outlet pressure based on friction and elevation losses.doubleCalculate Flow-induced vibration RMS (FRMS).doublecalculateFRMS(double frmsConstant) Calculate Flow-induced vibration RMS (FRMS) with specified constant.doubleCalculate Likelihood of Failure (LOF) for flow-induced vibration.doublecalcWallFrictionFactor(double reynoldsNumber) Calculate the wall friction factor using the Haaland equation.voidDisable Rhone-Poulenc maximum velocity and revert to API RP 14E erosional velocity.voiddisplayResult.doubleGet the pipe inner diameter.doubleCalculate erosional velocity with default C-factor of 100.doublegetErosionalVelocity(double cFactor) Calculate erosional velocity per API RP 14E.Get comprehensive FIV analysis results as a map.Get FIV analysis as JSON string.Get the determined flow regime.doubleGet the friction factor.private doubleGet the gas density used for velocity calculations.doubleGet the inlet elevation above reference.doubleGet the total pipe length.doubleGet the effective maximum allowable velocity using the currently configured method.Get the name of the currently active maximum velocity method.doubleGet the mixture velocity in m/s.doubleGet the outlet elevation above reference.getPipe()Get the underlying flow system (for advanced models).doubleGet the pipe wall roughness.doubleGet pipe wall thickness.doubleGet the total pressure drop across the pipeline.doubleGet the Reynolds number for the flow.Get the Rhone-Poulenc velocity calculator, or null if not enabled.doubleCalculate the maximum allowable gas velocity using the Rhone-Poulenc curves.Get a detailed sizing report after auto-sizing.Get sizing report as JSON for programmatic access.Get support arrangement for FIV calculations.doubleGet the flow velocity in the pipe.protected voidOverride parent's capacity constraint initialization to add FIV/FRMS constraints.booleanCheck if equipment has been auto-sized.booleanCheck if Rhone-Poulenc maximum velocity is enabled.static voidMain method for testing.voidIn this method all thermodynamic and unit operations will be calculated in a steady state calculation.private doubleselectStandardPipeSize(double calculatedDiameterInches) Selects standard pipe nominal diameter based on calculated diameter.voidsetDiameter(double diameter) Set the pipe inner diameter.voidsetInitialFlowPattern(String flowPattern) Set initial flow pattern for simulation initialization.voidsetInletElevation(double inletElevation) Set the inlet elevation above reference.voidsetLength(double length) Set the total pipe length.voidsetMaxDesignFRMS(double maxFRMS) Set maximum design FRMS for capacity constraints.voidsetMaxDesignLOF(double maxLOF) Set maximum design LOF for capacity constraints.voidsetMaxDesignVelocity(double maxVelocity) Set maximum design velocity for capacity constraints.voidsetOutletElevation(double outletElevation) Set the outlet elevation above reference.voidsetOutletPressure(double pressure) Set outlet pressure of twoport.voidsetOutletTemperature(double temperature) Set outlet temperature of twoport.voidsetPipeSpecification(double nominalDiameter, String pipeSec) Set pipe specification from database.voidsetPipeWallRoughness(double roughness) Set the pipe wall roughness.voidsetPipeWallThickness(double thickness) Set pipe wall thickness.voidEnable Rhone-Poulenc maximum velocity calculation for gas pipes.voidsetRhonePoulencServiceType(RhonePoulencVelocity.ServiceType serviceType, boolean useInterpolation) Enable Rhone-Poulenc maximum velocity calculation using tabulated data with log-log interpolation for higher accuracy.voidsetSupportArrangement(String arrangement) Set support arrangement for FIV calculations.voidEnable Rhone-Poulenc maximum velocity calculation with default non-corrosive gas settings.Methods 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:
-
inletPressure
double inletPressure -
setTemperature
boolean setTemperature -
setPressureOut
boolean setPressureOut -
temperatureOut
protected double temperatureOut -
pressureOut
protected double pressureOut -
dH
double dH -
pipeSpecification
String pipeSpecification -
insideDiameter
double insideDiameter -
pipeWallRoughnessLocal
double pipeWallRoughnessLocal -
supportArrangement
Support arrangement for FIV calculations. -
maxDesignVelocity
private double maxDesignVelocityMaximum design velocity in m/s. -
maxDesignLOF
private double maxDesignLOFMaximum design LOF value. -
maxDesignFRMS
private double maxDesignFRMSMaximum design FRMS value. -
rhonePoulencVelocity
Rhone-Poulenc velocity calculator. When non-null, maximum velocity is determined from the Rhone-Poulenc curves instead of API RP 14E. -
pipeWallThickness
private double pipeWallThicknessWall thickness in meters. -
autoSized
private boolean autoSizedFlag indicating if pipe has been auto-sized.
-
-
Constructor Details
-
AdiabaticPipe
-
AdiabaticPipe
Constructor for AdiabaticPipe.- Parameters:
name- name of pipeinStream- input stream
-
-
Method Details
-
setLength
public void setLength(double length) Set the total pipe length.- Specified by:
setLengthin interfacePipeLineInterface- Overrides:
setLengthin classPipeline- Parameters:
length- the pipe length in meters
-
getLength
public double getLength()Get the total pipe length.- Specified by:
getLengthin interfacePipeLineInterface- Overrides:
getLengthin classPipeline- Returns:
- the pipe length in meters
-
setDiameter
public void setDiameter(double diameter) Set the pipe inner diameter.- Specified by:
setDiameterin interfacePipeLineInterface- Overrides:
setDiameterin classPipeline- Parameters:
diameter- the inner diameter in meters
-
getDiameter
public double getDiameter()Get the pipe inner diameter.- Specified by:
getDiameterin interfacePipeLineInterface- Overrides:
getDiameterin classPipeline- Returns:
- the inner diameter in meters
-
setPipeWallRoughness
public void setPipeWallRoughness(double roughness) Set the pipe wall roughness.- Specified by:
setPipeWallRoughnessin interfacePipeLineInterface- Overrides:
setPipeWallRoughnessin classPipeline- Parameters:
roughness- the wall roughness in meters
-
getPipeWallRoughness
public double getPipeWallRoughness()Get the pipe wall roughness.- Specified by:
getPipeWallRoughnessin interfacePipeLineInterface- Overrides:
getPipeWallRoughnessin classPipeline- Returns:
- the wall roughness in meters
-
setInletElevation
public void setInletElevation(double inletElevation) Set the inlet elevation above reference.- Specified by:
setInletElevationin interfacePipeLineInterface- Overrides:
setInletElevationin classPipeline- Parameters:
inletElevation- inlet elevation in meters
-
getInletElevation
public double getInletElevation()Get the inlet elevation above reference.- Specified by:
getInletElevationin interfacePipeLineInterface- Overrides:
getInletElevationin classPipeline- Returns:
- inlet elevation in meters
-
setOutletElevation
public void setOutletElevation(double outletElevation) Set the outlet elevation above reference.- Specified by:
setOutletElevationin interfacePipeLineInterface- Overrides:
setOutletElevationin classPipeline- Parameters:
outletElevation- outlet elevation in meters
-
getOutletElevation
public double getOutletElevation()Get the outlet elevation above reference.- Specified by:
getOutletElevationin interfacePipeLineInterface- Overrides:
getOutletElevationin classPipeline- Returns:
- outlet elevation in meters
-
setPipeSpecification
Set pipe specification from database.- Specified by:
setPipeSpecificationin interfacePipeLineInterface- Overrides:
setPipeSpecificationin classPipeline- Parameters:
nominalDiameter- nominal diameter in mm or inchespipeSec- pipe specification code (e.g., "API 5L", "ANSI B36.10")
-
setOutletTemperature
public void setOutletTemperature(double temperature) Set outlet temperature of twoport.- Specified by:
setOutletTemperaturein interfacePipeLineInterface- Specified by:
setOutletTemperaturein interfaceTwoPortInterface- Overrides:
setOutletTemperaturein classPipeline- Parameters:
temperature- value to set in kelvin
-
setOutletPressure
public void setOutletPressure(double pressure) Set outlet pressure of twoport.- Specified by:
setOutletPressurein interfacePipeLineInterface- Specified by:
setOutletPressurein interfaceTwoPortInterface- Overrides:
setOutletPressurein classPipeline- Parameters:
pressure- value to set in unit bara
-
calcWallFrictionFactor
public double calcWallFrictionFactor(double reynoldsNumber) Calculate the wall friction factor using the Haaland equation.- Parameters:
reynoldsNumber- the Reynolds number- Returns:
- the Darcy friction factor
-
calcPressureOut
public double calcPressureOut()Calculate the outlet pressure based on friction and elevation losses.This method calculates the pressure drop using the general flow equation for compressible gas flow, accounting for:
- Friction pressure loss (using effective length including fittings)
- Elevation pressure change (hydrostatic head)
The effective length includes both physical pipe length and equivalent length from fittings:
L_eff = L_physical + Σ(L/D)_i × D
- Returns:
- the outlet pressure in bara
-
calcFlow
public double calcFlow()Calculate the flow rate required to achieve the specified outlet pressure.Uses bisection iteration to find the flow rate that achieves the target outlet pressure.
- Returns:
- the calculated flow rate in the current system units
-
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
-
displayResult
public void displayResult()displayResult.
- Specified by:
displayResultin interfaceProcessEquipmentInterface- Overrides:
displayResultin classPipeline
-
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
-
setInitialFlowPattern
Set initial flow pattern for simulation initialization.- Specified by:
setInitialFlowPatternin interfacePipeLineInterface- Overrides:
setInitialFlowPatternin classPipeline- Parameters:
flowPattern- initial flow pattern (e.g., "stratified", "slug")
-
getPressureDrop
public double getPressureDrop()Get the total pressure drop across the pipeline.- Specified by:
getPressureDropin interfacePipeLineInterface- Overrides:
getPressureDropin classPipeline- Returns:
- pressure drop in bar
-
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
-
getReynoldsNumber
public double getReynoldsNumber()Get the Reynolds number for the flow.- Specified by:
getReynoldsNumberin interfacePipeLineInterface- Overrides:
getReynoldsNumberin classPipeline- Returns:
- Reynolds number (dimensionless)
-
getFrictionFactor
public double getFrictionFactor()Get the friction factor.- Specified by:
getFrictionFactorin interfacePipeLineInterface- Overrides:
getFrictionFactorin classPipeline- Returns:
- Darcy friction factor (dimensionless)
-
getSupportArrangement
Get support arrangement for FIV calculations.- Returns:
- support arrangement (Stiff, Medium stiff, Medium, Flexible)
-
setSupportArrangement
Set support arrangement for FIV calculations.- Parameters:
arrangement- support arrangement (Stiff, Medium stiff, Medium, Flexible)
-
setRhonePoulencServiceType
Enable Rhone-Poulenc maximum velocity calculation for gas pipes.When enabled, the maximum allowable velocity is determined from the Rhone-Poulenc curves instead of the API RP 14E erosional velocity. The Rhone-Poulenc method uses a power-law correlation between gas density and maximum velocity, with service-type-dependent constants.
- Parameters:
serviceType- the gas service type (NON_CORROSIVE_GAS or CORROSIVE_GAS)
-
useRhonePoulencVelocity
public void useRhonePoulencVelocity()Enable Rhone-Poulenc maximum velocity calculation with default non-corrosive gas settings.Equivalent to calling
setRhonePoulencServiceType(ServiceType.NON_CORROSIVE_GAS). -
setRhonePoulencServiceType
public void setRhonePoulencServiceType(RhonePoulencVelocity.ServiceType serviceType, boolean useInterpolation) Enable Rhone-Poulenc maximum velocity calculation using tabulated data with log-log interpolation for higher accuracy.- Parameters:
serviceType- the gas service typeuseInterpolation- true to use tabulated interpolation, false for power-law formula
-
disableRhonePoulencVelocity
public void disableRhonePoulencVelocity()Disable Rhone-Poulenc maximum velocity and revert to API RP 14E erosional velocity. -
isRhonePoulencEnabled
public boolean isRhonePoulencEnabled()Check if Rhone-Poulenc maximum velocity is enabled.- Returns:
- true if Rhone-Poulenc method is active
-
getRhonePoulencCalculator
Get the Rhone-Poulenc velocity calculator, or null if not enabled.- Returns:
- the RhonePoulencVelocity calculator or null
-
getRhonePoulencMaxVelocity
public double getRhonePoulencMaxVelocity()Calculate the maximum allowable gas velocity using the Rhone-Poulenc curves.This method uses the current gas density from the simulation to look up the maximum velocity from the Rhone-Poulenc correlation. If Rhone-Poulenc is not enabled, this returns 0.0.
- Returns:
- maximum allowable velocity in m/s, or 0.0 if not enabled or density unavailable
-
getMaxAllowableVelocity
public double getMaxAllowableVelocity()Get the effective maximum allowable velocity using the currently configured method.Returns Rhone-Poulenc max velocity if enabled, otherwise the API RP 14E erosional velocity.
- Returns:
- maximum allowable velocity in m/s
-
getMaxVelocityMethod
Get the name of the currently active maximum velocity method.- Returns:
- "RHONE_POULENC" or "API_RP_14E"
-
getGasDensityForVelocity
private double getGasDensityForVelocity()Get the gas density used for velocity calculations.- Returns:
- gas density in kg/m3, or 0.0 if unavailable
-
setPipeWallThickness
public void setPipeWallThickness(double thickness) Set pipe wall thickness.- Parameters:
thickness- wall thickness in meters
-
getPipeWallThickness
public double getPipeWallThickness()Get pipe wall thickness.- Returns:
- wall thickness in meters
-
getErosionalVelocity
public double getErosionalVelocity(double cFactor) Calculate erosional velocity per API RP 14E.- Parameters:
cFactor- erosional C-factor (typically 100-150)- Returns:
- erosional velocity in m/s
-
getErosionalVelocity
public double getErosionalVelocity()Calculate erosional velocity with default C-factor of 100.- Returns:
- erosional velocity in m/s
-
getMixtureVelocity
public double getMixtureVelocity()Get the mixture velocity in m/s.- Returns:
- mixture velocity in m/s
-
calculateLOF
public double calculateLOF()Calculate Likelihood of Failure (LOF) for flow-induced vibration.LOF interpretation:
- < 0.5: Low risk - acceptable
- 0.5 - 1.0: Medium risk - monitoring recommended
- > 1.0: High risk - design review required
- Returns:
- LOF value (dimensionless)
-
calculateFRMS
public double calculateFRMS()Calculate Flow-induced vibration RMS (FRMS).- Returns:
- FRMS value
-
calculateFRMS
public double calculateFRMS(double frmsConstant) Calculate Flow-induced vibration RMS (FRMS) with specified constant.- Parameters:
frmsConstant- FRMS constant (typically 6.7)- Returns:
- FRMS value
-
getFIVAnalysis
-
getFIVAnalysisJson
Get FIV analysis as JSON string.- Returns:
- JSON string with FIV analysis
-
setMaxDesignVelocity
public void setMaxDesignVelocity(double maxVelocity) Set maximum design velocity for capacity constraints.- Parameters:
maxVelocity- maximum velocity in m/s
-
setMaxDesignLOF
public void setMaxDesignLOF(double maxLOF) Set maximum design LOF for capacity constraints.- Parameters:
maxLOF- maximum LOF value
-
setMaxDesignFRMS
public void setMaxDesignFRMS(double maxFRMS) Set maximum design FRMS for capacity constraints.- Parameters:
maxFRMS- maximum FRMS value
-
initializeCapacityConstraints
protected void initializeCapacityConstraints()Override parent's capacity constraint initialization to add FIV/FRMS constraints.- Overrides:
initializeCapacityConstraintsin classPipeline
-
autoSize
public void autoSize(double safetyFactor) Automatically size the equipment based on connected stream conditions.This method calculates dimensions and design parameters using the inlet stream properties and applies the specified safety factor. The equipment must have a valid inlet stream connected before calling this method.
- Specified by:
autoSizein interfaceAutoSizeable- Parameters:
safetyFactor- multiplier for design capacity, typically 1.1-1.3 (10-30% over design)
-
selectStandardPipeSize
private double selectStandardPipeSize(double calculatedDiameterInches) Selects standard pipe nominal diameter based on calculated diameter.- Parameters:
calculatedDiameterInches- calculated inside diameter in inches- Returns:
- nearest standard pipe nominal diameter in inches
-
autoSize
public void autoSize()Automatically size using default safety factor (1.2 = 20% margin).- Specified by:
autoSizein interfaceAutoSizeable
-
autoSize
Automatically size using company-specific design standards.This method applies design rules from the specified company's technical requirements (TR) documents. The standards are loaded from the NeqSim design database.
- Specified by:
autoSizein interfaceAutoSizeable- Parameters:
company- company name (e.g., "Equinor", "Shell", "TotalEnergies")trDocument- TR document reference (e.g., "TR2000", "DEP-31.38.01.11")
-
isAutoSized
public boolean isAutoSized()Check if equipment has been auto-sized.- Specified by:
isAutoSizedin interfaceAutoSizeable- Returns:
- true if autoSize() has been called successfully
-
getSizingReport
Get a detailed sizing report after auto-sizing.The report includes:
- Design basis (flow rates, pressures, temperatures)
- Calculated dimensions
- Design parameters (K-factor, Cv, velocity, etc.)
- Safety margins
- Specified by:
getSizingReportin interfaceAutoSizeable- Returns:
- formatted sizing report string
-
getSizingReportJson
Get sizing report as JSON for programmatic access.- Specified by:
getSizingReportJsonin interfaceAutoSizeable- Returns:
- JSON string with sizing data
-
main
Main method for testing.- Parameters:
name- command line arguments
-