apdl-parser
Русская версия: README.ru.md
A small Rust library for parsing ANSYS APDL text listings (output of commands like NLIST, ELIST, DLIST, PRNSOL).
It is useful when you need to extract mesh data / results from APDL text output and feed them into your own pipeline (CSV/JSON export, postprocessing, quality checks, Python integration, etc.).
Features
- Parses whitespace-separated data lines into strongly typed structs:
Nlist: node coordinates (NLIST)Elist: element info and its nodes (ELIST)Dlist: tabular data likenode label real imag(DLIST)Prnsol: nodal results example (PRNSOL, currentlyNODE TEMP)
- Includes a generic helper
get_list()to read a file and parse it intoVec<T>.
Typical use cases
- Mesh export from APDL into your own format (nodes/elements) for further geometry processing.
- Model quality checks (detect numbering gaps, validate coordinates/materials/element types).
- Results postprocessing: collect values from
PRNSOL/DLISTand generate plots/reports. - CI / simulation pipelines: compare results between model versions, regression tests.
Installation
Add the dependency to your Cargo.toml:
[]
= { = "https://github.com/indraine/apdl-parser" }
After publishing to crates.io you can switch to a normal version requirement.
Usage
Example: read NLIST from a file
use Path;
use ;
Examples for repository files (files/*.lis)
This repository contains a files/ folder with sample listings. You can run them via the included examples:
Example: parse a single line
use Elist;
Supported types
Nlist—src/nlist.rsElist—src/elist.rsDlist—src/dlist.rsPrnsol—src/prnsol.rs
Roadmap (ideas)
- More
PRNSOLvariants (not onlyTEMP). - Stricter format validation and better error messages.
- CSV/JSON export (in a separate crate to keep core dependencies minimal).
- Optional
f64support.
License
Dual-licensed under MIT OR Apache-2.0. See LICENSE-MIT and LICENSE-APACHE.