/harness:abaqus-odb-to-grid-csvfrom harness
Convert per-case Abaqus FEA outputs into ML-ready (X, Y) wide-table CSVs. Pivots irregular FEA mesh node displacements onto a regular N×N grid via direct binning (structured mesh) or bilinear resampling, picks the final frame as the deformation target, and aggregates across many cases into X_amplitude.csv (design vectors) + Y_grid_uz.csv (flattened grid displacement). Use when the user has a folder of completed FEA cases and wants to train a Ridge / MLP / Gaussian Process surrogate on the (input → displacement field) mapping.
Ships in harness. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
The post-processing half of a surrogate-model pipeline. Takes a folder of completed Abaqus FEA cases (typically produced by the abaqus-lhs-batch-dataset skill) and produces two flat CSVs ready for numpy.loadtxt / pandas.read_csv / scikit-learn:
X_amplitude.csv — sample_id, amplitude_0000, amplitude_0001, ..., amplitude_(D-1) — the input design vectorsY_grid_uz.csv — sample_id, uz_0000, uz_0001, ..., uz_(N²-1) — the resulting deformation field flattened from N×N grid (row-major)These are the two matrices a surrogate model trains on: shape (N_samples, D) and (N_samples, N²).
Activate when the user wants to:
sample_*/Membrane2D1.odb (or node_displacement.csv) cases into ML-ready training matricesDo NOT use this skill for:
abaqus-odb instead)The FEA mesh is a regular grid (e.g. 81×81 nodes for a square membrane), and you want to either keep it or downsample to a smaller learning grid. This is the case for membrane / plate problems where you set the mesh seed to give exact node spacing.
Steps:
unique(x0) and unique(y0) from node_displacement.csv give MESH_N(x0, y0) as a hash key → directly bin each node into a (MESH_N, MESH_N) arraytarget_N != MESH_N: bilinear resample to (target_N, target_N) using precomputed weights (10-100× faster than scipy.interpolate)target_N²Latency: ~50 ms / case. 1000 cases = ~1 minute.
The FEA mesh is unstructured (tet / triangular / mixed). Need scattered interpolation.
Steps:
(x0, y0, uz) from final framelinspace(x_min, x_max, N) × linspace(y_min, y_max, N)scipy.interpolate.griddata((x0, y0), uz, (xq, yq), method="linear")Latency: ~1-3 s / case. 1000 cases = ~30 minutes. Requires scipy.
The user must provide:
Dataset root — A folder produced by a batch FEA run, with subfolders sample_*/ each containing:
node_displacement.csv — produced by the Abaqus solver script. Schema: frame_id, time, node_id, x0, y0, z0, ux, uy, uz, x_def, y_def, z_definput_vector.csv (or ForceAmplitude.dat) — the design vector for that casedataset_index.csv (at the dataset root) — the per-case status log; only status == "completed" cases are processedTarget grid size N — typically 21, 41, or 81 nodes per side. If N matches the FEA mesh, no resampling is done.
Frame selection — by default, the last frame (final deformed state). For dynamic problems, the user may want a specific time or all frames.
dataset_root = Path(...)
index = pd.read_csv(dataset_root / "dataset_index.csv")
completed = index[index["status"] == "completed"]
Reject the run if < 80% of planned cases completed — surface the failure rate to the user.
Open the first completed case's node_displacement.csv. Count unique x0 and y0 (rounded to 2 decimals to absorb floating-point noise). If len(unique_x) * len(unique_y) == NODES_PER_FRAME, the mesh is structured (Path A). Otherwise unstructured (Path B).
For each completed case (in parallel via ThreadPoolExecutor or serially):
(D,)node_displacement.csv:
tail -NODES_PER_FRAME (Linux/macOS) or read whole file + filter by frame_id == max_frame_id(x0, y0, uz) columns(target_N, target_N) displacement field(target_N²,)X of shape (N_completed, D)Y of shape (N_completed, target_N²)numpy.unique with return_index=True. Why dedupe: identical inputs but slightly different outputs (numerical noise) can confuse the regularization; pick one representative per input.X_amplitude.csv — header sample_id, amplitude_0000, ..., amplitude_(D-1)Y_grid_uz.csv — header sample_id, uz_0000, ..., uz_(target_N²-1)sample_meta.csv — sample_id, source_dataset, source_case, length, width, thickness, mesh_n, frame_id for provenancePrint:
N_completed = ?, N_dedup = ?Y percentiles: p1, p50, p99 — sanity check the displacement range is reasonable (no nan / inf)|uz| cases — visually inspect to make sure they aren't obviously divergedFloating-point: a node nominally at x = 1.0 may show up as 0.99999998 in one case and 1.00000002 in another. Always round x0, y0 to the nearest mesh_pitch / 100 (e.g. np.round(x0, 2) for mm-scale meshes). Otherwise the unique-coordinate detection will fail.
Some Abaqus output configurations write the initial (zero) frame at the start, the loading frames, and a final equilibrium frame. Always select by max(frame_id), not by tail-N.
For a fixed MESH_N → target_N mapping, the per-target-cell (idx0, idx1, frac) weights only depend on the grid sizes. Precompute once and reuse for all cases:
def precompute_bilinear_weights(src_n, dst_n):
indices_0 = np.empty(dst_n, dtype=np.int32)
indices_1 = np.empty(dst_n, dtype=np.int32)
fracs = np.empty(dst_n, dtype=np.float64)
for i in range(dst_n):
s = i * (src_n - 1) / (dst_n - 1)
i0 = int(s)
i1 = min(i0 + 1, src_n - 1)
indices_0[i] = i0
indices_1[i] = i1
fracs[i] = s - i0
return indices_0, indices_1, fracs
Then per-case bilinear is a vectorized numpy operation, no Python loop over grid cells.
node_displacement.csv files efficientlyEach file is per-frame × per-node × 12 columns. For 81×81 mesh × 20 frames × 12 cols × ~30 bytes ≈ 47 MB per case. Reading the full file with csv.DictReader is slow.
Fast read: skip to the last NODES_PER_FRAME lines via subprocess.run(["tail", "-N", path]) (Linux/macOS only). On Windows, use numpy.genfromtxt with skip_header= set to (num_frames - 1) * NODES_PER_FRAME + 1. Even faster: have the FEA solver script output ONLY the final frame to a separate file like final_frame.csv, eliminating the parse step.
Y for 1000 samples × 21×21 grid = 1000 × 441 × 8 bytes = 3.5 MB → fine in memoryY for 10,000 samples × 81×81 grid = 10000 × 6561 × 8 bytes = 525 MB → still in memory, but write CSV incrementallylen(unique_x) != MESH_N — log and skip, don't crashuz: solver diverged silently. Should never happen if dataset_index.csv says "completed", but check np.isfinite(uz).all() per case anywayinput_vector.csv: fall back to parsing ForceAmplitude.dat directly (the *Amplitude value lines)references/extract_grid.py (~250 lines) — full pipeline as a CLI:
python extract_grid.py \
--dataset-root ./datasets/lhs_20260427_120000 \
--output-dir ./aggregated/v1 \
--target-grid-n 21 \
--frame final \
--dedupe-by-input
references/grid_resample.py — bilinear resample with precomputed weights, structured-mesh detection, and unstructured-mesh fallback (scipy-only).
output_dir/
├ X_amplitude.csv # sample_id, amplitude_0000..(D-1)
├ Y_grid_uz.csv # sample_id, uz_0000..(N²-1)
├ sample_meta.csv # sample_id, source_case, mesh_n, frame_id, max_abs_uz, ...
└ aggregate_summary.csv # n_total, n_completed, n_dedup, mesh_n, target_n, dedupe_method, ...
The skill is written for uz (out-of-plane displacement) but extending to other fields is mechanical:
ux, uy columns instead → produce Y_grid_ux.csv + Y_grid_uy.csvmax(frame_id), keep all frames and produce Y_grid_uz_t<frame_id>.csv per frame[Y_grid_ux, Y_grid_uy, Y_grid_uz] column-wise → 3N² output dimAfter producing X_amplitude.csv and Y_grid_uz.csv:
len(X) == len(Y) and both index by the same sample_idY.abs().max() between sane bounds (not inf, not 0)alpha=1.0 and check R² on a 80/20 split. Should be > 0.9 for well-behaved problems. R² < 0.5 implies the design space is too noisy or the FEA setup is suspect — surface this to the user.n_dedup / n_total < 0.7, the design space sampler is producing too many duplicates — narrow the precision threshold or use a different sampler.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub nobodyonlyc/skills --plugin harnessOther plugins' skills for the same job
1,059 skills in this plugin
/6g-communication-researcherExpert-level 6G Communication Researcher specializing in sub-THz channel modeling, holographic MIMO, reconfigurable intelligent surfaces (RIS), AI-native air interface design, and semantic communications/abaqus-expertInvoke when: User needs help with Abaqus FEA, nonlinear analysis, contact mechanics, or material modeling. Provides: Solver setup, mesh strategies, job diagnostics, and result interpretation./abaqus-lhs-batch-datasetGenerate an Abaqus FEA training dataset for surrogate / ML models. Latin Hypercube Sampling (or sparse-pattern sampling) over a parameterized design vector, one case folder per sample, batch-submit Abaqus jobs via subprocess, recover from crashes, and write a unified dataset index. Use when the user wants to "build a training set for a surrogate model", "sweep design parameters in Abaqus", "run N FEA simulations", or "sample a design space".