OBT GET OPTIVAN →

← articles

Stop hand parsing solver output

2026‑08‑30 · OBT · 7 MIN READ

Every simulation group has the folder. It holds a dozen scripts with names like extract_peaks_v3_FINAL.py, each one written late in some project to pull a handful of numbers out of solver output before a design review. They all do roughly the same thing: find the run directories, decode a results file, walk to a few channels, reduce each one to a scalar, print the answers.

Nobody plans to build a post processing system out of copies of that script. It happens one deadline at a time. This article is about getting out: what the script pile actually costs, how to script the job properly if scripting is the right call for you, and what changes when result extraction stops being code at all.

What hand parsing really costs

The obvious cost is the hour it takes to write each script. That is the cheapest part. The real bill arrives later, in four installments:

If you script it, script it once

Scripting is sometimes the right answer, and when it is, the difference between a liability and an asset is structure. The rules that hold up in practice:

The skeleton, independent of any particular solver ecosystem:

from pathlib import Path
import pandas as pd
from readers import read_channel   # your pinned, shared reader

CHANNELS = {
    "peak_disp":   ("nodout/42/z_displacement", "peak"),
    "peak_stress": ("elout/1105/von_mises",     "peak"),
}

rows = []
for run_dir in sorted(Path("runs").glob("eval_*")):
    row = {"run": run_dir.name}
    for name, (path, reduce) in CHANNELS.items():
        series = read_channel(run_dir, path)
        row[name] = series.max() if reduce == "peak" else series
    rows.append(row)

pd.DataFrame(rows).to_parquet("results.parquet")

Done this way, scripting works. It is also a real software project now: it needs review, versioning, tests against known results, and an owner. Budget for that honestly, because the folder of copies is what happens when you do not.

The declarative alternative

The other route is to stop describing how to read results and just declare what you want. In a workflow tool, a result reader is a node you configure instead of code you write: point it at the result files with a glob pattern, browse the channel hierarchy it discovers, pick the channels you care about, and choose a reduction for each, a peak for a constraint check or the full time series for a curve match.

A declarative result reader node: a glob pattern locates each run's results, channels are picked from a browser, and each becomes an output pin.
A result reader as configuration: the glob finds each evaluation's output, chosen channels become output pins, and failure handling is a dropdown rather than a try block.

Three things change that no script pile can match:

Which route, when

SituationBetter route
Forensic deep dive into one strange runScript it. Interactive exploration wants a notebook.
Exotic or in house result format no tool readsScript it, once, as a shared library.
Results feeding reports on a repeating scheduleEither works; the tool avoids the maintenance tax.
Results feeding DOE, optimization, or sensitivity studiesDeclarative reader. The loop must close by itself.
The test worth applying: if the same extraction will run more than ten times, it should not depend on a person or a personal script being available.

The payoff is the loop

Automating post processing is not really about saving the hour of parsing. It is about what becomes possible once results flow without hands. The moment a peak displacement is a wire instead of a copied number, it can feed an objective. The study that took a week of manual iterations becomes an overnight run with 150 solver calls placed by an optimizer, and the engineer's job moves up a level: from moving numbers between files to deciding what the numbers should be.

That is the loop worth building, whichever route you take to it.

// TRY IT ON YOUR OWN MODELS

Optivan is design optimization on your hardware

Visual node graph studies, DOE and surrogate optimization, native solver results readers, and cluster execution. Free beta, or Pro from $99 a month.

See plans product tour →