Catalog PyPI
PACKAGE EXPLORERView in registry

abq2ccx

PyPI

Convert Abaqus .inp decks to CalculiX (ccx) decks

abaquscalculixccxconverterelementfinite
Versions collected1
Direct dependencies0From release 1.4.0
Last observed20 Oct, 17:33 UTC

README

Version 1.4.0 documentation

abq2ccx — Abaqus → CalculiX input converter

abq2ccx.py converts an Abaqus .inp deck into a CalculiX (ccx) deck. It is one Python 3 file with no dependencies.

CalculiX copies most of Abaqus' keyword syntax, so much of a deck passes through as it is; the work is in the parts that differ. The converter knows the complete CalculiX 2.22 + 2.23 keyword set and does one of three things with every Abaqus card: passes it through, translates it into the CalculiX construct that does the same, or comments it out with a warning that says what to do. Nothing is dropped silently, and nothing that changes the physics happens unless you ask for it with --approximate.

Quick start

Run the file with Python 3.9 or later — copy it anywhere — or install it as the abq2ccx command (abq2ccx model.inp, same options):

pipx install abq2ccx                                       # from PyPI
pipx install git+https://github.com/sandervdbroek/abq2ccx  # the latest main
python3 abq2ccx.py model.inp                 # -> model_ccx.inp (+ model_ccx.log)
python3 abq2ccx.py model.inp ccx_model.inp   # -> ccx_model.inp (+ ccx_model.log)
python3 abq2ccx.py decks/*.inp --outdir out  # batch-convert into a directory
python3 abq2ccx.py model.inp --run           # convert, run CalculiX, digest its results
python3 abq2ccx.py model.inp --check         # report only, write nothing
ccx model_ccx                                # run it yourself (no .inp extension)

Always read the report: it is printed to stderr, written to *_ccx.log and repeated as ** comments at the top of the converted deck. The user guide has every option, the exit codes and the Python API.

import abq2ccx
result = abq2ccx.convert_file("model.inp")   # or convert_text(deck_string)
print(result.report.summary())               # "N warning(s), M note(s), K commented card(s)"

What it converts

  • Mesh generation (*NGEN, *NFILL, *NCOPY, *ELGEN, *ELCOPY) → explicit nodes and elements.
  • Parts, instances and assemblies → one flat model, with instance transforms applied and part-level sections, constraints and orientations copied per instance.
  • Elements → CalculiX types, keeping the node count. Incompatible-mode CPS4I/CPE4I become exact one-element-thick C3D8I slabs (ccx has no such plane element); beams under circular, pipe and box sections get the midside nodes ccx 2.23 needs; planar beams and trusses are held in their plane; surface elements leave the mesh and their loads become nodal forces; connector elements become their kinematic constraints. A substitution that changes the element formulation (hybrid, modified or thin-shell elements run as ccx's plain ones) is flagged as reduced physics.
  • Materials and orientations — elastic types, plasticity (including Johnson-Cook), the Johnson-Cook damage initiation criterion ccx shares with Abaqus, thermal expansion, composite layups and per-element *DISTRIBUTION orientations (variable-angle-tow layups); composite S4R/S4/S3 shells run as S8R/S6, composite continuum shells (SC8R, SC6R) as one solid per ply.
  • Constraints — *MPC, kinematic couplings and rigid bodies (with knot beams where ccx 2.23 rejects rigid constraints on shell and beam nodes), and the overconstraints ccx rejects but Abaqus resolves.
  • Rigid tools — rigid elements (R3D3, R3D4, R2D2, RAX2, …) become force-free solid skins carried by their rigid body, so contact against them works; analytical rigid surfaces are meshed the same way, curved ones only with --approximate; a *TIE to a rigid surface makes its nodes part of the body, and ROTARYI becomes point masses.
  • Loads and BCs — surface tractions and beam line loads become consistent nodal forces; velocity and acceleration BCs become integrated displacement BCs; *TRANSFORM local axes are respected wherever ccx reads them.
  • Steps and output — explicit dynamics with Abaqus/Explicit's defaults, output requests fitted to ccx's .frd/.dat model, and Abaqus' preselected output.

The exact handling of every keyword, element type and output variable is in the generated references: keywords, elements, output variables.

Reduced physics. Whatever the converter has to drop or replace of the Abaqus model — a constitutive behaviour ccx lacks (concrete damaged plasticity, user hardening, Chaboche back-stresses, field-dependent properties), an element formulation, a section control, a constraint or interaction, a load — is named in a "Reduced physics" warning at the end of the report (Converter.reduced_physics in the API): ccx then runs, but not the deck's own problem.

--approximate (off by default) lets the converter reframe what ccx cannot run exactly as a close equivalent, each flagged [APPROX] — a Riks step as plain static, ν ≥ 0.5 as 0.475, an I-section in space as ccx's U1 beam with too stiff a torsion (or an equivalent rectangle where U1 cannot run), NLGEOM follower tractions as fixed nodal forces, a curved analytical rigid surface as flat facets, and a few more (full list). Without it those cards are commented out with the reason, so ccx never silently runs a different model.

Validation

python validate_with_ccx.py converts the bundled examples, runs them in CalculiX (it finds ccx, including FreeCAD's copy) and compares each result with an independent reference. It prints one PASS line per check, about a hundred in all; testing lists them.

CheckReferenceAgreement
NAFEMS LE10 thick plate (*NCOPY, *ELGEN, pressure face)published σyy at D = −5.38 MPa−5.650 MPa, 5 % (element and mesh)
the same plate loaded through SFM3D8 surface elementsits face-pressure result7 digits
circular, pipe, box and planar beams; I, hexagonal and general sections as ccx's U1 beam (cantilevers, a portal frame), general sections with a ccx profile (NAFEMS NL6); beam line loads; pinned, tied and hinged spansbeam theory, Euler buckling, the direct-stiffness frame, Abaqus' and NAFEMS' published answers≤ 2.4 %
Cook's membrane under a shear traction; a thick cylinder under a radial tractionpublished 23.96; Lamé0.12 %; 0.02 %
rigid couplings, *MPCs, connectors, BCs on coupled nodes, loads, connectors, *MPCs and rotations on *TRANSFORMed nodesthe same model built another way (solids, hand-written equations, no transform)≤ 4e-5 of |u|, mostly exact
per-element *DISTRIBUTION orientations (a solid plate, a composite shell)one *ORIENTATION per element≤ 3e-11
a simply supported [0/90/0] plate as composite S4R (run as S8R) and SC8R (one C3D8I per ply); a [30/-60/45]s laminate's in-plane stiffness in the x-y and x-z planes (S4R, SC8R, SC6R)classical lamination theory (Navier, A); Pagano's 3-D elasticity solution0.15 % (S8R, a/h = 100); 1.0 % / 2.3 % (plies, a/h = 100 / 10); A ≤ 2e-5
thermal expansion (orthotropic, anisotropic, no initial temperatures)α ΔT; analytic stress≤ 5e-6
velocity / acceleration BCs; displacement BCs without an amplitudetheir time integral; wave theory; Abaqus' default amplitudes5e-5 of the travel; wave stress ≈ 1 % on average; exact
preselected and default output, contact outputstatics, wave theory≤ 0.005 % (static)
CPS4I / CPE4I cantilevers under an end couple (as C3D8I slabs)beam theory (deflection, σ_xx = −My/I, σ_zz)4e-8
pressure on a shell's SPOS / SNEG side and element-based PNavier plate solution, each sign1.0 %
a bare *KINEMATIC (all DOFs); an assembly with a turned instance*RIGID BODY; the same model written flatexact
a rigid flat punch of R3D4, R2D2 or RAX2 elements or the same face as an analytical surface, also turned under NLGEOM and in explicit dynamics; a block tied to a turning rigid plate; pressure on rigid elements; MASS + ROTARYI on a rigid plateccx's penalty contact law; the punch given its motion node by node; p / k; spring frequencies≤ 8e-7 of |u|, mostly round-off
a faceted analytical sphere on a block (--approximate)Hertz2.3 % (finite block, penalty contact)

A corpus of 1052 genuine Abaqus decks — 1022 from about 180 public repositories (CAE exports, UMAT and UEL decks, explicit and coupled models, …) and 30 NAFEMS benchmark decks of the Abaqus 2017 documentation — is fetched on demand and run through convert → integrity check → ccx. On ccx 2.23 all 1052 convert with no dangling reference; 188 solve the deck's own physics; 44 more solve but stay out of that count — 14 load nothing in the source deck, 31 (3 of them also unloaded) solve a model with reduced physics, and two converge to solutions that are not the deck's (a part that only contact holds drifts away in ccx; a plate pushed far past its buckling load, whose lowest factors ccx's *BUCKLE does not return) — and 221 mesh-only decks are accepted. The other 599 need what ccx cannot run — mostly user materials (353) and user elements (66). 26 benchmark decks are checked against their published answer: 20 match Abaqus' result for the same mesh (within 0.5 % for temperatures and frequencies, 1 % for stresses and displacements), 6 differ for reasons traced to ccx (its nodal extrapolation, plane-stress slab, film integration, mass matrices, a coarse shell mesh, beam clamps). See testing.

How it works

read (+ *INCLUDE, *PARAMETER)  →  flatten *PART/*INSTANCE/*ASSEMBLY
  →  build the geometry (expand mesh generation)  →  plan deck-wide fixes
  →  translate card by card  →  settle *EQUATION dependents, audit loads  →  write
BucketActionExamples
Supportedemitted as it is*PLASTIC, *CONTACT PAIR, *DENSITY
Translateda handler adjusts the keyword, parameters or data*ELASTIC, *SHELL SECTION, *STEP, *DSLOAD, output cards
Equivalentmapped to the CalculiX construct that does the same*MPC BEAM → *RIGID BODY, connectors → *EQUATIONs, tractions → *CLOAD
Droppedorganisational, no CalculiX meaning*PART/*INSTANCE/*ASSEMBLY (flattened), *PREPRINT
Commentedno equivalent: kept as ** comments with a warning*VISCOELASTIC, *CONNECTOR BEHAVIOR, *INERTIA RELIEF

The architecture guide describes the pipeline and how to extend it.

Limitations

  • User subroutines (UMAT/VUMAT, UEL, DLOAD, DISP, …) do not run in stock ccx. Such cards are commented out, naming the ccx subroutine to port; a UMAT runs in a ccx built with it (--abaqus-umat), a VUMAT has no ccx interface.
  • Cohesive and gasket elements run as thin continua (their traction-separation law is lost; warned). Abaqus general contact (*CONTACT), connector behaviours, inertia relief and materials such as viscoelasticity and concrete damaged plasticity have no equivalent and are flagged for remodelling; a deck that runs without them is flagged as reduced physics.
  • ccx's own first-order elements are not Abaqus': its CPE4/C3D8/CAX4 are plain 2×2(×2) integration, without Abaqus' selectively reduced volume terms (on a coarse bending mesh Abaqus' CPE4 deflects 9–19 % more for ν 0–0.3), and its CPS4 is a 3-D slab with a free thickness, not 2-D plane stress (compatibility).
  • Explicit coupled temperature–displacement steps do not run; Riks steps, NLGEOM follower tractions and curved analytical rigid surfaces run only with --approximate.
  • Contact is translated card by card, but ccx's penalty contact behaves differently from Abaqus' — check it.
  • ccx 2.23 gets some valid input wrong without an error. The converter works around what it can and warns about the rest (compatibility, troubleshooting).
  • The converter checks structure, and physics on its benchmarks — not on your model. Run ccx and sanity-check the results.

Validated on CalculiX 2.23 (the FreeCAD 1.1.4 build); written for 2.22–2.23.

Examples

FileExercises
nle10_thickplateNAFEMS LE10: C3D20, *NCOPY + *ELGEN, GEN/PERT, *DLOAD Px
nle10_surface_elementsthe same plate loaded through an SFM3D8 skin → nodal forces
composite_shellS8R composite layup, orthotropic, *ORIENTATION, ENCASTRE, *DSLOAD
composite_plate_s4r, composite_plate_sc8ra simply supported cross-ply plate: composite S4R → S8R; composite SC8R → one C3D8I per ply
composite_inplane_s4r, composite_inplane_sc8ran angle-ply laminate's in-plane stiffness; BCs interpolated onto the new nodes
assembly_two_blockstwo-instance assembly, an instance.node reference in a step
beam_circ_cantileverB31 + SECTION=CIRC → B32R with midside nodes, radius → diameters
beam_pipe_box_cantileverPIPE31 + SECTION=PIPE and B32 + SECTION=BOX → B32R
beam_circ_rotation_bcscircular-section beams with a held twist and a prescribed rotation → knot beams
beam_circ_explicita circular-section beam in *DYNAMIC, EXPLICIT → a maximum time increment
planar_pinned_beam, planar_pinned_circ_beamplanar B21 beams in *FREQUENCY + *BUCKLE → planar constraint
planar_b22_two_elementstwo B22 → B32R, integrated along the beam as Abaqus does
beam_line_load_cantilever*DLOAD PY / P2 / PZ on B31, B32 and a CIRC beam → nodal forces
beam_output_requestsoutput at B32 nodes → OUTPUT=2D, *NODE PRINT, *TIME POINTS
coupling_shell_plate, coupling_solid_platea rigid coupling on S8R nodes (knot beams) and its C3D20R reference
coupling_bc_barsBCs on coupled nodes that the reference point imposes → taken off
rigid_body_bc_barsBCs on *RIGID BODY nodes → moved to the reference node, as Abaqus does
equation_overconstraintan *EQUATION on a BC'd DOF, a duplicate and a loop of ties
mpc_beam_lever, mpc_pin_tie_joints, mpc_link*MPC BEAM, PIN, TIE, LINK
connector_hinge_beams, connector_hinge_bodies, connector_ground_hingeCONN3D2 HINGE connectors between beams, rigid bodies and to ground
connector_transform_plate, connector_transform_joinJOIN / LINK connectors on nodes with a *TRANSFORM
mpc_transform*MPC PIN, TIE and LINK on nodes with a *TRANSFORM → local DOFs, twin nodes
op_new_respecify, op_new_remove*BOUNDARY, OP=NEW after rotational BCs on beams and shells
distribution_solid_plate, distribution_shell_plateper-element *DISTRIBUTION orientations (solid, composite S8R); *_explicit are their one-orientation-per-element twins
thermal_expansion_cubesisotropic *Elastic beside ORTHO / ANISO *Expansion
thermal_no_initial_temperature*Temperature without initial temperatures
cook_membrane_traction, cylinder_traction_cax*DSLOAD TRVEC on CPS8 and CAX8 edges → nodal forces
traction_transformed_face, transform_spherical_rigidloads on *TRANSFORMed nodes; a spherical transform; a transformed rigid-body reference point
transform_rotationsrotational BCs and moments on a transformed kinematic reference point (→ *RIGID BODY with a ROT NODE in its axes) and beam tip (→ knot, global components)
velocity_bc_column, velocity_bc_bar*BOUNDARY, TYPE=VELOCITY (implicit and explicit)
default_amplitude_barsa displacement *BOUNDARY and a *CLOAD without an amplitude → ramped / stepped as in Abaqus (run as *DYNAMIC, *VISCO, coupled and explicit)
preselect_output_bar, explicit_default_output_bar, preselect_contact_blocksAbaqus' preselected and default output
cps4i_slab_bendinga CPS4I cantilever under an end couple → C3D8I slabs (also run as CPE4I)
shell_pressure_sides*DSLOAD P on a shell's SPOS / SNEG side and an element-based P
kinematic_all_dofsa bare *Coupling + *Kinematic (all DOFs) on a solid face, against *RIGID BODY
assembly_rotated_instances, …_flata turned instance with an oriented orthotropic material, against the same model written flat
damage_johnson_cook_cubesa Johnson-Cook *DAMAGE INITIATION → ccx's form, reporting DUCT
rigid_punch_block, rigid_punch_cylinder, rigid_body_inertiaa rigid R3D4 punch and the same face as an analytical CYLINDER → skins of their rigid body; MASS + ROTARYI on a rigid plate → point masses
coverage_kitchen_sinkelement substitutions, dropped and commented cards, output-variable mapping

Tests

python tests/test_convert.py                            # unit tests, no solver needed
python validate_with_ccx.py                             # end-to-end checks in CalculiX
python corpus/fetch.py && python tests/test_corpus.py   # the corpus

Testing describes the three layers; GitHub Actions run the first two on every push, the unit tests on Linux, macOS and Windows and the CalculiX checks on Linux and Windows.

Documentation

Sources

Compatibility lists the Abaqus manual pages behind individual facts.

License

MIT © Sander van den Broek. abq2ccx is an independent tool, not affiliated with or endorsed by Dassault Systèmes (Abaqus) or the CalculiX project. The test corpus is fetched on demand and not redistributed here; each deck keeps its own upstream license, recorded in corpus/manifest.py.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
1.4.020 Oct 20260

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
sandervdbroek/abq2ccx

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 17:33 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:04bb00e522865800937e1ed9a1594650aded335b6449478cccb35dd43c736aa5