Skip to main content

Height-Averaged Navier-Stokes (HANS) solver for 2D lubrication problems

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hans-0.3.2.tar.gz (60.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hans-0.3.2-py3-none-any.whl (95.2 kB view details)

Uploaded Python 3

File details

Details for the file hans-0.3.2.tar.gz.

File metadata

  • Download URL: hans-0.3.2.tar.gz
  • Upload date:
  • Size: 60.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for hans-0.3.2.tar.gz
Algorithm Hash digest
SHA256 5e536d4d48536f0361cb972a82cae23615d14b2dc243d6606b295160936f6de1
MD5 7b4953dab6782bb78e94a1f6dc81c82a
BLAKE2b-256 a42473870c3488ef043cf555cde4d87f3cc1deea145dc2e0fd516470c4671d21

See more details on using hashes here.

Provenance

The following attestation bundles were made for hans-0.3.2.tar.gz:

Publisher: ci.yaml on hannes-holey/hans

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hans-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: hans-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 95.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for hans-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9ecd82d5f30a0c7fa846e1517a1681f6dfc04363c9ced8731623d2c02905250e
MD5 50e164e44f5c4f2f2edef2be142ca4fc
BLAKE2b-256 867aa520bb35c488cfb5ed17e093221b0c071cc8ac26faa64d376b2d2ca0975a

See more details on using hashes here.

Provenance

The following attestation bundles were made for hans-0.3.2-py3-none-any.whl:

Publisher: ci.yaml on hannes-holey/hans

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page