Skip to main content

HANS

PyPI version CI Coverage

This code implements the Height-Averaged Navier-Stokes (HANS) scheme for two-dimensional lubrication problems as described in the following paper:

Holey, H. et al. (2022) Tribology Letters, 70(2), p. 36.

Installation

Packaged versions can be installed via

pip install hans

Multiscale simulations require a working installation of LAMMPS. New molecular dynamics runs are triggered using the Python interface of LAMMPS. Therefore LAMMPS has to be build as a shared library. Please follow the installation instructions of LAMMPS.

Examples

Run from the command line with

mpirun -n <NP> python3 -m hans -i <input_file> [-p] [-r <restart_file>]

where NP is the number of MPI processes. The plot option (-p, --plot) is only available for serial execution. Example input files as well as jupyter-notebooks can be found in the examples directory.

The command line interface contains some scripts for plotting and creating animations. For instance, 1D profiles of converged solutions can be displayed with

plot1D_last.py

Tests

Run all tests from the main source directory with

pytest

or append the path to the test definition file (located in tests) to run selected tests only.

Documentation

A Sphinx-generated documentation can be built locally with

cd doc
sphinx-apidoc -o . ../hans
make html

Funding

This work is funded by the German Research Foundation (DFG) through GRK 2450.

Metadata

Release files for hans 0.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hans 0.3.2
File Size Uploaded
hans-0.3.2.tar.gz 60.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hans 0.3.2
File Interpreter ABI Platform
hans-0.3.2-py3-none-any.whl Python 3 none any Details

Total release size: 155.5 kB

Release files / hans-0.3.2.tar.gz

Download URL hans-0.3.2.tar.gz
Size 60.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5e536d4d48536f0361cb972a82cae23615d14b2dc243d6606b295160936f6de1
BLAKE2b-256 checksum
How to use checksums
a42473870c3488ef043cf555cde4d87f3cc1deea145dc2e0fd516470c4671d21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 3, 2025.

Transparency log

Release files / hans-0.3.2-py3-none-any.whl

Download URL hans-0.3.2-py3-none-any.whl
Size 95.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9ecd82d5f30a0c7fa846e1517a1681f6dfc04363c9ced8731623d2c02905250e
BLAKE2b-256 checksum
How to use checksums
867aa520bb35c488cfb5ed17e093221b0c071cc8ac26faa64d376b2d2ca0975a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 3, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.2 This release

2 release files

0.2.2

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.0.21

2 release files

0.0.20

2 release files

0.0.17

2 release files

0.0.16

2 release files

0.0.15

2 release files

0.0.14

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page