upxo.meshing.writer_ABQ module

Low-level Abaqus keyword writers for UPXO meshes.

Helpers to write *Elset / *Nset blocks. 2D conformal INP export is export_confmesh2d_inp. 3D partitioned export lives in confMesh3d.export, fm_steel_3d.mesh_exporter_3d, and twinned_simple_3d.abaqus_exporter_3d.

upxo.meshing.writer_ABQ.write_elset(f, name, elem_ids, per_line=16)[source]

Writes an Abaqus *Elset.

upxo.meshing.writer_ABQ.write_nset(f, name, node_ids, per_line=16)[source]

Write an Abaqus *Nset.

upxo.meshing.writer_ABQ.summarize_inp(path)[source]

Return which standard Abaqus keyword blocks are present in path.

upxo.meshing.writer_ABQ.export_confmesh2d_inp(path, nodes, elConn, elsets_eltype, nsets=None, plane='stress', thickness=1.0, write_sections=True, heading=None, material_format='isotropic', grain_euler_deg=None, n_depvar=1, elastic_constants=(210000.0, 0.3))[source]

Write a 2D conformal mesh to an Abaqus .inp.

Compacts sparse node tags to 1..N. plane='stress' → CPS3/CPS6/CPS4/CPS8, plane='strain' → CPE3/CPE6/CPE4/CPE8, chosen from connectivity width.

material_format controls the *Material block written per elset (only used when write_sections=True):

  • 'isotropic' (default) – dummy isotropic *Elastic section (elastic_constants), unchanged from before this parameter existed.

  • 'bunge_euler' – one *Material per grain carrying its grain-averaged Bunge-Euler angles (degrees) as *User Material, constants=3 plus a *Depvar block, for a crystal-plasticity UMAT. Mirrors the convention used by pxtal.twinned_simple_3d.abaqus_exporter_3d.AbaqusExporter3D. Requires grain_euler_deg: dict {grain_id: (phi1, Phi, phi2)} in degrees, keyed by the grain id embedded in each elset name (the part after the last . in the un-sanitised elset name, e.g. grain.42 -> 42).

upxo.meshing.writer_ABQ.write_grain_elsets(f, elsets_dict, prefix='Grain')[source]

Writes all grain-wise elsets from dictionary.