Class PipelineMechanicalDesign
java.lang.Object
neqsim.process.mechanicaldesign.MechanicalDesign
neqsim.process.mechanicaldesign.pipeline.PipelineMechanicalDesign
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
RiserMechanicalDesign, TopsidePipingMechanicalDesign
Mechanical design class for pipelines.
This class integrates pipeline mechanical design calculations with the NeqSim mechanical design framework, providing:
- Wall thickness calculation per ASME B31.3/B31.4/B31.8 and DNV-OS-F101
- Integration with TORG (Technical Requirements Documents)
- JSON export for data exchange
- Database lookup for material properties and design standards
Usage Example
AdiabaticPipe pipe = new AdiabaticPipe("pipeline", stream);
pipe.setDiameter(0.508); // 20 inch
pipe.setLength(50000.0); // 50 km
// Initialize mechanical design
pipe.initMechanicalDesign();
PipelineMechanicalDesign design = (PipelineMechanicalDesign) pipe.getMechanicalDesign();
// Set design conditions
design.setMaxOperationPressure(150.0); // bara
design.setMaxOperationTemperature(80.0 + 273.15); // K
// Apply company standards
design.setCompanySpecificDesignStandards("Equinor");
design.readDesignSpecifications();
// Calculate design
design.calcDesign();
// Export to JSON
String json = design.toJson();
- Version:
- 2.0
- Author:
- ESOL
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate PipeMechanicalDesignCalculatorInternal calculator for standards-based calculations.Data source for loading from database.(package private) StringDesign standard code.(package private) doubleInner diameter in meters.private intLocation class per ASME B31.8.private StringMaterial grade per API 5L.private doublePipeline length in meters.private static final longSerialization version UID.Fields inherited from class MechanicalDesign
costEstimate, designStandard, maxDesignCv, maxDesignDuty, maxDesignGassVolumeFlow, maxDesignOilVolumeFlow, maxDesignPower, maxDesignPressureDrop, maxDesignVelocity, maxDesignVolumeFlow, maxDesignWaterVolumeFlow, minDesignDuty, minDesignGassVolumeFLow, minDesignOilFLow, minDesignPower, minDesignVolumeFLow, minDesignWaterVolumeFLow, moduleHeight, moduleLength, moduleWidth, outerDiameter, tantanLength, wallThickness, weightElectroInstrument, weightNozzle, weightPiping, weightStructualSteel, weightVessel, weigthInternals, weigthVesselShell -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for PipelineMechanicalDesign. -
Method Summary
Modifier and TypeMethodDescriptionvoidcalcDesign.Get the internal calculator for standards-based calculations.Get the data source for database access.Get the design standard code.intGet the location class.doubleGet the calculated MAOP (Maximum Allowable Operating Pressure).Get the material grade.doubleGet the pipeline length.doubleGet the calculated test pressure.private voidInitialize design parameters from pipeline equipment.booleanCheck if the mechanical design is within safe limits.voidLoad design factors from database for the current company.voidLoad all design parameters from database tables.voidloadMaterialFromDatabase(String grade) Load material properties from database.static voidmain.voidreadDesignSpecifications.voidsetDesignStandardCode(String code) Set the design standard code.voidsetLocationClass(int locationClass) Set the location class per ASME B31.8.voidsetMaterialGrade(String grade) Set the material grade per API 5L.voidsetPipelineLength(double length) Set the pipeline length.toJson()Export mechanical design data to JSON format.Methods inherited from class MechanicalDesign
addDesignDataSource, calculateCostEstimate, costEstimateToJson, displayResults, equals, generateBillOfMaterials, getApplicableStandards, getBareModuleCost, getCompanySpecificDesignStandards, getConstrutionMaterial, getCorrosionAllowance, getCostEstimate, getDefaultLiquidDensity, getDefaultLiquidViscosity, getDesignCorrosionAllowance, getDesignDataSources, getDesignJointEfficiency, getDesignLimitData, getDesignMaxPressureLimit, getDesignMaxTemperatureLimit, getDesignMinPressureLimit, getDesignMinTemperatureLimit, getDesignStandard, getDuty, getGrassRootsCost, getHeatTransferArea, getInnerDiameter, getInstallationManHours, getJointEfficiency, getLastMarginResult, getMaterialDesignStandard, getMaterialPipeDesignStandard, getMaxAllowableStress, getMaxDesignCv, getMaxDesignGassVolumeFlow, getMaxDesignOilVolumeFlow, getMaxDesignPressure, getMaxDesignPressureDrop, getMaxDesignVelocity, getMaxDesignVolumeFlow, getMaxDesignWaterVolumeFlow, getMaxOperationPressure, getMaxOperationTemperature, getMinDesignGassVolumeFLow, getMinDesignOilFLow, getMinDesignPressure, getMinDesignVolumeFLow, getMinDesignWaterVolumeFLow, getMinOperationPressure, getMinOperationTemperature, getModuleHeight, getModuleLength, getModuleWidth, getOuterDiameter, getPower, getPressureMarginFactor, getProcessEquipment, getPurchasedEquipmentCost, getRecommendedStandards, getResponse, getTantanLength, getTensileStrength, getTotalModuleCost, getVolumeTotal, getWallThickness, getWeightElectroInstrument, getWeightNozzle, getWeightPiping, getWeightStructualSteel, getWeightTotal, getWeightVessel, getWeigthInternals, getWeigthVesselShell, hasDesignStandard, hashCode, initMechanicalDesign, isHasSetCompanySpecificDesignStandards, setCompanySpecificDesignStandards, setConstrutionMaterial, setCorrosionAllowance, setCostEstimateCepci, setCostEstimateLocationFactor, setCostEstimateMaterial, setDefaultLiquidDensity, setDefaultLiquidViscosity, setDesign, setDesignDataSource, setDesignDataSources, setDesignStandard, setDesignStandard, setDesignStandard, setDesignStandard, setDesignStandards, setHasSetCompanySpecificDesignStandards, setInnerDiameter, setJointEfficiency, setMaterialDesignStandard, setMaterialPipeDesignStandard, setMaxDesignCv, setMaxDesignDuty, setMaxDesignGassVolumeFlow, setMaxDesignOilVolumeFlow, setMaxDesignPower, setMaxDesignPressureDrop, setMaxDesignVelocity, setMaxDesignVolumeFlow, setMaxDesignWaterVolumeFlow, setMaxOperationPressure, setMaxOperationTemperature, setMinDesignDuty, setMinDesignGassVolumeFLow, setMinDesignOilFLow, setMinDesignPower, setMinDesignVolumeFLow, setMinDesignWaterVolumeFLow, setMinOperationPressure, setMinOperationTemperature, setModuleHeight, setModuleLength, setModuleWidth, setOuterDiameter, setPressureMarginFactor, setProcessEquipment, setTantanLength, setTensileStrength, setWallThickness, setWeightElectroInstrument, setWeightNozzle, setWeightPiping, setWeightStructualSteel, setWeightTotal, setWeightVessel, setWeigthInternals, setWeigthVesselShell, toCompactJson, validateOperatingEnvelope, validateOperatingEnvelope
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version UID.- See Also:
-
innerDiameter
double innerDiameterInner diameter in meters. -
designStandardCode
String designStandardCodeDesign standard code. -
calculator
Internal calculator for standards-based calculations. -
pipelineLength
private double pipelineLengthPipeline length in meters. -
materialGrade
Material grade per API 5L. -
locationClass
private int locationClassLocation class per ASME B31.8. -
dataSource
Data source for loading from database.
-
-
Constructor Details
-
PipelineMechanicalDesign
Constructor for PipelineMechanicalDesign.- Parameters:
equipment- aProcessEquipmentInterfaceobject
-
-
Method Details
-
initializeFromPipeline
private void initializeFromPipeline()Initialize design parameters from pipeline equipment. -
getDataSource
Get the data source for database access.- Returns:
- the data source instance
-
getCalculator
Get the internal calculator for standards-based calculations.- Returns:
- the calculator instance
-
loadFromDatabase
public void loadFromDatabase()Load all design parameters from database tables.This method loads material properties and design factors from the NeqSim process design database based on the configured material grade and company identifier.
-
loadMaterialFromDatabase
Load material properties from database.- Parameters:
grade- API 5L material grade (e.g., "X52", "X65", "X70")
-
loadDesignFactorsFromDatabase
public void loadDesignFactorsFromDatabase()Load design factors from database for the current company. -
readDesignSpecifications
public void readDesignSpecifications()readDesignSpecifications.
- Overrides:
readDesignSpecificationsin classMechanicalDesign
-
calcDesign
-
getMAOP
Get the calculated MAOP (Maximum Allowable Operating Pressure).- Parameters:
unit- pressure unit ("bar", "MPa", "psi")- Returns:
- MAOP in specified unit
-
getTestPressure
public double getTestPressure()Get the calculated test pressure.- Returns:
- test pressure in MPa
-
isDesignSafe
public boolean isDesignSafe()Check if the mechanical design is within safe limits.- Returns:
- true if design is safe
-
setMaterialGrade
Set the material grade per API 5L.- Parameters:
grade- material grade (e.g., "X52", "X65", "X70")
-
getMaterialGrade
-
setLocationClass
public void setLocationClass(int locationClass) Set the location class per ASME B31.8.- Parameters:
locationClass- location class 1-4
-
getLocationClass
public int getLocationClass()Get the location class.- Returns:
- location class 1-4
-
setDesignStandardCode
Set the design standard code.- Parameters:
code- design standard code
-
getDesignStandardCode
-
getPipelineLength
public double getPipelineLength()Get the pipeline length.- Returns:
- pipeline length in meters
-
setPipelineLength
public void setPipelineLength(double length) Set the pipeline length.- Parameters:
length- pipeline length in meters
-
toJson
Export mechanical design data to JSON format.This method creates a
MechanicalDesignResponseobject and serializes it to JSON using Gson. The JSON includes equipment identification, weight breakdown, design conditions, dimensions, and materials information.Usage example:
MechanicalDesign mecDesign = separator.getMechanicalDesign(); mecDesign.calcDesign(); String json = mecDesign.toJson();- Overrides:
toJsonin classMechanicalDesign- Returns:
- JSON string representation of the mechanical design
-
main
-