Skip to main content

geoparticle 1.0.4

Project description

geoparticle

A Python package for geometry construction in particle-based simulation.

I mainly use this package for geometry construction in LAMMPS, with some examples provided in the repository; of course, it can also be used for other software.

Docs Status pypi

Installation

Installing from pypi

pip install geoparticle

Installing from the source code

Download and enter the source code directory, then

pip install .

Documentation

The documentation is hosted on Read the Docs.

Background

Particles of specified geometries are typically created by the lattice command in LAMMPS, which can lead to rough surfaces when the particle spacing is not small enough. However, too small spacing can result in too many particles and thus increase the computational cost.

The case is the same when one creates atoms based on an external STL file (an example STL file exported by COMSOL is shown below):

Features

To resolve this problem, I developed this package for easy construction of geometries where smooth surfaces are required. Miscellaneous geometries are provided, including 1D geometries (lines and curves):

2D geometries (rectangles and circles):

3D geometries (blocks, cylinders, tori, and spheres):

all of which can be surface, thick shells, or filled bodies.

Diverse operations are also provided, including translation, mirror, rotation, stack, clipping, union, intersection, and subtraction.

Some utility functions are also provided.

Quick start

examples/gallery.py provided detailed scripts to yield the geometries above.

Two more examples are given to shown how to couple geoparticle with LAMMPS. The first example is the 2D gas-liquid dam break, while the second is a 3D intestine connected with an inlet and an outlet.

See the documentation for details.

Limitations

The particle spacings may be not exactly as specified in order to create a smooth surface.

Resultant geometries of boolean operations can have more particles than expected in some cases, because

  • For intersection and subtraction, only particles with distances smaller than rmax will be identified the same. Users should align particles of different geometries to get the expected results.
  • For union, particles of all the given geometries will be collected to yield the union. Users should ensure no particles are overlapped.

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

geoparticle-1.0.4.tar.gz (23.6 kB view details)

Uploaded Source

Built Distribution

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

geoparticle-1.0.4-py3-none-any.whl (24.6 kB view details)

Uploaded Python 3

File details

Details for the file geoparticle-1.0.4.tar.gz.

File metadata

  • Download URL: geoparticle-1.0.4.tar.gz
  • Upload date:
  • Size: 23.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for geoparticle-1.0.4.tar.gz
Algorithm Hash digest
SHA256 57a41407252103f8d9182218453501bbcfa1560ba0e8def518de52d24db6a914
MD5 6e603b15118471cad3dc6af18e9db667
BLAKE2b-256 085d5c01a9a9a1481e97d4d6dd0d5a90c91e6d797e2383c79a7fab582d281121

See more details on using hashes here.

Provenance

The following attestation bundles were made for geoparticle-1.0.4.tar.gz:

Publisher: python-publish.yml on Jasmine969/geoparticle

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

File details

Details for the file geoparticle-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: geoparticle-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 24.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for geoparticle-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 649e0599422fc182e537aa2157f8f2e3f3c42fa5ee0e5a4e0c0ca674aa5a7088
MD5 720132dee79a19793e53b3c1fd630991
BLAKE2b-256 150372eaf6e8df717251add42a8a1d87bb46c6e955d4b46d86f33c48486b099f

See more details on using hashes here.

Provenance

The following attestation bundles were made for geoparticle-1.0.4-py3-none-any.whl:

Publisher: python-publish.yml on Jasmine969/geoparticle

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