Skip to main content

geoparticle 1.0.3

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.3.tar.gz (23.7 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.3-py3-none-any.whl (24.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: geoparticle-1.0.3.tar.gz
  • Upload date:
  • Size: 23.7 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.3.tar.gz
Algorithm Hash digest
SHA256 f55bebf54fa51dbda983242d5c68abed0b02780b25d321ff202566f65516594a
MD5 77ee4ab00aa4963b9fd9eb900d64916b
BLAKE2b-256 7f27df9db396d932c731911b431ca7f3cdda9fdc6f6193dd925a6cce6c0a30c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for geoparticle-1.0.3.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.3-py3-none-any.whl.

File metadata

  • Download URL: geoparticle-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 24.7 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f9f4efe71705717b7c2c6ee646fca163fcc2f22f29407e70425f1432a34f01cf
MD5 383309e83b719b35bfb590662af3bdf7
BLAKE2b-256 0141a7d0346dcbc9e77ba87c14c71faeb0efc87cbefe0dc3a5400a85b59dbd2c

See more details on using hashes here.

Provenance

The following attestation bundles were made for geoparticle-1.0.3-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