GaPFlow
Gap-averaged flow simulations with Gaussian Process regression.
This code implements the solution of time-dependent lubrication problems as described in:
The extension to atomistic-continuum multiscale simulations with Gaussian process (GP) surrogate models has been described in:
The code uses µGrid for handling macroscale fields and tinygp as GP library. Molecular dynamics (MD) simulations run with LAMMPS through its Python interface. Elastic deformation is computed using ContactMechanics.
Installation
GaPFlow can be installed via
pip install GaPFlow
A serial build of LAMMPS is provided for most platforms which allows testing
all of GaPFlow's functionality. For production simulations it is however
recommended to build GaPFlow with parallel LAMMPS on your system.
You need to have MPI installed (e.g. via apt install openmpi-bin libopenmpi-dev
on Debian-based systems). To compile for your specific platform, run
pip install --no-binary GaPFlow GaPFlow[parallel]
You can check your installation by running gpf_info from the command line.
==========
GaPFlow
==========
Version: ...
==========
LAMMPS
==========
Version: ...
Shared lib: <path-to-your-python-env>/lib/pythonX.Y/site-packages/GaPFlow/_vendor/lammps/liblammps_mpi[.so, .dylib]
MPI: True
mpi4py: True
packages: ['EXTRA-FIX', 'MANYBODY', 'MOLECULE']
==========
muGrid
==========
Version: ...
NetCDF4: True
MPI: False
We currently do not use parallel functionalities of µGrid, so MPI support is not required.
For installations from source, do not forget to initialize the LAMMPS submodule after cloning the repository
git submodule update --init
Minimal example
Simulation inputs are commonly provided in YAML files. A typical input file might look like this:
# examples/journal.yaml
options:
output: data/journal
write_freq: 10
grid:
dx: 1.e-5
dy: 1.
Nx: 100
Ny: 1
xE: ['D', 'N', 'N']
xW: ['D', 'N', 'N']
yS: ['P', 'P', 'P']
yN: ['P', 'P', 'P']
xE_D: 877.7007
xW_D: 877.7007
geometry:
type: journal
CR: 1.e-2
eps: 0.7
U: 0.1
V: 0.
numerics:
tol: 1e-9
dt: 1e-10
max_it: 200
properties:
shear: 0.0794
bulk: 0.
EOS: DH
P0: 101325
rho0: 877.7007
T0: 323.15
C1: 3.5e10
C2: 1.23
Note that this example uses fixed-form constitutive laws without GP surrogate models or MD data. More example input files can be found in the [examples] (examples/) directory.
The input files can be used to start a simulation from the command line
python -m GaPFlow -i my_input_file.yaml
or from a Python script
from GaPFlow.problem import Problem
myProblem = Problem.from_yaml('my_input_file.yaml')
myProblem.run()
Simulation output is stored under the location specified in the input file. After successful completion, you should find the following files.
config.yml: A sanitized version of your simulation input.topo.nc: NetCDF file containing the gap height and gradients.sol.nc: NetCDF file containing the solution and stress fields.history.csv: Contains the time series of scalar quantities (step, Ekin, residual, ...)gp_[xz,yz,zz].csv(Optional): Contains the time series of GP hyperparameters, database size, etc.Xtrain.npy(Optional): Training data inputsYtrain.npy(Optional): Training data observationsYtrain_err.npy(Optional): Training data observation error
The code comes with a few handy command line tools for visualizations like this one
which shows the transient solution of a 1D journal bearing with active learning of the constitutive behavior.
License
The GaPFlow project is distributed under the terms of the GNU General Public License version 2 (GPLv2).
The original GaPFlow source files under GaPFlow/ are licensed under the MIT
License (see LICENSES/MIT.txt). This repository also contains third-party
software that is not covered by the MIT License, in particular the LAMMPS
distribution under lammps/ and Python bindings vendored under
GaPFlow/_vendor/lammps/, which are licensed under GPLv2. The full text of
the GPLv2 is included in the COPYING file at the repository root.
If you distribute a packaged artifact (for example an sdist or wheel) that includes the LAMMPS sources or the vendored LAMMPS Python bindings, the combined distribution is subject to the terms of the GPLv2. In that case, recipients must be granted the rights required by the GPLv2 and the COPYING file must be included in distributed artifacts. This does not change the MIT license that applies to the original GaPFlow sources; rather, when distributed together with GPLv2-covered files the resulting artifact must comply with GPLv2.
Funding
This work received funding from the German Research Foundation (DFG) through GRK 2450 and from the Alexander von Humboldt Foundation through a Feodor Lynen Fellowship.
Metadata
Release files for GaPFlow 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gapflow-1.2.0.tar.gz | 79.9 MB | Details |
Built distributions (wheels)
Total release size: 183.3 MB
Release files / gapflow-1.2.0.tar.gz
| Download URL | gapflow-1.2.0.tar.gz |
|---|---|
| Size | 79.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
747c863f1bcd2ed0fc5fc68f6746dd42004b30d4bc05dd083f7ddb5b8a0f75fe
|
|
BLAKE2b-256 checksum How to use checksums |
3bac4bfceab6c1311776355fdb7d38be7e2616b03719853d10cb07a166856e23
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 20, 2026.
Transparency logRelease files / gapflow-1.2.0-cp314-cp314-win_amd64.whl
| Download URL | gapflow-1.2.0-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 4.9 MB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
834f2ffd68b554484538304d10220373b3fcb526f3d5aff3f2926796649c02b3
|
|
BLAKE2b-256 checksum How to use checksums |
80722c846a8966d186964a2c75c20b01c1350636abbadc61f43e1a323c6083e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 20, 2026.
Transparency logRelease files / gapflow-1.2.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | gapflow-1.2.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 9.3 MB |
| Tags | CPython 3.14 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
645c14bd23341b284b4cbe7561d5e2184f271c929b93ad5b59cf62909c71c2ec
|
|
BLAKE2b-256 checksum How to use checksums |
b654226c5fb279516ec49b27d5be39c159b3c01d2f8fa61a68d791501c3bd636
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 20, 2026.
Transparency logRelease files / gapflow-1.2.0-cp314-cp314-macosx_15_0_arm64.whl
| Download URL | gapflow-1.2.0-cp314-cp314-macosx_15_0_arm64.whl |
|---|---|
| Size | 6.5 MB |
| Tags | CPython 3.14 macOS 15.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
eaef04e03ad97fe51bf2d3083f757f064d94937703aa58cd7427a6d901108ca9
|
|
BLAKE2b-256 checksum How to use checksums |
ad787b799fb59ae8b8e1f103a48a9f7db0daebe578ce7c74b5dc5e949f9620ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 20, 2026.
Transparency logRelease files / gapflow-1.2.0-cp313-cp313-win_amd64.whl
| Download URL | gapflow-1.2.0-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 4.8 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
d4259d21a3bb4aebbf09fd73297d9980ef5cf2f6eb45854eaba7f3f97ecd7385
|
|
BLAKE2b-256 checksum How to use checksums |
8c13ad148842cfc4e00b409a2b4216c40fc0a4f2a9063a6587d4ad109255fbf3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 20, 2026.
Transparency logRelease files / gapflow-1.2.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | gapflow-1.2.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 9.3 MB |
| Tags | CPython 3.13 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
74f8ccbfe3cd1ee02347196fd67155be00d4cfa02af6ccf411dc041d530c1832
|
|
BLAKE2b-256 checksum How to use checksums |
7c35b4ecf12d8b633b1ebd90c76795fd229d1c4324e9487b20da0f79324eaaba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 20, 2026.
Transparency logRelease files / gapflow-1.2.0-cp313-cp313-macosx_15_0_arm64.whl
| Download URL | gapflow-1.2.0-cp313-cp313-macosx_15_0_arm64.whl |
|---|---|
| Size | 6.5 MB |
| Tags | CPython 3.13 macOS 15.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
268c087bfac5e4ce44ec57ecc2dd9a2e7fa28fed804daf772ee030558b16c801
|
|
BLAKE2b-256 checksum How to use checksums |
36adf0b0951d06dfebb7e97c42d7b26a8807225c3425efc02a9fb0ff87cf9ef9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 20, 2026.
Transparency logRelease files / gapflow-1.2.0-cp312-cp312-win_amd64.whl
| Download URL | gapflow-1.2.0-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 4.8 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
9f33694d50634e1a5fcaf26b51c7cdd6e708ecb6538ba6f99cd8d231cfe50059
|
|
BLAKE2b-256 checksum How to use checksums |
363944c5b20bfcffb9cf279c768a33c2a378cd01b31d17b18584065a8df79fcc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 20, 2026.
Transparency logRelease files / gapflow-1.2.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | gapflow-1.2.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 9.3 MB |
| Tags | CPython 3.12 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
f6c16216dac3c7094eacc39fef2db2078f7fe673f2519081444d170a2cdff18a
|
|
BLAKE2b-256 checksum How to use checksums |
0acde4b232878a856eb4a8b7be3e5af32e7ec1dee9259b847d208eeb6ef380e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 20, 2026.
Transparency logRelease files / gapflow-1.2.0-cp312-cp312-macosx_15_0_arm64.whl
| Download URL | gapflow-1.2.0-cp312-cp312-macosx_15_0_arm64.whl |
|---|---|
| Size | 6.5 MB |
| Tags | CPython 3.12 macOS 15.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
455ba9a9aea555a11ebe17e4799844bb475160c46275ba046bd7c295f8b433cb
|
|
BLAKE2b-256 checksum How to use checksums |
ffbdba28f90d48d4f67c007d3d036c394da9329d42b540ba3940d0193c0b2b89
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 20, 2026.
Transparency logRelease files / gapflow-1.2.0-cp311-cp311-win_amd64.whl
| Download URL | gapflow-1.2.0-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 4.8 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
0f97f87d50075317612a0ce8f75b8835228c658ead69dfaaf83e6380b5fbd267
|
|
BLAKE2b-256 checksum How to use checksums |
75043d8b86f28847490f30d455a1571a5918491d0f8a627c9a004562313ae3c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 20, 2026.
Transparency logRelease files / gapflow-1.2.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | gapflow-1.2.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 9.3 MB |
| Tags | CPython 3.11 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
ef22a61957f953651e6469ca8ba3d66f2bad6783dd88f9b09dc10837b4c84233
|
|
BLAKE2b-256 checksum How to use checksums |
d700d3aacd0269ce33910216e5833b230a558a14786ab529b57e6066386a60fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 20, 2026.
Transparency logRelease files / gapflow-1.2.0-cp311-cp311-macosx_15_0_arm64.whl
| Download URL | gapflow-1.2.0-cp311-cp311-macosx_15_0_arm64.whl |
|---|---|
| Size | 6.5 MB |
| Tags | CPython 3.11 macOS 15.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
2f23330a6614c2e1feeddfb3481b29c21d06652fb0a951cd1c601432aa876f43
|
|
BLAKE2b-256 checksum How to use checksums |
892dbec772281e35527ad75a0cee3b97e770928d9a4c97d0549ed363e9f55d74
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 20, 2026.
Transparency logRelease files / gapflow-1.2.0-cp310-cp310-win_amd64.whl
| Download URL | gapflow-1.2.0-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 4.8 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
0630de40ae38e90f66717e905537d40c46932fbc1ab92dc2d23147ca473ebb9d
|
|
BLAKE2b-256 checksum How to use checksums |
d831b8abf36c887a1e1e57ed4c2ad01b6d3cfbed9b2f6916957eb27412663cad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 20, 2026.
Transparency logRelease files / gapflow-1.2.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | gapflow-1.2.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 9.3 MB |
| Tags | CPython 3.10 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
1460ef011d7bf2dc6d4d0488732260448b5fbbe05bd5be338f48f019ac263ba5
|
|
BLAKE2b-256 checksum How to use checksums |
872b95c64ddaa731b79b93ceedc2f4e863115fd3c82752e9b2b8097140b37e39
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 20, 2026.
Transparency logRelease files / gapflow-1.2.0-cp310-cp310-macosx_15_0_arm64.whl
| Download URL | gapflow-1.2.0-cp310-cp310-macosx_15_0_arm64.whl |
|---|---|
| Size | 6.5 MB |
| Tags | CPython 3.10 macOS 15.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
77e4288e71cd6f0822a89fcc1fbb89540d6618186766a4754ebd30f53b242e6f
|
|
BLAKE2b-256 checksum How to use checksums |
a6afd85cffbf439c7dcef28f23d67a0ecd442bf232af9bd5d81a8cc3a6f24f3f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 20, 2026.
Transparency log