Class PropertyTableRunner
java.lang.Object
neqsim.mcp.runners.PropertyTableRunner
Stateless property table runner for MCP integration.
Sweeps temperature or pressure over a range and returns a table of thermodynamic and transport properties at each point. This is the "one-shot engineering answer" tool that external agents need most often — no process flowsheet construction required.
Input JSON Format:
{ "model": "SRK", "components": {"methane": 0.85, "ethane": 0.10, "propane": 0.05},
"mixingRule": "classic", "sweep": "temperature", "sweepFrom": {"value": -40.0, "unit": "C"},
"sweepTo": {"value": 80.0, "unit": "C"}, "points": 25, "fixedPressure": {"value": 50.0, "unit":
"bara"}, "fixedTemperature": {"value": 25.0, "unit": "C"}, "properties": ["density", "viscosity",
"Cp", "Z", "enthalpy", "entropy", "thermalConductivity", "molarMass", "soundSpeed"] } - Author:
- Even Solbraa @version 1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final com.google.gson.Gson -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivatePrivate constructor — all methods are static. -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidaddProperty(com.google.gson.JsonObject row, SystemInterface fluid, String property) Adds a named property value to a JSON row object.private static StringCreates a standard error JSON response.Returns the list of available properties that can be requested.static StringRuns a property table calculation from a JSON input string.
-
Field Details
-
GSON
private static final com.google.gson.Gson GSON -
AVAILABLE_PROPERTIES
-
-
Constructor Details
-
PropertyTableRunner
private PropertyTableRunner()Private constructor — all methods are static.
-
-
Method Details
-
run
-
getAvailableProperties
-
addProperty
private static void addProperty(com.google.gson.JsonObject row, SystemInterface fluid, String property) Adds a named property value to a JSON row object.- Parameters:
row- the JSON row to add tofluid- the fluid system to read fromproperty- the property name
-
errorJson
-