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.

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.2.2.tar.gz (48.5 kB view hashes)

Uploaded Source

Built Distribution

hans-0.2.2-py3-none-any.whl (74.5 kB view hashes)

Uploaded Python 3

Supported by

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