Metadata-Version: 2.4
Name: abqhom
Version: 0.1.0
Summary: Computational homogenization of unit cells and RVEs with Abaqus and Gmsh
Author-email: Jonathan Stollberg <jonathan.stollberg@tu-darmstadt.de>
License-Expression: GPL-3.0-or-later
Project-URL: Documentation, https://abqhom.readthedocs.io/
Project-URL: Homepage, https://github.com/jstollberg/abqhom
Project-URL: Issues, https://github.com/jstollberg/abqhom/issues
Project-URL: Repository, https://github.com/jstollberg/abqhom
Keywords: Abaqus,computational homogenization,finite elements,Gmsh,representative volume elements,unit cells
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: backports.weakref>=1.0.post1
Requires-Dist: gmsh>=4.9.4
Requires-Dist: numpy
Requires-Dist: paraqus>=1.0.2
Dynamic: license-file

<p align="center">
  <img src="https://raw.githubusercontent.com/jstollberg/abqhom/main/doc/logo_white.png" alt="abqhom logo" width="504">
</p>

# abqhom

[![CI](https://github.com/jstollberg/abqhom/actions/workflows/ci.yaml/badge.svg?branch=main)](https://github.com/jstollberg/abqhom/actions/workflows/ci.yaml)
[![License: GPL v3+](https://img.shields.io/badge/License-GPL_v3%2B-blue.svg)](LICENSE)
[![Documentation Status](https://readthedocs.org/projects/abqhom/badge/?version=latest)](https://abqhom.readthedocs.io/en/latest/?badge=latest)

`abqhom` is an open-source Python framework for first-order computational
homogenization of two- and three-dimensional unit cells and representative
volume elements. It connects geometry and meshing in
[Gmsh](https://gmsh.info/) with finite element analysis in
[Abaqus](https://www.3ds.com/products/simulia/abaqus). Continuum, truss, beam,
and shell constituents may occur separately or together in mixed-dimensional
cells.

The package provides the scale-transition machinery around an Abaqus
analysis. Abaqus remains responsible for element formulations, constitutive
integration, nonlinear solution procedures, and output databases.

## Capabilities

- Periodic and affine boundary conditions for two- and three-dimensional
  cells.
- Linear, finite-strain, nonlinear-elastic, and path-dependent analyses using
  Abaqus material models and solution procedures.
- Periodic translational and rotational constraints for continuum and
  structural finite elements.
- Ownership-consistent treatment of structural members on periodic
  boundaries through automatic removal of redundant copies. A complete cell
  can instead be retained when its response is weighted consistently.
- Effective first Piola–Kirchhoff stress recovery from element nodal forces
  and incremental microscopic work for discrete Hill–Mandel checks.
- Nonconforming structural–continuum coupling through Abaqus embedded
  constraints.
- VTK export through
  [Paraqus](https://github.com/InstituteOfMechanics/Paraqus).

## Scope

Two-dimensional cells must be rectangular in the global X₁–X₂ plane with
X₃ = 0. Three-dimensional cells must be cuboidal and aligned with the global
coordinate axes. Periodic meshes require one-to-one matching nodes on
opposite boundaries. The effective medium is a first-order Cauchy continuum,
and imposed macroscopic curvature and element warping degrees of freedom are
not supported.

See the complete
[modeling assumptions and limitations](https://abqhom.readthedocs.io/en/latest/limitations.html)
before applying the framework to a new cell topology.

## Requirements

- Python 3.9 or newer for package installation and runtime creation.
- Abaqus 2018 or newer with Abaqus/CAE and the solver.
- Gmsh 4.9.4 or newer.
- NumPy as supplied with Abaqus.
- Paraqus 1.0.2 or newer.
- `backports.weakref` for legacy Abaqus releases using Python 2.7.

The source supports both legacy Python 2.7-based Abaqus releases and current
Python 3-based releases. Larger examples may require a full Abaqus license.

## Installation

Install the released package in a regular Python environment and create the
isolated Abaqus runtime with the supplied helper:

```console
python -m pip install abqhom
abqhom-install-abaqus
```

If Gmsh initialization fails inside Abaqus on Linux because of a native
library conflict, the [installation documentation](https://abqhom.readthedocs.io/en/latest/installation.html#linux-gmsh-compatibility-mode)
describes an optional `--gmsh-deepbind` compatibility mode.

The helper does not modify the Abaqus installation. It creates a versioned
runtime below `~/.abqhom/abaqus-runtime` containing only `abqhom`, Gmsh,
Paraqus, and the weak-reference backport. Activate the generated script in the
shell from which Abaqus will be launched.

The [installation guide](https://abqhom.readthedocs.io/en/latest/installation.html)
describes activation on Windows and Linux, cluster usage, and setup
verification.

## Quick start

The examples are maintained in the source repository and are not installed
with the Python package. Clone the repository, activate the runtime, and run
the simple-cubic beam-lattice tutorial from its directory:

```console
git clone https://github.com/jstollberg/abqhom.git
cd abqhom/examples/beam_lattice_simple_cubic_3d
abaqus cae noGUI=main.py
```

The script constructs and periodically meshes the complete lattice, weights
the boundary-member stiffnesses by their ownership, evaluates six independent
small-strain cases, compares the axial stiffness with its analytical value,
and writes CSV and VTK output.

See the
[`beam_lattice_simple_cubic_3d/main.py`](examples/beam_lattice_simple_cubic_3d/main.py)
source for the minimal complete workflow and the
[`examples` overview](examples/README.md) for the full tutorial collection.

## Examples

The concise tutorials under [`examples/`](examples) cover beam and shell
lattices, continuum composites, embedded mixed-dimensional cells,
finite-strain hyperelasticity, cyclic plasticity, and imported periodic
meshes.

The larger [`paper_examples`](examples/paper_examples) reproduce the numerical
studies from the
[accompanying preprint](https://arxiv.org/abs/2611.14770).

| Example | Study |
|---|---|
| [`01_small_strain_verification`](examples/paper_examples/01_small_strain_verification) | Mixed continuum–shell–beam verification |
| [`02_hyperelastic_octet_lattice`](examples/paper_examples/02_hyperelastic_octet_lattice) | Imperfect hyperelastic Octet lattice and supercell comparison |
| [`03_elastoplastic_sandwich_cell`](examples/paper_examples/03_elastoplastic_sandwich_cell) | Cyclic plasticity and effective yield surfaces |

Execution order and generated data products are documented in the
[`paper_examples` README](examples/paper_examples/README.md).

## Documentation and support

The [online documentation](https://abqhom.readthedocs.io/en/latest/) contains
the installation guide, modeling assumptions, user workflow, examples, API
reference, and testing instructions. Questions, bug reports, and feature
requests can be submitted through
[GitHub Issues](https://github.com/jstollberg/abqhom/issues).
Contributions are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for the
development workflow and submission guidelines.

## Citation

If you use `abqhom` in your research, please cite the
[accompanying preprint](https://arxiv.org/abs/2611.14770):

```bibtex
@article{stollberg_2026,
  title = {Nonlinear homogenization of periodic unit cells composed of mixed continuum and structural elements with variationally consistent boundary-member reduction},
  author = {Stollberg, Jonathan and Schillinger, Dominik},
  year = {2026},
  journal = {arXiv preprint arXiv:2611.14770},
  doi = {10.48550/arXiv.2611.14770}
}
```

## Development disclosure

Generative AI tools assisted with code review, refactoring, documentation,
and language editing. All resulting changes were reviewed and tested by the
author, who remains responsible for the software and documentation.

## License

Copyright (C) 2023-2026 Jonathan Stollberg.

Distributed under the terms of the GNU General Public License v3.0 or later.
See [`LICENSE`](LICENSE) for the license text.
