io.save_solution
io.save_solution(network, solution, path, *, dataset='Mean flow', **kwargs)Write or append a solved network to a UI-readable YAML case.
If path does not exist, writes a fresh case (network + this solution’s datasets). If it exists, the file is expected to already hold this same network; the solution’s datasets are appended under the given dataset name so several solutions can be overlaid in one file.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| network | Network | The flow network (must match the network already stored in an existing file). | required |
| solution | Solution | The converged solution whose fields are embedded. | required |
| path | str | Destination .yaml path; appended to when it already exists. |
required |
| dataset | str | Name for this solution’s mean-flow dataset (default "Mean flow"). Raises if a dataset of that name (or its companion chemistry dataset) is already present in the file. |
'Mean flow' |
| **kwargs | Forwarded to :func:dump_case (e.g. fields, node_data, forced). |
{} |