Mechanical Design Framework
NeqSim provides a comprehensive mechanical design framework for sizing and specifying process equipment according to industry standards. This document describes the architecture, usage patterns, and JSON export capabilities.
📘 Related Documentation
Topic Documentation Pipelines Pipeline Mechanical Design - Wall thickness, stress analysis, cost estimation Mathematical Methods Pipeline Design Math - Complete formula reference Design Standards Mechanical Design Standards - Industry standards reference Database Mechanical Design Database - Material properties, design factors Cost Estimation COST_ESTIMATION_FRAMEWORK.md - CAPEX, OPEX, currency, location factors Design Parameters EQUIPMENT_DESIGN_PARAMETERS.md - autoSize vs manual sizing guide
Overview
The mechanical design system calculates:
- Equipment sizing - Vessel dimensions, wall thickness, nozzle sizes
- Weight estimation - Empty, operating, and test weights with breakdowns
- Design conditions - Pressure and temperature with appropriate margins
- Module dimensions - Plot space requirements for installation planning
- Utility requirements - Power consumption, heating/cooling duties
- Cost estimation - Material, fabrication, installation, and project costs
- Bill of Materials - Complete BOM with quantities and costs
Architecture
Class Hierarchy
MechanicalDesign (base class)
├── SeparatorMechanicalDesign → ASME VIII / API 12J
├── GasScrubberMechanicalDesign → ASME VIII / API 12J
├── CompressorMechanicalDesign → API 617
├── PumpMechanicalDesign → API 610
├── ValveMechanicalDesign → IEC 60534 / ANSI/ISA-75
├── ExpanderMechanicalDesign → API 617
├── TankMechanicalDesign → API 650/620
├── HeatExchangerMechanicalDesign → TEMA
├── PipelineMechanicalDesign → ASME B31.3/B31.4/B31.8, DNV-OS-F101, API 5L
│ └── PipeMechanicalDesignCalculator (wall thickness, stress, cost)
├── AdsorberMechanicalDesign → ASME VIII
├── AbsorberMechanicalDesign → ASME VIII
├── EjectorMechanicalDesign → HEI
└── SafetyValveMechanicalDesign → API 520/521
Pipeline Mechanical Design Features
The PipelineMechanicalDesign class provides comprehensive pipeline design including:
| Feature | Description |
|---|---|
| Wall Thickness | ASME B31.3/B31.4/B31.8, DNV-OS-F101 calculations |
| Stress Analysis | Hoop, longitudinal, von Mises stress |
| External Pressure | Collapse and propagation buckling |
| Weight/Buoyancy | Steel, coating, concrete, contents |
| Thermal Design | Expansion loops, insulation sizing |
| Structural Design | Support spacing, spans, bend radius |
| Fatigue Analysis | S-N curves per DNV-RP-C203 |
| Cost Estimation | Complete project cost with BOM |
See Pipeline Mechanical Design for details.
Response Classes for JSON Export
MechanicalDesignResponse (base class)
├── CompressorMechanicalDesignResponse
├── PumpMechanicalDesignResponse
├── ValveMechanicalDesignResponse
├── SeparatorMechanicalDesignResponse
└── HeatExchangerMechanicalDesignResponse
System-Level Aggregation
SystemMechanicalDesign
└── Aggregates all equipment in a ProcessSystem
├── Total weights and volumes
├── Weight breakdown by equipment type
├── Weight breakdown by discipline
├── Utility requirements summary
└── Equipment list with design parameters
Usage Patterns
Individual Equipment Design
// Create and run process equipment
SystemInterface fluid = new SystemSrkEos(298.0, 50.0);
fluid.addComponent("methane", 0.9);
fluid.addComponent("ethane", 0.1);
fluid.setMixingRule("classic");
Stream inlet = new Stream("feed", fluid);
inlet.setFlowRate(10000.0, "kg/hr");
inlet.run();
Separator separator = new Separator("V-100", inlet);
separator.run();
// Access mechanical design
MechanicalDesign mecDesign = separator.getMechanicalDesign();
// Set design standards (optional - uses defaults if not specified)
mecDesign.setCompanySpecificDesignStandards("Equinor");
// Calculate design
mecDesign.calcDesign();
// Access results
double weight = mecDesign.getWeightTotal(); // kg
double wallThickness = mecDesign.getWallThickness(); // mm
double innerDiameter = mecDesign.getInnerDiameter(); // m
double length = mecDesign.getTantanLength(); // m
double designPressure = mecDesign.getMaxDesignPressure(); // bara
// Display results in GUI
mecDesign.displayResults();
System-Wide Mechanical Design
// Build a process system
ProcessSystem process = new ProcessSystem();
process.add(inlet);
process.add(separator);
process.add(gasStream);
process.add(compressor);
process.add(cooler);
process.add(outlet);
process.run();
// Create system mechanical design
SystemMechanicalDesign sysMecDesign = new SystemMechanicalDesign(process);
// Set company standards for all equipment
sysMecDesign.setCompanySpecificDesignStandards("Equinor");
// Run design calculations for all equipment
sysMecDesign.runDesignCalculation();
// Access aggregated results
double totalWeight = sysMecDesign.getTotalWeight(); // kg
double totalVolume = sysMecDesign.getTotalVolume(); // m³
double plotSpace = sysMecDesign.getTotalPlotSpace(); // m²
double powerRequired = sysMecDesign.getTotalPowerRequired(); // kW
double heatingDuty = sysMecDesign.getTotalHeatingDuty(); // kW
double coolingDuty = sysMecDesign.getTotalCoolingDuty(); // kW
// Get breakdowns
Map<String, Double> weightByType = sysMecDesign.getWeightByEquipmentType();
Map<String, Double> weightByDiscipline = sysMecDesign.getWeightByDiscipline();
Map<String, Integer> countByType = sysMecDesign.getEquipmentCountByType();
// Print summary report
System.out.println(sysMecDesign.generateSummaryReport());
JSON Export
Exporting Individual Equipment
// Calculate design
separator.getMechanicalDesign().calcDesign();
// Export to JSON
String json = separator.getMechanicalDesign().toJson();
// Example output:
/*
{
"name": "V-100",
"equipmentType": "Separator",
"equipmentClass": "Separator",
"designStandard": "ASME VIII / API 12J",
"isSystemLevel": false,
"totalWeight": 15420.5,
"vesselWeight": 8500.0,
"internalsWeight": 1200.0,
"pipingWeight": 2100.0,
"eiWeight": 1500.0,
"structuralWeight": 2120.5,
"maxDesignPressure": 55.0,
"maxDesignTemperature": 80.0,
"innerDiameter": 2.4,
"tangentLength": 7.2,
"wallThickness": 28.5,
"moduleLength": 10.0,
"moduleWidth": 5.0,
"moduleHeight": 4.5,
...
}
*/
Exporting System-Wide Design
SystemMechanicalDesign sysMecDesign = new SystemMechanicalDesign(process);
sysMecDesign.runDesignCalculation();
String json = sysMecDesign.toJson();
// Example output:
/*
{
"isSystemLevel": true,
"processName": "Gas Processing Unit",
"equipmentCount": 12,
"totalWeight": 185000.0,
"totalVolume": 450.5,
"totalPlotSpace": 1200.0,
"totalPowerRequired": 2500.0,
"totalPowerRecovered": 150.0,
"netPower": 2350.0,
"totalHeatingDuty": 500.0,
"totalCoolingDuty": 1800.0,
"footprintLength": 40.0,
"footprintWidth": 30.0,
"maxHeight": 15.0,
"weightByType": {
"Separator": 45000.0,
"Compressor": 85000.0,
"HeatExchanger": 25000.0,
"Valve": 5000.0,
"Pump": 12000.0,
"Other": 13000.0
},
"weightByDiscipline": {
"Mechanical": 120000.0,
"Piping": 35000.0,
"E&I": 18000.0,
"Structural": 12000.0
},
"equipmentList": [
{
"name": "V-100",
"type": "Separator",
"weight": 15420.5,
"designPressure": 55.0,
"designTemperature": 80.0,
"power": 0.0,
"duty": 0.0,
"dimensions": "ID 2.4m x TT 7.2m"
},
...
]
}
*/
Comprehensive Mechanical Design Report (JSON)
The MechanicalDesignReport class provides a combined JSON output that includes all mechanical design data for a process system, similar to how Report.generateJsonReport() works for process simulation:
// Create comprehensive mechanical design report
MechanicalDesignReport mechReport = new MechanicalDesignReport(process);
mechReport.runDesignCalculations();
// Generate combined JSON with all mechanical design data
String json = mechReport.toJson();
// Write to file
mechReport.writeJsonReport("mechanical_design_report.json");
// Example output structure:
/*
{
"processName": "Gas Processing Unit",
"reportType": "MechanicalDesignReport",
"generatedAt": "2026-01-11T10:30:00Z",
"systemSummary": {
"totalEquipmentWeight_kg": 185000.0,
"totalPipingWeight_kg": 35000.0,
"totalWeight_kg": 220000.0,
"totalVolume_m3": 450.5,
"totalPlotSpace_m2": 1200.0,
"equipmentCount": 12
},
"utilityRequirements": {
"totalPowerRequired_kW": 2500.0,
"totalPowerRecovered_kW": 150.0,
"netPowerRequirement_kW": 2350.0,
"totalHeatingDuty_kW": 500.0,
"totalCoolingDuty_kW": 1800.0
},
"weightByEquipmentType": {
"Separator": 45000.0,
"Compressor": 85000.0,
"HeatExchanger": 25000.0,
"Valve": 5000.0,
"Pump": 12000.0
},
"weightByDiscipline": {
"Mechanical": 120000.0,
"Piping": 35000.0,
"E&I": 18000.0,
"Structural": 12000.0
},
"equipment": [
{
"name": "V-100",
"type": "Separator",
"mechanicalDesign": {
"designPressure": 55.0,
"designTemperature": 80.0,
"wallThickness": 28.5,
"weight": 15420.5,
...
}
},
...
],
"pipingDesign": {
"totalLength_m": 450.0,
"totalWeight_kg": 35000.0,
"valveWeight_kg": 8500.0,
"flangeWeight_kg": 4200.0,
"fittingWeight_kg": 3100.0,
"weightBySize": {
"4 inch": 5200.0,
"6 inch": 8400.0,
"8 inch": 12300.0,
...
},
"pipeSegments": [
{
"fromEquipment": "V-100",
"toEquipment": "K-100",
"nominalSizeInch": 8.0,
"outsideDiameter_mm": 219.1,
"wallThickness_mm": 8.18,
"schedule": "40",
"length_m": 25.0,
"weight_kg": 1050.0,
"designPressure_bara": 55.0,
"material": "A106-B",
"isGasService": true
},
...
]
}
}
*/
Comparison: Process Simulation vs Mechanical Design JSON
| Use Case | Class | Method |
|---|---|---|
| Process simulation results | Report |
generateJsonReport() |
| System mechanical design only | SystemMechanicalDesign |
toJson() |
| Complete mechanical design with piping | MechanicalDesignReport |
toJson() |
The MechanicalDesignReport.toJson() method provides the most comprehensive output, combining:
- System-level aggregation from
SystemMechanicalDesign - Individual equipment mechanical design data
- Piping interconnection design from
ProcessInterconnectionDesign
Using Specialized Response Classes
For equipment-specific data, use the typed response:
// Compressor-specific response
CompressorMechanicalDesignResponse response =
(CompressorMechanicalDesignResponse) compressor.getMechanicalDesign().getResponse();
int stages = response.getNumberOfStages();
double impellerDiameter = response.getImpellerDiameter(); // mm
double tipSpeed = response.getTipSpeed(); // m/s
double driverPower = response.getDriverPower(); // kW
double tripSpeed = response.getTripSpeed(); // rpm
// Valve-specific response
ValveMechanicalDesignResponse valveResponse =
(ValveMechanicalDesignResponse) valve.getMechanicalDesign().getResponse();
int ansiClass = valveResponse.getAnsiPressureClass();
double cvMax = valveResponse.getCvMax();
double faceToFace = valveResponse.getFaceToFace(); // mm
String valveType = valveResponse.getValveType();
Round-Trip Parsing
// Export to JSON
String json = sysMecDesign.toJson();
// Parse back to object
MechanicalDesignResponse parsed = MechanicalDesignResponse.fromJson(json);
// Access parsed data
double weight = parsed.getTotalWeight();
boolean isSystem = parsed.isSystemLevel();
Merging with Process Data
// Get mechanical design response
MechanicalDesignResponse mecResponse = sysMecDesign.getResponse();
// Get process simulation JSON
String processJson = process.toJson();
// Merge into combined document
String combined = mecResponse.mergeWithEquipmentJson(processJson);
// Result has both "processData" and "mechanicalDesign" sections
Process Design Parameters
Process design parameters define the sizing basis and validation limits for equipment per industry standards. These parameters can be loaded from the database or set manually.
Loading from Database
// Load company-specific process design standards
separator.getMechanicalDesign().setCompanySpecificDesignStandards("MyCompany");
separator.getMechanicalDesign().loadProcessDesignParameters(); // Loads from TechnicalRequirements_Process table
Equipment Process Design Parameters
Separator Process Design Parameters
| Parameter | Method | Unit | Typical Range | Description |
|---|---|---|---|---|
| Foam allowance factor | getFoamAllowanceFactor() |
- | 1.0-1.5 | Liquid level increase due to foaming |
| Gas-liquid droplet diameter | getDropletDiameterGasLiquid() |
μm | 100-150 | Design droplet size for gas-liquid separation |
| Liquid-liquid droplet diameter | getDropletDiameterLiquidLiquid() |
μm | 300-500 | Design droplet size for liquid-liquid separation |
| Maximum gas velocity | getMaxGasVelocityLimit() |
m/s | 2.0-4.0 | Upper limit for gas velocity |
| Maximum liquid velocity | getMaxLiquidVelocity() |
m/s | 0.5-1.5 | Upper limit for liquid outlet velocity |
| Minimum oil retention time | getMinOilRetentionTime() |
min | 2.0-5.0 | Minimum oil residence time |
| Minimum water retention time | getMinWaterRetentionTime() |
min | 3.0-10.0 | Minimum water residence time |
| Demister pressure drop | getDemisterPressureDrop() |
mbar | 1.0-3.0 | Design pressure drop across mist eliminator |
| Demister void fraction | getDemisterVoidFraction() |
- | 0.97-0.99 | Wire mesh demister void fraction |
| Design pressure margin | getDesignPressureMargin() |
- | 1.05-1.15 | Factor above max operating pressure |
Compressor Process Design Parameters
| Parameter | Method | Unit | Typical Range | Description |
|---|---|---|---|---|
| Surge margin | getSurgeMarginPercent() |
% | 10-20 | Minimum margin from surge line |
| Stonewall margin | getStonewallMarginPercent() |
% | 10-15 | Minimum margin from stonewall |
| Minimum turndown | getTurndownPercent() |
% | 60-80 | Minimum operating flow as % of design |
| Target polytropic efficiency | getTargetPolytropicEfficiency() |
% | 75-85 | Design efficiency target |
| Maximum discharge temperature | getMaxDischargeTemperatureC() |
°C | 150-180 | Material/process limit |
| Maximum pressure ratio per stage | getMaxPressureRatioPerStage() |
- | 2.5-3.5 | Single stage limit |
| Maximum vibration | getMaxVibrationMmPerSec() |
mm/s | 2.0-4.0 | Unfiltered vibration limit |
| Seal type | getSealType() |
- | - | Dry gas, oil film, labyrinth |
| Bearing type | getBearingType() |
- | - | Tilting pad, plain, magnetic |
Pump Process Design Parameters (API-610)
| Parameter | Method | Unit | Typical Range | Description |
|---|---|---|---|---|
| NPSH margin factor | getNpshMarginFactor() |
- | 1.1-1.3 | NPSHa / NPSHr requirement |
| Hydraulic power margin | getHydraulicPowerMargin() |
- | 1.05-1.15 | Driver sizing margin |
| POR low fraction | getPorLowFraction() |
- | 0.70-0.80 | Preferred Operating Region low limit (of BEP) |
| POR high fraction | getPorHighFraction() |
- | 1.10-1.15 | Preferred Operating Region high limit (of BEP) |
| AOR low fraction | getAorLowFraction() |
- | 0.60-0.70 | Allowable Operating Region low limit |
| AOR high fraction | getAorHighFraction() |
- | 1.20-1.30 | Allowable Operating Region high limit |
| Maximum suction specific speed | getMaxSuctionSpecificSpeed() |
- | 8000-13000 | Nss limit for stable operation |
| Head margin factor | getHeadMarginFactor() |
- | 1.05-1.10 | Head design margin |
Heat Exchanger Process Design Parameters (TEMA)
| Parameter | Method | Unit | Typical Range | Description |
|---|---|---|---|---|
| Shell fouling resistance (HC) | getFoulingResistanceShellHC() |
m²K/W | 0.00018-0.00053 | Hydrocarbon service |
| Tube fouling resistance (HC) | getFoulingResistanceTubeHC() |
m²K/W | 0.00018-0.00053 | Hydrocarbon service |
| Shell fouling resistance (water) | getFoulingResistanceShellWater() |
m²K/W | 0.00009-0.00035 | Water service |
| Tube fouling resistance (water) | getFoulingResistanceTubeWater() |
m²K/W | 0.00009-0.00035 | Water service |
| Maximum tube velocity | getMaxTubeVelocity() |
m/s | 2.0-4.0 | Erosion limit |
| Minimum tube velocity | getMinTubeVelocity() |
m/s | 0.5-1.0 | Fouling prevention |
| Maximum shell velocity | getMaxShellVelocity() |
m/s | 1.5-3.0 | Vibration/erosion limit |
| Minimum approach temperature | getMinApproachTemperatureC() |
°C | 5-15 | Heat exchanger pinch |
| Maximum tube length | getMaxTubeLengthM() |
m | 3.0-9.0 | Physical/mechanical limit |
| TEMA class | getTemaClass() |
- | R, C, B | Equipment class designation |
Design Validation
The mechanical design framework includes validation methods to verify designs against process requirements and industry standards. Each equipment class provides both individual parameter validation and comprehensive design validation.
Validation Result Classes
Each equipment type has a validation result class that collects issues:
// Separator validation
SeparatorMechanicalDesign.SeparatorValidationResult result = sepDesign.validateDesignComprehensive();
if (!result.isValid()) {
for (String issue : result.getIssues()) {
System.out.println("Issue: " + issue);
}
}
// Compressor validation
CompressorMechanicalDesign.CompressorValidationResult result = compDesign.validateDesign();
// Pump validation
PumpMechanicalDesign.PumpValidationResult result = pumpDesign.validateDesign();
// Heat exchanger validation
HeatExchangerMechanicalDesign.HeatExchangerValidationResult result = hxDesign.validateDesign();
Individual Parameter Validation
Separator Validation Methods
SeparatorMechanicalDesign sepDesign = (SeparatorMechanicalDesign) separator.getMechanicalDesign();
// Validate gas velocity
boolean gasVelOk = sepDesign.validateGasVelocity(actualVelocity); // m/s
// Validate liquid velocity
boolean liqVelOk = sepDesign.validateLiquidVelocity(actualVelocity); // m/s
// Validate retention time (isOil = true for oil, false for water)
boolean retTimeOk = sepDesign.validateRetentionTime(actualMinutes, isOil);
// Validate droplet diameter (isGasLiquid = true for gas-liquid separation)
boolean dropletOk = sepDesign.validateDropletDiameter(actualDiameterUm, isGasLiquid);
Compressor Validation Methods
CompressorMechanicalDesign compDesign = compressor.getMechanicalDesign();
// Validate polytropic efficiency (value as percentage, e.g., 78.0 for 78%)
boolean effOk = compDesign.validateEfficiency(actualEfficiencyPercent);
// Validate discharge temperature
boolean tempOk = compDesign.validateDischargeTemperature(actualTempC);
// Validate pressure ratio per stage
boolean prOk = compDesign.validatePressureRatioPerStage(actualPressureRatio);
// Validate vibration
boolean vibOk = compDesign.validateVibration(actualVibrationMmPerSec);
Pump Validation Methods
PumpMechanicalDesign pumpDesign = pump.getMechanicalDesign();
// Validate NPSH margin
boolean npshOk = pumpDesign.validateNpshMargin(npshAvailable, npshRequired);
// Validate operating in Preferred Operating Region
boolean porOk = pumpDesign.validateOperatingInPOR(operatingFlow, bepFlow);
// Validate operating in Allowable Operating Region
boolean aorOk = pumpDesign.validateOperatingInAOR(operatingFlow, bepFlow);
// Validate suction specific speed
boolean nssOk = pumpDesign.validateSuctionSpecificSpeed(actualNss);
Heat Exchanger Validation Methods
HeatExchangerMechanicalDesign hxDesign = heatExchanger.getMechanicalDesign();
// Validate tube velocity (must be between min and max)
boolean tubeVelOk = hxDesign.validateTubeVelocity(actualVelocity);
// Validate shell velocity
boolean shellVelOk = hxDesign.validateShellVelocity(actualVelocity);
// Validate approach temperature
boolean approachOk = hxDesign.validateApproachTemperature(actualApproachC);
// Validate tube length
boolean lengthOk = hxDesign.validateTubeLength(actualLengthM);
Comprehensive Validation Example
// Run equipment
separator.run();
separator.getMechanicalDesign().calcDesign();
// Comprehensive validation
SeparatorMechanicalDesign sepDesign = (SeparatorMechanicalDesign) separator.getMechanicalDesign();
SeparatorMechanicalDesign.SeparatorValidationResult result = sepDesign.validateDesignComprehensive();
System.out.println("Design valid: " + result.isValid());
System.out.println("Issues found: " + result.getIssues().size());
for (String issue : result.getIssues()) {
System.out.println(" - " + issue);
}
// Example output:
// Design valid: false
// Issues found: 2
// - Gas velocity 3.50 m/s exceeds maximum 3.00 m/s
// - L/D ratio 7.5 outside recommended range 2.0-6.0
Equipment-Specific Design Standards
Separators (API 12J / ASME VIII / NORSOK P-001)
SeparatorMechanicalDesign sepDesign =
(SeparatorMechanicalDesign) separator.getMechanicalDesign();
// Key parameters
double gasLoadFactor = sepDesign.getGasLoadFactor(); // K-factor
double retentionTime = sepDesign.getRetentionTime(); // seconds
double liquidLevelFraction = sepDesign.getFg(); // Fg factor
// Process design parameters
double foamFactor = sepDesign.getFoamAllowanceFactor();
double maxGasVel = sepDesign.getMaxGasVelocityLimit();
double minOilRetention = sepDesign.getMinOilRetentionTime(); // minutes
Design calculations include:
- Gas capacity based on Souders-Brown equation
- Liquid retention time requirements
- Vessel L/D optimization
- Demister sizing with pressure drop calculation
- Nozzle sizing per API RP 14E
- Foam allowance for foaming services
Compressors (API 617)
CompressorMechanicalDesign compDesign =
(CompressorMechanicalDesign) compressor.getMechanicalDesign();
// Key parameters
int stages = compDesign.getNumberOfStages();
double headPerStage = compDesign.getHeadPerStage(); // kJ/kg
double impellerDia = compDesign.getImpellerDiameter(); // mm
double tipSpeed = compDesign.getTipSpeed(); // m/s
double driverPower = compDesign.getDriverPower(); // kW
// Process design parameters
double surgeMargin = compDesign.getSurgeMarginPercent();
double stonewallMargin = compDesign.getStonewallMarginPercent();
double turndown = compDesign.getTurndownPercent();
double targetEff = compDesign.getTargetPolytropicEfficiency();
double maxDischargeTemp = compDesign.getMaxDischargeTemperatureC();
String sealType = compDesign.getSealType();
String bearingType = compDesign.getBearingType();
Design calculations include:
- Number of stages based on max head per stage (30 kJ/kg typical)
- Impeller sizing based on flow coefficient
- Driver margin per API 617 (10-25% depending on power)
- Casing type selection (barrel vs split)
- Rotordynamic estimates (critical speeds)
- Surge/stonewall margin verification
- Discharge temperature limit checking
Pumps (API 610)
PumpMechanicalDesign pumpDesign =
(PumpMechanicalDesign) pump.getMechanicalDesign();
// Key parameters
double specificSpeed = pumpDesign.getSpecificSpeed();
double npshRequired = pumpDesign.getNpshRequired(); // m
double impellerDia = pumpDesign.getImpellerDiameter(); // mm
double driverPower = pumpDesign.getDriverPower(); // kW
// Process design parameters
double npshMarginFactor = pumpDesign.getNpshMarginFactor();
double porLow = pumpDesign.getPorLowFraction(); // Preferred Operating Region
double porHigh = pumpDesign.getPorHighFraction();
double aorLow = pumpDesign.getAorLowFraction(); // Allowable Operating Region
double aorHigh = pumpDesign.getAorHighFraction();
double maxNss = pumpDesign.getMaxSuctionSpecificSpeed();
double headMargin = pumpDesign.getHeadMarginFactor();
Design calculations include:
- Pump type selection (OH, BB, VS) based on application
- Impeller sizing from affinity laws
- NPSH margin verification against requirements
- Driver margin per API 610 (10-25%)
- Seal type selection
- Operating region validation (POR/AOR vs BEP)
- Suction specific speed verification
Valves (IEC 60534)
ValveMechanicalDesign valveDesign =
(ValveMechanicalDesign) valve.getMechanicalDesign();
// Key parameters
double cvMax = valveDesign.getValveCvMax();
int ansiClass = valveDesign.getAnsiPressureClass();
double faceToFace = valveDesign.getFaceToFace(); // mm
double actuatorThrust = valveDesign.getRequiredActuatorThrust(); // N
Design calculations include:
- Cv/Kv sizing per IEC 60534
- ANSI pressure class selection
- Body sizing and wall thickness
- Actuator sizing
- Face-to-face dimensions per ANSI/ISA
Heat Exchangers (TEMA)
HeatExchangerMechanicalDesign hxDesign =
(HeatExchangerMechanicalDesign) heatExchanger.getMechanicalDesign();
// Key parameters
double area = hxDesign.getHeatTransferArea(); // m²
double uValue = hxDesign.getOverallHeatTransferCoefficient(); // W/m²K
int tubeCount = hxDesign.getTubeCount();
double shellDiameter = hxDesign.getShellDiameter(); // mm
// Process design parameters
double shellFouling = hxDesign.getFoulingResistanceShellHC(); // m²K/W
double tubeFouling = hxDesign.getFoulingResistanceTubeHC(); // m²K/W
double maxTubeVel = hxDesign.getMaxTubeVelocity(); // m/s
double minTubeVel = hxDesign.getMinTubeVelocity(); // m/s
double maxShellVel = hxDesign.getMaxShellVelocity(); // m/s
double minApproach = hxDesign.getMinApproachTemperatureC(); // °C
double maxTubeLength = hxDesign.getMaxTubeLengthM(); // m
String temaClass = hxDesign.getTemaClass(); // "R", "C", or "B"
// Calculate clean and fouled U-values
double cleanU = hxDesign.calculateCleanU(shellHTC, tubeHTC, wallThickness, conductivity);
double fouledU = hxDesign.calculateFouledU(cleanU, shellIsWater, tubeIsWater);
Design calculations include:
- Heat transfer area calculation with fouling allowance
- Tube count and layout per TEMA standards
- Shell diameter sizing
- Baffle spacing optimization
- Pressure drop verification
- Velocity limits for erosion/fouling prevention
- Approach temperature validation
- TEMA class (R, C, B) specification
Tanks (API 650/620)
Design calculations include:
- Shell course thickness
- Bottom plate sizing
- Roof type selection
- Wind/seismic loads
- Foundation requirements
Weight Breakdown Categories
By Equipment Type
- Separator
- Compressor
- Pump
- Valve
- HeatExchanger
- Tank
- Expander
- Pipeline
- Other
By Discipline
- Mechanical - Vessel shells, rotating equipment, internals
- Piping - Process piping, valves, fittings
- E&I - Electrical, instrumentation, control systems
- Structural - Steel supports, platforms, ladders
Design Margins
The framework applies industry-standard margins:
| Parameter | Margin | Standard |
|---|---|---|
| Design Pressure | +10% above max operating | ASME VIII |
| Design Temperature | +30°C above max operating | ASME VIII |
| Driver Power (small) | +25% for < 22 kW | API 610/617 |
| Driver Power (medium) | +15% for 22-75 kW | API 610/617 |
| Driver Power (large) | +10% for > 75 kW | API 610/617 |
| Wall Thickness | +CA (corrosion allowance) | ASME VIII |
Integration with Cost Estimation
Each mechanical design class has an associated cost estimation class in neqsim.process.costestimation:
// Access cost estimate from mechanical design
UnitCostEstimateBaseClass costEstimate = mecDesign.getCostEstimate();
double equipmentCost = costEstimate.getEquipmentCost(); // USD
double installedCost = costEstimate.getInstalledCost(); // USD
Comprehensive Cost Estimation Framework
For detailed cost estimation including OPEX, financial metrics, currency conversion, and location factors, see the dedicated cost estimation documentation:
| Document | Description |
|---|---|
| COST_ESTIMATION_FRAMEWORK.md | Comprehensive guide to capital and operating cost estimation |
| COST_ESTIMATION_API_REFERENCE.md | Detailed API reference for all cost estimation classes |
Key Features:
- Equipment costs using Turton et al., Peters & Timmerhaus, GPSA correlations
- 14+ equipment types (separators, compressors, heat exchangers, tanks, expanders, ejectors, absorbers, etc.)
- Multi-currency support (USD, EUR, NOK, GBP, CNY, JPY)
- Location factors for 11 global regions
- Operating cost (OPEX) calculation with utility costs
- Financial metrics (payback period, ROI, NPV)
- Process-level cost aggregation with
ProcessCostEstimate
// Example: Process-level cost estimation
ProcessCostEstimate processCost = new ProcessCostEstimate(process);
// Set location and currency
processCost.setLocationByRegion("North Sea");
processCost.setCurrency("NOK");
// Calculate costs
processCost.calculateCosts();
// Get results in selected currency
double totalCAPEX = processCost.getTotalCapitalCost(); // NOK
double totalOPEX = processCost.calculateOperatingCost(8760); // NOK/year
// Export comprehensive JSON report
String json = processCost.toJson();
Best Practices
-
Always run equipment before calculating design - The mechanical design uses process conditions from the simulation.
-
Set design standards early - Call
setCompanySpecificDesignStandards()beforecalcDesign(). -
Use system-level design for complete estimates -
SystemMechanicalDesignhandles all equipment consistently. -
Export JSON for documentation - The
toJson()method provides comprehensive, structured output. -
Verify critical parameters - Check that design pressure/temperature exceed operating conditions.
Example: Complete Workflow
// 1. Create fluid system
SystemInterface fluid = new SystemSrkEos(298.0, 50.0);
fluid.addComponent("methane", 0.85);
fluid.addComponent("ethane", 0.10);
fluid.addComponent("propane", 0.05);
fluid.setMixingRule("classic");
// 2. Build process
Stream feed = new Stream("feed", fluid);
feed.setFlowRate(50000.0, "kg/hr");
Separator separator = new Separator("V-100", feed);
Stream gas = new Stream("gas", separator.getGasOutStream());
Compressor compressor = new Compressor("K-100", gas);
compressor.setOutletPressure(80.0, "bara");
Cooler cooler = new Cooler("E-100", compressor.getOutletStream());
cooler.setOutTemperature(40.0, "C");
ProcessSystem process = new ProcessSystem();
process.add(feed);
process.add(separator);
process.add(gas);
process.add(compressor);
process.add(cooler);
process.run();
// 3. Calculate mechanical design
SystemMechanicalDesign sysMecDesign = new SystemMechanicalDesign(process);
sysMecDesign.setCompanySpecificDesignStandards("Equinor");
sysMecDesign.runDesignCalculation();
// 4. Generate reports
System.out.println(sysMecDesign.generateSummaryReport());
// 5. Export JSON for documentation/integration
String json = sysMecDesign.toJson();
Files.write(Paths.get("mechanical_design.json"), json.getBytes());
// 6. Access specific equipment details
CompressorMechanicalDesignResponse compResponse =
(CompressorMechanicalDesignResponse) compressor.getMechanicalDesign().getResponse();
System.out.println("Compressor stages: " + compResponse.getNumberOfStages());
System.out.println("Driver power: " + compResponse.getDriverPower() + " kW");