Skip to main content

Gap-averaged flow simulations with Gaussian process regression.

Project description

PyPI - Version Tests Coverage

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 inputs
  • Ytrain.npy (Optional): Training data observations
  • Ytrain_err.npy (Optional): Training data observation error

The code comes with a few handy command line tools for visualizations like this one

journal

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.

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

gapflow-1.1.0.tar.gz (77.5 MB view details)

Uploaded Source

Built Distributions

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

gapflow-1.1.0-cp314-cp314-win_amd64.whl (4.0 MB view details)

Uploaded CPython 3.14Windows x86-64

gapflow-1.1.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (9.3 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

gapflow-1.1.0-cp314-cp314-macosx_15_0_arm64.whl (6.5 MB view details)

Uploaded CPython 3.14macOS 15.0+ ARM64

gapflow-1.1.0-cp313-cp313-win_amd64.whl (3.9 MB view details)

Uploaded CPython 3.13Windows x86-64

gapflow-1.1.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (9.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

gapflow-1.1.0-cp313-cp313-macosx_15_0_arm64.whl (6.5 MB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

gapflow-1.1.0-cp312-cp312-win_amd64.whl (3.9 MB view details)

Uploaded CPython 3.12Windows x86-64

gapflow-1.1.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (9.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

gapflow-1.1.0-cp312-cp312-macosx_15_0_arm64.whl (6.5 MB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

gapflow-1.1.0-cp311-cp311-win_amd64.whl (3.9 MB view details)

Uploaded CPython 3.11Windows x86-64

gapflow-1.1.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (9.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

gapflow-1.1.0-cp311-cp311-macosx_15_0_arm64.whl (6.5 MB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

gapflow-1.1.0-cp310-cp310-win_amd64.whl (3.9 MB view details)

Uploaded CPython 3.10Windows x86-64

gapflow-1.1.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (9.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

gapflow-1.1.0-cp310-cp310-macosx_15_0_arm64.whl (6.5 MB view details)

Uploaded CPython 3.10macOS 15.0+ ARM64

File details

Details for the file gapflow-1.1.0.tar.gz.

File metadata

  • Download URL: gapflow-1.1.0.tar.gz
  • Upload date:
  • Size: 77.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for gapflow-1.1.0.tar.gz
Algorithm Hash digest
SHA256 a002afa78edd6cb9d0b28e9d3b9e6fd7cc59aa9200f68b50d3c48df1a2ac8fb3
MD5 045d23cb3c673318937a6b9b34233f6e
BLAKE2b-256 d8289d274a5742a901580cfbf4a31d3793f17142796b7e6904aa421643d8c921

See more details on using hashes here.

Provenance

The following attestation bundles were made for gapflow-1.1.0.tar.gz:

Publisher: wheels.yaml on hannes-holey/GaPFlow

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

File details

Details for the file gapflow-1.1.0-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: gapflow-1.1.0-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 4.0 MB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for gapflow-1.1.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 4fd2df6eea482e6ce8bcf212e49ae6ee90b806584b049deb6b0b512f734b082c
MD5 496ff613898422383ba96a70788d6c84
BLAKE2b-256 dd5f6386c76b6694a12d87bb799ee976dfc02bce64b3ae0a6a1d515f06412019

See more details on using hashes here.

Provenance

The following attestation bundles were made for gapflow-1.1.0-cp314-cp314-win_amd64.whl:

Publisher: wheels.yaml on hannes-holey/GaPFlow

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

File details

Details for the file gapflow-1.1.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for gapflow-1.1.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 45c71204f25da2255ac2eadbaf2fe171fd106600ac35c62b8d4623e261f50b0f
MD5 cca4434e0b9f0b99588014e4af5f267a
BLAKE2b-256 8dc98b6f88bebfc841c128386152668020a0e9faa33595ba855aac3f55f9c00d

See more details on using hashes here.

Provenance

The following attestation bundles were made for gapflow-1.1.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: wheels.yaml on hannes-holey/GaPFlow

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

File details

Details for the file gapflow-1.1.0-cp314-cp314-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for gapflow-1.1.0-cp314-cp314-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 774936bad9c3bf7ab0ab437b8f8de25a190fc9fd367597dd43fa1155c74e60d9
MD5 efbfeecfe7b19ed02a8d43c6e60016be
BLAKE2b-256 68dca883842b8dc5496df8e5cdf7fee3531debf07f00083c4409968ac377c52f

See more details on using hashes here.

Provenance

The following attestation bundles were made for gapflow-1.1.0-cp314-cp314-macosx_15_0_arm64.whl:

Publisher: wheels.yaml on hannes-holey/GaPFlow

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

File details

Details for the file gapflow-1.1.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: gapflow-1.1.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 3.9 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for gapflow-1.1.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 de111eacf1977aa7b7ec7af2abf577bcfd423e9885d12b32f0a8c3c0628d34b7
MD5 2a194dfd86bb966d1581d09366cac980
BLAKE2b-256 67889981247bd2e7c4802f1e1edcf66919bd9e99d39052e8063fcd7dc606d640

See more details on using hashes here.

Provenance

The following attestation bundles were made for gapflow-1.1.0-cp313-cp313-win_amd64.whl:

Publisher: wheels.yaml on hannes-holey/GaPFlow

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

File details

Details for the file gapflow-1.1.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for gapflow-1.1.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ffb85ebf7094af14d08a73308975deab47f2ea152023343a420b4271ecc72b59
MD5 f1a22eb3389cc9fd5f956f45111d1bc3
BLAKE2b-256 239a642b857a9d15b5680d705df3ee8c06bc2112062899be969f94485a5b377d

See more details on using hashes here.

Provenance

The following attestation bundles were made for gapflow-1.1.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: wheels.yaml on hannes-holey/GaPFlow

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

File details

Details for the file gapflow-1.1.0-cp313-cp313-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for gapflow-1.1.0-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 016320f218311f9cac3d1ae720d68680c9a50d24903c42e40039b7f3ac0fa110
MD5 d00ef738060be94bacd764fcc09ede64
BLAKE2b-256 86023a78e0affc1d4dedcb330f44144607fb8c68f3498f46182c3eb6ba09ae02

See more details on using hashes here.

Provenance

The following attestation bundles were made for gapflow-1.1.0-cp313-cp313-macosx_15_0_arm64.whl:

Publisher: wheels.yaml on hannes-holey/GaPFlow

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

File details

Details for the file gapflow-1.1.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: gapflow-1.1.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 3.9 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for gapflow-1.1.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 983d8a81dec58ba9248f67ad9d39d5d030283af1d1346c6675274ffcced2922d
MD5 291c5204033cb76c4732a0fe5db51cfc
BLAKE2b-256 37e1e6bf30c5abdafb23eb29dc33bf94688994490586eb929229611bc5ce5ac1

See more details on using hashes here.

Provenance

The following attestation bundles were made for gapflow-1.1.0-cp312-cp312-win_amd64.whl:

Publisher: wheels.yaml on hannes-holey/GaPFlow

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

File details

Details for the file gapflow-1.1.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for gapflow-1.1.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b5133b4dd00d02dbb9876d3350b11dbf9b49a55823b321946eb2dfa366cf553e
MD5 1c601abba1f9e193f132e5baaec9c479
BLAKE2b-256 6381b2135253726d2d1f97cb3980a3df23c1ba48383f7d820a768e0280e1710e

See more details on using hashes here.

Provenance

The following attestation bundles were made for gapflow-1.1.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: wheels.yaml on hannes-holey/GaPFlow

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

File details

Details for the file gapflow-1.1.0-cp312-cp312-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for gapflow-1.1.0-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 96d27e0807f07955e8086a6d0903c75aef561528809062c94abd81f3873a5e63
MD5 b74d6626dde5810006da8f49bfc702ed
BLAKE2b-256 e139ed138331252c477ee7564e6f6acff715f8ae9aa8de4f98fa7fe20b28ab97

See more details on using hashes here.

Provenance

The following attestation bundles were made for gapflow-1.1.0-cp312-cp312-macosx_15_0_arm64.whl:

Publisher: wheels.yaml on hannes-holey/GaPFlow

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

File details

Details for the file gapflow-1.1.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: gapflow-1.1.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 3.9 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for gapflow-1.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9025e86f6cb0ec849174f3404bebe261c034cf2f7897f21af3285b5882da8cf4
MD5 0b18a31b4b9df34ca9d9339d7500b2fe
BLAKE2b-256 43650b5be58cbf803d00c028e1726b7fded286078dedf82fbfd2c21cc01a26f7

See more details on using hashes here.

Provenance

The following attestation bundles were made for gapflow-1.1.0-cp311-cp311-win_amd64.whl:

Publisher: wheels.yaml on hannes-holey/GaPFlow

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

File details

Details for the file gapflow-1.1.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for gapflow-1.1.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5af1675f504e2da57a7a8049de13a5c8cb03fbbb3b9e217114a131f9609254c7
MD5 938ece2978df31f02c8560dd25397084
BLAKE2b-256 71ec0bf1f38b0a0e52b2cdd90b5405999f8c7749628d5f7fee8f860bf7a213aa

See more details on using hashes here.

Provenance

The following attestation bundles were made for gapflow-1.1.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: wheels.yaml on hannes-holey/GaPFlow

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

File details

Details for the file gapflow-1.1.0-cp311-cp311-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for gapflow-1.1.0-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 e222f95aff724ed978a161d18e66dc0a34f40f16eb36ab237c9f0f799c70016c
MD5 c462325294e6b8cdfeaa51bda612d2b4
BLAKE2b-256 30f05be649345ae139aed44ab1950d39b5db5a12f421463c5d50be37af0f4f02

See more details on using hashes here.

Provenance

The following attestation bundles were made for gapflow-1.1.0-cp311-cp311-macosx_15_0_arm64.whl:

Publisher: wheels.yaml on hannes-holey/GaPFlow

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

File details

Details for the file gapflow-1.1.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: gapflow-1.1.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 3.9 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for gapflow-1.1.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 6f3d91053705240354800320ef04ed905fc67bdaef2def49c4f6a115aabf8f89
MD5 15a5c2e727a2cccbd6a453407dc7fb1e
BLAKE2b-256 0e8b13dfa9f6e575f365826cf42cc69b507c5a37ec6820d6380f80ffcf787540

See more details on using hashes here.

Provenance

The following attestation bundles were made for gapflow-1.1.0-cp310-cp310-win_amd64.whl:

Publisher: wheels.yaml on hannes-holey/GaPFlow

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

File details

Details for the file gapflow-1.1.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for gapflow-1.1.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d9d975d90ea0e44a215afa136eea92c0078c327f0f74ca225713424ba92ad1a5
MD5 57f52caa21e844a96308ea098675140e
BLAKE2b-256 2738534dd0c278b19fa18d4500b29e5c4edec9ed49e892f08c3c23fc51628636

See more details on using hashes here.

Provenance

The following attestation bundles were made for gapflow-1.1.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: wheels.yaml on hannes-holey/GaPFlow

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

File details

Details for the file gapflow-1.1.0-cp310-cp310-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for gapflow-1.1.0-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 380ebb54be08ca79d626bbe349c16bbe37b2bd56160775675d8b80bf59d23d9b
MD5 1766a6da0f6d383a4403f4e2bccaf8db
BLAKE2b-256 ae3dba8993857ad7ab25b5d5109e6ea3cd06dd505e05dd278cf57f58d297dad7

See more details on using hashes here.

Provenance

The following attestation bundles were made for gapflow-1.1.0-cp310-cp310-macosx_15_0_arm64.whl:

Publisher: wheels.yaml on hannes-holey/GaPFlow

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