Skip to content

Read, write, and solve

Download the matching wheel from the v0.1.0 release, then install it locally. The wheel uses Python's stable ABI and supports Python 3.12 or newer:

python -m pip install ./omni_solver_interop_mapdl-0.1.0-cp312-abi3-manylinux_2_34_x86_64.whl
py -m pip install .\omni_solver_interop_mapdl-0.1.0-cp312-abi3-win_amd64.whl

The source archive is attached to the same release for downstream packaging and audited source builds. Neutral conversion does not require OmniSolver. The minimal installation depends only on NumPy. Install the same wheel with the binary extra when using the high-level PyVista/SciPy result reader, or the plot extra when regenerating the synthetic documentation figure.

from omni_solver_interop_mapdl import read_dat, write_dat, write_neutral_json

model = read_dat("ds.dat", strict=True, validate=True)
write_dat(model, "translated.cdb")
write_neutral_json(model, "model.neutral.json")

write_dat is a semantic writer: it emits deterministic explicit model records, not a byte-for-byte copy of the source. The neutral model retains positional section payloads, table references, components, loads, constraints, coordinate systems, and documented setup records needed for another adapter.

OmniSolver

OmniSolver is optional and imported only when requested:

Install OmniSolver 0.26.2 or newer from its configured package source before calling the adapter. It remains separate so neutral conversion has no solver runtime dependency.

from omni_solver_interop_mapdl import read_dat, to_omnisolver_model

neutral = read_dat("ds.dat")
model = to_omnisolver_model(neutral)
result = model.solve_static(thread_limit=8)

For a supported deck that includes analysis setup through SOLVE:

from omni_solver_interop_mapdl import solve_dat

result = solve_dat("ds.dat", thread_limit=8)

Static structural, nonlinear-static, inverse-static, and steady thermal routes are selected from documented deck records. The shim does not compare against or invoke MAPDL. The default run policy emits OmniSolverProjectionWarning when it lowers a source feature to a runnable public OmniSolver representation. Use solve_dat(path, runnable_projections=False) when exact family/analysis selection and a typed refusal are preferable to a compatibility projection.

Command line

mapdl-interop inspect ds.dat
mapdl-interop convert ds.dat model.neutral.json
mapdl-interop write-dat model.neutral.json exported.cdb

Both examples under examples/ are synthetic and may be copied freely. Run examples/generate_result_plot.py in an environment containing OmniSolver and Matplotlib to reproduce the plot on the overview page.