MAPDL migration =============== Coming from MAPDL? This page consolidates every MAPDL- relevant entry-point into a single migration map so you don't have to hunt for them across the docs tree. The MAPDL compatibility layer is the most-frequently-exercised foreign-deck path in femorph-solver, with the deepest binary- format coverage. The full deep-dive lives at :doc:`/getting-started/mapdl-interop` (where the analyst- oriented walk-through belongs) and :doc:`/user-guide/mapdl-compatibility` (the format-spec table). This page is the hub that links them — symmetric with :doc:`nastran`, :doc:`abaqus`, and :doc:`lsdyna`, so the ``interop/`` index reads coherently. Reader entry points ------------------- .. list-table:: :header-rows: 1 :widths: 30 50 20 * - Source format - Loader - Returns * - MAPDL CDB (ASCII archive) - :func:`femorph_solver.interop.mapdl.from_cdb` - :class:`~femorph_solver.Model` * - MAPDL ``.dat`` (input deck) - planned — `#513 `_ - n/a today * - MAPDL ``.rst`` (binary results) - :mod:`femorph_solver.interop.mapdl.io` (read-only, cross-check fixture path) - reader handle, *not* a Model The CDB path is the canonical "I have an MAPDL workflow, take me to a femorph-solver model" entry point. See :doc:`/getting-started/mapdl-interop` for the full inspection- and-assignment walk-through, and :doc:`/getting-started/faq` for the common gotchas (missing materials in some decks, KEYOPT translation rules, ``/UNITS`` detection). The native ``.dat`` reader (`#513 `_) is the next shipping interop addition — until it lands, run a MAPDL deck through the ``CDWRITE`` command to produce the CDB. APDL command shim ----------------- When porting an APDL macro line-by-line the :class:`femorph_solver.interop.mapdl.APDL` wrapper exposes the APDL command set one-for-one. MAPDL element catalogue names (``"SOLID185"`` etc.) are translated to their neutral kernel counterparts at this boundary; nothing downstream sees foreign- deck spelling. See :doc:`/getting-started/mapdl-interop` for the per-command coverage table. The shim is for porting; for new work the native :class:`~femorph_solver.Model` primitives (:meth:`~femorph_solver.Model.assign`, :meth:`~femorph_solver.Model.fix`, :meth:`~femorph_solver.Model.apply_force`) are the recommended path. Element-name translation ------------------------ Foreign-deck spellings stay at the import boundary. See the cross-vendor :doc:`terminology` table for the full Rosetta across MAPDL / NASTRAN / Abaqus / LS-DYNA. The MAPDL-side mappings: .. list-table:: :header-rows: 1 :widths: 25 25 50 * - MAPDL catalog - femorph-solver kernel - Notes * - SOLID185 - HEX8 - Default trilinear hex; the EAS variant (``KEYOPT(1)=2``) maps to ``HEX8(integration="enhanced_strain")``. * - SOLID186 - HEX20 / WEDGE15 / PYR13 - 20-node serendipity hex; degenerate variants (15-node wedge, 13-node pyramid) auto-detect on connectivity length. * - SOLID187 - TET10 - 10-node quadratic tet. * - BEAM188 - BEAM2 - Hermite-cubic Euler-Bernoulli with rectangular / circular / I / T cross-sections. * - LINK180 - TRUSS2 - Pure-axial 2-node link. * - PLANE182 - QUAD4_PLANE - 2D bilinear quad. ``KEYOPT(1)=2`` (Wilson-Q6) translates to the enhanced-strain variant. * - PLANE183 - planned — `#543 `_ - 8-node serendipity quad. * - SHELL181 - QUAD4_SHELL - DKT shell. See :doc:`/getting-started/known-limitations` for the drilling-DOF caveat. * - SHELL281 - planned — `#552 `_ - 8-node quadratic shell. * - COMBIN14 - SPRING - Linear axial spring. * - MASS21 - POINT_MASS - Translational lumped mass (rotational-inertia components are ignored with a warning). KEYOPT coverage --------------- The KEYOPT translation table is the most-frequently-asked- about interop detail. See :doc:`/user-guide/mapdl-compatibility` for the per-element / per-KEYOPT coverage matrix. The short version: * **PLANE182 ``KEYOPT(1)``** — full / B-bar / EAS variants recognised. * **BEAM188 ``KEYOPT(1)``** — cubic shape function recognised (the linear option falls through to BEAM2's analytic form). * **SHELL181 ``KEYOPT``** — full integration only; reduced- integration with hourglass control is on the roadmap. Unrecognised KEYOPT combinations emit a warning and skip the element — see :doc:`/verification/vendor_matrix` for the per-deck round-trip status. Boundary-condition cards ------------------------ The CDB reader translates BC cards to the native :class:`~femorph_solver.Model` API: .. list-table:: :header-rows: 1 :widths: 25 35 40 * - MAPDL card - Native equivalent - Notes * - ``D, node, label, value`` - :meth:`Model.fix(nodes=[node], dof=[label])` - Single-node Dirichlet. * - ``D, ALL, label, value`` - :meth:`Model.fix(where=mask, dof=[label])` - Mass Dirichlet across a coordinate filter. * - ``F, node, FX/FY/FZ/MX/MY/MZ, value`` - :meth:`Model.apply_force(node, fx=value)` - Single-node load. * - ``CSYS, 1`` (cylindrical) - via :meth:`Model.fix` with the appropriate normal- projection mask - Recognised; see `#553 `_ for the full coverage path. * - ``CP`` (coupled DOFs) - via the model's coupling table - Tracked under `#518 `_. * - ``SFBEAM`` (distributed beam load) - planned — `#516 `_ - On the roadmap. The :doc:`/verification/vendor_matrix` tracks which problems round-trip cleanly for each card. Common migration patterns ------------------------- Three flows the team sees most often: * **CDB → modal solve.** Read a Mechanical APDL ``.cdb`` file with :func:`femorph_solver.mapdl_api.from_cdb`, attach materials and BCs, and call ``Model.solve_modal``. * **Native MAPDL run + cross-check against femorph-solver.** See the :doc:`/verification/index` corpus for the side-by-side reference problems. * **Pure APDL macro port.** Use the :class:`femorph_solver.interop.mapdl.APDL` shim; see :doc:`/getting-started/mapdl-interop` for the command-by-command walk-through. See also -------- * :doc:`/getting-started/mapdl-interop` — the full deep-dive on the CDB reader, the APDL command shim, and the binary- file path coverage. * :doc:`/user-guide/mapdl-compatibility` — the format-spec reference table. * :doc:`terminology` — cross-vendor Rosetta. * :doc:`nastran`, :doc:`abaqus`, :doc:`lsdyna` — equivalent migration deep-dives for the other commercial codes. * :doc:`/verification/vendor_matrix` — per-deck round-trip status.