Class EquipmentSizingRunner
java.lang.Object
neqsim.mcp.runners.EquipmentSizingRunner
Quick equipment sizing runner for MCP integration.
Performs approximate sizing for common process equipment based on thermodynamic flash results. Supports separators (API 12J approach) and compressors (polytropic head / power). Results include dimensions, duty/power, and design basis summary.
- Version:
- 1.0
- Author:
- Even Solbraa
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivatePrivate constructor — all methods are static. -
Method Summary
Modifier and TypeMethodDescriptionprivate static SystemInterfacebuildFluid(com.google.gson.JsonObject input) Builds a fluid from JSON input.private static StringCreates an error JSON response.private static doubleextractFlowRate(com.google.gson.JsonObject input) Extracts flow rate from input JSON.private static doubleround(double value, int decimals) Rounds a value to the specified number of decimal places.static StringRuns an equipment sizing calculation from a JSON definition.private static StringsizeCompressor(com.google.gson.JsonObject input) Sizes a compressor using polytropic calculations.private static StringsizeSeparator(com.google.gson.JsonObject input) Sizes a separator vessel using flash results and retention time approach.
-
Field Details
-
GSON
private static final com.google.gson.Gson GSON
-
-
Constructor Details
-
EquipmentSizingRunner
private EquipmentSizingRunner()Private constructor — all methods are static.
-
-
Method Details
-
run
-
sizeSeparator
Sizes a separator vessel using flash results and retention time approach.- Parameters:
input- JSON input with fluid definition and sizing parameters- Returns:
- JSON string with separator dimensions
-
sizeCompressor
Sizes a compressor using polytropic calculations.- Parameters:
input- JSON input with fluid definition and compressor parameters- Returns:
- JSON string with compressor sizing results
-
buildFluid
Builds a fluid from JSON input.- Parameters:
input- JSON object with model, temperature, pressure, components- Returns:
- configured SystemInterface
-
extractFlowRate
private static double extractFlowRate(com.google.gson.JsonObject input) Extracts flow rate from input JSON.- Parameters:
input- JSON with flowRate field- Returns:
- flow rate in kg/hr
-
round
private static double round(double value, int decimals) Rounds a value to the specified number of decimal places.- Parameters:
value- the value to rounddecimals- number of decimal places- Returns:
- rounded value
-
errorJson
-