Solve a thermodynamics script
solve_worksheetSolves processes and whole cycles with CoolProp, written as a Thermoprops Worksheet script. Answers a table of the states, the printed results, errors by line, and a link that opens it solved with diagrams: give it to the user.
One statement per line, # comments: fluid R134a units celsius # or kelvin, imperial reference ASHRAE # zero of h, s: DEF, ASHRAE (textbook refrigerant tables), IIR, NBP 1: T = -10 °C, sat vapor # two properties; sat liquid is x = 0 2: from 1, compressed to P = 1.2 MPa, eta = 80% 3: P = P2, sat liquid 4: from 3, throttled to P = P1 COP = (h1 - h4) / (h2 - h1) print COP, T2 in °F, cp2 Processes: isentropic, compressed/expanded (eta), throttled, isobaric, isothermal, isochoric, isenthalpic, polytropic (n). Properties: T P h s x D v u cp cv mu k Pr Z a g; states show T P h s x v, print others. Fluids: Air, Ammonia, Argon, CarbonDioxide, CarbonMonoxide, Ethanol, Helium, Hydrogen, IsoButane, Isopentane, Methane, n-Butane, n-Pentane, n-Propane, Nitrogen, Oxygen, R1234yf, R1234ze(E), R125, R134a, R143a, R152A, R22, R245fa, R32, R404A, R410A, R507A, Toluene, Water. More syntax: language_reference.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"script": "<script>"
},
"name": "solve_worksheet"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| script | Yes |