{ "cells": [ { "cell_type": "markdown", "id": "cell-00", "metadata": {}, "source": [ "# Parameters and a water state\n", "\n", "\n", "**Evidence: numerical verification.** Compute liquid water at 298.15 K and\n", "100,000 Pa, then return to the same density to check pressure closure.\n", "\n", "The canonical input is `held-cameretti-sadowski-2008/4`. Its water coefficients\n", "come from Held, Cameretti and Sadowski (2008), Table 1\n", "([paper](https://doi.org/10.1016/j.fluid.2008.06.010)); the packet retains the\n", "NIST molar mass and source-specific input conventions. Read `packet.toml`\n", "beside the parameter file for its exact provenance and use basis.\n" ] }, { "cell_type": "markdown", "id": "cell-01", "metadata": {}, "source": [ "## Read the inputs\n", "\n", "Use a repository checkout with the environment described in the installation\n", "guide. The wheel alone does not contain these data. All density, association,\n", "equilibrium and parameter-fit iterations below run in the native Engine.\n" ] }, { "cell_type": "code", "execution_count": 1, "id": "cell-02", "metadata": { "execution": { "iopub.execute_input": "2026-10-20T20:17:34.501139Z", "iopub.status.busy": "2026-10-20T20:17:34.501033Z", "iopub.status.idle": "2026-10-20T20:17:34.851040Z", "shell.execute_reply": "2026-10-20T20:17:34.850322Z" } }, "outputs": [], "source": [ "from pathlib import Path\n", "import pandas as pd\n", "from IPython.display import display\n", "from epcsaft import (\n", " Parameters,\n", " Pure,\n", " ThermochemistryStatus,\n", ")\n", "\n", "pd.set_option(\"display.max_columns\", None)\n", "pd.set_option(\"display.max_colwidth\", None)\n", "\n", "ROOT = next(\n", " folder\n", " for folder in (Path.cwd(), *Path.cwd().parents)\n", " if (folder / \"ARCHITECTURE.yaml\").is_file()\n", ")\n", "PACKETS = ROOT / \"data\" / \"packets\"\n" ] }, { "cell_type": "markdown", "id": "cell-03", "metadata": {}, "source": [ "## Resolve pressure to density\n", "\n", "`Pure` selects one component from the packet. A pressure request asks the Engine\n", "for the liquid density branch; a density request evaluates that state directly.\n", "The numerical criterion is an absolute pressure difference below 0.001 Pa.\n", "Molar density times molar mass gives mass density in kg/m³.\n" ] }, { "cell_type": "code", "execution_count": 2, "id": "cell-04", "metadata": { "execution": { "iopub.execute_input": "2026-10-20T20:17:34.853060Z", "iopub.status.busy": "2026-10-20T20:17:34.852813Z", "iopub.status.idle": "2026-10-20T20:17:34.865610Z", "shell.execute_reply": "2026-10-20T20:17:34.864750Z" } }, "outputs": [ { "data": { "text/html": [ "
| \n", " | Molar density / mol m^-3 | \n", "Mass density / kg m^-3 | \n", "Pressure closure / Pa | \n", "total_enthalpy | \n", "thermal_cause | \n", "
|---|---|---|---|---|---|
| 0 | \n", "55342.16982 | \n", "997.004685 | \n", "0.000002 | \n", "None | \n", "MissingRecord | \n", "