Skip to main content

geoparticle 1.0.1

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.

Installation

Installing from pypi

pip install geoparticle

Installing from the source code

Download and enter the source code directory, then

pip install .

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.1.tar.gz (24.0 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.1-py3-none-any.whl (23.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: geoparticle-1.0.1.tar.gz
  • Upload date:
  • Size: 24.0 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.1.tar.gz
Algorithm Hash digest
SHA256 6e924de8472bd4357fe8d6037c30b44113d1ffb341d2812860260005d6d6da09
MD5 5034745f4510854f03c27cee63ed8976
BLAKE2b-256 5167ff0d3a88508268c2b8ddcf00a9e6b5c25849a29d1c65390da6fe9c808a53

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: geoparticle-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 23.2 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0d9cd27d511378a1420f50bf9cdd63ba443be0cd3b6888592ba79f97b8c9f0d4
MD5 0ff4a90b8dbb52285550524932cfe358
BLAKE2b-256 3e038a8569b57d01d00e5ee8248b5ccee813c3420448b03a0e9a1766566079fb

See more details on using hashes here.

Provenance

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