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.

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.pre_run()
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.0.2.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.0.2-cp314-cp314-win_amd64.whl (4.0 MB view details)

Uploaded CPython 3.14Windows x86-64

gapflow-1.0.2-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.0.2-cp314-cp314-macosx_15_0_arm64.whl (6.5 MB view details)

Uploaded CPython 3.14macOS 15.0+ ARM64

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

Uploaded CPython 3.13Windows x86-64

gapflow-1.0.2-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.0.2-cp313-cp313-macosx_15_0_arm64.whl (6.5 MB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

gapflow-1.0.2-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.0.2-cp312-cp312-macosx_15_0_arm64.whl (6.5 MB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

gapflow-1.0.2-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.0.2-cp311-cp311-macosx_15_0_arm64.whl (6.5 MB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

gapflow-1.0.2-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.0.2-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.0.2.tar.gz.

File metadata

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

File hashes

Hashes for gapflow-1.0.2.tar.gz
Algorithm Hash digest
SHA256 bd7e2da451b1b93699d8f758703aa23fcb4f725062cf582bba1ff5aa7d5eb847
MD5 4df27ddc01f86de7f6e5376d118c5ad3
BLAKE2b-256 29f697e54169f23879fa74d7b4009cc4fcab75ebdfb8cc31e4df937b254b005b

See more details on using hashes here.

Provenance

The following attestation bundles were made for gapflow-1.0.2.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.0.2-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: gapflow-1.0.2-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.7

File hashes

Hashes for gapflow-1.0.2-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 778cbd502e05e50a9f23f115b29ec6af63c8572f86514a0a0c2fe7416b4901cf
MD5 2b686b90d968fde3c3b7b0458e53a181
BLAKE2b-256 bec7a5e52d2a1618d799fd8cd8fdbf375cb48f3f86d22c2da5de138568e32660

See more details on using hashes here.

Provenance

The following attestation bundles were made for gapflow-1.0.2-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.0.2-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for gapflow-1.0.2-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3b036858f6ae404811e9b5b53d2c838f1b8230bd3d26530848e565b8fbdaf228
MD5 5ce2c75600372b82561600244c813118
BLAKE2b-256 8d475783014debe994bb48b837d85c41ddf5fd21fb9b7e574f340008d2c108ce

See more details on using hashes here.

Provenance

The following attestation bundles were made for gapflow-1.0.2-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.0.2-cp314-cp314-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for gapflow-1.0.2-cp314-cp314-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 21ccffc59f7449f681a16396dc7229f8b0d4b45699a0cf0011380d08706a75ae
MD5 e7b57a82040f015cae6acdd71ba8d6fd
BLAKE2b-256 abdc39abf72700962521441ca39d6b146b66e4c454729f1b5bf74f5194b7b1de

See more details on using hashes here.

Provenance

The following attestation bundles were made for gapflow-1.0.2-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.0.2-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: gapflow-1.0.2-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.7

File hashes

Hashes for gapflow-1.0.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 27b5862d747c3ab217042ddb6cf79fdc1c4373b3473fe3d6387bf98f11fa0ccc
MD5 713b3f197060f255f902b12b91b85270
BLAKE2b-256 02afc4cf076452eba29718783cbeacf56093e29546ba557de35f8877daa94c89

See more details on using hashes here.

Provenance

The following attestation bundles were made for gapflow-1.0.2-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.0.2-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for gapflow-1.0.2-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 adc726b2a963051d3e8e0e2e156cdf2fc41aaf0f35ce3379fba78b9b0f565408
MD5 c2d0da4c44de8810930f7b16c3919138
BLAKE2b-256 dacbbd69faf2587c44afc6dbf0bad9f457f5e2d17f53436f890a6bf9d5f03861

See more details on using hashes here.

Provenance

The following attestation bundles were made for gapflow-1.0.2-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.0.2-cp313-cp313-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for gapflow-1.0.2-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 9942c6bac9ee6b739b4b1f4d07cfeed8413406ec49a1453092cdff3ddc0acabf
MD5 24a25521e812784cbba9ada5a72fc934
BLAKE2b-256 fcaaf4dc0cbf19d51a8d559ea51a4b513b1f42ae0d7d06ac11fba9e2cda41994

See more details on using hashes here.

Provenance

The following attestation bundles were made for gapflow-1.0.2-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.0.2-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: gapflow-1.0.2-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.7

File hashes

Hashes for gapflow-1.0.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 45555b2791e2deabdea2b8c7cb4ec91864a1eba8e277876ee6ba72fb4a5b2d95
MD5 4debb0c77986041afcb2a811354175e6
BLAKE2b-256 e764628a22cc30dd09b33de3b06a6353153c55b33f9768f8ec8ff17d780d378d

See more details on using hashes here.

Provenance

The following attestation bundles were made for gapflow-1.0.2-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.0.2-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for gapflow-1.0.2-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 661dc4e44e218461d5b15a7c6a7ed8dfc13e4d1b0583e74043a8b9d8005b67d8
MD5 e7336e147a2b689791a61a9602dc3463
BLAKE2b-256 e7827c712cd2a3354632cf1f12865bb0bfcc937cd859839188aa9c953c006a17

See more details on using hashes here.

Provenance

The following attestation bundles were made for gapflow-1.0.2-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.0.2-cp312-cp312-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for gapflow-1.0.2-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 88ae989408fda31c871412758d7ec7e5ee08a57508d2e88c792b4ad7aaa6212b
MD5 b4c4aedceaa688e1705b3179b639a5f2
BLAKE2b-256 0593a8fe213f5595cdb3dfe7c32c28742f4c772438e7330220f5bd7a510ccfa1

See more details on using hashes here.

Provenance

The following attestation bundles were made for gapflow-1.0.2-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.0.2-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: gapflow-1.0.2-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.7

File hashes

Hashes for gapflow-1.0.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 d9cc3f715ce9494386357a7166dc20e426e981b82834369547a65c143e10e7dc
MD5 d82273ee57a482487aad18cd39bd2ba5
BLAKE2b-256 a4513b791c8f60e8b1541287dbcfe15b54eb7757e527edc7a346dbb3c536ade7

See more details on using hashes here.

Provenance

The following attestation bundles were made for gapflow-1.0.2-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.0.2-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for gapflow-1.0.2-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2819cddc6f5abdd663cc49de85101e4f63fb22786f428bd7ada643874c49de22
MD5 57866d6364bad4f8c5df7e30d07a4d65
BLAKE2b-256 c0e78321eecea90aac29c4144179733fa2762ceb8daecb101763fc1cf287c623

See more details on using hashes here.

Provenance

The following attestation bundles were made for gapflow-1.0.2-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.0.2-cp311-cp311-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for gapflow-1.0.2-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 e3a89840e684971331798c5c97500913e01d3a6ced9b860abc3f7ae6001627cc
MD5 43bcb4e757f09f08b96fdf32c8254400
BLAKE2b-256 e4f6c622e9f19dde868f55c8713a37ae63350185393c67b524585e76904b4fdb

See more details on using hashes here.

Provenance

The following attestation bundles were made for gapflow-1.0.2-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.0.2-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: gapflow-1.0.2-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.7

File hashes

Hashes for gapflow-1.0.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 3adf24da489ddbec92e49e1c6c632c0d27965236c72fe6683c6c60faccf6e522
MD5 75aadf4ec2b93a8d7afe2df2c46727d6
BLAKE2b-256 1324483ae1f45fad52a7b3627a5586ef9a3422cc95b0e117786112ca89bc4fad

See more details on using hashes here.

Provenance

The following attestation bundles were made for gapflow-1.0.2-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.0.2-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for gapflow-1.0.2-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8eff7b83010f64856c2b9247015e4dd9133791554be48d4448838b8349599848
MD5 a4855b80ecf783f3fb5242ffa1dc2142
BLAKE2b-256 9b62e87a6c77cefe19a9babe13d4a8aab0b1a3b9ccfabbe499e7dc48a04f2b38

See more details on using hashes here.

Provenance

The following attestation bundles were made for gapflow-1.0.2-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.0.2-cp310-cp310-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for gapflow-1.0.2-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 981e6085ddb72083321a989d2971bfd6e20fe3f4b279166414b93f90509f2029
MD5 94710f8765a176a4309afe36ecec8a60
BLAKE2b-256 ee84e75bbd8bd7712dd15b7718cad73e77e601a4c8538ea1dae9e15fda7bfe48

See more details on using hashes here.

Provenance

The following attestation bundles were made for gapflow-1.0.2-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