Class SystemMechanicalDesign
- All Implemented Interfaces:
Serializable
This class aggregates mechanical design data from all equipment in a ProcessSystem,
providing:
- Total weight, volume, and plot space for the entire process
- Weight breakdown by equipment type (separators, compressors, heat exchangers, etc.)
- Weight breakdown by discipline (mechanical, piping, E&I, structural)
- Utility requirements summary (power, heating duty, cooling duty)
- Equipment list with key design parameters
- Summary reports in various formats
Usage example:
ProcessSystem process = new ProcessSystem();
// ... add equipment to process ...
process.run();
SystemMechanicalDesign mecDesign = new SystemMechanicalDesign(process);
mecDesign.runDesignCalculation();
// Get summaries
System.out.println("Total weight: " + mecDesign.getTotalWeight() + " kg");
System.out.println(
"Compressor weight: " + mecDesign.getWeightByEquipmentType().get("Compressor") + " kg");
System.out.println("Total power: " + mecDesign.getTotalPowerRequired() + " kW");
// Print full report
System.out.println(mecDesign.generateSummaryReport());
- Version:
- 2.0
- Author:
- esol
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classSummary of key design data for a single equipment item. -
Field Summary
FieldsModifier and TypeFieldDescriptionEquipment count by type.Equipment list with design data.(package private) static org.apache.logging.log4j.LoggerLogger object for class.private doubleMaximum equipment height [m].(package private) int(package private) ProcessSystemprivate static final longSerialization version UID.private doubleTotal cooling duty (coolers) [kW].private doubleTotal footprint length [m].private doubleTotal footprint width [m].private doubleTotal heating duty (heaters) [kW].(package private) doubleprivate doubleTotal power recovered (expanders) [kW].private doubleTotal power required (compressors, pumps) [kW].(package private) double(package private) doubleWeight breakdown by discipline (Mechanical, Piping, E and I, Structural).Weight breakdown by equipment type (e.g., "Separator", "Compressor", "Valve"). -
Constructor Summary
ConstructorsConstructorDescriptionSystemMechanicalDesign(ProcessSystem processSystem) Constructor for SystemMechanicalDesign. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaccumulateByDiscipline(MechanicalDesign mecDesign) Accumulate weight by discipline.private voidaccumulateByType(String type, double weight) Accumulate weight by equipment type.private voidaccumulateUtilities(ProcessEquipmentInterface equipment) Accumulate utility requirements from equipment.private StringclassifyEquipment(ProcessEquipmentInterface equipment) Classify equipment into a type category.createEquipmentSummary(ProcessEquipmentInterface equipment, MechanicalDesign mecDesign) Create an equipment design summary.booleanDeprecated.Generate a comprehensive summary report.Get equipment count by type.Get list of all equipment with design summaries.doubleGet maximum equipment height.doublegetMechanicalWeight(String unit) getMechanicalWeight.doubleGet net power requirement.getProcess.Get the mechanical design response object.doubleGet total cooling duty.doubleGet total footprint length.doubleGet total footprint width.doubleGet total heating duty.intGet the total number of modules.doubleGetter for the fieldtotalPlotSpace.doubleGet total power recovered (expanders).doubleGet total power required (compressors + pumps).doubleGetter for the fieldtotalVolume.doubleGetter for the fieldtotalWeight.Get weight breakdown by discipline.Get weight breakdown by equipment type.inthashCode()private static StringRepeat a string n times (Java 8 compatible).private voidReset all accumulators before running calculations.voidRun design calculations for all equipment in the process system.voidsetCompanySpecificDesignStandards.voidsetDesign.Export mechanical design data to compact JSON format (no pretty printing).toJson()Export mechanical design data to JSON format.private StringTruncate a string to a maximum length.
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version UID.- See Also:
-
logger
static org.apache.logging.log4j.Logger loggerLogger object for class. -
processSystem
ProcessSystem processSystem -
totalPlotSpace
double totalPlotSpace -
totalVolume
double totalVolume -
totalWeight
double totalWeight -
numberOfModules
int numberOfModules -
weightByEquipmentType
-
weightByDiscipline
-
equipmentCountByType
-
equipmentList
Equipment list with design data. -
totalPowerRequired
private double totalPowerRequiredTotal power required (compressors, pumps) [kW]. -
totalPowerRecovered
private double totalPowerRecoveredTotal power recovered (expanders) [kW]. -
totalHeatingDuty
private double totalHeatingDutyTotal heating duty (heaters) [kW]. -
totalCoolingDuty
private double totalCoolingDutyTotal cooling duty (coolers) [kW]. -
totalFootprintLength
private double totalFootprintLengthTotal footprint length [m]. -
totalFootprintWidth
private double totalFootprintWidthTotal footprint width [m]. -
maxEquipmentHeight
private double maxEquipmentHeightMaximum equipment height [m].
-
-
Constructor Details
-
SystemMechanicalDesign
Constructor for SystemMechanicalDesign.
- Parameters:
processSystem- aProcessSystemobject
-
-
Method Details
-
getProcess
-
setCompanySpecificDesignStandards
-
runDesignCalculation
public void runDesignCalculation()Run design calculations for all equipment in the process system.This method iterates through all unit operations, initializes their mechanical design, runs calculations, and aggregates the results. After calling this method, all getters will return updated values.
-
resetAccumulators
private void resetAccumulators()Reset all accumulators before running calculations. -
classifyEquipment
Classify equipment into a type category.- Parameters:
equipment- the equipment to classify- Returns:
- the equipment type name
-
accumulateByType
Accumulate weight by equipment type.- Parameters:
type- equipment typeweight- weight to add
-
accumulateByDiscipline
Accumulate weight by discipline.- Parameters:
mecDesign- mechanical design object
-
accumulateUtilities
Accumulate utility requirements from equipment.- Parameters:
equipment- the equipment to check
-
createEquipmentSummary
private SystemMechanicalDesign.EquipmentDesignSummary createEquipmentSummary(ProcessEquipmentInterface equipment, MechanicalDesign mecDesign) Create an equipment design summary.- Parameters:
equipment- the equipmentmecDesign- the mechanical design- Returns:
- equipment design summary
-
setDesign
public void setDesign()setDesign.
-
getTotalPlotSpace
public double getTotalPlotSpace()Getter for the field
totalPlotSpace.- Returns:
- a double
-
getTotalVolume
public double getTotalVolume()Getter for the field
totalVolume.- Returns:
- a double
-
getTotalWeight
public double getTotalWeight()Getter for the field
totalWeight.- Returns:
- a double
-
getTotalNumberOfModules
public int getTotalNumberOfModules()Get the total number of modules.- Returns:
- number of modules
-
getWeightByEquipmentType
-
getWeightByDiscipline
-
getEquipmentCountByType
-
getEquipmentList
Get list of all equipment with design summaries.- Returns:
- list of equipment design summaries
-
getTotalPowerRequired
public double getTotalPowerRequired()Get total power required (compressors + pumps).- Returns:
- total power in kW
-
getTotalPowerRecovered
public double getTotalPowerRecovered()Get total power recovered (expanders).- Returns:
- total recovered power in kW
-
getNetPowerRequirement
public double getNetPowerRequirement()Get net power requirement.- Returns:
- net power (required - recovered) in kW
-
getTotalHeatingDuty
public double getTotalHeatingDuty()Get total heating duty.- Returns:
- total heating duty in kW
-
getTotalCoolingDuty
public double getTotalCoolingDuty()Get total cooling duty.- Returns:
- total cooling duty in kW
-
getTotalFootprintLength
public double getTotalFootprintLength()Get total footprint length.- Returns:
- total length in meters
-
getTotalFootprintWidth
public double getTotalFootprintWidth()Get total footprint width.- Returns:
- maximum width in meters
-
getMaxEquipmentHeight
public double getMaxEquipmentHeight()Get maximum equipment height.- Returns:
- maximum height in meters
-
generateSummaryReport
Generate a comprehensive summary report.- Returns:
- formatted summary report string
-
generateJsonSummary
Deprecated.UsetoJson()instead for proper Gson serializationGenerate a JSON-format summary (legacy method).- Returns:
- JSON string
-
toJson
Export mechanical design data to JSON format.This method creates a
MechanicalDesignResponseobject and serializes it to JSON using Gson. The JSON includes system-level totals, weight breakdowns by type and discipline, utility requirements, and an equipment list with key design parameters.Usage example:
SystemMechanicalDesign mecDesign = new SystemMechanicalDesign(process); mecDesign.runDesignCalculation(); String json = mecDesign.toJson(); // json contains properly formatted JSON with all design data- Returns:
- JSON string representation of the mechanical design
-
toCompactJson
Export mechanical design data to compact JSON format (no pretty printing).- Returns:
- compact JSON string
-
getResponse
Get the mechanical design response object.This method returns a
MechanicalDesignResponseobject that can be further customized or combined with other data before serialization.- Returns:
- MechanicalDesignResponse object
-
truncate
-
repeat
-
getMechanicalWeight
-
hashCode
-
equals
-
toJson()instead for proper Gson serialization