Class PipelineRunner
java.lang.Object
neqsim.mcp.runners.PipelineRunner
Stateless pipeline simulation runner for MCP integration.
Supports multiphase pipeline flow calculations using Beggs and Brill correlation, including pressure drop, liquid holdup, flow regime, and temperature profile along a pipeline.
- Version:
- 1.0
- Author:
- Even Solbraa
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivatePrivate constructor — all methods are static. -
Method Summary
Modifier and TypeMethodDescriptionprivate static SystemInterfacecreateFluid(String model, double tempK, double pBara) Creates a fluid system for the given EOS model.private static SystemInterfacecreateFluidFromInput(com.google.gson.JsonObject input) Creates a fluid system from the JSON input.private static StringCreates a standard error JSON string.private static doubleparsePressure(com.google.gson.JsonElement element) Parses pressure from JSON element.private static doubleparseTemperature(com.google.gson.JsonElement element) Parses temperature from JSON element.static StringRuns a pipeline simulation from a JSON input string.
-
Field Details
-
GSON
private static final com.google.gson.Gson GSON
-
-
Constructor Details
-
PipelineRunner
private PipelineRunner()Private constructor — all methods are static.
-
-
Method Details
-
run
-
createFluidFromInput
Creates a fluid system from the JSON input.- Parameters:
input- the JSON object containing components, model, temperature, pressure- Returns:
- the configured fluid system
-
createFluid
Creates a fluid system for the given EOS model.- Parameters:
model- EOS model nametempK- temperature in KelvinpBara- pressure in bara- Returns:
- the fluid system
-
parseTemperature
private static double parseTemperature(com.google.gson.JsonElement element) Parses temperature from JSON element.- Parameters:
element- the JSON element- Returns:
- temperature in Kelvin
-
parsePressure
private static double parsePressure(com.google.gson.JsonElement element) Parses pressure from JSON element.- Parameters:
element- the JSON element- Returns:
- pressure in bara
-
errorJson
-